Professional Documents
Culture Documents
ss2tf
3.11.2020 Prof. Dr. M. Akbaba State-stae and transfer function 2
which means state-space to transfer function.
Syntax is as follows:
[num, den] = ss2tf(a,b,c,d,1)
Here :
num: numerator
den: denominator
a, b, c and d: state-space model matrices as follows:
[ẋ]=[a][x]+[b][u] ve [y]=[c][x]+[d][u]
1: first pair of transfer functions
num: Is the coefficients of the numerator polynom
of the first transfer function
h1(s)
3.11.2020 Prof. Dr. M. Akbaba State-stae and transfer function 3
den: Is the coefficients of the common denominator polynom of
the first transfer function h1(s) and the second transfer function
h2(s)
Also, h3(s) have h4(s) have common denominator. Therefore, by
writing two ‘ss2tf’ we obtain four transfer functions. This is
illustrated below;
[num12, den1]=ss2tf(a,b,c,d,1)
[num34,den2]=ss2tf(a,b,c,d,2]
If we implement this in MATLAB we will get:
num12=
p1 p2 p3
p4 p5 p6
sis2
sis1 x = ax + bu y2
P1 ( s ) + u3
T (s) = y3
u1
Q1 ( s ) y1 X y = cx + du
y4 -
P2 ( s) u4
H ( s) =
Q2 ( s)
sis3
u2
y = Cx + Du y3
k (n1s + n1 ) 4(2s + 8)
G( s) = = 2
m1s + m2 s + m3 x + 2 x − 24
2
sis3=zpk(s1,[s2 s3],k)
dx1
dt −10 -24 x1 1
= + u (t )
dx2 1 0 x2 0
dt
y = 10 x1 + 4 x2 + 0u (t )
x −10 -24 x1 1
x = 1 + u (t )
0 x2 0
x1
y = 10 4 + 0u (t )
x2
Now let us get same transfer function from state-space model.
We type following matrices in MATLAB:
a=[-10 -24; 1 0]; b=[1; 0]; c=[10 4]; d=[0];
[num den]=ss2tf(a,b,c,d)
3.11.2020 Prof. Dr. M. Akbaba State-stae and transfer function 18
And running these two lines program in MATLAB we get:
num =
0 10 4
den =
1 10 24
0s + 10s + 4
2
10 s + 4
G( s) = 2 = 2
s + 10s + 24 s + 10s + 24
Zero/pole/gain:
3 (s+2)
-------
(s+5)
[pay1,payda1]=ss2tf(A,B,C,D,1);
printsys(pay1,payda1,'s')
[pay2,payda2]=ss2tf(A,B,C,D,2);
printsys(pay2,payda2,'s')