PID Algorithms
- Mise à jour2025-04-04
- Temps de lecture : 3 minute(s)
The following equations describe the basic PID algorithm. This section also provides information about how the PID VIs implement this algorithm, as well as the advanced PID algorithm.
Basic PID Controller
The following simulation diagram represents the basic PID (Proportional-Integral-Derivative) controller:
Error Calculation (e)
A PID controller compares the setpoint SP to the process variable PV to obtain the error e, as follows:
where | e is the error |
SP is the setpoint | |
PV is the process variable |
Controller Action (u(t))
The PID controller calculates the controller action, u(t) as follows:
where | Kc is controller gain |
Ti is the integral time in minutes, also called the reset time | |
Td is the derivative time in minutes, also called the rate time |
This equation involves three actions that simultaneously apply to the output of the controller:
Proportional Action (P)
Proportional action P is proportional to the error e. This term defines how quickly the controller must respond to changes in the error. The following formula represents the proportional action:
Integral Action (I)
Integral action I is proportional to the integral of the error e. This term is generally used to correct steady-state error and to avoid disturbances in the system. The following formula represents the integral action:
Derivative Action (D)
Derivative action D is proportional to the derivative of the error e. This term works as a brake to the response, avoiding the system to overshoot. The following formula represents the derivative action: