0% found this document useful (0 votes)
75 views

MATLAB Functions

This document provides summaries of various MATLAB functions for working with linear time-invariant (LTI) systems. ZPK creates zero-pole-gain models or converts models to this format. TF creates transfer functions or converts models to this format. TFDATA quickly accesses transfer function data. TF2SS converts transfer functions to state-space models. FEEDBACK computes feedback connections of LTI models. SS creates or converts models to state-space format. DLINMOD obtains linear models from systems of ODEs or discrete-time systems. C2D converts continuous-time models to discrete-time models.

Uploaded by

Etsup
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
75 views

MATLAB Functions

This document provides summaries of various MATLAB functions for working with linear time-invariant (LTI) systems. ZPK creates zero-pole-gain models or converts models to this format. TF creates transfer functions or converts models to this format. TFDATA quickly accesses transfer function data. TF2SS converts transfer functions to state-space models. FEEDBACK computes feedback connections of LTI models. SS creates or converts models to state-space format. DLINMOD obtains linear models from systems of ODEs or discrete-time systems. C2D converts continuous-time models to discrete-time models.

Uploaded by

Etsup
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

MATLAB® FUNCTIONS

ZPK Create zero-pole-gain models or convert to zero-pole-gain format.


Creation:
SYS = ZPK(Z,P,K) creates a continuous-time zero-pole-gain (ZPK)
model SYS with zeros Z, poles P, and gains K. The output SYS is
a ZPK object.

SYS = ZPK(Z,P,K,Ts) creates a discrete-time ZPK model with sample


time Ts (set Ts=-1 if the sample time is undetermined).

TF Creation of transfer functions or conversion to transfer function.


Creation:
SYS = TF(NUM,DEN) creates a continuous-time transfer function SYS with
numerator(s) NUM and denominator(s) DEN. The output SYS is a TF object.

SYS = TF(NUM,DEN,TS) creates a discrete-time transfer function with


sample time TS (set TS=-1 if the sample time is undetermined).

TFDATA Quick access to transfer function data.


[NUM,DEN] = TFDATA(SYS) returns the numerator(s) and denominator(s)
of the transfer function SYS. For a transfer function with NY
outputs and NU inputs, NUM and DEN are NY-by-NU cell arrays where
the (I,J) entry specifies the transfer function from input J to
output I. SYS is first converted to transfer function if necessary.

[NUM,DEN,TS] = TFDATA(SYS) also returns the sample time TS. Other


properties of SYS can be accessed with GET or by direct structure-like
referencing (e.g., SYS.Ts)

For a single SISO model SYS, the syntax


[NUM,DEN] = TFDATA(SYS,'v')
returns the numerator and denominator as row vectors rather than
cell arrays.

TF2SS Transfer function to state-space conversion.


[A,B,C,D] = TF2SS(NUM,DEN) calculates the state-space
representation:
dx/dt = Ax + Bu
y = Cx + Du

of the system:
NUM(s)
H(s) = --------
DEN(s)
FEEDBACK Feedback connection of two LTI models.
SYS = FEEDBACK(SYS1,SYS2) computes an LTI model SYS for
the closed-loop feedback system

u --->O---->[ SYS1 ]----+---> y


| | y = SYS * u
+-----[ SYS2 ]<---+

Negative feedback is assumed and the resulting system SYS


maps u to y. To apply positive feedback, use the syntax
SYS = FEEDBACK(SYS1,SYS2,+1).

SS Create state-space model or convert LTI model to state space.


Creation:
SYS = SS(A,B,C,D) creates a continuous-time state-space (SS) model
SYS with matrices A,B,C,D. The output SYS is a SS object. You
can set D=0 to mean the zero matrix of appropriate dimensions.

SYS = SS(A,B,C,D,Ts) creates a discrete-time SS model with sample


time Ts (set Ts=-1 if the sample time is undetermined).

DLINMOD Obtains linear models from systems of ODEs and discrete-time systems.
Creation:
[A,B,C,D]=DLINMOD('SYS',TS) obtains a discrete-time state-space linear
model (with sample time TS) of the system of mixed continuous and
discrete systems described in the block diagram 'SYS' when the state
variables and inputs are set to the defaults specified in the block
diagram.

C2D Conversion of continuous-time models to discrete time.


SYSD = C2D(SYSC,Ts,METHOD) converts the continuous-time LTI
model SYSC to a discrete-time model SYSD with sample time Ts.
The string METHOD selects the discretization method among the
following:
'zoh' Zero-order hold on the inputs
'foh' Linear interpolation of inputs (triangle appx.)
'tustin' Bilinear (Tustin) approximation
'prewarp' Tustin approximation with frequency prewarping.
The critical frequency Wc (in rad/sec) is specified
as fourth input by
SYSD = C2D(SYSC,Ts,'prewarp',Wc)
'matched' Matched pole-zero method (for SISO systems only).
The default is 'zoh' when METHOD is omitted.

You might also like