You are on page 1of 8

>>

>>
>>
>>

k=3;
z=[1;-8;-8];
p=[0;0;0;[-1;-1];roots([1 -6 5]')];
A=zpk(z,p,k)

A =
3 (s-1) (s+8)^2
----------------------s^3 (s+1)^2 (s-1) (s-5)
Continuous-time zero/pole/gain model.
>> [n,d]=zp2tf(z,p,k)
n =
0

45

144 -192

-4

-6

d =
0

>> [a,b,c,d]=zp2ss(z,p,k)
a =
5
4
0
4
0
0
0

0
-2
1
14
0
0
0

0
-1
0
63
0
0
0

0
0
0
0
1
0
0

0
0
0
0
0
1
0

0
0
0
0
0
1
1

0
0
0
0
0
0
0

b =
1
1
0
1
0
0
0
c =
0
d =
0
.......................................................
>> [n,d]=tfdata(A,'v0')
n =

45

144 -192

d =
1
-4
-6
4
5
0
0
>> [zeros,polos,ganancia]=zpkdata(A,'vo')

zeros =
1
-8
-8
polos =
0
0
0
-1
-1
5
1
ganancia =
3
>> [A,B,C,D]=ssdata(A)
A =
Columns 1 through 6
0
0
0
0
0
0
0
Column 7
0
0
0
0
0
1.0000
5.0000
B =
0
0
0

2.8284
0
0
0
0
0
0

2.8284
8.0000
0
0
0
0
0

1.0000
2.8284
2.8284
-1.0000
0
0
0

0
0
0
1.0000
-1.0000
0
0

0
0
0
0
1.0000
1.0000
0

0
0
0
4
C =
Columns 1 through 6
-0.7500

2.1213

2.1213

0.7500

Column 7
0
D =
0
......................................................
>> n1=[6];
>> d1=[1 2 10 5];
>> B=tf(n1,d1)
B =
6
---------------------s^3 + 2 s^2 + 10 s + 5
Continuous-time transfer function.
>>
>>
>>
>>
>>
>>

k1=6;
z=[-1];
k1=6;
z1=[-1];
p1=[0;0;[-5;-5]];
C=zpk(z1,p1,k1)

C =
6 (s+1)
----------s^2 (s+5)^2
Continuous-time zero/pole/gain model.
>> k2=10;
>> z2=[];
>> p2=[0;roots([1 0 4]')];
>> D=zpk(z2,p2,k2)
D =
10
----------s (s^2 + 4)
Continuous-time zero/pole/gain model.
>> E=5;

>>
>>
>>
>>

k3=1;
z3=[];
p3=[0];
H=zpk(z3,p3,k3)

H =
1
s
Continuous-time zero/pole/gain model.
------------------------------------------------>> W=series(D,E)
W =
50
----------s (s^2 + 4)
Continuous-time zero/pole/gain model.
>> Y=parallel(W,C)
Y =
56 s (s+0.01898) (s^2 + 9.017s + 22.58)
--------------------------------------s^3 (s+5)^2 (s^2 + 4)
Continuous-time zero/pole/gain model.
>> U=series(Y,B)
U =
336 s (s+0.01898) (s^2 + 9.017s + 22.58)
-----------------------------------------------------s^3 (s+5)^2 (s+0.543) (s^2 + 4) (s^2 + 1.457s + 9.209)
Continuous-time zero/pole/gain model.
>> T=feedback(U,H)
T =
336 s^2 (s+0.01898) (s^2 + 9.017s + 22.58)
-----------------------------------------------------------------s (s+5.094) (s+4.897) (s+1.828) (s+0.01898) (s^2 - 2.303s + 2.66)
(s^2 + 2.051s + 7.733) (s^2 + 0.4136s + 8.085)
Continuous-time zero/pole/gain model.
----------->> [num,den]=tfdata(T,'vo')

num =
1.0e+03 *
Columns 1 through 6
0

7.6440

0.1440

0.0000

0.0590

0.2030

0.5200

0.7450

3.0360

7.6440

0.1440

0.0000

0.0000
0.1170
1.1516
-1.1551
0
0
0
0
0
0
0

0.0000
0.1155
1.1551
1.1516
0
0
0
0
0
0
0

0
0
0
3.6132
-1.8283
0
0
0
0
0
0

0
0
0
0.8773
1.0000
-4.8972
0
0
0
0
0

0
0
0
0
0
0
0
0.3693
-0.2068
-2.8359
0

0
0
0
0
0
0
0
0
2.8359
-0.2068
0

0
0
0
0
0
0
0
0
0
0.5938
-5.0941

Columns 7 through 12
0.3360

3.0360

den =
1.0e+03 *
Columns 1 through 6
0.0010

0.0120

Columns 7 through 12
1.2000

0.8360

>> [A,B,C,D]=ssdata(T)
A =
Columns 1 through 6
-0.0000
0
0
0
0
0
0
0
0
0
0

-0.0000
-0.0190
0
0
0
0
0
0
0
0
0

Columns 7 through 11
0
0
0
0.7421
0
1.9382
-1.0255
-2.5848
0
0
0
B =

0
0
0
0
0
0
2.5848
-1.0255
0
0
0

0
0
0
0
0
0
0
0
0
0
32
C =
Columns 1 through 6
-0.0000

-1.4466

8.9176

8.8000

Columns 7 through 11
0

D =
0
>> [zeros,polos,ganancia]=zpkdata(T,'vo')
zeros =
-0.0000
-0.0190
-4.5084
-4.5084
0.0000

+
+
+
+

0.0000i
0.0000i
1.5012i
1.5012i
0.0000i

polos =
-5.0941 + 0.0000i
-4.8972 + 0.0000i
-0.2068 + 2.8359i
-0.2068 - 2.8359i
-1.0255 + 2.5848i
-1.0255 - 2.5848i
-1.8283 + 0.0000i
1.1516 + 1.1551i
1.1516 - 1.1551i
-0.0000 + 0.0000i
-0.0190 + 0.0000i
----------------------------ganancia =
336.0000
>> [n,d]=zp2tf(zeros,polos,ganancia)

n =
1.0e+03 *
Columns 1 through 6
0

7.6440

0.1440

0.0000

0.0590

0.2030

0.5200

0.7450

3.0360

7.6440

0.1440

0.0000

0
0
0
0
0
2.3031
1.6311
0
0
0
0

Columns 7 through 12
0.3360

3.0360

d =
1.0e+03 *
Columns 1 through 6
0.0010

0.0120

Columns 7 through 12
1.2000

0.8360

>> [a,b,c,d]=zp2ss(zeros,polos,ganancia)
a =
Columns 1 through 6
-0.0000
-0.0000
0
-0.0000
0
-0.0000
0
0
0
0
0

0
-2.0510
2.7808
6.9658
0
6.9658
0
0
0
0
0

0
-2.7808
0
5.3386
0
5.3386
0
0
0
0
0

0
0
0
-0.4136
2.8435
-0.3946
0
0
0
0
0

0
0
0
-2.8435
0
-2.8435
0
0
0
0
0

0
0
0
0
0
0
0
-4.9947
0
0.2002
0

0
0
0
0
0
0
0
0
0
-1.8472
0.1863

0
0
0
0
0
0
0
0
0
-0.1863
0

Columns 7 through 11
0
0
0
0
0
-1.6311
0
0.6131
0
0
0
b =

0
0
0
0
0
0
0
-9.9913
4.9947
0
0

1
1
0
1
0
1
0
0
0
0
0
c =
1.0e+03 *
Columns 1 through 6
0

1.8037

Columns 7 through 11
0
d =
0

You might also like