control//feedback control//PID controller
A PID controller is the rule that runs most of the world's control loops: it reads the error between setpoint and measurement and sets the actuator from three terms, one proportional to the error now, one to the error accumulated so far, and one to how fast the error is changing. It needs no model of the plant, only three gains tuned on site, and that is why it holds temperatures, pressures, levels, flows, speeds and positions from chemical plants to drones.
A PID controller is the rule that runs most of the world's control loops: it reads the error between setpoint and measurement and sets the actuator from three terms, one proportional to the error now, one to the error accumulated so far, and one to how fast the error is changing. It needs no model of the plant, only three gains tuned on site, and that is why it holds temperatures, pressures, levels, flows, speeds and positions from chemical plants to drones.
u(t)=Kp e(t)+Ki∫0te(s) ds+Kd dedtu(t)=K_p\,e(t)+K_i\int_0^t e(s)\,ds+K_d\,\frac{de}{dt}u(t)=Kpe(t)+Ki∫0te(s)ds+Kddtde
The proportional term pushes harder the farther the output is from the setpoint, but on its own it leaves a residual error under any steady load, because some error is needed to produce the push. The integral term grows for as long as any error remains, and so removes that residual. The derivative term reacts to the trend and brakes the approach, which allows higher gains with less overshoot. Each has its own note: proportional action, integral action, derivative action.
overshoot8 % settling, 2 %3.0 s steady error0.000 A setpoint step from 0 to 1 at 1 s, followed by a plant with two lags and a short dead time. With kp 2.00, ki 1.50 and kd 0.30 the output overshoots the setpoint by 8 %, settles within 2 % in 3.0 s and leaves an error of 0.000.
Start from P only and raise KpK_pKp: the response gets faster, overshoots, and still stops short of the setpoint. Add KiK_iKi and the gap closes, at the cost of more overshoot; add KdK_dKd and the swing calms down. Too hot pushes the gains until the loop oscillates. Turn the load on to see what the integral part is for: it climbs until it carries the extra command alone.
Most loops are PI. The derivative term amplifies measurement noise and is often switched off; it is kept for slow plants with a clear lag, such as temperatures, and for mechanical systems where it provides the damping.
Industry quotes the gains under other names: the proportional gain as a proportional band, PB=100/KpPB=100/K_pPB=100/Kp in percent; the integral as a reset time TiT_iTi, with Ki=Kp/TiK_i=K_p/T_iKi=Kp/Ti; the derivative as a rate time TdT_dTd, with Kd=KpTdK_d=K_pT_dKd=KpTd. Written with TiT_iTi and TdT_dTd the controller is in its standard form, written with three independent gains in its parallel form, and tunings copied between vendors must be converted or they are lost.
Choosing the three gains is PID tuning. Running the controller on a processor, with a fixed sample time, a filtered derivative and protection against integral windup, is PID implementation.
Its limits are those of a single error. A PID cannot anticipate a measured disturbance (feedforward does), cannot coordinate several coupled variables, and cannot be faster than the plant's dead time allows; those are the cases for state feedback and optimal control.