Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PI Control sequence - Help

Status
Not open for further replies.

Maverickmax

New Member
I am implementing PI control but I am not sure which one is correct. Can you please help me to point the correct equation

Error = IncomingSignal - Setpoint

P = P_Gain * Error

SumError= SumError + Error

I = I_Gain*SumError

PWM = PWM + P + I

OR

Error = SetPoint - IncomingSignal

P = P_Gain * Error

SumError= SumError + Error

I = I_Gain*SumError

PWM = PWM + P + I


MM
 
The only difference is the sign of the error.

The one that you should use depends on whether the IncomingSignal increases or decreases when the PWM increases.

Either way you have to add the Error into the SumError at regular intervals.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top