# TransferFunctionModel

represents the model of the transfer-function matrix m with complex variable s.

TransferFunctionModel[{num,den},s]

specifies the numerator num and denominator den of a transfer-function model.

TransferFunctionModel[{z,p,g},s]

specifies the zeros z, poles p, and gain g of a transfer-function model.

gives the transfer-function model of the systems model sys.

# Details and Options • TransferFunctionModel can represent scalar and multivariate systems in continuous or discrete time.
• Time delays can be included in any transfer-function model, by using SystemsModelDelay.
• In TransferFunctionModel[{num,den},s], num must be a matrix, and den can be specified as a matrix or just the common denominator.
• TransferFunctionModel does not cancel any pole or zero of the matrix elements.
• In , the following systems can be converted:
•  AffineStateSpaceModel approximate Taylor conversion NonlinearStateSpaceModel approximate Taylor conversion StateSpaceModel exact conversion
• The following options can be given:
•  Method Automatic the method to obtain the transfer function of a state-space model SamplingPeriod Automatic the sampling period of the system SystemsModelLabels Automatic labels for the input and output variables
• Settings for the Method option include "DeterminantExpansion", "ResolventIdentities", "Inverse", and "Generic". With a setting , the transfer-function model is computed using determinant expansion.

# Examples

open allclose all

## Basic Examples(5)

A single-input, single-output system:

A system with two inputs and one output:

Obtain the transfer-function representation of a state-space model:

A discrete-time transfer function with a sampling period of 1:

Evaluate a transfer function over a range of frequencies:

Plot the magnitudes:

## Scope(22)

A first-order continuous-time system:

A second-order system:

A fifth-order system:

A system with three zeros and six poles:

A first-order discrete-time system:

A second-order discrete-time system with symbolic sampling period:

A two-input, one-output system:

A one-input, two-output system:

A two-input, two-output system:

Specify a transfer function using its numerator and denominator:

A MIMO transfer function specified in terms of its numerators and denominators:

A denominator polynomial that is the least common multiple:

Specifying the numerators and denominators avoids pole-zero cancellations:

Alternatively, use Unevaluated:

Specify the transfer function, using its algebraic poles, zeros, and gains:

A multivariable system:

A constant gain of 10:

A discrete-time gain:

A symbolic gain:

An improper transfer function:

A continuous-time transfer function with an exponential:

An equivalent representation using SystemsModelDelay:

The transfer-function representation of a state-space model:

The default complex variable for continuous-time systems is s:

For discrete-time systems, it is z:

Taylor linearize an AffineStateSpaceModel and obtain its transfer function representation:

The linearization of an AffineStateSpaceModel with nonzero equilibrium values:

Taylor linearize a NonlinearStateSpaceModel:

## Generalizations & Extensions(2)

SISO systems can also be specified as a single-element list:

Or just as a rational function:

A single-output system can be given as a list:

## Options(4)

### SamplingPeriod(3)

Specify a continuous-time system:

A discrete-time system with sampling period 1:

A system with a symbolic sampling period:

Set the sampling period to a numeric value:

### SystemsModelLabels(1)

Label the input and output variables:

## Applications(18)

A proportional-integral (PI) controller:

A proportional-derivative (PD) controller:

A function to construct a proportional-integral-derivative (PID) controller:

A PID with specific gain values:

A function to construct a discrete-time PID controller:

A function for a continuous-time lead compensator:

A lead compensator for specific values of gain and pole-zero locations:

A function for a continuous-time lag compensator:

A specific lag compensator:

A digital lag compensator defined in terms of its zero and pole locations:

A general formula for analog lowpass Butterworth filters:

Filters of specific orders:

A third-order Bessel filter:

The general second-order transfer function:

Variations in damping ratio lead to qualitatively different responses:

A linearized inverted pendulum model:

A spring-mass-damper system: Transfer function between the input voltage and the shaft angular position of a DC motor:

The aileron-to-roll-rate transfer function of an aircraft: A temperature-controlled chemical reactor:

An RLC circuit: A MIMO transfer function describing an aircraft's longitudinal dynamics:

A ball mill grinding system with delay due to material transport:

## Properties & Relations(8)

TransferFunctionModel behaves as a pure function of one argument:

The value of the transfer-function matrix at a specific frequency:

The values at several frequencies:

Use TransferFunctionFactor to obtain the factored form:

Obtain the expanded form:

Use TransferFunctionCancel to cancel any common poles and zeros:

Collect terms with similar powers:

Collect terms in any variable:

Find the element zeros and poles of a transfer-function matrix:

Obtain a state-space form of a transfer-function model:

## Possible Issues(3)

In TransferFunctionModel[m,var], pole-zero pairs may cancel before being processed:

Use Unevaluated to prevent cancellations:

Or use TransferFunctionModel[{num,den},var]:

Or TransferFunctionModel[{z,p,g},var]:

TransferFunctionModel[m,var] might result in a system with higher order:

Simplify the system:

Or simplify m before passing it to TransferFunctionModel:

If the complex variable var is not specified, it is assumed to be s for continuous-time systems: Specify the transfer function using s:

For discrete-time systems, use z: