CHAPTER 32 / CONTROLLER DESIGN

Tuning PID controllers: Ziegler–Nichols and what to do afterwards

Two short experiments give you starting gains. A model and a specification tell you how to improve them.

THE SHORT ANSWER

Ziegler–Nichols tuning gives starting PID settings from one simple experiment. The first method fits an open-loop step response with a gain K, delay L and time constant T; the second uses the ultimate gain Kcr and period Pcr at which a P-only loop oscillates steadily. Both tables give Kp, Ti and Td in standard form and aim at a quarter-decay response, so the result is a first guess to refine.

Kp=0.6Kcr,Ti=0.5Pcr,Td=0.125Pcr,Gc(s)=Kp(1+1Tis+Tds)K_p=0.6K_{cr},\quad T_i=0.5P_{cr},\quad T_d=0.125P_{cr},\qquad G_c(s)=K_p\left(1+\frac{1}{T_is}+T_ds\right)
WHAT YOU WILL LEARN

Compute Ziegler–Nichols PID settings from a reaction curve or from the ultimate gain and period, convert between PID forms, and refine or replace the result when its overshoot is too large.

The PID chapter explained what the P, I and D terms do and why saturation calls for anti-windup. It did not say how to choose the three numbers. This chapter gives two experiment-based recipes, one model-based recipe, and the checks that come after them.

Review the previous lesson: PID, saturation and windup
START WITH AN EXAMPLE

First, picture it

You have a PID controller with three settings and a plant you cannot model in detail. Ziegler and Nichols proposed a shortcut in 1942. Do one simple experiment: either step the plant input and record the S-shaped response, or close the loop with proportional action only and raise the gain until the output oscillates steadily. Measure two numbers on the record, look up the three settings in a table, and you have a working controller. The table is aggressive on purpose: it aims for a response in which each overshoot peak is about a quarter of the one before. So treat the result as a first guess, then trade some speed for damping.

THE IDEA

Build the idea step by step

A PID controller is written in two ways. The standard form Kp(1 + 1/(Ti·s) + Td·s) uses one gain and two times; the parallel form Kp + Ki/s + Kd·s uses three gains. They are the same controller with Ki = Kp/Ti and Kd = Kp·Td, and the Ziegler–Nichols tables are written in the standard form. The first method uses an open-loop step test: fit the response with a gain K, a delay L and a time constant T, then read Kp, Ti and Td from the table. The second method uses the closed loop: find the ultimate gain Kcr at which a P-only loop oscillates steadily, and the period Pcr of that oscillation. If you have a transfer function, compute Kcr and Pcr with a Routh table or by substituting s = jω, with no experiment at all. Either way, simulate or test the result and then adjust it to the overshoot you can accept.

Read the equations

Gc(s)=Kp(1+1Tis+Tds)=Kp+Kis+Kds,Ki=KpTi,Kd=KpTdG_c(s)=K_p\left(1+\frac{1}{T_i s}+T_d s\right)=K_p+\frac{K_i}{s}+K_d s,\qquad K_i=\frac{K_p}{T_i},\quad K_d=K_pT_d

The standard form on the left and the parallel form on the right describe the same controller. Tuning tables give Kp, Ti and Td; convert when your controller asks for Ki and Kd.

Y(s)U(s)≈K e−LsTs+1,K=ΔyΔu\frac{Y(s)}{U(s)}\approx\frac{K\,e^{-Ls}}{Ts+1},\qquad K=\frac{\Delta y}{\Delta u}

First method: approximate the S-shaped step response by a gain, a delay and one time constant. Draw the tangent at the inflection point; it meets the initial level at t = L and the final level at t = L + T.

first methodKpTiTdPTKL∞0PI0.9 TKLL0.30PID1.2 TKL2L0.5L\begin{array}{l|ccc}\text{first method} & K_p & T_i & T_d\\ \hline \mathrm{P} & \dfrac{T}{KL} & \infty & 0\\[6pt] \mathrm{PI} & 0.9\,\dfrac{T}{KL} & \dfrac{L}{0.3} & 0\\[6pt] \mathrm{PID} & 1.2\,\dfrac{T}{KL} & 2L & 0.5L\end{array}

Ziegler–Nichols settings from the reaction curve. The gain is inversely proportional to the delay: a plant with a long delay relative to its time constant gets a cautious controller.

second methodKpTiTdP0.5Kcr∞0PI0.45KcrPcr1.20PID0.6Kcr0.5Pcr0.125Pcr\begin{array}{l|ccc}\text{second method} & K_p & T_i & T_d\\ \hline \mathrm{P} & 0.5K_{cr} & \infty & 0\\[4pt] \mathrm{PI} & 0.45K_{cr} & \dfrac{P_{cr}}{1.2} & 0\\[6pt] \mathrm{PID} & 0.6K_{cr} & 0.5P_{cr} & 0.125P_{cr}\end{array}

Ziegler–Nichols settings from the ultimate gain and ultimate period. Every row backs the gain off from Kcr and ties both times to the period of the oscillation.

1+Kcr G(jωcr)=0,Pcr=2πωcr1+K_{cr}\,G(j\omega_{cr})=0,\qquad P_{cr}=\frac{2\pi}{\omega_{cr}}

At the ultimate gain the P-only loop has poles at ±jωcr. Setting the real and imaginary parts of this equation to zero gives ωcr and Kcr; a Routh table gives the same pair.

Gc(s)=0.075 KcrPcr (s+4/Pcr)2sorGc(s)=0.6 TK (s+1/L)2sG_c(s)=0.075\,K_{cr}P_{cr}\,\frac{\left(s+4/P_{cr}\right)^2}{s}\qquad\text{or}\qquad G_c(s)=0.6\,\frac{T}{K}\,\frac{\left(s+1/L\right)^2}{s}

Written out, a Ziegler–Nichols PID is an integrator with a double zero: at −4/Pcr for the second method and at −1/L for the first. Fine tuning moves this zero and the gain in front.

second overshootfirst overshoot=e−2πζ/1−ζ2=14⇒ζ≈0.22\frac{\text{second overshoot}}{\text{first overshoot}}=e^{-2\pi\zeta/\sqrt{1-\zeta^2}}=\frac14\quad\Rightarrow\quad\zeta\approx0.22

Quarter decay: each peak is a quarter of the previous one. For a dominant pole pair this means a damping ratio of about 0.22, which is why the set-point overshoot is large.

U(s)=Kp[(1+1Tis)E(s)−Tds1+Tds/N Y(s)]U(s)=K_p\left[\left(1+\frac{1}{T_i s}\right)E(s)-\frac{T_d s}{1+T_d s/N}\,Y(s)\right]

PI-D control with a derivative filter: the derivative acts on the measurement, so a set-point step causes no derivative spike. The filter limits the derivative's high-frequency gain to Kp·N.

U(s)=Kp[1Tis E(s)−(1+Tds1+Tds/N)Y(s)]U(s)=K_p\left[\frac{1}{T_i s}\,E(s)-\left(1+\frac{T_d s}{1+T_d s/N}\right)Y(s)\right]

I-PD control: only the integral term sees the error. The loop transfer function, and therefore stability, is the same as for PID and PI-D; the set-point response starts more gently.

G(s)=Kτs+1,Ti=τ,Kp=τKλ⇒Y(s)R(s)=1λs+1G(s)=\frac{K}{\tau s+1},\quad T_i=\tau,\quad K_p=\frac{\tau}{K\lambda}\qquad\Rightarrow\qquad\frac{Y(s)}{R(s)}=\frac{1}{\lambda s+1}

Lambda tuning of a PI controller for a first-order plant. The integral time cancels the plant time constant, and the gain sets the closed-loop time constant λ that you choose.

K=1H,τ=CH⇒Kp=Cλ,Ki=KpTi=HλK=\frac1H,\quad\tau=\frac CH\qquad\Rightarrow\qquad K_p=\frac{C}{\lambda},\qquad K_i=\frac{K_p}{T_i}=\frac{H}{\lambda}

The same rule for the thermal lab's heater, in the lab's parallel form. With C = 1000 J/K, H = 5 W/K and λ = 50 s it gives Kp = 20 W/K and Ki = 0.1 W/(K·s).

What the symbols mean

KpK_p
proportional gain: controller-output units per unit of error (W/K in the thermal lab)
TiT_i
integral time, s
TdT_d
derivative time, s
KiK_i
integral gain Kp/Ti: units of Kp per second
KdK_d
derivative gain Kp·Td: units of Kp times seconds
Gc(s)G_c(s)
controller transfer function
G(s)G(s)
plant transfer function
KK
static process gain Δy/Δu: output units per input unit (K/W for the heater)
LL
apparent delay read from the reaction curve, s
TT
apparent time constant read from the tangent of the reaction curve, s
KcrK_{cr}
ultimate (critical) gain: the P-only gain that gives sustained oscillation
PcrP_{cr}
ultimate period: the period of that oscillation, s
ωcr\omega_{cr}
frequency of that oscillation, rad/s
ζ\zeta
damping ratio of the dominant closed-loop pole pair, dimensionless
NN
derivative filter factor, dimensionless, usually 5 to 20
R, Y, E, UR,\ Y,\ E,\ U
Laplace transforms of the set-point, the measured output, the error R − Y and the controller output
τ\tau
time constant of a first-order plant, s
λ\lambda
chosen closed-loop time constant, s
C, HC,\ H
thermal capacity in J/K and heat-loss coefficient in W/K of the heater model

The tables assume the standard form, so convert before entering gains into a parallel-form controller such as the labs on this site, which use Kp, Ki and Kd. In the first method keep the process gain K: tables that print 1.2T/L state the same rule for a response normalised to K = 1. The second method needs a loop that actually reaches sustained oscillation at a finite gain.

WORKED EXAMPLE

Ziegler–Nichols second method on a third-order plant, then one fine-tuning pass

  1. The plant has an integrator and two lags; input and output are dimensionless. Close the loop with proportional action only and write the characteristic equation.

    G(s)=2s(s+1)(s+4),1+KpG(s)=0 ⇒ s3+5s2+4s+2Kp=0G(s)=\frac{2}{s(s+1)(s+4)},\qquad 1+K_pG(s)=0\ \Rightarrow\ s^3+5s^2+4s+2K_p=0
  2. Build the Routh table. The s¹ row becomes zero at the gain where a pole pair sits on the imaginary axis.

    s314s252Kps120−2Kp5s02Kp⇒Kcr=10\begin{array}{c|cc}s^3 & 1 & 4\\ s^2 & 5 & 2K_p\\ s^1 & \dfrac{20-2K_p}{5} & \\[6pt] s^0 & 2K_p & \end{array}\qquad\Rightarrow\qquad K_{cr}=10
  3. Find the oscillation frequency by substituting s = jω. The imaginary part gives the frequency and the real part confirms the gain.

    (2Kp−5ω2)+jω(4−ω2)=0 ⇒ ωcr=2 rad/s,Kcr=5⋅42=10(2K_p-5\omega^2)+j\omega(4-\omega^2)=0\ \Rightarrow\ \omega_{cr}=2\ \mathrm{rad/s},\quad K_{cr}=\frac{5\cdot4}{2}=10
  4. Convert the frequency to a period.

    Pcr=2π2=π≈3.142 sP_{cr}=\frac{2\pi}{2}=\pi\approx3.142\ \mathrm s
  5. Read the PID row of the second-method table.

    Kp=0.6(10)=6,Ti=0.5(3.142)=1.571 s,Td=0.125(3.142)=0.393 sK_p=0.6(10)=6,\qquad T_i=0.5(3.142)=1.571\ \mathrm s,\qquad T_d=0.125(3.142)=0.393\ \mathrm s
  6. Convert to the parallel form, and write the controller with its double zero at −4/Pcr.

    Ki=61.571≈3.82 s−1,Kd=6(0.393)≈2.36 s,Gc(s)=2.36 (s+1.273)2sK_i=\frac{6}{1.571}\approx3.82\ \mathrm{s^{-1}},\qquad K_d=6(0.393)\approx2.36\ \mathrm s,\qquad G_c(s)=2.36\,\frac{(s+1.273)^2}{s}
  7. Check the closed loop. Its characteristic polynomial is s⁴ + 5s³ + (4 + 2Kd)s² + 2Kp·s + 2Ki. All four roots are in the left half-plane, but the dominant pair has ζ ≈ 0.24: the simulated unit-step response peaks at 1.61, a 61% overshoot, and the next peak is 1.13, a decay ratio of 0.21.

    s4+5s3+8.71s2+12s+7.64=0 ⇒ s≈−0.356±j1.450, −1.063, −3.224s^4+5s^3+8.71s^2+12s+7.64=0\ \Rightarrow\ s\approx-0.356\pm j1.450,\ -1.063,\ -3.224
  8. Fine-tune. Keep Kp and double both times, which moves the double zero from −1.27 to −0.64. The overshoot drops to 21% and the 2% settling time from 11.1 s to 5.5 s. Stop here or continue, depending on the specification.

    Kp=6,Ti=3.142 s,Td=0.785 s⇒Ki≈1.91 s−1,Kd≈4.71 sK_p=6,\quad T_i=3.142\ \mathrm s,\quad T_d=0.785\ \mathrm s\quad\Rightarrow\quad K_i\approx1.91\ \mathrm{s^{-1}},\quad K_d\approx4.71\ \mathrm s
REFERENCE

Reference tables

Ziegler–Nichols first method: step reaction curve K e^(−Ls)/(Ts + 1)
ControllerKpK_pTiT_iTdT_d
PTKL\dfrac{T}{KL}∞\infty00
PI0.9 TKL0.9\,\dfrac{T}{KL}L0.3\dfrac{L}{0.3}00
PID1.2 TKL1.2\,\dfrac{T}{KL}2L2L0.5L0.5L

K = Δy/Δu is the process gain, L the delay and T the time constant read from the tangent at the inflection point. Tables that print 1.2T/L assume K = 1.

Ziegler–Nichols second method: ultimate gain Kcr and period Pcr
ControllerKpK_pTiT_iTdT_d
P0.5Kcr0.5K_{cr}∞\infty00
PI0.45Kcr0.45K_{cr}Pcr1.2\dfrac{P_{cr}}{1.2}00
PID0.6Kcr0.6K_{cr}0.5Pcr0.5P_{cr}0.125Pcr0.125P_{cr}

Kcr is the proportional gain at which the loop first oscillates steadily and Pcr is the period of that oscillation. Both rules aim at roughly quarter-amplitude decay, so expect large overshoot and plan to refine.

Second method applied to G(s) = 2/[s(s + 1)(s + 4)]: Kcr = 10, Pcr = π s
ControllerKpK_pTi (s)Td (s)Ki = Kp/Ti (s⁻¹)Kd = KpTd (s)
P5.00∞0.00000.000
PI4.502.6180.0001.7190.000
PID6.001.5710.3933.8202.356
More detail and model assumptions
A CLOSER LOOK

Finding Kcr and Pcr without an experiment

At the ultimate gain the P-only closed loop has a pair of poles exactly on the imaginary axis, at s = ±jωcr. Two calculations find it. In the Routh table, Kcr is the gain that makes a whole row zero, and the auxiliary equation from the row above gives ωcr. Or substitute s = jω into 1 + Kp·G(s) = 0 and set the real and imaginary parts to zero separately: one equation gives ωcr and the other gives Kcr. Then Pcr = 2π/ωcr.

The Nyquist plot says the same thing. Sustained oscillation means Kp·G(jω) passes through −1, so ωcr is the phase-crossover frequency of the plant and Kcr = 1/|G(jωcr)| is its gain margin. The second method therefore samples the plant's frequency response at one point: the point with −180° of phase.

That is why the method fails for simple plants. A first-order lag never passes −90° of phase and a second-order lag reaches −180° only as ω → ∞, so a P-only loop around either is stable for every positive gain and no Kcr exists. This site's motor model, with one electrical and one mechanical lag, is such a plant in continuous time. Add a delay or one more lag and a finite Kcr appears: e^{−0.5s}/(s + 1) has Kcr ≈ 3.81 and Pcr ≈ 1.71 s, and the motor lab's loop sampled every 20 ms has Kcr ≈ 8.6 V·s/rad with Pcr ≈ 0.16 s.

A CLOSER LOOK

What quarter decay costs, and how to fine-tune

Ziegler and Nichols tuned for fast recovery from load disturbances and accepted a decay ratio of one quarter. For a dominant pole pair that corresponds to a damping ratio near 0.22. The response to a set-point step then typically overshoots by 10% to 60%, depending on the plant. The worked example sits at the top of that range: the overshoot is 61% and the dominant poles have ζ ≈ 0.24.

Both tables place the two PID zeros at the same point. The second method gives Gc = 0.075·Kcr·Pcr·(s + 4/Pcr)²/s, a double zero at −4/Pcr; the first gives Gc = 0.6·(T/K)·(s + 1/L)²/s, a double zero at −1/L. Both set Ti = 4Td. Fine tuning means moving that double zero and the overall gain while watching the response.

Change one thing at a time and repeat the same step test. Lengthening Ti weakens the integral action and usually cuts overshoot; lengthening Td adds damping until measurement noise becomes the limit. In the worked example, doubling both times with Kp unchanged lowers the overshoot from 61% to 21% and the 2% settling time from 11.1 s to 5.5 s. Lowering Kp is not always the safe move: halving Kp alone in that example raises the overshoot to 67%, because the crossover moves down to frequencies where the PID zeros have not yet added their phase lead.

A CLOSER LOOK

The PID you actually implement

The textbook PID differentiates the error. When the set-point jumps, the error jumps with it: the derivative term produces a very large spike and the proportional term a step. This is set-point kick. The cure is to feed the derivative term, or both the derivative and the proportional terms, from the measurement instead of the error. PI-D control differentiates −y; I-PD control applies both P and D to −y, so that only the integral term sees the error.

All three structures have the same loop transfer function, so stability, margins and disturbance rejection do not change. Only the response to the set-point changes: PI-D removes the spike, and I-PD also removes the proportional jump, which gives a slower and smoother start. The motor lab already differentiates the measurement, as the PID chapter described.

Two more parts are standard. A pure derivative has a gain that grows without limit as frequency rises, so it is implemented as Td·s/(1 + Td·s/N): a derivative filter that caps the high-frequency gain at Kp·N, with N usually between 5 and 20. And integral action needs anti-windup whenever the actuator can saturate: the PID chapter and the windup lab show why, and the thermal lab uses conditional integration for the same reason.

A CLOSER LOOK

Tuning from a model: lambda tuning

When you have a model, choose the closed-loop behaviour directly. For a first-order plant G = K/(τs + 1), set the PI integral time equal to the plant time constant, Ti = τ. The controller zero cancels the plant pole and the loop transfer function becomes Kp·K/(τs). The closed loop from set-point to output is then 1/(λs + 1) with λ = τ/(Kp·K). Pick the closed-loop time constant λ you want and solve for the gain: Kp = τ/(Kλ).

For the thermal lab, C = 1000 J/K and H = 5 W/K give K = 0.2 K/W and τ = 200 s. In the lab's own units, Kp = C/λ in W/K and Ki = Kp/Ti = H/λ in W/(K·s). With λ = 50 s this is Kp = 20 W/K and Ki = 0.1 W/(K·s); with λ = 25 s it is Kp = 40 W/K and Ki = 0.2 W/(K·s). A smaller λ is faster and asks for more heater power at the instant of a step: Kp times the step size, on top of the power that holds the temperature.

Two limits apply. The design is linear, so it predicts the response only while the heater stays between 0 W and its maximum: the lab's start from 20 °C to 60 °C requests 800 W from a 400 W heater and is slower than λ suggests. And the cancellation hides the plant pole from set-point changes only. A disturbance, or an integral term that starts at the wrong value, still decays with the plant's own 200 s time constant; that is the slow final creep you see after the saturated start.

TRY IT

Connect the example to the lab

The thermal lab's heater is a first-order plant with K = 1/H = 0.2 K/W and τ = C/H = 200 s. It has no delay, so neither Ziegler–Nichols table applies to it; lambda tuning does, with Kp = C/λ and Ki = H/λ. The lab's default gains, Kp = 20 W/K and Ki = 0.1 W/(K·s), are exactly the λ = 50 s design. Try λ = 25 s (Kp = 40, Ki = 0.2) and λ = 100 s (Kp = 10, Ki = 0.05), and time a small target step as described in the experiment below.

Try lambda-tuned PI gains on the heater
YOUR EXPERIMENT

Make a prediction before moving a control.

  1. PREDICTThe lab defaults Kp = 20 W/K and Ki = 0.1 W/(K·s) correspond to λ = 50 s. After a 5 K target step that does not saturate the heater, when should the temperature have covered 63% of the step? Which gains give λ = 25 s and λ = 100 s?
  2. CHANGE ONE THINGOpen the PI lesson, set the duration to 1800 s, choose the event 'Target change' at 900 s with new value 65 °C, and pin the run. Then enter Kp = 40, Ki = 0.2 and run again; then Kp = 10, Ki = 0.05. Change only the two gains.
  3. OBSERVEAfter 900 s, read the time the temperature takes to reach about 63.2 °C: close to 50 s, 25 s and 100 s, with no overshoot. Then look at the first minutes of each run: compare requested and applied power, and note how long the temperature takes to come within 1 K of 60 °C.
  4. EXPLAINExplain why the 5 K step follows 1/(λs + 1) while the 40 K start does not. Use the heater limit and the cancelled 200 s plant pole in your answer, and say what λ = 25 s costs at the instant of the step.
BE CAREFUL

A Ziegler–Nichols result is a starting point, not a finished design: in the worked example it gives 61% overshoot. Do not run the ultimate-gain experiment on a plant where sustained oscillation is unsafe; compute Kcr from a model or use the step test instead. And check which PID form your controller uses before typing Ti and Td where it expects Ki and Kd.

Check your understanding+

A P-only loop oscillates steadily when Kp = 8, with a period of 5 s. What are the Ziegler–Nichols PID settings in parallel form?

Kp = 0.6 × 8 = 4.8, Ti = 0.5 × 5 = 2.5 s and Td = 0.125 × 5 = 0.625 s, so Ki = 4.8/2.5 = 1.92 s⁻¹ and Kd = 4.8 × 0.625 = 3.0 s.
PRACTICE PROBLEMS

Solve these before opening the solutions

Work each problem on paper first. Open the answer to check yours, then the full solution if you need the steps, and mark how it went.

  1. Your design is in standard form: Kp = 4, Ti = 2 s, Td = 0.25 s. The controller you must program uses the parallel form. Find Ki and Kd. Then convert a parallel controller with Kp = 6, Ki = 1.5 s⁻¹ and Kd = 1.2 s to standard form.

    Show answer

    AnswerKi = 2 s⁻¹ and Kd = 1 s. For the second controller Ti = 4 s and Td = 0.2 s.

    Ki=2 s−1,Kd=1 s;Ti=4 s,Td=0.2 sK_i=2\ \mathrm{s^{-1}},\quad K_d=1\ \mathrm s\qquad;\qquad T_i=4\ \mathrm s,\quad T_d=0.2\ \mathrm s
    Show full solution

    Solution

    1. Standard to parallel: divide the gain by the integral time and multiply it by the derivative time.

      Ki=KpTi=42=2 s−1,Kd=KpTd=4(0.25)=1 sK_i=\frac{K_p}{T_i}=\frac{4}{2}=2\ \mathrm{s^{-1}},\qquad K_d=K_pT_d=4(0.25)=1\ \mathrm s
    2. Parallel to standard: invert the same two relations. Kp is the same number in both forms.

      Ti=KpKi=61.5=4 s,Td=KdKp=1.26=0.2 sT_i=\frac{K_p}{K_i}=\frac{6}{1.5}=4\ \mathrm s,\qquad T_d=\frac{K_d}{K_p}=\frac{1.2}{6}=0.2\ \mathrm s
  2. A heat exchanger is at rest. Opening the steam valve by a further 20% raises the outlet temperature by 8 °C. The tangent at the inflection point of the recorded curve gives a delay L = 4 s and a time constant T = 24 s. Find the Ziegler–Nichols PI and PID settings.

    Show answer

    AnswerPI: Kp = 13.5 %/°C, Ti ≈ 13.3 s. PID: Kp = 18 %/°C, Ti = 8 s, Td = 2 s.

    PI: Kp=13.5 %/∘C, Ti≈13.3 sPID: Kp=18 %/∘C, Ti=8 s, Td=2 s\mathrm{PI}:\ K_p=13.5\ \%/^\circ\mathrm C,\ T_i\approx13.3\ \mathrm s\qquad \mathrm{PID}:\ K_p=18\ \%/^\circ\mathrm C,\ T_i=8\ \mathrm s,\ T_d=2\ \mathrm s
    Show full solution

    Solution

    1. Process gain: output change divided by input change.

      K=ΔyΔu=8 ∘C20 %=0.4 ∘C/%K=\frac{\Delta y}{\Delta u}=\frac{8\ ^\circ\mathrm C}{20\ \%}=0.4\ ^\circ\mathrm C/\%
    2. Compute the group T/(KL) that appears in every row of the first-method table.

      TKL=240.4×4=15 %/∘C\frac{T}{KL}=\frac{24}{0.4\times4}=15\ \%/^\circ\mathrm C
    3. PI row.

      Kp=0.9(15)=13.5 %/∘C,Ti=40.3≈13.3 sK_p=0.9(15)=13.5\ \%/^\circ\mathrm C,\qquad T_i=\frac{4}{0.3}\approx13.3\ \mathrm s
    4. PID row. In parallel form these are Ki = 2.25 %/(°C·s) and Kd = 36 %·s/°C.

      Kp=1.2(15)=18 %/∘C,Ti=2(4)=8 s,Td=0.5(4)=2 sK_p=1.2(15)=18\ \%/^\circ\mathrm C,\qquad T_i=2(4)=8\ \mathrm s,\qquad T_d=0.5(4)=2\ \mathrm s
  3. A position servo has the transfer function below. Use a Routh table to find the ultimate gain and period of a P-only loop, then give the Ziegler–Nichols PID settings and the location of the controller zeros.

    G(s)=10s(s+2)(s+8)G(s)=\frac{10}{s(s+2)(s+8)}
    Show answer

    AnswerKcr = 16 and Pcr = π/2 ≈ 1.571 s. PID: Kp = 9.6, Ti ≈ 0.785 s, Td ≈ 0.196 s, with a double zero at s ≈ −2.55.

    Kcr=16,Pcr=π2≈1.571 s,Kp=9.6,Ti≈0.785 s,Td≈0.196 sK_{cr}=16,\quad P_{cr}=\frac{\pi}{2}\approx1.571\ \mathrm s,\quad K_p=9.6,\quad T_i\approx0.785\ \mathrm s,\quad T_d\approx0.196\ \mathrm s
    Show full solution

    Solution

    1. Write the P-only characteristic equation.

      s(s+2)(s+8)+10Kp=0 ⇒ s3+10s2+16s+10Kp=0s(s+2)(s+8)+10K_p=0\ \Rightarrow\ s^3+10s^2+16s+10K_p=0
    2. The s¹ entry of the Routh table is (10·16 − 10Kp)/10. It is zero at the ultimate gain.

      160−10Kp=0 ⇒ Kcr=16160-10K_p=0\ \Rightarrow\ K_{cr}=16
    3. The auxiliary equation from the s² row gives the oscillation frequency, and from it the period.

      10s2+160=0 ⇒ ωcr=4 rad/s,Pcr=2π4≈1.571 s10s^2+160=0\ \Rightarrow\ \omega_{cr}=4\ \mathrm{rad/s},\qquad P_{cr}=\frac{2\pi}{4}\approx1.571\ \mathrm s
    4. Read the PID row of the second-method table.

      Kp=0.6(16)=9.6,Ti=0.5(1.571)≈0.785 s,Td=0.125(1.571)≈0.196 sK_p=0.6(16)=9.6,\qquad T_i=0.5(1.571)\approx0.785\ \mathrm s,\qquad T_d=0.125(1.571)\approx0.196\ \mathrm s
    5. Parallel gains and zero location. A simulation of this loop gives 61% overshoot, so fine tuning is needed here too.

      Ki≈12.22 s−1,Kd≈1.885 s,s=−4Pcr≈−2.55 (double)K_i\approx12.22\ \mathrm{s^{-1}},\qquad K_d\approx1.885\ \mathrm s,\qquad s=-\frac{4}{P_{cr}}\approx-2.55\ \text{(double)}
  4. A process has the transfer function below. (a) Show that a P-only loop around it has no ultimate gain. (b) The temperature sensor adds a lag 1/(0.1s + 1) to the loop. Find Kcr and Pcr now, and the Ziegler–Nichols PID settings.

    G(s)=1(s+1)(s+3)G(s)=\frac{1}{(s+1)(s+3)}
    Show answer

    Answer(a) s² + 4s + 3 + Kp is stable for every Kp > 0. (b) Kcr = 57.2, ωcr ≈ 6.56 rad/s, Pcr ≈ 0.958 s; PID: Kp ≈ 34.3, Ti ≈ 0.479 s, Td ≈ 0.120 s.

    Kcr=57.2,Pcr≈0.958 s,Kp≈34.3,Ti≈0.479 s,Td≈0.120 sK_{cr}=57.2,\quad P_{cr}\approx0.958\ \mathrm s,\quad K_p\approx34.3,\quad T_i\approx0.479\ \mathrm s,\quad T_d\approx0.120\ \mathrm s
    Show full solution

    Solution

    1. (a) The second-order characteristic polynomial has positive coefficients for every positive gain, and the real part of its poles stays at −2.

      s2+4s+(3+Kp)=0 ⇒ s=−2±jKp−1(Kp>1)s^2+4s+(3+K_p)=0\ \Rightarrow\ s=-2\pm j\sqrt{K_p-1}\quad(K_p>1)
    2. (b) Include the sensor lag and expand.

      (s2+4s+3)(0.1s+1)+Kp=0.1s3+1.4s2+4.3s+(3+Kp)=0(s^2+4s+3)(0.1s+1)+K_p=0.1s^3+1.4s^2+4.3s+(3+K_p)=0
    3. Substitute s = jω. The imaginary part gives the frequency and the real part gives the gain.

      4.3ω−0.1ω3=0 ⇒ ωcr=43≈6.557 rad/s,Kcr=1.4(43)−3=57.24.3\omega-0.1\omega^3=0\ \Rightarrow\ \omega_{cr}=\sqrt{43}\approx6.557\ \mathrm{rad/s},\qquad K_{cr}=1.4(43)-3=57.2
    4. Period and PID row.

      Pcr=2π6.557≈0.958 s,Kp=0.6(57.2)≈34.3,Ti≈0.479 s,Td≈0.120 sP_{cr}=\frac{2\pi}{6.557}\approx0.958\ \mathrm s,\quad K_p=0.6(57.2)\approx34.3,\quad T_i\approx0.479\ \mathrm s,\quad T_d\approx0.120\ \mathrm s
  5. Exam-level. A small oven has thermal capacity C = 1500 J/K and heat-loss coefficient H = 6 W/K. Its heater delivers 0 to 500 W and the room is at 20 °C. (a) Find the plant gain and time constant. (b) Design a PI controller by lambda tuning for a closed-loop time constant of 50 s; give Kp in W/K and Ki in W/(K·s). (c) The oven is holding 70 °C. What is the largest target step that does not saturate the heater? (d) How long does the oven take to cover 95% of such a step?

    Show answer

    AnswerK ≈ 0.167 K/W and τ = 250 s; Kp = 30 W/K and Ki = 0.12 W/(K·s); the step must not exceed about 6.7 K; 95% takes about 150 s.

    K=16 K/W,τ=250 s,Kp=30 W/K,Ki=0.12 W/(K s),Δr≤6.7 K,t95≈150 sK=\tfrac16\ \mathrm{K/W},\quad \tau=250\ \mathrm s,\quad K_p=30\ \mathrm{W/K},\quad K_i=0.12\ \mathrm{W/(K\,s)},\quad \Delta r\le6.7\ \mathrm K,\quad t_{95}\approx150\ \mathrm s
    Show full solution

    Solution

    1. (a) Write the energy balance for the temperature rise above ambient and transform it.

      CT˙=u−H(T−Ta) ⇒ G(s)=1/H(C/H)s+1,K=16 K/W,τ=15006=250 sC\dot T=u-H(T-T_a)\ \Rightarrow\ G(s)=\frac{1/H}{(C/H)s+1},\qquad K=\frac16\ \mathrm{K/W},\quad \tau=\frac{1500}{6}=250\ \mathrm s
    2. (b) Set Ti = τ and solve the lambda rule for Kp, then convert to the parallel form.

      Kp=τKλ=250(1/6)(50)=30 W/K,Ki=KpTi=30250=0.12 W/(K s)K_p=\frac{\tau}{K\lambda}=\frac{250}{(1/6)(50)}=30\ \mathrm{W/K},\qquad K_i=\frac{K_p}{T_i}=\frac{30}{250}=0.12\ \mathrm{W/(K\,s)}
    3. (c) Holding 70 °C takes H(70 − 20) = 300 W, which leaves 200 W. Right after the step the proportional term adds Kp·Δr, and the power then falls toward the new holding value, so the peak is at the instant of the step.

      300+30 Δr≤500 ⇒ Δr≤20030≈6.7 K300+30\,\Delta r\le500\ \Rightarrow\ \Delta r\le\frac{200}{30}\approx6.7\ \mathrm K
    4. (d) Without saturation the closed loop is 1/(50s + 1). Solve 1 − e^{−t/λ} = 0.95.

      t95=−λln⁡0.05≈3.0 λ=150 st_{95}=-\lambda\ln0.05\approx3.0\,\lambda=150\ \mathrm s

Mark each exercise after you check your answer. Marks stay in this browser.

KEY TERMS

Terms this lecture teaches

All terms in the glossary →
QUESTIONS STUDENTS ASK

Frequently asked questions

What are the Ziegler–Nichols settings for the ultimate gain method?

With ultimate gain Kcr and ultimate period Pcr: P control uses Kp = 0.5Kcr; PI uses Kp = 0.45Kcr and Ti = Pcr/1.2; PID uses Kp = 0.6Kcr, Ti = 0.5Pcr and Td = 0.125Pcr. These are standard-form values, so convert with Ki = Kp/Ti and Kd = Kp·Td for a parallel-form controller.

What are the Ziegler–Nichols settings for the reaction curve method?

Fit the step response with process gain K = Δy/Δu, delay L and time constant T. Then P uses Kp = T/(KL); PI uses Kp = 0.9T/(KL) and Ti = L/0.3; PID uses Kp = 1.2T/(KL), Ti = 2L and Td = 0.5L. Tables that print 1.2T/L assume a response normalised to K = 1.

Why does Ziegler–Nichols tuning give so much overshoot?

The rules aim at a quarter decay ratio, each peak a quarter of the one before, which suits fast recovery from load disturbances. For a dominant second-order pair that means ζ ≈ 0.22, and a pure second-order step response with that damping overshoots by 50%. Treat the settings as a starting point and trade some speed for damping, for example by lengthening Ti and Td.

Why does the ultimate gain method fail for some plants?

It needs a P-only loop that reaches sustained oscillation at a finite gain, which requires the plant phase to reach −180° at a finite frequency. A first-order lag never passes −90°, and a second-order lag reaches −180° only as ω → ∞, so no Kcr exists. A delay or an extra lag creates one; never run the experiment where sustained oscillation is unsafe.

Why the next lesson follows

Lambda tuning assumed that the heater can deliver whatever the controller requests. The next chapter starts from the energy balance instead and asks first whether a one-way heater can reach the target at all, before any gain is chosen.

YOUR PROGRESS

Finished the reading and the exercises? Mark the lecture as done to tick it on the syllabus. Progress stays in this browser.

EIGENROOM · https://eigenroom.com/theory/pid-tuning · Updated 2026-11-15