3 ms·
"anti-windup" is usually implemented for PID controllers to avoid increasing the I part infinitely, and linear state-space controls do suffer from the same prob
by dognotdog 5y ago
"anti-windup" is usually implemented for PID controllers to avoid increasing the I part infinitely, and linear state-space controls do suffer from the same problem in naive implementations.
- elcritch 5y agoIsn’t the windup normally just a min/max type function? Any suggestions for testing an anti-windup code in an implementation?
- dognotdog 5y agoYes, usually just clamp the integrator's accumulator value so that when the actuator is outside the linear control regime (eg. maxing out motor current because we're in the end-stop), the output of the controller doesn't continue increasing to infinity. (Another way is stopping integration when control output is at its physical limit, usually in addition to a numeric limit.) As with all other PID parameters, this is something you'd have to figure out more-or-less empirically. Testing with hardware would be checking that controller outputs stop increasing while the actuator is blocked away from its target value, usually running with much reduced speed/current etc limits. Ideally, of course, run unit tests and SIL, before trying it on actual hardware.
- gugagore 5y agoIt's a bit more subtle than that. What saturates is the actuator. You could choose a single minimum/maximum value for the integrator, but it could be better ye to have a value that depends dynamically on how much room there is left in the actuator output. For example, if the actuator is saturated, the integral term should not be increasing. That could happen at different values of the integral, so there is not a single min/max.
- pidtuner 5y agoI suggest to take a look to the canonical PID implementation of the Arduino library. It includes a simple but effective anti-windup mechanism: http://brettbeauregard.com/blog/2011/04/improving-the-beginners-pid-introduction/ http://brettbeauregard.com/blog/2011/04/improving-the-beginn...