The Ziegler–Nichols method is the classic way to set the gains of a PID controller using one experiment on the real loop. The Ziegler–Nichols tuning calculator takes the ultimate gain Ku and the ultimate period Pu, and for a P, PI or PID controller gives the proportional gain, the integral time, the derivative time, and the integral and derivative gains in parallel form.
How the calculation works
- Run the loop with proportional control only, raise the gain until the output oscillates steadily, and note this ultimate gain Ku and the ultimate period Pu of the oscillation.
- Choose the controller type: P, PI or PID.
- The calculator applies the Ziegler–Nichols closed-loop rules: P gives Kp = 0.5 Ku; PI gives Kp = 0.45 Ku and Ti = Pu / 1.2; PID gives Kp = 0.6 Ku, Ti = Pu / 2 and Td = Pu / 8.
- It also converts the result to the parallel form with the integral gain Ki = Kp / Ti and the derivative gain Kd = Kp × Td, which many controllers use.
Example
A temperature loop starts to oscillate with a steady amplitude at a gain of Ku = 8, with a period of Pu = 2.4 s. For a PID controller, the rules give Kp = 0.6 × 8 = 4.8, Ti = 2.4 / 2 = 1.2 s and Td = 2.4 / 8 = 0.3 s. In the parallel form, the integral gain is Ki = 4.8 / 1.2 = 4.0 per second and the derivative gain is Kd = 4.8 × 0.3 = 1.44 s.
Why it matters
A PID controller keeps a temperature, a speed, a level or a pressure at its target, and a poor setting gives a slow or a wild response. The Ziegler–Nichols rules give a quick, reasonable starting point that needs no model of the process. They are taught in every control course, and they are still used in the field as a first guess.
Good to know
The settings are a starting point, and they usually need to be softened to cut the overshoot. They apply to the closed-loop (ultimate-gain) test, and they assume an ideal PID form without filters or limits. Pushing a real process to sustained oscillation can be unsafe, so check the limits first. Always test the new settings with care and add anti-windup and a derivative filter in practice.
Related tools
The damping ratio calculator describes how a second-order system settles, the RC filter calculator covers a first-order filter, the exponential moving average calculator smooths a signal, and the linear regression calculator fits a line to data.