tf
Transfer function model
Description
Use tf
to create real-valued or complex-valued transfer
function models, or to convert dynamic system
models to transfer function form.
Transfer functions are a frequency-domain representation of linear time-invariant
systems. For instance, consider a continuous-time SISO dynamic system represented by the
transfer function sys(s) = N(s)/D(s)
, where s = jw
and N(s)
and D(s)
are called the numerator and
denominator polynomials, respectively. The tf
model object can
represent SISO or MIMO transfer functions in continuous time or discrete time.
You can create a transfer function model object either by specifying its coefficients
directly, or by converting a model of another type (such as a state-space model
ss
) to transfer-function form. For more information, see Transfer Functions.
You can also use tf
to create generalized state-space (genss
) models or uncertain state-space (uss
(Robust Control Toolbox)) models.
Creation
Syntax
Description
Create Transfer Function Model
creates a continuous-time transfer function model, setting the
sys
= tf(numerator
,denominator
)Numerator
and Denominator
properties. For instance, consider a continuous-time SISO dynamic system
represented by the transfer function sys(s) = N(s)/D(s)
,
the input arguments numerator
and
denominator
are the coefficients of
N(s)
and D(s)
,
respectively.
creates a discrete-time transfer function model, setting the
sys
= tf(numerator
,denominator
,ts
)Numerator
, Denominator
, and
Ts
properties. For instance, consider a
discrete-time SISO dynamic system represented by the transfer function
sys(z) = N(z)/D(z)
, the input arguments
numerator
and denominator
are
the coefficients of N(z)
and D(z)
,
respectively. To leave the sample time unspecified, set
ts
input argument to -1
.
creates a transfer function model with properties inherited from the dynamic
system model sys
= tf(numerator
,denominator
,ltiSys
)ltiSys
, including the sample time.
sets properties of the transfer function model using one or more property
name-value arguments for any of the previous input-argument
combinations.sys
= tf(___,PropertyName=Value
)
Convert To Transfer Function Model
obtains a truncated transfer function representation of the sparse model
sys
= tf(ltiSys
,Name=Value
)ltiSys
by computing zeros and poles based on one or
more specified name-value arguments. Because this method calculates zeros
for each input-output pair, it is most suitable for models with small
input-output sizes. (since R2025a)
Create Variable for Rational Expression
s = tf('s')
creates special variable
s
that you can use in a rational expression to create
a continuous-time transfer function model. Using a rational expression can
sometimes be easier and more intuitive than specifying polynomial
coefficients.
Input Arguments
Name-Value Arguments
Output Arguments
Properties
Object Functions
The following lists contain a representative subset of the functions you can use with
tf
models. In general, any function applicable to Dynamic System Models
is applicable to a tf
object.
Examples
Limitations
Transfer function models are ill-suited for numerical computations. Once created, convert them to state-space form before combining them with other models or performing model transformations. You can then convert the resulting models back to transfer function form for inspection purposes
An identified nonlinear model cannot be directly converted into a transfer function model using
tf
. To obtain a transfer function model:Convert the nonlinear identified model to an identified LTI model using
linapp
(System Identification Toolbox),idnlarx/linearize
(System Identification Toolbox), oridnlhw/linearize
(System Identification Toolbox).Then, convert the resulting model to a transfer function model using
tf
.
Algorithms
To convert sparse models, tf
uses the Krylov--Schur algorithm [1] for
inverse power iterations to compute poles and zeros in the specified frequency
band.
References
[1] Stewart, G. W. “A Krylov--Schur Algorithm for Large Eigenproblems.” SIAM Journal on Matrix Analysis and Applications 23, no. 3 (January 2002): 601–14. https://doi.org/10.1137/S0895479800371529.