jim hardy said:
(just think = what if it's a digital controller with floating point? Integral of error could be astronomical ! )
Well, here is how the wind-up can be prevented by digital control.
The desired speed is calculated by an input function with a max. speed = 10000 and a max. acceleration = 1000. So when the control-loop is activated from a halt, the output from the function should be
0, 1000, 2000, . . . , 9000, 10000, 10000, . . .
But say that the output stage ( D/A-converter ) is limited to -512 . . +511, the D/A-converter will be saturated/unlinear already by the first sample, because the PID will multiply the error by 5, giving 5000.
So to correct this error, you back-calculate:
Correction = ( 5000 - 511 ) / 5 - ( feed-back velocity ) = 898 ( always round-up ). Feed-back velocity = 0 from a halt.
This correction is subtracted from the internal set speed in the input function, giving a corrected internal set speed = 102.
Now you recalculate the loop with the new internal set speed, giving a new ( and final ) PID-value = 510, which value is within the limits.
At next sample, the input function will calculate an internal set speed = 102+1000 = 1102, but every time it suggests a value that leads to an exess in the output stage, it will be corrected. Thus the PID-controller will never wind-up, but will balance "on the edge", until internal set speed = 10000 is reached.