I have a question regarding the features of the so called incremental (velocity) form of the PID controller. As far as I understand this form in correct manner it can be described via this pseudocode
What I don't fully understand is behavior of this form in following scenario. Let's say I have this code in the feedback control loop and I do on-line changes of the controller parameters Kp and Ti (for the sake of simplicity suppose the D term isn't present). Now for whatever reason I set the Kp = 0.0 i.e. I effectively force the dup and the dui to be zero from that time instant. According to the above given pseudocode the action will remain at the previous value. In other
words the controller still produces some nonzero action. As far as my understanding is correct it seems to me that this behavior can be little bit misleading. Can anybody explain to me how does it work?
Code:
// increment of the action as a sum of the increment of the
// P term with setpoint weighting: dup = Kp * b * (r - r1) - Kp * (y - y1)),
// I term with trapezoidal integration rule: dui = (Kp*T)/(2.0*Ti) * (e + e1),
// D term with filtering pole and protection against the derivative kick: dud = Td/(Nd*T + Td) * (ud1 - ud2) - (Kp*Td*Nd)/(Nd*T + Td)*(y - 2.0*y1 + y2))
// where
// T - execution period
// Kp - proportional gain
// b - weighting factor (0 <= b <= 1)
// Ti - integration time constant
// Td - derivative time constant
// Nd - filtering pole position
// r - reference value
// y - controlled value
// e - control error
// ud - derivative term
// 1 - value at time instant (k-1)
// 2 - value at time instant (k-2)
du = dup + dui + dud
// current action as a sum of previous action and current increment of the action
u = u1 + du
// limitation of the action based on the actuator limits
if (u > u_max) {
u = u_max
} else if (u < u_min) {
u = u_min
}
// memory variables update
r1 = r
y2 = y1
y1 = y
e1 = e
u1 = u
ud2 = ud1
ud1 = ud
What I don't fully understand is behavior of this form in following scenario. Let's say I have this code in the feedback control loop and I do on-line changes of the controller parameters Kp and Ti (for the sake of simplicity suppose the D term isn't present). Now for whatever reason I set the Kp = 0.0 i.e. I effectively force the dup and the dui to be zero from that time instant. According to the above given pseudocode the action will remain at the previous value. In other
words the controller still produces some nonzero action. As far as my understanding is correct it seems to me that this behavior can be little bit misleading. Can anybody explain to me how does it work?