Next Article in Journal
Ricci Curvature Inequalities for Contact CR-Warped Product Submanifolds of an Odd Dimensional Sphere Admitting a Semi-Symmetric Metric Connection
Previous Article in Journal
Vacuum Currents for a Scalar Field in Models with Compact Dimensions
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Robust and Exponential Stabilization of a Cart–Pendulum System via Geometric PID Control

1
Shanghai Key Laboratory of Power Station Automation Technology, School of Mechatronic Engineering and Automation, Shanghai University, Shanghai 200072, China
2
School of Automation and Electrical Engineering, Zhejiang University of Science and Technology, Hangzhou 310023, China
*
Author to whom correspondence should be addressed.
Symmetry 2024, 16(1), 94; https://doi.org/10.3390/sym16010094
Submission received: 2 November 2023 / Revised: 15 December 2023 / Accepted: 8 January 2024 / Published: 11 January 2024

Abstract

:
This paper addresses the robust stabilization problem of a cart–pole system. The controlled dynamics of this interconnected system are deduced by following the analytic framework of Lagrangian mechanics, and the residual terms are formulated as a bias depending on the angle and angular velocity. A geometric definition of Proportional–Integral–Derivative (PID) control algorithm is proposed, and a Lyapunov function is explicitly constructed through two stages of variable change. Local exponential stability of the stable equilibrium is proved, and a criterion for parameter tuning is provided by ensuring an exponential decrease in the Lyapunov function. Enlarging the control parameters to infinity allows for the extension of attraction region almost to the half circle. The effectiveness of geometric PID controller and the local exponential stability of the resulting close system are verified by simulating a numerical example.

1. Introduction

Stabilization of a cart–pendulum (cart–pole) system is of significant interest for both practical applications in control engineering and scientific research of control theory [1,2]. Attitude control of a spacecraft booster is precisely a stabilization problem of the cart–pendulum. Balancing of a two-wheeled cart in robotic engineering also involves stabilizing an inverted pendulum on a cart. Due to the nonlinear nature of the cart–pendulum system, it has been a popular benchmark for the invention, validation and verification of many advanced nonlinear control techniques, especially for the energy-based control [3,4,5,6,7]. As an under-actuated system, the cart–pole system has two dimensions of freedom for motion, i.e., the pendulum angle and cart position, but is actuated, in only one dimension, by forces applied to the cart. This property has inspired the researchers to study the cart–pole system as an interconnected or cascade system and use the energy-based method of Interconnection and Damping Assignment Passivity-Based Control (IDA-PBC) to get the pending position stabilized [4,5]. Another point of view for understanding the dynamics of a cart–pole system is by following the framework of the Lagrangian mechanics. In this line, the energybased method of controlled Lagrangian is introduced to stabilize an inverted pendulum by shaping the kinetic or potential energy such that some geometric structures of Lagrangian system are matched [6,7]. In the present paper, we establish the controlled dynamics of a cart–pendulum system in the analytic framework of Lagrangian mechanics, which allows us to investigate the interactions between the pending pole and the tracking cart.
Among the various control techniques developed for a cart–pole system, more advanced approaches, such as energy-based control [3,4,5,6,7] or model predictive control [8], are based on system model and are advantageous in providing more accurate control, as simulation and computation of physical models are possible. More recent results are established on the data-driven technique of learning-based control. The algorithm of Deep Reinforcement Learning (DRL) allows for online extraction of the system model [9,10] or real-time identification of the optimal parameters [11,12] from the collected data. Therefore, the DRL method has significant advantages in providing an adaptive controller by which seeking optimal solutions and improving the robustness to time-varying disturbances are possible. Although the learning-based control has relaxed, more or less, the requirement of exact model knowledge, its training process relies heavily on a large amount of data. As another model-free method, however, PID control has its strength in simplifying the structure of the controller and reducing the requirement for information about the system model. In the algorithm of PID control, the input commands are formed by combining a proportion, a time derivative and a time integral of errors. Computing those actions is straightforward in vector spaces. For a system defined in a non-Euclidean space, however, the classical definition of PID control makes no mathematical sense and providing a rigorous and consistent extension of the conventional one to more general settings requires further studies. The work in [13] provided a geometric PD controller for simple mechanical systems evolving on Riemannian manifolds by using a negative proportion of the gradient of an error function as the proportional action. In this line, a left-invariant definition of PID controller was proposed for fully actuated systems evolving on Lie groups by identifying the integral action in Lie algebra as an integration of PD commands along time [14,15]. A parallel work in [16] focused on the extension of PID to more geometric settings, in which an intrinsic PID controller is defined with all the input commands justified using the notation of covariant derivative. We also attempted to generalize the capability of geometric PID control to stabilize under-actuated systems like steering-controlled vehicles. This extension, however, requires modification on the definition of integral action [17]. To our knowledge, this is the first time confirming the effectiveness of geometric PID control law in robust stabilization of under-actuated systems, i.e., stabilizing the variables in the under-actuated dimension of an interconnected system, like a cart–pole system, despite the influence of residual terms that come from the interactions between actuated and under-actuated dimensions.
Although the design of the geometric PID control has been studied for a decade, the convergence analysis for geometric PID-controlled systems needs further studies. Two aspects are worthy of deeper investigation. First, most results were developed by associating a feed-forward control with the geometric PID control [16,18]. The feed-forward action still needs the exact information of system model. The work in [14] suggests the simplest design only with PID inputs, while the feed-forward compensation is not necessary. In this line, we are inspired to propose a modeling of a cart–pole system in which the residual term is viewed as a bias to be countered by integral action rather than a term to be compensated by feed-forward control. The convergence analysis for this geometric PID-controlled system is not straightforward. The integral control must be ensured with the ability to deal with both state-dependent and velocity-dependent biases. To our knowledge, using integral action to compensate for the time-varying effects caused by residual terms in a cart–pendulum system has not been studied in the existing literature. Second, regarding the convergence, only Asymptotic Stability (AS) was established in previous works [14,15,16,18], and the proof must be resolved in association with LaSalle’s invariance principle. We want to establish a stronger result of Exponential Stability (ES) for a geometric PID-controlled cart–pole system. Our goal is to provide an analytical framework in which integral action is confirmed to be able to completely attenuate the effects of both state-dependent and velocity-dependent biases.
The contributions of this paper are in following aspects:
  • The controlled dynamics of a cart–pole system is presented in a form of Euler–Lagrangian equations and the residual terms are viewed as state-dependent and velocity-dependent biases whose effects are not necessarily required to be compensated by feed-forward control.
  • The process of controller design is simplified as defining a geometric PID control algorithm for an inverted pendulum. The proposed control law allows for robust stabilization of angles to an arbitrary value, as integral action is incorporated to suppress the effects caused by residual terms. The advantage of derivative control in accelerating convergence speed and the strength of integral action in compensating unknown biases are confirmed.
  • A Lyapunov function is deduced by applying two stages of coordinate change. Conditions for the tuning of controller parameters are justified by guaranteeing exponential decrease in the established Lyapunov function. The attraction region is enlarged almost to a half circle.
The remaining contents of this paper are outlined as follows: In Section 2, the mathematical model of a cart–pole system is established and its governing equations of controlled dynamics are derived. In Section 3, a geometric PID controller is proposed. The main attention of the present paper is focused on providing a rigorous convergence analysis; see Section 4 for detailed proof. Results of numerical simulation are reported and the limitations are discussed in Section 5, followed by the conclusion in Section 6.

2. System Modeling

As shown in Figure 1, a cart–pole is an interconnected system with physical interaction between a cart and a pole. One end of the rob is pivoted on the base of the cart, and the other end is associated with a ball. The cart and ball are of mass M and m, respectively, while the rob is assumed to be massless. We denote by θ the angle between the rob and the vertical line, which needs to be stabilized. The cart is controlled by an external force u s . Because of the action by the gravity of the earth, it is difficult to keep the rob staying in an upright direction, as θ = 0 is an unstable equilibrium point for a cart–pole system of no control, and arbitrarily small deviation from this point will let the ball fall down. Applying control in the horizontal direction to the cart, however, allows us to have the angle stabilized to a desired equilibrium. In this section, an explicit expression for the governing equation is deduced by following the analytical framework of Lagrangian mechanics [6].
Summing up the kinetic energy of ball and cart gives the total value of kinetic energy
T = 1 2 ( M + m ) s ˙ 2 ( m l cos θ ) s ˙ θ ˙ + 1 2 ( m l 2 ) θ ˙ 2 .
The potential energy only appears in the component of the ball
E = m g l cos θ .
Accordingly, the Lagrangian for a cart–pole system is obtained
L = T E = 1 2 ( M + m ) s ˙ 2 ( m l cos θ ) s ˙ θ ˙ + 1 2 ( m l 2 ) θ ˙ 2 m g l cos θ .
The resulting Euler–Lagrangian equations follow
d d t L θ ˙ L θ = 0 d d t L s ˙ L s = u s .
Replacing the partial derivatives with explicit computations gives a more detailed representation of Euler–Lagrangian equations
( m l 2 ) θ ¨ ( m l cos θ ) s ¨ m g l sin θ = 0 ( M + m ) s ¨ ( m l cos θ ) θ ¨ + ( m l sin θ ) θ ˙ 2 = u s ,
whose solutions are
θ ¨ = cos θ l s ¨ + g sin θ l s ¨ = u s ( m l sin θ ) θ ˙ 2 + m g sin θ cos θ M + m sin 2 θ .
By defining a new variable
η ( θ ) = cos θ M l + m l sin 2 θ ,
a more compact form for the dynamics of variable θ turns out to be
θ ¨ = η ( θ ) · ( u s + F b )
where the residual term F b comes from the action by gravity of the earth, and the interactions between the cart and the pole
F b = ( m l sin θ ) θ ˙ 2 + 1 2 m g sin ( 2 θ ) + g l · sin θ η ( θ ) .
Instead of compensating the influence of this residual term through feed-forward control, we let it appear as a state-dependent and velocity-dependent bias in the system model and attempt to obtain its effects attenuated by incorporating integral action in the process of controller design.

3. Design of Geometric PID Controller

As shown in Figure 2, the system is actuated on the cart, and the feedback is based on the measurements of angle and angular velocity on the pending pole. The geometric design of PID control law is different from the conventional design in Euclidean spaces. First, the measurements must be transformed, through some geometric computations, into a geometric object of the gradient vector. Second, the proportional, integral, and derivative inputs must be defined in vector form. Thus, the geometric PID controller is defined as
u s = k p sin θ k d ω + k i u i u ˙ i = k p sin θ k d ω ,
where ω = θ ˙ represents angular velocity, the proportional command F p = k p sin θ is proportional to the gradient of error function ϕ ( θ ) = 1 cos θ , and F i = k i u i is a time integral of F p and derivative commands F d = k d ω . Submitting the control inputs into Equation (2) results into a closed system
θ ˙ = ω
ω ˙ = η ( θ ) · ( k p sin θ k d ω + k i u i + F b )
u ˙ i = k p sin θ k d ω .
The goal for controller design is settled as to stabilize the pair of states ( θ , ω ) to a desired equilibrium of ( θ , 0 ) . Without loss of generality, we take θ = 0 in the following analysis, as the problem of stabilizing θ towards an arbitrary target point of θ 0 is equivalent to that of driving θ ^ = θ θ to θ ^ = 0 . We do not include the requirements for the specification of states ( s , s ˙ ) in our controller design. It is clear that, when θ ¨ = 0 , there exist a term g tan θ in s ¨ , which only vanishes when θ = 0 . This implies that, when the target point θ 0 , the cart will keep constantly accelerating such that the pole remains at the equilibrium point.

4. Convergence Analysis

In order to achieve the proof of exponential stability, the resulting close system needs a representation in some renewed coordinate systems. Fortunately, it is possible to construct the proper coordinates by justifying two stages of reasonable variable change. In the first step, it is shown that there exists a negative proportion of | sin θ | 2 in the time derivative of ϕ , which implies the gradient-descent decline of an error function. The second-stage variable change further ensures that the derivative input F d and the integral action F i exponentially approach the proportional one F p and the bias F b , respectively. Provided the results of two-stage coordinate change, it is straightforward to come up with a Lyapunov candidate whose decrease proves the exponential stability.

4.1. First-Stage Variable Change

It is difficult to judge the stability of the resulting system in the original coordinate ( θ , ω ) . By choosing the new variables ( θ , x , y ) , we update the coordinate system as
x = k p sin θ k d ω
y = k i u i + F b .
Computing its inverse allows us to represent ω , ω ˙ , and u ˙ i in terms of x and y:
ω = β sin θ ρ x ω ˙ = η ( θ ) · ( x + y ) u ˙ i = x
with β = k p / k d , ρ = 1 / k d . With the help of this variable change, the original system is turned into that described in the new coordinates:
θ ˙ = β sin θ ρ x x ˙ = k d η ( θ ) · ( x + y ) + F ˙ p y ˙ = k i x + F ˙ b .
By defining vectors v = [ x ; y ] , we obtain a system in linear form:
θ ˙ = β sin θ + b θ
v ˙ = A ( θ ) v + b v
where the matrix A ( θ ) and the vectors b θ , b v are
A ( θ ) = k d η ( θ ) k d η ( θ ) k i 0
b θ = ρ x ; b v = F ˙ p F ˙ b .
After performing the first step of variable change, the resulting representation in the renewed coordinate system is obtained in the next proposition.
Proposition 1.
Suppose that θ [ θ ¯ , θ ¯ ] ( π 2 , π 2 ) and | ω | H . Then, the geometric PID-controlled system (4)–(6) has a representation of the form (9) and (10) under the coordinate change (7) and (8). The norm of vectors b θ and b v is upper bounded by the values of | sin θ | and v
| b θ | k 0 v
b v k 1 | sin θ | + k 2 v
with
k 0 = ρ k 1 = ( k p + μ ) β k 2 = β + μ ρ + 2 ν η ¯
and
μ = m l H 2 + m g + g η ̲ l 1 + M + 2 m η ̲ l M 2 ν = 2 m l H η ̲ = cos θ ¯ M l + m l sin 2 θ ¯ η ¯ = 1 M l .
Proof of Proposition 1.
The above computations have established the updated representation of the geometric PID-controlled system in the renewed coordinates. We need to further identify the upper bound for the norm of vectors b θ and b v . From their expressions in (12), we have | b θ | = ρ | x | ρ v = k 0 v with k 0 = ρ ; and we also know that
b v | F ˙ p | + | F ˙ b | .
The remaining task then turns out to be estimating the upper bounds of | F ˙ p | and | F ˙ b | . Computing the derivative of F p gives
| F ˙ p | = | ( k p β cos θ ) · sin θ + ( β cos θ ) · x | | ( k p β cos θ ) · sin θ | + | ( β cos θ ) · x | k p β | sin θ | + β v .
In order to obtain the estimate of | F ˙ b | , we need to know the upper bounds of | η ( θ ) θ | , | F b θ | , | F b ω | . With the expression of η ( θ ) in (1), we have
η ( θ ) [ η ̲ , η ¯ ] = cos θ ¯ ( M l + m l sin 2 θ ¯ ) , 1 M l
η ( θ ) θ = sin θ ( M + m sin 2 θ ) m cos θ sin ( 2 θ ) ( M + m sin 2 θ ) 2 l M + 2 m M 2 l .
Further, with the expression of F b in (3), we obtain
F b θ = m l ω 2 cos θ + m g cos ( 2 θ ) + 1 η · g cos θ l g sin θ l · 1 η 2 η ( θ ) θ m l H 2 + m g + g η ̲ l 1 + M + 2 m η ̲ l M 2 = μ F b ω = 2 m l ω sin θ 2 m l H = ν
where we have used the facts in (17) and (18) and the assumption on | ω | H . Now, we are ready to obtain the upper bound for | F ˙ b |
| F ˙ b | = | F b θ ω + F b ω ω ˙ | | F b θ | · | ω | + | F b ω | · | ω ˙ | | F b θ | · ( β | sin θ | + ρ v ) + | F b ω | · ( 2 η v ) μ β | sin θ | + μ ρ + 2 ν η ¯ v .
Submitting the results from (16) and (19) into Equation (15) yields
b v b v 1 + b v 2 ( k p + μ ) β | sin θ | + ( β + μ ρ + 2 ν η ¯ ) v = k 1 | sin θ | + k 2 v
where
b v 1 = k p β cos θ sin θ F b θ β sin θ ; b v 2 = β cos θ x F b θ ρ x + F b ω η ( x + y )
and the values of k 1 , k 2 are justified accordingly. □
The results in the first step of coordinate change have shown the fact that there exists a term β | sin θ | 2 in the time derivative of error function d d t ϕ , which ensures a gradient-descent decline of ϕ = 1 cos θ . However, the term v T A ( θ ) v is not guaranteed to hold a negative value for arbitrary non-zero vectors. Thus, a second-stage variable change must be performed to obtain a reasonable coordinate system through a similar transformation. i.e., v ˜ = P v and A ˜ = P A ( θ ) P 1 , such that the term v ˜ T A ˜ v ˜ is ensured being definitely negative for all the vectors v ˜ 0 .

4.2. Second-Stage Variable Change

The second-stage process of variable change is to perform a similar transformation of the matrix A ( θ ) . We let k i = γ k d and turn the matrix A ( θ ) in (11) into
A = k d η ( θ ) k d η ( θ ) γ k d 0
This matrix has two eigenvalues
λ ˜ 1 = k d η ( θ ) λ 1 , λ ˜ 2 = k d η ( θ ) λ 2
with λ 1 , λ 2 R having explicit expressions
λ 1 , 2 = 1 2 ± 1 4 γ η ( θ ) ,
which, indeed, are two solutions of the following equation:
η ( θ ) · λ 2 η ( θ ) · λ + γ = 0 .
The second-stage process of variable change is then defined as
x ˜ = λ 1 x + y
y ˜ = λ 2 x + y
or, in matrix form, as v ˜ = P · v for v ˜ = [ x ˜ ; y ˜ ] . The matrix P then follows
P = λ 1 1 λ 2 1 .
We further obtain a transformation of the system (9) and (10) into that, described in terms of v ˜ , b ˜ θ and b ˜ v ˜
θ ˙ = β sin θ + b ˜ θ
v ˜ ˙ = A ˜ ( θ ) v ˜ + b ˜ v ˜
where the matrix A ˜ and vectors b ˜ θ , b ˜ v ˜ are
A ˜ = P A ( θ ) P 1 = λ ˜ 1 λ ˜ 2
b ˜ θ = ρ x ˜ y ˜ λ 1 λ 2 ; b ˜ v ˜ = P ˙ P 1 · v ˜ + P · b v .
By performing the second step of variable change, the form of resulting system is reported in the next proposition.
Proposition 2.
Suppose that Proposition 1 holds and γ is settled such that 0 < m γ η ¯ < γ η ̲ M < 1 4 . Then, there exists a variable change (22) and (23), such that the system (9) and (10) has a representation of the form (24) and (25). The terms v ˜ T A ˜ v ˜ , | b ˜ θ | and b ˜ v ˜ are bounded as follows:
v ˜ T A ˜ v ˜ k ˜ A v ˜ 2
| b ˜ θ | k ˜ 0 v ˜
b ˜ v ˜ k ˜ 1 | sin θ | + k ˜ 2 v ˜
with
k ˜ A = k d η ̲ 1 2 1 4 m k ˜ 0 = 2 k 0 1 4 M k ˜ 1 = 2 k 1 k ˜ 2 = 4 k 2 1 4 M + 2 2 ( M + 2 m ) H η ̲ l M ( 1 4 M ) .
Proof of Proposition 2.
By following the above computations, it is not difficult to obtain the renewed representation of the geometric PID-controlled system after two stages of variable change. The remaining task is to provide the estimate of upper bounds for v ˜ T A ˜ v ˜ , b ˜ θ and b ˜ v ˜ . By Equations (20) and (21), we know that
| λ ˜ | k d η ̲ 1 2 1 4 m .
Following Equation (26), we further obtain the result
v ˜ T A ˜ v ˜ k d η ̲ 1 2 1 4 m v ˜ 2 = k ˜ A v ˜ 2
by which k ˜ A in (28) is justified accordingly. By investigating the explicit solutions for λ in (21), we know the facts
0 < 1 2 1 4 m | λ | 1 2 + 1 4 m < 1 | λ ˙ | = ± γ η · η ˙ η 2 4 γ η ( M + 2 m ) H η ̲ l M 1 4 M 1 4 M < | λ 1 λ 2 | = 1 4 γ η ( θ ) < 1 4 m .
By following Gershgorin circle theorem, we are allowed to come up with the estimate of upper bounds for P , P 1 and P ˙ ,
P = λ max ( P T P ) < 2 P 1 = λ max ( ( P 1 ) T P 1 ) < 2 1 4 M P ˙ = λ max ( P ˙ T P ˙ ) < 2 ( M + 2 m ) H η ̲ l M 1 4 M .
From (13) and (27), we know that
| b ˜ θ | = | b θ | k 0 v k 0 P 1 · v ˜ 2 k 0 1 4 M v ˜ = k ˜ 0 v ˜ .
The vector b ˜ v can be viewed as a combination of two terms b ˜ v ˜ 1 = P · b v 1 and b ˜ v ˜ 2 = P · b v 2 + P ˙ P 1 · v ˜ . With the result of (14) in Proposition 1, we have
b ˜ v ˜ 1 P · k 1 | sin θ | 2 k 1 | sin θ | = k ˜ 1 | sin θ | b ˜ v ˜ 2 P · k 2 v + P ˙ P 1 · v ˜ P · k 2 P 1 · v ˜ + P ˙ · P 1 · v ˜ 4 k 2 1 4 M + 2 2 ( M + 2 m ) H η ̲ l M ( 1 4 M ) v ˜ = k ˜ 2 v ˜ .
With the above results at hand, we can make a progress to reach (29) and (30) for the upper bounds of b ˜ θ and b ˜ v ˜ with the values of k ˜ 0 , k ˜ 1 and k ˜ 2 justified accordingly. □

4.3. Local Exponential Stability

With the above results obtained through two stages of coordinate change, it is sufficient to present the main results of this paper in the next theorem.
Theorem 1.
Suppose that the control parameters are settled as identifying k p > 1 / 1 4 M and taking sufficiently large k d , k i with γ = k i / k d satisfying γ η [ m , M ] ( 0 , 1 / 4 ) , then the desired stable equilibrium point ( θ , ω ) = ( 0 , 0 ) of the system (4)–(6) is locally exponentially stable. Starting from an arbitrarily specified initial point ( θ ( 0 ) , ω ( 0 ) ) in the attraction region R 0 = { ( θ , ω ) | ϕ ( θ ) a 0 < 1 , | ω | H 0 } with u i ( 0 ) = 0 , and by declining the Lyapunov function,
V = α ϕ + 1 2 v ˜ T v ˜
the system’s states ( θ , ω ) are stabilized to the stable equilibrium point, while the bias F b is countered by the integral action k i u i . Sufficiently large control parameters α and k d , k i allow us to extend the attraction region R 0 almost to the set of { ( θ , ω ) | π 2 θ π 2 , ω R } .
Proof of Theorem 1.
Computing the time derivative of (31) and replacing the terms θ ˙ and ˙ v ˜ with (24) and (25) leads to
V ˙ = α sin θ · ω + v ˜ T · v ˜ ˙ = α β | sin θ | 2 + α sin θ · b ˜ θ + v ˜ T A ˜ v ˜ + v ˜ T · b ˜ v ˜ .
The results of (28)–(30) established in Proposition 2 allow us to obtain
V ˙ α β | sin θ | 2 + ( α k ˜ 0 + k ˜ 1 ) | sin θ | · v ˜ + ( k ˜ A + k ˜ 2 ) v ˜ 2 .
By defining z = [ | sin θ | ; v ˜ ] , we further have
V ˙ z T W 1 z
with the matrix
W 1 = α β α k ˜ 0 + k ˜ 1 2 α k ˜ 0 + k ˜ 1 2 k ˜ A + k ˜ 2 .
By Gershgorin circle theorem, z T W 1 z < 0 requires
α β > α k ˜ 0 + k ˜ 1 2 k ˜ A > α k ˜ 0 + k ˜ 1 2 + k ˜ 2
By replacing k ˜ A , k ˜ 0 , k ˜ 1 , k ˜ 2 with explicit expressions, we rewrite the conditions as
k p 1 1 4 M k α > ( k p + μ )
1 2 1 4 m k d η ̲ > k α β + 4 ( β + μ ρ + 2 ν η ¯ ) 1 4 M + ( k p + μ ) β + 2 2 ( M + 2 m ) H η ̲ l M ( 1 4 M )
with k α = α / k p . The above requirements are possible to be reached by taking appropriate control parameters and setting a proper value for the weight α . Firstly, we set the proportional action with a k p of large value such that k p > 1 1 4 M . Once k p is specified, enlarging the value of k α allows us to satisfy the condition (33). Next, given the fixed value of k p and k α , we are allowed to let the condition (34) be satisfied by choosing a sufficiently large value for k d .
Before proving the exponential stability, we first need to make sure that there exist two positive matrices W 2 and W 3 such that
z T W 2 z V z T W 3 z .
Now, we want to prove that ϕ is lower bounded by | sin θ | 2 . Actually, from the fact that ϕ = | sin θ | 2 = 0 at θ = 0 , we can view the values of ϕ ( θ ) and | sin θ | 2 for arbitrary θ as path integrals along a curve parameterized by t [ 0 , 1 ] , with starting point θ = 0 at initial time t = 0 and ending point θ at last time t = 1 . As the path integrals are independent of the specific curves, we take the special one whose velocity d d t θ equals the gradient of error function sin θ as the candidate path.
ϕ ( θ ) = 0 1 d d t ϕ ( θ ( t ) ) · d t = 0 1 sin θ ( t ) · sin θ ( t ) d t = 0 1 | sin θ ( t ) | 2 d t | sin θ | 2 = 0 1 d d t | sin θ ( t ) | 2 · d t = 0 1 2 cos θ ( t ) · | sin θ ( t ) | 2 d t .
As | cos θ ( t ) | 1 , we further obtain
| sin θ | 2 2 0 1 | sin θ ( t ) | 2 d t = 2 ϕ ( θ ) .
We can take a sufficiently small w 2 1 2 such that
w 2 | sin θ | 2 ϕ ( θ ) .
As we know that 0 ϕ 1 , we can make σ < 1 sufficiently close to 1, and take w 3 = 1 1 σ such that
ϕ ( θ ) w 3 | sin θ | 2
is satisfied for any θ in an arbitrarily given attraction region. The matrices in (35) are settled as W 2 = diag { w 2 ; w 2 } and W 3 = diag { w 3 ; w 3 } . The conditions (32) and (35) allow us to conclude that the desired equilibrium point ( θ , ω ) = ( 0 , 0 ) is exponentially stable [19].
Next, we prove the extension of the attraction region. We need to ensure that ϕ ( θ ) does not reach a and | ω | does not exceed the value of H, i.e., ϕ ( θ ( t ) ) a < 1 and | ω ( t ) | H are always satisfied for all t. Let R 0 = { ( θ , ω ) | ϕ ( θ ) a 0 < 1 , | ω | H 0 } and R 1 = { ( θ , ω ) | ϕ ( θ ) a < 1 , | ω | H } , then we need to prove that ( θ ( 0 ) , ω ( 0 ) ) R 0 and u i ( 0 ) = 0 implies ( θ ( t ) , ω ( t ) ) R 1 . As V ˙ ( ξ ) < 0 for all ξ [ 0 , t ) and | F b ( 0 ) | D = m l H 0 2 + m g + g η ̲ l ; we thus obtain the estimate of upper bound for V ( t )
V ( t ) = V ( 0 ) + 0 t d d ξ V ( ξ ) d ξ < V ( 0 ) = α ϕ ( θ ( 0 ) ) + 1 2 v ˜ ( 0 ) 2 α + 2 ( k p + k d H 0 ) 2 + D 2
with
v ˜ ( 0 ) P · v ( 0 ) 2 | x ( 0 ) | 2 + | y ( 0 ) | 2 = 2 | k p sin θ ( 0 ) k d ω ( 0 ) | 2 + | F b ( 0 ) | 2 2 ( k p + k d H 0 ) 2 + D 2 .
We further obtain the value of H justified as follows
| ω ( t ) | β | sin θ | + ρ | x ( t ) | β + ρ v ( t ) β + ρ P 1 · v ˜ ( t ) β + 2 ρ 1 4 M 2 V ( t ) β + 2 ρ 1 4 M 2 α + 4 ( k p + k d H 0 ) 2 + D 2 = H .
The nominal part v ˙ = A v actually represents a physical model of damped oscillator. Enlarging the parameter k d to infinity will increase the frequency of the oscillator to infinity, and therefore allows us to reduce the period T to zero. Thus, it is possible to make the value of ϕ ( θ ( t ) ) over a period t [ t 0 , t 0 + T ] stay sufficiently close to that of ϕ ( θ ( t 0 ) ) , i.e.,
ϕ ( θ ( t ) ) ϕ ( θ ( t 0 ) ) = t 0 t sin θ ( ξ ) · ω ( ξ ) d ξ T · H .
Given an arbitrarily specified value of a 0 < 1 (sufficiently close to 1), by making k d sufficiently large, a real value of a satisfying a 0 < a = a 0 + T · H < 1 can be justified such that ϕ ( θ ( t 0 ) ) a 0 indicates ϕ ( θ ( t ) ) a for all t [ t 0 , t 0 + T ] . Through a period, the accumulated effects by the term ρ x in ω is averaged out, while the total effects by the action of β sin θ decreases the value of error function ϕ , i.e., ϕ ( θ ( t 0 + T ) ) < ϕ ( θ ( t 0 ) ) a 0 . Therefore, the condition ϕ ( θ ( t ) ) < a also remains valid for all t > t 0 + T , and the angles are ensured to be not exceeding the value of θ ¯ = arccos ( 1 a ) , which further determines the value of η ̲ .
Now, it is sufficient to draw a conclusion on the extension of attraction region, i.e., enlarging the value of control parameters to infinity allows for an extension of attraction region R 0 almost to the set of { ( θ , ω ) | π 2 θ π 2 , ω R } . □

5. Results and Discussion

In this section, the numerical results of a simulating example are reported, and the limitations of the proposed design are discussed.

5.1. Results of Simulation

We verify the effectiveness of the proposed geometric PID control algorithm in robustly and exponentially stabilizing an inverted pendulum by providing a numerical simulation of a cart–pole system. The setting for the system model, control parameters, and coefficient of the Lyapunov function are presented in Table 1. The system is assumed to start from an initial point of ( θ ( 0 ) , s ( 0 ) ) = ( π / 6 , 0 ) with zero velocity and without integral action, i.e., ( ω ( 0 ) , s ˙ ( 0 ) , u i ( 0 ) ) = ( 0 , 0 , 0 ) .
Figure 3 shows the evolution of angle, angular velocity, and η ( θ ) . As time evolves, the pair ( θ , ω ) is stabilized to a specified value of targeted equilibrium point, i.e., ( θ , ω ) = ( π / 36 , 0 ) in this case. Note that the cart is accelerating at this equilibrium, as s ¨ = g tan ( π / 36 ) 0 . As the angle evolves, the θ -dependent variable η ( θ ) varies, but with all its values being ensured to stay in a positive interval.
Figure 4 shows the evolution of control commands and bias. After a very short time of initial transient, the derivative input F d = k d ω tends to the negative of proportional input F p = k p sin θ , implying that ω is forced to hold the value of β sin θ rapidly. This behavior confirms the fact that the derivative control is able to track the gradient of an error function. The benefit of using PD control is then obviously straightforward: forcing the system to satisfy the constraint ω = β sin θ leads into a gradient-descent decline of the error function, i.e., ϕ ˙ = β | sin θ | 2 . Similarly, the integral part of actions F i = k i u i rapidly approaches the opposite of the biased term F b after a short time of initial transient. This result indicates the advantages of integral control in dynamically rejecting the residual terms, rather than only compensating for the effect caused by steady-state errors.
Figure 5 provides the evolution of Lyapunov function along time. As its value decreases to zero, the values of error function ϕ and v ˜ (or equivalently v ) approach zero. In other words, the states of system ( θ , ω ) are driven to the stable equilibrium point ( 0 , 0 ) , while the effects of biases F b are exactly attenuated by the integral action F i . The simulation results have verified the effectiveness of the proposed geometric design of PID control algorithm, i.e., achieving (at least locally) robust and exponential stabilization of an inverted pendulum system. The requirement of feed-forward control is relaxed, as an integral term is incorporated to deal with the influence of residual terms.

5.2. Discussion of Limitations

There are two significant limitations to the analytical and simulating results in the present paper. First, although the exponential stability was proved in convergence analysis and was verified in simulations, its convergent speed is limited by β = k p / k d , which is reduced to an infinitely small value when k d is enlarged sufficiently. Overcoming this limitation requires a new framework of analysis, which might suggest a completely different set of control parameters. Second, the cart–pole system consists of two one-dimensional sub-systems of cart and pole. Restricting our attention to this single-dimensional case simplifies both the convergence analysis and simulation experiment. It is worth future interest to extend this result to more general settings for interconnected systems evolving on nonlinear spaces of multiple dimensions, e.g., for an inverted spherical pendulum whose configuration space involves a two-dimensional manifold [20] and for pendubots with multiple linkages on the pendulum [21,22].

6. Conclusions

This paper proposes a geometric PID controller for robust and exponential stabilization of a cart–pole system. The controlled dynamics are deduced by following an analytic framework of Lagrangian mechanics, in which the interconnections are clearly presented. Next, we formulate the residual term as a biased term depending on both angle and angular velocity. A geometric PID control strategy is provided to stabilize the system’s state to a desired equilibrium point despite the influence of biases. In the proposed controller algorithm, the proportional part of actions is defined as a negative proportion of the gradient of an error function, while the integral part is justified as an integration of proportional-derivative commands along time. A Lyapunov metric is constructively established by performing two stages of coordinate change, and local exponential stability is proved for the closed system. Conditions for parameter tuning are obtained by ensuring the exponential decline of the suggested Lyapunov candidate. Our next interest in future research is to accelerate the convergence speed and to consider more complicated cases of multiple dimensions.

Author Contributions

Conceptualization, Z.Z., M.F. (Miaoxu Fang) and M.F. (Minrui Fei); methodology, Z.Z. and J.L.; formal analysis, Z.Z. and M.F. (Miaoxu Fang); writing—original draft preparation, Z.Z. and M.F. (Miaoxu Fang); software, M.F. (Miaoxu Fang) and Z.Z.; supervision, M.F. (Minrui Fei) and J.L.; funding acquisition, Z.Z. and J.L. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded in part by the Scientific Research Foundation of Zhejiang University of Science and Technology (F701101K06), in part by the Science Foundation for Young Scholars of Zhejiang University of Science and Technology (2023QN046), and in part by “Pioneer” and “Leading Goose” R&D Program of Zhejiang (2022C04012).

Data Availability Statement

No new data were created or analyzed in this study. Data sharing is not applicable to this article.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Chung, C.C.; Hauser, J. Nonlinear control of a swinging pendulum. Automatica 1995, 31, 851–862. [Google Scholar] [CrossRef]
  2. Åström, K.J.; Aracil, J.; Gordillo, F. A family of smooth controllers for swinging up a pendulum. Automatica 2008, 44, 1841–1848. [Google Scholar] [CrossRef]
  3. Åström, K.J.; Furuta, K. Swinging up a pendulum by energy control. Automatica 2000, 36, 287–295. [Google Scholar] [CrossRef]
  4. Ortega, R.; Spong, M.W.; Gomez-Estern, F.; Blankenstein, G. Stabilization of a class of underactuated mechanical systems via interconnection and damping assignment. IEEE Trans. Autom. Control 2002, 47, 1218–1233. [Google Scholar] [CrossRef]
  5. Siuka, A.; Schöberl, M. Applications of energy based control methods for the inverted pendulum on a cart. Robot. Auton. Syst. 2009, 57, 1012–1017. [Google Scholar] [CrossRef]
  6. Bloch, A.M.; Leonard, N.E.; Marsden, J.E. Controlled Lagrangians and the stabilization of mechanical systems. I. The first matching theorem. IEEE Trans. Autom. Control 2000, 45, 2253–2270. [Google Scholar] [CrossRef]
  7. Bloch, A.M.; Chang, D.E.; Leonard, N.E.; Marsden, J.E. Controlled Lagrangians and the stabilization of mechanical systems. II. Potential shaping. IEEE Trans. Autom. Control 2001, 46, 1556–1571. [Google Scholar] [CrossRef]
  8. Mills, A.; Wills, A.; Ninness, B. Nonlinear model predictive control of an inverted pendulum. In Proceedings of the 2009 American Control Conference (ACC), St. Louis, MO, USA, 10–12 June 2009. [Google Scholar]
  9. Nagendra, S.; Podila, N.; Ugarakhod, R.; George, K. Comparison of reinforcement learning algorithms applied to the cart-pole problem. In Proceedings of the 2017 International Conference on Advances in Computing, Communications and Informatics (ICACCI), Manipal, India, 13–16 September 2017. [Google Scholar]
  10. Surriani, A.; Wahyunggoro, O.; Cahyadi, A.I. Reinforcement Learning for Cart Pole Inverted Pendulum System. In Proceedings of the 2021 IEEE Industrial Electronics and Applications Conference (IEACon), Penang, Malaysia, 22–23 November 2021. [Google Scholar]
  11. Qin, Y.; Zhang, W.; Shi, J.; Liu, J. Improve PID controller through reinforcement learning. In Proceedings of the 2018 IEEE CSAA Guidance, Navigation and Control Conference (CGNCC), Xiamen, China, 10–12 August 2018. [Google Scholar]
  12. Puriel Gil, G.; Yu, W.; Sossa, H. Reinforcement Learning Compensation based PD Control for a Double Inverted Pendulum. IEEE Lat. Am. Trans. 2019, 17, 323–329. [Google Scholar] [CrossRef]
  13. Bullo, F.; Murray, R.M. Tracking for fully actuated mechanical systems: A geometric framework. Automatica 1999, 35, 17–34. [Google Scholar] [CrossRef]
  14. Lee, T.; Leok, M.; McClamroch, N.H. Geometric tracking control of a quadrotor uav on se (3). In Proceedings of the 49th IEEE Conference on Decision and Control (CDC), Atlanta, GA, USA, 15–17 December 2010. [Google Scholar]
  15. Zhang, Z.; Sarlette, A.; Ling, Z. Integral control on Lie groups. Syst. Control Lett. 2015, 80, 9–15. [Google Scholar] [CrossRef]
  16. Maithripala, D.S.; Berg, J.M. An intrinsic PID controller for mechanical systems on lie groups. Automatica 2015, 54, 189–200. [Google Scholar] [CrossRef]
  17. Zhang, Z.; Ling, Z.; Sarlette, A. Modified integral control globally counters symmetry-breaking biases. Symmetry 2019, 11, 639. [Google Scholar] [CrossRef]
  18. Eslamiat, H.; Wang, N.; Hamrah, R.; Sanyal, A.K. Geometric integral attitude control on SO(3). Electronics 2022, 11, 2821. [Google Scholar] [CrossRef]
  19. Khalil, H.K. Nonlinear Systems, 3rd ed.; Prentice Hall: Hoboken, NJ, USA, 2002. [Google Scholar]
  20. Madhushani, T.W.U.; Maithripala, D.S.; Wijayakulasooriya, J.V.; Berg, J.M. Semi-globally exponential trajectory tracking for a class of spherical robots. Automatica 2017, 85, 327–338. [Google Scholar] [CrossRef]
  21. Fantoni, I.; Lozano, R.; Spong, M.W. Energy based control of the Pendubot. IEEE Trans. Autom. Control 2000, 45, 725–729. [Google Scholar] [CrossRef]
  22. Bondada, A.; Nair, V.G. Dynamics of multiple pendulum system under a translating and tilting pivot. Arch. Appl. Mech. 2023, 93, 3699–3740. [Google Scholar] [CrossRef]
Figure 1. Model of a cart–pole system.
Figure 1. Model of a cart–pole system.
Symmetry 16 00094 g001
Figure 2. Diagram of a geometric PID-controlled cart–pole system.
Figure 2. Diagram of a geometric PID-controlled cart–pole system.
Symmetry 16 00094 g002
Figure 3. Evolution the angle θ , the angular velocity ω , and the variable η ( θ ) over time.
Figure 3. Evolution the angle θ , the angular velocity ω , and the variable η ( θ ) over time.
Symmetry 16 00094 g003
Figure 4. Evolution of the control inputs F p , F d , F i and the bias F b over time.
Figure 4. Evolution of the control inputs F p , F d , F i and the bias F b over time.
Symmetry 16 00094 g004
Figure 5. Evolution of the Lyapunov function V over time.
Figure 5. Evolution of the Lyapunov function V over time.
Symmetry 16 00094 g005
Table 1. Parameter setting of simulated cart–pole system.
Table 1. Parameter setting of simulated cart–pole system.
NotationMeaningUnitValue
Mmass of cartkg1
mmass of ballkg0.1
llength of robm1
ggravity of the earthm/s29.8
k p weight of F p 80
k d weight of F d 40
k i weight of F i 4
β k p / k d 2
γ k i / k d 0.1
α weight of ϕ in V10
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Zhang, Z.; Fang, M.; Fei, M.; Li, J. Robust and Exponential Stabilization of a Cart–Pendulum System via Geometric PID Control. Symmetry 2024, 16, 94. https://doi.org/10.3390/sym16010094

AMA Style

Zhang Z, Fang M, Fei M, Li J. Robust and Exponential Stabilization of a Cart–Pendulum System via Geometric PID Control. Symmetry. 2024; 16(1):94. https://doi.org/10.3390/sym16010094

Chicago/Turabian Style

Zhang, Zhifei, Miaoxu Fang, Minrui Fei, and Jinrong Li. 2024. "Robust and Exponential Stabilization of a Cart–Pendulum System via Geometric PID Control" Symmetry 16, no. 1: 94. https://doi.org/10.3390/sym16010094

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop