S916 of 55
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

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 Ke−θsτs+1: 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 τc=θ, 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?

Name it

Plant tests

  • Step test (reaction curve): step the actuator and fit K (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 Ku and the oscillation's period Tu.
  • 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 Tu, with amplitude a, and Ku≈4d/(πa) (lesson 43 explains why). It finds the ultimate point safely, without running near instability.

Ziegler–Nichols rules

ControllerFrom Ku, TuFrom the step test
PKp=0.5KuKp=τ/(Kθ)
PIKp=0.45Ku, Ti=Tu/1.2Kp=0.9τ/(Kθ), Ti=3θ
PIDKp=0.6Ku, Ti=Tu/2, Td=Tu/8Kp=1.2τ/(Kθ), Ti=2θ, Td=θ/2

SIMC (Skogestad, 2003)

For an FOPDT plant, choose a closed-loop time constant τc and use PI with

Kp=τK(τc+θ),Ti=min⁡(τ,4(τc+θ))

τc=θ gives a fast, robust loop (gain margin about 3, around 10% overshoot); larger τc is slower and gentler. Lambda tuning is the same rule with Ti=τ.

Worked example

Tune P=1/(s+1)3 by the ultimate-gain method.

Show the solution
  1. Ultimate gain and period. The Routh array (lesson 9) gives Ku = 8 and oscillation at 3 rad/s, so Tu=2π/3=3.63s
  2. Apply the PID rule. Kp=4.8Ti=1.81sTd=0.453s
  3. 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 Kp = 4.8, Ti = 1.81 s and Td = 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
  1. Closed-loop time constant. Take τc=θ = 1 s.
  2. Proportional gain. Kp=102×2=2.5
  3. Integral time. Ti=min⁡(10,8)=8s
  4. 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°.
  5. Why the shorter Ti. Choosing Ti = 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 Kp = 2.5 and Ti = 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
  1. Ultimate gain from the relay. The relay's describing function gives Ku=4dπa=4×0.5π×0.2=3.18 and Tu = 4 s.
  2. Ziegler–Nichols PI. Kp=0.45Ku=1.43Ti=Tu/1.2=3.33s
  3. Why autotuners use it. The relay test found the ultimate point without ever pushing the loop to the edge of instability.

Answer Kp = 1.43 and Ti = 3.33 s.

Check

An ultimate-gain test finds Ku = 8 and Tu = 0.5 s. What integral gain Ki 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 τc = 3θ?

Check

For the same SIMC rule, a plant with τ = 10 s and θ = 0.5 s, and τc = 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 Kp does the Ziegler–Nichols step-response PID rule give?

Check

A plant K0/(τs+1)3 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 Ki results?

(b)

What derivative gain Kd?

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°.

Explain why

Why does SIMC choose the closed-loop time constant equal to the dead time by default?

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.