control of an inverted pendulum外文文献本科论文.docx
《control of an inverted pendulum外文文献本科论文.docx》由会员分享,可在线阅读,更多相关《control of an inverted pendulum外文文献本科论文.docx(11页珍藏版)》请在冰豆网上搜索。
controlofaninvertedpendulum外文文献本科论文
ControlofanInvertedPendulum
JohnnyLam
Abstract:
Thebalancingofaninvertedpendulumbymovingacartalongahorizontaltrackisaclassicproblemintheareaofcontrol.Thispaperwilldescribetwomethodstoswingapendulumattachedtoacartfromaninitialdownwardspositiontoanuprightpositionandmaintainthatstate.Anonlinearheuristiccontrollerandanenergycontrollerhavebeenimplementedinordertoswingthependulumtoanuprightposition.Afterthependulumisswungup,alinearquadraticregulatorstatefeedbackoptimalcontrollerhasbeenimplementedtomaintainthebalancedstate.Theheuristiccontrolleroutputsarepetitivesignalattheappropriatemomentandisfinelytunedforthespecificexperimentalsetup.Theenergycontrolleraddsanappropriateamountofenergyintothependulumsysteminordertoachieveadesiredenergystate.Theoptimalstatefeedbackcontrollerisastabilizingcontrollerbasedonamodellinearizedaroundtheuprightpositionandiseffectivewhenthecart-pendulumsystemisnearthebalancedstate.Thependulumhasbeenswungfromthedownwardspositiontotheuprightpositionusingbothmethodsandtheexperimentalresultsarereported.
1.INTRODUCTION
Theinvertedpendulumsystemisastandardproblemintheareaofcontrolsystems.Theyareoftenusefultodemonstrateconceptsinlinearcontrolsuchasthestabilizationofunstablesystems.Sincethesystemisinherentlynonlinear,ithasalsobeenusefulinillustratingsomeoftheideasinnonlinearcontrol.Inthissystem,aninvertedpendulumisattachedtoacartequippedwithamotorthatdrivesitalongahorizontaltrack.Theuserisabletodictatethepositionandvelocityofthecartthroughthemotorandthetrackrestrictsthecarttomovementinthehorizontaldirection.Sensorsareattachedtothecartandthepivotinordertomeasurethecartpositionandpendulumjointangle,respectively.MeasurementsaretakenwithaquadratureencoderconnectedtoaMultiQ-3generalpurposedataacquisitionandcontrolboard.Matlab/Simulinkisusedtoimplementthecontrollerandanalyzedata.
Theinvertedpendulumsysteminherentlyhastwoequilibria,oneofwhichisstablewhiletheotherisunstable.Thestableequilibriumcorrespondstoastateinwhichthependulumispointingdownwards.Intheabsenceofanycontrolforce,thesystemwillnaturallyreturntothisstate.Thestableequilibriumrequiresnocontrolinputtobeachievedand,thus,isuninterestingfromacontrolperspective.Theunstableequilibriumcorrespondstoastateinwhichthependulumpointsstrictlyupwardsand,thus,requiresacontrolforcetomaintainthisposition.Thebasiccontrolobjectiveoftheinvertedpendulumproblemistomaintaintheunstableequilibriumpositionwhenthependuluminitiallystartsinanuprightposition.Thecontrolobjectiveforthisprojectwillfocusonstartingfromthestableequilibriumposition(pendulumpointingdown),swingingituptotheunstableequilibriumposition(pendulumupright),andmaintainingthisstate.
2.MODELLING
AschematicoftheinvertedpendulumisshowninFigure1.
Figure1.InvertedPendulumSetup
Acartequippedwithamotorprovideshorizontalmotionofthecartwhilecartposition,p,andjointangle,θ,measurementsaretakenviaaquadratureencoder.
Byapplyingthelawofdynamicsontheinvertedpendulumsystem,theequationsofmotionare
wheremcisthecartmass,mpisthependulummass,Iistherotationalinertia,listhehalf-lengthofthependulum,Risthemotorarmatureresistance,risthemotorpinionradius,Kmisthemotortorqueconstant,andKgisthegearboxratio.Also,forsimplicity,
andnotethattherelationshipbetweenforce,F,andvoltage,V,forthemotoris:
Letthestatevectorbedefinedas:
Finally,welinearizethesystemabouttheunstableequilibrium(0000)T.Notethatθ=0correspondstothependulumbeingintheuprightposition.Thelinearizationofthecart-pendulumsystemaroundtheuprightpositionis:
Where
Finally,bysubstitutingtheparametervaluesthatcorrespondtotheexperimentalsetup:
3.STABILIZINGCONTROLLERDESIGN
Thecontrollerdesignapproachforthisprojectisbrokenupintotwocomponents.Thefirstpartinvolvesthedesignofanoptimalstatefeedbackcontrollerforthelinearizedmodelthatwillstabilizethependulumaroundtheuprightposition.Thesecondpartinvolvesthedesignofacontrollerthatswingsthependulumuptotheunstableequilibrium.Whenthependulumapproachesthelinearizedpoint,thecontrolwillswitchtothestabilizingcontrollerwhichwillbalancethependulumaroundtheuprightposition.
ThestatefeedbackcontrollerresponsibleforbalancingthependulumintheuprightpositionisbasedonaLinearQuadraticRegulator(LQR)designusingthelinearizedsystem.Ina