Blog

PID Anti-windup Techniques

Background

Integrator windup is a problem in PID feedback controllers that results in overshoot that would not occur if the system were being controlled only in its linear range.

The linear range of a control system can be limited by saturation of the feedback controller output. The rise time of a system step response when the controller must initially be saturated is longer than that of the step response in the linear region. Because of this, the integrator will accumulate a larger output during the rise, causing overshoot.

Integrator anti-windup can be used to avoid this overshoot. Several anti-windup techniques exist; two common ones are back-calculation and clamping.

Back-Calculation

Back-calculation uses the difference between the unsaturated and saturated controller output as feedback that unwinds the integral accumulator. It introduces a constant to tune: Kb, the back-calculation gain.

Clamping

Clamping, or conditional integration, prevents the integral output from accumulating in the appropriate direction when the controller output is saturated.

Comparing Anti-Windup Methods

After tuning your controller in the linear region, it's time to evaluate anti-windup techniques if the controller will be operating in saturation.

Time Domain

Time Domain.png

The step response in the time-domain can help you decide whether the controller behavior is good or not, but it does not give a good visualization of the anti-windup implementation behavior.

Error vs. Integrator Action
pi space.png
This graph shows the state of the integral accumulator as the controller drives error to 0. The upward step response can be seen on the right half of the chart, and the downward step response on the left.

 

clamping.png
We can clearly see where the clamped controller leaves saturation.

 

unwinding.png
We can also see the accumulator unwinding in the controller with back-calculation.

It's important to note that in this example either the controller with back-calculation is not properly tuned, or this system with these gains does not lend itself to back-calculation anti-windup.

LabVIEW Example Code

Example code can be downloaded here. It depends on LV-PID, a simple PID library that can be downloaded here and OpenG Toolkit, which can be downloaded from VI Package manager.