The PID controller is used in more than 90 % of industrial loops. In parallel (ISA) form:
$$u(t) = \bar u + K_c\left[e(t) + \frac{1}{\tau_I}\int_0^t e\,dt + \tau_D\frac{de}{dt}\right]$$
The three actions
| Action | Responds to | Effect |
|---|---|---|
| Proportional ($K_c$) | Present error | Fast correction, but leaves an offset for most processes |
| Integral ($\tau_I$) | Past (accumulated) error | Removes offset, but adds oscillation |
| Derivative ($\tau_D$) | Rate of change of error | Anticipates and damps, but amplifies noise |
Why P-only leaves an offset
To hold a new steady state the valve must sit at a new position. With P-only, the valve can only move away from $\bar u$ if there is an error, so some error must remain. Integral action keeps moving the valve until the error is exactly zero.
Practical details
- Direct or reverse action: choose the sign so the controller pushes the right way (heater: temperature too low, increase power).
- Reset windup: if the valve saturates, the integral keeps growing and causes a large overshoot later. Anti-windup stops integrating while the output is saturated.
- Derivative on measurement: use $-dy/dt$ instead of $de/dt$ to avoid a "derivative kick" on set-point changes.
In the simulation, set $K_i = 0$ and $K_d = 0$ and raise $K_p$: the offset shrinks but never disappears. Then add a little $K_i$.