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

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.


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.
The BBS 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 Mathematical Problems in Engineering 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 the BBS can 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 the BBS.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 Section 2 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.

System Dynamics
Consider the BBS 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 : 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, J B 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 τ u mr 2 J B J 2Mr ṙ θ mgr cos θ 2.2 into system 2.1 , it can be rewritten as

2.4
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 q S x Fu, 2.5 where q T r, θ and x T q, q . 1

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 ∈ R 2 , defined by where the positive constants L and θ are known.To this end, a suitable candidate Lyapunov function is constructed by using the Inverse Lyapunov Approach.

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 where the closed-loop inertia matrix K c r K T c r > 0, and the closed-loop potential energy functions V p 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 V x ∇ q V T q ∇ qV T S x Fu x .

3.3
Comment 1.In fact, V p q is selected such that ∇ x V p x | x 0 and ∇ 2 x V p x | x 0 > 0; that is, we require that V p be strictly locally convex around the origin.
Fixing the following auxiliary variable as η x θ α r ṙ, with α r / 0, for all r ∈ Q it is given in advance , we want to find u x ∈ R, V p q ∈ R and 2 Such that V can be rewritten as where β x and R x are continuous functions.Then, we propose the control law as for some k d > 0, which evidently leads to In order to guarantee that V be semidefinite negative, we require that a k d exists, such that 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.

Solving the BBS Stabilization Problem by Applying the Inverse Lyapunov Approach
In this section we explain how to take the original expression of V , defined in 3.3 , to the desired form 3.4 for the particular case of the BBS.Defining, K c , as 3 and according to 3.3 , we have that V can be expressed as where Mathematical Problems in Engineering Equating equation 3.9 with 3.3 , we obtain, after some simple algebraic manipulations, the following: qT υ p q υ d x − η x β x 0.

3.12
From the above we have that R v x R x .Now, as the matrix K c and functions v p q and v d x can be seen as free control parameters, we can select them, such that the following equalities hold: qT υ p q υ d x η x β x .

3.14
This implies that T i 0, with i 0, 1, 2. Indeed, it is justified because K c is constituted by three free parameters.
Note that this equation has two unknown parameters, given by k 1 and V p .Hence, in order to solve it, we require that qT υ p q ζ p q n x , where the continuous functions ζ p and ζ d will be computed later by using simple polynomials factorization.Consequently, β x is directly computed by: Finally, ζ p and ζ d are obtained according to the following remark.
Remark 3.1.Notice that qT υ p q and qT υ d q are polynomials with respect to variables ṙ, θ .Consequently, thefollowing equalities qT υ p q θ −α r ṙ 0, 3.17 In other words, the selected η must divide the two scalar functions qT υ p q and qT υ d q .

Computing the Needed Candidate Lyapunov Function
In this section we obtain the unknown control variables K c and V p .We begin by solving the restriction equation 3.13 .For simplicity, we set α r 1 and η − ṙ θ.Therefore, from 3.13 and 3.8 we evidently have that which leads to k 2 −1 and k 3 1.Now, substituting the fixed values k 2 and k 3 3.10 , we have that Next, substituting the above v d 1 and v d 2 in 3.17 , we obtain which produces the following equation; k 1 −2rd k 1 − 1 and whose solution is given by k 1 1 k 1 e −dr 2 , where k 1 > 0. Hence, matrix K c can be taken as

3.22
According with 3.22 , we have that det K c k 1 e −dr 2 > 0; that is, K c > 0, when r is finite.Now, to obtain V p q , we proceed to substitute the obtained K c into the relation 3.11 , having where Ω * must be selected such that V p has a local minimum at the origin q 0. To assure this condition, it is enough to define Ω s k p s 2 /2, where k p > nk 1 .Therefore, V p reads as where the integral term can be exactly computed as

3.29
Remark 3.2.Notice that relation 3.7 can be rewritten as R d x qT H q, where Hence, the needed controller, defined by 3.5 and 3.16 , is given that 5 where k 1 > 0 and k d > 0.
We end this section introducing the following important remark.
Remark 3.3.Notice that we can always compute c max c>0 q ∈ Q : V p q c; such that V p q c is a closed curve.

3.32
Mathematical Problems in Engineering To illustrate the geometrical estimation of the bound " c", we fix the parameter values k p 2.5 and k p 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 V p are closed.By a thorough numerical inspection, we found that c 0.108 for k p 2.5 and c 0.05 for k p 1.3.Figure 2 shows the corresponding level curves.

Asymptotic Convergence of the Closed-Loop System
Since the obtained V 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 ∈ R 4 , where Ω c q, q : q ∈ Q ∧ V q, q < c .

3.33
The set Ω c defines a compact invariant set because, for any initial conditions x 0 q 0 , q0 , with q 0 ∈ Q, provided that V x 0 < 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: 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 ṙ 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 −n sin θ * , 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.

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 From the above, we have that b 0.029, d 0.01477, and n 0.1448.The physical control parameters were fixed as k p 2.5, k 1 1/n and k d 0.5, while the initial conditions were fixed; as x 0 0.55 m; 0; 0.45 rad; 0 .Notice that the proposed set of parameters {d, k p , 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 x 0 < c 1.08. 6igure 3 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.
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 p s 0.0634 0.255s 0.88s 2 1.72s 3 s 4 .

4.2
The control parameters of the YNC and the HNC were selected, such that their corresponding characteristic polynomials coincided with the polynomial 4.2 .The initial conditions were Comment 2. A comparative study between our control strategy and other control strategies presented in the literature for solving the stabilization of the BBS, is beyond the scope of this work.

Conclusions
In this work we proposed a novel procedure to stabilize the BBS 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.

Figure 1 :
Figure 1: The ball and beam system.

qT υ d x θ −α r ṙ 0 3 . 18 imply
that functions ζ p q and ζ d x satisfy the restrictions in 3.15 .
r s e −ds 2 ds cos θ − r I sin r sin θ − r I cos r ,

Figure 2 :
Figure 2: Level curves of the function Φ q around the origin, for two sets of values: ηk 1, δ 0.015 and k p 2.5 a and ηk 1, δ 0.015 and k p 1.3 b with restrictions on |r| ≤ 0.6 m and |θ| ≤ 0.5 rad .

2 . 5 . 3 6.
The set D is related with the region of attraction of the closed-loop system.3.For simplicity, we useK c K r , k i k i r , k i d/drk i r , for i {1, 2, 3}.4.Symbol erf stands for the Gauss error function, After some simple algebraic manipulations it is easy to show that ζ p n sin θ ∂V p ∂θ ; ζ d −dr θ2 dk 1 r ṙ ṙ θ e −dr 2 5.For this particular case, the condition of Remark 3.2 is satisfied, because −b 4 k 1 − 1 k d b 2 exp −d * L 2 13.7 > 0. 5.4 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 .