tf (Control Design and Simulation Module, MathScript Function)

LabView Control Design MathScript Functions

tf (Control Design and Simulation Module, MathScript Function)

Member of the construct class.

Syntax

SysOutTF = tf(K)

SysOutTF = tf(num_11, den_11)

SysOutTF = tf(num_11, den_11, Ts)

SysOutTF = tf(num_11, num_12, ..., num_ij, den_11, den_12, ..., den_ij, [r, m])

SysOutTF = tf(num_11, num_12, ..., num_ij, den_11, den_12, ..., den_ij, [r, m], Ts)

s = tf('s')

z = tf('z', Ts)

SysOutTF = tf(SysIn)

Description

Creates a continuous or discrete linear time-invariant (LTI) system model in transfer function form. You also can use this function to convert zero-pole-gain and state-space models to transfer function form.

Examples

Inputs

Name Description
K Specifies the gain. K is a real scalar or a real matrix, depending on whether you want to construct a single-input single-output (SISO) or multiple-input multiple-output (MIMO) model.
num_ij Specifies the coefficients of the numerator polynomial function, in descending order. The order of the numerator polynomial function must be less than or equal to the order of the denominator polynomial function. The coefficients you specify for the num_ij input apply to the transfer function equation at the i-th input and j-th output of a MIMO model. num_ij is either a real scalar or a real vector, depending on the number of coefficients you specify.
den_ij Specifies the coefficients of the denominator polynomial function, in descending order. The order of the denominator polynomial function must be greater than or equal to the order of the numerator polynomial function. The coefficients you specify for the den_ij input apply to the transfer function equation at the i-th input and j-th output of a MIMO model. den_ij is either a real scalar or a real vector, depending on the number of coefficients you specify.
r Specifies the number of outputs from the transfer function. r must be consistent with the number of numerator and denominator polynomial functions you specified. r is an integer scalar.
m Specifies the number of inputs to the transfer function. m must be consistent with the number of numerator and denominator polynomial functions you specified. m is an integer scalar.
Ts Specifies the discrete sampling time of the SysOutTF model. The default value is 0, which creates a continuous model. Specify a non-zero value to construct a discrete model. Ts is a real scalar.
SysIn Specifies the LTI model you want to convert to transfer function form.
's' Specifies that you want to create the continuous transfer function s/1. After you enter this command, you can use LabVIEW MathScript operands on this transfer function to define a zero-pole-gain or transfer function model. For example, after you enter s = tf('s'), entering SysOutZPK = 4*(s+2)/(s+1) constructs a zero-pole-gain model with a gain of 4, a zero at -2, and a pole at -1. You also can create a transfer function model. For example, entering SysOutTF = (3*(s*s*s)+2)/(4*(s*s*s*s)+8) constructs the transfer function model 3s^3+2/4s^4+8. 's' is a string constant.
'z' Specifies that you want to create the discrete transfer function z/1. The default sampling time Ts of this model is 1 second. After you enter this input, you can use LabVIEW MathScript operands on this transfer function to define a zero-pole-gain or transfer function model. 'z' is a string constant.

Outputs

Name Description
SysOutTF Returns a transfer function model with sampling time Ts. This model is SISO, single-input multiple-output (SIMO), multiple-input single-output (MISO), or MIMO, depending on the number of inputs and outputs you specify.

Examples

% Creates a continuous MISO transfer function modelnum_11 = 1
num_21 = 2
den_11 = [1, 1]
den_21 = [1, -1]
r = 1
m = 2
SysTF = tf(num_11, num_21, den_11, den_21, [r, m])
% Converts a zero-pole-gain model to transfer function form
z = 1
p = [1, -1]
k = 1
SysIn = zpk(z, p, k)
SysTF = tf(SysIn)
% Creates a discrete transfer function by adding and multiplying z/1 together
z = tf('z', 0.1)
SysOutTF = (9.9E-2*z+9.97)/(z*z-1.99*z+0.996)

Related Topics

ss
tfdata
zpk