Table of Contents
ToggleProcess Control · PID Tuning · Ziegler-Nichols · IMC · Cohen-Coon
PID Controller Tuning Explained: Five Methods, Formulas, Worked Examples and Interactive Calculator
A complete practical guide to PID controller tuning: what Kp, Ki and Kd do, how to identify FOPDT process parameters, all five major tuning methods with formula tables, Ziegler-Nichols and IMC worked calculations step by step, and an interactive multi-method calculator covering P, PI and PID controller types.
More than 90% of the feedback control loops in process plants use PID controllers. Yet poorly tuned PID loops are one of the most common causes of process variability, excess energy consumption, equipment wear and safety incidents. A survey of industrial plants typically finds that only 20-30% of PID loops are tuned well enough to perform near their potential. The rest are either too aggressive (oscillating, hunting, damaging control valves) or too sluggish (slow to respond to disturbances, allowing large process excursions).
Correct PID tuning is not guesswork. It is a systematic procedure: identify the process dynamics, apply a recognised tuning rule to calculate Kp, Ki and Kd, verify the calculated values on a step response, and fine-tune in the field. This guide gives you everything you need to do all four steps with full understanding of what you are doing and why.
We cover the five major industrial tuning methods with their complete formula tables and worked numerical examples, explain the FOPDT (First Order Plus Dead Time) process model that underlies most tuning rules, and provide an interactive calculator for instant results. For a practical guide to how PID loops behave in real process plant loops, see our guide on PID tuning for process control: a complete practical guide.
The FOPDT process model: process gain K, time constant T, dead time L
How to measure K, T and L from a step test
Ziegler-Nichols open-loop (step response) tuning: formula table and worked example
Ziegler-Nichols closed-loop (ultimate gain) tuning: formula table and worked example
Internal Model Control (IMC) tuning: formula table, lambda selection guide and worked example
Cohen-Coon tuning: formula table and when to use it
Relay autotuning (Astrom-Hagglund): how it works without open-loop testing
Interactive 5-method calculator: P, PI and PID controller types
Comparison table: which method to choose for your process
Effect of Kp, Ki, Kd on rise time, overshoot, settling time and steady-state error
What Kp, Ki and Kd Do: The Three Modes Explained Simply
A PID controller calculates a control output (CO), the signal sent to the valve, heater or actuator, based on the error between the setpoint (SP) and the process variable (PV). The three terms each contribute a different type of corrective action.
+ Ki × ∫ e(t) dt
+ Kd × d/dt[e(t)]
Where:
CO(t) = controller output at time t
e(t) = error = SP - PV at time t
Kp = proportional gain
Ki = integral gain (= Kp / Ti, where Ti = integral time)
Kd = derivative gain (= Kp × Td, where Td = derivative time)
∫ = integral (sum of past errors)
d/dt = derivative (rate of change of error)
ISA standard form: CO = Kp × [e + (1/Ti) × ∫e dt + Td × de/dt]
| Term | Parameter | What it responds to | Effect of increasing | Effect of decreasing |
|---|---|---|---|---|
| Proportional (P) | Kp (gain) | Current error (SP minus PV right now) | Faster response, more overshoot, risk of oscillation. Reduces but does not eliminate steady-state error. | Slower response, less overshoot, larger steady-state error (offset). |
| Integral (I) | Ki or Ti (integral time) | Accumulated past error (how long and how far the error has persisted) | Eliminates steady-state error faster, but too much causes oscillation and windup. Slower Ti = more integral action. | Slower elimination of offset. Very high Ti = almost no integral action. |
| Derivative (D) | Kd or Td (derivative time) | Rate of change of error (how fast the error is moving) | Anticipates changes, reduces overshoot. Too much amplifies noise and causes valve chatter. | Less anticipation, more overshoot. Td = 0 means no derivative action (PI controller). |
The FOPDT Process Model: What K, T and L Mean
Most PID tuning rules are derived for a process described by the First Order Plus Dead Time (FOPDT) model. This model describes how most real industrial processes behave after a step change in the controller output:
Where:
K = Process Gain (dimensionless or with units)
= Change in PV / Change in CO (at steady state)
= ΔPV / ΔCO
T = Process Time Constant (seconds or minutes)
= Time for the PV to reach 63.2% of its final change
after the initial dead time has elapsed
L = Dead Time (seconds or minutes)
= Time from the CO change until the PV first begins to respond
The ratio L/T is called the controllability ratio. L/T below 0.1: easy to control. Above 1.0: very difficult to control.
Figure 1: Step test response. At time zero the controller output CO is stepped up by ΔCO. The process variable PV does not respond for the dead time L, then rises in an S-curve toward a new steady state. L is measured as the delay before PV moves. T is measured from the end of L to the point where PV reaches 63.2% of its final change. K = ΔPV (final change) divided by ΔCO (the step size).
Method 1: Ziegler-Nichols Open-Loop Tuning (Step Response Method)
The Ziegler-Nichols open-loop method, published in 1942, was the first systematic PID tuning rule. It uses the process gain K, time constant T and dead time L measured from an open-loop step test. The resulting parameters tend to give a quarter-decay ratio response (each oscillation is 25% of the previous amplitude), which is aggressive for many modern processes but is still widely used as a starting point.
| Controller type | Kp | Ti (integral time) | Td (derivative time) | Ki = Kp/Ti | Kd = Kp×Td |
|---|---|---|---|---|---|
| P only | T / (K × L) | Infinity (none) | 0 | 0 | 0 |
| PI | 0.9 × T / (K × L) | L / 0.3 | 0 | Kp / Ti | 0 |
| PID | 1.2 × T / (K × L) | 2 × L | 0.5 × L | Kp / Ti | Kp × Td |
Method 2: Ziegler-Nichols Closed-Loop Tuning (Ultimate Gain Method)
The closed-loop method does not require a step test. Instead, with the controller in proportional-only mode (Ki = 0, Kd = 0), the proportional gain is increased slowly until the loop oscillates continuously with constant amplitude. This gain is called the Ultimate Gain (Ku) and the period of oscillation is the Ultimate Period (Pu). From these two numbers the PID parameters are calculated.
| Controller type | Kp | Ti | Td |
|---|---|---|---|
| P only | 0.5 × Ku | Infinity | 0 |
| PI | 0.45 × Ku | 0.833 × Pu | 0 |
| PID (classic) | 0.6 × Ku | 0.5 × Pu | 0.125 × Pu |
| PID (some overshoot) | 0.333 × Ku | 0.5 × Pu | 0.333 × Pu |
| PID (no overshoot) | 0.2 × Ku | 0.5 × Pu | 0.333 × Pu |
Method 3: Internal Model Control (IMC) Tuning
IMC tuning is the preferred method in modern process control because it gives a stable, smooth response and provides a single intuitive tuning knob: the closed-loop time constant lambda (λ). Larger λ gives a slower, more conservative response. Smaller λ gives a faster, more aggressive response. Unlike Ziegler-Nichols, IMC does not tend to produce oscillation and is much easier to apply in practice.
Ti = T
Td = 0 (PI only: most processes use PI for IMC)
For PID with IMC:
Kp = (T + L/2) / (K × (lambda + L/2))
Ti = T + L/2
Td = T × L / (2T + L)
Lambda (λ) selection guide: Lambda = 0.2 × T: aggressive (may oscillate on noisy processes) Lambda = T: moderate (good general starting point) Lambda = 2 to 5× T: conservative (slow but very stable, use for safety-critical loops) Minimum lambda: lambda >= 0.2 × L (do not go below this)
| Lambda value | Response character | Recommended for |
|---|---|---|
| λ = 0.2 × T to 0.5 × T | Fast / Aggressive | Flow loops, level loops where speed matters. Use only if process signal is clean (low noise). |
| λ = T to 2 × T | Moderate / Well-balanced | Temperature, pressure, most process loops. Good first choice for most applications. |
| λ = 3 × T to 5 × T | Conservative / Slow | Noisy loops, safety-instrumented functions, loops where overshoot is absolutely not acceptable. |
Method 4: Cohen-Coon Tuning
Cohen-Coon tuning was developed specifically to handle processes where the dead time is large relative to the time constant (L/T ratio above 0.3). Ziegler-Nichols gives poor results in these cases. Cohen-Coon produces a more accurate result by incorporating the L/T ratio directly in each formula.
| Controller | Kp | Ti | Td |
|---|---|---|---|
| PI | (T/(K×L)) × (0.9 + L/(12T)) | L × (30+3L/T) / (9+20L/T) | 0 |
| PID | (T/(K×L)) × (4/3 + L/(4T)) | L × (32+6L/T) / (13+8L/T) | 4L / (11+2L/T) |
Method 5: Relay Autotuning (Astrom-Hagglund Method)
Relay autotuning introduces a relay (on-off switch) into the control loop instead of a proportional controller. The relay causes the process to oscillate with a controlled, limited amplitude, making it much safer than the classic Ziegler-Nichols ultimate gain test. The relay amplitude (d) and the resulting oscillation amplitude (a) and period (Pu) are used to calculate the ultimate gain:
Where:
d = relay amplitude (the step size applied by the relay)
a = amplitude of PV oscillation (half peak-to-peak)
Pu = measured period of oscillation
Then apply ZN closed-loop formulas:
Kp = 0.6 × Ku
Ti = 0.5 × Pu
Td = 0.125 × Pu
Relay autotuning is implemented as a built-in function in most modern DCS and PLC systems. The relay amplitude d is typically set to 5-10% of the controller output range. The test terminates automatically after 2-3 complete oscillation cycles.
PID Tuning Calculator: Five Methods, Three Controller Types
Select the tuning method tab, enter your process parameters, choose P, PI or PID controller type, and click Calculate for instant results with the complete formula shown.
Worked Examples: Full Step-by-Step Calculations
Example 1: Ziegler-Nichols Open-Loop Tuning (Temperature Loop)
A step test on a heat exchanger temperature loop gives: process gain K = 1.8, time constant T = 180 s, dead time L = 25 s. Calculate Kp, Ti, Td for a PID controller using Ziegler-Nichols open-loop rules.
= 1.2 × 180 / (1.8 × 25)
= 216 / 45
Kp = 4.80
Step 2: Calculate Ti (integral time) Ti = 2 × L
= 2 × 25
Ti = 50.0 s
Step 3: Calculate Td (derivative time) Td = 0.5 × L
= 0.5 × 25
Td = 12.5 s
Step 4: Calculate Ki and Kd (for DCS entry if needed) Ki = Kp / Ti = 4.80 / 50.0
Ki = 0.0960 per second
Kd = Kp × Td = 4.80 × 12.5
Kd = 60.0 s
L/T ratio = 25/180 = 0.139. This is a well-behaved process (L/T well below 0.3). ZN tuning will work well. Enter Kp=4.80, Ti=50.0 s, Td=12.5 s into the DCS. Consider reducing Kp by 20% to 3.84 if the ZN settings are too aggressive on plant.
Example 2: IMC Tuning (Flow Loop, Moderate Lambda)
A flow loop step test gives: K = 0.95, T = 8 s, L = 2 s. Lambda is chosen as T = 8 s (moderate response). Calculate PI parameters using IMC tuning.
Lambda chosen = 8 s >> 0.4 s: OK
Step 2: Calculate Kp Kp = T / (K × (λ + L))
= 8 / (0.95 × (8 + 2))
= 8 / (0.95 × 10)
= 8 / 9.5
Kp = 0.842
Step 3: Calculate Ti Ti = T
= 8 s
Ti = 8.0 s
Step 4: Calculate Ki Ki = Kp / Ti = 0.842 / 8.0
Ki = 0.1053 per second
For a faster flow loop, try lambda = 2 s (aggressive): Kp = 8 / (0.95 × (2+2)) = 8 / 3.8 = 2.105 Ti = 8 s, Ki = 0.263 per second. Flow loops can usually tolerate aggressive tuning. Verify on plant.
Example 3: Cohen-Coon Tuning (High Dead-Time Process)
A process with significant dead time gives: K = 2.5, T = 60 s, L = 30 s. Note L/T = 0.5, which is high. Calculate PID parameters using Cohen-Coon tuning.
= (60 / (2.5 × 30)) × (4/3 + 30/(4×60))
= (60 / 75) × (1.333 + 0.125)
= 0.800 × 1.458
Kp = 1.167
Step 2: Ti using Cohen-Coon PID formula Ti = L × (32 + 6×L/T) / (13 + 8×L/T)
= 30 × (32 + 6×0.5) / (13 + 8×0.5)
= 30 × (32 + 3) / (13 + 4)
= 30 × 35 / 17
= 30 × 2.059
Ti = 61.76 s
Step 3: Td using Cohen-Coon PID formula Td = 4L / (11 + 2×L/T)
= 4×30 / (11 + 2×0.5)
= 120 / (11 + 1)
= 120 / 12
Td = 10.0 s
Compare with ZN PID: Kp = 1.2×60/(2.5×30) = 0.960. Cohen-Coon gives higher Kp. This is expected: Cohen-Coon is optimised for high L/T and gives more accurate results for this case (L/T = 0.5) than standard Ziegler-Nichols.
Which Tuning Method Should You Use? Comparison Table
| Method | Requires open-loop test? | Best L/T range | Response character | Best for | Avoid when |
|---|---|---|---|---|---|
| ZN Open-Loop | Yes (safe, offline) | Below 0.3 | Aggressive (quarter-decay), ~25% overshoot | First estimate on any FOPDT process. Temperature, flow, level. | High L/T (above 0.5). Noisy signals. Safety-critical loops. |
| ZN Closed-Loop | No (process stays running) | Any (but dangerous) | Aggressive, similar to open-loop ZN | When open-loop testing is not possible. Flow loops. | Temperature or pressure loops where sustained oscillation is dangerous. |
| IMC | Yes (open-loop step test) | Any (handles high L/T well) | Smooth, stable, tunable via lambda. No inherent overshoot. | Modern process control. Chemical reactors, refinery columns, any loop requiring stability. | Processes where K, T and L cannot be measured accurately. |
| Cohen-Coon | Yes (open-loop step test) | 0.1 to 2.0 (best for high L/T) | More accurate than ZN for high L/T. Moderate overshoot. | Industrial heating processes, batch reactors, any process where L/T is above 0.3. | Low L/T processes (ZN is simpler and adequate). |
| Relay Autotuning | No (relay test replaces open-loop) | Any | Depends on downstream ZN formula applied | DCS/PLC built-in autotuning. New installations where process data is unavailable. Safe to apply on live process. | Already know K, T, L (use IMC instead). Very noisy processes. |
Further Reading and External Resources
- ISA InTech: Practical Tips for PID Tuning. Practical field guidance on PID tuning from the International Society of Automation, the industry body responsible for process control standards.
- Control Guru: IMC-Based PID Tuning Guide. The most comprehensive free resource on IMC tuning available online, with worked examples and process modelling guidance for field engineers.
- AutomationForum: PID Tuning Simulation Tool. The reference article for this guide, with an embedded live simulation tool for visualising PID step response in real time.
- MathWorks: PID Tuning Algorithm Reference. Technical reference on PID tuning algorithms including IMC, ZN and modern model-based methods, from the developers of MATLAB Control Systems Toolbox.
Frequently Asked Questions: PID Controller Tuning
- PID Tuning for Process Control: A Complete Practical Guide
- Control Valve Positioner: Working Principle, Types and When to Use One
- Control Valve Flow Coefficient (Cv and Kv): What It Is and How to Calculate It
- 4-20 mA Current Loop Explained: How It Works, Wiring and Troubleshooting
- Analog vs Digital Signals in Instrumentation: A Complete Guide
- Ladder Logic for Beginners: A Complete Step-by-Step Guide
What we learn today
- Kp (proportional gain) responds to current error: higher Kp = faster response but more overshoot. Ki = Kp/Ti responds to accumulated error and eliminates offset: smaller Ti = more integral action. Kd = Kp × Td responds to rate of error change and reduces overshoot but amplifies noise. Set Td = 0 for noisy loops, use PI controller instead.
- The FOPDT model parameters K (process gain), T (time constant) and L (dead time) are measured from an open-loop step test. ZN open-loop PID gives: Kp = 1.2T/(K×L), Ti = 2L, Td = 0.5L. IMC PI gives: Kp = T/(K×(lambda+L)), Ti = T. Lambda = T is a balanced starting point for IMC.
- Use Ziegler-Nichols open-loop for a quick first estimate on well-behaved processes (L/T below 0.3). Use IMC for any process where smooth, stable response is required. Use Cohen-Coon when dead time is large (L/T above 0.3). Use relay autotuning when open-loop testing is not possible or when using the DCS built-in autotuner.
- Loop oscillation is almost always caused by Kp too high, Ti too small or Td too large on a noisy signal. Fix in this order: reduce Kp first (halve it). If still oscillating, increase Ti (double it). Ensure Td is zero for flow loops and any noisy measurement. Verify loop scan rate is at least 5 to 10 times faster than the process time constant T.
