Saturday, August 16, 2008

Transfer Function - Part 7

STATE SPACE FROM TRANSFER FUNCTION

MATLAB can find the state space representation directly from the transfer function in two ways. To find the state space representation of the system from the numerator and denominator of the transfer function in the form

x' = Ax + Bu

y = Cx + Du

use MATLAB's tf2ss command:

[A, B, C, D] = tf2ss(num,den)

where num is the vector of the numerator polynomial coefficients, and den is the vector of the denominator polynomial coefficients.

In order to find the entire state space system in addition to the separate matrices from the transfer function, use the following command:

statespace = ss(transferfunction)

where transferfunction is the name of the transfer function system.

EXAMPLE

Find A, B, C, and D, the state space vectors of tutorial_tf using MATLAB:

>> [A, B, C, D] = tf2ss(num,den)

The MATLAB output will be:

A =
-2.5000 -1.5000
1.0000 0

B =
1
0

C =
0 0.5000

D =
0

Find the state space system of tutorial_tf using MATLAB:

>> tutorial_ss = ss(tutorial_tf)

MATLAB will assign the state space system under the name tutorial_ss, and output the following:


a =
x1 x2
x1 -2.5 -0.375
x2 4 0


b =
u1
x1 0.25
x2 0


c =
x1 x2
y1 0 0.5


d =
u1
y1 0

Continuous-time model.

No comments:

Post a Comment