ZERO Notificatons

NO Feedback yet!!

okay

xparo
X.P.A.R.O



project - PID Tuning Simulator



The Ziegler-Nichols rules, published in 1942, turn one simple experiment into a full set of PID gains. They are still the first tuning method most engineers learn, and still a reasonable starting point. They are also famously aggressive. This guide explains both versions of the method, applies them to the heater in our PID Tuning Simulator, and compares the results with two gentler modern rules.

The test system

The simulator's heater behaves like many slow processes: a first-order lag with a time constant of 60 s, a gain of 1.5 °C per percent of heater power, and 8 s of dead time (the delay before a change in power shows up in the measurement). The task is to raise the temperature from 25 °C to 60 °C, with the heater limited to 0 to 100 % power.

Method 1: the ultimate gain (closed loop)

  1. Use P control only (Ki = Kd = 0).
  2. Increase Kp until the output oscillates steadily, neither growing nor dying away. That gain is the ultimate gain Ku.
  3. Measure the period of the oscillation, Tu.
  4. Compute the gains from the table.
ControllerKpTiTd
P0.5 Ku
PI0.45 KuTu ÷ 1.2
PID0.6 Ku0.5 Tu0.125 Tu

The table gives the integral and derivative as times. For the parallel form used in the simulator and most code (u = Kp·e + Ki·∫e + Kd·de/dt), convert with Ki = Kp ÷ Ti and Kd = Kp × Td.

For our heater model, the point of steady oscillation can be calculated exactly: it is where the lag and the dead time together delay the signal by half a cycle. That gives Ku ≈ 8.28 (percent per °C) and Tu ≈ 30.4 s. The Ziegler-Nichols PID gains are then:

Kp = 0.6 × 8.28 = 4.97 Ti = 0.5 × 30.4 = 15.2 s → Ki = 4.97 ÷ 15.2 = 0.327 Td = 0.125 × 30.4 = 3.8 s → Kd = 4.97 × 3.8 = 18.9

Method 2: the step response (open loop)

If you can't safely make a system oscillate, use its open-loop step response instead. Apply a step in the controller output, record the measurement, and read off three numbers: the process gain K (change in output divided by change in input), the apparent dead time L, and the time constant T. For the heater, K = 1.5, L = 8 s and T = 60 s.

ControllerKpTiTd
PT ÷ (K·L)
PI0.9 T ÷ (K·L)L ÷ 0.3
PID1.2 T ÷ (K·L)2 L0.5 L

For the heater: PID Kp = 1.2 × 60 ÷ (1.5 × 8) = 6.0, Ti = 16 s (Ki = 0.375) and Td = 4 s (Kd = 24).

How they perform

We ran each set of gains in the simulator, with anti-windup on, derivative on measurement, the heater's real power limit, and then again with a sudden 10 % loss of heater power (a draught) to test disturbance rejection:

RuleKpKiKdOvershootSettling (2 %)Worst dip after the draught
ZN closed-loop PID4.970.32718.99.3 %62 s2.3 °C
ZN closed-loop PI3.730.147011.9 %69 s2.8 °C
ZN open-loop PID6.000.37524.010.5 %161 s2.5 °C
ZN open-loop PI4.500.169014.2 %99 s2.7 °C
Tyreus-Luyben PI2.590.03901.8 %92 s3.3 °C
SIMC PI (τc = θ)2.500.04205.1 %49 s3.3 °C

Two things stand out. First, the Ziegler-Nichols gains reject disturbances best, which is what they were designed for, but they overshoot and ring more. Second, the actuator limit and anti-windup tame them considerably here. Without anti-windup, the same ZN PID gains overshoot by 73 % and take 146 s to settle, which is closer to the behaviour people usually associate with Ziegler-Nichols.

The gentler alternatives

  • Tyreus-Luyben uses the same experiment as closed-loop ZN but with smaller gains (for PI: Kp = Ku ÷ 3.2, Ti = 2.2 Tu). It gives very little overshoot at the cost of slower disturbance recovery.
  • SIMC (Skogestad's rules) uses the step-response model: Kp = (1 ÷ K) × T ÷ (τc + L) and Ti = min(T, 4(τc + L)), where τc is the closed-loop response time you want. Choosing τc = L is a robust default; in our test it settled fastest of all.

When Ziegler-Nichols fails

  • Systems you can't push into oscillation safely, which includes most robot joints and anything carrying people.
  • Integrating processes such as position loops, where the open-loop step response never levels off.
  • Very long dead time compared with the time constant: the rules become too aggressive.
  • Noisy measurements: the derivative gains from ZN are large and amplify noise; our guide to real-world PID problems shows how much.
  • Strongly non-linear actuators: friction, backlash and saturation break the linear assumptions the rules rely on.

How to use these rules well

Treat any tuning rule as a starting point. Apply it, look at the response, and then refine by hand, usually by lowering Kp and Ki a little, following our step-by-step tuning method. You can reproduce every row of the table above in the simulator: select the heater, type in the gains, and toggle the load disturbance and anti-windup.

More guides

Oct. 4, 2026, 10 a.m.
Closed-Loop DC Motor Speed Control with Encoders and PID
Read more..
Oct. 4, 2026, 10:01 a.m.
Integral Windup, Derivative Kick and Noise: Fixing Real-World PID Problems
Read more..
Oct. 4, 2026, 10:03 a.m.
How to Tune a PID Controller by Hand: A Step-by-Step Method
Read more..
Oct. 4, 2026, 10:04 a.m.
PID Control Explained for Robot Builders
Read more..

If you have any query or problem
feel free to contact us
email: [email protected]