Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

PID Lead-Lag VI

LabVIEW 8.6 PID Control Toolkit Help
June 2008

NI Part Number:
370401E-01

»View Product Info

Owning Palette: PID VIs

Installed With: PID Control Toolkit

Implements a PID controller with a lead/lag function, which is generally used as a dynamic compensator in feedforward control schemes. This VI uses a positional algorithm and is an approximation of a true exponential lead/lag. Use the DBL instance of this VI to implement a single control loop. Use the DBL Array instance to implement parallel multi-loop control.

Details  Example

Use the pull-down menu to select an instance of this VI.

PID Lead-Lag (DBL)

input specifies the input value.
tuning parameters specifies the tuning parameters.
gain specifies the DC gain. The default is 1. Setting gain to a negative value produces an inverting amplifier with an additional 180-degree phase shift.
lag time (min) specifies the phase lag in minutes. A value of zero turns off the lag.
lead time (min) specifies the phase lead in minutes. A value of zero turns off the lead. Large lead time (min) values might result in a wild oscillation of the output.
output range specifies the range to which to coerce the control output. The default range is –100 to 100.
output high specifies the maximum value of the controller output. The default is 100.
output low specifies the minimum value of the controller output. The default is –100.
dt (s) specifies the interval, in seconds, at which this VI is called. If dt (s) is less than or equal to zero, this VI uses an internal timer with a one millisecond resolution. The default is –1.
reinitialize? specifies whether to reinitialize the output to the current input value.
output returns the control output of the PID algorithm that is applied to the controlled process.
dt out (s) returns the actual time interval in seconds. dt out (s) returns either the value of dt (s) or the computed interval if you set dt (s) to –1.

PID Lead-Lag (DBL Array)

input specifies the input value.
tuning parameters specifies the tuning parameters.
gain specifies the DC gain. The default is 1. Setting gain to a negative value produces an inverting amplifier with an additional 180-degree phase shift.
lag time (min) specifies the phase lag in minutes. A value of zero turns off the lag.
lead time (min) specifies the phase lead in minutes. A value of zero turns off the lead. Large lead time (min) values might result in a wild oscillation of the output.
output range specifies the range to which to coerce the control output. The default range is –100 to 100.
output high specifies the maximum value of the controller output. The default is 100.
output low specifies the minimum value of the controller output. The default is –100.
dt (s) specifies the interval, in seconds, at which this VI is called. If dt (s) is less than or equal to zero, this VI uses an internal timer with a one millisecond resolution. The default is –1.
reinitialize? specifies whether to reinitialize the output to the current input value.
output  returns the control output of the PID algorithm that is applied to the controlled process. This VI determines the length of the output from the size of the input array.
dt out (s) returns the actual time interval in seconds. dt out (s) returns either the value of dt (s) or the computed interval if you set dt (s) to –1.

PID Lead-Lag Details

You can use the DBL Array instance of this polymorphic VI in multi-loop PID control applications. In this case, the length of the primary input array determines the length of the output array. Other input arrays do not necessarily need to be the same length as the primary input array. This VI resizes other input arrays to the same length as the primary input array as follows:

  • If the input array is longer than the primary input array, the input array is truncated to the length of the primary input array. Additional values in the array are not used.
  • If the input array is shorter than the primary input array, the last value of the input array is repeated until the size matches that of the primary input array.

In this manner, an input value that must be used for each output calculation does not need to be specified repeatedly in the array passed into this VI. Instead, the array can consist of a single value that is used for each output calculation.

Example

Refer to the Simulation - Cascade and Feedforward Surge Tank Level VI in the labview\examples\control\pid\prctrlex.llb for an example of using the PID Lead-Lag VI.


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit