National Instruments 371685C-01 用户手册

下载
页码 39
Chapter 3
Using the PID Control Toolkit
© National Instruments Corporation
3-7
If you are using LabWindows/CVI 8.0 and later, click Add Additional Module in the 
Drivers & Components tab of the Edit Installer dialog box. In the Select Merge Module 
dialog box, browse to and select 
CVIPIDRuntime.msm
. For additional information about 
distributing LabWindows/CVI applications, refer to the LabWindows/CVI Help.
Using PID with Gain Scheduling
Most processes are non-linear. Therefore, PID parameters that produce a desired response at 
one operating point might not produce a satisfactory response at another operating point. 
Using the gain scheduling feature, you can apply different sets of PID parameters for different 
regions of controller operation.
The gain scheduler selects and outputs one set of PID gains from a gain schedule based on the 
current gain scheduling value. The gain scheduling value input can be anything and is based 
on the gain scheduling criteria that you set. 
Use the 
pidGSAttrGainScheduleCriteria
 attribute to set the gain scheduling criteria. 
Call 
PidSetGainScheduleAttribute
 and 
PidGetGainScheduleAttribute
 to set and 
get gain scheduling attributes. The 
pidGSAttrGainScheduleCriteria
 attribute can take 
the following values:
Setpoint
Process variable
Controller output
Gain schedule variable provided by the user through the 
pidGSAttrUserGainScheduleVariable
 attribute
The gain schedule is a list of gain sets. A gain set consists of the following features:
Proportional gain (K
c
)
Integral time (T
i
)
Derivative time (T
d
)
Gain control value   
The PID Library uses the gain set that has the smallest control value that is greater than the 
value of the signal specified by the gain schedule criteria. For example, if three gain sets have 
control values equal to 10, 20, and 30 and the value of the signal specified by the gain schedule 
criteria is 15, then the second gain set is used.
If the value of the signal specified by the gain schedule criteria is greater than the gain 
schedule's largest control value, then the gain set with the largest control value is used. You 
also can set 
pidGSAttrSelectionMode
 to 
pidManual
 to allow you to set the gain sets 
manually. By default, the mode is automatic.