Actuator limits and integrator windup
About this lesson
Every real actuator has a limit: a motor's top speed, a valve fully open, a heater's maximum power. Linear design ignores it. Take one PI loop (the integral term from "Adding integral and derivative action") on the plant 1/(s+1) and give the actuator a ceiling of 1.5. A step that asks for more saturates the actuator, the integral keeps adding anyway, and the output overshoots 28.5% instead of the designed 7.2%. Then fix it with anti-windup. Every curve is simulated from the model, and the same Python loop runs on each step.
The design on paper
Plant G(s) = 1/(s+1), PI controller 4·e + 8·∫e dt, goal steps to 1. With no limits it overshoots 7.2% and settles within 2% in 1.73 s. But at t = 0 it asks for u = 4.
# PI, goal r = 1, no actuator limit
Kp, Ki, umax, dt = 4, 8, 1.5, 0.001
y = I = peak = 0.0
for n in range(6000): # 6 s
e = 1.0 - y # error
v = Kp * e + I # what the controller asks for
u = v # what the actuator gives
I += Ki * e * dt # integral always adds
y += (u - y) * dt # plant: y' = -y + u
peak = max(peak, y)
print(f"{peak:.3f}") # 1.072Read the lesson step by step
The design on paper
Plant G(s) = 1/(s+1), PI controller 4·e + 8·∫e dt, goal steps to 1. With no limits it overshoots 7.2% and settles within 2% in 1.73 s. But at t = 0 it asks for u = 4.
# PI, goal r = 1, no actuator limit Kp, Ki, umax, dt = 4, 8, 1.5, 0.001 y = I = peak = 0.0 for n in range(6000): # 6 s e = 1.0 - y # error v = Kp * e + I # what the controller asks for u = v # what the actuator gives I += Ki * e * dt # integral always adds y += (u - y) * dt # plant: y' = -y + u peak = max(peak, y) print(f"{peak:.3f}") # 1.072Every actuator has a limit
A motor has a top speed; a valve opens only so far; a heater has a maximum power. Our actuator gives at most 1.5. Ask for 4 and it gives 1.5: the extra is simply lost. This clipping is called saturation.
asked v given u = sat(v) 0.8 0.8 1.5 1.5 4.0 1.5 (saturated) −4.0 −1.5 (saturated) u = min(max(v, −1.5), 1.5) Saturation is not linear: doubling v does not double u once v passes 1.5.The step asks too much
At t = 0 the controller asks for 4 and gets 1.5. While stuck at the limit the loop is open: y = 1.5(1 − e^−t), slower than designed. It reaches the goal only at t = ln 3 ≈ 1.10 s.
saturated: u = 1.5 whatever y does y' = −y + 1.5 y(t) = 1.5·(1 − e^−t) y = 1 when e^−t = 1/3 t = ln 3 = 1.099 s The feedback is still measured, but it cannot change u: the loop runs open while saturated.The integral winds up
All that time the error stays positive, so the integral keeps adding. When y first reaches 1, I holds 3.61. The plant needs only 1 to stay at 1, and the actuator gives at most 1.5. This build-up is integrator windup.
I(ln 3) = 8 · ∫₀^ln3 (1 − 1.5(1 − e^−t)) dt = 8 · (1.5·2/3 − ln3/2) = 3.61 at rest y = 1 needs u = 1 (DC gain 1) so I should end at 1. The extra 2.61 must be paid back by negative error: overshoot.Paying the debt back
With I = 3.61 the request stays above 1.5, so the actuator keeps pushing at full power past the goal until t = 1.91 s. Only negative error drains I. y overshoots to 1.285 (28.5%) and settles in 3.27 s.
# PI, goal r = 1, actuator limit, no anti-windup Kp, Ki, umax, dt = 4, 8, 1.5, 0.001 y = I = peak = 0.0 for n in range(6000): # 6 s e = 1.0 - y # error v = Kp * e + I # what the controller asks for u = min(max(v, -umax), umax) # what the actuator gives I += Ki * e * dt # integral always adds y += (u - y) * dt # plant: y' = -y + u peak = max(peak, y) print(f"{peak:.3f}") # 1.285 # overshoot 28.5% (no limit: 7.2%) # settles in 3.27 s (no limit: 1.73 s)Fix: stop adding at the limit
Anti-windup by clamping, also called conditional integration: while the actuator is saturated and the error pushes the same way, the integral holds still. It adds again as soon as the request is back inside the limit.
every dt: v = Kp*e + I u = min(max(v, -umax), umax) if u == v or e * v < 0: I += Ki * e * dt u == v not saturated: integrate e * v < 0 error pulls v back inside the limit: integrate otherwise hold I The extra wire from the limit to I carries one bit: "I am saturated".The fix in action
Same gains, same limit. I holds at 0 until y passes 0.625, where 4·e drops to 1.5. It then peaks at only 1.02. Overshoot falls from 28.5% to 0.3%, settling from 3.27 s to 1.44 s.
# PI, goal r = 1, actuator limit + clamping Kp, Ki, umax, dt = 4, 8, 1.5, 0.001 y = I = peak = 0.0 for n in range(6000): # 6 s e = 1.0 - y # error v = Kp * e + I # what the controller asks for u = min(max(v, -umax), umax) # what the actuator gives if u == v or e * v < 0: # not stuck, or easing off I += Ki * e * dt y += (u - y) * dt # plant: y' = -y + u peak = max(peak, y) print(f"{peak:.3f}") # 1.003 # integration starts at t = 0.54 s (y = 0.625) # I peaks at 1.02 (windup: 3.61)Three runs side by side
No limit: 7.2% overshoot, 1.73 s. Limit with windup: 28.5%, 3.27 s. Limit with clamping: 0.3%, 1.44 s. Another common fix, back-calculation, feeds the gap u − v back into the integrator and gives 0.3% here.
overshoot settle (2%) I max no limit 7.2% 1.73 s 1.51 windup 28.5% 3.27 s 3.61 clamping 0.3% 1.44 s 1.02 back-calc 0.3% 1.42 s 1.02 back-calculation (Åström & Murray §11.4): I += (Ki*e + Kaw*(u - v)) * dt Kaw = 8: u − v = 0 unless saturatedWhy linear tools miss it
Root locus, Bode plots and closed-loop poles all assume a linear loop: double the input, double the output. Saturation breaks that. Goal steps up to 0.375 never touch the limit and match the design; bigger steps wind up.
linear analysis T(s) = (4s + 8) / (s² + 5s + 8) ζ = 0.88, ωn = 2.83 rad/s overshoot 7.2% for ANY step size real loop u(0) = Kp·r = 4·r saturates if 4·r > 1.5 i.e. r > 0.375 So check the actuator signal in a simulation with the real limits.
5 quick questions
Choose one answer per question. You can change your choices before checking them.
01The PI controller u = 4·e + 8·∫e dt drives an actuator limited to ±1.5. What does it ask for at the instant the goal steps from 0 to 1, and what does the plant receive?
At t = 0 the error is 1 and the integral is 0, so v = 4·1 = 4. The actuator clips it to 1.5: u = min(max(v, −1.5), 1.5).
02Without anti-windup, the integral holds 3.61 when the output first reaches the goal, but the plant needs only 1 to stay there. Why did it grow so large?
Saturated, y = 1.5(1 − e^−t) reaches 1 only at t = ln 3 ≈ 1.10 s. Integrating 8·e over that time gives 8·(1 − ln3/2) ≈ 3.61. That is windup.
03Which rule describes clamping (conditional integration)?
In code: if u == v or e * v < 0: I += Ki * e * dt. Here the overshoot falls from 28.5% to 0.3% with the same gains and the same limit.
04The linear model of this loop, (4s + 8)/(s² + 5s + 8), predicts 7.2% overshoot for every step size. For which goal steps is that prediction right?
The largest request is at t = 0: 4·r. It stays inside ±1.5 for r ≤ 1.5/4 = 0.375. Saturation is nonlinear, so linear tools cannot see it; simulate with the real limits.
05Back-calculation is another anti-windup method. What does it feed into the integrator?
I' = Ki·e + Kaw·(u − v). The extra term is zero until the actuator saturates, then pulls the integral back so that v stays near the limit (back-calculation, Åström and Murray, §11.4). With Kaw = 8 it gives 0.3% overshoot here.
Glossary
- Actuator
- The part that acts on the plant: a motor, a valve, a heater, a pump. It turns the controller's signal into a physical push.
- Saturation
- An actuator reaching its limit. Asked for more, it gives only its maximum: u = min(max(v, −umax), umax).
- Integrator windup
- The integral term keeps growing while the actuator is saturated and cannot respond, then causes a large overshoot while it unwinds.
- Anti-windup
- Any extra logic that stops the integral growing while the actuator is at its limit.
- Clamping (conditional integration)
- An anti-windup method: hold the integral still while the actuator is saturated and the error pushes the same way.
- Back-calculation
- An anti-windup method: feed the gap between the given and the asked control signal, u − v, back into the integrator through a gain.
- Nonlinear
- A system where doubling the input does not double the output. Saturation is nonlinear, so linear tools such as root locus and Bode plots cannot predict it.
Notes and sources
- The plant 1/(s+1), the gains Kp = 4, Ki = 8 and the limit ±1.5 are a textbook-style example in normalised units, not a measured machine. Every curve and number is simulated with the same Python loop shown on the steps (Euler steps of 1 ms). The no-limit run matches the closed-form step response of (4s + 8)/(s² + 5s + 8), and the windup integral matches 8·(1 − ln3/2) ≈ 3.61.
- Åström and Murray, Feedback Systems (2nd ed.), §11.4: when the actuator saturates "the feedback loop is broken and the system runs in open loop", the integral builds up, and "the consequence is that there are large transients". Their cruise-control example (Example 11.5) shows the same effect on a steep hill.
- Clamping as defined in the MathWorks PID Controller block documentation: integration stops while the controller output exceeds the limits and the integrator input has the same sign as the saturation block input; it resumes when either condition no longer holds. The code here tests the same thing with e·v < 0.
- The Python is plain Python 3 with no libraries. python-control can simulate the linear part (control.step_response on control.feedback(C * G)), but a saturation needs a nonlinear simulation such as the loop shown.
- K. J. Åström and R. M. Murray, Feedback Systems, 2nd ed., ch. 11 PID Control, §11.4 Integral windup (chapter PDF)
- Åström and Murray, Feedback Systems, ch. 11 PID Control (FBSwiki chapter page)
- MathWorks, PID Controller block: anti-windup method (clamping and back-calculation)
- N. S. Nise, Control Systems Engineering, 8th ed., Wiley (§9.2 PI compensation)
- K. Ogata, Modern Control Engineering, 5th ed., Pearson (ch. 8 PID controllers)
- G. F. Franklin, J. D. Powell, A. Emami-Naeini, Feedback Control of Dynamic Systems, 8th ed., Pearson
- MIT OpenCourseWare 16.06 Principles of Automatic Control (S. Hall)
- MIT OpenCourseWare 6.302 Feedback Systems (Roberge, Dawson, Lundberg)
- Python Control Systems Library (python-control) documentation
Quiz Unlocks after the last step.