Section 2–6 / Transformation of Mathematical Models with MATLAB 41
(2–41)
MATLAB transforms the transfer function given by Equation (2–39) into the
state-space representation given by Equations (2–40) and (2–41). For the example
system considered here, MATLAB Program 2–2 will produce matrices A,B,C,
andD.
y =[0 1 0]C
x 1
x 2
x 3
S +[0]u
MATLAB Program 2–2
num = [1 0];
den = [1 14 56 160];
[A,B,C,D] = tf2ss(num,den)
A=
-14 -56 -160
10 0
01 0
B =
1
0
0
C =
01 0
D =
0
Transformation from State Space Representation to Transfer Function. To
obtain the transfer function from state-space equations, use the following command:
[num,den] = ss2tf(A,B,C,D,iu)
iumust be specified for systems with more than one input. For example, if the system
has three inputs (u1, u2, u3), then iumust be either 1, 2, or 3, where 1 implies u1, 2
impliesu2,and 3 implies u3.
If the system has only one input, then either
[num,den] = ss2tf(A,B,C,D)