12.07.2015 Views

A control strategy for the cart-pendulum system Abstract 1 ...

A control strategy for the cart-pendulum system Abstract 1 ...

A control strategy for the cart-pendulum system Abstract 1 ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

As ϕ is not definite, H d is not a Lyapunov functionin <strong>the</strong> whole state space. Consider now <strong>the</strong> followingLyapunov function candidate:V = ϕ(x 1 ,x 2 )(H d − 1/3)(= ϕ(x 1 ,x 2 ) − 1 3 cos3x 1 + 1 2 x2 2 − 1 ). (10)3Notice that V ≥ −2/3 and continuous. Never<strong>the</strong>less,V is not differentiable at <strong>the</strong> switching curve of (8).Outside this curve,This implies that:˙V = −ϕ 2 x 2 2 cos 2 x 1 ≤ 0• V is a Lyapunov function in <strong>the</strong> region Ω inside <strong>the</strong>central closed curve of Fig. 2. This closed curve is<strong>the</strong> level curve V = 0.• The switching curve in (8) is attractive.In fact, a sliding motion is produced along <strong>the</strong> switchingcurve. The motion inside this curve can be deducedfrom <strong>the</strong> first equation of (9). Thus, only four equilibriain <strong>the</strong> sliding motion are possible (with x 1 ∈ [−π,π]):E 1,2 : (±π/3,0) and E 3,4 (±π,0). Besides, outside <strong>the</strong>sliding curve <strong>the</strong>re are more limit sets: <strong>the</strong> maximuminvariant set in Ω <strong>for</strong> which ˙V = 0 is (±2π/3,0) ⋃ (0,0),being all equilibrium points. The latter is <strong>the</strong> desiredequilibrium while it is clear that <strong>the</strong> <strong>for</strong>mer ones areunstable. There<strong>for</strong>e, <strong>the</strong> only problematic points areE 1,2 and E 3,4 .curves. It can be seen that <strong>the</strong> undesirable equilibriumpoints E 1,2 and E 3,4 still exist but <strong>the</strong>y are outside<strong>the</strong> sliding manifold and, since <strong>the</strong>y are unstable,<strong>the</strong>y do not preclude <strong>the</strong> almost-global stability property.Never<strong>the</strong>less, this property is not proved yet. Noticethat with <strong>the</strong> choice (12), <strong>the</strong> Lyapunov functioncandidate is continuous along <strong>the</strong> dotted curve of Fig.3. But now, function ϕ ε introduces new switching linesat x 1 = ±π/3 (segments AB and CD in Fig. 3). Function(12) is not continuous at <strong>the</strong>se segments and <strong>the</strong>analysis must be per<strong>for</strong>med carefully.In <strong>the</strong> following, it will be proved that, <strong>for</strong> smallenough ε, when <strong>the</strong> <strong>system</strong> reaches <strong>the</strong>se points of discontinuity<strong>for</strong> (12), <strong>the</strong> trajectory evolves towards <strong>the</strong>origin. Due to <strong>the</strong> symmetry of <strong>the</strong> problem only <strong>the</strong>case of x 2 > 0 will be considered. When <strong>the</strong> <strong>system</strong>starts on <strong>the</strong> upper half of segment AB as x 2 > 0 itwill evolve to <strong>the</strong> right. In this region Ḣd > 0 and <strong>the</strong><strong>system</strong> will evolve towards <strong>the</strong> sliding curve (<strong>the</strong> dottedcurve of Fig. 3). After reaching x 1 = π it will continuefrom x 1 = −π towards x 1 = −π/3. There<strong>for</strong>e, segmentCD (with x 2 > 0) will eventually be reached. When <strong>the</strong><strong>system</strong> starts on this segment as x 2 > 0 it will evolvetowards <strong>the</strong> right but, in this region Ḣd < 0. If ε issmall enough <strong>the</strong> level curve H d = 1/3 (<strong>the</strong> solid curve)will be reached be<strong>for</strong>e reaching segment AB. Once thislevel curve is reached and crossed <strong>the</strong> <strong>system</strong> can not goout of <strong>the</strong> compact set {x : H d (x) < 1/3} where ˙V ≤ 0.1.512.2 Achieving almost-global stabilityIn order to avoid <strong>the</strong> undesirable equilibria E 1,2 andE 3,4 , <strong>the</strong> switching curve is changed from H d = 1/3 toH d = 1/3+ε with 0 < ε ≪ 1. This change is per<strong>for</strong>medsubstituting <strong>the</strong> switching function ϕ byx 20.50−0.5−1CDAB{△ −k1 if Hϕ ε = d ≤ (1/3 + ε) and cosx 1 < 0.5k 1 elsewhereThe <strong>control</strong> law is now:u = 2sin 2x} {{ } 1 +ϕ ε (x 1 ,x 2 )x 2 cos x 1 (11)} {{ }u c u dThe same analysis can be per<strong>for</strong>med with <strong>the</strong> Lyapunovfunction candidateV = ϕ ε (x 1 ,x 2 )(H d − 1/3 − ε) (12)The behaviour of <strong>the</strong> <strong>system</strong> can now be explained with<strong>the</strong> help of Fig. 3. In this figure <strong>the</strong> level curves correspondingto H d = 1/3 and H d = 1/3 + ε are plotted.The sliding motion is now along <strong>the</strong> second of <strong>the</strong>se−1.5−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1x 1/πFigure 3: Level curves H d = 1/3 (solid) and H d =1/3 + ε (dotted)Since no o<strong>the</strong>r points of discontinuity exist, <strong>the</strong> followingproposition can be stated:Proposition 1. The origin of <strong>system</strong> (1) with <strong>control</strong>law (11) is almost globally asymptotically stable.2.3 Avoiding <strong>the</strong> sliding modeIn many <strong>control</strong> applications sliding modes are not admissibledue to <strong>the</strong> chattering phenomenon. The <strong>control</strong>law proposed in <strong>the</strong> previous section presents slidingmotions due to <strong>the</strong> discontinuity along <strong>the</strong> level curve3


H d = 1/3 + ε. One way of solving this problem is proposedin this section. The idea is to modify <strong>the</strong> switchingfunction in such a way that it is equal to zero at bothsides of <strong>the</strong> switching curve. Thus, <strong>the</strong> switching functionwill be continuous at <strong>the</strong> switching curve and nosliding motions can occur. This can be accomplishedmultiplying function ϕ ε by abs(H d (x 1 ,x 2 ) − 1/3 − ε).In this way u d will be equal to zero at <strong>the</strong> level curveH d = 1/3+ε avoiding <strong>the</strong> sliding motion. Thus, <strong>the</strong> <strong>system</strong>will tend asymptotically to <strong>the</strong> <strong>for</strong>mer level curve.Since at x ∈ [−π/2,π/2] it is desired that <strong>the</strong> trajectoriescross <strong>the</strong> level curve, function ϕ ε should not changeat this interval. To this end we define a new switchingfunction:{△ k1 (H˜ϕ ε = d − 1/3 − ε) if cos x 1 < 0.5k 1elsewhere(13)The same previous analysis could be per<strong>for</strong>med to <strong>the</strong><strong>system</strong> with <strong>the</strong> <strong>control</strong> law derived from ˜ϕ ε . In orderto compute ˙V now, it must be taken into account that˜ϕ ε depends on x 1 and x 2 . It is easily seen that ˙V =−2˜ϕ 2 εx 2 2 cos 2 x 1 when cos x 1 < 0.5. There<strong>for</strong>e V is stilla Lyapunov function.The behavioral difference with respect to <strong>the</strong> previouslaw is that <strong>the</strong> <strong>control</strong> law does not present antsliding motion. The cost of this nice nature is that <strong>the</strong>energy injection/damping near <strong>the</strong> switching curve isvery small and, thus, <strong>the</strong> <strong>system</strong> will be slower. Theresultant <strong>control</strong> law is:u = 2sin 2x} {{ } 1 + ˜ϕ ε (x 1 ,x 2 )x 2 cos x 1 (14)} {{ }u c u dThe <strong>for</strong>mer discussion can be summarized in <strong>the</strong> followingresultProposition 2. Consider <strong>system</strong> (1) with <strong>control</strong> law(14) with ˜ϕ ε given by (13). Then, <strong>the</strong>re exists a valueε ∗ > 0 such that if 0 < ε < ε ∗ <strong>the</strong> origin of <strong>the</strong> <strong>system</strong>is almost globally asymptotically stable.2.4 SimulationsIn order to show <strong>the</strong> per<strong>for</strong>mance of <strong>control</strong> laws (11)and (14) Fig. 4 shows <strong>the</strong> simulation results of <strong>the</strong> <strong>system</strong>with both laws. Parameter k 1 is chosen to be equalto 3.0 and <strong>the</strong> initial conditions are set inside one of<strong>the</strong> undesirable wells. It can be seen that both <strong>control</strong>laws are successful but that (11) is faster at <strong>the</strong> cost ofpresenting a sliding motion.2.5 Control of <strong>the</strong> <strong>cart</strong>In <strong>the</strong> previous section only <strong>the</strong> movement of <strong>the</strong> <strong>pendulum</strong>was considered whereas no <strong>control</strong> action wasdetermined in order to <strong>control</strong> <strong>the</strong> speed and <strong>the</strong> positionof <strong>the</strong> <strong>cart</strong>. In this section <strong>the</strong> previous <strong>control</strong>x 2x 1ux 210−18642−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1x 1/π00 2 4 6 8 10 12 14 16 18 20Time [s]50−50 2 4 6 8 10 12 14 16 18 20Time [s]x 1u10−14321a)−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1x 1/π00 2 4 6 8 10 12 14 16 18 20Time [s]20−2−40 2 4 6 8 10 12 14 16 18 20Time [s]b)Figure 4: Results of a simulation with a) <strong>the</strong> slidingmode law and b) <strong>the</strong> modified law.law is modified (adding a new term) in such a way that<strong>the</strong> <strong>cart</strong> eventually stops while <strong>the</strong> <strong>pendulum</strong> is in <strong>the</strong>upright position.The model of <strong>the</strong> <strong>system</strong> when <strong>the</strong> <strong>cart</strong> speed dynamicsare considered [1] and after partial linearization [5]results:ẋ 1 = x 2ẋ 2 = sin x 1 − cos x 1 u (15)ẋ 3 = uwhere x 1 and x 2 have <strong>the</strong> same meaning as be<strong>for</strong>e, x 3is <strong>the</strong> <strong>cart</strong> speed.Notice that (15) is a feed<strong>for</strong>ward <strong>system</strong> and, thus,<strong>for</strong>warding can be applied. In order to avoid <strong>the</strong> resolutionof <strong>the</strong> partial differential equation, we will be basedon <strong>the</strong> partial state feeback stabilization with bounded<strong>control</strong> variant [2,3].This method is intuitively suitable <strong>for</strong> <strong>the</strong> problemconsidered: <strong>the</strong> new <strong>control</strong> law will consist in a slightmodification of <strong>the</strong> <strong>control</strong> law that stabilizes <strong>the</strong> pen-4


dulum and it will be expected that <strong>the</strong> deceleration of<strong>the</strong> <strong>pendulum</strong> will be slow. This is a very natural wayto work.In order to apply <strong>the</strong> method, consider <strong>system</strong> (15)with a <strong>control</strong> law that is <strong>the</strong> sum of previous modificationof <strong>control</strong> law (14) plus <strong>the</strong> new action u s (<strong>the</strong>subscript stands <strong>for</strong> speed, since <strong>the</strong> aim of this term isto <strong>control</strong> <strong>the</strong> <strong>cart</strong> speed):ẋ 3 = 2sin 2x 1 + ˜ϕ ε x 2 cos x 1 + u s (16)ẋ 1 = x 2 (17)ẋ 2 = −sin 3x 1 − ˜ϕ ε x 2 cos 2 x 1 − cos x 1 u s , (18)which has been reordered as it is usual in <strong>the</strong> <strong>for</strong>wardingprocedure.Notice that in order to apply <strong>the</strong> method proposed in[2] sub<strong>system</strong> (17)–(18) should be input-to-state stable(ISS). The basic idea is that, if this sub<strong>system</strong> is ISS,<strong>the</strong>n (x 1 ,x 2 ) will be sufficiently close to zero providedu s is small enough. Once this goal is accomplished all<strong>the</strong> nonlinearities of <strong>the</strong> <strong>system</strong> can be approximatedby linear terms since all of <strong>the</strong>m only depend on x 1and x 2 . The following proposition states <strong>the</strong> ISS (withrestrictions) property <strong>for</strong> this sub<strong>system</strong>.Proposition 3. The <strong>system</strong> (17)–(18) is locally ISS <strong>for</strong>||x|| < 0.095π.Sketch of <strong>the</strong> proof The proof is only sketched here <strong>for</strong><strong>the</strong> lack of space. The idea is to choose as <strong>the</strong> Lyapunovfunction candidate <strong>the</strong> functionV (x 1 ,x 2 ) = − cos3 x 13+ 1 + 1 2 x2 2 + ε v2 x2 1 + ε v x 1 x 2 ,It can be seen that it fulfills <strong>the</strong> conditions of Theorem5.2 in [4] <strong>for</strong> ||x|| < 0.095π. ✷As we are interested in a global law that is even ableto swing up <strong>the</strong> <strong>pendulum</strong>, we have to include ano<strong>the</strong>rdiscontinuity: we choose u s = 0 in order to reach <strong>the</strong>region <strong>for</strong> which <strong>system</strong> (17)–(18) is locally ISS. Oncethis region is reached, we choose u S as below in order toalso stabilize (16) according to <strong>the</strong> procedure proposedin [2].Due to <strong>the</strong> ISS property and to <strong>the</strong> fact that u s issmall, variables x 1 and x 2 will eventually approach tozero and, <strong>the</strong>n, we can use a linear approximation <strong>for</strong> all<strong>the</strong> nonlinear functions that appear in <strong>the</strong> model sincex 3 does not appear in <strong>the</strong>m. The method proposes <strong>the</strong>following <strong>control</strong> law:( )l3 x 3u s = ε k σ(19)ε kwhere σ denotes <strong>the</strong> normalized saturation σ(·) =sign(·)min{| · |,1} and l 3 is a parameter that can betuned considering only <strong>the</strong> linear approximation of <strong>the</strong>resultant <strong>system</strong>. Notice that this <strong>control</strong> law fulfills ourrequirement: is bounded by ε k . The fact that, with u k ,x 3 tends to zero when x 1 and x 2 are close to zero can bededuced from <strong>the</strong> circle criterion: using <strong>the</strong> linear approximationof <strong>the</strong> nonlinearities that depend only onx 1 and x 2 , <strong>the</strong> only remaining nonlinearity is <strong>the</strong> oneintroduced in (19). It can be seen that <strong>the</strong> <strong>system</strong> is inLur’e <strong>for</strong>m and, thus, <strong>the</strong> circle criterion can be applied.The <strong>system</strong> is:with⎡A = ⎣ẋ = Ax + Buy = Cx (20)( )l3 x 3u = ε k σε k0 1 0−3 −k 1 04 k 1 0⎤⎡⎦ B = ⎣0−11and C = [0 0 1]. Since u k belongs to <strong>the</strong> sector (0,l 3 ],<strong>system</strong> (20) will be asymptotically stable if G(jω) =−C(jωI − A) −1 B (<strong>the</strong> minus sign is due to <strong>the</strong> usualnegative feedback) lies on <strong>the</strong> right of <strong>the</strong> vertical linegoing through (−1/l 3 ,0). It can be seen that <strong>the</strong> locusG(jω) is bounded from <strong>the</strong> left and, thus, <strong>for</strong> smallenough values of l 3 <strong>the</strong> stability is guaranteed.In summary, <strong>the</strong> resultant <strong>control</strong> law is given by:u = u e + u swhere u e = u c + u d is given in (14) and u s is given by{0( ) <strong>for</strong> ||x|| ≥ 0.095πu s = lε k σ 3x 3(21)ε k<strong>for</strong> ||x|| < 0.095πSince u e introduces a discontinuity, <strong>the</strong> final <strong>control</strong>signal will have two points of discontinuity: <strong>the</strong> first onewhen x 1 crosses one of <strong>the</strong> values ± π 3and <strong>the</strong> secondone when (x 1 ,x 2 ) enters <strong>the</strong> central region of Fig. 2. Ifε is small enough and following <strong>the</strong> reasoning of Section2.2 <strong>the</strong>se each of <strong>the</strong>se two situations can occur only onetime in one orbit. Notice that <strong>the</strong> gap of both discontinuitiescan be made arbitrarily small reducing ε and ε k .However, making ε k small deteriorates <strong>the</strong> per<strong>for</strong>manceof <strong>the</strong> <strong>system</strong>.It should be realized that <strong>the</strong> ideas of [3,7,8] can berecursively applied and, thus, <strong>the</strong> position of <strong>the</strong> <strong>cart</strong>could also be <strong>control</strong>led in a fur<strong>the</strong>r step. Never<strong>the</strong>less,<strong>for</strong> simplicity, this step is omitted here.The per<strong>for</strong>mance of <strong>the</strong> proposed <strong>strategy</strong> can be observedin <strong>the</strong> simulation that appears in Fig. 5 whichcorresponds to <strong>the</strong> values x(0) = (0.99π,0,0), ε = 0.1,k 1 = 5, ε k = 0.2, ε v = 0.1, l 3 = 1. The top left graphshows <strong>the</strong> projection of <strong>the</strong> trajectory into <strong>the</strong> (x 1 ,x 2 )plane. It can be seen that, in a first stage, <strong>the</strong> trajectoryreaches a neighborhood of <strong>the</strong> origin of this plane.⎤⎦ ,5


The final behavior is better seen in <strong>the</strong> top right graphwhere <strong>the</strong> time evolutions of x 1 and x 3 are plotted (x 2is omitted <strong>for</strong> clarity). It can be seen that <strong>the</strong> threevariables (and, consequently, also x 2 ) eventually tendto zero. The bottom left graph shows <strong>the</strong> evolution ofu, which is zoomed in <strong>the</strong> bottom right graph, showing<strong>the</strong> two discontinuities.x 20.50−0.5−1−1.5−0.5 0 0.5 1x /π 1u210−1−2−30 5 10 15 20Time3 Conclusionsu43210−1−2−30 5 10 15 20Time1.510.50−0.5−1−1.5Figure 5: Simulation results.x 1x 3−20 2 4 6 8TimeIn this paper we have presented a new <strong>control</strong> <strong>strategy</strong><strong>for</strong> <strong>the</strong> well-known <strong>pendulum</strong>-on-a-<strong>cart</strong> <strong>system</strong>. Thenovelty of <strong>the</strong> new <strong>strategy</strong> is, on <strong>the</strong> one hand, <strong>the</strong> factthat it is able to swing up and to maintain <strong>the</strong> <strong>pendulum</strong>;on <strong>the</strong> o<strong>the</strong>r hand <strong>the</strong> <strong>cart</strong> speed is also <strong>control</strong>led.Fur<strong>the</strong>rmore, <strong>the</strong> same procedure can be extended toalso <strong>control</strong> <strong>the</strong> position of <strong>the</strong> <strong>cart</strong>.Most of <strong>the</strong> laws presented in <strong>the</strong> literature <strong>control</strong> <strong>the</strong><strong>cart</strong> only once <strong>the</strong> <strong>pendulum</strong> has been swang up by commutingto ano<strong>the</strong>r <strong>control</strong> law. The law presented herepresents, at most, two discontinuities <strong>for</strong> each orbit butit has <strong>the</strong> nice characteristic of not commuting betweendifferent <strong>control</strong> laws based on different approaches.[2] G. Kaliora and A. Astolfi. A simple design <strong>for</strong> <strong>the</strong>stabilization of a class of cascaded nonlinear <strong>system</strong>swith bounded <strong>control</strong>. In Proceedings of <strong>the</strong>40th IEEE Conference on Decision and Control,pages 3784–3789, 2001.[3] Georgia Kaliora. Control of nonlinear <strong>system</strong>s withbounded signals. PhD <strong>the</strong>sis, Imperial College ofSicnece, Technology and Medicine, London, 2002.[4] H. K. Khalil. Nonlinear Systems. Prentice Hall,second edition, 1996.[5] M. W. Spong. Energy based <strong>control</strong> of a class ofunderatuated mechanical <strong>system</strong>s. In Proceedingsof <strong>the</strong> 13th World Congress of <strong>the</strong> IFAC, pages 431–435, 1996.[6] B. Srinivasan, P. Huguenin, K. Guemghar, andD. Bonvin. A global stabilization <strong>strategy</strong> <strong>for</strong> an inverted<strong>pendulum</strong>. In Proceedings of <strong>the</strong> 15th WorldCongress of <strong>the</strong> IFAC, 2002.[7] A. R. Teel. Feedback stabilization: Nonlinear solutionsto inherently nonlinear problems. PhD <strong>the</strong>sis,University of Cali<strong>for</strong>nia at Berkeley, 1992.[8] A. R. Teel. Global stabilization and restrictedtracking <strong>for</strong> multiple integrators with bounded <strong>control</strong>.Systems and Control Letters, 18(3):165–171,1992.[9] A. van der Schaft. L 2 -Gain and Passivity Techniquesin Nonlinear Control. Springer-Verlag, 1989.[10] J. Zhao and M. W. Spong. Hybrid <strong>control</strong> <strong>for</strong> globalstabilization of <strong>the</strong> <strong>cart</strong>-<strong>pendulum</strong> <strong>system</strong>. Automatica,37:1941–1951, 2001.AcknowledgmentsThis work has been supported under MCyT-FEDERgrants DPI2003-00429 and DPI2001-2424-C02-01.References[1] I. Fantoni and R. Lozano. Non-linear <strong>control</strong> <strong>for</strong>underactuated mechanical <strong>system</strong>s. Springer, London,2002.6

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!