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 Ti and Td 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,
aco ntroller 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 uk() umax then uk() umax
=≥
if uk() uminthen uk() umin
=≤
ut() KcSP PV–() 1
Ti
---- (SP PV)dt Td
dPVf
dt
------------
––
0
t
∫+=