On the Stabilization of the Inverted-Cart Pendulum Using the Saturation Function Approach

A simple stabilizing controller for the cart-pendulum system is designed in this paper. Our control strategy describes the underactuated system as a chain of integrators with a high-order smooth nonlinear perturbation and assumes initialization of the system in the upper half plane. The design procedure involves two sequentially associated control actions: one linear and one bounded quasilinear. The first control action brings the nonactuated coordinate near to the upright position and keeps it inside of a well-characterized small vicinity, whereas the second control action asymptotically brings the whole state of the system to the origin. The corresponding closedloop stability analysis uses standard linear stability arguments as well as the traditional Lyapunov method and the LaSalle’s theorem. Our proposed control law ensures global stability of the system in the upper half plane. We illustrate the effectiveness of the proposed control strategy via numerical simulations.


Introduction
Because of its control-related challenging features, the well-known cart-pendulum system has been extensively studied in recent times by the control community see, for instance 1 and the references therein .This control benchmark consists of a free vertical rotating pendulum with a pivot point mounted on a cart horizontally moved by a horizontal force which corresponds to the system input .The control problem comprises to swinging up the pendulum from its stable hanging position, in order to bring and maintain it to its unstable upright position.What makes this simple mechanical system an interesting control benchmark is the fact that the pendulum angular acceleration cannot be controlled, that is, the cart-pendulum system is a two degrees-of-freedom mechanical underactuated system.Hence, many common stabilizing control techniques developed for fullyactuated systems cannot be directly applied to this system.It must be pointed out that the cart-pendulum system is not input-output statically or dynamically feedback linearizable see for instance 2 .Moreover, the cart-pendulum system loses controllability and other control-related geometric properties when the pendulum moves through the horizontal plane see 1, 3 .Since the system is locally controllable around the unstable equilibrium point, closed-loop stabilization by linear pole placement can be used see, for instance, 4 .
Stabilizing the cart-pendulum system involves two main aspects: i swinging up the pendulum from the stable hanging position to the unstable upright vertical position see, for instance, 5-12 and ii stabilizing the system around its unstable equilibrium point.For this second aspect it is commonly assumed that the free endpoint of the pendulum is initially located above the horizontal plane or lies inside a well-characterized open vicinity of zero the vicinity defines the closed-loop stability domain .We focus our attention on the former problem.Let us now review some remarkable works on this aspect.In 13 a nonlinear controller, based on the backstepping procedure, is used to solve the stabilization problem in the unstable equilibrium point; the proposed controller ensures full state convergence.A controller based on nested saturation functions is proposed in 14 .A similar work is discussed in 15 , where a chain of integrators is considered as a model for the cart-pendulum system.In 9 a stabilization technique using switching and saturation functions in addition to the Lyapunov method is introduced.A control strategy based on controlled Lagrangians is presented in 16 , and a proposal using similar tools is exposed in 17 .A feedback control scheme based on matching conditions is described in 18 , while a simple matching condition is used in 19 to solve the cart-pendulum regulation problem.A very interesting nonlinear control strategy based on energy shaping techniques combined with input-to-state stability methods is presented in 20 .A solution which exploits power-based passivity properties of the cart-pendulum system is proposed in 21 .A nonlinear controller based on both the fixed point backstepping procedure and saturation functions is proposed in 22 .This list of published works is by no means exhaustive.Let us conclude it by mentioning the work published in 23 , where the challenging nature of the cart-pendulum problem is underscored to the nonlinear control community.
In this work we consider the Inverted Pendulum model introduced in 22 , to propose a simple control strategy, which combines a linear action with a quasilinear action.This strategy is justified by using the traditional Lyapunov method and applying the theorem of LaSalle.We point out that the proposed controller here differs from the obtained in 15, 22 .Because, contrary to these works, we do not need to use sophisticated nonlinear tools to carry out the stability analysis.For instance, we do not use the fixed point control scheme, nor the modified backstepping procedure.Also, our control law has a simple structure than the ones proposed in these two works.Roughly speaking, the linear control action confines, both, the angular position and the angular velocity in a small compact set, which defines the closed-loop stability domain completely characterized by the cartpendulum parameters and the controller parameters .The bounded quasilinear control action guarantees, then, full state convergence.We must emphasize that our solution avoids the necessity of solving partial differential equations, nonlinear differential equations, or fixed point control equations.The paper is organized as follows.Section 2 is concerned with modeling issues as well as the problem statement.We present our proposal in Section 3, which we illustrate with a simulated control scheme.We conclude with some final remarks in Section 4.

The Cart-Pendulum Model
Consider the cart-pendulum system see Figure 1 , described by the following set of normalized differential equations see for instance 4 : cos θ q θ − sin θ 0, where q is the normalized displacement of the cart; θ is the actual angle that the pendulum forms with the vertical; f is the horizontal normalized force applied to the cart i.e., the system input , and δ > 0 is a real constant that depends directly on both, the cart and the pendulum masses.In the nonforced case corresponding to f 0 and θ ∈ −π/2, π/2 the above system has only one unstable equilibrium point given by x θ 0, θ 0, q q, q 0 , with q being constant.Some simple algebra allows us to derive a new control variable u: Thus, system 2.1 can be written in a very simple way as θ sin θ − cos θu, q u.

2.3
Now, we proceed to express system 2.3 as if it were a four-order chain of integrators plus an additional nonlinear perturbation.For this end we define the new coordinates:

2.4
Then, system 2.3 can be written as where the term α z 3 is given by and v is now the new control variable defined as v sec 2 θ −u cos θ sin θ 2 θ2 sec 2 θ tan θ.

2.7
Notice that the above set of transformations are well defined for all −π/2 < θ < π/2.That is, the pendulum moves inside the upper half plane.On the other hand, it is easy to verify that function |α z | ≤ κ 2/3 1.5 .Remark 2.1.We emphasize that model 2.5 was proposed and resolved using the stability analysis tool known as the fixed point controller in combination with a version of the backstepping procedure, by Olfati-Saber 22 .On the other hand, it is our opinion that the main contribution of our control strategy is that we solved the stability problem using the Lyapunov method combined with the theorem of LaSalle.
We can now formulate our control problem.

Problem Formulation
Given the cart-pendulum system described as in 2.5 , we want to bring the pendulum to the upright position and, simultaneously, bring the cart to the origin or any other fixed desired position.
We introduce the following useful definitions, used in forthcoming developments.
Definition 2.2.Let x ∈ R. The classical linear saturation function is defined as where constant m is strictly positive.
Definition 2.3.By a sigmoidal function s m x , we mean a smooth function that is bounded, strictly increasing with the property that s m 0 0; xs m x ≥ 0 and |s m x | ≤ m, for all x ∈ R.
We now proceed to propose our control strategy.

Linear Transformation
Inspired by what is presented in 24 , we first introduce the following linear transformation: which leads to, when applied to 2.5 ,

3.2
In the following section we split the new control input v into two control actions.One part of this control, namely, v 1 , brings both the state x 3 and the state x 4 to a small compact set defining the closed-loop stability domain and, consequently, renders the nonlinear terms of system 3.2 to an arbitrarily small vicinity of zero.Simultaneously to the linear control action, a bounded quasilinear control action, namely, v 2 , stabilizes the missing states x 1 and x 2 .

Stabilization of the States x 3 and x 4
In order to guarantee that the states x 3 and x 4 are bounded, we split v as where |v 2 | ≤ ε, with ε > 0. Thus, after substituting 3.3 into 3.2 , we have that

3.4
We emphasize that, if |v 2 | ≤ ε, with ε small enough, then the states x 3 and x 4 converge toward the vicinity B x 34 ≤ δ ε for simplicity B x 34 , where the bound δ ε can be made small by minimizing ε and, consequently, all the nonlinear terms in 3.4 can be arbitrarily approximated to zero.This results in the dominance of the linear dynamics over their, respectively, nonlinear dynamics.That is, signal v 2 is then selected as a bounding function, where ε is given latter in our discussion and δ is a small positive constant fixed as needed.
In order to analyze the boundedness of both the state x 3 and the state x 4 , we consider the definite positive function given by x 4 v 2 .

3.6
Now, given the assumption |v 2 | ≤ ε we have that V1 is in fact bounded as follows: Evidently, when v 2 ≈ 0, the subsystem 3.4 converges asymptotically to zero, because its time derivative, given by 3.6 , is equal to −2x 2 4 , semidefinite negative and, applying the theorem of LaSalle, we have that, both variables, x 3 and x 4 , converge to zero.Note that if |x 4 | > ε/2 δ, with δ > 0 an arbitrarily small number, then, from 3.7 , we have that V1 < 0. Consequently, there exists a finite time T 1 after which we have that is x 4 is bounded.Even more, because V 1 x 4 , x 3 is a nonincreasing function, provided that |v 2 | ≤ ε, then the state x 3 is also bounded.However, in order to compute the corresponding bound of x 3 , we propose a positive function, W x 3 x 2 3 /2, whose time derivative along the of the dynamics of the state x 3 , in 3.4 , satisfies It implies that there exists a finite time T 2 > T 1 such that

3.10
Remark 3.1.Summarizing, after some period of time t > T 2 , we have that variables, x 3 and x 4 , are bounded.Besides, it holds that 3.11

Stabilization of Both the State x 2 and the State x 1
In order to stabilize the missing state variables we propose the bounding control action v 2 as follows: 12 with the control parameter k i being characterized by 0 < k i < 1. Observe that in order to simplify the corresponding bounded analysis, we used the linear saturation function σ m x 1 .However, this function can be substituted by any other nonlinear saturation function.On the other hand, we have that

3.13
Then, after substituting the above controller into the second equation of 3.4 we get ẋ2 −σ m x 2 − k i σ m x 1 α z 3 x 2 4 .

3.14
We introduce now the following positive definite function: in order to verify the boundedness of the state x 2 .Differentiating V 2 and using 3.14 we have that

3.17
We emphasize that the restriction m > δ k i m κ 0 ε 2 /4 can be always satisfied.Indeed, from the definition of ε given in 3.13 we evidently have just to illustrate how this inequality holds take, for instance, k i 2/3, m 1, and δ 10 −3 , for a given κ 0 0.39 .Finally, once the state x 2 is confined to move inside the region defined by k m 2 , the linear saturation function no longer acts over this state; that is, σ m x 2 x 2 .Therefore, v 2 turns out to be 3.19 In the same way, after t > T 3 , we can claim that the model in 3.4 leads to

3.20
Now, in instead of showing that the state x 1 is bounded, we show in what follows that, after a finite period of time t > T 3 , all the states asymptotically converge to zero.Let us first introduce the following useful lemma.
Lemma 3.2.Consider the first two equations in 3.20 and the following positive definite function: σ m s ds.

3.21
After a finite period of time t > T 3 , the following inequality holds: where K m mκ 0 3k i 1 δ.
The proof of this Lemma is given in Appendix A.

Asymptotic Convergence to the Origin of the Whole State
From the above discussion we conclude that, after the finite time t > T 3 > 0, the states x 1 , x 2 , and x 3 are bounded in some compact set, which defines the closed-loop stability domain.
To guarantee that all the states asymptotically converge to zero we propose the following candidate Lyapunov function: where V 1 and V m were previously defined in 3.5 and 3.21 , respectively.Since functions V 1 * and V m * are strictly positive definite function, with their respective arguments, we can claim that V T x qualifies as a candidate Lyapunov function.So, in case that t > T 3 we have that the time derivative of V T satisfies the following inequality see Lemma 3.2 and Remark 3.1 :

3.24
Selecting K m < 3/2 we have that VT x ≤ 0 e.g., k i 2/3 and m 1, for a given κ 0 0.39.From Lyapunov's direct method we ensure the stability of the whole state in the Lyapunov sense.In order to prove now asymptotic stability, we use the well-known LaSalle's theorem 25 .In the region defined as we have that x 4 t 0, x 2 t 0, and x 1 t 0. Thus, in the set S, we also have v 2 0. Now, from the four chained integrators model 3.4 we have x 3 t 0, in the set S. Therefore, the largest invariant set M ⊂ S is given by x 0. Thus, according to LaSalle's theorem all the trajectories of system 3.20 asymptotically converge towards to the largest invariant set M {x 0}.
We summarize our previous discussion with the next proposition, which corresponds to our main result.Proposition 3.3.Consider the closed-loop cart-pendulum system as described by model 2.5 with:

3.26
Then the closed-loop system is globally asymptotically stable and locally exponentially stable, provided that the parameters m and k i satisfy the inequalities

3.27
Remark 3.4.In order to simplify as much as possible the previous stability analysis we used the proposed v 2 , which is formed using a linear saturation function.However, nonlinear saturation functions can also be used, as we showed in Appendix B. Comparison between the closed-loop responses when the damping force is presented.The dotted lines correspond to the system response when the damping force perturbation is present, while the solid lines represent the case when this force is absent.

An Illustrative Example
In order to show the effectiveness of the proposed nonlinear control strategy we developed an experiment that allows us to compare the behavior of the strategy, in the presence and the absence of a damping force.The damping force was added to the left-hand side of the first equation in 2.1 , as 0.6 θ.We chose the controller parameter values to be m 1, k i 0.666.As far as the initial conditions are concerned we take θ, θ, q, q 1.15 rad , 0, 1, 0.25 .Figure 2 shows the results coming out from the numerical simulations.As can be seen we have, as expected, a quite effective performance for the controller.Even when the sustained damping force is present, the closed-loop response is still quite well.Observe that in order to compensate the damping force effect the cart has to make larger displacements.This numerical result is of importance, because, contrarily to our strategy, many others developments for the same porpoises are very sensitive to the presence of an unmatched damping force in the nonactuated coordinate.

Concluding Remarks
In this paper a new control strategy is proposed in order to solve the well-known cartpendulum regulation problem, assuming that the pendulum is initialized in the upper half plane.The control strategy used a control-oriented model of the considered system a model consisted of a nonlinearly perturbed chain of four integrators , previously introduced in 22 .The model choice lets us design a simple stabilizer consisted of two parts.The first part characterizes a linear controller, devoted to bring the nonactuated coordinate i.e., both the angular position and the angular velocity near to the unstable vertical position and keep it inside of a small vicinity which defines the closed-loop stability domain.The other part is a bounded controller which, in conjunction with the linear part, ensures that the closed-loop whole state asymptotically converges to the origin.The combined control law ensures then the regulation of the system.Our stability analysis was carried out using standard arguments from linear systems theory in conjunction with the traditional Lyapunov method and the famous LaSalle's theorem.We strongly believe that many other nonlinear underactuated dynamical systems can be stabilized using our simple control approach.We must point out that a main advantage of this work is that we did not need to solve PDE, nonlinear differential equations, and nested saturation functions.Finally, the numerical experiments carried out with an academic example illustrated how effective is our control strategy when an unknown damping force is present.

A. Proof of Lemma 3.2
Proof.We must remark that the time derivative of V m 3.21 around the trajectories defined by the first two equations of 3.20 is given by Vm and evidently 0 x can be bounded by

B. Proof of Remark 3.4
Proof.For simplicity we use as nonlinear saturation function the following: m tanh x .That is, v is formed as: Selecting v 1 and the bound for v 2 as discussed in Section 3 and taking into account expressions 3.3 and 3.13 , we guarantee that there exists a time t > T 2 , such that Therefore, the first and the second equations of 3.20 become

B.3
To analyze the boundedness of x 2 , we use the positive definite function E 2 x 2 2 /2, whose time derivative can be bounded as Hence, selecting m and k i , such that Indeed, it follows because, if tanh x 2 > η mk i , then Ė2 < 0. Notice that the state x 2 can be confined to move inside of a compact set relying on the bound x mk i .Note that this bound can be manipulated, almost, as desired.Then we can select, for instance, x mk i < 1.9 to make |x − tanh x | < |tanh x |; ∀ |x| < 1.9 B.7 hold.Simple geometric arguments can be applied to prove this inequality.Until now we have only provided sufficient conditions to guarantee that x 2 , x 3 , and x 4 are bounded with the corresponding bounds being freely fixed .Now we are in conditions to proof that the whole state asymptotically converges to the origin.We first choose a positive function similar to the one used in Lemma 3.2 defined as We built now the candidate Lyapunov function E T E m V 1 , with V 1 defined as in 3.5 .Then, using some simple algebra and Remark 3.1 it is easy to show that ĖT can be bounded as Selecting K m < 3/2 as in Proposition 3.3 , we have that Ė is semidefinite negative.Hence all the states are bounded.Finally, invoking the LaSalle's theorem and following standard arguments, we can show that the whole state of the closed-loop system asymptotically converges to the origin.This concludes the proof.

Figure 2 :
Figure 2:Comparison between the closed-loop responses when the damping force is presented.The dotted lines correspond to the system response when the damping force perturbation is present, while the solid lines represent the case when this force is absent.
x 1Differentiating the above equation with respect to B.3 , we have, after using simple algebra as in Lemma 3.2, the following inequality:Ėm x 2 , x 1 ≤ K m x 2 tanh x 1 x 2 − tanh x 2 .B.10Now, under the assumption t > T 3 , selecting x mk i < 1.9, and taking into account B.7 in the above expression, we have| k i |tanh x 1 | 2 .