PID Controller


The PID-Controller is a combination of a proportional, derivative and integral controller.

The proportional term produces an output value that is proportional to the current error value. The derivative of the process error is calculated by determining the slope of the error over time and multiplying this rate of change by the derivative term. The contribution from the integral term is proportional to both the magnitude of the error and the duration of the error.

The idea is that you first set Ki value to zero and increase Kp until the signal oscillates then set the value of Kp to roughly half. Then increase Ki until any offset is corrected quickly enough for the process. Finally increase Kd if needed to ensure the controller is quick enough to reach the target value after a disturbance.