Glossary term
PID Controller
A feedback controller that computes a control action from the proportional, integral, and derivative of the error signal.
Definition
deviceA PID controller is a feedback controller that computes its output as the weighted sum of three terms derived from the error signal: a proportional term, an integral term, and a derivative term.
The PID controller is the most widely deployed control algorithm in industry, found in process control, motion control, temperature regulation, flow control, and countless embedded systems. Its three terms address three distinct aspects of the control problem: the proportional term responds to the current error magnitude, the integral term eliminates steady-state offset by accumulating past error, and the derivative term anticipates future error trends and provides damping. Despite its simplicity, properly tuned PID control handles a large fraction of practical single-variable control problems effectively.
The PID controller computes its output u(t) as a linear combination of three functions of the error signal e(t) = r(t) - y(t), where r(t) is the reference (setpoint) and y(t) is the measured output:
The three gains K_p, K_i, and K_d are the tuning parameters. Each term serves a distinct control purpose, and the overall behaviour of the controller is determined by their values relative to the plant dynamics.
The proportional term
The proportional term K_p \, e(t) produces a control action directly proportional to the current error. A large error generates a large corrective input; a small error generates a small correction. Increasing K_p makes the response faster and reduces steady-state error, but also increases overshoot and, beyond a critical value, destabilises the loop. In a proportional-only controller, a non-zero steady-state error (offset) persists whenever the plant requires a non-zero input to maintain the setpoint — the proportional term alone cannot eliminate this offset.
The integral term
The integral term K_i \int_0^t e(\tau) \, d\tau accumulates the error over time. As long as any error persists, the integral grows and the control signal continues to change until the error is driven to zero. This guarantees zero steady-state error for step reference changes and constant disturbances — a property called integral action or reset action. The downside is integrator windup: when the actuator saturates (its output is limited), the integral continues to accumulate while the controller has no effective authority, leading to a large overshoot when the actuator comes out of saturation. Anti-windup schemes limit integrator accumulation during saturation.
The derivative term
The derivative term K_d \, \dot{e}(t) responds to the rate of change of the error. If the error is decreasing rapidly, the derivative term reduces the control action, providing a braking effect that reduces overshoot and improves transient response. It is effectively a prediction of the near-future error: if the error is heading toward zero quickly, the controller eases off before reaching zero to avoid overshooting. The derivative term amplifies high-frequency noise in the measured output, which is why it is often applied only to the measured output rather than the error, and frequently filtered with a low-pass filter to limit its effect at high frequencies.
Transfer function representation
In the Laplace domain, the PID controller has the transfer function:
The integral action introduces a pole at s = 0 (on the imaginary axis), which guarantees zero steady-state error to step inputs. The derivative action introduces a zero that can be placed to improve phase margin and transient response. The open-loop transfer function L(s) = C(s) G(s) is then analysed using Bode plots or root locus to assess stability margins and performance.
Tuning
PID tuning is the process of selecting K_p, K_i, K_d to achieve the desired closed-loop behaviour — typically specified in terms of rise time, overshoot, settling time, and steady-state error. The Ziegler–Nichols method provides a classical empirical starting point: the process is brought to the limit of stability under proportional-only control to identify the ultimate gain K_u and ultimate period T_u, from which initial PID gains are computed. Model-based tuning methods — using a first-order plus dead time (FOPDT) model of the plant — provide more systematic and accurate starting points. In practice, initial tuning is almost always followed by manual adjustment on the actual process.
Variants and limitations
The PI controller (no derivative) is the most common variant in process control, where derivative action is often impractical due to noisy measurements. The PD controller (no integral) is used in some motion control applications where steady-state accuracy is ensured by other means. PID control is inherently a single-input single-output (SISO) method and does not directly handle multivariable systems, strong nonlinearities, or long dead times, for which more advanced methods — model predictive control, cascade control, feedforward, and gain scheduling — are used.
Common mistakes
A common mistake is increasing all gains until the response looks fast on one test case, then discovering that noise, saturation, dead time, or operating-point changes make the loop unreliable. Another is enabling integral action without anti-windup on an actuator that frequently saturates. A good PID review states the process variable, manipulated variable, sample time, actuator limits, sensor filtering, controller form, tuning method, stability margins, and response under disturbances rather than only setpoint steps.