# Stabilization of the Ball on the Beam System by Means of the Inverse Lyapunov Approach

Authors: Carlos Aguilar-Ibañez; Miguel S. Suarez-Castanon; José de Jesús Rubio
Journal: Mathematical Problems in Engineering
 (2012)

---

## Abstract

A novel inverse Lyapunov approach in conjunction with the energy shaping technique is applied to derive a stabilizing controller for the ball on the beam system. The proposed strategy consists of shaping a candidate Lyapunov function as if it were an inverse stability problem. To this purpose, we fix a suitable dissipation function of the unknown energy function, with the property that the selected dissipation divides the corresponding time derivative of the candidate Lyapunov function. Afterwards, the stabilizing controller is directly obtained from the already shaped Lyapunov function. The stability analysis of the closed-loop system is carried out by using the invariance theorem of LaSalle. Simulation results to test the effectiveness of the obtained controller are presented.


---

## Body

## 1. Introduction

The ball and the beam system (BBS) is a popular and important nonlinear system due to its simplicity and easiness to understand and implement in the laboratory. It is also an unstable system, and for this reason it has been widely used not only as a test bed for the effectiveness of control design techniques offered by modern control theory [1, 2] but also to avoid the danger that usually accompanies real unstable systems when brought to the laboratory. In fact, the dynamics of this system are very similar to those found in aerospace systems.TheBBS system consists of a beam, which is made to rotate in a vertical plane by applying a torque at the center of rotation, and a ball that is free to roll along the beam. Since the system does not have a well-defined relative degree at the origin, the exact input-output linearization approach cannot be directly applied to stabilize it around the origin; that is, this system is not feedback linearizable by means of static or dynamic state feedback. This obstacle makes it difficult to design either a stabilizable or a tracking controller [2, 3]. Fortunately, the system is locally controllable around the origin. Hence, it is possible to control it, if it is initialized close enough to the origin by using the direct pole placement method.Due to its importance several works related to the control of theBBScan be found in the literature. A control strategy based on an approximate feedback linearization was proposed by Hauser et al. in [2]. The main idea consists of discarding certain terms to avoid singularities. The drawback of this strategy is that the closed-loop system behaves properly in a small region, but it fails in a large one. In the same spirit, combined with suitable intelligent switches, we mention the works of [4, 5]. In the first work the authors present a control scheme that switches between exact and approximate input-output linearization control laws; in the other work the use of exact input-output linearization in combination with fuzzy dynamic control is proposed. A constructive approach based on the Lyapunov theory was developed in [6], where a numerical approximation for solving one PDE was considered. In the similar works of [7–10], energy matching conditions were used for the stabilization of the BBS. They also used some numerical approximations in order to solve approximately two matching conditions required to derive the candidate Lyapunov function. A major contribution, rather similar to the matching energy-based approach, was considered in [11, 12]. In these works, the authors solved the two matching conditions related with the potential and kinetic energies of the closed-loop system. In [13], a nested saturation design was proposed in order to bring the ball and the beam to the unstable equilibrium position. Following the same idea, a global asymptotic stabilization was developed with state-dependent saturation levels [14]. A novel work based on a modified nonlinear PD control strategy, tested in the laboratory, was presented in [15]. Finally, many control strategies for the stabilization of the BBS can be found in the literature, but most of them manage the physical model by introducing some nonlinear approximations or switching through singularities (see [1, 3]).In this paper we propose a novel inverse Lyapunov-based procedure in combination with the energy shaping method to stabilize theBBS. Intuitively, the Lyapunov function is found as if it were an inverse stability problem; that is, we first choose the dissipation rate function of the time derivative of the unknown candidate Lyapunov function. For that purpose, we shape a suitable candidate Lyapunov function, which is locally strictly positive definite inside an admissible set of attraction. Afterwards, the control is proposed in such a way that the time derivative of the obtained Lyapunov function is forced to be equal to the proposed dissipation rate function. The proposed Lyapunov function is formed by adding a kinetic energy function and a particular function, which can be considered as the corresponding potential energy function. To carry this out, we found two restriction equations related to the potential and kinetic energies. The main characteristic of our control strategy is that we do not need to force the closed-loop system to follow another stable Euler-Lagrange or Hamiltonian system, contrary to what was previously proposed in [7–11, 16, 17].The rest of this paper is organized as follows. In Section2 we present the control model of the BBS. In Section 3 we briefly introduce the inverse Lyapunov method for solving the stabilization of the BBS; we also discuss the asymptotic convergence of the closed-loop system. In Section 4 we present some numerical simulations to assess the effectiveness of our control strategy. In Section 5 some conclusions are given.


## 2. System Dynamics

Consider theBBS shown in Figure 1, which consists of a beam that rotates in a vertical plane when a torque is applied to its rotational center and a ball that freely moves forwards and backwards along the beam with only a single degree of freedom. The BBS nonlinear model is described by the following set of differential equations (see [1, 2]):
(2.1)(m+JBR3)r̈-mrθ̇2+mgsin⁡θ+βṙ=0,(mr2+JB+J)θ̈+2mrṙθ̇+mgrcos⁡θ=τ,
where r is the ball position along the beam, θ is the beam angle, J is the moment of inertia of the beam around the rotating pivot, JB is the moment of inertia of the ball with respect to its center, R is the radius ball, m is the ball mass, β>0 is the friction coefficient, and τ is the torque of the system. After applying the following feedback
(2.2)τ=u(mr2+JB+J)+2Mrṙθ̇+mgrcos⁡θ
into system (2.1), it can be rewritten as
(2.3)r̈=drθ̇2-nsin⁡θ-bṙ,θ̈=u,
where
(2.4)b=βm+JB/R3,d=mm+JB/R3,n=mgm+JB/R3.
Note that u can be seen as a virtual controller that acts directly on the actuated coordinate θ. Naturally, the latter system equations can be written as
(2.5)q̈=S(x)+Fu,
where qT=(r,θ) and xT=(q,q̇).1Figure 1
The ball and beam system.


## 3. Control Strategy

The control objective is to bring all the states of system (2.3) to the unstable equilibrium point x=0, restricting both the beam angle and the ball position to inside the admissible set Q∈R2, defined by
(3.1)Q={q=(r,θ):|r|≤L∧|θ|≤θ¯<π2},
where the positive constants L and θ¯ are known. To this end, a suitable candidate Lyapunov function is constructed by using the Inverse Lyapunov Approach.


### 3.1. Inverse Lyapunov Approach

A brief description of the inverse Lyapunov method, inspired in the previous work of Ortega and García-Canseco [18], is introduced next.Let us propose a candidate Lyapunov function for the closed-loop system energy function, of the form(3.2)V(x)=12q̇TKc(r)q̇+Vp(q),
where the closed-loop inertia matrix Kc(r)=KcT(r)>0, and the closed-loop potential energy functions Vp(q)>0, will be defined in the forthcoming developments. A straightforward calculation shows that, along with the solutions of (2.5), V̇ is given by
(3.3)V̇(x)=(∇qV)Tq̇+(∇q̇VT)(S(x)+Fu(x)).Comment 1.
In fact,Vp(q) is selected such that ∇xVp(x)|x=0  and ∇x2Vp(x)|x=0>0;that is, we require that Vp be strictly locally convex around the origin.Fixing the following auxiliary variable asη(x)=θ̇+α(r)ṙ, with α(r)≠0, forallr∈Q (it is given in advance), we want to find u(x)∈R, Vp(q)∈R+ and Kc(r)>0, with x∈D⊂Q×R2.2 Such that V̇ can be rewritten as
(3.4)V̇(x)=η(x)(β(x)+u(x))+R(x),
where β(x) and R(x) are continuous functions. Then, we propose the control law as
(3.5)u(x)=-kdη(x)-β(x),
for some kd>0, which evidently leads to
(3.6)V̇(x)=-kdη2(x)+R(x).
In order to guarantee that V̇ be semidefinite negative, we require that a kd exists, such that
(3.7)-kdη2(x)+R(x)≤0.Physically, we are choosing a convenient dissipation function,η(x), of the unknown closed-loop energy function V(x), with the property that n divides (V̇-R)(x). We must underscore that the fixed η relies on the unactuated coordinate r, in agreement with the structure of the closed-loop energy function.On the other hand,R(x) is the work of the friction forces, which act over the unactuated coordinate.Closed-Loop System Stability
If we are able to shape the candidate Lyapunov function (3.2), such that its time derivative, along the trajectories of system (2.3), can be expressed as (3.4) under the assumption that (3.7) holds, then V qualifies as a Lyapunov function, because it is a nonincreasing and positive definite function in the neighborhood of the origin and proper on its sub-level (i.e., there exists a c>0, such that  V(x)≤c defines a compact set, with closed level curves). Consequently, x is stable in the Lyapunov sense.


### 3.2. Solving the BBS Stabilization Problem by Applying the Inverse Lyapunov Approach

In this section we explain how to take the original expression ofV̇, defined in (3.3), to the desired form (3.4) for the particular case of the BBS.Defining,Kc, as3(3.8)Kc=[k1k2k2k3],
and according to (3.3), we have that V̇ can be expressed as
(3.9)V̇(x)=q̇T(υp(q)+υd(x)+KcFu)+Rυ(x),
where
(3.10)υd(x)={vdi}i=12=12∇q(q̇TKcq̇)+Kc[drθ̇20],(3.11)υp(q)={vpi}i=12=∇qVp(q)+Kc[-nsin⁡θ0].
Equating equation (3.9) with (3.3), we obtain, after some simple algebraic manipulations, the following:
(3.12)Rυ(x)-R(x)︷T0+(q̇TKcF-η(x))u︷T1+q̇T(υp(q)+υd(x))-η(x)β(x)︷T2=0.From the above we have thatRv(x)=R(x). Now, as the matrix Kc and functions vp(q) and vd(x) can be seen as free control parameters, we can select them, such that the following equalities hold:
(3.13)q̇TKcF=n(x),(3.14)q̇T(υp(q)+υd(x))=η(x)β(x).This implies thatTi=0, with i=0,1,2. Indeed, it is justified because Kc is constituted by three free parameters.Note that this equation has two unknown parameters, given byk1 and Vp. Hence, in order to solve it, we require that
(3.15)q̇Tυp(q)=ζp(q)n(x),q̇Tυd(x)=ζd(x)n(x),
where the continuous functions ζp and ζd will be computed later by using simple polynomials factorization. Consequently, β(x) is directly computed by:
(3.16)β(x)=ζp(q)+ζd(x).
Finally, ζp and ζd are obtained according to the following remark.Remark 3.1.
Notice thatq̇Tυp(q) and q̇Tυd(q) are polynomials with respect to variables (ṙ,θ̇). Consequently, thefollowing equalities
(3.17)q̇Tυp(q)|θ̇=-α(r)ṙ=0,(3.18)q̇Tυd(x)|θ̇=-α(r)ṙ=0
imply that functions ζp(q) and ζd(x) satisfy the restrictions in (3.15). In other words, the selected η must divide the two scalar functions q̇Tυp(q) and q̇Tυd(q).


#### 3.2.1. Computing the Needed Candidate Lyapunov Function

In this section we obtain the unknown control variablesKc and Vp. We begin by solving the restriction equation (3.13). For simplicity, we set α(r)=1 and η=-ṙ+θ̇. Therefore, from (3.13) and (3.8) we evidently have that
(3.19)q̇TKcF=k2ṙ+k3θ̇=-ṙ+θ̇,
which leads to k2=-1 and k3=1. Now, substituting the fixed values k2 and k3 (3.10), we have that
(3.20)[υd1υd2]=12∇q(q̇TKcq̇)+Kc[drθ̇20]=[k1′2ṙ2+dk1rθ̇2-drθ̇2].
Next, substituting the above vd1 and vd2 in (3.17), we obtain
(3.21)vd2(x)+υd1(x)|θ̇=ṙ=ṙ2(k1′2+dr(k1-1))=0,
which produces the following equation; k1′=-2rd(k1-1) and whose solution is given by k1=1+k¯1e-dr2, where k¯1>0. Hence, matrix Kc can be taken as
(3.22)Kc=[1+k¯1e-dr2-1-11].
According with (3.22), we have that det(Kc)=k¯1e-dr2>0; that is, Kc>0, when r is finite.Now, to obtainVp(q), we proceed to substitute the obtained Kc into the relation (3.11), having
(3.23)[υp1υp2]=∇qVp+Kc[-nsin⁡θ0]=[-(1+k¯1e-dr2)nsin⁡θ+∂Vp∂rnsin⁡θ+∂Vp∂θ].
From (3.18), we have that
(3.24)0=υp2(q)+υp1(q)=-nk¯1e-dr2sin⁡θ+∂Vp∂r+∂Vp∂θ,
whose solution is given by
(3.25)Vp(q)=nk¯1∫0rsin⁡(θ-r+s)e-ds2ds+Ω(r-θ),
where Ω(*) must be selected such that Vp has a local minimum at the origin q=0. To assure this condition, it is enough to define Ω(s)=kps2/2, where kp>nk¯1. Therefore, Vp reads as
(3.26)Vp(q)=nk¯1∫0rsin⁡(θ-r+s)e-ds2ds+kp2(r-θ)2,
where the integral term can be exactly computed as
(3.27)∫0rsin⁡(θ-r+s)e-ds2ds=cos⁡(θ-r)Isin⁡r+sin⁡(θ-r)Icos⁡⁡r,
where
(3.28)Icos⁡⁡r=∫0rcos⁡⁡(s)e-ds2ds=α1ϕs(r),Isin⁡⁡r=∫0rsin⁡⁡(s)e-ds2ds=α1(α0+ϕc(r)),
and4(3.29)α0=2Im⁡[erf⁡(i2d)],α1=πexp⁡(-1/4d)4d,ϕs(r)=2Re[erf⁡(i+2dr2d)],ϕc(r)=-2Im⁡[erf⁡(i+2dr2d)].Remark 3.2.
Notice that relation (3.7) can be rewritten as Rd(x)=q̇THq̇,where
(3.30)H=[-kdkd+bk1/2kd+bk1/2-bk1-kd]q̇,
so that q̇THq̇<0,if the parameter kd is selected such that -b+4(k1-1)kd>0;recall that k1>1.Hence, the needed controller, defined by (3.5) and (3.16), is given that5(3.31)u=-kd(-ṙ+θ̇)-(nsin⁡θ+∂Vp∂θ)-(-drθ̇2+dk¯1rṙ(ṙ+θ̇)e-dr2),
where k¯1>0 and kd>0.We end this section introducing the following important remark.Remark 3.3.
Notice that we can always compute(3.32)c̃=max⁡c>0q∈Q:Vp(q)=c;suchthatVp(q)=c̃isaclosedcurve.To illustrate the geometrical estimation of the bound “c̃”, we fix the parameter values kp=2.5 and kp=1.3, the other physical parameter values were set as nk¯1=1 and d=0.015, and the admissible restricted set was chosen as |r|≤0.6 [m] and |θ|≤0.5 [rad]. This setup allows us to give an estimated c, which evidently guaranties that the level curves of Vp are closed. By a thorough numerical inspection, we found that c̃=̃0.108 for kp=2.5 and c̃=0.05 for kp=1.3. Figure 2 shows the corresponding level curves.Level curves of the functionΦ(q) around the origin, for two sets of values: ηk¯=1, δ=0.015 and kp=2.5 (a) and ηk¯=1, δ=0.015 and kp=1.3 (b) with restrictions on |r|≤0.6 (m) and |θ|≤0.5 (rad).
(a)(b)


### 3.3. Asymptotic Convergence of the Closed-Loop System

Since the obtainedV is a non-increasing and positive definite function in some neighborhood that contains the origin, then the closed-loop system is, at least, locally stable in the Lyapunov sense. To assure that the trajectories of the closed-loop system asymptotically converge to the origin, restricted to q(t)∈Q, for t>0, we must define the set Ωc̃∈R4, where
(3.33)Ωc̃={(q,q̇):q∈Q∧V(q,q̇)<c̃}.
The set Ωc̃ defines a compact invariant set because, for any initial conditions x0=(q0,q̇0), with q0∈Q, provided that V(x0)<c̃, then V(x)<c̃, with q∈Q.The rest of the stability proof is based on LaSalle’s invariant theorem [19, 20]. To apply this theorem we need to define a compact (closed and bounded) set Ωc̃, which must satisfy that every solution of system (2.3), in closed-loop with (3.31), starting in Ωc̃ remains in Ωc̃, for all future time. Then, we define the following invariant set S, as:
(3.34)S={x∈Ωc̃:V̇(x)=0}={(q,q̇)∈Ωc̃:Rd(x)=q̇THq̇=0},
where H<0. Let M be the largest invariant set in S. Because the theorem of LaSalle claims that every solution starting in a compact set Ωc̃ approaches M, as t→∞, we compute the largest invariant set M⊂S. Clearly, we have that ṙ=0 and θ̇=0, on the set S. Therefore, we must have that r̈=0 and θ̈=0, on the set S. Similarly, we must have that r=r* and θ=θ*, with r* and θ* being constants. Hence, on the set S, the first equation of (2.3) is written as 0=-nsinθ*, then θ*=kπ, where k is an integer. However, θ*∈(-π/2,π/2)because (q,q̇)∈Ωc̃; consequently θ=0, on the set S. In a similar way, we can show that r*=0. Then, on the set S, we have that q=0 and q̇=0. Therefore, the largest invariant set M contained inside set S is given by the single point x=(q=0,q̇=0). Thus, according to the theorem of LaSalle [19], all the trajectories starting in Ωc̃ asymptotically converge towards the largest invariant set M⊂S, which is the equilibrium point x=0.We finish this section by presenting the main proposition of this paper.Proposition 3.4.
Consider system (2.3) in closed-loop with (3.31), under conditions of Remarks 3.2 and 3.3. Then the origin of the closed-loop system is locally asymptotically stable with the domain of attraction defined by (3.33).


## 3.1. Inverse Lyapunov Approach

A brief description of the inverse Lyapunov method, inspired in the previous work of Ortega and García-Canseco [18], is introduced next.Let us propose a candidate Lyapunov function for the closed-loop system energy function, of the form(3.2)V(x)=12q̇TKc(r)q̇+Vp(q),
where the closed-loop inertia matrix Kc(r)=KcT(r)>0, and the closed-loop potential energy functions Vp(q)>0, will be defined in the forthcoming developments. A straightforward calculation shows that, along with the solutions of (2.5), V̇ is given by
(3.3)V̇(x)=(∇qV)Tq̇+(∇q̇VT)(S(x)+Fu(x)).Comment 1.
In fact,Vp(q) is selected such that ∇xVp(x)|x=0  and ∇x2Vp(x)|x=0>0;that is, we require that Vp be strictly locally convex around the origin.Fixing the following auxiliary variable asη(x)=θ̇+α(r)ṙ, with α(r)≠0, forallr∈Q (it is given in advance), we want to find u(x)∈R, Vp(q)∈R+ and Kc(r)>0, with x∈D⊂Q×R2.2 Such that V̇ can be rewritten as
(3.4)V̇(x)=η(x)(β(x)+u(x))+R(x),
where β(x) and R(x) are continuous functions. Then, we propose the control law as
(3.5)u(x)=-kdη(x)-β(x),
for some kd>0, which evidently leads to
(3.6)V̇(x)=-kdη2(x)+R(x).
In order to guarantee that V̇ be semidefinite negative, we require that a kd exists, such that
(3.7)-kdη2(x)+R(x)≤0.Physically, we are choosing a convenient dissipation function,η(x), of the unknown closed-loop energy function V(x), with the property that n divides (V̇-R)(x). We must underscore that the fixed η relies on the unactuated coordinate r, in agreement with the structure of the closed-loop energy function.On the other hand,R(x) is the work of the friction forces, which act over the unactuated coordinate.Closed-Loop System Stability
If we are able to shape the candidate Lyapunov function (3.2), such that its time derivative, along the trajectories of system (2.3), can be expressed as (3.4) under the assumption that (3.7) holds, then V qualifies as a Lyapunov function, because it is a nonincreasing and positive definite function in the neighborhood of the origin and proper on its sub-level (i.e., there exists a c>0, such that  V(x)≤c defines a compact set, with closed level curves). Consequently, x is stable in the Lyapunov sense.


## 3.2. Solving the BBS Stabilization Problem by Applying the Inverse Lyapunov Approach

In this section we explain how to take the original expression ofV̇, defined in (3.3), to the desired form (3.4) for the particular case of the BBS.Defining,Kc, as3(3.8)Kc=[k1k2k2k3],
and according to (3.3), we have that V̇ can be expressed as
(3.9)V̇(x)=q̇T(υp(q)+υd(x)+KcFu)+Rυ(x),
where
(3.10)υd(x)={vdi}i=12=12∇q(q̇TKcq̇)+Kc[drθ̇20],(3.11)υp(q)={vpi}i=12=∇qVp(q)+Kc[-nsin⁡θ0].
Equating equation (3.9) with (3.3), we obtain, after some simple algebraic manipulations, the following:
(3.12)Rυ(x)-R(x)︷T0+(q̇TKcF-η(x))u︷T1+q̇T(υp(q)+υd(x))-η(x)β(x)︷T2=0.From the above we have thatRv(x)=R(x). Now, as the matrix Kc and functions vp(q) and vd(x) can be seen as free control parameters, we can select them, such that the following equalities hold:
(3.13)q̇TKcF=n(x),(3.14)q̇T(υp(q)+υd(x))=η(x)β(x).This implies thatTi=0, with i=0,1,2. Indeed, it is justified because Kc is constituted by three free parameters.Note that this equation has two unknown parameters, given byk1 and Vp. Hence, in order to solve it, we require that
(3.15)q̇Tυp(q)=ζp(q)n(x),q̇Tυd(x)=ζd(x)n(x),
where the continuous functions ζp and ζd will be computed later by using simple polynomials factorization. Consequently, β(x) is directly computed by:
(3.16)β(x)=ζp(q)+ζd(x).
Finally, ζp and ζd are obtained according to the following remark.Remark 3.1.
Notice thatq̇Tυp(q) and q̇Tυd(q) are polynomials with respect to variables (ṙ,θ̇). Consequently, thefollowing equalities
(3.17)q̇Tυp(q)|θ̇=-α(r)ṙ=0,(3.18)q̇Tυd(x)|θ̇=-α(r)ṙ=0
imply that functions ζp(q) and ζd(x) satisfy the restrictions in (3.15). In other words, the selected η must divide the two scalar functions q̇Tυp(q) and q̇Tυd(q).


### 3.2.1. Computing the Needed Candidate Lyapunov Function

In this section we obtain the unknown control variablesKc and Vp. We begin by solving the restriction equation (3.13). For simplicity, we set α(r)=1 and η=-ṙ+θ̇. Therefore, from (3.13) and (3.8) we evidently have that
(3.19)q̇TKcF=k2ṙ+k3θ̇=-ṙ+θ̇,
which leads to k2=-1 and k3=1. Now, substituting the fixed values k2 and k3 (3.10), we have that
(3.20)[υd1υd2]=12∇q(q̇TKcq̇)+Kc[drθ̇20]=[k1′2ṙ2+dk1rθ̇2-drθ̇2].
Next, substituting the above vd1 and vd2 in (3.17), we obtain
(3.21)vd2(x)+υd1(x)|θ̇=ṙ=ṙ2(k1′2+dr(k1-1))=0,
which produces the following equation; k1′=-2rd(k1-1) and whose solution is given by k1=1+k¯1e-dr2, where k¯1>0. Hence, matrix Kc can be taken as
(3.22)Kc=[1+k¯1e-dr2-1-11].
According with (3.22), we have that det(Kc)=k¯1e-dr2>0; that is, Kc>0, when r is finite.Now, to obtainVp(q), we proceed to substitute the obtained Kc into the relation (3.11), having
(3.23)[υp1υp2]=∇qVp+Kc[-nsin⁡θ0]=[-(1+k¯1e-dr2)nsin⁡θ+∂Vp∂rnsin⁡θ+∂Vp∂θ].
From (3.18), we have that
(3.24)0=υp2(q)+υp1(q)=-nk¯1e-dr2sin⁡θ+∂Vp∂r+∂Vp∂θ,
whose solution is given by
(3.25)Vp(q)=nk¯1∫0rsin⁡(θ-r+s)e-ds2ds+Ω(r-θ),
where Ω(*) must be selected such that Vp has a local minimum at the origin q=0. To assure this condition, it is enough to define Ω(s)=kps2/2, where kp>nk¯1. Therefore, Vp reads as
(3.26)Vp(q)=nk¯1∫0rsin⁡(θ-r+s)e-ds2ds+kp2(r-θ)2,
where the integral term can be exactly computed as
(3.27)∫0rsin⁡(θ-r+s)e-ds2ds=cos⁡(θ-r)Isin⁡r+sin⁡(θ-r)Icos⁡⁡r,
where
(3.28)Icos⁡⁡r=∫0rcos⁡⁡(s)e-ds2ds=α1ϕs(r),Isin⁡⁡r=∫0rsin⁡⁡(s)e-ds2ds=α1(α0+ϕc(r)),
and4(3.29)α0=2Im⁡[erf⁡(i2d)],α1=πexp⁡(-1/4d)4d,ϕs(r)=2Re[erf⁡(i+2dr2d)],ϕc(r)=-2Im⁡[erf⁡(i+2dr2d)].Remark 3.2.
Notice that relation (3.7) can be rewritten as Rd(x)=q̇THq̇,where
(3.30)H=[-kdkd+bk1/2kd+bk1/2-bk1-kd]q̇,
so that q̇THq̇<0,if the parameter kd is selected such that -b+4(k1-1)kd>0;recall that k1>1.Hence, the needed controller, defined by (3.5) and (3.16), is given that5(3.31)u=-kd(-ṙ+θ̇)-(nsin⁡θ+∂Vp∂θ)-(-drθ̇2+dk¯1rṙ(ṙ+θ̇)e-dr2),
where k¯1>0 and kd>0.We end this section introducing the following important remark.Remark 3.3.
Notice that we can always compute(3.32)c̃=max⁡c>0q∈Q:Vp(q)=c;suchthatVp(q)=c̃isaclosedcurve.To illustrate the geometrical estimation of the bound “c̃”, we fix the parameter values kp=2.5 and kp=1.3, the other physical parameter values were set as nk¯1=1 and d=0.015, and the admissible restricted set was chosen as |r|≤0.6 [m] and |θ|≤0.5 [rad]. This setup allows us to give an estimated c, which evidently guaranties that the level curves of Vp are closed. By a thorough numerical inspection, we found that c̃=̃0.108 for kp=2.5 and c̃=0.05 for kp=1.3. Figure 2 shows the corresponding level curves.Level curves of the functionΦ(q) around the origin, for two sets of values: ηk¯=1, δ=0.015 and kp=2.5 (a) and ηk¯=1, δ=0.015 and kp=1.3 (b) with restrictions on |r|≤0.6 (m) and |θ|≤0.5 (rad).
(a)(b)


## 3.2.1. Computing the Needed Candidate Lyapunov Function

In this section we obtain the unknown control variablesKc and Vp. We begin by solving the restriction equation (3.13). For simplicity, we set α(r)=1 and η=-ṙ+θ̇. Therefore, from (3.13) and (3.8) we evidently have that
(3.19)q̇TKcF=k2ṙ+k3θ̇=-ṙ+θ̇,
which leads to k2=-1 and k3=1. Now, substituting the fixed values k2 and k3 (3.10), we have that
(3.20)[υd1υd2]=12∇q(q̇TKcq̇)+Kc[drθ̇20]=[k1′2ṙ2+dk1rθ̇2-drθ̇2].
Next, substituting the above vd1 and vd2 in (3.17), we obtain
(3.21)vd2(x)+υd1(x)|θ̇=ṙ=ṙ2(k1′2+dr(k1-1))=0,
which produces the following equation; k1′=-2rd(k1-1) and whose solution is given by k1=1+k¯1e-dr2, where k¯1>0. Hence, matrix Kc can be taken as
(3.22)Kc=[1+k¯1e-dr2-1-11].
According with (3.22), we have that det(Kc)=k¯1e-dr2>0; that is, Kc>0, when r is finite.Now, to obtainVp(q), we proceed to substitute the obtained Kc into the relation (3.11), having
(3.23)[υp1υp2]=∇qVp+Kc[-nsin⁡θ0]=[-(1+k¯1e-dr2)nsin⁡θ+∂Vp∂rnsin⁡θ+∂Vp∂θ].
From (3.18), we have that
(3.24)0=υp2(q)+υp1(q)=-nk¯1e-dr2sin⁡θ+∂Vp∂r+∂Vp∂θ,
whose solution is given by
(3.25)Vp(q)=nk¯1∫0rsin⁡(θ-r+s)e-ds2ds+Ω(r-θ),
where Ω(*) must be selected such that Vp has a local minimum at the origin q=0. To assure this condition, it is enough to define Ω(s)=kps2/2, where kp>nk¯1. Therefore, Vp reads as
(3.26)Vp(q)=nk¯1∫0rsin⁡(θ-r+s)e-ds2ds+kp2(r-θ)2,
where the integral term can be exactly computed as
(3.27)∫0rsin⁡(θ-r+s)e-ds2ds=cos⁡(θ-r)Isin⁡r+sin⁡(θ-r)Icos⁡⁡r,
where
(3.28)Icos⁡⁡r=∫0rcos⁡⁡(s)e-ds2ds=α1ϕs(r),Isin⁡⁡r=∫0rsin⁡⁡(s)e-ds2ds=α1(α0+ϕc(r)),
and4(3.29)α0=2Im⁡[erf⁡(i2d)],α1=πexp⁡(-1/4d)4d,ϕs(r)=2Re[erf⁡(i+2dr2d)],ϕc(r)=-2Im⁡[erf⁡(i+2dr2d)].Remark 3.2.
Notice that relation (3.7) can be rewritten as Rd(x)=q̇THq̇,where
(3.30)H=[-kdkd+bk1/2kd+bk1/2-bk1-kd]q̇,
so that q̇THq̇<0,if the parameter kd is selected such that -b+4(k1-1)kd>0;recall that k1>1.Hence, the needed controller, defined by (3.5) and (3.16), is given that5(3.31)u=-kd(-ṙ+θ̇)-(nsin⁡θ+∂Vp∂θ)-(-drθ̇2+dk¯1rṙ(ṙ+θ̇)e-dr2),
where k¯1>0 and kd>0.We end this section introducing the following important remark.Remark 3.3.
Notice that we can always compute(3.32)c̃=max⁡c>0q∈Q:Vp(q)=c;suchthatVp(q)=c̃isaclosedcurve.To illustrate the geometrical estimation of the bound “c̃”, we fix the parameter values kp=2.5 and kp=1.3, the other physical parameter values were set as nk¯1=1 and d=0.015, and the admissible restricted set was chosen as |r|≤0.6 [m] and |θ|≤0.5 [rad]. This setup allows us to give an estimated c, which evidently guaranties that the level curves of Vp are closed. By a thorough numerical inspection, we found that c̃=̃0.108 for kp=2.5 and c̃=0.05 for kp=1.3. Figure 2 shows the corresponding level curves.Level curves of the functionΦ(q) around the origin, for two sets of values: ηk¯=1, δ=0.015 and kp=2.5 (a) and ηk¯=1, δ=0.015 and kp=1.3 (b) with restrictions on |r|≤0.6 (m) and |θ|≤0.5 (rad).
(a)(b)


## 3.3. Asymptotic Convergence of the Closed-Loop System

Since the obtainedV is a non-increasing and positive definite function in some neighborhood that contains the origin, then the closed-loop system is, at least, locally stable in the Lyapunov sense. To assure that the trajectories of the closed-loop system asymptotically converge to the origin, restricted to q(t)∈Q, for t>0, we must define the set Ωc̃∈R4, where
(3.33)Ωc̃={(q,q̇):q∈Q∧V(q,q̇)<c̃}.
The set Ωc̃ defines a compact invariant set because, for any initial conditions x0=(q0,q̇0), with q0∈Q, provided that V(x0)<c̃, then V(x)<c̃, with q∈Q.The rest of the stability proof is based on LaSalle’s invariant theorem [19, 20]. To apply this theorem we need to define a compact (closed and bounded) set Ωc̃, which must satisfy that every solution of system (2.3), in closed-loop with (3.31), starting in Ωc̃ remains in Ωc̃, for all future time. Then, we define the following invariant set S, as:
(3.34)S={x∈Ωc̃:V̇(x)=0}={(q,q̇)∈Ωc̃:Rd(x)=q̇THq̇=0},
where H<0. Let M be the largest invariant set in S. Because the theorem of LaSalle claims that every solution starting in a compact set Ωc̃ approaches M, as t→∞, we compute the largest invariant set M⊂S. Clearly, we have that ṙ=0 and θ̇=0, on the set S. Therefore, we must have that r̈=0 and θ̈=0, on the set S. Similarly, we must have that r=r* and θ=θ*, with r* and θ* being constants. Hence, on the set S, the first equation of (2.3) is written as 0=-nsinθ*, then θ*=kπ, where k is an integer. However, θ*∈(-π/2,π/2)because (q,q̇)∈Ωc̃; consequently θ=0, on the set S. In a similar way, we can show that r*=0. Then, on the set S, we have that q=0 and q̇=0. Therefore, the largest invariant set M contained inside set S is given by the single point x=(q=0,q̇=0). Thus, according to the theorem of LaSalle [19], all the trajectories starting in Ωc̃ asymptotically converge towards the largest invariant set M⊂S, which is the equilibrium point x=0.We finish this section by presenting the main proposition of this paper.Proposition 3.4.
Consider system (2.3) in closed-loop with (3.31), under conditions of Remarks 3.2 and 3.3. Then the origin of the closed-loop system is locally asymptotically stable with the domain of attraction defined by (3.33).


## 4. Numerical Simulations

To show the effectiveness of the proposed nonlinear control strategy we have carried out some numerical simulations by means of the Matlab program. The original system p,arameters, with their respective physical restrictions, were set as(4.1)m=0.1kg,R=0.015m,Jb=2.25×10-5kg⋅m2,θ¯=0.5rad,M=0.2kg,L=0.6m,J=0.36kg⋅m2,β=0.2New⋅m/s
From the above, we have that b=0.029, d=0.01477, and n=0.1448. The physical control parameters were fixed as kp=2.5, k¯1=1/n and kd=0.5, while the initial conditions were fixed; as x0=(0.55m;0;0.45rad;0). Notice that the proposed set of parameters {d,kp,k¯1,n} are in agreement with the computation of the restricted stability domain, which has been done in the previous section (see Figure 2(a)); besides the initial conditions satisfy the inequality V(x0)<c̃=1.08.6Figure3 shows the corresponding response of system (2.3) in closed-loop with (3.31), under the conditions in the Remark 3.3. From this figure one can see that both the system position coordinates and the system torque asymptotically converge to the origin, assuring that |θ|≤θ¯ and |r|≤L.Figure 3
Closed-loop response of theBBS to the initial conditions: (a) x0 = (0.55 m; 0; 0.45 rad; 0).In order to provide an intuitive idea of how good our nonlinear control strategy (ACL) is in comparison with the control techniques proposed by Yu in [15] and Hauser et al. in [2], here respectively referred as (YCL) and (HCL), we carried out a second experiment using the same setup as before and assuming that β=0. The obtained characteristic polynomial of our control strategy of the linearized system is given by
(4.2)p(s)=0.0634+0.255s+0.88s2+1.72s3+s4.
The control parameters of the YNC and the HNCwere selected, such that their corresponding characteristic polynomials coincided with the polynomial (4.2). The initial conditions were fixed as (0.3m;0.18m/s;0.35rad;0.18rad/s). The simulation results are shown in Figure 4. As we can see, our control strategy outperforms the closed-loop responses of the YNC and HNCcontrol strategies.Figure 4
Closed-loop response of theBBS to the proposed ANC in comparison with YNCand HNC.Comment 2.
A comparative study between our control strategy and other control strategies presented in the literature for solving the stabilization of theBBS, is beyond the scope of this work.


## 5. Conclusions

In this work we proposed a novel procedure to stabilize theBBS by using the inverse Lyapunov approach in conjunction with the energy shaping technique. This procedure consists of finding the candidate Lyapunov function as if it were an inverse stability problem. To carry it out, we chose a convenient dissipation function of the unknown closed-loop energy function. Then, we proceeded to obtain the needed energy function, which is the addition of the positive potential energy and the positive kinetic energy. Afterwards, we directly derived the stabilizing controller from the already-obtained time derivative of the Lyapunov function. The corresponding asymptotic convergence analysis was done by applying the theorem of LaSalle. To assess the performance and effectiveness of the proposed control strategy, we carried out some numerical simulations. The simulation results allow us to conclude that our strategy behaves quite well in comparison with other well-known control strategies. It is worth mentioning that, to our knowledge, the procedure used here to obtain the needed Lyapunov function has not been used before to control the BBS.



---

*Source: 810597-2012-04-29.xml*