PID, saturation and windup
P reacts to error now, I remembers error, D anticipates measured motion.
Separate requested input from applied input and explain why an integral term can keep growing at a limit.
Classical plots help us judge a loop. PID gives a practical way to change it with proportional, integral, and derivative actions.
Review the previous lesson: Why −180° matters: Nyquist and marginsFirst, picture it
P pushes harder when you are far away. I keeps pushing if you remain a little short. D damps fast motion. But an actuator has a maximum: if I keeps accumulating while output is clipped, the controller may overshoot badly after saturation clears.
Build the idea step by step
P uses the error now. I adds up error over time, so it can supply a lasting input against a constant load. D reacts to how quickly the measured output changes and can reduce rapid motion. In a practical PID, the derivative is filtered to reduce noise. Taking it from the measurement avoids a sharp derivative command when only the target jumps. The actuator then limits the requested command. Anti-windup prevents the integral contribution from building in a direction the actuator cannot deliver.
Read the equations
Proportional action uses current error, integral action collects past error, and derivative action here reacts to filtered measured motion.
The actuator can apply only an input within its limits. Practical anti-windup prevents the integral state from running far beyond that limit.
What the symbols mean
- target minus measured output
- proportional gain
- integral gain per second for a unitless error
- derivative gain times seconds for a unitless output
- filtered measured output
- requested and delivered input, volts in the motor example
- lower and upper actuator limits
- limit a requested value to the allowed input range
The example keeps error fixed to isolate accumulation. A running motor's error normally changes as it responds. The lab uses a filtered measurement derivative and conditional integral accumulation; compare requested and applied voltage, not just speed.
Why a voltage limit needs anti-windup
Assume normalized speed error stays at 3 for 2 seconds. Set proportional gain to 2 volts per error unit and integral gain to 1 volt per error-unit second. Ignore derivative action here.
Proportional request is 6 volts. Without anti-windup, the integral term builds to 6 more volts.
The request reaches 12 volts, but a 5 volt actuator applies only 5. The stored integral can keep the request high after error falls; anti-windup limits that accumulation.
More detail and model assumptions
Three responses to three kinds of information
P reacts to the error now. I accumulates past error, providing the sustained effort that a constant load may need. D reacts to how the measured output changes, helping damp a motion but also exposing sensor noise. The Lab differentiates a filtered measurement rather than the target, so a target step does not create a derivative kick from the reference.
PID can be tuned from measured responses without first writing a full plant equation. That does not mean tuning is only guesswork: step tests, frequency response, identified models and explicit specifications can guide it. The same gains are not portable to every motor or sample period.
Requested effort is not applied effort
The controller computes a requested voltage u*. The driver applies u clipped to ±12 V in this motor Lab. During clipping, I may continue growing even though the motor receives no extra voltage; later that stored integral can produce overshoot and slow recovery. Anti-windup limits accumulation when error would drive the request farther into saturation.
There is no universal instruction to turn I or D up. More I can remove persistent error but worsen a limited transient; more D can damp one setup and amplify noisy control in another. Change one term, pin the baseline, and inspect response, PID contributions, requested effort and applied effort together.
Connect the example to the lab
Set a demanding motor speed target near the voltage limit. Increase Ki, then compare with anti-windup enabled. Watch the integral contribution and how long the actual voltage stays clipped.
Compare anti-windup runsMake a prediction before moving a control.
- PREDICTCan a larger I gain make a run worse?
- CHANGE ONE THINGOpen the windup lesson, pin the protected run, then turn anti-windup off without changing the target.
- OBSERVECompare requested and applied voltage, I contribution and recovery after saturation ends.
- EXPLAINExplain why a voltage limit changes the effect of the same I gain.
'More D means more damping' is not universal; noisy measurements, filter settings and sample period change the outcome.
Check your understanding+
Why can the controller command differ from the applied motor voltage?
The actuator voltage limit clips the command; anti-windup addresses the integral state during that saturation.Why the next lesson follows
A heater makes saturation easy to see: it can add heat but cannot actively cool in this model.