← back to Control Theory

PID Control

Wikipedia · wpPID controller · CC BY-SA 4.0

The PID controller computes three terms from the error signal: proportional (present), integral (past), derivative (future). Tuning the three gains trades off speed, stability, and steady-state accuracy. Most industrial controllers are PID.

The three terms

P (proportional): output proportional to the current error. Large error, large correction. But P alone leaves a steady-state offset: the system settles near but not at the setpoint. I (integral): output proportional to the accumulated error over time. Eliminates the offset but can cause overshoot and oscillation. D (derivative): output proportional to the rate of change of error. Damps oscillation by anticipating where the error is heading. Too much D amplifies noise.

t y setpoint P only (offset) PI (oscillation) PID (smooth)

Ziegler-Nichols tuning

Set I and D gains to zero. Increase the P gain until the system oscillates with constant amplitude. Record this ultimate gain Ku and the oscillation period Tu. Then set: Kp = 0.6*Ku, Ki = 2*Kp/Tu, Kd = Kp*Tu/8. This is a starting point, not an optimal solution. It often produces aggressive response that needs manual refinement.

Simulate a PID controller

Scheme
Neighbors