LabVIEW Control Design and Simulation Module

PID Function

  • Updated2023-03-14
  • 8 minute(s) read

Owning Palette: Continuous Linear Systems Functions

Requires: Control Design and Simulation Module

Constructs a PID model in transfer function form.

Details  

Dialog Box Options
Block Diagram Inputs
Block Diagram Outputs

Dialog Box Options

ParameterDescription
Polymorphic instanceSpecifies the form this function uses to construct the PID model. You can select Academic, Parallel, or Series. The default is Academic.
ParametersLists all the parameters associated with this function. Select a parameter from this list to configure the parameter. When you select a parameter, the parameter and its associated Parameter source control appear in the Parameter Information section of the configuration dialog box.
PreviewDisplays a graphical preview, if available, of the function output or configuration.
Parameter InformationContains the parameters you can configure for this function. You must select a parameter from the Parameters list to make that parameter and its associated Parameter source control visible in the Parameter Information section of the configuration dialog box.
Parameter sourceSpecifies whether you configure this parameter using the Configuration Dialog Box or a Terminal on the simulation diagram. The default value is Configuration Dialog Box. If you select Terminal, LabVIEW displays an input for that parameter on the simulation diagram, and you can wire values to that input to configure this function programmatically. If you select Configuration Dialog Box, LabVIEW removes that input from the simulation diagram. You then must set the value for this parameter inside the configuration dialog box.
Proportional Gain (Kc)Represents the proportional gain of the controller. In the equation that defines the PID Academic form, Kc represents the proportional gain. The default is 1. This option appears if you set Polymorphic instance to Academic.
Proportional GainRepresents the proportional gain of the controller. In the equation that defines the PID Parallel form, KP represents the proportional gain. The default is 1. This option appears if you set Polymorphic instance to Parallel.
Proportional Gain (KC)Represents the proportional gain of the controller. In the equation that defines the PID Series form, KC represents the proportional gain. The default is 1. This option appears if you set Polymorphic instance to Series.
Integral time [s] (Ti)The controller parameter that adjusts the effect of the error integral term E(s)/s on the controller output U(s). In the equation that defines the PID Academic form, Ti represents the integral time. The default is 1. This option appears if you set Polymorphic instance to Academic.
Integral GainThe controller parameter that adjusts the effect of the error integral term E(s)/s on the controller output U(s). In the equation that defines the PID Parallel form, Ki represents the integral gain. The default is 1. This option appears if you set Polymorphic instance to Parallel.
Integral Time [s] (TI)The controller parameter that adjusts the effect of the error integral term E(s)/s on the controller output U(s). In the equation that defines the PID Series form, TI represents the integral time. The default is 1. This option appears if you set Polymorphic instance to Series.
Derivative time [s] (Td)The controller parameter that adjusts the effect of the error derivative term sE(s) on the controller output U(s). In the equation that defines the PID Academic form, Td represents the derivative time. The default is 1. The default PID Academic controller does not use derivative time. This option appears if you set Polymorphic instance to Academic.
Derivative GainThe controller parameter that adjusts the effect of the error derivative term sE(s) on the controller output U(s). In the equation that defines the PID Parallel form, Kd represents the derivative gain. The default is 1. This option appears if you set Polymorphic instance to Parallel.
Derivative Time [s] (TD)The controller parameter that adjusts the effect of the error derivative term sE(s) on the controller output U(s). In the equation that defines the PID Series form, TD represents the derivative time. The default is 1. The default PID Series controller does not use derivative time. This option appears if you set Polymorphic instance to Series.
High Frequency [s] (Tf)The low pass filter time constant Tf this VI uses to make the PID model a proper system. The default is 1.
Execution ControlContains the following options:
  • Execution Control—Specifies the execution behavior of the subsystem. You can select from the following options:
    • Normal—(Default) Executes the subsystem without checking for an enabled state or waiting for a trigger.
    • Enable—Checks the value wired to the Enable block diagram input before executing the subsystem. The Enable block diagram input appears on the function when you select this option.
    • Trigger—Waits for a trigger from the Trigger block diagram input of the Trigger Type you specify before executing the subsystem. The Trigger block diagram input appears when you select this option.
    • Enable And Trigger—Checks the value wired to the Enable block diagram input and waits for a trigger from the Trigger block diagram input of the Trigger Type you specify before executing the subsystem. The Enable and Trigger block diagram inputs appear when you select this option.
  • Trigger Type—Specifies when to trigger the execution of the subsystem. Set Execution Control to Trigger or Enable And Trigger to enable this option. You can select from the following options:
    • Rising—Executes the subsystem when the Trigger signal crosses 0 on a positive slope.
    • Falling—Executes the subsystem when the Trigger signal crosses 0 on a negative slope.
    • Either—(Default) Executes the subsystem when the Trigger signal crosses 0 on a positive or negative slope.
    • None—Does not specify a trigger.
  • Trigger Offset—Specifies the offset from 0 that the subsystem uses when looking for a zero crossing. The default is 0. Set Execution Control to Trigger or Enable And Trigger to enable this pull-down menu.
  • Hold Previous Output—Indicates the outputs of the subsystem that hold their last known values when the subsystem does not execute. Outputs appear in this list when you set their Disabled Behavior to Hold. Select an output under Execution Control in the Parameters list to configure its Disabled Behavior.
  • Reset to Initial Output—Indicates the outputs of the subsystem that reset to their initial values when the subsystem does not execute. Outputs appear in this list when you set their Disabled Behavior to Reset. Select an output under Execution Control in the Parameters list to configure its Disabled Behavior.
OutputContains the following options:
  • Disabled Behavior—Specifies the behavior of an output of a subsystem when the subsystem does not execute. Select an output under Execution Control in the Parameters list to display this option. You can select from the following options:
    • Hold—(Default) Holds the output value to its last known value.
    • Reset—Resets the output value to its initial value.
  • Use Configured Default Value—Specifies to use the output value you specify for the value of the subsystem output value. If you set Disabled Behavior to Reset, the subsystem always outputs this value when disabled. If you set Disabled Behavior to Hold, the subsystem outputs this value only on its first execution.
  • Output—Specifies the initial value to use for the output value of the subsystem. Place a checkmark in the Use Configured Default Value checkbox to enable this option.

Block Diagram Inputs

ParameterDescription
Proportional Gain (Kc)Represents the proportional gain of the controller. In the equation that defines the PID Academic form, Kc represents the proportional gain. The default is 1. This option appears if you set Polymorphic instance to Academic.
Proportional GainRepresents the proportional gain of the controller. In the equation that defines the PID Parallel form, KP represents the proportional gain. The default is 1. This option appears if you set Polymorphic instance to Parallel.
Proportional Gain (KC)Represents the proportional gain of the controller. In the equation that defines the PID Series form, KC represents the proportional gain. The default is 1. This option appears if you set Polymorphic instance to Series.
Integral time [s] (Ti)The controller parameter that adjusts the effect of the error integral term E(s)/s on the controller output U(s). In the equation that defines the PID Academic form, Ti represents the integral time. The default is 1. This option appears if you set Polymorphic instance to Academic.
Integral GainThe controller parameter that adjusts the effect of the error integral term E(s)/s on the controller output U(s). In the equation that defines the PID Parallel form, Ki represents the integral gain. The default is 1. This option appears if you set Polymorphic instance to Parallel.
Integral Time [s] (TI)The controller parameter that adjusts the effect of the error integral term E(s)/s on the controller output U(s). In the equation that defines the PID Series form, TI represents the integral time. The default is 1. This option appears if you set Polymorphic instance to Series.
Derivative time [s] (Td)The controller parameter that adjusts the effect of the error derivative term sE(s) on the controller output U(s). In the equation that defines the PID Academic form, Td represents the derivative time. The default is 1. The default PID Academic controller does not use derivative time. This option appears if you set Polymorphic instance to Academic.
Derivative GainThe controller parameter that adjusts the effect of the error derivative term sE(s) on the controller output U(s). In the equation that defines the PID Parallel form, Kd represents the derivative gain. The default is 1. This option appears if you set Polymorphic instance to Parallel.
Derivative Time [s] (TD)The controller parameter that adjusts the effect of the error derivative term sE(s) on the controller output U(s). In the equation that defines the PID Series form, TD represents the derivative time. The default is 1. The default PID Series controller does not use derivative time. This option appears if you set Polymorphic instance to Series.
High Frequency [s] (Tf)The low pass filter time constant Tf this VI uses to make the PID model a proper system. The default is 1.
TriggerSpecifies the trigger signal the subsystem checks for a zero crossing before executing. In the configuration dialog box, set Execution Control to Trigger or Enable And Trigger to display this input.
EnableSpecifies whether the subsystem is enabled. In the configuration dialog box, set Execution Control to Enable or Enable And Trigger to display this input.
ErrorSpecifies the initial value to use for the Output value. The default is 0.

Block Diagram Outputs

ParameterDescription
OutputReturns the result of the calculation from the controller.

PID Details

This function constructs transfer function models in the following forms:

PID Academic

PID Parallel

Refer to the book Digital Control Systems for more information about bilinear-transformation integration.

PID Series

Log in to get a better experience