CD Discrete Transfer Function Function

Control Design VI and Function

CD Discrete Transfer Function Function

Owning Palette: Implementation VIs and Functions

Installed With: Control Design and Simulation Module

Implements a system model in discrete transfer function form. You define the system model by specifying the Numerator and Denominator of the transfer function equation.

Details  

Dialog Box Options
Block Diagram Inputs
Block Diagram Outputs
 Place on the block diagram  Find on the Functions palette

Dialog Box Options

ParameterDescription
Polymorphic instanceSpecifies whether this function is single-input single-output (SISO) or multiple-input multiple-output (MIMO). The default value is SISO.
FeedthroughConfigures the function to be either a Direct or Indirect feedthrough function. Enable this control by selecting a parameter from the Parameters list and then selecting Terminal from the Parameter source pull-down menu. If you select Configuration Dialog Box from the Parameter source pull-down menu, LabVIEW disables this control and calculates the feedthrough behavior automatically.

Refer to the Details section for a description of the parameters that determine the feedthrough behavior of this function.
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.
Transfer FunctionSpecifies the transfer function in terms of numerator and denominator polynomial functions.
  • Load Model—Loads model information from a data file.
  • Save Model—Saves model information to a data file. This file is compatible with the Control Design VIs and functions.
  • Copy to Clipboard—Copies the current model definition to the clipboard. From the clipboard, you can paste the model on the block diagram or into another configuration dialog box of the same model form.
  • Paste from Clipboard—Pastes model information from the clipboard to the configuration dialog box.
  • Model Dimensions—Use this section to specify the number of inputs and outputs of the system model. You also use this section to specify the input-output location of the equation you want to edit. This section is available only if you select MIMO from the Polymorphic instance pull-down menu.
    • Inputs—Specifies the number of model inputs.
    • Outputs—Specifies the number of model outputs.
  • Current Input—Specifies the current column of the Input-Output Model.
  • Current Output—Specifies the current row of the Input-Output Model.
  • Input-Output Model—Displays a graphical representation of the MIMO model. Click a cell to edit the equation at that input-output location. You also can use the Current Input and Current Output controls to specify the location of the equation you want to edit.
  • Numerator—Specifies the coefficients of the numerator polynomial function in ascending powers of z, where z is the z-transform variable. For MIMO models, Numerator applies to the equation that the Current Input and Current Output parameters specify.
  • Denominator—Specifies the coefficients of the denominator polynomial function in ascending powers of z, where z is the z-transform variable. For MIMO models, Denominator applies to the equation that the Current Input and Current Output parameters specify. For each equation, the order of the Denominator must be greater than or equal to the order of the Numerator.

Block Diagram Inputs

ParameterDescription
initializeSets the model state(s) to 0, when TRUE.
input u(k)Specifies the input to the system. input u(k) must be a vector of length m, where m is the number of inputs.
Transfer FunctionSpecifies a transfer function model. This input accepts either a block diagram constant or a model you created using Control Design VIs and functions.
error inDescribes error conditions that occur before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. If an error occurs while this VI or function runs, it runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.

Block Diagram Outputs

ParameterDescription
output y(k)Returns the current output of the system. This vector must be of length r, where r is the number of outputs.
error outContains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.

CD Discrete Transfer Function Details

For SISO models, this function uses the following equation to calculate the output:

For MIMO models, this function calculates the output as H = [Hij].

whereb0bm are the coefficients of the numerator polynomial
a0an are the coefficients of the denominator polynomial
m is the order of the numerator
n is the order of the denominator
z is the z-transform variable
i is the index number of the input
j is the index number of the output

Feedthrough Behavior

The values you specify for the Numerator and Denominator subparameters determine the feedthrough behavior of this function. Given m as the order of the Numerator and n as the order of the Denominator:

  • If n = m, all input/output pairs have direct feedthrough behavior.
  • If n > m, the input u(k) input has indirect feedthrough to the output y(k) output.
  • If n < m, LabVIEW returns an error.

When you use the configuration dialog box to configure n and m, LabVIEW verifies that the feedthrough behavior is correct. For example, if you set the Execution Mode parameter to Indirect, and you set n equal to m, LabVIEW changes the Execution Mode parameter to Direct.

If you define the transfer function programmatically, LabVIEW does not adjust the feedthrough behavior for you. You must ensure that you specify the proper feedthrough behavior for the orders of n and m you specify.