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
- Proportional (P): output proportional to present error.
u = Kc·e + ub. Larger Kc gives a faster, tighter response but less stability; P alone leaves a steady-state offset for a load change (except on integrating processes). - Proportional band (PB): the span of PV, as % of range, that drives the output over its full 0-100%. PB% = 100/Kc. A field controller set to PB = 50% has Kc = 2.
- Integral (I) / reset: output changes at a rate proportional to error, so it keeps moving until error is exactly zero — this is what removes offset. Tuned as integral time Ti (minutes per repeat; smaller = stronger) or reset rate (repeats per minute = 1/Ti).
- Derivative (D) / rate / pre-act: output proportional to dPV/dt; it anticipates where the error is heading and adds damping, allowing a higher Kc. Tuned as derivative time Td (minutes). Useless and harmful on noisy signals (flow, pressure); valuable on slow, thermally lagged loops (temperature, composition).
- Why "one knob each": P sets stiffness, I removes offset, D adds phase lead and damping. In frequency terms, I adds −90° phase at low frequency (destabilising) and D adds up to +90° (stabilising).
Standard forms and practical modifications
- Ideal / ISA (non-interacting) form: u = Kc[e + (1/Ti)∫e dt + Td de/dt]. The standard for exams and for most DCS blocks.
- Series / interacting (classical pneumatic) form: u = Kc′(1 + 1/Ti′s)(1 + Td′s). Converting: Kc = Kc′·f, Ti = Ti′·f, Td = Td′/f where f = 1 + Td′/Ti′. Tuning rules from pneumatic-era literature (Ziegler-Nichols) were derived for this form — a real source of confusion.
- Parallel / independent-gain form: u = Kp·e + Ki∫e dt + Kd de/dt. Here Ki = Kc/Ti and Kd = Kc·Td. Common in PLC function blocks and in MATLAB's
pidobject. - Derivative on measurement, not on error: avoids derivative kick — a setpoint step would otherwise give an impulse in output. Nearly all industrial blocks differentiate −PV.
- Setpoint weighting / two-degree-of-freedom: u = Kc[(b·sp − pv) + …] with b < 1 softens setpoint response without detuning disturbance rejection.
- Derivative filter: real D action is implemented as Tds/(1 + αTds) with α ≈ 0.1, i.e. a lead-lag of limited high-frequency gain (pure Td s is not realisable and amplifies noise).
- Reset (integral) windup: when the valve saturates, the integral keeps accumulating and the controller cannot come off the limit until the error reverses for a long time — large overshoot. Cured by anti-windup: stop integrating at saturation, back-calculation of the integral, or external reset feedback.
- Bumpless transfer / auto-manual: on switching from manual to auto the integral is initialised so output does not jump; essential during startup.
- Direct vs reverse acting: reverse-acting (output falls when PV rises) suits a heating valve; direct-acting suits a cooling valve. Together with valve fail-action (air-to-open/air-to-close) it fixes the sign of the loop — get it wrong and the loop runs away.
- Bias / manual reset: in a pure P controller, ub is adjusted so error is zero at one design load.
Process models used for tuning
- Most self-regulating loops are fitted to a FOPDT (first-order plus dead time) model: G(s) = Kp e−θs/(τs + 1), with process gain Kp (%PV per %output), time constant τ and dead time θ.
- Controllability ratio θ/τ: < 0.1 easy; 0.1-0.5 normal; > 1 dead-time dominant — detune heavily, use PI only, or consider model-based control.
- Integrating (non-self-regulating) processes: level in a tank, pressure in a closed vessel — G(s) = Kp′e−θs/s. These need little or no integral action; averaging level control deliberately uses a very low gain to let the tank absorb surges.
- Open-loop step (bump) test: place controller in manual, step the output 5-10%, record PV, read Kp = ΔPV/Δu, and get τ and θ from the reaction curve (tangent method, or the two-point 28.3%/63.2% method).
Classical tuning methods (step by step)
1. Ziegler-Nichols closed-loop (continuous cycling / ultimate gain) method
- Put the controller in P-only (Ti → max, Td = 0).
- Increase Kc in steps, bumping the setpoint slightly each time, until the loop shows a sustained oscillation of constant amplitude.
- Record the ultimate gain Ku and ultimate period Pu (s or min).
- Set: P → Kc = 0.5Ku; PI → Kc = 0.45Ku, Ti = Pu/1.2; PID → Kc = 0.6Ku, Ti = Pu/2, Td = Pu/8.
- 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:
- P: Kc = τ/(Kp·θ); PI: Kc = 0.9τ/(Kp·θ), Ti = 3.33θ; PID: Kc = 1.2τ/(Kp·θ), Ti = 2θ, Td = 0.5θ.
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):
- PI on FOPDT: Kc = τ/[Kp(λ + θ)], Ti = τ.
- PID on second-order: Ti = τ1 + τ2, Td = τ1τ2/(τ1 + τ2).
- Advantages: one tuning knob, no sustained cycling needed, predictable robustness, naturally slow on loops with big dead time. SIMC (Skogestad) is the same family with λ = θ as default.
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
- Criteria: rise time, peak overshoot, settling time, decay ratio (quarter-amplitude = 0.25), offset, and integral criteria IAE, ISE, ITAE (ITAE penalises late errors, giving less oscillatory tuning).
- Robustness: aim for gain margin 2-5 and phase margin 30-60°, or maximum sensitivity Ms = 1.4-2.0. Over-tightening a loop is the commonest field fault — it wears the valve and couples with other loops.
- Limitations of PID: single-input single-output; poor on long dead time (use dead-time compensation/Smith predictor), on severely non-linear or inverse-response processes, and on strongly interacting multivariable plants (MPC territory).
- Gain scheduling handles known non-linearity (e.g. a pH loop or a valve with non-linear characteristic); output characterisation can linearise the valve instead.
- Digital PID (what runs in a PLC/DCS): velocity (incremental) form is used because it is inherently windup-resistant and bumpless: Δu(k) = Kc[(e(k) − e(k−1)) + (T/Ti)e(k) − (Td/T)(pv(k) − 2pv(k−1) + pv(k−2))].
- Sample time T should be about 0.1-0.2 × the dominant closed-loop time constant, and at least 10× faster than Pu; flow loops are typically scanned every 0.1-0.5 s, temperature loops every 1-5 s.
- Indian standards and practice: instrument tag and loop documentation per IS 9319 / ISA-5.1 symbols; functional safety of control and safety loops per IS/IEC 61508 and IEC 61511 (SIS must be separate from the PID regulatory layer); PLC equipment per IEC 61131 and controller configuration languages per IEC 61131-3; control valve sizing and testing per IEC 60534 series. Hazardous-area certification of field controllers and transmitters is through CCoE/PESO and BIS, with intrinsic safety to IS/IEC 60079 series. Workplace and plant safety obligations now sit under the Occupational Safety, Health and Working Conditions Code, 2020, in force from 21 November 2025, which replaced the Factories Act, 1948. Standard numbers and editions do change — confirm the current edition on the BIS portal before citing it in a design document.
Key points
- PID - u = Kc[e + (1/Ti)∫e dt + Td de/dt]; three independent actions on past, present and future error.
- Proportional action - fast, but leaves offset on a self-regulating process after a load change.
- Proportional band - PB% = 100/Kc; wide band = low gain = sluggish but stable.
- Integral action - the only action that eliminates steady-state offset; adds phase lag and reduces stability.
- Derivative action - adds damping and phase lead, permits higher Kc, must never be used on noisy flow or pressure loops.
- Reset windup - integral accumulates during valve saturation; prevented by anti-windup / external reset.
- Derivative kick - avoided by taking derivative of measurement instead of error.
- Ziegler-Nichols closed loop - Kc = 0.6Ku, Ti = Pu/2, Td = Pu/8; ~25% overshoot, quarter-amplitude damping.
- Ziegler-Nichols open loop - uses Kp, τ, θ from a step test; PID: Kc = 1.2τ/(Kpθ).
- Cohen-Coon - better than Z-N when θ/τ is large; aggressive and less robust.
- IMC / lambda tuning - Kc = τ/[Kp(λ + θ)], Ti = τ; single robustness knob λ, the industrial default.
- Tyreus-Luyben - Kc = Ku/3.2, Ti = 2.2Pu — conservative, for interacting loops.
- Relay auto-tuning - Ku ≈ 4d/(πa) from a safe bounded limit cycle; basis of auto-tune buttons.
- θ/τ ratio - the single best indicator of how hard a loop will be to control.
- Typical settings - flow: PI, high gain, Ti a few seconds, no D; level: P or PI with very low gain; temperature: full PID.
- Integrating process - level/pressure in a closed vessel; needs little integral action, can cycle if over-reset.
- Digital PID - velocity form, sample time ≈ 0.1-0.2 × closed-loop time constant.
- Robustness target - gain margin 2-5, phase margin 30-60°, Ms = 1.4-2.0.
Formulas and examples
e = error (%), Kc = proportional gain (dimensionless, %out/%in), Ti = integral time (min or s), Td = derivative time (min or s), ub = bias (%)
Parallel form: Ki = Kc/Ti (1/s), Kd = Kc·Td (s); PB% = 100/Kc; reset rate = 1/Ti (repeats per min)
Controllability ratio = θ/τ
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 (%)
Interacting → ideal conversion: f = 1 + Td′/Ti′; Kc = f·Kc′, Ti = f·Ti′, Td = Td′/f
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.
- Ku = 4.0, Pu = 6 min.
- PI: Kc = 0.45 × 4.0 = 1.8, Ti = 6/1.2 = 5 min.
- PID: Kc = 0.6 × 4.0 = 2.4, Ti = 6/2 = 3 min, Td = 6/8 = 0.75 min (45 s).
- Tyreus-Luyben PID for comparison: Kc = 4.0/2.2 = 1.82, Ti = 2.2 × 6 = 13.2 min, Td = 6/6.3 = 0.95 min — far gentler (TL PI would be Kc = 4.0/3.2 = 1.25, Ti = 13.2 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.
- ΔPV in % of span = 12/200 × 100 = 6%. Δu = 10%. So Kp = 6/10 = 0.6 (%/%), θ = 1.5 min, τ = 6 min, θ/τ = 0.25 (a normal, well-behaved loop).
- Z-N open-loop PID: Kc = 1.2 × 6/(0.6 × 1.5) = 7.2/0.9 = 8.0, Ti = 2 × 1.5 = 3 min, Td = 0.5 × 1.5 = 0.75 min.
- IMC-PI with λ = τ = 6 min: Kc = 6/[0.6 × (6 + 1.5)] = 6/4.5 = 1.33, Ti = 6 min. Six times less aggressive than Z-N — and typically what an engineer would commission.
- IMC-PI with λ = θ = 1.5 min (SIMC): Kc = 6/[0.6 × 3.0] = 3.33, Ti = 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.
- Offset = 10 × 0.5/(1 + 4 × 0.5) = 5/3 = 1.67% of span.
- Narrowing PB to 10% gives Kc = 10: offset = 5/(1 + 5) = 0.83% of span — halved, but the loop is now twice as oscillatory.
- Adding integral action drives the offset to zero regardless of Kc.
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.
- Ku = 4 × 5/(π × 2) = 20/6.2832 = 3.18; Pu = 12 s.
- Z-N PI (flow loops get no derivative): Kc = 0.45 × 3.18 = 1.43, Ti = 12/1.2 = 10 s.
- Parallel-form equivalent: Ki = 1.43/10 = 0.143 s⁻¹.
- Sample time: at least 10× faster than Pu → T ≤ 1.2 s; choose T = 0.5 s. Then T/Ti = 0.05, so each scan adds 1.43 × 0.05 × e = 0.0715e % to the output.
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.
- f = 1 + Td′/Ti′ = 1 + 0.25 = 1.25.
- Kc = 1.25 × 2.0 = 2.5, Ti = 1.25 × 4 = 5 min, Td = 1/1.25 = 0.8 min.
- Entering 2.0 / 4 / 1 directly would leave the loop about 20% less tightly tuned than before.
| Loop type | Typical Kp behaviour | Gain | Integral | Derivative | Note |
|---|---|---|---|---|---|
| Flow | Fast, noisy, θ/τ small | 0.3-1.0 | 3-15 s | None | PI only; filter the DP signal |
| Pressure (liquid) | Very fast | Low-moderate | Seconds | None | Can be almost P-only |
| Pressure (gas, vessel) | Integrating | Moderate | Long or none | None | Avoid over-reset |
| Level | Integrating, noisy | 1-10 (tight) / <1 (averaging) | Long | None | P-only acceptable for surge tanks |
| Temperature | Slow, large τ and θ | Moderate | Minutes | Ti/4 to Ti/6 | The classic PID loop |
| Composition / pH | Very slow, non-linear | Low | Long | Small | Gain scheduling or linearisation |
| Method | Needs | Aggressiveness | Best for |
|---|---|---|---|
| Z-N closed loop | Sustained cycling (Ku, Pu) | High (~25% overshoot) | Exams; loops that can be cycled |
| Z-N open loop | Step test (Kp, τ, θ) | High | Quick first cut |
| Cohen-Coon | Step test | Highest | Dead-time dominant loops |
| IMC / lambda | Step test + λ choice | Adjustable | Industrial default, robust |
| Tyreus-Luyben | Ku, Pu | Low | Interacting loops, distillation |
| Relay auto-tune | Relay test in situ | Depends on rule used | Built-in auto-tune features |
Where it is used
- Refineries and petrochemicals (Reliance Jamnagar, IOCL, HPCL, BPCL): thousands of PID loops in Honeywell Experion, Yokogawa Centum or Emerson DeltaV, with regulatory PID under an MPC layer on major columns.
- Power plants (NTPC, BHEL-supplied units): drum level three-element control, superheater steam temperature, combustion air-fuel ratio, turbine governor loops — all PID-based, in BHEL MAX-DNA or Siemens SPPA systems.
- Pharma and food (Sun Pharma, Cipla, Nestlé India): jacketed reactor temperature, autoclave and CIP loops, with tuning records retained for GMP qualification and 21 CFR Part 11-style audit trails.
- Steel, cement and paper (Tata Steel, JSW, UltraTech, ITC PSPD): kiln and furnace temperature, draught, roll-gap and basis-weight loops; cascade and ratio schemes built on PID blocks.
- Water and wastewater (AMRUT/Jal Jeevan Mission SCADA schemes): pump pressure, chlorine residual and flow control on PLC-based PID.
- Job roles: instrumentation/control engineer, commissioning and loop-checking engineer, DCS configuration engineer, APC engineer, service engineer at Honeywell/Yokogawa/Emerson/ABB/Siemens, and maintenance engineers who re-tune loops after valve overhauls.
Interview questions
- Q: Why does a proportional-only controller leave an offset? A: Its output is tied to the error through a fixed gain, so a new load needs a new output, which can only come from a non-zero error — only integral action can hold output at a new value with zero error.
- Q: What is reset windup and how do you stop it? A: Integral continues accumulating while the valve is saturated, so the controller stays on the limit long after the error reverses; it is prevented by anti-windup logic — freezing or back-calculating the integral, or external reset feedback.
- Q: Why is derivative action not used on flow loops? A: Flow measurement is noisy and the loop is fast, so differentiating amplifies noise into valve chatter while adding no useful anticipation.
- Q: What is derivative kick and how is it avoided? A: A setpoint step gives an infinite de/dt and an output spike; it is avoided by computing derivative on the measurement (−dPV/dt) instead of the error.
- Q: State the Ziegler-Nichols closed-loop PID settings. A: Kc = 0.6Ku, Ti = Pu/2, Td = Pu/8, where Ku and Pu are the gain and period at sustained oscillation.
- Q: Why is lambda or IMC tuning preferred in a plant over Ziegler-Nichols? A: It needs only a bump test, not a loop driven to its stability limit, and it gives one explicit robustness knob λ so the engineer can trade speed for margin.
- Q: How do you tune a level loop on a surge tank? A: Use averaging level control — low gain (often < 1) and long or no integral, so the tank absorbs flow surges instead of passing them downstream.
- Q: What does the ratio θ/τ tell you? A: How controllable the loop is; a large dead time relative to the time constant forces low gain, long integral time and often a dead-time-compensating strategy.
- Q: A loop oscillates with a long period after an integral change — what is wrong? A: Integral time is too short (too much reset); slow cycling with a period much longer than Pu is the signature of over-reset, whereas too-high gain cycles near Pu.
- Q: What is the difference between interacting and non-interacting PID forms? A: In the interacting (series) form the derivative setting modifies the effective gain and integral time by the factor f = 1 + Td/Ti; the same numbers in the two forms give different behaviour.
- Q: How is the sample time chosen for a digital PID? A: About 0.1-0.2 times the dominant closed-loop time constant and at least ten times faster than the ultimate period, so discretisation adds negligible effective dead time (≈ T/2).
- Q: Reverse or direct acting for a steam heating valve with an air-to-open actuator? A: Reverse acting — when temperature rises above setpoint the output must fall to close the air-to-open valve and cut steam.
Common mistakes
- Treating PB and gain as the same thing, or forgetting PB% = 100/Kc, so a "wider band" is mistakenly thought to be tighter control.
- Mixing time units — entering Ti in minutes when the block expects seconds (or reset rate instead of reset time), which detunes the loop by 60×.
- Applying Ziegler-Nichols settings straight to a plant and then blaming the method when the loop overshoots 25% and cycles.
- Adding derivative action to cure sluggishness on a noisy flow or pressure loop instead of raising the gain.
- Ignoring windup and non-linear valve behaviour, then re-tuning the controller to compensate for a sticking valve — tune the valve first, the loop second.
- Using integral action on a fast integrating level loop and getting slow sustained cycling.
- Forgetting the interacting-to-ideal conversion when migrating settings from an old pneumatic or analogue controller to a DCS.
- Quoting Kp from a step test without expressing both PV and output in % of span, making the gain dimensionally meaningless.
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