A family of smooth controllers for swinging up a pendulum K. J. ˚ Astr¨om aJ. Aracil bF. Gordillo b aLund University. Lund Institute of Technology. Box 118 SE-221 00 Lund. Sweden E-mail:
[email protected] bEscuela Superior de Ingenieros, Universidad de Sevilla. Camino de los Descubrimientos s/n. Sevilla-41092. Spain E-mail: [aracil,gordillo]@esi.us.es Abstract The paper presents a new family of controllers for swinging up a pendulum. The swinging up of the pendulum is derived from physical arguments based on two ideas: shaping the Hamiltonian for a system without damping; and providing damping or energy pumping in relevant regions of the state space. A family of simple smooth controllers without switches with nice properties is obtained. The main result is that all solutions that do not start at a zero Lebesgue measure set converge to the upright position for a wide range of the parameters in the control law. Thus, the swing-up and the stabilization problems are simultaneously solved with a single, smooth law. The properties of the solution can be modified by the parameters in the control law. Control signal saturation can also be taken into account using the Hamiltonian approach. Key words: Pendulum, Shaping Hamiltonians, Swing up, Energy management. 1 Introduction The family of the inverted pendula has attracted the attention of control researchers in recent decades as a benchmark for testing and evaluating a wide range of classical and contemporary nonlinear control methods (see [1,5,11], to mention only a few references). The problems associated with this control system can be found in many applications, such as attitude control of a space booster on takeoff (where the objective of the attitude control is to keep the space booster in a vertical position), and stability of walking robots. The people mover Segway and the Josephson junction are described by the same equations. There are different versions of the inverted pendulum system offering a variety of interesting control problems. In this paper we are only concerned with a two-dimensional model of the pendulum and, thus, the acceleration of its pivot is assumed to be the control input. Swing-up and stabilization of the pendulum is usually solved by switching between different laws: first, a law that performs the swing-up is used (usually designed by energy considerations [5]) and, once the pendulum is near the vertical position, the controller switches to a local law [13]. Rantzer has supplied an interesting approach to smoothly merge both local and global solutions to the problem, guarantying the stability of the system [10]. In [12] a single controller is also proposed but it requires a strategy for commutation of the reference value. In [2,7] a new strategy was proposed that solves both problems with a single control law, without commutation between different laws, but by commutation of a controller parameter. In the paper, we return to the idea of [2,7]. An energy shaping control law is designed in such a way that: 1) the closed-loop energy presents a minimum at the desired position; and 2) the energy shaping controller is globally defined. Since the chosen target energy has other minima different than the desired equilibrium, a combination of energy dissipation (damping) and injection (pumping) is needed in order to globally stabilize the origin. To that end an oval closed curve circumscribing about the region where pumping is needed is introduced. The resulting law is smooth, no commutations are needed, and the origin of the final closed-loop system is asymptotically stable in S×Rexcept for a set of zero measure. The final control laws have parameters that are easy to tune. A criterion for global stability with its proof is also included. Previous results of this approach have been reported in [3,4,8]. The results presented in this paper are related to the ones presented in [1]. In that paper, an energy shaping controller is combined with a smooth pumping-damping strategy. The current paper enhance these results in sev- Article published in Automatica 44 (2008) 1841–1848
eral aspects: •In [1] the energy shaping term is proposed without justification. Here, we justify a family of target energies. The energy presented in [1] is a particular case, not necessarily the simplest one. •The damping-pumping term presented here is much simpler than the one in [1]. •The effect of control action saturation is considered in this paper. The paper is organized as follows. In Sect. 2 energy shaping is used to fit a Hamiltonian target system that has a center at the desired upright position. This Section focuses on a particular choice of the desired energy. In Sect. 3 a pumping-damping strategy is introduced that makes the upright position the only stable equilibrium point. Section 4 is devoted to the stability analysis of the closed-loop system. Section 5 is devoted to the case of control signal saturation. The paper ends with a Section of conclusions. 2 Energy Shaping The normalized model of the pendulum, when the control input is the acceleration of the pivot, is given by ˙x1=x2 ˙x2= sin x1−ucos x1,(1) where x1is the angular position of the pendulum with the origin at the upright position and x2is the velocity of the pendulum. This system is defined on a cylindrical state space S×R. Our goal is to design a single smooth controller that is able to swing up the pendulum from (almost) all initial conditions and to maintain the pendulum at the upright position. We will base the derivation on the potential energy shaping method, choosing as desired Hamiltonian functions of the form Hd(x1, x2) = Vd(x1) + x2 2 2,(2) where the potential energy Vdshould have a minimum at the desired upright position. Then, the generalized Hamiltonian target system adopted is "˙x1 ˙x2#="0 1 −1−ka(x)#"∂Hd/∂x1 ∂Hd/∂x2#,(3) which, with Hdas given by (2), yields ˙x1=x2 ˙x2=−V′ d(x1)−ka(x)x2.(4) Usually ka(x)>0 and, thus, it is a damping coefficient; in this paper, a pumping-damping mechanism is used and therefore ka(x)<0 in some regions of the state space. One of the problems for choosing an appropriate Vd(x1) function is related to the term cos x1, affecting to the control signal uin the second equation of (1). For instance, the most elementary choice is Vd=−cos x1, which has an appropriate shape (a single minimum at the desired upright position), but it leads to the control law u= 2 tan x1(for the case ka= 0) which cannot be implemented in the full domain |x1| ≤ πbecause the feedback law is unbounded for x1=±π/2. To solve the matching problem of the open (1) and closed (4) loop behaviors, and in order to avoid the division by cos x1, a good choice of V′ dis V′ d=−sin x1+β(x1) cos x1,(5) and then, for ka= 0 (that is, for the conservative case; the case ka6= 0 is discussed later), u=β(x1). Some additional conditions should be imposed on the function β. First, β(0) = 0 to guarantee that the origin (0,0) is an equilibrium of the closed-loop system. To ensure that the controlled pendulum moves in a cylindrical state space, the closed-loop system should display some periodicity. Then, it is reasonable to make β(x1) = sin x1¯ β(cos x1). This choice facilitates the integration of (5) to get Vd. Furthermore, we should impose that V′(0) = 0, V′′(0) > 0, and for symmetry reasons Vd(x1) = Vd(−x1). A family of functions Vdthat fulfill these conditions is given by Vd=a0+ cos x1−a2cos2x1−a3cos3x1−···,(6) which allows us to determine β(x1) from (5). In effect, β(x1) = sin x1(2a2+ 3a3cos x1+···).(7) In this paper we will be concerned with the special case Hd(x1) = x2 2 2+ cos x1−acos2x1−1 4a.(8) Other cases are considered in [3]. The reason for the choice of a0is clear below. With the choice (8) the matching problem is solved with the feedback law u= 2asin x1.(9) It should be noted that controller (9), with a= 1, was proposed in [6] in another context. Control law (9) gives a Hamiltonian closed loop system whose level curves are shown in Fig. 1. 1842
−1 −0.5 0 0.5 1 −3 −2 −1 0 1 2 3 x1/π x2 A B1 B1 B2 B2 C Fig. 1. Some level curves for function Hd(x1, x2) with a= 1. In solid the level curve Hd= 0. So far we have focused our attention in the solvability of the matching problem and we have not considered the global behavior of the target system. Function Vdimplicit in (8) has some undesirable features. As required, for a > 0.5 it has a minimum at the origin, but it has another minimum that makes the desired equilibrium point not to be the only possible equilibrium. For this Vdthe additional minimum coincides with the undesired hanging position. The fact of having undesirable minima apart of the desired one, extends to the full family of Vdgiven by (6). Ideally we would like to have an energy function which has a unique minimum at x1= 0. Unfortunately this cannot be achieved with potential energy functions Vd such that V′ dis given by (5) and (7) because as V′ d= −sin x1+ sin x1cos x1¯ β(cos x1) then, we have V′ d=−1 for x1=π/2 (and V′ d= 1 for x1=−π/2). This means the there is at least one maximum at |x1|=x0 1in the interval (0, π/2) (resp. (−π/2,0)). These maxima will give rise to saddles in the energy function (2). Function Vd implicit in (8) has one pair of undesirable minima but other choices for Vdmay have more minima. In any case the undesired minima cannot be avoided. With pure damping strategies, the extra minima give rise to undesired basins, which we will call “undesirable wells” in the energy landscape, because they hamper the global nature of the stability of the equilibrium at the upright position. Notice that the reference for the potential energy a0has been chosen so that the curve Hd= 0 limits the undesirable well (i.e. the curve passes through the saddles). To overcome the difficulty associated with the undesirable wells we propose a strategy that consists in pumping energy inside them, to make the trajectories to leave their basin. This strategy is similar to the one introduced in [1], but the one presented here has more physical meaning, as we are dealing with energy. This strategy is discussed in the next section. 3 Damping and Pumping Since for ka= 0 the system is Hamiltonian all trajectories are stable but not asymptotically stable. It is then easy to influence the system significantly by changing damping ka6= 0. Even a small change can have a major impact. To do so we introduce the control law u=ues +upd where ues = 2asin x1is the energyshaping control term (9) and upd is an additional control signal which have to be chosen to provide the appropriate damping or pumping. As we have seen, the first term, ues, of the control law gives a closed-loop system with Hamiltonian (8). It is easy to see that system (1) with u=ues +upd is a PCH system [9] with natural passive output y=g⊤(x)∂Hd/∂x =−x2cos x1, where g(x) = [0 −cos x1]⊤. This means that taking as input upd =−kaythe system behaves in such a way that Hd decreases. That is good when the trajectory is in the good well or approaching it. But when it is in an undesirable well we have to inject energy. Therefore we should modulate the sign of kaaccordingly. Making u=ues +upd in (1), the instantaneous energy variation is given by ˙ Hd=−x2upd cos x1.(10) By choosing upd =bF(x1, x2)x2cos x1, with b > 0 being a tuning parameter, the sign of the time derivative of Hd is determined by the sign of the new function F(x1, x2) (to be defined). Hence the control law is u= 2asin x1+bx2F(x1, x2) cos x1.(11) The first term of this controller can be interpreted as a nonlinear spring and we can therefore call it the “spring term”. This term makes the pendulum to behave conservative. The second one is the pumping-damping term. Figure 1 shows that the level curve for Hd(x1, x2) = 0 separates the state space into three regions. Region A, which contains the desired equilibrium where the pendulum is upright, is bounded by the solide curve. Region C, which contains the equilibrium where the pendulum hangs straight down, is bounded also by the solid line. The rest is region B, which later will be divided into the regions B1and B2that appear in the figure. A natural choice is to take Fnegative in region C and positive elsewhere. To have a continuous control law the function should also vanish on the boundary of region C. Thus, we could consider a curve that matches Hd= 0 at the boundary of region C (for a= 1, one such a function is F=|x2|+√2 cos x1−1/√2). However, this idea does not work: it makes the stable manifold of the saddle points “very attractive” causing trajectories to tend to the saddle and, once there, the behavior is very sensitive to disturbances (this behavior around the saddles is 1843
similar to the behavior around the origin in usual swingup laws [5]). Therefore, from a strict mathematical point of view, trajectories could not leave region C with this choice and they would turn around the heterocline joining the saddles. To avoid this problem, it is proposed to search for a smooth closed curve close to the boundary of any undesirable well, but not coinciding exactly with this boundary. An example is the dashed curve in Fig. 1 where a new region, B2⊂B, has been introduced. Energy is injected by the controller in this region. As it will be seen below, this “imperfect matching” between curves H= 0 and F= 0 gives a closed-loop system with appropriated properties. Actually, the fact that B2is not an empty set is a key point in the approach proposed here. The problems that this “incorrect” injection of energy raises will be discussed below in Sect. 4. Our problem now is to find a simple function Fwith these characteristics. A possible choice is to consider ovals of the form F(x1, x2) = α2x2 2+α1cos x1−1 = 0,(12) and making curves Hd= 0 and F= 0 to match at the saddle point and at x1=π. This requirement yields F(x1, x2) = x2 2 2+2a+ 1 4a(2acos x1−1).(13) It can be seen that the oval F(x1, x2) = 0 circumscribes about the boundary region of C and it is a reasonable approximation for Hd= 0 as it is shown in Fig. 1. Function F(x1, x2) takes a positive value in regions A and B1, and a negative one in regions C and B2. The fact that F= 0 circumscribes about region C will be used below for the stability proof. Control law (11) has good physical interpretation. The first term shapes the energy function so that the equilibrium at the origin is a center. The second term introduces energy damping in region A and almost all of region B, and energy pumping in region C. The size of the regions are adjusted by the parameter aand the amount of damping by the parameter b. 4 Stability Analysis We will now analyze the stability of the closed-loop system. To formulate a global stability criterion for control we introduce the following functions: K(x1, x2)△ = cos2(x1)F(x1, x2) ϕH(x1)△ =r1 2a+ 2acos2x1−2 cos x1 ϕF(x1)△ =r1 + 2a 2a(1 −2acos x1), x0≤x1≤π where x0= arccos(1/2a), and from them the index Φ(a)△ = x0 Z 0 ϕH(x1)K(x1, ϕH(x1))dx1 + π Z x0 ϕF(x1)K(x1, ϕH(x1))dx1.(14) Function ϕH(x1) is the x2coordinate of the upper curve defined by Hd(x1, x2) = 0 (with Hdgiven by (8)) and the function ϕF(x2) is the x2coordinate of the upper curve defined by F(x1, x2) = 0 (plotted with dashed trace in Fig. 1). We have the following result. Theorem 1 Consider system (1) with control law (11) where Fgiven by (13) and b > 0. Then, for any a > 0.5 such that Φ(a)>0, the origin is asymptotically stable in S×Rexcept for a set of zero measure. Proof We will investigate how the energy Hdgiven by (8) changes in the different regions. From Fig. 1 it is clear that in region A, which is bounded by the level curve Hd= 0 and contains the origin, we have ˙ Hd≤0. Therefore, applying LaSalle invariance principle, it is easy to see that the origin is (at least locally) asymptotically stable and that region A belongs to the domain of attraction of the origin. Convergence is faster the larger b is. In region C we have Hd≤0 and ˙ Hd≥0. All trajectories will leave the region, faster the larger bis. In region B we have Hd≥0 but the derivative ˙ Hdcan be both positive and negative. Therefore, as shown in Fig. 1, we have divided the region into two subregions B1={x∈ B|F(x)>0}and B2={x∈B|F(x)≤0}; that is, B2 is the region where the control law “incorrectly” injects energy. Introduce D = B2∪C. In B1we have damping and the energy will decrease. It thus remains to investigate what happens with trajectories originating in D. To accomplish this we will investigate the total change in energy along the trajectories (we will consider the case for x2>0; the case x2<0 can be analyzed with a similar argument). In D we have ˙x1>0 except at the saddle equilibrium. Taking into account that in D we have ˙ Hd≥0, almost all trajectories in D will thus eventually leave D. We will separate two cases characterized by trajectories that enter A after leaving D and trajectories that do not. The trajectories that enter A will converge to the origin. Now, on the other hand, we will show that the trajectories that do not directly enter A will suffer a net energy loss over a period (i.e. a complete pendulum revolution) if Φ(a)>0. In this way and taking into account that x1is defined on the manifold S, the system will enter region A in finite time (perhaps after some complete revolutions). 1844
0 0.2 0.4 0.6 0.8 1 −2.5 −2 −1.5 −1 −0.5 0 0.5 1 1.5 2 2.5 ϕH ϕF P0P1P2 P3P4 x1/π x2 Fig. 2. Example of a trajectory entering and leaving region B2(shadowed in the figure). We have ˙ Hd(x1, x2) = −bx2 2K(x1, x2).Dividing by ˙x1 gives dHd(x1, x2) = −bx2K(x1, x2)dx1. Consider the change of energy over the interval 0 ≤x1≤ πfor trajectories that start in Dand do not enter region A, (see, for instance, trajectory P0P1P2P3P4in Fig. 2). Due to symmetry, the following reasoning also applies to the interval [−π, 0]. The total energy change along the trajectory is ∆Hdwhere −∆Hd= π Z 0 bx2K(x1, x2)dx1 = x0 Z 0 bx2K(x1, x2)dx1+ π Z x0 bx2K(x1, x2)dx1.(15) A lower bound for this expression can be found with the help of Fig. 2. In this figure, a trajectory entering and coming out of region B2(shadowed in the figure) is represented, as well as the curves Hd(x1, x2) = 0 (given by x2=ϕH(x1)) and F(x1, x2) = 0 (given by x2= ϕF(x1)). The first represented point for the trajectory is P0(with x1= 0) and the last one is P4(x1=π). Point P1 is the point that corresponds to x1=x0. The trajectory enters region B2at the point P2and it comes out of it at point P3. Of course, these points are unknown since we cannot integrate the system equations but the figure illustrates the following argument. The first integral in the last right-hand side of (15) corresponds to the curve between P0and P1corresponding to region B1. In this region and for a given value of x1we have x2≥ϕH(x1) and F(x1, x2)> F(x1, ϕH(x1)). This yields x0 Z 0 bx2K(x1, x2)dx1≥ x0 Z 0 bϕH(x1)K(x1, ϕH(x1))dx1.(16) The argument corresponding to the second integral in the right-hand side of (15) is a little more involved since it corresponds to points in region B1(points between P1and P2and points between P3and P4in Fig. 2) as well as to points in region B2(points between P2and P3). For the points in region B1,F(x1, x2)>0 and, furthermore, x2≥ϕF(x1) and F(x1, x2)> F(x1, ϕH(x1)). 0.5 0.6 0.7 0.8 0.9 1 1.1 1.2 1.3 1.4 1.5 0 0.5 1 a Φ(a) Fig. 3. Plot of function Φ(a). This yields x2K(x1, x2)≥ϕF(x1)K(x1, ϕH(x1)).(17) For the points in region B2, we have F(x1, x2)≤0, x2≤ϕF(x1) and F(x1, x2)> F(x1, ϕH(x1)) and, thus, inequality (17) is also fulfilled: x2K(x1, x2)≥ϕF(x1)K(x1, ϕH(x1)). Consequently, π Z x0 bx2K(x1, x2)dx1≥ π Z x0 bϕF(x1)K(x1, ϕH(x1))dx1.(18) This inequality if fulfilled independently of the location of points P2and P3(and even if the trajectory entered and came out of region B2several times). Using (16) and (18), the total energy change (from (15)) fulfills −∆Hd≥ x0 Z 0 bϕH(x1)K(x1, ϕH(x1))dx1 + π Z x0 bϕF(x1)K(x1, ϕH(x1))dx1=bΦ(a)>0, which means that the net energy balance along a semirevolution (from x1= 0 to x1=π) is negative. A similar reasoning can be applied to the interval [−π, 0] and for the corresponding cases with x2<0 arriving at the same conclusion. Therefore, trajectories tend to region A where convergence to the origin is guaranteed. Finally, using LaSalle arguments it can be seen that the only invariant set with ˙ Hd= 0 only contains equilibria. The only stable equilibria is the origin, while the other ones are hyperbolic. With this, the proof is completed. ✷ Remark 1 The plot of the function Φin Fig. 3 shows that stable systems are obtained for all a > 0.94 and b > 0. The positive slope of this curve is intuitively reasonable since the size of region A increases with increasing a. Remark 2 The estimate is conservative because energy pumping in D = B2∪Cis overestimated and damping 1845
−1.5 −1 −0.5 0 −3 −2 −1 0 1 2 3 x1/π x2 0 50 100 150 −2 −1 0 0 50 100 150 −2 0 2 0 50 100 150 −2 0 2 x1/π x2 u u upd t Fig. 4. Simulated swing-up for a= 1 and b= 0.1. −1.5 −1 −0.5 0 −3 −2 −1 0 1 2 3 x1/π x2 0 5 10 15 20 −1.5 −1 −0.5 0 0 5 10 15 20 −2 0 2 0 5 10 15 20 −2 0 2 4 x1/π x2 u u ues upd t Fig. 5. Simulated swing-up for a= 1 and b= 1. outside Dis underestimated. This means that it is possible to have stable systems, for any value of b, for values of asmaller than 0.94. By simulation it can be seen that the actual value for this bound is a= 0.81. The system can also be stable for smaller values of aby making b sufficiently large. In order to clarify the ideas of the proof and the behavior of the closed-loop system some simulations are included. Figures 4 and 5 show two swing-ups for different values of parameter b. These simulations illustrate the effect of parameter b: the larger bis, the quicker the system evolves (note the different scales in the time axis) and the larger the pumping-damping term upd is. 5 Control signal saturation This section is devoted to the modification of control law (11) in order to cope with bounded control signal. In absence of friction, the term upd can be made arbitrarily small by decreasing arbitrarily a positive tuning parameter. The only consequence is that the transient behavior is slower. On the contrary, upper bounds can not be arbitrarily imposed on the energy shaping term absolute value [8]. Consider system (1) with the control law u=ues = 2asin x1(19) which only does energy shaping. Assume that the controller saturates at u= ˆu, i.e., |u| ≤ ˆu(for a start, ˆumay be considered equal to ¯u, but it will redefined below) . Then, we have for the closed loop system ˙x1=x2 ˙x2= sin x1−cos x1satˆu(2asin x1),(20) where satˆudenotes the saturation at ¯usatˆu(·) = sgn(·) min{| · |,ˆu}. Define in the plane (x1, x2) the following three regions: •Region R1={(x1, x2) : |sin x1| ≤ ˆu/(2a)}. In this region the system behaves as without saturation. •Region R2={(x1, x2) : sin x1>ˆu/(2a)}. In this region u= ˆu/(2a). •Region R3={(x1, x2) : sin x1<−ˆu/(2a)}. In this region u=−ˆu/(2a). Consider the following function Hsat = H1if x∈R1, H2if x∈R2, H3if x∈R3, (21) with H1(x1, x2) = cos x1−acos2x1+x2 2 2+ˆu2 4a+a(22) H2(x1, x2) = x2 2/2 + cos x1+ ˆusin x1(23) H3(x1, x2) = x2 2/2 + cos x1−ˆusin x1.(24) This function is continuous and its derivatives are also continuous. It can be shown that system (20) is Hamiltonian with Hamiltonian function given by Hsat. Figure 6 shows some level curves for this function. Therefore, the qualitative description of the system with saturation (Fig. 6) is very similar to one corresponding to the unsaturated case (Fig. 1): both systems are Hamiltonian; nevertheless their Hamiltonians are different: Hdgiven 1846
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1 −3 −2 −1 0 1 2 3 x1pi x2 R1 R1 R1 R2 R3 Fig. 6. Level curves for function Hsat,a= 1,ˆu= 1. by (8) in the unsaturated case and H=Hsat given by (21) in the case of saturation. 5.1 Pumping and damping The introduction of the pumping-damping term in a similar way to Sect. 3 has to be done carefully since the pumping-damping term can distort the boundary between the zones making that Hamiltonian Hsat is not longer continuous and, thus, invalidating stability analysis similar to the one of Sect. 4. A simple way to avoid this problem is to introduce uin the following way: u= satδ¯u(ues) + sat(1−δ)¯u(upd),(25) with 0 < δ < 1. In this way the energy shaping term is saturated at ˆu=δ¯u(this is the reason why a symbol different from ¯uwas used for the saturation of ues previously) and the pumping-damping term does not interfere with it. With this choice, the previous analysis is still valid (of course, Hamiltonian (21) is no longer constant but it is modulated by upd). As in Sect. 3, the pumping-damping term is chosen of the form (11) but function Fhas to be redefined since it must circumscribe about the undesirable wells. We choose function Fof the form F(x1, x2) = α2x2 2+α1cos x1−1. We will impose that the curve F= 0 intersect with the curve Hsat =H∗at the saddle points and at x1=π. This yields α1= 2aand α2=2a 2a+1 for ˆu≥√4a2−1 and α1=√1 + ˆu2, α2=1+α1 2(1+α1)−ˆu2/(4a) for ˆu < √4a2−1. 5.2 Stability Analysis Function Hsat can serve as a basis for the generalization of the analysis carried out in Sect. 4 and the stability proof for the saturation case can be easily obtained. Here, only the main points are presented. The closedloop system is ˙x1=x2 ˙x2= sin x1−satδ¯u(ues) + sat(1−δ)¯u(upd), 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 2 3 4 5 6 7 8 9 10 δ a Fig. 7. Values of aand δfor which Φ(a, b, δ, ¯u)>0. Graph for b= 0.1 and ¯u= 2. with ues = 2asin x1and upd =bx2F(x1, x2) cos x1. We have chosen function Hsat such that, for upd = 0, ˙ Hsat = 0. Therefore, ˙ Hsat =−x2cos x1sat(1−δ)¯u(bx2F(x1, x2) cos x1). Using the same arguments of Sect. 4 it suffices to estimate the net energy balance along full revolutions yielding −∆Hsat △ =− π Z 0 ˙ Hsat ˙x1 dx1 ≥ x0 1 Z 0 sat(1−δ)¯u(bϕH(x1)F(x1, ϕH(x1)) cos x1) cos x1dx1 + π Z x0 1 sat(1−δ)¯u(bϕF(x1)F(x1, ϕH(x1)) cos x1) cos x1dx1 △ = Φ(a, b, δ, ¯u). It can be seen that stability is guaranteed if ∆Hsat ≤0 and this condition is fulfilled if Φ(a, b, δ, ¯u)>0. Therefore, we can state the following theorem: Theorem 2 Consider system (1) with control law (25) with ues and upd defined above. Then, for any a > 0.5 such that Φ(a, b, δ, ¯u)>0, the origin is asymptotically stable in S×Rexcept for a set of zero measure. The applicability of this result is more complicated than the one of the unsaturated case since, the corresponding function Φ for the last case only depends on a. Nevertheless, the previous theorem is still useful. For a given pendulum, parameter ¯uhas a physical value. The control designer has to find values of parameters a > 0.5, b > 0 and 0 < δ < 1 such that Φ(a, b, δ, ¯u)>0. For example, parameter bmay be fixed and a graph such as the one of Fig. 7 can be obtained. In this figure, which correspond to ¯u= 2, b = 0.1, the marks represent the values of a and δthat give a positive Φ(a, b, δ, ¯u) and, thus, give rise to an almost-globally stable system. In Fig. 8 we present the results of two simulations in order to show the usefulness of the proposed modifications. In the first simulation, the original control law is simulated with saturation in the control action (a= 10, b = 1847
0 1 2 3 4 5 −2 0 2 0 20 40 60 80 100 −2 −1 0 1 2 Time x1/π x2 u a) 0 0.5 1 1.5 2 2.5 −2 0 2 0 20 40 60 80 100 −2 −1 0 1 2 Time x1/π x2 u b) Fig. 8. Results of two simulations with a= 10, b = 0.1, and ¯u= 2: a) with the original controller b) with the new controller with δ= 0.8. 0.1,¯u= 2). It is shown that the controller does not work properly. In the second simulation the new controller with δ= 0.9 (which corresponds to the good region in Fig. 7) is used showing a good behavior. Better transient behavior can be obtained choosing different values for the tuning parameters. 6 Conclusions This paper presents a new method to design a single controller for swinging up and stabilizing a pendulum based on energy-shaping. The controller drives the system to the desired upright position from any initial condition except for a set of zero measure. The energy shaping is based on a family of energy functions which provide a Hamiltonian structure for the pendulum. A dampingpumping term is added to provide damping around the desired equilibrium to change it from being stable to being asymptotically stable. Negative damping (energy pumping) is introduced in the region around the undesirable equilibria to make them unstable. To accomplish this damping and pumping strategy a new concept of circumscribing ovals has been introduced. A stability criterion has been stated and proven. The resulting control law avoids any commutation between different subcontrollers. An open problem is the performance comparison of the different choices for potential energy functions as well as for the circumscribing ovals. Modifications to the control law for the case of saturated control signal have also been studied. Acknowledgements The authors appreciate the valuable comments by the anonymous reviewers and Associate Editor. The Spanish authors have been supported under the MCyT-FEDER grant DPI2006-07338. References [1] D. Angeli. Almost global stabilization of the inverted pendulum via continous state feedback. Automatica, 37:1103–1108, 2001. [2] J. Aracil and F. Gordillo. The inverted pendulum: A benchmark in nonlinear control. In Proceedings WAC 2004, volume 16, pages 468–482, 2004. [3] J. Aracil, F. Gordillo, and K.J. ˚ Astr¨om. A family of pumpingdamping smooth strategies for swinging up a pendulum. In 3rd IFAC Workshop on Lagrangian and Hamiltonian Methods for Nonlinear Control, 2006. [4] K.J. ˚ Astr¨om, J. Aracil, and F. Gordillo. A new family of smooth strategies for swinging up a pendulum. In 16th IFAC World Congress, Prague, 2005. [5] K.J. ˚ Astr¨om and K. Furuta. Swinging up a pendulum by energy control. Automatica, 36:287–295, 2000. [6] K. Furuta. Control of pendulum: From super mechanosystem to human adaptive mechatronics. In Proceedings of the 42nd IEEE CDC, pages 1498–1507, 2003. [7] F. Gordillo, J. Aracil, and J.A. Acosta. A control strategy for the cart-pendulum system. In Proceedings of the Sixth CONTROLO, pages 214–219, 2004. [8] F. Gordillo, J. Aracil, and K.J. ˚ Astr¨om. Analysis of the control saturation in pumping-damping strategies for the inverted pendulum. In 3rd IFAC Workshop on Lagrangian and Hamiltonian Methods for Nonlinear Control, 2006. [9] R. Ortega, A. van der Schaft, B. Maschke, and G. Escobar. Interconnection and damping assignment passivity-based control of port-controlled Hamiltonian systems. Automatica, 38(4):585–596, 2002. [10] A. Rantzer and F. Ceragioli. Smooth blending of nonlinear controllers using density functions. In Proceedings of European Control Conference, 2001. [11] A.S. Shiriaev, O. Egeland, H. Ludvigsen, and A.L. Fradkov. VSS–version of energy based control for swinging up a pendulum. Syst. & Contr. Lett., 44(1):41–56, 2001. [12] B. Srinivasan, P. Huguenin, K. Guemghar, and D. Bonvin. A global stabilization strategy for an inverted pendulum. In 15th IFAC World Congress, 2002. [13] M. Wiklund, A. Kristenson, and K. J. ˚ Astr¨om. A new strategy for swinging up an inverted pendulum. In Proc. IFAC 12th World Congress, volume 9, pages 151–154, 1993. 1848