A PID controller uses proportional, integral and derivative terms to minimize error over time between a measured process variable and desired setpoint. It continuously calculates an error value as the difference between the process variable and setpoint, and applies a correction based on proportional, integral and derivative terms for the error. The proportional term responds to current error, the integral term responds to accumulated historical error, and the derivative term responds to the rate of change of error. PID controllers are commonly used to control temperature, pressure, flow and other process variables due to their robustness and ability to achieve zero steady-state error.