Professional Documents
Culture Documents
EE4L1" ControlSystemLab. SYSTEMS.( SCtlO) OFLINEAR BASED ANALYSIS/DESIGN 2: MATLAB TXPTRIUTruT Problem: 1 transfer functionis given by, A closed-loop
r(s) -
Y(s) R(s)
77(s 2) +
(s + 7)(s2+ 4s +ZZ)
to transfer function T(s)=V6s11p[s.] [a) Obtainthe responseof the closed-loop criterion0 and a unit step input. What is the setting time T' [use a 20/o P.O.? pertent overshoot (b) Neglecting real pole at s = -7, determinethe settingtime T' and results the can be made in with the actualsystemresponse part [a). What conclusion the regardingneglecting pole? num:77*| 2l;-den:conv([ 7],[ a 22]); sys: t(num,den) na:(77 )* [ I 2]; da:[ | a 22]; sysa:tf(nada); 17 t:[0:0.01:5]; y:step(sys,t); ya:step(sysa,t); plot(t,y,t,y&,'--') (s)'),ylabel('Step response') xlabel('Time
TL
ft, k,
{y
th -^r, JLf
fL
pl.*
,f lt^Ye, ?,c'nr.c
J;sJe.-,
J..--^J
D.t, ^''[
FLd^r ,-A
""^"1
-t-| .-^
2.5
tftl.".
,\ i \
I
)+ ;
2,L Cee
f.-^.tla.,rr
lPo
2\
/\\
,/\
T, :
s go.S^f.
o o c o oo oo a
1.5 r
r \
,'
,f.,' l',
sf ok-,
' '',,,
ry,^"j
7"f-,
Tl :
E
1
fi'" tx
or)a,
Arc
osi:i
9.'t6 $,ec
o''
0
0.5
1.5
2.5 Time(s)
3.5
4.5
P.o :
rs l ff,
usingroot compensator a shownin figure'Design lag the controlsystem problem:2: consider locusmethodstomeetthefollowingspecifications l.steadystateerrorlessthanthel0%forastepinput margingreaterthan 45oand 2' Phase step input for lessthan 5 seconds a unit 3. setting time [with aZo/ocriterion) to meet the design utilizingroot locusmethod Designa lag compensator [a) to assistin the designprocess' a Deverop set of m-filescript specifications. closed-loop in part [a) by simulating the Test the controller developed [bJ provide the time histories of the response to unit step input. system outPutY[t]' phasemargin usingthe [c) Computethe margin function'
G,(s)
s*10 sz+2s+20
22Ol; 10]; numg=[1 deng=11 = tf(numg,deng), sysg 0, 5, axis([-1 1,-1 10l); hold rlocus(sYsg); on
o/o
Seltt,iq h;
J
t^a
tt; l.
J.rtt, *J
/,,r.'.q
wn=1-7778', zeta=O.45; 0:0. x=[-1 1:-zeta*wn]; "x /zeta) ; rt( -zela^Z) ,=- 1sq 1 0:0. xq=[-1 1:-zeta*wn]; c=sqrt(wn^2-xc.^2); ',xc, -c" : ') : : t,xc,c,' . ',X,-Y,' ptot1t,y,' rloc{1nd(sysg), hold off
""^d
4
^"^.h"^j
0- +5
h *r/
LJ r.
/"it,iJ.
8.t=, f1 ? urrt
ct'.J
l.*T
R,-^
tt -'
TLl '''
d^k
Lt;
S->o
S Ect)
r-.
nf(
Tt-, ,,p'.
V?
g.[r, *3
*[,
vn co{
? 7
= O,9
o In=
l"
,^^
Root Locus 15
10
5 .a
{
o, (s
A o, .=
E
-5
'\-_10
/ - -/
-15 -40
-35
-30
-25
-20
-15
-10
-5
RealAxis
2201', 10]; numg=[1 deng=11 = tf(numg,deng); sysg 0.25]; denc=[1 0.S]; numc=[1 = tf(numc,denc); sysc sys_o= series(sYsc,sYsg); 0, 5, axis([-1 1,-1 10]); holdon rlocus(syt-o);
o/o
wn=1.7778', zeta=0.45; 0:0. x=[-1 1:-zeta*wn]; *x y=-(sqrt(1-zeta^2)/zeta ; ) 0:0. xc=[-1 1:-zeta*wn] ; c=sqrt(wn^2-xc.^2); ',xc, -c,': ') : : ',xc,c,' plot(x,y,' . ',X,-Y,' rlocfind(sys-o) hold off
3*I
"t_
Io
q. CJ) -- t b .
s+
S{-o.
10
\' .
.9 x
c.^p-^*J.r
I
r- r!
.
lk.r.m
) o
-5F
l
.g o, o
ct rtd
rt
o-e
[*o
.E I 1
I
I
(r,
rn'.14
v..^#k{
zanrr)
-rol-15, -40
. t _ .1.
-30
-25
-20
-15
-10
-5
RealAxis
deng=lt 2 2Ol; numg=[l 10J; = sysg tf(numg,deng); dengc=[l0.25]; 0.51; fluIngc=10*[t = tf(numgc,dengc); slsc sys-o= series(sysc,sYsg); ); sys-cl= feedback(sYs-o,[1] 1:5]; step(sys-cl,t) 1=[0:0. =[ede(sYs-o) pha ; Imag, s,w] pm [gm,pm,wL,w2]=63rgin(mag,phase,w); pm= 62.2474
StepResponse
1.4
0.5
1.5
i.s
TinE (sec)
;, I
,(r-t
The objectiveis to use digital computer to improve the performance,where the transfer function of the computer is representedby D[z). The Designspecifications are (1) phasemargin greater than 450and (2) settling time ( with az o/o criterion) lessrhan 1 second Let us take the PM = 500 and T, = 0.8 sec. The dampingratio is 0.5 the calculated natural frequency is 10 rad/sec numg=[lO]; deng=11 0]; 5 slsg = tf(numg,deng); axis( 1,-10, ); t0] [-15, rlocus(sysg);
f;""^ [r;
Qt*^ lui,g
Qt*, (aa
d-rt[ : 4
uJn :
g'
Tr:
t5, 0 'S r-*.[ ft z. .
O.8
f,-e
1w"
rru-lr^- F
r).
p n r t o ot J
to
rt
Co"rtDe^^.Jt
I
ul
=)
*\'iJ
h
Co^..px^r" A* bt I
o)tJ toF l h
L*^d
b{
P'r
L-J
ti lss
*1 v"n-{,
- 2 ,
f ,rn
tte
2-S'
tre
+* '{ lc
t- Jrh
ue_ = o, L9,
of. T-F F
(o
S zr slf +ro
.'
+ '&1.
4 *to
d t
vr Cnlr-1<^. t
+.'b
4^
-a G
n [.t-Jr q *
3
F C
cJo.qr,^J f4
t*
L^
+
^l-
tx
Rb
**1 tr,.!<?^..1-,.rl
Is.
RootLocus
i
I
o
{ i
F ol i c
o o i
I I I
I
L
-r i -z\
I i I I 1
_ 3r , . _ , -6
-5
t.,----'---'-I
'-*"'|-
i RealAxis
fu
numg=[l 6]; deng=ll 23 90 0]; = sysg tf(numg,deng); ); axis([-20,1,-10,10] on; rlocus(sysg);hold wn=11.0; zeta=O.5; *wn]; 1:-zeta x=[-10:0. * -zeta^2\ rt( lzeta) x; y=-(sq 1 *wn]; 1:-zeta xg=[-1.0:0. c=sqrt(wnn2-xc.^2); -c,' :',xc, :'); :'rxi,c,' :',x,-Y,' ptot(&y,' lk pl=rlocfind(sYsg) window a Select pointin the graphics window pointin the graphics a Select window graphics a Select pointin the = selected-Point -7.9443+7.7329i
QT
()
l^*^^^&
tr
{L
c11y-rc-L.J ?.(;
lu
}.
-Fe-trtJ
i'JLJ
k:
149-1
T
\
ltt
t9
?
Tt^* T'P
th
tf
fti
l=
RootLocus
30
20
10
.a
x b (
s
'6,
(E
-E
-10
-20
-30 -20
-15
-10 R eal A xi s
-5
Thegainof the compensator L4S/LO = *1,s TheTFof the compensator 15(s+6)/(s+1g) = sys=feed ck(sysg, ) ba [ 1] Transfer function: s+6 s^3+23s^2+91 6 s+ >> sys-feed back(1_45* [ 1]) sysg,
f t T^^-
y\.iaL[
*lv,n-.^e^.-Ar
function: Transfer 145s + 870 s^3+23s^2+235s+870 72 1=(0,0.02,1) P(sYs,t) ;ste :1) 1=(0:0.02 ;steP(sYs,t) on 1);steP(sYs,t);hold 11 1=(0:0.02: (sYs,O.02,'zoh') >> sys-d=c2d function: Transfer z z^2+0.0001515 - 0'02048 0.02586 z z ^ 3- 2 . 5 5 4 ^ 2+ 2 . 1 9z - 0 ' 6 3 1 3 i S a m p l i ntgm e :0 . 0 2 : 2;, 1=[0:0.021];steP(sYs-d,T)
Step ResPonse 1.4
1.2
,/ /
l
0.8 i
= 0.6 0.4i
l
EE
0.2
i
oo'
0 .1
0 .2
0 .3
o'4
o' 7
0' 8
0' 9