Академический Документы
Профессиональный Документы
Культура Документы
InternationalJournalofEngineering
TomeXII[2014]Fascicule2[May]
ISSN:15842665[print];ISSN:15842673[online]
afreeaccessmultidisciplinarypublication
oftheFacultyofEngineeringHunedoara
PetarMANDI,2.MihailoLAZAREVI,3.SlavoljubSTOJANOVI,4.MilanRISTANOVI
1.
REALTIMECONTROLOFROTARYINVERTEDPENDULUM
FacultyofMechanicalEngineering,Belgrade,SERBIA
14.
Abstract: This paper proposes advanced control strategy for a rotary inverted pendulum (RIP). RIP is an
underactuated mechanical system because it has only one control input and two degrees of freedom.
Because of its complex nonlinear dynamics, RIP is usually used to test performance of different control
algorithms. First, laboratory electromechanical system representing the full control system is described in
short,followedbythemathematicalmodelfortheRIP.Controlproblemisdividedandimplementedintwo
differentsteps:swingupandstabilizationroutines.Here,apartialfeedbacklinearizationprocedureandPID
control are suggested for the control of RIP. The effectiveness of the proposed control method is tested in
MatlabSimulinkenvironment.
Keywords:invertedpendulum,PIDcontrol,feedbacklinearization
1.INTRODUCTION
Underactuatedsystemshavemoredegreesoffreedomthanactuators,[13].Arotationalinverted
pendulum, also known as Furuta pendulum, is an example of such a system, [47]. Almost all
dynamic systems are nonlinear by its nature, therefore a lot of research is done in the area of
nonlinear control. The aim of this paper is to develop a nonlinear control system for both the
rotationalpendulumandactuatedarm.First,adescriptionoftheFurutapendulumwillbegiven.
Then, a mathematical model of the system will be derived. The control strategy consists of two
parts,aswingupandabalancingphase.Thetheoryofinversedynamiccontrolwillbeusedfor
the latter. However, the resulting zero dynamics of the actuated arm shows unstable behavior.
Hence,acontrolfeedbacklawwillbeextendedinordertostabilizethehorizontalarm.
2.DYNAMICEQUATIONSOFROTARYINVERTEDPENDULUM
2.1Descriptionofthesystem
In Figure 1 a schematic of Furuta pendulum and real
laboratory model are shown. Inverted pendulum is a
mechanicalsystemwithtwodegreesoffreedom,where
angular position of the arm and the pendulum are
denoted as and , respectively. The arm is driven
withatorque,whilenotorqueisapplieddirectlytothe
pendulum.
The variables used to define the model of the rotary
invertedpendulumareshownintablebelow.
copyrightFacultyofEngineeringHunedoara,UniversityPOLITEHNICATimisoara
211 | Fascicule 2
m1,m2
R1
R2
2r1,2r2
J 1
J 2 , J 2 , J 2
2.2Mathematicalmodelofrotaryinvertedpendulum
Here, the Rodriguez method is proposed for modeling the dynamics of the system where
configuration of the mechanical model can be defined by generalized coordinates q1 and q2,
representing and , respectively. The equations of motion of the inverted pendulum can be
expressedinacovariantformofLagrangesequationofsecondkindasfollows[1,2]:
n
=1
=1 =1
= 1, 2 (1)
= Q
where the coefficients a are the covariant coordinates of the basic metric tensor [ a ] R 22 ,
, , , = 1, 2 presents Christoffel symbols of the first kind, and Qr denote the generalized
gravitationalandcontrolforces.
Theequationsofmotionofoursystemcanberewrittenincompactmatrixform:
a12
22 is basic metric tensor,
R
a
a
21 22
Qa = ( M
0 ) R 2
forces.Finally,Eq.(2)writteninfullformbecomes:
& & + & 2 = M (3)
a11&& + a12&& + 212,1
22,1
a12&& + a22&& 12,1& 2 = Q2g (4)
whereare
(5)
Forsimplicity,weintroducephysicalparameters K1 , K 2 , K3 , K 4 whicharedefinedasshownabove.
3.CONTROLLERDESIGN
In this section a control strategy is developed to stabilize the pendulum in upright position. As
mentioned before, there are two different control problems. The first one is swinging the
pendulumupfromdowntotheuprightposition.Oncethesystemisclosetothedesiredposition,
with a simple change in the controller, it is possible to bring the pendulum in the desired
equilibrium.
3.1.Swingupcontroller
There are many ways to bring the pendulum to the upper half plane, when < / 2 . One of the
most popular is based on energy control [3,4]. The goal of this paper is not to build an accurate
swing up controller, but to bring the pendulum close enough so the stabilizing controller can
stabilize it in the upright position. Hence, the swing up strategy will only be described here in
short.
Theequationofmotionforthependulumis:
thesakeofclarity,letusintroduce J 2 = J 2 + m2 ( R2 r2 )2 .Theenergyoftheuncontrolledpendulum
(withouttherotatingarm)is:
E=
1
J 2& 2 + m 2 g ( R2 r2 )(cos 1) (7)
2
Theenergyisdefinedsothatitiszeroinuprightrestposition.Now,itisnecessarytounderstand
howtheenergyisinfluencedbytheaccelerationofthepivot.Wecanfinditbycomputingthetime
derivativeofE:
dE
& && m 2 g ( R 2 r2 )& sin = m 2 a ( R 2 r2 )& cos (8)
= J 2
dt
whereEq.(6)hasbeenusedtoobtainthelastequality.Equation(8)impliesthatsystemissimply
an integrator with varying gain. To increase energy the acceleration of the pivot a should be
positivewhenthequantity & cos isnegative.WiththeLyapunovfunction = ( E0 E )2 2 andthe
controllaw u (t ) = a (t ) = k ( E E0 )& cos , k = const > 0 ,itfollows:
& = km 2 ( R 2 r2 )(( E 0 E )& cos ) 2 (9)
Thiscontrollawdrivestheenergytowardsitsdesiredvalue E0 = 0 ,exceptwhen & cos = 0 .
3.2Stabilizingcontroller
Nowwecandesignacontrollerthatstabilizesthependuluminuprightposition.Forthispurpose,
wewillusenonlinearcontroltechniqueknownasinversedynamiccontrol.Itisbasicallyapartial
feedback linearization procedure [5], which simplifies the control design. The first step of this
procedure is to calculate && from Eq. (4) and plug it into Eq. (3). After rearranging, Eq. (3) now
reads,[6]:
a11
a a
Q2g + 12,1& 2 + a12 11 22
a12
a12
(10)
a11 g
a a
& & + & 2 (11)
Q2 + 12,1& 2 + a12 11 22 M R + 212,1
12,1
a12
a12
whereMRisnewcontrolinput.Now,Eq.(3)and(4)become:
&& =
K1
K
K MR
(12)
tan( ) 2 2 sin( )& 2 + 4
K3
K3
K 3 cos( )
&& = M R (13)
wherephysicalparameters K1 , K 2 , K3 , K 4 aredefinedinEqs.(5).Becauseofthecosineterminterm
a12 inthedenominatorofEq.(11),thecontrolsignalisdefinedineverypositionofthependulum
except for the horizontal, i.e. < / 2 . To achieve asymptotic stability for the ( , & ) , a PD
controllercanbeused:
M R = K P K D & (14)
K1
sin( ) (15)
K4
AftersubstitutingEq.(15)intoEq.(12)and(13),weobtain:
&& +
K4
K
K4
K
K D & + 4 K P =
K D & + K P ) 2 2 sin( )& 2 (16)
(
K3
K3
K 3 cos( )
K3
213 | Fascicule 2
Now, we can linearize system described with Eqs. (16)(17) around equilibrium point
( ,&, , & ) = ( 0, 0, 0, 0 ) .Acontrollerderivedfromalinearizedsystemwillworkforanonlinearsystem,
provided region of attraction is not too large. Under this condition, linearization allows us to
neglectnonlinear,quadraticterm & 2 inEq.(16).So,linearizationarounddesiredequilibriumpoint
leadsto:
&& +
K4
K
K
K
K D & + 4 K P = 4 K D & 4 K P (18)
K3
K3
K3
K3
&& + K D & + K P
K1
= K D & K P
K4
(19)
ChoosingthefollowingvaluesforPDparameters:
s1,2
= 5.6 9.81 j
s3,4
= 1.67 2.81 j (21)
Conditions for asymptotic
stabilityoflinearizedsystemare
fulfilled. Simulation studies are
performed in Matlab Simulink
environment to illustrate the
performance of the designed
controller.Figure2belowshows
results for the change of the
pendulum and arm angle, with
Figure2.Changeofpendulumandarmangle
respecttotime.Initialconditions
are ( , &, , & ) = ( 0, 0, , 0 ) .Achangefromswinguptostabilizingcontrollerhappenswhen < 6 .
4.CONCLUSION
In this paper a control algorithm for rotational inverted pendulum is provided. The control
strategy consists of two parts, a swing up controller and stabilizing controller. A stabilization
algorithmisbasedonpartialfeedbacklinearization,whichmadeitpossibletocompensatesomeof
nonlinearities of the pendulum. Control feedback law is designed to achieve local asymptotic
stabilityforboththependulumandthedrivenarm.Resultshavebeensupportedbymeansofthe
computer simulation. For future research, an improvement of the proposed method is to be
considered,basedonLyapunovsdirectmethod.Also,transferfromsimulationtoreallaboratory
invertedpendulumwillbeasubjectoffutureinvestigations.
Acknowledgement
Authors gratefully acknowledge the support of Ministry of Education, Science and Technological
DevelopmentoftheRepublicofSerbiaundertheprojectTR33047andTR35006.
REFERENCES
[1.] ovi,V.,Lazarevi,M.(2009).RobotMechanics.FacultyofMechanicalEngineering,Belgrade.
[2.] Acosta, J.A. (2009). Furutas pendulum: A Conservative Nonlinear Model for Theory and Practise.
MathematicalProblemsinEngineering,Vol.2010,no.29.
[3.] Astrom,K.J.,Furuta,K.(2000).Swingingupapendulumbyenergycontrol.Automatica,Vol.36,no.9,
p.287295.
[4.] Stojanovi,S.(2011)Diplomawork.FacultyofMechanicalEngineering,Belgrade.
[5.] Khalil,H.(2002).Nonlinearsystems.PrenticeHall,UpperSaddleRiver.
[6.] Spong, M.W. (1996). Energy Based Control of a Class of Underactuated Mechanical Systems. IFAC
WorldCongress,p.431435.
[7.] Chen,C.K.,Lin,C.J.,Yao,L.C.(2004).InputStateLinearizationofaRotaryInvertedPendulum.Asian
JournalofControl,Vol.6,no.6,p.130135.
214 | Fascicule 2