You are on page 1of 15

Exercise3 (a) Consider the following block diagram, Find the closed loop transfer function

C(s) / R(s).

PROGRAM#01:--a=[9]
b=[1 5]
[C,R]=cloop(a,b,-1);
printsys(C,R)
sys=tf(C,R)
pzmap(sys)
poles=roots(R)
zeros=roots(C)
title(07ES07);
OUTPUT:--a=9
b=1 5
9
num/den= ---------s + 14
Transfer function: 9
-------------s + 14
poles = -14
zeros = Empty matrix: 0-by-1

Exercise 3(b): Consider the following diagram, The transfer function C(s) / R(s) can be
computed as follows;

PROGRAM#02:--a=[1 2]
b=[1 3 12]
[C,R]=cloop(a,b,+1);
printsys(C,R)
sys=tf(C,R)
pzmap(sys)
poles=roots(R)
zeros=roots(C)
title('07ES07');

OUTPUT:--a =1
b =1

2
3

12

s+2
num/den= ----------------s^2 + 2 s + 10
Transfer function:
s+2
-------------s^2 + 2 s + 10
poles = -1.0000 + 3.0000i
-1.0000 - 3.0000i
zeros = -2

Exercise3 (c): Consider the following diagram

PROGRAM#03:--a=[1 0]
b=[9 17]
c=[9 27]
d=[2 9 27]
[C,R]=series(a,b,c,d);
printsys(C,R)
sys=tf(C,R)
pzmap(sys)
poles=roots(R)
zeros=roots(C)
title('07ES07');
OUTPUT:--a=1 0
b = 9 17
c = 9 27
d = 2 9 27
9 s^2 + 27 s
num/den = --------------------------------------18 s^3 + 115 s^2 + 396 s + 459
Transfer function:
9 s^2 + 27 s
-----------------------------------------18 s^3 + 115 s^2 + 396 s + 459
poles = -2.2500 + 2.9047i
-2.2500 - 2.9047i
-1.8889
zeros =

0
-3

Exercise3
(a) what is the difference between the MATLAB built in function conv and series
(b) Reduce each of the following diagrams into a single block from. In each case find poles
and zero and sketch plots zero diagrams In which bloke diagram you can not use the
function series? Why?
DIFFERENCE BETWEEN CONV AND SERIES:---

Conv:--conv=convolution and polynomial multiplication.


C=CONV(A,B) Convolves A & B.the resulting vector is length length(A)+length(B)-1
If A & B are two vectors of polynomial cofficients ,convolving them is equivalent to multiply the two
polynomials.

Series:--Series is the interconnection of the two LTI models.


Sys=series(sys1,sys2,outputs1,inputs2)connects two LTIS models sys1 n sys2 in series such that the
output of the sys1 specified by outputs1 are connected to the inputs of sys2 specified by inputs2.

Block #1

99
9 s 27

5(3s 27)
7( s 12 s 2 9 s 27)
3

PROGRAM#01:--a=[99]
b=[9 27]
c=[15 135]
d=[7 84 63 189]
[C,R]=series(a,b,c,d);
printsys(C,R)
sys=tf(C,R)
pzmap(sys)
poles=roots(R)
zeros=roots(C)
title(07ES07);
OUTPUT:--a = 99
b = 9 27
c = 15 135
d = 7 84 63 189
1485 s + 13365
num/den = ----------------------------------------------------63 s^4 + 945 s^3 + 2835 s^2 + 3402 s + 5103
Transfer function:
1485 s + 13365
-------------------------------------------------------63 s^4 + 945 s^3 + 2835 s^2 + 3402 s + 5103
poles =
-11.4189
-3.0000
-0.2905 + 1.5100i
-0.2905 - 1.5100i
zeros =
-9

Block 2

2s 4
s2
PROGRAM#02:--a=[2 4]
b=[1 0]
c=[4/5]
d=[1 3]
e=[1 0]
f=[1 -6]
[G,H]=series(a,b,c,d);
[C,R]=series(G,H,e,f);
printsys(C,R)
sys=tf(C,R)
pzmap(sys)
poles=roots(R)
zeros=roots(C)
title(07ES07);

s2
s6

OUTPUT:--a=2 4
b=1 0
c = 0.8000
d=1 3
e=1 0
f = 1 -6
1.6 s^2 + 3.2 s
num/den = ----------------------------s^3 - 3 s^2 - 18 s

Transfer function:

1.6 s^2 + 3.2


-------------------------s^3 - 3 s^2 - 18 s

poles = 0
6
-3
zeros = 0
-2

Block#3

s2

s3

s+6

s2 +s+1

9s

s8

22

s 5.6

PROGRAM#03:--a=[1 0]
b=[1 3]
c=[1 6]
d=[1 1 1]
e=[9 0]
f=[1 8]
g=[22]
h=[1 5.6]
[I,J]=series(a,b,c,d);
[K,L]=series(I,J,e,f);
[C,R]=series(K,L,g,h);
printsys(C,R)
sys=tf(C,R)
pzmap(sys)
poles=roots(R)
zeros=roots(C)
title(07ES07);
OUTPUT:--a=1 0
b=1 3
c=1 6
d=1 1 1
e=9 0
f=1 8
g = 22
h = 1.0000 5.6000
198 s^3 + 1188 s^2
num/den = ----------------------------------------------------------------------s^5 + 17.6 s^4 + 103.2 s^3 + 236.6 s^2 + 220 s + 134.4

Transfer function:

198 s^3 + 1188 s^2


-----------------------------------------------------------------------s^5 + 17.6 s^4 + 103.2 s^3 + 236.6 s^2 + 220 s + 134.4

poles= -8.0000
-5.6000
-3.0000
-0.5000 + 0.8660i
-0.5000 - 0.8660i
zeros = 0
0
-6

Block#4

PROGRAM#04:--a=[1]
b=[1 1]
c=[1]
d=[1 1]
[C,R]=feedback(a,b,c,d,-1);
printsys(C,R)
sys=tf(C,R)
pzmap(sys)
poles=roots(R)
zeros=roots(C)
title(07ES07);

OUTPUT:--a=1
b=1
c=1
d=1

1
1

s+1
num/den = ---------------------s^2 + 2 s + 2

Transfer function:

s+1
-----------------------------s^2 + 2 s + 2

poles = -1.0000 + 1.0000i


-1.0000 - 1.0000i
zeros = -1

Feedback OR Cloop:--The built in function cloop can only be applied to unity feedback control systems. Here we use
the built in function feedback.

Exercise 5: find the close loop transfer functions and closed loop step response of the
following system

S 0.27

S2

PROGRAM:--[num1]=[1 0]
[den1]=[1 0]
[num2]=[1 0.27]
[den2]=[1 4.7 3.7]
[NUM,DEN]=series(num1,den1,num2,den2)
[C,R]=cloop(NUM,DEN,-1)
sys=tf(C,R)
pzmap(sys)
poles=roots(C)
zeros=roots(R)
step(C,R)

OUTPUT:--num1 = 1 0
den1 = 1 0
num2 = 1.0000 0.2700
den2 = 1.0000 4.7000 3.7000
NUM = 0 1.0000 0.2700
0
DEN = 1.0000 4.7000 3.7000
0
C = 0 1.0000 0.2700
0
R = 1.0000 5.7000 3.9700
0
s^2 + 0.27 s
Transfer function: ------------------------------s^3 + 5.7 s^2 + 3.97 s
poles = 0
-0.2700
zeros = 0
-4.8878
-0.8122

S 3.7 S 10

Block#6

7.64

10

0.72

0.13S

PROGRAM:--[a]=[7.64]
[b]=[10]
[c1]=[0.72]
[c2]=[0.13 1]
[d1]=[1]
[d2]=[10]
[E,F]=series(a,b,c1,c2)
[G,H]=Series(d1,d2,E,F)
[C,R]=cloop(G,H,-1)
sys=tf(C,R)
pzmap(sys)
poles=roots(C)
zeros=roots(R)
step(C,R)

OUTPUT:--a=
b=
c1 =
c2 =
d1 =
d2 =
E=
F=
G=
H=
C=
R=

7.6400
10
0.7200
0.1300 1.0000
1
10
0 5.5008
1.3000 10.0000
0 5.5008
13 100
0 5.5008
13.0000 105.5008

Transfer function:

5.501
---------------------------13 s + 105.5

Poles =
Empty matrix: 0-by-1
Zeros =
-8.1154

1 10

You might also like