PID Control

On this page

PID — Proportional, Integral, Derivative — is the workhorse control algorithm of industry. The vast majority of regulatory control in process and motion systems is some form of PID, often with practical refinements layered on top.

Overview

A PID controller computes an error (setpoint − process variable) and produces an output that combines a reaction to the present error (P), the accumulation of past error (I), and the rate of change of error (D).

The PID Equation

Ideal (parallel): u(t) = Kp·e(t) + Ki·∫e(τ)dτ + Kd·de/dt

Standard (ISA): u(t) = Kp · ( e(t) + (1/Ti)·∫e(τ)dτ + Td·de/dt )

Series (interacting): common in older PLCs and pneumatic controllers; gains interact across terms.

Term Behavior

  • P — instant proportional response to error. Higher Kp = faster but more oscillation. Alone, leaves an offset.
  • I — eliminates steady-state offset by integrating error. Too much I → oscillation & wind-up.
  • D — anticipates change. Helps damp; very sensitive to noise; usually applied to PV (not error) to avoid “derivative kick” on setpoint changes.

Tuning

  • Ziegler-Nichols (closed loop): raise Kp until sustained oscillation (Ku, Pu); set Kp = 0.6 Ku, Ti = 0.5 Pu, Td = 0.125 Pu.
  • Ziegler-Nichols (open loop / reaction curve): bump test gives gain K, time constant τ, dead time θ; set tunes from table.
  • Lambda (IMC) tuning: closed-loop time constant λ chosen for desired response; mild, conservative tuning that copes with model error.
  • Cohen-Coon — faster than ZN for processes with significant dead time.
  • Auto-tune — built into most modern PLCs / DCSs (relay-feedback methods).

Practical Enhancements

  • Anti-windup — clamp or back-calculate the integral when output is saturated.
  • Bumpless transfer — preload integral when switching auto / manual.
  • Setpoint weighting (2-DOF) — different gains for SP changes vs disturbances.
  • Derivative filtering — low-pass filter D term (filter coeff. N ≈ 8–20).
  • Output rate-of-change limit — protect final control element.
  • Deadband / gap — for nuisance valve cycling.

Troubleshooting

  • If loop oscillates: reduce P, then add a bit more I.
  • If response is sluggish: increase P; reduce I if integral is winding too slowly.
  • If valve is hunting around setpoint: noise on PV — add filter, reduce D.
  • If output saturates and won’t come down: anti-windup not configured.
  • Always tune in normal operating region; tuning at startup or low load often fails at design point.
reference page