PID Tuning Calculator: Lambda, Ziegler-Nichols and Cohen-Coon
Controller gain, integral time and derivative time from a process step test.
Engineering student calculators
Free textbook calculators with every step shown, so you can check your own working. Pick one, type in your numbers and see the formulas worked out. Or switch to Ask a question for an explained answer. No account needed.
Calculated from standard textbook formulas, with every step shown. The formulas are fixed, so the working does not need checking: what matters is the numbers you type in. Use these calculators only if you are competent to choose the inputs (loads, material strength, dimensions, supports) and check your units and assumptions. For learning and checking your own working: design and sign-off are for a qualified engineer. Drafting Central does not store the numbers you type.
How this calculator works
Put the controller in manual, make a step change in the output and record the measurement. Read the process gain K (the change in the measurement for each unit of output change), the dead time (the delay before it moves) and the time constant (the time to reach 63.2 % of the change after the dead time). Enter them and the lambda you want.
The calculator gives the controller gain Kc, the integral time Ti and the derivative time Td for P, PI and PID control by three methods: the lambda method (you choose the closed-loop speed), the Ziegler-Nichols reaction-curve method, and the Cohen-Coon method. It draws the reaction curve and warns when the dead time is long compared with the time constant.
Treat the settings as a starting point and fine-tune on the real loop. Ziegler-Nichols and Cohen-Coon are aggressive and often give overshoot; lambda tuning gives a smooth response, and a larger lambda is slower and more stable.
Formulas used
- K_c = \frac{\tau}{K(\lambda + \theta)}
- T_i = \tau + \theta
- T_d = \frac{\tau\theta}{2\tau + \theta}
Worked example
With the default numbers in the calculator above:
- Process model (first order plus dead time): K = 0.40, time constant = 50.00 s, dead time = 10.00 s
- Process gain from the step test: 0.40
- Dead time against time constant: 0.20
- Lambda tuning, PID: controller gain: 3.125
- Lambda tuning, PID: integral time: 60 s
- Lambda tuning, PID: derivative time: 4.5455 s
- Lambda tuning, PI and P: gain and integral time: Kc = 3.125, Ti = 60.00 s (P only: Kc = 3.125)
- Ziegler-Nichols, PID: Kc = 15, Ti = 20.00 s, Td = 5.00 s
- Ziegler-Nichols, PI and P: PI: Kc = 11.25, Ti = 33.30 s; P: Kc = 12.5
- Cohen-Coon, PID: Kc = 17.2917, Ti = 22.74 s, Td = 3.51 s
- Cohen-Coon, PI and P: PI: Kc = 11.4583, Ti = 23.54 s; P: Kc = 13.3333
Change the numbers in the calculator to see the full working, every step, for your own case.
Common questions
What is lambda?
The time constant you want for the closed loop. A small lambda is a fast response, a large lambda is slow and stable. Two to five times the dead time is typical.
Which method is best?
For most process loops lambda tuning, because you choose the speed and it does not overshoot. Ziegler-Nichols is the classic but gives a lively response.
What if the dead time is longer than the time constant?
The process is dead-time dominant. Use a small gain with mostly integral action, or a Smith predictor.
Related calculators
Got a question about this? Ask an engineering question and get a plain-language answer with references.
Further reading: Seborg, Edgar, Mellichamp and Doyle, Process Dynamics and Control (tuning correlations); Ziegler and Nichols (1942); Cohen and Coon (1953).
Need a calculator we do not have?
Embed this calculator on your own page
Copy this code into your page. The calculator runs inside the frame and links back to Drafting Central.
Need this drawn, designed or checked?
Drafting Central is a mechanical engineering and drafting business working with customers across Australia and around the world. A calculator gives you the numbers; we can turn them into drawings and designs.
Need help with a real project?
Talk to Drafting Central →