
© National Instruments Corporation 2-1 LabWindows/CVI PID Control Toolkit User Manual
2
PID AlgorithmsThis chapter explains the fast PID, precise PID, and autotuning algorithms.
The PID Algorithm
The PID controller compares the setpoint (SP) to the process variable (PV) to obtain the error
(e), as follows:
e = SP – PV
Then the PID controller calculates the controller action, u(t), as follows. In this equation, Kc
is the controller gain.
If the error and the controller output have the same range, –100% to 100%, controller gain is
the reciprocal of proportional band. Ti is the integral time in minutes, also called the reset
time, and Td is the derivative time in minutes, also called the rate time. The following formula
represents the proportional action.
The following formula represents the integral action.
The following formula represents the derivative action.
ut() Kce1
Ti
---- etd
0
t
∫Td
de
dt
------
++
⎝⎠
⎜⎟
⎜⎟
⎛⎞
=
upt() Kce=
u
I t() = Kc
Ti
------- etd
0
t
∫
uDt() KcTd
de
dt
-------
=