Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Feder al Ur duUni v er si t yofAr t s, Sci ence&Technol ogy LABMANUAL SI XTHSEMESTER LI NEARCONTROLSYSTEM ELECTRI CALMACHI NES&CONTROLSYSTEM LAB DEPARTMENTOFELECTRI CALENGI NEERI NG Pr epar edBy : Engr .Saqi bRi az CheckedBy : Dr .Zubai rKhal i d Appr ov edBy : Dr .Nav eedAl iKhan Lect ur er( Lab) Coor di nat or DeanEl ect r i cal Depar t ment Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Name:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Regi st r at i onNo: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Semest er :_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Bat ch:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ S. No. Ti t l eofPr act i cal 1 I nt r oduct i ont oMat l abcommandsusedi ncont r ol sy st ems( Sof t war e) 2 Lapl aceTr ansf or mat i ont ocheckt hest abi l i t yofaLTISy st em ( Sof t war e) 3 I mpl ement at i onofBl ockDi agr am Reduct i onandOper at i ononLTImodel si n Mat l ab( Sof t war e) 4 Char act er i st i csofcont r ol sy st em openl oopandcl osedl oop( Sof t war e) 5 I mpl ement at i onofPI Dcont r ol l erv i acommands 6 I mpl ement at i onofPI Dcont r ol l erv i asi mul i nk 7 I mpl ement at i onofRootLocusTechni quei nMat l ab 8 Tounder st andt hef r equencyr esponseofacont r ol sy st em usi ngBodePl ot& Ny qui stPl ot 9 Model i ngofSpr i ngMassDamperSy st em 10 Desi gnandI mpl ement at i onofCompensat or s 11 Const r uct i onofapr act i cal posi t i oncont r ol l er( Har dwar e) 12 I mpl ement at i onofcl osedl oopmot orspeedcont r ol ( Temper at ur eBaseusi ng Mi cr ocont r ol l er ) 13 Tounder st andt het r ansi entr esponseofposi t i oncont r ol l er( Har dwar e) 14 Toobser v et hecommandsandi mpl ement at i onofRootl ocusandBodepl ot ( Sof t war e) 15 I mpl ement at i onofcl osedl oopspeedcont r ol ofACmot orusi ngPI D Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Lab#01 I nt r oduct i ont oMat l abi nCont r olSy st ems Obj ect i v e: I nt r oduct i ont oMATLAB br i ef l yi ncl udi ngt ut or i alofpol y nomi al s,scr i pt wr i t i ngandpr ogr ammi ngaspectofMATLABf r om cont r ol sy st emsv i ewpoi nt .To l ear nt hebasi coper at i on/ codei nt heMATLAB. Whati sMat l ab? MATLABSt andsf orMATr i xLABor at or y . MATLABi sacomput erpr ogr am t hatcombi nescomput at i onandv i sual i zat i on powert hatmakesi tpar t i cul ar l yusef ult oolf orengi neer s.I ti sanexecut i v e pr ogr am,andascr i ptcanbemadewi t hal i stofMATLABcommandsl i keot her pr ogr ammi ngl anguage. Thewi ndowsi nMATLABar e: Commandwi ndow:Commandscanbeent er ed, dat aandr esul t sar edi spl ay ed Wor kspace:l i stal lt hev ar i abl esy ouar eusi ngcommandhi st or ywi ndow:i t di spl ay sal ogoft hecommandused. Gr aphi c( Fi gur e)Wi ndow:Di spl ay spl ot sandgr aphs,cr eat edi nr esponset o gr aphi cscommands. Mf i l eedi t or / debuggerwi ndow:Cr eat eandedi tscr i pt sofcommandscal l edMf i l es. MATLAB i s a hi ghper f or mance l anguage f ort echni calcomput i ng.I t i nt egr at es comput at i on,v i sual i zat i on,and pr ogr ammi ng i n an easy t ouse env i r onment wher e pr obl ems and sol ut i ons ar e expr essed i n f ami l i ar mat hemat i cal not at i on.Ty pi cal usesi ncl ude: a)Mat handcomput at i on b)Al gor i t hm dev el opment c)Model l i ng, si mul at i on, andpr ot ot y pi ng d)Dat aanal y si s, expl or at i on, andv i sual i zat i on e)Sci ent i f i candengi neer i nggr aphi cs f )Appl i cat i ondev el opment , i ncl udi nggr aphi cal useri nt er f acebui l di ng. Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Var i abl edecl ar at i on: Thev ar i abl esar edecl ar edas: Mustst ar twi t hal et t er Maycont ai nonl yl et t er s, di gi t s, andt heunder scor e“ _ ” Mat l abi scasesensi t i v e, i . e.one&OnEar edi f f er entv ar i abl es. Forassi gni ngst at ement : Var i abl e=number ; Speci alv ar i abl es: ans: def aul tv ar i abl enamef ort her esul t pi : π=3. 1415926 NaNornan: not anumber Commandsi nv ol v i ngv ar i abl es: who: l i st st henamesofdef i nedv ar i abl es whos: l i st st henamesandsi zesofdef i nedv ar i abl es cl ear : cl ear sal l v ar i abl es, r esett hedef aul tv al uesofspeci al v ar i abl es. cl earname: cl ear st hev ar i abl ename cl c: cl ear st hecommandwi ndow cl f : cl ear st hecur r entf i gur eandt hegr aphwi ndow Mat l abi nCont r olEngi neer i ng: MATLAB i sv astt oolhav i ng one ofi t s appl i cat i ons i n CONTROL ENGI NEERI NGast hecont r olengi neer i ngi nv ol v est hedesi gnofawel l dev el oped sy st em whi chcont r ol somequant i t yaccur at el y , asr oom t emper at ur eorspeedof amot oret c.Mat l abi ncl udesmanyt ool sf orcont r ol sy st em engi neer i ng. 01:Fi ndi ngr oot sofequat i onandmaki ngofequat i onf r om r oot s? Ther oot sf unct i oncal cul at est her oot sofapol y nomi al : 1. 01: >>p=[ 1304] p= 1 3 0 4 >>r =r oot s( p) r= 3. 3553 0. 1777+1. 0773i 0. 1777-1. 0773i Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1. 02: >>p=pl oy ( r ) >>p=pol y ( r ) p= 1. 0000 3. 0000 0. 0000 4. 0000 1. 03: >>r =[ 12] r= 1 2 >>p=pol y ( r ) p= 1 3 2 >>r =[ 11111] r= 1. 04: >>r =[ 11111] r= 1 1 1 1 >>p=pol y ( r ) p= 1 5 10 10 5 1 02:Mul t i pl i cat i onoft wopol y nomi al sequat i on?Conv ol ut i onandDeconv ol ut i on of equat i ons. Pol y nomi almul t i pl i cat i onanddi v i si oncor r espondt ot heoper at i onsconv ol ut i on anddeconv ol ut i on.Thef unct i onsconvanddeconvi mpl ementt heseoper at i ons. >>a=[ 123] ; >>b=[ 456] ; >>c=conv ( a, b) c=413282718 Usedeconv ol ut i ont odi v i debackoutoft hepr oduct : >>[ q, r ]=deconv ( c, a) q=456 r= 00000 >>p=[ 3201] ; >>q=[ 12] ; >>n=conv( p, q) Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ n= 3 8 4 1 2 03:Def i ni ngv al uei nanequat i on? Thepol y v al f unct i onev al uat esapol y nomi al ataspeci f i edv al ue. >>p=[ 3201] ; >>q=[ 14] ; >>v al ue=pol y v al ( p, 2) Val ue= 33 >>v al ue=pol y v al ( n, 2) v al ue= 132 04:Obt ai ni ngdi gi t si npowerf or m? >>sqr t ( 7) ans= 2. 6458 >>sqr t ( sy m( 7) ) ans= 7^ ( 1/ 2) 05:Fi ndi ngder i v at i v eanduseofsy mscommandf ordef i ni ngv ar i abl e? 5. 01: >>sy m( 3/ 8) ans= 3/ 8 5. 02: >>sy msxy >>f =exp( x* y ) f= exp( x* y ) >>di f f ( f ) ans= y * exp( x* y ) >>di f f ( f , x) ans= y * exp( x* y ) >>di f f ( f , y ) ans= x* exp( x* y ) >>di f f ( f , x, 2) Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ans= y ^ 2* exp( x) 5. 03:Useofpr et t ycommand? >>sy msxyz >>z=2* si n( 2* x* y ) SS z= 2* si n( 2* x* y ) >>di f f ( z, x, 2) ans= 8* si n( 2* x* y ) * y ^ 2 >>di f f ( z, y , 2) ans= 8* si n( 2* x* y ) * x^ 2 >>sy msxyzt >>f =2* exp( t ) 2* exp( 2* t ) f= 2* exp( t ) 2* exp( 2* t ) >>pr et t y ( f ) 2exp( t )-2exp( 2t 06:Pol y nomi alDer i v at i v es Thepol y derf unct i oncomput est heder i v at i v eofanypol y nomi al .Toobt ai nt he der i v at i v eoft hepol y nomi al >>p=[ 1025]>>q=pol y der ( p) q=302 pol y deral socomput est heder i v at i v eoft hepr oductorquot i entoft wo pol y nomi al s.Forexampl e, cr eat et wopol y nomi al saandb: >>a=[ 135] ; >>b=[ 246] ; Cal cul at et heder i v at i v eoft hepr oducta* bbycal l i ngpol y derwi t hasi ngl eout put ar gument : >>c=pol y der ( a, b) c= 8305638 Cal cul at et heder i v at i v eoft hequot i enta/ bbycal l i ngpol y derwi t ht woout put ar gument s: >>[ q, d]=pol y der ( a, b) q= 282 d= 416404836 q/ di st her esul toft heoper at i on. Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 07:Mat r i cesOper at i on: Mat r i cesi nMATLAB: I nMATLAB, amat r i xi sar ect angul arar r ayofnumber s.Speci almeani ngi s somet i mesat t achedt o1by 1mat r i ces,whi char escal ar s,andt omat r i ceswi t h onl yoner ow orcol umn,whi char ev ect or s.MATLABhasot herway sofst or i ng bot hnumer i candnonnumer i cdat a, buti nt hebegi nni ng, i ti susual l ybestt ot hi nk ofev er y t hi ngasamat r i x.Theoper at i onsi nMATLABar edesi gnedt obeas nat ur alaspossi bl e.Wher eot herpr ogr ammi ngl anguageswor kwi t hnumber s oneatat i me, MATLABal l owsy out owor kwi t hent i r emat r i cesqui ckl yandeasi l y . Def i ni ngaMat r i c: Amat r i xi sdef i nedasf ol l owsi nMATLAB: >>M =[ 100; 0j 1; j j +13] >>k=[ 2. 75] Wher e‘ M’ i s3rdor dermat r i xand‘ k’ i s1stor der . Remov i ngaRoworCol umn: Tor emov ear owf r om amat r i xweusef ol l owi ngcommand: Consi deramat r i x‘ M’ wher e >>M =[ 174; 536; 745] Tor emov e2ndr ow, >>M( 2, : ) =[ ] Nowr emov i ng3r dcol umn >>M( : , 3) =[ ] Mul t i pl i cat i onofmat r i x( el ementbyel ement ) Consi dert womat r i x‘ x’ &‘ y ’ t omul t i pl yt hem weuse: >>X=x. * y Wher e‘ X’ i st heanswer Mul t i pl i cat i onofmat r i x( whol emat r i x) Consi der i ngt womat r i x‘ X’ &‘ Y’ Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >>Z=X* Y Di v i si onofmat r i x Todi v i det womat r i x‘ A’ &‘ B’ Adi vB=A/ B( r i ghtdi v i si on) Bdi vA=A\ B( l ef tdi v i si on) I nv er seofamat r i x Let ’ sf i ndi nv er seofamat r i x‘ X’ : i nv X=( A/ B){ def i nedabov e) LabTask/ LabExer ci se Pr obl em #01: I fCi sagi v enMat r i x [ ] 147 963 258 a)Whati st hesi zeofC? b)Whati st hev al ueofC( 3, 2) ? Pr obl em #02: Asy st em of3l i nearequat i onswi t h3unknowns( x1, x2, x3) : 3x1+2x2x3=10 x1+3x2+2x3=5 x1x2x3=1 a)Fi ndt heMat r i xA, b&x? b)Whati st hesi zeofb? c)Fi ndt hev al uesofx1,x2,&x3? Pr obl em #03: Consi dert het wopol y nomi al sp( s) =s2+2s+1andq( s) =s+1. UseMATLABt ocomput e a)p( s) * q( s) b)Root sofp( s)andq( s) Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c)p( 1)andq( 6) Pr obl em #04: UseMATLABcommandt of i ndt hepar t i al f r act i onoft hef ol l owi ng. B( s) 2s3+5s2+3s+6 = A( s) s3+6s2+11s+6 Pr obl em #05: Fi ndt he1st, 2nd&3rdder i v at i v eoft hef ol l owi ngequat i ons/ f unct i onsw. r . txas wel l asw. r . tyal so. a)2 cos3xy 3xy z b)e 3 2 x +3xc)2 5x+4 Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Lab#02 Lapl aceTr ansf or mat i ont ocheckt he st abi l i t yofaLTISy st em Obj ect i v e: Toobt ai nt het r ansf erf unct i onf ort hegi v enf unct i oni nt i medomai n, al so t of i ndoutt hest abi l i t yofasy st em. Theor y : ALi nearTi meI nv ar i antSy st emsi sst abl ei ft hef ol l owi ngt wonot i onsof sy st em st abi l i t yar esat i sf i ed i ) When t hesy st em i sexci t ed byBounded i nput ,t heout puti sal so a Boundedout put . i i )I nt heabsenceoft hei nput , t heout putt endst owar dszer o, i r r espect i v eof t hei ni t i al condi t i ons. Thef ol l owi ngobser v at i onsar egener alconsi der at i onsr egar di ngsy st em st abi l i t yandar e i )I fal l t her oot soft hechar act er i st i cequat i onhav enegat i v er eal par t s, t hen t hei mpul ser esponsei sboundedandev ent ual l ydecr easest ozer oand t hensy st em i sst abl e. i i )I fanyr ootoft hechar act er i st i cequat i onhasaposi t i v er ealpar t ,t hen sy st em i sunst abl e. i i i )I ft hechar act er i st i cequat i onhasr epeat edr oot sont hej ωaxi s,t hen sy st em i sunst abl e. i v )I foneormor enonr epeat edr oot soft hechar act er i st i cequat i onont hej ω axi s, Lapl aceandi nv er seLapl ace: L=l apl ace( F)i st heLapl acet r ansf or m oft hescal arsy mbolFwi t hdef aul t i ndependentv ar i abl et .Thedef aul tr et ur ni saf unct i onofs.TheLapl acet r ansf or mi s appl i edt oaf unct i onoftandr et ur nsaf unct i onofs. f ( t ) Lapl ( s) ace F LTImodel s: Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ The Cont r ol Sy st em Tool box sof t war e pr ov i des cust omi zed dat a st r uct ur es,knownasLTImodelobj ect s,f oreacht y peofmodel :t f ,zpk,ss,and f r d.TheseLTImodelobj ect sencapsul at et hemodeldat a.Theyal l ow y out o mani pul at eLTIsy st emsassi ngl eent i t i esr at hert hancol l ect i onsofdat av ect or s ormat r i ces. Dependi ngont het y peofmodel y ouuse, t hedat af ory ourmodel cani ncl ude: i ) Oneormor enumer at or / denomi nat orpai r sf ort r ansf erf unct i ons i i )Zer osandpol esf orzer opol egai nmodel s Tr ansf erf unct i onModel s: Pol es and Zer os ofa sy st em gi v es y ou t he i nf or mat i on ofsy st em behav i ouratanypoi ntl i ke sy st em set t l i ng t i me,peak t i me and mor eov er pr ov i desav er yusef ul i nf or mat i onaboutt hest abi l i t yofaSy st em. Acont i nuoust i met r ansf erf unct i oni npol y nomi al f or mi sgi v enby : T. F=G( s) / H( s) Wher e,G( s)andH( s)ar et wopol y nomi al s.Put tH( s)=0,t henr oot soft hi s pol y nomi alwi l lgi v esy out hesy st em Pol eandput tG( s)=0,t her oot soft hi s pol y nomi al wi l l gi v esy out hesy st em Zer os. 01:Tof i ndLapl aceofcont i nuoust i mef unct i on? 1. 01: >>sy mst >>f =t ^ 4 >>F=l apl ace( f ) f= t ^ 4 F= 24/ s^ 5 1. 02: >>sy mst >>f =exp( 5* t ) >>F=l apl ace( f ) f= exp( 5* t ) F= 1/ ( s+5) Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1. 03: >>sy mswt >>f =si n( w* t ) >>F=l apl ace( f ) f= si n( t * w) F= w/ ( s^ 2+w^ 2) 02:Cr eat eat r ansf erf unct i onmodeli npol y nomi al . 2. 01: >>G=t f ( num, den) Forexampl e, cr eat et het r ansf erf unct i onG( s)=s/ ( s2+2s+1) , usi ng: >>G=t f ( [ 10] , [ 121] ) ; 2. 02: G( s)=6S2+1/S3+3S2+3S+1 >>num=[ 601] >>denum=[ 1331] >>g=t f ( num, denum) >>z=r oot s( num) >>p=r oot s( denum) >>[ z, p, k] =t f 2zpk( num, denum) >>h=zpk( g) >>[ num, denum] =zp2t f ( z, p, k) >>pzmap( num, denum) 2. 03: G( s)=S2+2S+3/ S3+2S23S+1 >>sy mss >>num=s^ 2+2* s+3 >>denum=s^ 3+2* s^ 23* s+1 >>g=num/ denum 2. 04: G( s)=S2+6S+8/S5+8S4+23S3+35S2+28S+3 >>num=[ 168] Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >>denum=[ 182335283] >>f =t f ( num, denum) >>pr i nt sy s( num, denum) >>[ z, p, k] =t f 2zpk( num, denum) >>pzmap( num, denum) LabTask/ LabExer ci se Pr obl em #01: Fi ndoutt heLapl aceoft hef ol l owi ngcont i nuoust i mesi gnal s? 5t a)f=e 2t 3t b)f=2e 3e 5coswt c)f=Pr obl em #02: Fi ndoutt hei nv er seLapl aceoft hef ol l owi ngt r ansf erf unct i on? 4w s+4w2 1 b)F= 2 s 1 3 5 c)F= - + s+2 s+5 s3 a)F= 2 Pr obl em #03: Fi ndt hepol eandZer osofSy st em anddr awi nSpl anusi ngMat l ab.I f : a)G( s) =6s2+1/ ( s3+3s2+3s+1) b)H( s) =( s+1) ( s+2/ ( ( s+2i ) ( s2i ) ( s+3) ) c)E( s) =G( s) / H( s) d)Fi ndPol esandZer osofG( s) , H( s)&E( s) . Pr obl em #04: Fi ndt hepol es&zer osoft hef ol l owi ngt r ansf erf unct i oni nt heMat l ab. Wher e n1=s+1; Li nearCont r ol Sy st em H( s)=( n1* n2) / ( d1* d2* d3) n2=s+2; Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ d1=s+2i ; d2=s2i ; d3=s+3; Andal sodr awpol ezer omap. Lab#03 I mpl ement at i onofBl ockDi agr am Reduct i on andOper at i ononLTImodel si nMat l ab Obj ect i v e: Toobt ai nt r ansf erf unct i onofgi v ensy st em usi ngbl ockdi agr am r educt i on t echni que. Gener alDescr i pt i on: Bl ockdi agr am consi stofuni di r ect i onaloper at i onalbl ockt hatr epr esent t he t r ansf erf unct i on oft he v ar i abl e oft he i nt er est .The bl ockdi agr am of r epr esent at i onofagi v ensy st em of t encanber educedt oasi mpl i f i edbl ock di agr am wi t hf ewerbl ockst hanor i gi nal bl ock. Agr aphi calt oolcanhel psust ov i sual i zet hemodelofsy st em andev al uat et he mat hemat i calr el at i onshi pbet weent hei rel ement s,usi ngt her et r ansf erf unct i on. I tr epr esent st hemat hemat i cal r el at i onshi pbet weent heel ement soft hesy st em. Oper at i ononLTImodel : Theoper at i onst hatcanbeper f or medont heLTImodel sar e i ) Addi t i onofLTIModel s. i i )Subt r act i onofLTIModel s. i i i )Mul t i pl i cat i onofLTIModel s. i v )FeedbackandOt herI nt er connect i onFunct i ons. v )Cont i nuous/ Di scr et eConv er si onsofLTIModel s. Par al l elconf i gur at i on/Addi t i onofLTIModel s: I ft het wobl ocksar econnect edasshownbel owt hent hebl ocksar esai d t obei npar al l el .I twoul dl i keaddi ngt wot r ansf erf unct i onsAddi ngLTImodel si s Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ equi v al entt oconnect i ngt hem i npar al l el .Speci f i cal l y , t heLTImodel >>sy s=sy s1+sy s2 Repr esent st hepar al l el i nt er connect i onshownbel ow Sy st em 1 U( s) Y( s) Sy st em 2 G1( s)=sy s1 Y( s) T( s)= = U( s) G2( s)=sy s2 [ sy s] =par al l el ( sy s1, sy s2) >>sy s1=1/ ( s+2) >>sy s2=2/ ( s+3) >>num1=[ 1] >>den1=[ 12] >>num2=[ 2] >>den2=[ 13] >>sy s1=t f ( num1, den1) >>sy s2=t f ( num2, den2) >>sy s=sy s1+sy s2 Subt r act i onofLTIModel s: Thesubt r act i onoft woLTImodel si sdepi ct edbyt hef ol l owi ngbl ock di agr am. >>sy s=sy s1-sy s2 Sy st em 1 y 1 U Y Sy st em 2 y 2 sy s Ser i esconf i gur at i on/Mul t i pl i cat i onofLTIModel s: I ft het wobl ocksar econnect edasshownbel owt hent hebl ocksar esai d Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ t obei nser i es.I twoul dl i kemul t i pl y i ngt wot r ansf erf unct i ons.TheMATLAB commandf ort heconf i gur at i oni s“ ser i es” . Mul t i pl i cat i onoft woLTImodel sconnect st hem i nser i es.Speci f i cal l y , >>sy s=sy s1* sy s2 r et ur nsanLTImodel f ort heser i esi nt er connect i onshownbel ow; Sy st em 1 U( s) T( s)= Y( s) = U( s) Sy st em 2 G1( s)=sy s1 Y( s) G2( s)=sy s2 [ sy s] =ser i es( sy s1, sy s2) Feedbacki nLTIModel s: Thecl osedl oopmodel sy shasuasi nputv ect orandyasout putv ect or . TheLTImodel ssy s1andsy s2mustbebot hcont i nuousorbot hdi scr et ewi t h i dent i cal . >>sy s=f eedback( sy s1, sy s2) u Toappl yposi t i v ef eedback, uset hesy nt ax >>sy s=f eedback( sy s1, sy s2, +1) sy s 1 sy s 1 Wr i t et heMat l abcodef orLTImodel sgi v enbel ow G G >>n1=[ 10] ; >>d1=[ 11] ; >>n2=[ 02] ; Li nearCont r ol Sy st em y Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >>d2=[ 13] ; >>sy s1=t f ( n1, d1) >>sy s2=t f ( n2, d2) >>sy s=sy s1* sy s2 >>f eedback( sy s1, sy s2) >>f eedback( sy s1, sy s2, +1) >>f eedback( sy s1, 1) >>f eedback( 1, sy s1) >>sy s=[ sy s1; sy s2] Modeli nt er connect i onFunct i on: >>Sy s=[ sy s1, sy s2]Hor i zont al Concat enat i on >>Sy s=[ sy s1; sy s2]Ver t i cal concat enat i on >>Sy s=append( sy s1, sy s2)bl ockdi agonal append El ect r i cTr act i onMot or : Wr i t eMatl abcodef ort hef ol l owi ngEl ect r i cTr act i onMot orBl ockDi agr am? G3 G1 G2 540 10 ( s+1) 1 ( 2s+0. 5) G4 0. 1 >>num1=[ 10] ; >>den1=[ 11] ; >>num2=[ 1] ; >>den2=[ 20. 5] ; >>num3=[ 540] ; >>den3=[ 1] ; >>num4=[ 0. 1] ; >>den4=[ 1] ; >>[ a, b] =ser i es( num1, den1, num2, den2) ; >>[ c, d] =f eedback( a, b, num4, den4, 1) ; >>[ e, f ] =ser i es( c, d, num3, den3) ; >>[ g, h] =cl oop( e, f , 1) ; >>pr i nt sy s( g, h) num/ den= Li nearCont r ol Sy st em 5400 Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 2s^ 2+2. 5s+5401. 5 Toseet hest epr esponseandanal y zet hesy st em behav i our . >>t =[ 0: 0. 005: 3] ; >>[ y , x, t ] =st ep( g, h, t ) ; >>pl ot ( t , y ) >>gr i don >>xl abel ( ' Ti mei nsecond' ) >>y l abel ( ' wheel v el oci t y ' ) LabTask/ LabExer ci se Pr obl em #01: Wr i t ecodef oraddi t i on,subt r act i on,r i ghtdi v i si on,l ef tdi v i si onandmul t i pl i cat i on 4 0. 5 oft wosy st ems?Sy s1i sf( t )=tandsy s2i st ? Pr obl em #02: Gi v ef eedbackt osy s2ofsy s1andf eedbackt osy s1ofsy s2? Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Pr obl em #03: Fort hef ol l owi ngmul t i l oopf eedbacksy st em,getcl osedl oopt r ansf erf unct i on andt hecor r espondi ngpol ezer omapoft hesy st em. Wher e: G1=1/ s2+s; s+1/ s+6: G2=1/ s+1; H1=s+1/ s+2; H2=2: H3=1 G3=s2+1/ s2+4s+4: G4= H2 R( s) G1 G2 G3 G4 H1 H3 Li nearCont r ol Sy st em Y( s) Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Lab#04 Char act er i st i csofcont r olsy st em open l oopandcl osedl oop ARMATURECONTROLLEDDCMOTORWI THDI STRI BUTI ONLOADTd, SPEEDTACHOMETERSYSTEM + - 1/ RA( S) I a( s) KM KB Openl oopdi st ur bancest epr esponse: >>r a=1;km=10; j =2; f =. 5; kb=. 1; ka=54; kt =1; n1=[ 1] ; d1=[ j f ] ; >>n2=[ ( kb* km) / r a] ; >>d2=[ 1] ; >>[ num den] =f eedback( n1, d1, n2, d2) num =0 1 den=2. 0000 1. 5000 >>num=num Li nearCont r ol Sy st em t m( s) + - 1/ j s+f Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ num =0 1 >>pr i nt sy s( num, den) num/ den= 1 2s+1. 5 >>t =0: 1: 10; >>[ y , x, t ] =st ep( num, den) ; >>pl ot ( t , y ) >>t i t l e( ' openl oopdi st ur bancest epr esponse' ) >>xl abel ' sec' >>y l abel ' speed' >>gr i don Cl osedl oopdi st r i but i onsy st em: R a ka Va ( s) 1 r a kb I NPUT: >>n1=[ 1] ; >>d1=[ j f ] ; >>n2=[ ( ka* kt ) ] ; >>d2=[ 1] ; >>n3=[ kb] ; >>d3=[ 1] ; >>n4=[ km/ r a] ; >>d4=[ 1] ; >>[ ab] =par al l el ( n2, d2, n3, d3) a=54. 1000 b=1 >>[ cd] =ser i es( a, b, n4, d4) c=541 d=1 >>[ num den] =f eedback( n1, d1, c, d) num =0 1 den=2. 0000541. 5000 Li nearCont r ol Sy st em 1 j s+f km Td( s ) Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >>num=num num =0 1 >>pr i nt sy s( num, den) num/ den= 1 2s+541. 5 >>t =0: 1: 10; >>[ y , x, t ] =st ep( num, den) ; >>pl ot ( t , y ) >>t i t l e( ' cl osel oopdi st ur bancest epr esponse' ) >>xl abel ' t i me' >>y l abel ' speed' ) ; s>>gr i don LabTask/ LabExer ci se Sy t em Sensi t i v i t yofPl antVar i at i onEngl i shBor i ngMachi nes I NPUT: k=50 num=[ 1120] denum=[ 112k] w=[ 0. 1: 0. 05: 20] s=w* i n=s. ^ 2+12* s Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ d=s. ^ 2+12* s+k s=n. / d n2=12* s d2=k s2=n2. / d2 subpl ot ( 1, 2, 1) pl ot ( r eal ( s) , i mag( s) ) t i t l e( ' sy st em sensi t i v i t yt opl antv ar i at i ons' ) xl abel ( ' r eal ( s) ' ) y l abel ( ' i mag( s) ' ) gr i don subpl ot ( 1, 2, 2) pl ot ( w, abs( s) , w, abs( s2) ) xl abel ( ' w[ r ad/ sec] ' ) y l abel ( ' abs( s) ' ) t i t l e( ' magni t udeoft hesy st em' ) gr i don OUTPUT: Fi ndt het r ansf erf unct i onandshowt hest epr esponseoft heRLCci r cui t ( r esonanceci r cui t ) . Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ BYUSI NGSTATESPACEREPRESENTATI ON: 0 1 1 R X + L U( X= 1 T) LC L 0 ⌈ ⌉ ⌊⌋ Y=[ 1 0]X +0 R=3,L=1andC=1/ 2 I NPUT R=3 C=1/ 2 L=1 A=[ 01; 1/ L* CR/ L; ] B=[ 0; 1/ L] C=[ 10] D=[ 0] sy s=ss( A, B, C, D) st ep( sy s) STEPRESPONSEOFRLCCI RCUI T: Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ OBSERVATI ON: …………………………………………………………………………… ………………………………………………………………………………………………………………………………………… …………………………………………………………………………………………… Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Lab#05 I mpl ement at i onofPI Dcont r ol l erv i a commands Obj ect i v e: Toobser v et heef f ectofdi f f er entcont r ol l eronRi set i me,Ov er shoot , Set t l i ngt i meandSt eadySt at eer r or . Pr ocedur e: Thet r ansf erf unct i onofPI Dcont r ol l erl ooksl i ket hef ol l owi ng Kp+Ki / s+Kd* s Wher eKpi st hepr opor t i onalgai n,Kdi st heder i v at i v egai nandKii s t hei nt egr algai n.Theef f ecton t hecl osedl oop r esponseofaddi ng t ot he cont r ol l ert er m Kp, Ki andKdi sl i st edbel ow ClResponse Kp Ki Kd Ri seTi me Decr eases Decr eases NoChange Ov er shoot Set t l i ngTi me SSEr r or I ncr eases NoChange Decr eases I ncr eases I ncr eases El i mi nat es Decr eases Decr eases NoChange OpenLoopSt epResponse: Let ’ st akeasecondor derpl antl i ke 1/ s^ 2+10s+20 Let sf i r stv i ewt heopenl oopst epr esponse >>num=1; >>den=[ 11020] ; >>g=t f ( num, den) >>st ep( g) Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ TheDCgai noft hepl anti s0. 05=1/ 20, so0. 05i st hef i nal v al ueoft heout put f orauni tst epi nput .Thi scor r espondst oast eadyst at eer r orof0. 95, qui t el ar ge i ndeed.Fur t her mor e, t her i set i mei saboutonesecondandset t l i ngt i mei sabout 1. 5second.Mostl i kel y , t her esponsewi l lnotbeadequat e.Ther ef or e, weneedt o addsomecont r ol . Pr opor t i onal Cont r ol : AsKp wi l lhel pt or educet hest eady st at eer r orand decr easest her i set i me5.Let sf i r staddapr opor t i onal cont r ol l eri nt ot hesy st em. >>num=1; >>den=[ 11020] ; >>Kp=10; >>[ numcl , denncl ] =cl oop( Kp* num, den, 1) ; >>t =0: 0. 01: 2; >>st ep( numcl , dencl , t ) num=[ 1] ; kp=10;%Changegai nandseer esponse denum=[ 11020] ; [ numcl , denumcl ] =cl oop( kp* num, denum, 1) ; t =0: 0. 01: 2; st ep( numcl , denumcl , t ) Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Now t her i set i mehasbeenr educedandt hest eadyst at eer r ori s smal l er ,i fweusegr eat erKp,t her i set i meandst eadyst at eer r orwi l lbecome ev ensmal l er .Changet heKp=200.Thi st i meweseet hatt her i set i mei snow about0. 1secondandt hest eadyst at eer r ori smuchsmal l erbutt heov er shoot hasbeenv er yl ar genow. PDCont r ol : Ther i set i mei snow pr obabl ysat i sf act or y( r i set i mei sabout0. 1 second) . Now l et ’ s add a der i v at i v e cont r ol l ert ot he sy st em t o see i ft he ov er shootcanber educed.Addanot herv ar i abl e,Kd,t ot hemf i l e,seti tequalt o 10andr et ur nt hemf i l e: >>Kp=500; >>Kd=10; >>Numc=[ KdKp] ; >>[ numCL, denCL] =cl oop( conv ( num, den) , den) ; >>st ep( numCL, denCL, t ) num=[ 1] ; kp=50;%Changegai nandseer esponse denum=[ 11020] ; [ numcl , denumcl ] =cl oop( kp* num, denum, 1) ; t =0: 0. 01: 2; st ep( numcl , denumcl , t ) Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Theov er shooti smuchl esst hanbef or e.i ti snow onl yt went yper cent i nst eadofal mostf or t y f i v eper cent .Wecannow t r yi mpr ov i ngt hatev enmor e. Tr yi ncr easi ngKdt o100, y ouwi l l seet heov er shootel i mi nat edcompl et el y . We now hav e a sy st em wi t haf astr i se t i me and no ov er shoot . Unf or t unat el y ,t her ei sst i l labouta5per centst eady st at eer r or .I twoul dseem t hataPDcont r ol l eri snotsat i sf act or yf ort hi ssy st em.Let ’ st r yaPIcont r ol l er i nst ead. PICont r ol : Aswehav eseen,pr opor t i onalcont r olwi l lr educet hest eady st at eer r or , butatt hecostofl ar gerov er shoot .Fur t her mor e,pr opor t i onalgai nwi l lnev er compl et el yel i mi nat et hest eady st at eer r or. Fort hatweneedt ot r yi nt egr al cont r ol .Let ’ si mpl ementaPIcont r ol l erandst ar twi t hasmal l ki . >>Kp=500; >>Ki =1; >>Kd=0; >>Numc[ KdKpKi ] ; >>Denc=[ 10] ; >>[ numCL, denCL] =cl oop( conv ( num, numc) , conv ( den, denc) ) ; >>st ep( numCL, denCL) Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Tr yKi =10, >>Kp=500; >>Ki =10; >>. Kd=0; >>Numc[ KdKpKi ] ; >>Denc=[ 10] ; >>[ numCL, denCL] =cl oop( conv ( num, numc) , conv ( den, denc) ) ; >>st ep( numCL, denCL) >>axi s( [ 010001. 5] ) num=[ 1] ; kp=500;%Changegai nandseer esponse denum=[ 11020] ; [ numcl , denumcl ] =cl oop( kp* num, denum, 1) ; t =0: 0. 01: 2; st ep( numcl , denumcl , t ) Fr om t het wocont r ol l er sabov e,weseet hati fwewantaf astr esponse, smal lov er shot ,andnost eady st at eer r or ,nei t heraPInoraPDcont r ol l erwi l l suf f i ce.Let ’ si mpl ementbot hcont r ol l er sanddesi gnaPI Dcont r ol l ert oseei f combi ni ngt het wocont r ol l er swi l ly i el dt hedesi r edr esponse.Recal l i ngt hat ,our PDcont r ol l ergav eusapr et t ygoodr esponseexceptf oral i t t l est eady st at eer r or . >>Kp=500; >>Ki =1; >>Kd=100; >>Numc=[ KdKpKi ] ; >>Denc[ 10] ; >>[ numCL, denCL] =cl oop( conv ( num, numc) , conv ( den, denc) ) : >>st ep( numCL, denCL) num=[ 1] ; kp=100;%Changegai nandseer esponse denum=[ 11020] ; [ numcl , denumcl ] =cl oop( kp* num, denum, 1) ; Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ t =0: 0. 01: 2; st ep( numcl , denumcl , t ) Todesi gnaPI Dcont r ol l er ,t hegener alr ul ei st oaddpr opor t i onalcont r ol t ogett hedesi r edr i set i me,addder i v at i v econt r olt ogetdesi r eov er shoot ,and t henaddi nt egr al cont r ol ( i fneeded) . Toel i mi nat et hest eady st at eer r or . Pr opor t i onal Der i v at i v eCont r ol l er : num=[ 1] ; denum=[ 11020] ; kp=100;%Youcansetr i set i me kd=10; num1=[ kdkp] ; [ numcl , denumcl ] =cl oop( conv ( num1, num) , denum) ; t =0: 0. 01: 2; st ep( numcl , denumcl , t ) Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ num=[ 1] ; denum=[ 11020] ; kp=100;%Youcansetr i set i me kd=100; num1=[ kdkp] ; [ numcl , denumcl ] =cl oop( conv ( num1, num) , denum) ; t =0: 0. 01: 2; st ep( numcl , denumcl , t ) Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ num=[ 1] ; denum=[ 11020] ; kp=500;%Youcansetr i set i me kd=100; num1=[ kdkp] ; [ numcl , denumcl ] =cl oop( conv ( num1, num) , denum) ; t =0: 0. 01: 2; st ep( numcl , denumcl , t ) PICont r ol l er : num=[ 1] ; denum=[ 11020] ; kp=500; ki =10; num1=[ kpki ] ; denum1=[ 10] ; [ numcl , denumcl ] =cl oop( conv ( num1, num) , conv ( denum1, denum) ) ; t =0: 0. 01: 2; st ep( numcl , denumcl , t ) Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ PI DCont r ol l er : num=[ 1] ; denum=[ 11020] ; kp=500; kd=100; ki =10; num1=[ kdkpki ] ; denum1=[ 10] ; [ numcl , denumcl ] =cl oop( conv ( num1, num) , conv ( denum1, denum) ) ; t =0: 0. 01: 2; st ep( numcl , denumcl , t ) Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Exer ci se: Q#1: G( s)=F( s)/X( s)=1/( ms^ 2+bs+k) Cal cul at et hewav ef or msf ordi f f er entv al uesofm, bandk, whenr ampi nputi s appl i ed. Case1: El i mi nat espr i ng( k=0)wher em =1andb=1 Case2: El i mi nat edampi ng( b=0)wher em =1andk=5 Case3: El i mi nat emass( m=0)wher eb=1andk=5 Obser v et hewav ef or msf ordi f f er entv al uesofm, bandk, whenst epi nputi s appl i ed. Case1: El i mi nat espr i ng( k=0)wher em =1andb=1 Case2: El i mi nat edampi ng( b=0)wher em =1andk=5 Case3: El i mi nat emass( m=0)wher eb=1andk=5 Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Lab#06 I mpl ement at i onofPI Dcont r ol l erv i a si mul i nk Obj ect i v e: Toknowaboutt hesi mul i nkbasi csandknowhowt ocr eat eamodel . Pr ocedur e: Si mul i nki sagr aphi calext ensi ont oMATLABf ormodel i ngandsi mul at i on ofsy st ems.I nSi mul i nk,sy st emsar edr awnonscr eenasbl ockdi agr ams.Many el ement sofbl ockdi agr amsar eav ai l abl e,suchast r ansf erf unct i ons,summi ng j unct i ons et c.Si mul i nk i si nt egr at ed wi t h MATLAB and dat a can be easi l y t r ansf er r edbet weent hepr ogr ams. Thesi mpl emodelconsi st soft hr eebl ocks:St ep,t r ansf erf unct i on,and scope.Thest epi sasour cebl ockf r om whi chast epi nputsi gnalor i gi nat es.Thi s si gnali st r ansf er r edt hr ought hel i nei nt hedi r ect i oni ndi cat edbyt hear r owt ot he t r ansf erf unct i onl i nearbl ock.Thet r ansf erf unct i onmodi f i est hei nputsi gnal gi v esanew si gnalont hel i net ot hescope.Thescopei sasi nkbl ockusedt o di spl ayasi gnal muchl i keanosci l l oscope. Pr opor t i onal Cont r ol : Thepr opor t i onal gai ncanbeusedasi nt hemodel Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Out putGr aph: Forgai n10: Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Out putGr aph: ForGai n50 Out putGr aph: Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ForGai n100: Out putGr aph: Gai n150: Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Out putGr aph: Nowr i set i mei ssmal l erbutov er shooti spr oducedsot odecr easet heov er shoot weuseder i v at i v ecompensat or . PDCont r ol : beusedas Thepr opor t i onalandder i v at i v ecompensat orcanbeusedascan Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Out putGr aph: Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Out putGr aph: Af t ercont r ol l i ngr i set i meov er shootandset t l i ngt i menowcomet owor ds t hei nt egr al cont r ol t oel i mi nat et hest eadyst at eer r or . PICont r ol : Thepr opor t i onal andi nt egr al compensat orcanbeusedas Out putGr aph: Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Out putGr aph: Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Nowcombi net het hr eecompensat or st oseet hewhol er esul t . PI DCont r ol : Out putGr aph: Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Out putGr aph: Out putGr aph: Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Exer ci se: Q#1: G( s)=F( s)/X( s)=1/( ms^ 2+bs+k) Cal cul at et hewav ef or msf ordi f f er entv al uesofm,bandk,whenr ampi nputi s appl i ed. Case1: El i mi nat espr i ng( k=0)wher em =1andb=1 Case2: El i mi nat edampi ng( b=0)wher em =1andk=5 Case3: El i mi nat emass( m=0)wher eb=1andk=5 Obser v et hewav ef or msf ordi f f er entv al uesofm,bandk,whenst epi nputi s appl i ed. Case1: El i mi nat espr i ng( k=0)wher em =1andb=1 Case2: El i mi nat edampi ng( b=0)wher em =1andk=5 Case3: El i mi nat emass( m=0)wher eb=1andk=5 Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Lab#07 TOI MPLEMENTTHEROOTLOCUSTECHNI QUEI N MATLAB Obj ect i v e: Byusi ngt heknowl edgepr ov i dedbyt heopenl ooppol esandopenl oop zer ost heper f or manceandst abi l i t yoft hesy st em canbef ound Theor y : I ncont r ol t heor yandst abi l i t yt heor y , r ootl ocusanal y si si sagr aphi cal met hodf orexami ni nghowt her oot sofasy st em changewi t hv ar i at i onofa cer t ai nsy st em par amet er , commonl yagai nwi t hi naf eedbacksy st em.Thi s t echni quei sv er yusef ul t of i ndt hest abi l i t yi nf or mat i onandal sopr ov i desv er y usef ul i nf or mat i onaboutsy st em par amet er s.Asonesay si fy oucanmeasur ei t, y oucancont r ol i tsot hi st echni quei sv er yusef ul i nt hi sr egar d. RootLocusAnal y si s: 1.Ther oot soft heoft hecl osedl oopchar act er i st i cequat i ondef i net he sy st em char act er i st i cr esponses. 2.Thei rl ocat i oni nt hecompl exspl anel eadt opr edi ct i onoft he char act er i st i csoft het i medomai nr esponsesi nt er msof : I . Dampi ngr at i on, I I . Nat ur al f r equency , wn I I I . Dampi ngconst ant , f i r st or dermodes I V. Consi derhowt heser oot schangeast hel oopgai ni sv ar i edf r om 0t o Basi csofRootLocus: • Sy mmet r i cal aboutr eal axi s • RLbr anchst ar t sf r om OLpol esandt er mi nat esatOLzer oes • No.ofRLbr anches=No.ofpol esofOLTF • Cent r oi di scommoni nt er sect i onpoi ntofal l t heasy mpt ot esont her eal axi s • Asy mpt ot esar est r ai ghtl i neswhi char epar al l el t oRLgoi ngt o∞ and meett heRLat∞ • No.ofasy mpt ot es=No.ofbr anchesgoi ngt o∞ • AtBr eakAwaypoi nt, t heRLbr eaksf r om r eal axi st oent eri nt ot he compl expl ane • AtBIpoi nt , t heRLent er st her eal axi sf r om t hecompl expl ane Equat i oncanbewr i t t enas 1+K* ( num/ den) =0 Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Wher enum i st henumer at oroft hepol y nomi al anddeni st hedenomi nat or pol y nomi al , andKi st hegai n( K>0) .Thev ect orKcont ai nsal l t hegai nv al ues f orwhi cht hecl osedl ooppol esar et obecomput ed. Ther ootl oci i spl ot t edbyusi ngt heMATLAB commandr l ocus( num, den) Thegai nv ect orKi ssuppl i edbyt heuser . Themat r i xrandgai nv ect orKar eobt ai nedbyt hef ol l owi ngMATLAB commands: [ r , k]=r l ocus( num, den) [ r , k]=r l ocus( num, den, k) [ r , k]=r l ocus( A, B, C, D) [ r , k]=r l ocus( A, B, C, D, K)( 3. 23) [ r , k]=r l ocus( sy s Forpl ot t i ngt her ootl oci , t heMATLABcommandpl ot( r , ‘ ‘ )i sused.Thef ol l owi ngMATLABcommandar eused f orpl ot t i ngt her ootl oci wi t hmar k‘ 0’ or‘ x’ : r=r l ocus ( num, den)pl ot( r , ‘ 0’ )orpl ot( r , ‘ x’ )Exampl e#01: G( s) H( s) =K( s+1) / s( s+2) ( s+3) >>num=[ 11] ; >>denum=[ 1560] ; >>GH=t f ( num, denum) GH= s+1 s^ 3+5 s^ 2+6s >>pzmap( num, denum) >>r l ocus( num, denum) Exampl e#02: Consi dert hesy st em showni nFi gur e. Pl otr ootl oci wi t hasquar e aspectr at i osot hatal i newi t hsl ope1i sat r ue45"l i ne.Chooset her egi onofr oot l ocuspl ott obe6≤x≤6 &6≤y ≤6wher exandyar et her eal axi scoor di nat eand i magi nar y axi scoor di nat e, r espect i v el y . Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ >>a=[ 110] ; >>b=[ 1416] ; >>c=conv ( a, b) c= 1 5 20 16 0 >>denum=c denum = 1 5 20 16 0 >>num=[ 13] ; >>denum denum = 1 5 20 16 0 >>pzmap( num, denum) >>r l ocus( num, denum) >>v =[ 6666] v= 6 6 6 6 >>axi s( v ) ; axi s( ' squar e' ) ; >>gr i d; >>t i t l e( ' RootLocusPl otofG( s) ' ) Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ LabTask/ LabExer ci se Pr obl em #01: C( s) =k/ s3+8s2+10s+1i )Pl ott her oot l ocusi i )Fi ndt heVal uewher e dampi ngr at i oi s0. 707. Pr obl em #02: Apl antt obecont r ol l edi sdescr i bedbyat r ansf erf unct i on 2 G( s)=s+5/ s +7s+25 Obt ai nt her ootl ocuspl otusi ngMATLAB. Pr obl em #03: Consi dert hesy st em whoseopenl oopt r ansf erf unct i onG( s) H( s)i s G( s) H( s) =K/ s( s+0. 5) ( s2+0. 6s+10) Ther ear enoopenl oopzer os.Openl ooppol esar el ocat edats=0. 3+j 3. 1480, s=0. 3-j 3. 1480, s=0. 5, ands=0. Obt ai nt her oot l ocuspl ot . Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Lab#08 Tounder st andt hef r equencyr esponseofa cont r olsy st em usi ngBodePl ot&Ny qui stPl ot Obj ect i v e: Tof i ndt hegai nmar gi nandphasemar gi nofasy st em.Tounder st andt he conceptofgai ncr ossov erandphasecr ossov erf orst abi l i t y . Theor y : ABodedi agr am consi st soft wogr aphs:Onei sapl otoft hel ogar i t hm of t hemagni t udeofasi nusoi dalt r ansf erf unct i on;t heot heri sapl otoft hephase angl e;bot har epl ot t edagai nstt hef r equencyonal ogar i t hmi cscal e.Bodepl ot s ar eav er yusef ulwayt or epr esentt hegai nandphaseofasy st em asaf unct i on off r equency .Thi si sr ef er r edt oast hef r equencydomai nbehav i ourofasy st em. Bodecomput est hemagni t udeandphaseoft hef r equencyr esponseof LTImodel s.Wheny oui nv oket hi sf unct i onwi t houtl ef t si dear gument s,bode pr oducesaBodepl otont hescr een.Themagni t udei spl ot t edi ndeci bel s( dB) , andt hephasei ndegr ees.Thedeci belcal cul at i onf ormagi scomput edas 20l og10magni t udeofH( j w) ,wher eH( j w)i st hesy st em' sf r equencyr esponse. Youcanusebodepl ot st oanal y zesy st em pr oper t i essuchast hegai nmar gi n, phasemar gi n, DCgai n, bandwi dt h, di st ur bancer ej ect i on, andst abi l i t y . Thecommandbodecomput esmagni t udesandphaseangl esoft hef r equency r esponseofcont i nuoust i me, l i near , t i mei nv ar i antsy st ems.Whent hecommand bode ( wi t houtl ef t hand ar gument s)i s ent er ed i nt he comput er ,MATLAB pr oducesaBodepl otont hescr een.Mostcommonl yusedbodcommandsar e bode( num, denum) bode( num, denum, w) bode( A, B, C, D) bode( A, B, C, D, w) bode( sy s) Exampl e#01: G( s)=25/ ( s2+4s+25 >>num=[ 25] ; >>denum=[ 1425] ; >>G=t f ( num, denum) G= 25 Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ s^ 2+4s+25 >>bode( num, denum) >>gr i don >>bode( G) >>mar gi n( G) >>[Gm, Pm, Wcp, Wcg] =mar gi n( G) Exampl e#02: G( s)=9( s2+0. 2s+1)/ s( s2+1. 2s+9) >>num=[ 91. 89] ; >>denum=[ 11. 290] ; >>G=t f ( num, denum) G= 9s^ 2+1. 8s+9 s^ 3+1. 2s^ 2+9s >>bode( num, denum) >>gr i don >>bode( G) >>mar gi n( G) >>[Gm, Pm, Wcp, Wcg] =mar gi n( G) Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Exampl e#03: G( s)=1/ ( s2+0. 8s+1) >>num=[ 1] ; >>denum=[ 10. 81] ; >>G=t f ( num, denum) G= 1 s^ 2+0. 8s+1 >>ny qui st ( num, denum) Exampl e#04: Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ G( s)=1/s( s+1) >>num=[ 1] ; >>denum=[ 110] ; >>G=t f ( num, denum) G= 1 s^ 2+s >>ny qui st ( num, denum) LabTask/ LabExer ci se Pr obl em #01: Obt ai nBodeandNy qui stpl otf ort hegi v enopenl oopt r ansf erf unct i oni s G( s)=50/ ( s3+9s2+30s+40) Pr obl em #02: Obt ai nBodeandNy qui stpl otf ort hegi v enopenl oopt r ansf erf unct i oni s 2 2 G( s)=1/ ( s+4s) ( s+4s+13) Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Lab#09 Model i ngofSPRI NGMASSDAMPERSYSTEM OBJECTI VE: Toknowaboutt hemodel soft hemechani cal andel ect r i cal sy st ems: - Letf=appl i edf or ce f m =opposi ngf or ceduet omass 2 dx ByNewt on‘ ssecondl awher ef m =f=M 2 dt Mechani cal Rot at i onalSy st ems LetT=appl i edt or que Tj =opposi ngt or queduet omomentofi ner t i aoft hebody ByNewt on‘ sl aw 2 dθ T=Tj=J 2 dθ Model i ngofel ect r i calsy st em El ect r i calci r cui t si nv ol v i ng r esi st or s,capaci t or s and i nduct or s ar e Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ consi der ed.Thebehav i ourofsuchsy st emsi sgov er nedbyOhm‘ sl awand Ki r chhof f ‘ sl aws Consi derar esi st anceofRΩcar r y i ngcur r entiAmpsasshowni nFi g, t hen t hev ol t agedr opacr ossi ti sV=RI Consi derani nduct orLHcar r y i ngcur r enti Ampsasshowni nFi g, t hent he v ol t agedr opacr ossi tcanbewr i t t enasv=Ldi / dt Consi deracapaci t orCFcar r y i ngcur r entiAmpsasshowni nFi g, t hent he ∫ i v ol t agedr opacr ossi tcanbewr i t t enasv=( 1/ C) dt Quest i onno01: Spr i ngmasssy st em Model :Wr i t et heMat hemat i cal model si mul at i onofspr i ng massdampersy st em usi ngMATLAB? MATLABCODE: y o=0. 15 wn=sqr t ( 2) zet a1=3/ ( 2* sqr t ( 2) ) zet a2=1/ ( 2* sqr t ( 2) ) t =[ 0: 0. 001: 10] t 1=acos( zet a1) * ones( 1, l engt h( t ) ) t 2=acos( zet a2) * ones( 1, l engt h( t ) ) c1=y o. / sqr t ( 1( zet a1) ^ 2) Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ c2=y o. / sqr t ( 1( zet a2) ^ 2) y 1=c1. * exp( zet a1* wn* t ) . * si n( wn* sqr t ( 1( zet a1) ^ 2) * t +t 1) y 2=c2. * exp( zet a2* wn* t ) . * si n( wn* sqr t ( 1( zet a2) ^ 2) * t +t 2) pl ot ( t , y 1, ' r ' , t , y 2, ' b' ) bu=c2. * exp( zet a2* wn* t ) pl ot ( t , y 1, ' m' , t , y 2, ' k' , t , bu, ' k' ) bl =bu pl ot ( t , y 1, ' r ' , t , y 2, ' k' , t , bu, ' m' , t , bl , ' y ' ) t i t l e( ' phy si cal sy st em' ) xl abel ( ' t i me' ) y l abel ( ' ampl i t ude' ) Gr aph: - Quest i onno02: Li nearCont r ol Sy st em LabTask/ LabExer ci se Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Consi deramechani cal sy st em depi ct edshowni nt hef i gur et hei nputi sgi v enby f( t )andt heout puti sgi v enbyy ( t ) .Det er mi net hedi f f er ent i al equat i ongov er ni ng t hesy st em byusi ngMATLAB: Wr i t emf i l eandpl ott hesy st em r esponsesucht hatf or ci ngf unct i on: FI GURE: - Dat agi v en: F( t ) =1 M=10kg K=1n/ m B=0. 5nsec/ m Sol ut i on: MATLABCODE: k=1 m=10 b=0. 5 f =1 a=[ 01; k/ mb/ m] b=[ 0; 1/ m] c=[ 10] d=[ 0] sy s=ss( a, b, c, d) Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ st ep( sy s, ' r ' ) gr i don GRAPH: - QUESTI ONNO03: Dat agi v en Byusi ngdi f f er ent i alequat i onsol v et hi sequat i on: DV/ DT=F/ M –B/ M* V M=750 B=30NSEC/ M R=300N K=15 ThusEquat i on; My ’ ’ +By ’ +Ky =U Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ SOLUTI ON: MATLABCODE: m=750 b=30 f =300 k=15 a=[ 01; 0b/ m] b=[ 1/ m; 0] c=[ 10] d=[ 0] sy s=ss( a, b, c, d) st ep( sy s, ' r ' ) GRAPH: - LabTask/ LabExer ci se Pr obl em #01 Consi dert hef ol l owi ngci r cui t .Fi ndouti t sequat i onandt r ansf or mi nLapl ace. Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Pr obl em #02 Consi dert hear mat ur econt r ol l eddcmot orshowni nt hef ol l owi ngf i gur e. Fi ndouti t sLapl ace Lab#10 Desi gnandI mpl ement at i onofCompensat or s OBJECTI VE: Togett hedesi r eper f or manceofacont r ol sy st em Theor y : I ndesi gni ngacont r olsy st em,i fot hert hanagai nadj ust menti sr equi r ed,we mustmodi f yt heor i gi nalr ootl ocibyi nser t i ngasui t abl ecompensat or .Oncet he Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ef f ect s on t he r ootl ocus oft he addi t i on ofpol es and/ orzer os ar ef ul l y under st ood,wecanr eadi l ydet er mi net hel ocat i onsoft hepol e( s)andzer o( s)of t hecompensat ort hatwi l lr eshapet her ootl ocusasdesi r ed.I nessence,i nt he desi gn byt her oot l ocusmet hod,t her ootl ocioft hesy st em ar er eshaped t hr ought heuseofacompensat orsot hatapai rofdomi nantcl osedl ooppol es canbepl acedatt hedesi r edl ocat i on.( Of t en,t hedampi ngr at i oandundamped nat ur al f r equencyofapai rofdomi nantcl osedl ooppol esar especi f i ed. ) Ef f ect soft heAddi t i onofPol es. Theaddi t i onofapol et ot heopenl oopt r ansf erf unct i onhast heef f ectofpul l i ng t her ootl ocust ot her i ght ,t endi ngt ol owert hesy st em' sr el at i v est abi l i t yandt o sl owdownt heset t l i ngoft her esponse( Remembert hatt headdi t i onofi nt egr al cont r ol addsapol eatt heor i gi n, t husmaki ngt hesy st em l essst abl e. ) Ef f ect soft heAddi t i onofZer os. Theaddi t i onofazer ot ot heopenl oopt r ansf erf unct i onhast heef f ectofpul l i ng t her ootl ocust ot hel ef t ,t endi ngt omaket hesy st em mor est abl eandt ospeed upt heset t l i ngoft her esponse.( Phy si cal l y ,t headdi t i onofazer oi nt hef eedf or war dt r ansf erf unct i onmeanst headdi t i onofder i v at i v econt r olt ot hesy st em. Theef f ectofsuchcont r oli st oi nt r oduceadegr eeofant i ci pat i oni nt ot hesy st em andspeedupt het r ansi entr esponse. ) LeadCompensat or s. Ther ear emanyway st or eal i z econt i nuoust i me( oranal og)l eadcompensat or s, suchasel ect r oni cnet wor ksusi ngoper at i onalampl i f i er s, el ect r i calRCnet wor ks, andmechani cal spr i ngdashpotsy st ems. R2C2 α= R1C1 Fr om Equat i onweseet hatt hi snet wor ki sal eadnet wor ki fR1C1>R2C2, ora<1. I ti sal agnet wor ki fR1CI<R2C2. Leadcompensat i onbasi cal l yspeedsupt her esponseandi ncr easest hest abi l i t y oft hesy st em. LagCompensat or s: Theconf i gur at i onoft heel ect r oni cl agcompensat orusi ngoper at i onalampl i f i er s i st hesameast hatf ort hel eadcompensat orI fwechooseR2C2 >RI C1 i t becomesal agcompensat or ,t het r ansf erf unct i onoft hel agcompensat ori s gi v enbyβ.Lagcompensat i oni mpr ov est hest eady st at eaccur acyoft hesy st em, butr educest hespeedoft her esponse. Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Exampl e: %Uni tRampResponse %Uni tr ampr esponsesofcompensat edandnoncompensat edsy st em %Uni tr ampr esponsewi l l beobt ai nedasuni tst epr esponseofC( s) / | sR( s) | %* * * Ent ert henumenat or sanddenomi nat or sofC1( s) / [ sR( s) ]and %C2( s) / [ sR( s) ] wher eC1( s) andC2( s) ar eLapl acet r ansf or m ofout putof %compensat edandnoncompensat edsy st em r espect i v el y * * * numc=[ 00001. 02350. 0512] ; denc=[ 13. 0052. 0151. 033500. 5120] ; num=[ 00001. 06] ; den=[ 1321. 060] ; %Speci f yt het i mer ange( suchast =0: 0. 1: 50; andent erst epandpl otcommand t =0: 0. 1: 50; [ c1, x1, t ] =st ep( numc, denc, t ) ; [ c2, x2, t ] =st ep( num, den, t ) ; pl ot ( t , c1, ' ' , t , c2, ' . ' , t , t , ' ' ) gr i d t ext ( 2. 2, 27, ' Compensat edsy st em' ) t ext ( 26, 21. 3, ' Uncompensat edsy st em' ) t i t l e( ' Uni tr ampr esponsesofcompensat edandnoncompensat edsy st em' ) xl abel ( ' Tsec' ) y l abel ( ' Out put sC1andC2' ) LaLeadCompensat i on: I fi mpr ov ement si n bot ht r ansi entr esponse and st eady st at er esponse ar e desi r ed,t henbot hal eadcompensat orandal agcompensat ormaybeused si mul t aneousl y .Rat hert hani nt r oduci ngbot hal eadcompensat orandal ag Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ compensat orassepar at eel ement s, howev er , i ti seconomi cal t ouseasi ngl el agl eadcompensat or .Lagl eadcompensat i oncombi nest headv ant agesofl agand l eadcompensat i ons.Si ncet hel agl eadcompensat orpossessest wopol esand t wozer os,suchacompensat i oni ncr easest heor deroft hesy st em by2,unl ess cancel l at i onofpol e( s)andzer o( s)occur si nt hecompensat edsy st em. Exampl e: %Uni tst epResponse %Uni tst epr esponsesofcompensat edandnoncompensat edsy st em numc=[ 0018. 754. 23] ; denc=[ 17. 429. 554. 23] ; num=[ 004] ; den=[ 124] ; %Speci f yt het i mer ange( suchast =0: 0. 1: 50; andent erst epandpl otcommand t =0: 0. 05: 5; [ c1, x1, t ] =st ep( numc, denc, t ) ; [ c2, x2, t ] =st ep( num, den, t ) ; pl ot ( t , c1, ' o' , t , c2, ' x' ) gr i d t ext ( 0. 6, 1. 32, ' Compensat edsy st em' ) t ext ( 1. 3, 0. 68, ' Uncompensat edsy st em' ) t i t l e( ' Uni tst epr esponsesofcompensat edandnoncompensat edsy st em' ) xl abel ( ' Tsec' ) y l abel ( ' Out put sC1andC2' ) Exampl e7. 1 Exampl e7. 2 Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Exampl e7. 3 Exampl e7. 4 LabTask/ LabExer ci se Pr obl em #01: Desi gnasui t abl el agcompensat orf ort hegi v enopenl oopt r ansf erf unct i oni s G( s)=( K) / (s( s+4) ( s+80) ) I ti sdesi r edt ohav et hePhaseMar gi nt obeatl east33° . >>num=[ 9600] ; >>denum=[ 1843200] ; >>sy s=t f ( num, den) >>bode( sy s) >>[ Gm, Pm, Wcp, Wcg] =mar gi n( sy s) >>mar gi n( sy s) >>hol don Out put : sy s= 9600 s^ 3+84 +320s Gm = 2. 8000 Pm = 13. 2591 Wcp= 17. 8885 Wcg= 10. 5470 Li nearCont r ol Sy st em s^ 2 Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Nowaf t erusi ngt heLagCompensat or , >>num=[ 00063. 930] >>denum=[ 0. 0423. 5213. 6810] ; >>sy s=t f ( num, den) >>bode( sy s) >>[ Gm, Pm, Wcp, Wcg] =mar gi n( sy s) >>mar gi n( sy s) >>hol don Out put : sy s= 63. 9s+30 0. 042s^ 4+3. 52s^ 3+13. 68s^ 2+s Gm = 15. 761 Pm = 39. 3844 Wcp= 16. 9235 Wcg= 3. 5782 Li nearCont r ol Sy st em Feder alUr duUni v er si t yofAr t s, Sci ence&Technol ogyI sl amabad–Paki st an El ect r i calEngi neer i ng _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ RESULT: Thust hedesi r edphasemar gi nwasobt ai nedf ort hegi v enopenl oopt r ansf er f unct i onusi ngsui t abl el agcompensat or . Li nearCont r ol Sy st em