Exrciss for lcturs 3 Discrt systms Michal Šbk Automatické říí 06 30-4-7
Stat-Spac a Iput-Output scriptios Automatické říí - Kybrtika a robotika Mols a trasfrs i CSTbx >> F=[ ; 3 4]; G=[ ;]; H=[ ]; J=0; >> Pss = ss(f,g,h,j,- a = x x x x 3 4 b = u x x c = x x y = u y 0 Samplig tim: uspcifi Discrt-tim mol. >> Ptf=tf(Fss Trasfr fuctio: 4 + ------------- ^ - 5 - Samplig tim: uspcifi >> Psf = sf(pss Psf = + 4 ------------- - - 5 + ^ Michal Šbk ARI-Pr-3-0
Automatické říí - Kybrtika a robotika Rspos by log ivisio Log ivisio ca b us for primag calculatio from -imag It os ot by calculatig th rst, but cotius to "gativ powrs This ca b us to calculat rspos from or - TF 3 4 3 4 3 4 3 4 3 4 Michal Šbk ARI-Pr-3-0 3
Trasfr fuctio i a - = Automatické říí - Kybrtika a robotika Exampls: Ivstigat orr, is it propr? b bˆ a a ( ( ( ˆ( b bˆ a a ( ( ( ˆ( b bˆ a a ( ( ( ˆ( b( ˆ b( a( aˆ ( Michal Šbk ARI-Pr-3-0 4
Pols a ros i a - = Automatické říí - Kybrtika a robotika Oprator chag (complx varioabls f( = - = It is circular ivrsio plus a rflctio accorig to th ral axis 0 ½ j j j ½j j ½ ½ j Aras of stability a istability ar ovrtur Michal Šbk ARI-Pr-3-0 5
Pols a ros i a s Automatické říí - Kybrtika a robotika To sig a iscrt cotrol for a iscrt systm by th mtho of th pol placmt with giv spcificatios i th tim omai, o w to kow whr to plac thm? W ca us formulas for cotius systms with formulas for sampl systms For st orr systm hs For orr systm, hs, h( j h( j h( j Michal Šbk ARI-Pr-3-0 6
Sttlig tim T s Automatické říí - Kybrtika a robotika Sam sttlig tim Ts I th s-pla: pols lyig o th vrtical lis σ = cost. It th -pla: coctric circls with a ctr at th origi h kost cost. k hs h( j h( j h( j s >> T=;sigma=;omga=0:.0:pi/T; >> xplus=xp(-sigma+j*omga; >> xmius=xp(-sigma-j*omga; >> x=[xplus xmius]; >> plot(ral(x,imag(x,'.' >> hol Currt plot hl >> T=;sigma=;omga=0:.0:pi/T; >> xplus=xp(-sigma+j*omga; >> xmius=xp(-sigma-j*omga; >> x=[xplus xmius]; 3 >> plot(ral(x,imag(x,'.' >> T=;sigma=3;omga=0:.0:pi/T; >> xplus=xp(-sigma+j*omga; >> xmius=xp(-sigma-j*omga; >> x=[xplus T xmius]; >> plot(ral(x,imag(x,'.' 3 Michal Šbk ARI-Pr-3-0 7
First maximum timt p Automatické říí - Kybrtika a robotika Sam first max. tim Tp I th s-pla: horiotal lis ω = cost. I th -pla: raial rays from th origi j h kost cost. hs h( j h( j h( j 0 s >> T=;sigma=;omga=0:.0:pi/T; xplus=xp(-sigma+j*omga; xmius=xp(-sigma-j*omga; x=[xplus xmius]; plot(ral(x,imag(x,'.' >> hol Currt plot hl >> T=;sigma=;omga=0:.0:pi/T; xplus=xp(-sigma+j*omga; [ra] xmius=xp(-sigma-j*omga; x=[xplus xmius]; plot(ral(x,imag(x,'.' 0 >> T=;sigma=3;omga=0:.0:pi/T; xplus=xp(-sigma+j*omga; xmius=xp(-sigma-j*omga; x=[xplus xmius]; plot(ral(x,imag(x,'.' Michal Šbk ARI-Pr-3-0 8
Th sam ris timt r Automatické říí - Kybrtika a robotika Th sam ris tim.8 Tr I th s-pla: pols o coctric circls ω = cost. I th -pla: curvs hs h( j h( j h( j s cos Michal Šbk ARI-Pr-3-0 9
Th sam ovrshoot a ampig Automatické říí - Kybrtika a robotika Th sam ovrshoot % OS 00 ( a ampig I th s-pla: lis passig through th origi I th -pla: part of a spiral hs h( j h( j h( j s Michal Šbk ARI-Pr-3-05 0
Rspos rquirmts usig pol positio: orr Automatické říí - Kybrtika a robotika Cotius Rquir ris tim 4 Im.8 s, 3 r Discrt hs, h( j,, s j j Im h( j 0 - - -3 R R -4-5 -4.5-4 -3.5-3 -.5 - -.5 - -0.5 0 Rquir srrlig tim k% Ts s R s, s 4 Im 4 Im 3 0 - - -3 R s, k% s R 3 0 - -, k% s R -4-5 -4.5-4 -3.5-3 -.5 - -.5 - -0.5 0-3 -4-5 -4.5-4 -3.5-3 -.5 - -.5 - -0.5 0 Michal Šbk Pr-ARI-03-0
Rspos rquirmts usig pol positio: orr Automatické říí - Kybrtika a robotika Cotius Rquir ovrshoot 4 3 s j j, Im Discrt,, hs h( j h( j 0 - - arccos mi R -3-4 -5-4.5-4 -3.5-3 -.5 - -.5 - -0.5 0 mi Rquir ovrshoot a 4 3 l p 00 max l p 00 Im max 0 - - arccos k% s R s, mi R -3-4 -5-4.5-4 -3.5-3 -.5 - -.5 - -0.5 0 Michal Šbk Pr-ARI-03-0
Discrt Root Locus Automatické říí - Kybrtika a robotika CL pols graph pig o K, i.. KL( 0 Th graph is raw accorig to th sam ruls as i cotiuous cas Hovwr th itrprtatio of its positio is of cours iffrt >> Ls=(s+3*(s+4/(s+/(s+ Ls = +7s+s^ / +3s+s^ >> rlocus(ls,sgri >> L=(+3*(+4/(+/(+ Ls = +7+^ / +3+^ >> rlocus(l,gri stabl vrywhr ustabl vrywhr Michal Šbk ARI-Pr-3-0 3
Discrt Nyquist stability critrio Automatické říí - Kybrtika a robotika Discrt Cotiuous CL systém has Z P N ustabl pols, whr Z N P N umbr of poit - Nyquist graph L(s but th N is P umbr of ustabl OL pols. Nyquist stability critrio CL systém is stabl P N PN N umbr of Nyquist graph L(s but P umbr of ustabl OL pols is N, So it is th sam A spcial cas: Nyquist stability critrio for stabl OL systm If th OL systém is stabl, th th CL systém is stabl. Niquist graph L(s os ot circl th critical poit -. Michal Šbk ARI-Pr-3-0 4
Automatické říí - Kybrtika a robotika Paralll rivatio of both for compariso umbr of ros H( (= OL pols = umbr of pols H( (= CL pols Z umbr of ustabl CL pols = umbr of ustabl ros P umbr of ustabl OL pols = umbr of ustabl ros N umbr of circlig poit - by Nyquist graph I th sam irctio i which w surrou th ara ur cosiratio Cotiuous Discrt Circlig th istability ara clockwis Circlig th istability ara coutrclockwis From argumt pricipl N Z P That s why Z P N CL stabl if Z 0 i.. PN Thus coutr-clockwis From argumt pricipl N Z P P Z That s why Z P N CL stabl if Z 0 i.. P N Thus coutr-clockwis Michal Šbk ARI-Pr-3-0 5
Exampl Automatické říí - Kybrtika a robotika OL trasfr fuctio is ustabl -> P = Nyquist graph is L ( a N = Accorig to th critrio, th clos loop will b stabl It is rally a stabl, CL charactristic polyomial is >> a=-,b= a = - + b = >> yquist(b/a >> a+b as = c( Michal Šbk ARI-Pr-3-0 6
Automatické říí - Kybrtika a robotika Exampl Dtrmi th CL stability of th iscrt systm with G( s s( s Samplig at frqucy 0.5 H (i.. samplig prio T = s With ro orr shapig (ZOH A with iscrt proportioal cotrollr L( KG( >> G=/(+s/s G = / s(s+ >> G3=c(tf(G, Trasfr fuctio:.35 + 0.594 --------------------- ^ -.35 + 0.353 Samplig tim: >> pk(g3 Zro/pol/gai:.353 (+0.53 ----------------- (- (-0.353 Samplig tim: K=;L=K*G3; yquist(l N 0, P 0 Z 0 >> pformat rootc >> Gp=sf(G3; >> K=;L=K*Gp; >> cl_char=l.um+l. cl_char = (+0.8540i(-0.8540i >> isstabl(cl_har_pol as = Michal Šbk ARI-Pr-3-0 7
Automatické říí - Kybrtika a robotika Exampl: Discrt PM a GM For systém G( s s( s with samplig frq. 5 H, ZOH a iscrt P cotrollr with K = Fi iscrt PM a GM >> G=c(tf(/(+s^/s,/5,'oh'; >> pk(g Zro/pol/gai: 0.00077(+3.38(+0.4 ---------------------------- (-(-0.887^ Samplig tim: 0. >> L=G;yquist(L GM.7 5B, PM 7.5º Cotius valus ar almost th sam: GM 6B PM º Corrctio: PM is PM spoj PM spoj 9T s 9 0.60. 3.5 7.5 Michal Šbk ARI-Pr-3-0 8