PID Gain Schedule (DBL Array) VI
- Updated2025-07-30
- 4 minute(s) read
Selects a set of PID gains from a gain schedule for the control of processes that require different sets of gains for different regions of operation, such as highly nonlinear processes. Use the DBL instance of this VI to implement a single control loop. Use the DBL Array instance to implement parallel multi-loop control.

Inputs/Outputs
gain scheduling value
—
gain scheduling value specifies the current input value to use to select PID gains from the gain schedule.
PID gain schedule
—
PID gain schedule specifies the gain schedule for the proportional, integral, and derivative gain parameters. Specify the maximum values for the PID gain schedule in ascending order. This VI uses the first set of PID gains in the array for all gain scheduling values less than the corresponding maximum value. If you define a maximum setpoint value and the actual setpoint rises above that value, this VI continues to behave as if the maximum setpoint value were still in effect.
index out
—
index out returns the indexes of the elements in the PID gain schedule array corresponding to each element of the PID gains out output array.
PID gains out
—
PID gains out returns the current PID gains from the gain schedule.
|
You can use the DBL Array instance of this polymorphic VI in multi-loop PID control applications. In this case, the length of the gain scheduling value input determines the length of the output array. Other input arrays do not necessarily need to be the same length as the gain scheduling value input. This VI resizes other input arrays to the same length as the gain scheduling value input as follows:
- If the input array is longer than the gain scheduling value input, the input array is truncated to the length of the gain scheduling value input. Additional values in the array are not used.
- If the input array is shorter than the gain scheduling value input, the last value of the input array is repeated until the size matches that of the gain scheduling value input.
In this manner, an input value that should 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.
Examples
Refer to the following example files included with LabVIEW.
- labview\examples\control\PID\Gain Scheduling Simulator.vi
gain scheduling value
—
PID gain schedule
—
PID gains
—
proportional gain (Kc)
—
index out
—
PID gains out
—
proportional gain (Kc)
—