2014 14th International Conference on Control, Automation and Systems (ICCAS 2014) Oct. 22–25, 2014 in KINTEX, Gyeonggi-do, Korea
Forwarding Control of Cart-Pendulum System by Following Homoclinic Orbit and Stabilizing Cart Yuji Maruki1 , Hiroya Oka2 , Haruo Suemitsu2 and Takami Matsuo2 1
Department of Information Engineering, Oita National College of Technology, Oita, Japan (Tel: +81-97-552-7443; E-mail:
[email protected]) 2 Department of Architecture and Mechatronics, Oita University, Oita, Japan (Tel: +81-97-554-7804; E-mail:
[email protected])
Abstract: In this paper, we design a controller that attains a homoclinic motion of the pendulum and the asymptotic stability of the cart by using a kind of forwarding control design. First, we derive a controller that converges to a homoclinic orbit via a Lyapunov function of the pendulum subsystem. Next, we give a nonlinear stabilizing controller via another Lyapunov function of the cart subsystem. Moreover, using the third Lyapunov function and adding a complementary control input, we guarantee that the pendulum converges to the homoclinic orbit and the cart is stabilized. Finally, the simulation with MATLAB/Simulink is performed to demonstrate the validity of the proposed control law. Keywords: Inverted pendulum, Energy function, Homoclinic orbit, Forwarding.
1. INTRODUCTION An inverted pendulum is one of the typical examples of nonlinear control systems. Jakubczyk et al. have shown that the inverted pendulum is not feedback linearizable [7]. An additional difficulty comes from the fact that when the pendulum swings past the horizontal the controllability distribution does not have a constant rank [9]. Wei et al. presented a control strategy decomposed into a sequence of steps to bring the pendulum from its lower stable equilibrium position to its unstable equilibrium position having a restricted travel [17]. Chung et al. discussed the control problems of a swinging pendulum using an energy function [4]. Astr¨om et al. investigated an energy control strategies to swing up a cart-less pendulum under the condition that the input was the acceleration of the pivot [2]. Moreover, Chatterjee et al. dealt with the swing-up and stabilization problem of a cartpendulum system with a restricted cart track length and a restricted control force using generalized energy control methods [3]. Spong et al. derived the partially linearized model with the cart acceleration as a new input of the pendulum and proposed a strategy to control the inverted pendulum by swinging it up to its unstable equilibrium position [14]. This trajectory is the homoclinic orbit of the pendulum. These papers do not address the stabilization of the cart. Gordillo et al. derived a controller to stop the cart by applying the forwarding design method to the partially linearized model to stabilize the pendulum [5]. Srinivasan et al. showed that the stabilization controller must be a positive feedback of the cart states by using the singular perturbation method under the assumption that the cart dynamics is slow [15]. Lozano et al. extended their approach by the total energy of the inverted pendulum [9]. Ishitobi et al. considered the swing-up of an inverted pendulum in the presence of modeling errors by introducing another energy function with respect to the
pendulum [6]. We have recently addressed the nonlinear control problem of the cart-pendulum system via Lyapunov functions. First, we designed the nonlinear stabilizing controller by using the two step control method proposed by Saeki [12]. Saeki proposed an intuitive method to design a backstepping-like controller [13]. The controller design is performed in the following two steps: 1) the desired signal of the acceleration of the cart is determined for stabilizing the pendulum by using the nonlinear dynamic equation of the pendulum, 2) the control input for the cart is determined so that the actual acceleration of the cart may follow the desired signal. The controller can be used to expand the range of initial angle from which the system can be stabilized. Next, we derived a backstepping controller with the state feedback for the cart subsystem and showed that the whole system can be locally stabilized around the upright position if the linear controller of the cart has positive feedback gain [8]. Moreover, we dealt with the cart-pendulum system with frictions and proposed a nonlinear state feedback control law that converges to a homoclinic orbit [10]. The controller consists of the swinging controller of the pendulum and the stabilizing one of the cart. The pendulum controller attaining a homoclinic orbit was derived from the energy function of the partially linearized model. Although the energy function is same as in Ishitobi et al. [6], the controller is different from other papers. The forwarding design method to stabilize the cart cannot be applied to this closed-loop system, because the upper equilibrium point of the pendulum with a homoclinic motion is not asymptotically stable. Without proof, we pointed out that the cart-pendulum system converges to the homoclinic orbit if the linear controller of the cart has negative feedback gain. In this paper, we design a controller that attains a ho-
moclinic motion of the pendulum and the asymptotic stability of the cart by using a kind of forwarding control design. First, we derive a controller that converges to a homoclinic orbit via a Lyapunov function of the pendulum subsystem. Next, we give a nonlinear stabilizing controller via another Lyapunov function of the cart subsystem. Moreover, using the third Lyapunov function and adding a complementary control input, we guarantee that the pendulum converges to the homoclinic orbit and the cart is stabilized. The proposed design method is different from the forwarding design method for the following reasons: • The pendulum subsystem is not stabilized, but converges to the homoclinic orbit. • The controller for the cart is designed such that the cart subsystem converges to a stable hyperplane. • The input contains a complementary term to compensate the cross term of the cart position and the pendulum angle.
2. FORWARDING CONTROL DESIGN VIA LYAPUNOV FUNCTIONS In this section, we review the forwarding design method proposed in [11], [16]. Mazenc et al.[11] proposed a stabilization control method for a class of cascaded nonlinear systems with so-called forwarding structure. Consider the following system: } x˙ 1 = f1 (x1 , x2 ) + g1 (x1 , x2 )u (1) x˙ 2 = f2 (x2 ) + g2 (x2 )u
The matrices are defined as: [ ] M + m ml cos θ H(θ) = ml cos θ J + ml2 [ ] F −mlθ˙ sin θ ˙ C(θ) = 0 c where z is the horizontal position of the cart and u is the input voltage. The system parameters are defined as follows: M is the mass of the cart; a is the input-force gain; F and c are the viscous-friction coefficients. To regard the acceleration of the cart as a virtual input, a new input ν0 is defined as follows [14], [1]: 1 ζ1 det H(θ)
ν0
=
ζ1
= (J + ml2 )(−F z˙ + mlθ˙2 sin θ + au) −ml cos θ(−cθ˙ + mgl sin θ)
Using the new input, the cart-pendulum system can be written by z¨ = ν0 θ¨ =
(5) ( ) 1 −cθ˙ + mgl sin θ − mlν0 cos θ . 2 J + ml (6)
The difference between the above equation and [14], [1] is the viscous-friction terms. The pendulum is not a conservative system but a dissipative system. The relationship between actual input of the cart u and the new input ν0 is given by u = us (ν0 )
where
where
f1 (x1 , x2 ) = f¯1 (x1 ) + f12 (x1 , x2 )x2 . Suppose that there exist two Lyapunov functions, W1 (x1 ) and W2 (x2 ), of the system x˙ 1 = f¯1 (x1 ) and x˙ 2 = f¯2 (x2 ), respectively. Mazenc et al. obtained a Lyapunov function of (1) in the form V (x1 , x2 ) = l(W1 (x1 )) + k(W2 (x2 ))
(2)
where the function l and k are nonlinear weight functions. In this paper, we regard x1 and x2 as the cart position z and the pendulum angle θ, respectively. Moreover, adding a complementary control input, we design a control system that converges to a homoclinic orbit of the pendulum subsystem and stabilizes the cart subsystem via the Lyapunov function that is a sum of two Lyapunov functions.
3. SYSTEM DYNAMICS The cart-pendulum system is written by [ ] [ ] [ ] z¨ z˙ au ˙ H(θ) ¨ + C(θ) = . mgl sin θ θ θ˙
(7)
{ 1 1 F z˙ − mlθ˙2 sin θ + us (ν0 ) = a J + ml2 ( )} det H(θ)ν0 + ml cos θ(−cθ˙ + mgl sin θ) .
4. CONTROL OF PENDULUM SUBSYSTEM In this section, we design the controller with energy function for converging to homoclinic orbit. The pendulum subsystem is written by d2 θ dθ + c − mgl sin θ = −ml cos θνp (8) dt2 dt where, νp is the control input for pendulum subsystem. Though Lozano et al.[9] has introduced the energy function considering both of a pendulum and a cart, the energy function in this paper is defined same as in Ishitobi et al.[6]: (J + ml2 )
1 2 ˙ (J + ml2 )(θ(t)) + mgl(cos θ(t) − 1). (9) 2 The purpose of this paper is to design νp such that the ˙ = pendulum converges to the orbit passing through (θ, θ) E(t) =
(3)
(4)
(0, 0), that is, limt→∞ E(t) = 0. The energy function has the following lower bound: E(t) ≥ −2mgl. We take the second power of the energy function as the Lyapunov function for the pendulum subsystem as follows: 1 Vp (t) = E 2 (t). 2
(10)
In this section, we design the control law νp for a pendulum such that lim Vp (t) = 0.
(11)
t→∞
When Vp (t) is zero, the pendulum moves on the homoclinic orbit satisfying the constraint E(t) = 0. The derivative of the Lyapunov function Vp is obtained by
5. CONTROL OF CART SUBSYSTEM In this section, we design a nonlinear feedback controller with a sliding mode to stabilize cart subsystem. The cart subsystem is written by z¨ = νc
(16)
where νc is the control input for the cart subsystem. The Lyapunov function, Vc , is defined as follows: Vc =
δ (z(t) ˙ + λz 3 (t))2 2
(17)
where, λ > 0. Selecting νc as νc = −(β + 3λz 2 )z˙ − βλz 3 ,
(18)
the derivative of the Lyapunov function Vc is given by V˙ c = −βδ(z(t) ˙ + λz 3 (t))2 = −2βVc .
(19)
Thus, we have V˙p = E E˙ = −E(cθ˙2 + (mlθ˙ cos θ)νp (t))
lim Vc = 0.
t→∞
If the input, νp , satisfies (mlθ˙ cos θ)νp (t) = −cθ˙2 + γE(t),
(12)
then we have V˙ p (t) = −γE 2 (t) = −2γVp (t) where γ is any positive constant. The input, νp , is given by νp =
1 ˙ ψ(θ(t), θ(t)) ˙ mlθ cos θ
(13)
where ψ is defined as ˙ ψ(θ(t), θ(t))
=
γmgl(cos θ(t) − 1) (γ ) + (J + ml2 ) − c θ˙2 . 2
d2 θ − mgl sin θ = 0 dt2
Using to the partially linearized model, Gordillo et al. [5] proposed a stabilizing controller of the pendulum using the energy function and a stopping controller of the cart by applying the forwarding design method. In this paper, we design a controller that attains a homoclinic motion of the pendulum and the asymptotic stability of the cart. The whole system is given by (5),(6). We define the control input of the whole system as ν0 = νp + νc + νs ,
(15)
When the orbit converge to the homoclinic one, the pendulum dynamics tends to a free swinging system without frictions as follows: (J + ml2 )
This means that the orbit of z asymptotically converge to the hyperplane z(t) ˙ + λz 3 (t) = 0. On the hyperplane, limt→∞ z(t) = 0 is satisfied. Remark 1: If another Lyapunov function is selected as δ Vc = (z(t) ˙ + λz(t))2 , (21) 2 the cart input, νc , is given by the following linear controller: νc = −(1 + λ)z˙ − λz (22) The cart input (18) is a nonlinear feedback, which has a large negative value in the case of greater traveling distances. Thus, the nonlinear cart input is useful for stabilization of an inverted pendulum having restricted travel.
6. CONTROL OF WHOLE SYSTEM
For the input νp , a zero division happens when θ˙ cos θ = 0 except the homoclinic orbit. In order to avoid a ”division by zero” error and to limit the maximum value, we introduce the saturations as follows: ( ) ) ( 1 ˙ ψ(θ(t), θ(t)) (14) νp = satUm satUd mlθ˙ cos θ where the saturation function sat is defined as ν > U0 U0 ν |ν| ≤ U0 satU0 (ν) = −U0 ν < −U0
(20)
(23)
The first and second terms,νp and νc , were defined previously as the control inputs of the pendulum subsystem and the cart subsystem, respectively. The third term, νs , is the input to compensate the coupling term of the cart and the pendulum movements. Defining the Lyapunov function of the whole system, V (t), as V (t) = Vp (t) + Vc (t)
(24)
its derivative,V˙ (t) is given by V˙
We give the feedback parameters of the controller as follows:
= E E˙ + δ(z˙ + λz 3 )(¨ z + 3λz 2 z) ˙ ˙ ˙ = −E(cθ + (mlθ cos θ)ν0 ) +δ(z˙ + λz)(ν0 + 3λz 2 z) ˙ = −γE 2 − βδ(z˙ + λz 3 )2 −E(mlθ˙ cos θ)νc − E(mlθ˙ cos θ)νs +δ(z˙ + λz 3 )νp + δ(z˙ + λz 3 )νs = −γE 2 − βδ(z˙ + λz 3 )2 −E(mlθ˙ cos θ)νc + +δ(z˙ + λz 3 )νp +{δ(z˙ + λz 3 ) − E(mlθ˙ cos θ)}νs .
γ = 340, λ = 10, β = 10, δ = 0.001, Um = 100, Us = 100, Ud = 100 The initial conditions are as follows: ˙ θ(0) = π, θ(0) = 0, z(0) = 0.1, z(0) ˙ = 0.
The compensation input,νs , is selected such that the following equation is satisfied:
Figure 1 and 2 show the responses of the inverted pendulum and the input. Figure 3 shows the energy function E(t). Figure 4 shows the phase plot of the pendulum. We can see that the response of the pendulum converges to a homoclinic orbit.
(25)
θ [m]
10
{E(mlθ˙ cos θ) − δ(z˙ + λz 3 )}νs = −E(mlθ˙ cos θ)νc + δ(z˙ + λz 3 )νp .
Selecting the constants as δ = γ, we obtain the following equation:
0 −10 −20 0
5
10
15
10
15
time [s]
(26)
Thus, we have lim E(t) = 0
z [rad/s]
0.5
V˙ = −γE 2 − γ(z˙ + λz)2 = −2V.
(27)
t→∞
0
−0.5 0
5 time [s]
lim (z(t) ˙ + λz(t)) = 0.
t→∞
(28)
In order to avoid a ”division by zero” error and to limit the maximum value, we introduce the saturations as follows: ( ) νs = satUs q(−E(mlθ˙ cos θ)νc + δ(z˙ + λz)νp ) ( ) 1 q = satUd E(mlθ˙ cos θ) − δ(z˙ + λz)
Fig. 1 The responses of θ, z. Top:cart position z , bottom:pendulum angle θ. 8 6 4
7. SIMULATION RESULT OF SWINGING CONTROLLER OF PENDULUM ALONG A HOMOCLINIC ORBIT The physical parameters of the inverted pendulum are given by Table 1. Table 1 Physical parameters M [kg] l[m] J[kgm2 ] a[N/V]
0.15 0.2 3.20 × 10−4 25.73
F [kg/s] m[kg] c[kgm2 /s]
40.27 0.023 2.74 × 10−5
u
2
The input of the whole system is given by ν0 = νp + νc + νs . If δ = 0, the input is equal to the input of the pendulum subsystem, i.e.,ν0 = νp . On the other hand, if δ → ∞, the input is equal to the input of the cart subsystem, i.e.,ν0 → νc . Therefore, the compensation input, νs , is the weighted term between the pendulum input and the cart input.
0 −2 −4 −6 0
5
10
15
time [s]
Fig. 2 The control input u.
8. CONCLUSION In this paper, we designed the control system that converges to a homoclinic orbit of the pendulum subsystem and stabilizes the cart subsystem by using two Lyapunov functions. The controller of the whole system consists of the swinging control input of the pendulum subsystem, the stabilizing input of the cart subsystem, and the compensation input of the coupling term of the cart position and the pendulum angle.
0.02 0
E [t]
−0.02 −0.04 −0.06 −0.08 −0.1 0
5
10
15
time [s]
Fig. 3 The energy function E(t). 15 10
θ˙
5 0 −5 −10 −15 −15
−10
−5
0
5
10
θ
Fig. 4 The phase plot of the pendulum.
REFERENCES [1] Angeli,D. : Almost global stabilization of the inverted pendulum via continuous state feedback, Automatica, 37-7, pp. 1103-1108 (2001). ˚ om,K.J. and Furuta,K.: Swing up a pendulum [2] Astr¨ by energy control, Automatica, Vol.36, pp.287–295 (2000). [3] Chatterjee,D., Patra,A. and Joglekar,H.K. : Swing-up and stabilization of a cart-pendulum system under restricted cart track length, Systems & Control Letters, Vol.47, pp.355–364 (2002). [4] Chung,C.C. and Hauser,J.: Nonlinear Control of a Swinging Pendulum, Automatica, Vol.31, No.6, pp.851–862 (1995). [5] Gordillo,F and Aracil,J. : A new controller for the inverted pendulum on a cart, Int. J. of Robust and Nonlinear Control, Vol.18, pp.1607-1621 (2008). [6] Ishitobi, M., Kawashima,D., Nishi, M., and Kumon, M.: Swinging Up of Cart-pendulum System via Homoclinic Orbit, Trans. of the JASME, Series(C), Vol.73, No.732 , pp.2232–2237 (2007). [7] Jakubczyk,B. and Respondek,W.: On the linearization of control systems, Bull. Acad. Polon. Sci. Math., Vol.28, pp.517–522 (1980). [8] Kawano,K., Maruki,Y., Suemitsu,H., and Matsuo,T.
: Computational and Experimental Validation of Partially Backstepping Controller for Inverted Pendulum, ICIC Express Letters, 8-2,pp. 553-559 (2014). [9] Lozano,R., Fantoni,I., and Block,D.J. : Stabilization of the inverted pendulum around its homoclinic orbit, Systems & Control Letters, Vol.40, pp.197–204 (2000). [10] Maruki,Y., Kawano,K., Suemitsu,H., and Matsuo,T. : Swinging and Stabilization of Inverted Pendulum with Homoclinic Orbit, Proc. of SICE2013, pp.721724 (2013). [11] Masenc,F. and Praly,L. : “Adding Integrations, Saturated Controls, and Stabilization for Feedforward Systems”, IEEE Trans. on Automatic Control,41-11, 1559–1578, 1996. [12] Mihara,K., Yokoyama,J., Suemitsu,H. and Matsuo,T. : Swing-Up and Stabilizing Control of an Inverted Pendulum by Two Step Control Method, Proc. of 2012 International Conference on Advanced Mechatronic Systems, pp.323-328 (2012). [13] Saeki,M. (1993). Nonlinear Controller Design for Inverted Pendulum and Exact Linearization Method, Trans. on SICE, Vol.29, No.4, pp.491–493 (in Japanese). [14] Spong,M.W. and Praly,L. : Control of underactuated mechanical systems using switching and saturation, Proc. of the Block Island Workshop on Control Using Logic Based Switching (1996). [15] Srinivasan,B., Huguenin,P. and Bonvin,D. : Global stabilization of an inverted pendulum – Control strategy and experimental verification, Automatica, 45, pp.265-269 (2009). [16] Su,W. and Fu,M. : “Robust Nonlinear Forwarding Design”, ICARCV2000, 2000. [17] Wei,Q., Dayawansa,W.P., and Levine,W.S. : Nonlinear controller for an inverted pendulum having restricted travel, Automatica, Vol.31, pp.841–850 (1995).