Model-Based Tuning: Cohen–Coon, IMC and Lambda
The Ziegler–Nichols recipes give aggressive loops and no knob to make them calmer. In practice you want to choose the speed: a heater that settles in two minutes without overshoot, a level loop that absorbs inflow surges gently, a speed loop as fast as the motor allows. Model-based rules start from the same first-order-plus-dead-time (FOPDT) model, , and add exactly that knob: a desired closed-loop time constant. This lesson covers Cohen–Coon (1953), the IMC family with its practical form, lambda tuning, and Skogestad's SIMC rules, and finishes the roadmap project of comparing tuning methods.
Getting the model
Fit , and from an open-loop step: the tangent method of the previous lesson, or better a least-squares fit of the FOPDT step response to the logged data (two-point methods use the times to 28.3 % and 63.2 % of the change: , ). A higher-order model can be reduced with Skogestad's half rule: of the largest neglected time constant, half goes to the delay and half to the next-largest time constant. For the PID lab's plant : , .
The rules
| Rule | PI | PID | Knob |
|---|---|---|---|
| Cohen–Coon | , | , , | none (targets quarter decay) |
| Lambda (IMC-PI) | , | — | : desired closed-loop time constant |
| SIMC (Skogestad 2003) | , | for second-order plants (series form), = second time constant | ; is the recommended "tight but robust" choice |
Where IMC comes from. Internal Model Control asks for the closed loop : the plant's delay cannot be removed, but everything else is replaced by a first-order response of time constant . Solving for the controller and approximating the delay gives a PI whose zero cancels the plant pole () and whose gain is set by . Larger : slower, calmer, more robust. A common industrial choice is between and ; for loops in series (cascades, interacting tanks) is chosen so the loops do not fight. SIMC keeps the IMC gain but shortens for slow (lag-dominant) plants, where would reject load disturbances very slowly.
Worked example: four tunings of the heater
Given: the heater block with a sensor delay, (K/W).
Find: Ziegler–Nichols (step), Cohen–Coon PID, lambda PI () and SIMC PI (), and compare a setpoint step and a load step (a draught).
Solve: , , , .
- ZN step PID: , , .
- Cohen–Coon PID: , , .
- Lambda PI: , .
- SIMC PI: , .
Check: the program simulates all four (derivative filtered with , delay as a 6th-order Padé model):
import numpy as np
import control as ct
K, T, th = 4.0, 300.0, 10.0
G = ct.tf([K], [T, 1]) * ct.tf(*ct.pade(th, 6))
def pid(Kp, Ti, Td=0.0, N=10):
C = ct.tf([Kp * Ti, Kp], [Ti, 0])
if Td:
C = C + ct.tf([Kp * Td, 0], [Td / N, 1])
return C
r = th / T
tunings = {
"ZN step PID": pid(1.2 * T / (K * th), 2 * th, 0.5 * th),
"Cohen-Coon PID": pid(T / (K * th) * (4 / 3 + r / 4), th * (32 + 6 * r) / (13 + 8 * r), 4 * th / (11 + 2 * r)),
"lambda PI (30 s)": pid(T / (K * (30 + th)), T),
"SIMC PI (tc = 10 s)": pid(T / (K * 2 * th), min(T, 8 * th)),
}
t = np.linspace(0, 600, 60001)
for name, C in tunings.items():
Tr = ct.feedback(C * G, 1)
info = ct.step_info(Tr, T=t)
_, u = ct.step_response(ct.feedback(C, G), T=t) # controller output for the setpoint step
_, yd = ct.step_response(-ct.feedback(G, C), T=t) # temperature after a -1 W load step
iae = np.trapezoid(abs(yd), t)
gm, pm, _, _ = ct.margin(C * G)
print(f"{name:20s}: overshoot {info['Overshoot']:5.1f} %, settling {info['SettlingTime']:5.0f} s, "
f"max u {max(abs(u)):5.1f} W | load: dip {min(yd):.3f} K, IAE {iae:6.1f} K*s | PM {pm:4.1f} deg")ZN step PID : overshoot 97.2 %, settling 110 s, max u 99.0 W | load: dip -0.142 K, IAE 2.8 K*s | PM 31.4 deg
Cohen-Coon PID : overshoot 99.4 %, settling 123 s, max u 110.7 W | load: dip -0.144 K, IAE 3.0 K*s | PM 22.6 deg
lambda PI (30 s) : overshoot 0.0 %, settling 122 s, max u 1.9 W | load: dip -0.417 K, IAE 135.2 K*s | PM 75.7 deg
SIMC PI (tc = 10 s) : overshoot 20.5 %, settling 187 s, max u 4.2 W | load: dip -0.248 K, IAE 21.3 K*s | PM 50.6 deg
The numbers tell the trade-offs at a glance. The two "quarter-decay" rules (ZN and Cohen–Coon) reject a draught best (dip , IAE about ) but overshoot a setpoint step by almost 100 %: their integral time of 20–24 s is tiny next to the plant's , so the integral keeps pushing long after the error has gone. Their phase margins are only to , and with derivative action a step asks for about from a heater: on the real block they would saturate and wind up. Lambda tuning is the calmest (no overshoot, peak, margin) but lets a draught linger: IAE . SIMC sits in between: a margin, six times better load rejection than lambda, and a setpoint overshoot of that setpoint weighting removes without touching the load response (Practical PID). For this lag-dominant plant SIMC is the sensible default; lambda is right when the actuator must be treated gently.
Lab: half rule and SIMC on the PID lab
The lab's default plant reduces by the half rule to , . SIMC with : , , . The lab (with ) reads an overshoot of and a settling time of . A lambda PI with (, ) gives no overshoot, a rise time of and a settling time of : slower to rise, no faster to settle, much gentler on the actuator.
Guided lab: compare tuning methods on the heater (roadmap project)
Hand calculation. Fit , , to an open-loop step of your block (e.g. ). Compute ZN, Cohen–Coon, lambda ( and ) and SIMC gains.
Simulation. Replace the model numbers in the program; check max u against your heater's and choose a setpoint step small enough to stay linear (or add the saturation of Anti-Windup).
What you would measure. For each tuning, a setpoint step and a disturbance (a small 5 V fan switched on for 5 minutes). Record overshoot, 2 % settling time, the peak dip and the integral of absolute error from the log. Put the results in a table next to the simulated values. Expect the ranking of the methods to match the simulation even if individual numbers differ by 20–30 % (the FOPDT fit is approximate, and the heater's loss changes with temperature).
Hazards and safe setup. Block at most , thermal fuse or software cut-off at , current-limited supply (about ), fan with a finger guard, never unattended.
Pitfalls
- Fitting the model at one operating point and using it at another (heater losses grow with temperature).
- Choosing smaller than : the IMC derivation then promises more than the delay allows, and the loop rings.
- Using (lambda) on a slow plant with frequent load changes: disturbances linger; prefer SIMC's shorter .
- Forgetting the derivative filter when a rule gives .
Practice
- A plant has , , . Give the lambda PI for and the SIMC PI for .
- Reduce to FOPDT with the half rule.
- Why does SIMC shorten to for a slow plant?
Answer
- Lambda: , . SIMC: , .
- Half of the lag goes to the delay and half to : , .
- With large, the integral removes a load disturbance only on the plant's slow time scale; a shorter rejects it faster while keeping enough margin.
Test yourself
In lambda (IMC-PI) tuning of an FOPDT plant, the integral time is
- the plant time constant
Increasing in lambda tuning makes the loop
- faster and less robust
- slower and more robust
- unstable
- lose integral action
By the half rule, becomes an FOPDT model with
- ,
- ,
- ,
- ,
Which tuning gave the heater the smallest dip after a draught, at the price of large setpoint overshoot?
- lambda PI
- SIMC PI
- the quarter-decay rules (ZN, Cohen–Coon)
- none of them