M Maverickmax New Member Mar 6, 2010 #1 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
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
D Diver300 Well-Known Member Most Helpful Member Mar 6, 2010 #2 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.
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.