CONTROL SYSTEMS LABORATORY ECE311 LAB 3: Control Deign Uing the Root Locu 1 Purpoe The purpoe of thi lbortory i to deign cruie control ytem for cr uing the root locu. 2 Introduction Diturbnce D( ) = d Input V ( ) m Plnt b Output V ( ) Figure 1: Block digrm of the plnt Recll the mthemticl model of cr moving on tright rod with unknown lope θ derived in the introduction to lbortory 2. In the block digrm bove, d = g in θ, where g i the grvittionl contnt. Diturbnce R( ) E( ) V ( ) C( ) m D( ) = d Plnt b V ( ) Figure 2: Block digrm of the cloed-loop ytem Problem Sttement: Conider the feedbck control ytem in Figure 2. Deign the controller C() to meet the pecifiction below. 1
(SPEC1) The output v(t) of the cloed-loop ytem hould ymptoticlly trck reference tep ignl r(t) depite the preence of the unknown diturbnce d(t) = d 1(t) (SPEC2) The cloed-loop ytem (input R(), output V (), nd no diturbnce, D() = 0) hould be BIBO tble. (SPEC3) All pole of the cloed-loop ytem hould lie on the rel xi, o tht the output v(t) doe not hve ocilltory behvior. (SPEC4) When D() = 0 (i.e., when the crt trck i horizontl), the ettling time T hould be le thn 0.3. (SPEC5) The mgnitude voltge v m (t) imprted by the control ytem to the DC motor hould be le thn 11.75V. Concretely, you re required to deign control ytem mking the crt, trck contnt reference peed even when the trck i not horizontl, nd meeting certin trnient performnce pecifiction. The experimentl etup ued in the lb i hown in figure 3. D/A Plnt A/D PWM b Encoder Controller Arduino Figure 3: Block digrm of the experimentl etup The deign controller will be implemented on the Arduino bord. A hown in the figure, the micro controller mple the poition of the crt from the encoder (A/D) nd compute the control input to be pplied to the crt. Given the deired control input, the motor hield generte PWM ignl tht pproximte the deired control vlue (D/A). 3 Preprtion 1. Referring to Figure 2, verify tht the plnt h type 0. Hence, in order to meet SPEC1, you need controller with pole t zero. Letting E() = R() V (), define the PI controller V m () E() = K(1 1 T I ), K, T I > 0. 2
Write the trnfer function from R() to E() (uming D() = 0), nd from D() to E() (uming R() = 0). 2. Let R() = v/ nd recll tht D() = d/. Uing uperpoition, write the expreion for E() in the cloed-loop ytem. 3. Applying the finl vlue theorem to E(), how tht if lim x e(t) exit, then it mut be zero. You hve thu hown tht PI controller i cpble of meeting SPEC1. Submit your derivtion for point 1-3 to your lb TA t the beginning of the lb. Thoroughly red the next ection prior to the lb. 4 Experiment 4.1 Identifiction of model prmeter nd b If you re uing different crt nd trck unit thn the one ued in lb 2, you need to re-timte the plnt prmeter nd b following the procedure outlined in lb 2. If inted you re working with the me experimentl etup, ue the vlue of nd b you etimted in lb 2. 4.2 Controller deign uing Mtlb 1. In your preprtion you ve hown tht PI controller i cpble of meeting SPEC1. We now focu on SPEC2-SPEC4. Let θ = 0 or, equivlently, D() = 0. Recll tht n pproximte expreion for the ettling time in econd-order ytem with complex conjugte pole i T = 4, where σ i the rel prt of the pole of the cloed-loop ytem. In order to tify σ SPEC4, you thu need 4 0.2, or σ 20. You ll chieve thi by n pproprite choice of K σ nd T I. Pick gue for T I, T I = 1. Uing Mtlb, you will now drw the root locu of the ytem, i.e., the locu of the pole of the cloed-loop ytem the gin K i vried between 0 nd. Firt, define the trnfer function G() of the open-loop ytem without the gin K. Thi i given by G() = T I 1 T I b. In Mtlb, you cn define G() follow >> TI=1; =(your vlue); b=(your vlue); >> G=tf([TI 1],[Ti 0])*tf([],[1 b]); The root locu i the locu of the pole of KG()/(1 KG()) K i vried. Plot the root locu by iuing the commnd. >> rlocu(g) Verify, uing the plot, tht for ll K > 0 the pole of the cloed-loop ytem hve negtive rel prt, nd hence SPEC2 i met. However, for the preent vlue of T I, SPEC4 cnnot be met by ny choice of K > 0. Specificlly, there doen t exit K > 0 uch tht the cloed-loop 3
ytem h two pole on the rel xi with rel prt 20. Prove the truth of the clim by uing the root locu plot. Evidently, we need to chooe different vlue for T I. Try different (poitive) vlue of T I. For ech choice of T I, plot the correponding root locu. By tril nd error, find the vlue of T I comptible with thi requirement: there exit K > 0 uch tht the cloed-loop ytem h two pole cloe to = 20 on the negtive rel xi. Sve the root locu plot. Once you found T I > 0 tifying the requirement bove, you need to find K > 0 for which the cloed-loop ytem h two pole cloe to = 20. Firt, plot the root locu correponding to the vlue of T I you jut elected. Next, iue the commnd >> rlocfind(g) Move the moue curor over the root locu nd click on the deired loction of the cloed-loop pole on the rel xi = 20. Thi ction will return the vlue of K you were looking for. Notice tht the PI controller with the vlue of K nd T I you hve jut found hould meet SPEC2-SPEC4. Hve your TA ign here before proceeding to the next tep. 2. Next, you ll double-check tht uing the vlue of K nd T I you jut found, SPEC2-SPEC4 re met in imultion. Downlod the file lb3.mdl from Blckbord nd open it. Begin by double-checking tht your controller indeed meet SPEC4. Enter the vlue of θ, T I nd K into the Mtlb workpce >> =(your vlue); b=(your vlue); thet = 0; TI=(your vlue); K=(your vlue); >> VMAX UPM=11.75; Run the Simulink block by clicking on Simultion > Strt. The cope depict (i) the output v(t) veru the reference ignl r(t), (ii) the trcking error e(t), nd (iii) the voltge v m (t). The reference ignl i qure wve of frequency 0.5Hz nd mplitude 0.2m/. Recll tht the ettling time T of v(t) i the time v(t) tke to rech nd ty within the rnge [v( ) 0.02(v( ) v(0)), v( ) 0.02(v( ) v(0))] where v( ) i the vlue v(t) ymptoticlly ettle to. By zooming in on one period of the imultion output, grphiclly etimte the ettling time T. Sve the plot you ued to derive your etimte. I it true tht T 0.2 ec.? Verify tht SPEC5 i pproximtely met. Hve your TA ign here before proceeding to the next tep. 3. Now you ll try to deign more ggreive PI controller. Similrly to wht you did in tep 1, ue the root locu nd tril error to find the vlue of T I > 0 uch tht there exit K > 0 uch tht the cloed-loop ytem h two pole cloe to = 30. Ue the commnd rlocfind to find the vlue of K for which the cloed-loop ytem h two pole cloe to -30. Enter the vlue of K nd T I you jut found in the Mtlb workpce nd run the Simulink digrm lb3.mdl. Similrly to wht you did in tep 2, evlute the ettling time T by zooming in on one period of the imultion output. Sve the plot. Compre the performnce of thi ggreive controller to tht of the controller you evluted erlier. 4
How do the ettling time nd overhoot compre? Which controller i bet uited to meet the pec? Wht i the cue of the difference you oberve? Hve your TA ign here before proceeding to the next tep. 4.3 Controller Implementtion To perform the prcticl experiment for ech prt, open it Arduino file with.ino uffix nd the ocited Mtlb m-file. You will enter your controller in the Arduino code nd will record the dt uing Mtlb. Follow your TA intruction on how to compile the Arduino code nd how to perform the experiment. Perform the following tep: Open the Arduino code file nmed Lb3.ino, The velocity reference i et to qure wve form with the mplitude of 0.2 m/ nd frequency of 0.5 Hz. In the beginning of the code, modify nd djut the vrible K nd Ti. Enter the vlue of K nd T I ocited with the le ggreive controller. Uplod the code nd lunch the Mtlb m-file locted in the me directory nmed rel time dt plot Lb3. Sve the obtined plot. Doe your controller tify the deign pecifiction? Hve your TA ign here before proceeding to the next tep. Now you ll tet the performnce of your controller gint the unknown diturbnce d(t). Uing one or more book, rie one end of the trck. Thi correpond to etting θ 0. While holding the trck in firm poition, run the experiment gin nd compre the reult. Now enter the vlue of K nd T I ocited with the more ggreive controller nd repet ll the bove tep. Hve your TA ign here before proceeding to the next tep. 5 Report Plee ubmit your finl report before the igned dedline to your lbortory TA. 5