PID stands for Proportional, Integral, Derivative.  A PID loop is a process controller that takes a signal from a sensor, applies a mathematical formula, and outputs a control signal to the control device.

Let’s consider PID level control on a simple water tank with water being drawn out of it.  The sensor is the water level transmitter, and the control device is a control valve on the tank fill line.

P – Proportional (aka Gain): The control signal is proportional to the error between the sensor’s current state and the setpoint.  Essentially, the ‘P’ value only looks at how far we are from set point right now.  In or example, the proportional controller opens the control valve as the water level starts to drop.  The further the water tank level lowers, the more the ‘P’ value will open the control valve.  A ‘P’ controller alone will never operate at setpoint because the water level must fall in order for the valve to open.

I – Integral (summation): The sum of measured error over a time period.  The ‘I’ value is multiplied by the sum of error over time. The ‘I’ value will bring the sensor value to setpoint and hold it at a steady state.  Essentially, the ‘I’ value only looks at how far we have been from setpoint in history.  In our example, with a ‘P’ only controller, there is always a gap between water level and desired setpoint. The ‘I’ value will continue to open the valve more and more until the tank fills to setpoint, and then it will hold the valve at that setting.  If the tank overfills, the ‘I’ controller will begin to close the fill valve.

D – Derivative (Rate of change): The ‘D’ value is multiplied by rate of change of the sensor signal, helping to return the loop to the setpoint faster.  A ‘PI’ controller would have to measure error over time and recover.  By adding the ‘D’, the controller will see a change in sensor feedback and adjust.  Essentially, the ‘D’ value is predicting where the error will go in the future. If the error is rapidly increasing, the ‘D’ value will try to catch the error by applying a big correction. In our example, if the water level is quickly dropping, the rate of change is high, so the ‘D’ factor will open the fill valve to reduce the rate-of-change faster than with only a PI controller.