
What you need
Use a simulated PI controller with an explicit actuator limit and a persistent unattainable target.
Read the diagram as a data table
| Condition or component | command units |
|---|---|
| 5 steps | 0.25 |
| 10 steps | 0.5 |
| 20 steps | 1 |
The calculation
I_(k+1) = I_k + K_i × e_k × Δt u_raw = K_p × e_k + I_k
I is the integral contribution in actuator-command units. Anti-windup modifies the update when saturation would push the command further into its limit.
Worked example
For K_i=1 command-unit/(rad·s), error 0.5 rad and 0.1 s steps, the integral grows by 0.05 per step. After 20 steps it reaches 1.0 even if the actuator could never supply the demanded effort.
Try it step by step
- Simulate a target beyond the actuator’s capability and observe the integral while the output remains clipped.
- Implement a suitable conditional-integration or back-calculation method, with clear behavior for both saturation directions.
- Return to a reachable target and compare recovery with and without anti-windup.
- Define integral reset or tracking behavior for disabled drives, mode changes and invalid feedback.
How to check the result
A valid design should recover from prolonged saturation without an avoidable large stored-error transient.
Common mistake to avoid
Simply freezing the integral whenever output is saturated can prevent it from unwinding in some cases. The error direction and chosen anti-windup method matter.
Reference reading
Primary references for the underlying models, APIs or application context. The worked numbers and plots above are educational calculations, not results reported by these sources.


