LabVIEW Control Design and Simulation Module

set (MathScript RT Module Function)

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

set (MathScript RT Module Function)

Owning Class: info

Requires: Control Design and Simulation Module and MathScript RT Module

Syntax

SysOut = set(SysIn, infotype, infoval)

SysOut = set(SysIn, infotype_1, infoval_1, ..., infotype_n, infoval_n)

Description

Sets information to a linear time-invariant (LTI) system model. You can set numerator and denominator coefficient values to transfer function models. You can set zero and pole locations, as well as a gain value, to zero-pole-gain models. You can set A, B, C, and D matrices to state-space models. You can set delay information and sampling time to all model forms. You can set more than one information type and value simultaneously.

Examples

Inputs

Name Description
SysIn Specifies an LTI model in transfer function, zero-pole-gain, or state-space form.
infotype_n Specifies the type of information you want to set to the SysIn model. You can specify more than one information type at a time. infotype is a string that can take the following values:

'num' Specifies that you want to set the numerator polynomial coefficients of the SysIn model. This option is valid only when the SysIn model is in transfer function form.
'den' Specifies that you want to set the denominator polynomial coefficients of the SysIn model. This option is valid only when the SysIn model is in transfer function form.
'z' Specifies that you want to set the locations of the zeros of the SysIn model. This option is valid only when the SysIn model is in zero-pole-gain form.
'p' Specifies that you want to set the locations of the poles of the SysIn model. This option is valid only when the SysIn model is in zero-pole-gain form.
'k' Specifies that you want to set the feedback gain the SysIn model. This option is valid only when the SysIn model is in zero-pole-gain form.
'a' Specifies that you want to set the state matrix of the SysIn model. This option is valid only when the SysIn model is in state-space form.
'b' Specifies that you want to set the input matrix of the SysIn model. This option is valid only when the SysIn model is in state-space form.
'c' Specifies that you want to set the output matrix of the SysIn model. This option is valid only when the SysIn model is in state-space form.
'd' Specifies that you want to set the direct transmission matrix of the SysIn model. This option is valid only when the SysIn model is in state-space form.
'ts' Specifies that you want to set the sampling time of the SysIn model.
'inputdelay' Specifies that you want to set the input delay of the SysIn model.
'outputdelay' Specifies that you want to set the output delay of the SysIn model.
'iodelay' or 'transdelay' Specifies that you want to set the transport delay, or the delay between the inputs and outputs of the SysIn model.
infoval_n Specifies the value of the information you want to set to the SysIn model. You can specify more than one value simultaneously. The data type of the infoval input depends on the value you specify for the infotype input.

If infotype is 'num', 'den', 'b', 'c', or 'd', infoval is a real scalar or real vector, depending on the number of elements you specify.

If infotype is 'z' or 'p', infoval is a complex vector.

If infotype is 'a' or 'k', 'infoval' is a real scalar or real matrix, depending on the number of inputs, outputs, or states of the model.

If infotype is 'ts', infoval is a real scalar.

If infotype is 'inputdelay', infoval is a real vector whose i-th element corresponds to the delay of the i-th input to the SysIn model.

If infotype is 'outputdelay', infoval is a real vector whose j-th element corresponds to the delay of the j-th output from the SysIn model.

If infotype is 'iodelay' or 'transdelay', infoval is a real matrix whose ij-th element corresponds to the delay between the i-th input and the j-th output of the SysIn model.

Outputs

Name Description
SysOut Returns an LTI model with the information and value(s) you specified in the infotype and infoval inputs. SysOut is a model in transfer function, zero-pole-gain, or state-space form.

Details

The following table lists the support characteristics of this function.

Supported in the LabVIEW Run-Time Engine Yes
Supported on RT targets Yes
Suitable for bounded execution times on RT Not characterized

Examples

SysIn = tf(1, [0.2, 4])
SysOut = set(SysIn, 'num', [.05, 3], 'inputdelay', 0.8, 'ts', 0.1)
SysIn = ss(1, 1, 1, 0, 0.1)
SysOut = set(SysIn, 'c', 5)

Related Topics

get
is_delayed
pade
delay_to_z