Chapter 12: Advanced PID Design and Implementation
Lesson 3: Anti-Windup Strategies and Integrator Management
This lesson analyzes the nonlinear phenomenon of integrator windup in PID controllers subject to actuator saturation, develops rigorous mathematical models for saturation and integral dynamics, and derives classical anti-windup schemes such as integrator clamping, back-calculation, and leakage. We then implement these schemes in continuous- and discrete-time forms and provide multi-language code examples (Python, C++, Java, MATLAB/Simulink, and Wolfram Mathematica) with a robotics-oriented perspective.
1. Phenomenon of Integrator Windup
In previous chapters, we introduced PID controllers and showed that the integral action can eliminate steady-state error for step-type references in linear systems. In practice, however, actuators (motors, valves, thrusters) can only produce inputs within finite limits \( u_{\min} \) and \( u_{\max} \). When the controller demands a signal beyond these limits, the actuator saturates. If the integrator continues to integrate the error during saturation, the internal integral state can become very large: this is integrator windup.
Consider a standard parallel-form PID:
\[ v(t) = K_p e(t) + K_i \int_0^t e(\tau)\, d\tau + K_d \frac{de(t)}{dt} \]
where \( e(t) = r(t) - y(t) \) is the tracking error, and \( v(t) \) is the ideal controller output. The actual actuator input is limited by saturation:
\[ u(t) = \mathrm{sat}\big(v(t)\big) = \begin{cases} u_{\min}, & v(t) \le u_{\min} \\ v(t), & u_{\min} < v(t) < u_{\max} \\ u_{\max}, & v(t) \ge u_{\max} \end{cases} \]
If the reference \( r(t) \) changes abruptly (e.g., a step) or a large disturbance occurs, \( e(t) \) can remain large while the actuator is saturated. The integral term keeps increasing (or decreasing) even though the plant output cannot follow, leading to:
- severe overshoot once the error eventually changes sign,
- long recovery times, as the integrator must "unwind",
- potential closed-loop instability in the presence of nonlinearities.
Anti-windup strategies modify the integral dynamics so that the integral state remains consistent with the saturated actuator output, thereby improving transient behavior without sacrificing steady-state accuracy too much.
2. PID with Explicit Integral State and Saturation Model
To reason about integrator management, it is convenient to introduce an explicit integral state \( x_I(t) \). For a parallel PID:
\[ \dot{x}_I(t) = e(t), \quad u_I(t) = K_i x_I(t) \]
\[ v(t) = K_p e(t) + u_I(t) + K_d \frac{de(t)}{dt} \]
The actuator receives the saturated signal \( u(t) \). A typical single-input single-output (SISO) closed-loop configuration with saturation and anti-windup is summarized in the schematic below.
flowchart TD
R["Reference r(t)"] --> E["Error e(t) = r(t) - y(t)"]
E --> PID["PID core (P+D)"]
E --> INT["Integrator state x_I"]
INT --> PID
PID --> V["Controller output v(t)"]
V --> SAT["Saturation 'sat(v)'"]
SAT --> U["Actuator signal u(t)"]
U --> PLANT["Plant G(s)"]
PLANT --> Y["Output y(t)"]
Y --> E
U --> AW["Anti-windup block"]
AW --> INT
In a purely linear analysis (no saturation), we effectively have \( u(t) = v(t) \). Saturation introduces a nonlinearity. In this lesson, we approximate the plant with models already studied (first- and second-order systems) and focus on the effect of the nonlinear saturation on the integral state.
Suppose during a saturation episode we have approximately constant error \( e(t) \approx e_0 \) for \( t \in [0, T] \) and a PI controller (\( K_d = 0 \)), so
\[ v(t) = K_p e(t) + K_i x_I(t), \quad \dot{x}_I(t) = e(t). \]
If \( v(t) \ge u_{\max} \), then \( u(t) = u_{\max} \), but the integrator grows as
\[ x_I(t) = x_I(0) + \int_0^t e(\tau)\, d\tau \approx x_I(0) + e_0 t, \]
so that
\[ v(t) \approx K_p e_0 + K_i \big(x_I(0) + e_0 t\big) = v(0) + K_i e_0 t, \]
which can be much larger than \( u_{\max} \) for large \( t \). After the error changes sign, the integrator takes a long time to unwind back to a region where \( v(t) \) re-enters the unsaturated interval \( (u_{\min}, u_{\max}) \). This motivates altering \( \dot{x}_I \) when saturation occurs.
3. Integrator Clamping / Conditional Integration
A simple and widely used anti-windup technique is integrator clamping (also called conditional integration). The idea is to freeze the integral state when:
- the actuator is saturated, and
- the error would drive the integrator further into saturation.
Formally, for a PI controller we define:
\[ \dot{x}_I(t) = \begin{cases} 0, & u(t) = u_{\max} \text{ and } e(t) > 0, \\ 0, & u(t) = u_{\min} \text{ and } e(t) < 0, \\ e(t), & \text{otherwise.} \end{cases} \]
Intuitively:
- When \( u(t) = u_{\max} \) and \( e(t) > 0 \), the controller is already asking for "more" than possible in the positive direction; further positive integration is pointless, so we stop integrating.
- Similarly for \( u(t) = u_{\min} \) and \( e(t) < 0 \).
- In all other cases (not saturated, or error helping to move out of saturation), we allow integration.
This scheme is discontinuous (piecewise-defined) in \( e(t) \) and \( u(t) \), but integrates easily into digital implementations via simple if-statements. Although very effective, clamping can lead to small biases around the limits and may not be optimal if the actuator frequently saturates.
4. Back-Calculation (Tracking) Anti-Windup
A more systematic and smooth anti-windup strategy is back-calculation (or tracking anti-windup). The key idea is to make the integral state track the difference between the saturated actuator output \( u(t) \) and the internal controller output \( v(t) \). Define the anti-windup error:
\[ e_{aw}(t) = u(t) - v(t). \]
We then modify the integral dynamics as:
\[ \dot{x}_I(t) = e(t) + \frac{1}{T_{aw}} e_{aw}(t) = e(t) + \frac{1}{T_{aw}}\big(u(t) - v(t)\big), \]
where \( T_{aw} > 0 \) is an anti-windup time constant. The controller output becomes
\[ v(t) = K_p e(t) + K_i x_I(t) + K_d \frac{de(t)}{dt}. \]
Interpretation:
- In the unsaturated region, \( u(t) = v(t) \), so \( e_{aw}(t) = 0 \) and the integrator behaves as usual: \( \dot{x}_I(t) = e(t) \).
- When the actuator saturates, \( u(t) \ne v(t) \), so \( e_{aw}(t) \) nonzero adds a corrective term that drives \( x_I(t) \) toward a value consistent with \( u(t) \).
To see the effect more clearly, consider a PI controller without derivative for simplicity. Substituting \( v(t) = K_p e(t) + K_i x_I(t) \) yields:
\[ \dot{x}_I(t) = e(t) + \frac{1}{T_{aw}}\left(u(t) - K_p e(t) - K_i x_I(t)\right). \]
For fixed \( e(t) \) and \( u(t) \) during a saturation episode, the equilibrium integral state \( x_I^{\star} \) of this first-order ODE satisfies:
\[ 0 = e + \frac{1}{T_{aw}}\left(u - K_p e - K_i x_I^{\star}\right) \quad \Rightarrow \quad K_i x_I^{\star} = u + \left(T_{aw} - K_p\right)e. \]
With suitable choice of \( T_{aw} \) (often related to the plant time constant or \( K_p \)), the integral state is driven to a value that makes \( v(t) \) align with the saturated input \( u(t) \). Once the error decreases and saturation disappears, the integrator is already "close" to the correct value, reducing overshoot and recovery time.
Back-calculation has the advantage of being continuous (no hard clamping) and can be tuned by \( T_{aw} \). However, if \( T_{aw} \) is chosen too small, the anti-windup term may interact strongly with the plant dynamics; too large and the anti-windup becomes ineffective.
5. Integrator Leakage and Steady-State Error
Another way to prevent unbounded integrator growth is to introduce a leakage (or "forgetting") term. The integral state is modified to obey:
\[ \dot{x}_I(t) = e(t) - \frac{1}{T_L} x_I(t), \]
where \( T_L > 0 \) is a leakage time constant. When \( e(t) = 0 \), the integral state decays exponentially:
\[ x_I(t) = x_I(0)\, e^{-t/T_L}. \]
This guarantees that windup cannot persist indefinitely. However, leakage changes the steady-state properties: the closed-loop system is no longer an ideal "type-1" system with strictly zero steady-state error to a step input; instead, a small steady-state error may remain.
To illustrate, consider a first-order plant \( G(s) = \dfrac{K}{T s + 1} \) and a PI controller with leakage:
\[ C(s) = K_p + \frac{K_i}{s + \frac{1}{T_L}}. \]
Using standard block-diagram algebra, the closed-loop transfer function from step reference to output is rational with a non-zero steady-state error that depends on \( T_L \). The design trade-off is clear:
- Smaller \( T_L \) (stronger leakage) reduces windup but increases steady-state error.
- Larger \( T_L \) behaves more like a pure integrator, recovering zero steady-state error but increasing windup risk.
In practice, leakage may be combined with clamping or back-calculation for robust performance.
6. Discrete-Time Anti-Windup Implementation (Digital Control)
In digital controllers, we work with sampled signals \( e[k] = e(kT_s) \), \( u[k] \), where \( T_s \) is the sampling period. A basic discrete PI controller without anti-windup is:
\[ x_I[k+1] = x_I[k] + T_s e[k], \]
\[ v[k] = K_p e[k] + K_i x_I[k+1], \quad u[k] = \mathrm{sat}\big(v[k]\big). \]
For discrete clamping, we implement (conceptually equivalent to the continuous-time definition):
\[ x_I[k+1] = \begin{cases} x_I[k], & u[k] = u_{\max} \text{ and } e[k] > 0, \\ x_I[k], & u[k] = u_{\min} \text{ and } e[k] < 0, \\ x_I[k] + T_s e[k], & \text{otherwise.} \end{cases} \]
For discrete back-calculation, we set:
\[ x_I[k+1] = x_I[k] + T_s e[k] + \frac{T_s}{T_{aw}}\big(u[k] - v[k]\big). \]
These formulas will be implemented in the code examples below and are directly applicable in embedded controllers for robotic joints or mobile robots, where actuator limits (motor voltage, current, torque) are always present.
flowchart TD
S["Start sample k"] --> EVAL["Measure y[k], compute e[k]=r[k]-y[k]"]
EVAL --> VCOMP["Compute v[k] from P, I, D"]
VCOMP --> SAT["Apply saturation to v[k] to get u[k]"]
SAT --> AWLOGIC["Apply anti-windup update of x_I[k+1]"]
AWLOGIC --> ACT["Send u[k] to actuator"]
ACT --> NEXT["Next sample k+1"]
7. Python Implementation (Robotics-Oriented Example)
The following Python code simulates a PI-controlled robot joint modeled
as a first-order system (e.g., low-level velocity loop) with saturation
and back-calculation anti-windup. Libraries commonly used in robotics
include python-control for linear models and
ROS (via rospy) for integration with real
robots; here we demonstrate the core algorithm using NumPy only, so that
it can be reused inside a ROS node.
import numpy as np
# Robot joint approximate first-order dynamics: dy/dt = (-1/Tp)*y + (Kp/Tp)*u
Tp = 0.15 # process time constant [s]
Kp_proc = 1.0
u_min, u_max = -5.0, 5.0 # actuator limits (e.g. voltage)
Kp = 8.0 # proportional gain
Ki = 20.0 # integral gain
T_aw = 0.05 # anti-windup time constant
Ts = 0.001
t_final = 1.5
n_steps = int(t_final / Ts)
r = np.ones(n_steps) * 1.0 # desired joint angle [rad], step to 1.0
y = np.zeros(n_steps) # measured joint angle
u = np.zeros(n_steps) # actuator command
v = np.zeros(n_steps) # unsaturated controller output
xI = 0.0 # integral state
def sat(val, u_min, u_max):
return max(u_min, min(u_max, val))
for k in range(n_steps - 1):
# error
e = r[k] - y[k]
# PI control with back-calculation
# Predict integral update using current error and AW correction
v[k] = Kp * e + Ki * xI
u[k] = sat(v[k], u_min, u_max)
# anti-windup correction term
e_aw = u[k] - v[k]
xI = xI + Ts * (e + (1.0 / T_aw) * e_aw)
# plant update (Euler integration)
dy = (-1.0 / Tp) * y[k] + (Kp_proc / Tp) * u[k]
y[k + 1] = y[k] + Ts * dy
# At this point, vectors r, y, u, v contain the simulation results.
# In a robotics context you could publish 'u[k]' at each step via a ROS topic,
# or implement the same loop inside a real-time control thread.
In a real robot control stack (e.g., ROS with ros_control),
the loop above would be embedded in the controller update function, and
the saturation limits would be derived from motor or drive
specifications.
8. C++ Implementation (Embedded / ROS Control)
C++ is widely used in real-time robotics (e.g.,
ros_control, Orocos). Below is a minimal PI controller
class with back-calculation anti-windup, suitable for inclusion in a
low-level joint controller. Note the explicit handling of saturation and
integral update.
class AntiWindupPI {
public:
AntiWindupPI(double Kp, double Ki, double T_aw,
double u_min, double u_max, double Ts)
: Kp_(Kp), Ki_(Ki), T_aw_(T_aw),
u_min_(u_min), u_max_(u_max), Ts_(Ts),
xI_(0.0), u_(0.0), v_(0.0) {}
double step(double r, double y) {
double e = r - y;
// Unsaturated controller output
v_ = Kp_ * e + Ki_ * xI_;
// Saturation
u_ = v_;
if (u_ > u_max_) u_ = u_max_;
if (u_ < u_min_) u_ = u_min_;
// Back-calculation anti-windup
double e_aw = u_ - v_;
xI_ += Ts_ * (e + (1.0 / T_aw_) * e_aw);
return u_;
}
void reset(double xI0 = 0.0) { xI_ = xI0; }
private:
double Kp_, Ki_, T_aw_;
double u_min_, u_max_, Ts_;
double xI_;
double u_, v_;
};
// Example usage in a robot joint control loop (pseudo-code):
// AntiWindupPI pi(8.0, 20.0, 0.05, -5.0, 5.0, 0.001);
// while (running) {
// double y = readJointPosition();
// double r = desiredJointPosition();
// double u = pi.step(r, y);
// sendActuatorCommand(u);
// }
In ROS, this class could be integrated into a
ros_control controller plugin, where
readJointPosition() and
sendActuatorCommand() interact with the
hardware_interface.
9. Java Implementation (e.g., WPILib / Embedded JVM)
Java-based robotics frameworks (e.g., WPILib in educational robots) often provide PID controllers with built-in anti-windup mechanisms. The following class illustrates a discrete PI with clamping-based anti-windup, which can be adapted for such frameworks.
public class ClampedPIController {
private double Kp;
private double Ki;
private double Ts;
private double uMin;
private double uMax;
private double xI;
public ClampedPIController(double Kp, double Ki, double Ts,
double uMin, double uMax) {
this.Kp = Kp;
this.Ki = Ki;
this.Ts = Ts;
this.uMin = uMin;
this.uMax = uMax;
this.xI = 0.0;
}
public double step(double r, double y) {
double e = r - y;
// Tentative integral update
double xI_candidate = xI + Ts * e;
// PI output before saturation
double v = Kp * e + Ki * xI_candidate;
// Saturation
double u = v;
if (u > uMax) u = uMax;
if (u < uMin) u = uMin;
// Clamping-based anti-windup:
// If saturated and error would push further into saturation -> do not update integral
boolean pushingUp = (u >= uMax) && (e > 0.0);
boolean pushingDown = (u <= uMin) && (e < 0.0);
if (!pushingUp && !pushingDown) {
xI = xI_candidate;
}
return u;
}
public void reset() {
xI = 0.0;
}
}
In WPILib-like environments, this controller can be used similarly to the built-in PID classes, but with explicit access to the anti-windup logic, which is crucial when experimenting with different strategies.
10. MATLAB/Simulink and Wolfram Mathematica Implementations
10.1 MATLAB/Simulink
In MATLAB, the pid and pidstd objects,
together with Simulink's PID Controller block, support
anti-windup options. Below is a script-based simulation of PI with
back-calculation for a robotic joint, using an ODE solver:
% Robot joint parameters
Tp = 0.15;
Kp_proc = 1.0;
u_min = -5; u_max = 5;
Kp = 8; Ki = 20; T_aw = 0.05;
r = 1.0;
odefun = @(t, x) joint_ode(t, x, r, Kp, Ki, T_aw, ...
Tp, Kp_proc, u_min, u_max);
x0 = [0; 0]; % [y; xI]
[t, x] = ode45(odefun, [0 1.5], x0);
y = x(:, 1);
function dx = joint_ode(t, x, r, Kp, Ki, T_aw, Tp, Kp_proc, u_min, u_max)
y = x(1);
xI = x(2);
e = r - y;
v = Kp * e + Ki * xI;
% Saturation
u = min(max(v, u_min), u_max);
% Back-calculation anti-windup
e_aw = u - v;
dxI = e + (1 / T_aw) * e_aw;
% First-order plant
dy = (-1 / Tp) * y + (Kp_proc / Tp) * u;
dx = [dy; dxI];
end
In Simulink, the same scheme is configured by using a
PID Controller block in parallel form with
External reset or anti-windup method set to
back-calculation, and by connecting the actuator saturation
output back to the block's anti-windup port.
10.2 Wolfram Mathematica
The following Mathematica code simulates a PI controller with clamping-based anti-windup for a first-order plant. Mathematica's symbolic capabilities can also be used to analyze the resulting nonlinear ODEs.
Tp = 0.15;
KpProc = 1.0;
uMin = -5; uMax = 5;
Kp = 8; Ki = 20;
rStep = 1.0;
sat[u_] := Min[Max[u, uMin], uMax];
(* Continuous-time clamped integrator dynamics *)
sys = NDSolve[
{
y'[t] == (-1/Tp) y[t] + (KpProc/Tp) u[t],
xI'[t] == Which[
u[t] == uMax && (rStep - y[t]) > 0, 0,
u[t] == uMin && (rStep - y[t]) < 0, 0,
True, (rStep - y[t])
],
v[t] == Kp (rStep - y[t]) + Ki xI[t],
u[t] == sat[v[t]],
y[0] == 0, xI[0] == 0
},
{y, xI, u, v},
{t, 0, 1.5}
];
ySol[t_] := Evaluate[y[t] /. sys[[1]]];
The signals ySol[t] and u[t] (from the
solution) can be plotted to inspect the impact of anti-windup on the
transient behavior.
11. Problems and Solutions
Problem 1 (Windup in a Saturated PI Controller): Consider a PI-controlled first-order plant with dynamics \( \dot{y}(t) = -a y(t) + b u(t) \), where \( a > 0 \), \( b > 0 \). The PI controller is \( v(t) = K_p e(t) + K_i x_I(t) \), \( \dot{x}_I(t) = e(t) \), with \( e(t) = r - y(t) \) and saturation \( u(t) = \mathrm{sat}(v(t)) \) with \( u_{\min} < 0 < u_{\max} \). Assume the system is initially at rest and a step reference \( r > 0 \) is applied at \( t = 0 \), such that the controller quickly saturates at \( u_{\max} \). Show that during an initial interval where \( y(t) \approx 0 \), the integral state grows approximately linearly, and give an expression for \( x_I(t) \) and \( v(t) \).
Solution:
While \( y(t) \approx 0 \) and the reference is a positive constant \( r \), we have \( e(t) \approx r \), so
\[ \dot{x}_I(t) \approx r \quad \Rightarrow \quad x_I(t) \approx x_I(0) + r t. \]
Since \( x_I(0) = 0 \) (initial rest),
\[ x_I(t) \approx r t. \]
The PI output is approximately
\[ v(t) = K_p e(t) + K_i x_I(t) \approx K_p r + K_i r t = r\big(K_p + K_i t\big), \]
which grows linearly in time. As soon as \( v(t) \ge u_{\max} \), the actuator saturates, but the integrator continues to grow linearly, generating windup.
Problem 2 (Equilibrium Integral State Under Back-Calculation): For the back-calculation scheme of Section 4 with PI controller: \( \dot{x}_I(t) = e(t) + \frac{1}{T_{aw}}(u(t) - v(t)) \), \( v(t) = K_p e(t) + K_i x_I(t) \), suppose that during a long saturation interval the error \( e(t) = e_0 \) and saturated input \( u(t) = u_s \) can be approximated as constants. Derive the equilibrium value \( x_I^{\star} \) of the integral state.
Solution:
At equilibrium, \( \dot{x}_I(t) = 0 \), so
\[ 0 = e_0 + \frac{1}{T_{aw}}(u_s - v^{\star}), \quad v^{\star} = K_p e_0 + K_i x_I^{\star}. \]
Substitute \( v^{\star} \) into the equilibrium condition:
\[ 0 = e_0 + \frac{1}{T_{aw}}(u_s - K_p e_0 - K_i x_I^{\star}). \]
Multiply both sides by \( T_{aw} \):
\[ 0 = T_{aw} e_0 + u_s - K_p e_0 - K_i x_I^{\star} \quad \Rightarrow \quad K_i x_I^{\star} = u_s + (T_{aw} - K_p)e_0. \]
Hence
\[ x_I^{\star} = \frac{u_s + (T_{aw} - K_p)e_0}{K_i}. \]
For a given \( e_0 \) and saturation level \( u_s \), the anti-windup time constant \( T_{aw} \) determines how the integrator state is "parked" during saturation.
Problem 3 (Steady-State Error with Leakage): Consider a PI controller with leakage \( \dot{x}_I(t) = e(t) - \frac{1}{T_L} x_I(t) \) and \( u(t) = K_p e(t) + K_i x_I(t) \) controlling a first-order plant \( G(s) = \dfrac{K}{T s + 1} \) in unity feedback. For a unit step reference \( r(t) = 1 \), show that the steady-state error is nonzero and express it in terms of \( K, T, K_p, K_i, T_L \).
Solution (outline):
Let the steady-state error be \( e_{\infty} = r_{\infty} - y_{\infty} = 1 - y_{\infty} \). At steady state, all derivatives vanish, so:
\[ 0 = -\frac{1}{T_L} x_{I,\infty} + e_{\infty} \quad \Rightarrow \quad x_{I,\infty} = T_L e_{\infty}. \]
The plant equation at steady state is \( 0 = -\frac{1}{T} y_{\infty} + \frac{K}{T} u_{\infty} \), so \( y_{\infty} = K u_{\infty} \). The controller at steady state is
\[ u_{\infty} = K_p e_{\infty} + K_i x_{I,\infty} = K_p e_{\infty} + K_i T_L e_{\infty} = (K_p + K_i T_L) e_{\infty}. \]
Substitute into \( y_{\infty} = K u_{\infty} \):
\[ y_{\infty} = K (K_p + K_i T_L) e_{\infty}. \]
But \( e_{\infty} = 1 - y_{\infty} \), so
\[ e_{\infty} = 1 - K (K_p + K_i T_L) e_{\infty} \quad \Rightarrow \quad e_{\infty}\big(1 + K (K_p + K_i T_L)\big) = 1. \]
Thus the steady-state error is
\[ e_{\infty} = \frac{1}{1 + K (K_p + K_i T_L)} > 0. \]
This confirms that leakage destroys the ideal zero steady-state error property but can still render the error small by choosing large \( K_i T_L \).
Problem 4 (Discrete Clamping Logic): Consider the discrete clamping rule \( x_I[k+1] = x_I[k] \) when \( u[k] = u_{\max} \) and \( e[k] > 0 \), and normal integration \( x_I[k+1] = x_I[k] + T_s e[k] \) otherwise. Explain why this rule prevents further windup when the actuator is saturated, and describe a scenario where it may still lead to overshoot.
Solution:
When \( u[k] = u_{\max} \) and \( e[k] > 0 \), the controller is already demanding the maximum positive input; increasing the integral state would only increase the unsaturated output \( v[k] \) and therefore the discrepancy \( v[k] - u[k] \), without any effect on the plant (which is limited by \( u_{\max} \)). By freezing the integrator, the controller avoids accumulating a large positive integral term that would cause severe overshoot once the error becomes negative and the actuator comes out of saturation.
However, overshoot can still occur if the proportional term alone is large enough to drive the plant far beyond the setpoint before the error changes sign, or if there are delays and higher-order dynamics that cause the plant to continue moving even after the actuator is desaturated. Clamping reduces, but does not completely eliminate, overshoot.
Problem 5 (Comparing Back-Calculation and Clamping): Qualitatively compare back-calculation and clamping in terms of:
- continuity of the integral dynamics,
- tunability,
- implementation complexity.
Solution:
- Continuity: clamping introduces discontinuities in the integrator dynamics (the derivative jumps between \( e(t) \) and \( 0 \)), while back-calculation is continuous because it adds a smooth correction term proportional to \( u(t) - v(t) \).
- Tunability: clamping has essentially no tuning parameter beyond the existing gains; its behavior is "all or nothing". Back-calculation introduces \( T_{aw} \), which allows the designer to adjust how fast the integrator tracks the saturated signal.
- Implementation complexity: clamping is very easy to implement using simple logical conditions, whereas back-calculation requires an additional feedback path and the selection of \( T_{aw} \). In modern software, both are straightforward, but clamping may be preferred on very limited hardware.
12. Summary
In this lesson, we modeled integrator windup in PID controllers with actuator saturation, using an explicit integral state and a saturation nonlinearity. We derived simple clamping (conditional integration), back-calculation (tracking) anti-windup, and integrator leakage, highlighting their mathematical structure and trade-offs. We then formulated discrete-time implementations suitable for digital controllers and illustrated robotics-oriented code in Python, C++, Java, MATLAB/Simulink, and Mathematica. These techniques are essential whenever integral action is combined with physical actuator limits, and they form a bridge between ideal linear control design and practical nonlinearities encountered in real engineering systems.
13. References
- Åström, K.J., & Hägglund, T. (1995). PID Controllers: Theory, Design, and Tuning. Instrument Society of America.
- Kothare, M.V., Campo, P.J., Morari, M., & Nett, C.N. (1994). A unified framework for the study of anti-windup designs. Automatica, 30(12), 1869–1883.
- Hanus, R., Kinnaert, M., & Henrotte, J. (1987). Conditioning technique, a general anti-windup and bumpless transfer method. Automatica, 23(6), 729–739.
- Zaccarian, L., & Teel, A.R. (2011). Modern Anti-Windup Synthesis: Control Augmentation for Actuator Saturation. Princeton University Press.
- Tarbouriech, S., Garcia, G., Gomes da Silva Jr, J.M., & Queinnec, I. (2011). Stability and Stabilization of Linear Systems with Saturating Actuators. Springer.
- Hu, T., & Lin, Z. (2001). Control systems with actuator saturation: analysis and design. Systems & Control Letters, 42(4), 215–225.
- Grimm, G., Hatfield, J., Postlethwaite, I., Teel, A.R., Turner, M.C., & Zaccarian, L. (2004). Anti-windup for stable linear systems with input saturation: an LMI-based synthesis. IEEE Transactions on Automatic Control, 48(9), 1509–1525.
- Khalil, H.K. (2002). Nonlinear Systems (3rd ed.). Prentice Hall. (Chapters on saturation and integral control)