Skip to content
Omnikalc

Ziegler–Nichols tuning calculator: get PID settings from a simple oscillation test

Enter the ultimate gain and the ultimate period of your loop and choose P, PI or PID to get Kp, Ti, Td and the parallel-form gains.

Updated on
Your inputs

Value out of range

s

Value out of range

Results

Proportional gain Kp

4.800

Integral time Ti (0 = no integral action)
1.200 s
Derivative time Td (0 = no derivative action)
0.300 s
Integral gain Ki = Kp / Ti
4.000 /s
Derivative gain Kd = Kp × Td
1.440 s

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.

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.

Frequently asked questions

How do I find the ultimate gain and period?

Set the controller to proportional action only, with no integral or derivative term. Raise the gain in small steps while giving the loop small disturbances, until the output keeps oscillating with a constant amplitude. That gain is Ku and the time between two peaks of the oscillation is Pu. Do the test with care, since the loop is at the edge of instability.

What response does Ziegler–Nichols give?

The rules aim for a quarter-amplitude decay: each peak of the response is a quarter of the one before it. This is a fast response to a disturbance, but it has a large overshoot, often 40 to 60 % on a set-point change, and little margin against changes in the process. Many engineers reduce the gain by 30 to 50 % afterwards.

When do the rules not work well?

They work best for smooth processes of the first order with a dead time, and they work badly on processes that are very noisy, that have a long dead time, or that can not safely be pushed to the stability limit, such as many chemical reactors and boilers. In such cases, use a step-test method, such as Cohen–Coon or lambda tuning.

What is the difference between the series and parallel forms?

In the standard form, the controller output is Kp times the sum of the error, its integral divided by Ti, and its derivative multiplied by Td. In the parallel form, the three gains are independent: Kp, Ki and Kd. The calculator gives both so you can enter the values in the way your controller asks for them.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.