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.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…