PID controller
In short: A PID controller drives an actuator so that a measured value (for example a temperature) reaches a setpoint as quickly and calmly as possible.
In more detail: From the control error (setpoint minus measured value) it computes three terms and adds them: proportional, integral and derivative.
In Depth
- P term: Output proportional to the current error. Fast, but often leaves a lasting residual error.
- I term: Sums the error over time and so removes the residual error. Too strong makes it sluggish and oscillating (“integrator windup” with a limited actuator).
- D term: Reacts to the rate of change of the error and damps overshoot. It does amplify measurement noise, though.
- Formula:
u = Kp·e + Ki·∫e dt + Kd·de/dt. - Tuning: Rules of thumb such as Ziegler-Nichols, or trial and error: first Kp, then Kd, then Ki.
- Use: Heaters and thermostats, fan control from a temperature sensor, drones, cruise control, 3D-printer heated bed.
See also: State machine