PID Controller Tuning Explained: Five Methods, Formulas, Worked Examples and Calculator

Share:

Process 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.

Ziegler-Nichols Open and Closed Loop IMC Tuning Cohen-Coon 5-Method Interactive Calculator

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.

What this guide covers
What Kp, Ki and Kd do physically: the three modes explained simply
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
Advertisement
Advertisement

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.

PID controller equation (standard parallel form): CO(t) = Kp × e(t)
+ 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]
TermParameterWhat it responds toEffect of increasingEffect 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 most important practical rule about derivative action
Derivative action amplifies high-frequency noise. In most flow loops and any loop with noisy measurement signals, derivative action makes things worse and should be left at zero (using a PI controller). Derivative is most useful in temperature loops and slow processes where the signal is smooth and anticipating changes ahead of time genuinely helps. Always apply a derivative filter (N = 5 to 20) in any DCS or PLC implementation that does include derivative action.
Advertisement
Advertisement

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:

FOPDT transfer function: G(s) = K × e^(-Ls) / (Ts + 1)

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: How to Measure K, T and L from Plant Data
PV Time CO step at t=0 L (dead time) PV_final 63.2% mark T (time constant) K =ΔPV/ΔCO

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 typeKpTi (integral time)Td (derivative time)Ki = Kp/TiKd = Kp×Td
P onlyT / (K × L)Infinity (none)000
PI0.9 × T / (K × L)L / 0.30Kp / Ti0
PID1.2 × T / (K × L)2 × L0.5 × LKp / TiKp × 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.

Safety warning for closed-loop ultimate gain testing
Driving a process to sustained oscillation at ultimate gain can be dangerous for tight pressure or temperature loops. Only perform ultimate gain testing on well-understood, forgiving loops such as flow or level control. For temperature, pressure or composition loops, use the open-loop step test or IMC method instead.
Controller typeKpTiTd
P only0.5 × KuInfinity0
PI0.45 × Ku0.833 × Pu0
PID (classic)0.6 × Ku0.5 × Pu0.125 × Pu
PID (some overshoot)0.333 × Ku0.5 × Pu0.333 × Pu
PID (no overshoot)0.2 × Ku0.5 × Pu0.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.

IMC tuning formulas for a FOPDT process (PI controller form): Kp = T / (K × (lambda + L))

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 valueResponse characterRecommended for
λ = 0.2 × T to 0.5 × TFast / AggressiveFlow loops, level loops where speed matters. Use only if process signal is clean (low noise).
λ = T to 2 × TModerate / Well-balancedTemperature, pressure, most process loops. Good first choice for most applications.
λ = 3 × T to 5 × TConservative / SlowNoisy 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.

ControllerKpTiTd
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:

Relay autotuning: Ultimate gain from relay test Ku = (4 × d) / (pi × a)

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.

🎛
PID Tuning Calculator
Ziegler-Nichols OL · Ziegler-Nichols CL · IMC · Cohen-Coon · Relay Autotuning
ΔPV / ΔCO (dimensionless)
Time for PV to reach 63.2% of change
s
Delay before PV responds to CO step
s
Proportional gain at onset of continuous oscillation
Period of oscillation at Ku (in seconds)
s
s
s
Recommended: λ = T (balanced). Larger = slower/safer. Smaller = faster/aggressive. Min: λ ≥ 0.2×L
s
s
Best when L/T is 0.1 to 2.0
s
Relay output step size (e.g. 5% of CO range)
Half peak-to-peak of PV oscillation
s
✔ PID Parameters Calculated
Kp (Proportional Gain)
Ti (Integral Time, s)
Td (Derivative Time, s)
Ki = Kp/Ti
Kd = Kp×Td
Controller type
Advertisement
Advertisement

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.

Given: K = 1.8, T = 180 s, L = 25 s. Controller type: PID. Step 1: Calculate Kp (proportional gain) Kp = 1.2 × T / (K × L)
= 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.

Given: K = 0.95, T = 8 s, L = 2 s, λ = 8 s. Controller type: PI. Step 1: Check lambda is acceptable Minimum lambda = 0.2 × L = 0.2 × 2 = 0.4 s
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.

Given: K = 2.5, T = 60 s, L = 30 s. L/T ratio = 30/60 = 0.5. Controller type: PID. Step 1: Kp using Cohen-Coon PID formula Kp = (T / (K × L)) × (4/3 + L/(4T))
= (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

MethodRequires open-loop test?Best L/T rangeResponse characterBest forAvoid when
ZN Open-LoopYes (safe, offline)Below 0.3Aggressive (quarter-decay), ~25% overshootFirst estimate on any FOPDT process. Temperature, flow, level.High L/T (above 0.5). Noisy signals. Safety-critical loops.
ZN Closed-LoopNo (process stays running)Any (but dangerous)Aggressive, similar to open-loop ZNWhen open-loop testing is not possible. Flow loops.Temperature or pressure loops where sustained oscillation is dangerous.
IMCYes (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-CoonYes (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 AutotuningNo (relay test replaces open-loop)AnyDepends on downstream ZN formula appliedDCS/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

Trusted external resources on PID controller tuning
Advertisement
Advertisement

Frequently Asked Questions: PID Controller Tuning

What is the difference between Kp, Ki and Kd?
Kp (proportional gain) responds to the current error. A higher Kp gives faster response but more overshoot and risk of oscillation. Ki (integral gain = Kp/Ti) responds to accumulated past error and eliminates steady-state offset. Too much integral action causes windup and oscillation. Kd (derivative gain = Kp × Td) responds to the rate of change of error and can anticipate changes and reduce overshoot, but it amplifies noise and should be set to zero for noisy loops.
What are K, T and L in PID tuning?
K, T and L are the three parameters of the FOPDT (First Order Plus Dead Time) process model. K is the process gain: how much the process variable (PV) changes per unit change in the controller output (CO). T is the time constant: the time for the PV to reach 63.2% of its final change after the dead time ends. L is the dead time: the delay between a change in CO and the first movement of PV. All three are measured from an open-loop step test.
Which PID tuning method is best?
IMC (Internal Model Control) tuning is generally the best method for modern process control because it produces stable, smooth response with a single intuitive adjustment (lambda). Ziegler-Nichols is simpler and works well for a quick first estimate. Cohen-Coon is better than ZN when the dead time is large relative to the time constant (L/T above 0.3). Relay autotuning is best when you cannot do an open-loop step test or when using a DCS with built-in autotuning.
What is lambda in IMC tuning and how do I choose it?
Lambda (λ) is the desired closed-loop time constant in IMC tuning. It is the primary tuning knob. A smaller lambda gives a faster, more aggressive response. A larger lambda gives a slower, more conservative response. A good starting point is lambda = T (equal to the process time constant). For safety-critical loops or noisy processes, use lambda = 2T to 5T. Lambda must always be at least 0.2 times the dead time L to maintain stability.
What causes PID loop oscillation?
PID loop oscillation is most commonly caused by Kp being too high (proportional gain too aggressive), Ti being too small (integral action too fast), or Td being too large on a noisy signal (derivative amplifying the noise into hunting). The fix is: reduce Kp first (usually most effective), then increase Ti if oscillation continues, and ensure Td is zero or very small on noisy signals. On DCS systems, also check that the loop execution time (scan rate) is at least 5 to 10 times faster than the process time constant.
What is the difference between Ti and Ki?
Ti (integral time, in seconds) and Ki (integral gain, in per second) are two ways of expressing the same integral action. Ti = Kp / Ki, so Ki = Kp / Ti. European DCS systems (Siemens, Yokogawa, ABB) typically use Ti directly. North American systems (Emerson, Honeywell, Rockwell) sometimes use the repeats-per-minute convention: repeats per minute = 60/Ti. Always check which convention your DCS uses before entering integral parameters.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *