S9 · Lesson 16 · Tuning PID controllers
First-order-plus-dead-time models from a step test, Ziegler–Nichols rules from the step response and from the ultimate gain, relay autotuning, and SIMC tuning with a single closed-loop time constant
Most PID loops are tuned on the plant itself, from a quick experiment, without a detailed model. In 1942 John Ziegler and Nathaniel Nichols published two recipes that turn one simple test into three PID settings. Their rules give aggressive, oscillatory loops, and modern rules such as Sigurd Skogestad's SIMC do much better from the same test, with a single knob that trades speed against robustness. This lesson covers the tests, the rules and what each one gives you.
- The step response of a first-order-plus-dead-time (FOPDT) plant : nothing for θ seconds, then a first-order rise.
- The dashed tangent at the start of the rise crosses zero at θ and reaches K at θ + τ: that's how the three numbers are read off a measured step response.
- The readouts give SIMC's PI settings with , the recommended default.
Predict
Ziegler and Nichols tuned their rules for a decay ratio of one quarter between successive peaks. What overshoot does that imply?
A quarter-amplitude decay means ζ ≈ 0.215, about 50% overshoot. On the plant the ultimate-gain PID rule gives 41% overshoot. Ziegler–Nichols settings are a fast starting point; most loops are then detuned.
Name it
Plant tests
- Step test (reaction curve): step the actuator and fit (final change over input change), the apparent dead time θ and time constant τ.
- Ultimate gain test: under proportional control, raise the gain until the loop oscillates steadily. That gain is and the oscillation's period .
- Relay test (Åström and Hägglund, 1984): replace the controller with a relay of amplitude d. The loop settles into a limit cycle at nearly the same period , with amplitude a, and (lesson 43 explains why). It finds the ultimate point safely, without running near instability.
Ziegler–Nichols rules
| Controller | From , | From the step test |
|---|---|---|
| P | ||
| PI | , | , |
| PID | , , | , , |
SIMC (Skogestad, 2003)
For an FOPDT plant, choose a closed-loop time constant and use PI with
gives a fast, robust loop (gain margin about 3, around 10% overshoot); larger is slower and gentler. Lambda tuning is the same rule with .
Worked example
Tune by the ultimate-gain method.
Show the solution
- Ultimate gain and period. The Routh array (lesson 9) gives = 8 and oscillation at rad/s, so
- Apply the PID rule.
- Check by simulation. The step response overshoots 41%, peaks at 2.2 s and settles within 2% at 9.4 s: fast but oscillatory, as expected from Ziegler–Nichols.
Answer = 4.8, = 1.81 s and = 0.453 s, which overshoots 41% and settles in 9.4 s.
Worked example
A heater has K = 2, τ = 10 s and θ = 1 s. Tune a PI controller by SIMC.
Show the solution
- Closed-loop time constant. Take = 1 s.
- Proportional gain.
- Integral time.
- Check by simulation. With the exact delay, the step response overshoots 8.1%, peaks at 4.8 s and settles within 2% at about 10 s, with a gain margin of 3.1 (9.8 dB) and a phase margin of 58°.
- Why the shorter . Choosing = 8 s instead of τ = 10 s speeds up the recovery from load disturbances, which matters more than setpoint response for a process like this.
Answer = 2.5 and = 8 s, giving 8.1% overshoot and a 58° phase margin.
Worked example
A relay of ±0.5 drives a loop into a limit cycle of amplitude 0.2 and period 4 s. Tune a Ziegler–Nichols PI controller.
Show the solution
- Ultimate gain from the relay. The relay's describing function gives and = 4 s.
- Ziegler–Nichols PI.
- Why autotuners use it. The relay test found the ultimate point without ever pushing the loop to the edge of instability.
Answer = 1.43 and = 3.33 s.
Check
An ultimate-gain test finds = 8 and = 0.5 s. What integral gain does the Ziegler–Nichols PID rule give?
Check
A relay of amplitude ±5 drives a loop into oscillation with amplitude 0.1 at the plant output. Estimate the ultimate gain.
Check
An FOPDT plant has K = 2, τ = 5 s and θ = 4 s. What SIMC proportional gain goes with = 3θ?
Check
For the same SIMC rule, a plant with τ = 10 s and θ = 0.5 s, and = 2θ: what integral time?
Write units the way you normally would: 1.5 s and 1500 ms are the same answer.
Check
A step test gives K = 0.5, τ = 2 s and θ = 2 s. What does the Ziegler–Nichols step-response PID rule give?
Check
A plant with τ = 1 s is put under proportional control and the gain raised until it oscillates. What's the period?
Write units the way you normally would: 1.5 s and 1500 ms are the same answer.
Check
A step test gives K = 2, τ = 5 s and θ = 3 s. Tune a Ziegler–Nichols PID from the step-response rules.
(a)
What integral gain results?
(b)
What derivative gain ?
Check
A relay of amplitude d drives a loop into a limit cycle of amplitude a and period T.
Step 1
What ultimate gain does it imply?
Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.
Step 2
What does Ziegler–Nichols PID give?
Step 3
What ?
Step 4
What ?
Explain why
Why does SIMC choose the closed-loop time constant equal to the dead time by default?
No controller can make a plant respond before its dead time has passed, so asking for a closed-loop time constant much shorter than θ means demanding more than the plant can deliver, and the loop becomes oscillatory and fragile: small errors in the estimated delay push it toward instability. Asking for a much longer time constant is safe but needlessly slow. Setting balances the two: the loop responds about as fast as the delay allows while keeping a gain margin near 3 and a phase margin between about 47° and 60°, which tolerates realistic errors in the identified K, τ and θ.
Practice
Keep practicing
10 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.