Section 9–3 / Transformation of System Models with MATLAB 659EXAMPLE 9–4 Consider a system with multiple inputs and multiple outputs. When the system has more than one
output, the command[NUM,den] = ss2tf(A,B,C,D,iu)
produces transfer functions for all outputs to each input. (The numerator coefficients are returned
to matrix NUM with as many rows as there are outputs.)
Consider the system defined byThis system involves two inputs and two outputs. Four transfer functions are involved:
and (When considering input u 1 ,we assume that input u 2
is zero and vice versa.) See the output of MATLAB Program 9–3.Y 2 (s)U 1 (s),Y 1 (s)U 2 (s), Y 2 (s)U 2 (s).Y 1 (s)U 1 (s),B
y 1
y 2R= B
1
0
0
1
RB
x 1
x 2R + B
0
0
0
0
RB
u 1
u 2R
B
x# 1
x# 2R= B
0
- 25
1
- 4
RB
x 1
x 2R+ B
1
0
1
1
RB
u 1
u 2R
MATLAB Program 9–3
A = [0 1;-25 -4];
B = [1 1;0 1];
C = [1 0;0 1];
D = [0 0;0 0];
[NUM,den] = ss2tf(A,B,C,D,1)
NUM =
01 4
0 0 -25
den =
1 4 25
[NUM,den] = ss2tf(A,B,C,D,2)
NUM =
0 1.0000 5.0000
0 1.0000 -25.0000
den =
1425
This is the MATLAB representation of the following four transfer functions:Y 1 (s)
U 2 (s)=
s+ 5
s^2 +4s+ 25,
Y 2 (s)
U 2 (s)=
s- 25
s^2 +4s+ 25Y 1 (s)
U 1 (s)=
s+ 4
s^2 +4s+ 25,
Y 2 (s)
U 1 (s)=
- 25
s^2 +4s+ 25