Feedback loops are key elements to the control of a system's behavior, and are used in a variety of areas including optics and photonics, nanotechnology and materials science, quantum technologies, scanning probe microscopy, and sensing. Taking advantage of closed-loop operation makes it possible to accelerate transient processes, reduce the impact of disturbances on the system and tune its steady-state behavior.
The PID controller first compares the system's output with a user-defined setpoint and generates an error signal. It then tries to minimize this error signal by adjusting its output, which in turn drives the system. This driving signal is obtained by adding three terms calculated separately from the error signal: the terms are referred to as proportional (P), integral (I) and derivative (D), and each has its own gain.