Knowledge / Instrumentation and Control Engineering / PID controllers and tuning

PID controllers and tuning

Instrumentation and Control Engineering (B.E./B.Tech) · Control · free study notes for exams, placements and interviews

In short

A PID controller computes the error between a measured process variable and its setpoint and manipulates a final control element using three actions: proportional (acts on present error), integral (acts on accumulated past error) and derivative (acts on the present rate of change). It is by far the most widely deployed control algorithm in industry — over 90% of regulatory loops in refineries, power plants, cement, steel, pharma and water treatment are PI or PID blocks inside a DCS, PLC or standalone single-loop controller. Tuning means choosing the numerical values of gain, integral time and derivative time so the loop is fast enough, stable, and not oscillatory. It carries direct marks in GATE (IN and EE), university Control and Process Control papers, and appears in almost every instrumentation interview at L&T, Honeywell, Yokogawa, Emerson, ABB, Siemens, Reliance, IOCL, BPCL, NTPC, Tata Steel and Sun Pharma.

Explained

The three control actions

Standard forms and practical modifications

Process models used for tuning

Classical tuning methods (step by step)

1. Ziegler-Nichols closed-loop (continuous cycling / ultimate gain) method

  1. Put the controller in P-only (Ti → max, Td = 0).
  2. Increase Kc in steps, bumping the setpoint slightly each time, until the loop shows a sustained oscillation of constant amplitude.
  3. Record the ultimate gain Ku and ultimate period Pu (s or min).
  4. Set: P → Kc = 0.5Ku; PI → Kc = 0.45Ku, Ti = Pu/1.2; PID → Kc = 0.6Ku, Ti = Pu/2, Td = Pu/8.
  5. Gives roughly quarter-amplitude damping — aggressive, about 25% overshoot, gain margin ≈ 2. Many plants will not permit driving a live loop to the stability limit.

2. Ziegler-Nichols open-loop (reaction curve) method — from the FOPDT fit, with R = Kp/τ as the slope per unit output:

3. Cohen-Coon — corrects Z-N for dead-time-dominant loops; for PI: Kc = (1/Kp)(τ/θ)(0.9 + θ/12τ), Ti = θ(30 + 3θ/τ)/(9 + 20θ/τ). Faster but less robust.

4. IMC / lambda (λ) tuning — the industrial default today. Choose a desired closed-loop time constant λ (robustness knob, typically λ = τ or 1-3× θ, whichever is larger):

5. Tyreus-Luyben — PI: Kc = Ku/3.2, Ti = 2.2Pu; PID: Kc = Ku/2.2, Ti = 2.2Pu, Td = Pu/6.3: much more conservative than Z-N, preferred for distillation and other interacting loops.

6. Relay auto-tuning (Åström-Hägglund) — a relay is inserted in place of the controller; the loop limit-cycles safely with bounded amplitude, and Ku ≈ 4d/(πa) from relay amplitude d and PV amplitude a, Pu = the cycle period. This is the method behind the "auto-tune" button in most modern controllers.

7. Manual field tuning (what is actually done): set Td = 0 and Ti long; raise Kc until response just begins to oscillate, then back off to about half; reduce Ti until the oscillation period lengthens and offset clears, then increase Ti by about 50%; add Td ≈ Ti/4 only on slow temperature loops. Document every change.

Performance criteria, limitations and digital implementation

Key points

Formulas and examples

Ideal PID: u(t) = Kc[ e(t) + (1/Ti)∫e dt + Td de/dt ] + ub
e = error (%), Kc = proportional gain (dimensionless, %out/%in), Ti = integral time (min or s), Td = derivative time (min or s), ub = bias (%)
Transfer function: Gc(s) = Kc(1 + 1/(Ti s) + Td s) = Kc(Ti Td s² + Ti s + 1)/(Ti s)
Parallel form: Ki = Kc/Ti (1/s), Kd = Kc·Td (s); PB% = 100/Kc; reset rate = 1/Ti (repeats per min)
FOPDT process: Gp(s) = Kp e−θs/(τ s + 1); Kp = ΔPV%/Δu% (dimensionless), τ, θ in the same time unit
Controllability ratio = θ/τ
Ziegler-Nichols (closed loop): P → 0.5Ku | PI → Kc = 0.45Ku, Ti = Pu/1.2 | PID → Kc = 0.6Ku, Ti = Pu/2, Td = Pu/8
Ziegler-Nichols (open loop, PID): Kc = 1.2τ/(Kpθ), Ti = 2θ, Td = 0.5θ
IMC-PI: Kc = τ/[Kp(λ + θ)], Ti = τ; λ = desired closed-loop time constant
Tyreus-Luyben: PI → Kc = Ku/3.2, Ti = 2.2Pu | PID → Kc = Ku/2.2, Ti = 2.2Pu, Td = Pu/6.3
Relay auto-tune: Ku = 4d/(πa), with relay amplitude d (%) and PV oscillation amplitude a (%)
Offset with P-only control for a load change L: offset = L·Kp/(1 + Kc·Kp)
Interacting → ideal conversion: f = 1 + Td′/Ti′; Kc = f·Kc′, Ti = f·Ti′, Td = Td′/f
Discrete (velocity) PID: Δu(k) = Kc[Δe(k) + (T/Ti)e(k) − (Td/T)(pv(k) − 2pv(k−1) + pv(k−2))]
T = sample interval (s)

Example 1 — Ziegler-Nichols closed loop. A temperature loop cycles with constant amplitude at Kc = 4.0 with a period of 6 min.

Example 2 — step test, then Z-N open loop and IMC. Controller in manual; output stepped from 40% to 50%. PV rises from 60 °C to 72 °C on a 0-200 °C transmitter range, after an apparent delay of 1.5 min, with τ = 6 min.

Example 3 — offset with P-only control. A level/temperature loop has Kp = 0.5. Controller is P-only with PB = 25%, so Kc = 100/25 = 4. A load disturbance equivalent to a 10% change in output occurs.

Example 4 — ultimate gain from a relay test, and discrete settings. A relay test on a flow loop with relay amplitude d = 5% produces a PV limit cycle of amplitude a = 2% with period 12 s.

Example 5 — form conversion. A legacy pneumatic controller (series form) is set to Kc′ = 2.0, Ti′ = 4 min, Td′ = 1 min and must be re-entered in a DCS using the ideal form.

Loop typeTypical Kp behaviourGainIntegralDerivativeNote
FlowFast, noisy, θ/τ small0.3-1.03-15 sNonePI only; filter the DP signal
Pressure (liquid)Very fastLow-moderateSecondsNoneCan be almost P-only
Pressure (gas, vessel)IntegratingModerateLong or noneNoneAvoid over-reset
LevelIntegrating, noisy1-10 (tight) / <1 (averaging)LongNoneP-only acceptable for surge tanks
TemperatureSlow, large τ and θModerateMinutesTi/4 to Ti/6The classic PID loop
Composition / pHVery slow, non-linearLowLongSmallGain scheduling or linearisation
MethodNeedsAggressivenessBest for
Z-N closed loopSustained cycling (Ku, Pu)High (~25% overshoot)Exams; loops that can be cycled
Z-N open loopStep test (Kp, τ, θ)HighQuick first cut
Cohen-CoonStep testHighestDead-time dominant loops
IMC / lambdaStep test + λ choiceAdjustableIndustrial default, robust
Tyreus-LuybenKu, PuLowInteracting loops, distillation
Relay auto-tuneRelay test in situDepends on rule usedBuilt-in auto-tune features

Where it is used

Interview questions

Common mistakes

Related topics

Control systems basics · Stability: Routh, root locus and Bode · Control valves and final control elements · Advanced control: cascade, feedforward and ratio · Process dynamics and FOPDT modelling · DCS, PLC and SCADA configuration

Open in the Knowledge reader →Find jobs →