Chapter 2
PID Algorithms
©
National Instruments Corporation
2-3
LabWindows/CVI PID Control Toolkit User Manual
Output Limiting
The actual controller output is limited to the range specified for control output, as follows:
and
The following formula shows the practical model of the PID controller.
The PID functions use an integral sum correction algorithm that facilitates anti-windup and
bumpless manual-to-automatic transfers. Windup occurs at the upper limit of the controller
output, for example, 100%. When the error (
e
) decreases, the controller output decreases,
moving out of the windup area. The integral sum correction algorithm prevents abrupt
controller output changes when you switch from manual to automatic mode or change any
other parameters.
The default ranges for the SP, PV, and output parameters correspond to percentage values;
however, you can use actual engineering units. If you use engineering units, you must adjust
the corresponding ranges accordingly. The
T
i
and
T
d
parameters are specified in minutes.
In manual mode, you can change the manual input to increase or decrease the output.
All the PID control functions are reentrant. Multiple calls from high-level functions use
separate and distinct data.
Note
As a general rule, manually drive the PV until it meets or comes close to the SP
before you perform the manual-to-automatic transfer.
Gain Scheduling
Gain scheduling refers to a system in which you change controller parameters based on
measured operating conditions. For example, the scheduling variable can be the SP, the PV,
a controller output, or an external signal. For historical reasons, the term gain scheduling is
used even if other parameters, such as the derivative time or integral time parameters, change.
Gain scheduling effectively controls a system whose dynamics change with the operating
conditions.
if
u k
( )
u
max
then
u k
( )
u
max
=
≥
if
u k
( )
u
min
then
u k
( )
u
min
=
≤
u t
( )
K
c
SP PV
–
(
)
1
T
i
----
(
SP PV
)
dt T
d
dPV
f
dt
------------
–
–
0
t
∫
+
=