Ziegler–Nichols PID Tuning Calculator (Ultimate Gain Method)

The Ziegler–Nichols closed-loop method finds the gain at which a loop just oscillates steadily (Ku) and the period of that oscillation (Pu), then sets the controller from simple ratios. This Ziegler–Nichols PID tuning calculator gives P, PI and PID settings — see the PID controller tuning guide and step-test, relay and Ziegler–Nichols auto-tuning in a DCS.

calculated
calculated
calculated
calculated
calculated
calculated
Type in any field to change it. Press × on a value to calculate that field instead.

How to use the Ziegler–Nichols PID tuning calculator

Enter the ultimate gain Ku and the ultimate period Pu from your closed-loop test. The calculator gives the controller gain for P, PI and PID control and the integral and derivative times in seconds. Settings assume the ideal (non-interacting) PID form with integral time in seconds per repeat; check whether your controller uses gain or proportional band, and repeats per minute or minutes per repeat.

Ziegler–Nichols closed-loop rules

Controller Kc Ti Td
P 0.5 Ku — —
PI 0.45 Ku Pu ÷ 1.2 —
PID 0.6 Ku Pu ÷ 2 Pu ÷ 8

Example

A loop oscillates steadily at Ku = 2 with a period Pu = 60 s:

Rule Kc PB Ti Td
P only 1 100% — —
PI 0.9 111% 50 s —
PID (classic) 1.2 83% 30 s 7.5 s
PI (Tyreus–Luyben) 0.625 160% 132 s —
PID (Tyreus–Luyben) 0.909 110% 132 s 9.52 s

Cautions

  • The test drives the loop to the edge of instability — don’t do it on loops where oscillation is unsafe; use a step test and the lambda tuning calculator instead.
  • Valve stiction and sensor lag change Ku and Pu; fix mechanical problems first.
  • After tuning, test with a small set-point step and reduce gain if overshoot is excessive.

Frequently asked questions

How do I find Ku and Pu?

Put the controller in automatic with integral and derivative off, then raise the gain in small steps until the process variable oscillates with constant amplitude. That gain is Ku and the time between peaks is Pu.

What are the Ziegler–Nichols PID settings?

Kc = 0.6 Ku, Ti = Pu ÷ 2 and Td = Pu ÷ 8. For PI, Kc = 0.45 Ku and Ti = Pu ÷ 1.2.

Why are Ziegler–Nichols settings so aggressive?

They target a quarter-amplitude decay, which overshoots and oscillates. Many engineers halve the gain, or use the gentler Tyreus–Luyben rules shown in the table.

How do I convert gain to proportional band?

PB (%) = 100 ÷ Kc. A gain of 1.2 is a proportional band of about 83%.

Embed this calculator

Free to use on your website or blog. Copy this code: