# Implementation of a Controller to Eliminate the Limit Cycle in the Inverted Pendulum on a Cart

Authors: Mayra Antonio-Cruz; Victor Manuel Hernández-Guzmán; Ramón Silva-Ortigoza; Gilberto Silva-Ortigoza
Journal: Complexity
 (2019)

---

## Abstract

A frequency response-based linear controller is implemented to regulate the inverted pendulum on a cart at the inverted position. The objective is to improve the performance of the control system by eliminating the limit cycle generated by the dead-zone, induced by static friction, at the actuator of the mechanism. This control strategy has been recently introduced and applied by the authors to eliminate the limit cycle in the Furuta pendulum and the pendubot systems. Hence, the main aim of the present paper is to study the applicability of the control strategy to eliminate the limit cycle in the inverted pendulum on a cart. The successful results that are obtained in experiments corroborate that the approach introduced by the authors to eliminate the limit cycle in the Furuta pendulum and pendubot is also valid for the inverted pendulum on a cart.


---

## Body

## 1. Introduction

Friction is a phenomenon that can cause nonlinear behavior in mechanical systems involving motion [1]. Such a nonlinear behavior refers, in particular, to a dead-zone [2] which degrades performance of the overall system by generating position error, limit cycle, and even instability [3]. These problems, separately, have been important subjects of study. As a matter of fact, compensation of friction in mechanical systems has been carried out to achieve a better control of position [4–8]. Limit cycles generated by the static and Coulomb friction have been treated in [1, 9–14] and the stability analysis of systems with friction has been introduced in [15–17]. On the other hand, underactuated mechanical systems, and in particular inverted pendulums, have attracted the attention of several researchers because they are an excellent benchmark to study position control, limit cycles, and system stability [18]. Motivated by this scenario and by [19, 20], this paper deals with the elimination of limit cycles generated by a friction-induced dead-zone nonlinearity when regulating the inverted pendulum on a cart.Different authors have reported important results on limit cycles in the regulation of inverted pendulums which, in general, can be divided into three categories:(a) generation of stable limit cycles,(b) reduction of limit cycles, and(c) elimination of limit cycles.Regarding(a), Verduzco [21] presented a method for nonlinear systems that have k zero eigenvalues when they are linearized. Such a method contemplates the existence of a curve of Hopf bifurcation points and a change of both coordinates and input control. The pendubot was used to illustrate the method. Also, for the pendubot, Freidovich et al. [22] proposed a feedback control strategy based on motion planning via virtual holonomic constraints. Furthermore, Freidovich et al. [23] developed a control for the Furuta pendulum, which was integrated by a shaping energy control, a passivity-based control, and an auxiliary feedback action. Andary et al. [24] introduced a control based on partial nonlinear feedback linearization and dynamic control. Aguilar et al. [25] used partial feedback linearization with a two-relay controller, which was tuned with the classic tool root locus. The two latter works are for the inertia wheel pendulum.For(b), Medrano-Cerda [26] considered a scheme based on velocity-sign compensation in the inverted pendulum on a cart. Also, Vasudevan et al. [27] compensated friction via a passivity-based observer for the wheeled inverted pendulum. Eom and Chwa [28] compensated friction, system uncertainties, and an external disturbance through a nonlinear observer for the pendubot.With regard to(c), Hernández-Guzmán et al. [19] exploited the differential flatness property of the Furuta pendulum to propose a linear state feedback controller which can be designed to regulate the system and to eliminate limit cycles. To achieve this, an educational, experimental, and intuitive procedure based on the time response approach, i.e., root locus, was introduced. As an improvement, Antonio-Cruz et al. [20] presented a modified version of the control in [19]. The design of such a modified control was based on frequency response, instead of time response as in [19], which entailed the obtention of precise formulas that facilitates the limit cycle elimination. A comparison of [19, 20] showed that [20] has better performance when dealing with the limit cycle elimination. On the other hand, some studies that consider the backlash nonlinearity in the Furuta pendulum and cart-pendulum system [29, 30] have been reported. Other papers dealing with performance improvement of inverted pendulums have been reported [31–34]. Finally, papers related to dead-zone compensation for nonlinear systems and suppression of limit cycles in servomechanism are [35–39].Having undertaken the literature review, it was found that the papers dealing with reduction of friction-induced limit cycles use compensation techniques that have the following disadvantages: (i) most compensation terms are complex and require the numerical values of the frictional parameters [27] and (ii) undercompensation leads to steady-state error and overcompensation may induce limit cycles [9, 40]. Although an important effort has been done in [26] to reduce the limit cycle in the inverted pendulum on a cart, to the authors’ knowledge, the elimination of the limit cycle in the inverted pendulum on a cart has not been achieved until now. On the other hand, only two previous papers [19, 20] have achieved limit cycle elimination without using compensation techniques but just by employing a simple linear controller. In both papers the controller was proposed by using a differential flatness representation of the system and the describing function method was employed to study the existence of limit cycles. In [19] the controller was designed via the time response approach (root locus) and in [20] via the frequency response approach (Bode diagrams). Since the root locus is not intrinsically related to the describing function method, the corresponding design procedure presented in [19] is based on intuitive ideas because precise formulas were not obtained. According to [20], this renders the repetition of the result when using a different Furuta pendulum difficult. Hence, [20] presented a simple and precise procedure to eliminate limit cycles caused by the friction-induced dead-zone nonlinearity. In that direction, the controller and the design procedure for limit cycle elimination introduced in [20], for the Furuta pendulum and pendubot systems, are applied to the inverted pendulum on a cart in the present paper with the aim of investigating the possibility to eliminate the limit cycle in this underactuated mechanism.It is recalled that the advantage of the controller proposed in [20] with regard to compensation techniques is that the model or the characterization of the dead-zone is not required, whereas the advantage with regard to [19] is that the combination of the describing function method and frequency response allows providing precise formulas that render the design of the linear controller and, in consequence, the experimental elimination of limit cycles easier.The rest of the paper is organized as follows. Section2 presents the differential flatness model of the linear approximation of the inverted pendulum on a cart, as well as a description of the real prototype used in experiments. Section 3 presents the linear controller to regulate the inverted pendulum on a cart and the procedure to design it. The procedure to eliminate the dead-zone nonlinearity-induced limit cycles in the system is briefly described in Section 4. Lastly, Section 5 gives the conclusions.


## 2. Inverted Pendulum on a Cart

This section presents the differential flatness model of the inverted pendulum on a cart, as well as the description of the prototype used in the experimental procedure to eliminate limit cycle.


### 2.1. Flatness Model

The inverted pendulum on a cart shown in Figure1 consists of a cart that has linear motion on a limited rail, in the horizontal plane, and in one dimension. This motion is due to a force applied by a transmission system actuated by a motor. On the cart, a pendulum is attached which can move angularly in the vertical plane which is parallel to the cart movement. The parameters and variables of this system appear in Figure 1 and are denoted as follows. M and ξ are the mass and the translational position of the cart, respectively, whereas m, 2
l, and ϕ are the mass, length, and angular position of the pendulum, respectively. Lastly, f is the force applied to the cart and g is acceleration of gravity.Figure 1
Inverted pendulum on a cart.The approximate linear model of the inverted pendulum on a cart,(1)
x
˙
δ
=
A
x
δ
+
B
u
δwith(2)
x
δ
=
x
δ
1
x
δ
2
x
δ
3
x
δ
4
=
ξ
-
ξ
¯
ξ
˙
-
ξ
˙
¯
ϕ
-
ϕ
¯
ϕ
˙
-
ϕ
˙
¯
,
u
δ
=
f
-
f
¯
,
(3)
A
=
0
1
0
0
0
0
-
m
g
M
0
0
0
0
1
0
0
M
+
m
g
l
M
0
,
B
=
0
1
M
0
-
1
l
M
,around the operation point(4)
ξ
¯
ξ
˙
¯
ϕ
¯
ϕ
˙
¯
T
=
0
0
0
0
T
,
f
¯
=
0
,is controllable [41] and, in consequence, is differentially flat [42], Ch. 2. Therefore, the flat output F, associated with (1), is defined by [42], Ch. 2:(5)
F
=
λ
0
0
0
1
C
0
-
1
x
δ
,where λ is an arbitrary nonzero constant, conveniently chosen as λ
=
-
g
/
l
M, and C
0
=
B
A
B
A
2
B
A
3
B is the controllability matrix of system (1). After calculations F and its first four time derivatives are obtained:(6)
F
=
x
δ
1
+
l
x
δ
3
,
(7)
F
˙
=
x
δ
2
+
l
x
δ
4
,
(8)
F
¨
=
g
x
δ
3
,
(9)
F
3
=
g
x
δ
4
,
(10)
F
4
=
M
+
m
g
l
M
F
¨
-
g
l
M
u
δ
.This last expression represents the differential flat model that describes the dynamics (1) and since f
¯
=
0, it can be written as (11)
f
=
M
+
m
F
¨
-
l
M
g
F
4
.


### 2.2. Description of the Prototype

The prototype of the inverted pendulum on a cart used in the experimental procedure to eliminate limit cycle is shown in Figure2. In general, this prototype has four subsystems: (i) Mechanical structure, (ii) actuator and sensors, (iii) power stage, and (iv) data acquisition and processing, which are described below.(i)
Mechanical structure refers to the mechanical elements that compose the mechanism, that is, a cart mounted on a limited rail, the transmission system (toothed belt and two pulleys), and the pendulum.
(ii)
Actuator and sensors consist in a Pittman 14204S006 DC motor and two incremental encoders used to measure the angular positions of the pulleys and pendulum. Since the DC motor is connected to one pulley, the angular position of this pulley is used to compute the linear position of the cart. The encoder used to measure the angular position of the pulley has 500 PPR and is included in the chassis of the motor. The encoder used to measure the angular position of the pendulum has 1024 PPR and is fabricated by Baumer in the model ITD01B14.
(iii)
Power stage is integrated by an HF100W-SF-24 switched power supply and an AZ12A8DDC servo-drive manufactured by Advanced Motion Controls. This latter possesses an inner current-loop driven by a PI controller, which ensures that the current of the DC motor, i
m, reaches the current imposed by the control signal, i, that is, i
m
→
i. This means that a desired torque signal can be implemented through the dynamic relation of torque-current: τ
=
k
m
i
≈
k
m
i
m, where τ and k
m are the torque and torque constant of the DC motor, respectively. Since the input of the inverted pendulum on a cart is the force f, the desired torque is converted to the desired force by using τ
=
f
r, with r being the radius of the pulley connected to the DC motor.
(iv)
Data acquisition and processing corresponds to a DS1104 board from dSPACE, Matlab-Simulink, and ControlDesk. Through this hardware and software the variables of the system are read, which allows implementation of the controller. It is important to say that, in all experiments, the velocities ξ
˙ and ϕ
˙ were estimated via a derivative block of Simulink and the sampling period was set to 1
m
s.Figure 2
Prototype of the inverted pendulum on a cart.The mechanical parameters of the inverted pendulum on a cart are presented below, which were found by measuring the length of the pendulum and weighing the cart and pendulum.2
l
=
0.200
×
10
-
3
m,
m
=
0.03
4 kg,
M
=
0.385 kg.


## 2.1. Flatness Model

The inverted pendulum on a cart shown in Figure1 consists of a cart that has linear motion on a limited rail, in the horizontal plane, and in one dimension. This motion is due to a force applied by a transmission system actuated by a motor. On the cart, a pendulum is attached which can move angularly in the vertical plane which is parallel to the cart movement. The parameters and variables of this system appear in Figure 1 and are denoted as follows. M and ξ are the mass and the translational position of the cart, respectively, whereas m, 2
l, and ϕ are the mass, length, and angular position of the pendulum, respectively. Lastly, f is the force applied to the cart and g is acceleration of gravity.Figure 1
Inverted pendulum on a cart.The approximate linear model of the inverted pendulum on a cart,(1)
x
˙
δ
=
A
x
δ
+
B
u
δwith(2)
x
δ
=
x
δ
1
x
δ
2
x
δ
3
x
δ
4
=
ξ
-
ξ
¯
ξ
˙
-
ξ
˙
¯
ϕ
-
ϕ
¯
ϕ
˙
-
ϕ
˙
¯
,
u
δ
=
f
-
f
¯
,
(3)
A
=
0
1
0
0
0
0
-
m
g
M
0
0
0
0
1
0
0
M
+
m
g
l
M
0
,
B
=
0
1
M
0
-
1
l
M
,around the operation point(4)
ξ
¯
ξ
˙
¯
ϕ
¯
ϕ
˙
¯
T
=
0
0
0
0
T
,
f
¯
=
0
,is controllable [41] and, in consequence, is differentially flat [42], Ch. 2. Therefore, the flat output F, associated with (1), is defined by [42], Ch. 2:(5)
F
=
λ
0
0
0
1
C
0
-
1
x
δ
,where λ is an arbitrary nonzero constant, conveniently chosen as λ
=
-
g
/
l
M, and C
0
=
B
A
B
A
2
B
A
3
B is the controllability matrix of system (1). After calculations F and its first four time derivatives are obtained:(6)
F
=
x
δ
1
+
l
x
δ
3
,
(7)
F
˙
=
x
δ
2
+
l
x
δ
4
,
(8)
F
¨
=
g
x
δ
3
,
(9)
F
3
=
g
x
δ
4
,
(10)
F
4
=
M
+
m
g
l
M
F
¨
-
g
l
M
u
δ
.This last expression represents the differential flat model that describes the dynamics (1) and since f
¯
=
0, it can be written as (11)
f
=
M
+
m
F
¨
-
l
M
g
F
4
.


## 2.2. Description of the Prototype

The prototype of the inverted pendulum on a cart used in the experimental procedure to eliminate limit cycle is shown in Figure2. In general, this prototype has four subsystems: (i) Mechanical structure, (ii) actuator and sensors, (iii) power stage, and (iv) data acquisition and processing, which are described below.(i)
Mechanical structure refers to the mechanical elements that compose the mechanism, that is, a cart mounted on a limited rail, the transmission system (toothed belt and two pulleys), and the pendulum.
(ii)
Actuator and sensors consist in a Pittman 14204S006 DC motor and two incremental encoders used to measure the angular positions of the pulleys and pendulum. Since the DC motor is connected to one pulley, the angular position of this pulley is used to compute the linear position of the cart. The encoder used to measure the angular position of the pulley has 500 PPR and is included in the chassis of the motor. The encoder used to measure the angular position of the pendulum has 1024 PPR and is fabricated by Baumer in the model ITD01B14.
(iii)
Power stage is integrated by an HF100W-SF-24 switched power supply and an AZ12A8DDC servo-drive manufactured by Advanced Motion Controls. This latter possesses an inner current-loop driven by a PI controller, which ensures that the current of the DC motor, i
m, reaches the current imposed by the control signal, i, that is, i
m
→
i. This means that a desired torque signal can be implemented through the dynamic relation of torque-current: τ
=
k
m
i
≈
k
m
i
m, where τ and k
m are the torque and torque constant of the DC motor, respectively. Since the input of the inverted pendulum on a cart is the force f, the desired torque is converted to the desired force by using τ
=
f
r, with r being the radius of the pulley connected to the DC motor.
(iv)
Data acquisition and processing corresponds to a DS1104 board from dSPACE, Matlab-Simulink, and ControlDesk. Through this hardware and software the variables of the system are read, which allows implementation of the controller. It is important to say that, in all experiments, the velocities ξ
˙ and ϕ
˙ were estimated via a derivative block of Simulink and the sampling period was set to 1
m
s.Figure 2
Prototype of the inverted pendulum on a cart.The mechanical parameters of the inverted pendulum on a cart are presented below, which were found by measuring the length of the pendulum and weighing the cart and pendulum.2
l
=
0.200
×
10
-
3
m,
m
=
0.03
4 kg,
M
=
0.385 kg.


## 3. Linear Controller

This section presents a linear state feedback controller for position regulation in the inverted pendulum on a cart, which is derived by considering flat model (11). Also, the analysis of the existence of limit cycles is given and the procedure to design the controller is described.


### 3.1. Controller Proposal

On the one hand, after applying the Laplace transform to (11), the following transfer function is obtained:(12)
F
s
f
s
=
-
g
/
l
M
s
2
s
2
-
g
M
+
m
/
l
M
,where F
(
s
) and f
(
s
) stand for Laplace transforms of the flat output and the applied force, respectively.On the other hand, the dead-zone nonlinearity has the characteristic function shown in Figure3, whose parameters are described in [19]. An approximate frequency response description of a dead-zone nonlinearity is the following describing function [43], Ch. 5, where it is assumed that the nonlinearity input e is a sinusoidal function of time with amplitude A and frequency ω:(13)
N
A
=
2
k
π
π
2
-
arcsin
⁡
δ
A
-
δ
A
1
-
δ
A
2
.This “transfer function,” N
(
A
), is real, positive, and frequency independent but dependent on the input amplitude A. Its maximal value is N
(
A
)
=
k
>
0, which is reached as A
→
∞, and its minimal value tends to zero if A
→
δ.Figure 3
Representation of a dead-zone nonlinearity.Since transfer function (12) has similar characteristics to that of the Furuta pendulum obtained in [19, 20], hence, the control scheme proposed in [20] to control the Furuta pendulum and the pendubot, that is,(14)
f
s
=
k
v
F
s
s
3
+
β
F
s
s
2
+
k
d
F
s
s
+
k
p
F
s
,where k
v, β, k
d, and k
p are the control gains, is also used to control (12). The block diagram of the plant (12) in closed loop with controller (14) and considering the dead-zone nonlinearity is shown in Figure 4. There, positive feedback is used due to -
g
/
(
l
M
)
<
0.Figure 4
Closed-loop system considering a dead-zone nonlinearity.Lastly, when considering the linear state feedback controller(15)
u
δ
=
f
=
-
k
1
x
δ
1
-
k
2
x
δ
2
-
k
3
x
δ
3
-
k
4
x
δ
4
,where k
1, k
2, k
3, and k
4 are the gains of the controller, u
δ and x
δ stand as defined previously in (2), and using (6)-(10), the following equivalence between (14) and (15) is found:(16)
k
1
=
-
k
p
,
k
2
=
-
k
d
,
k
3
=
-
β
g
+
l
k
p
,
k
4
=
-
k
v
g
+
l
k
d
.


### 3.2. Analysis of Limit Cycle Existence

The analysis of limit cycle existence in the inverted pendulum on a cart is carried out as in [19, 20] for the Furuta pendulum and pendubot, that is, by using thedescribing function method. This is because the approximation of the dead-zone nonlinearity is based on the describing function.The describing function method [43], Ch. 5, suggests representing the system in the standard form shown in Figure 5. Also, such a method requires that the linear time invariant system G
(
s
) behaves as a low-pass filter. Thus, the standard form is obtained applying block algebra on Figure 4. In this case, the nonlinearity input is e
=
f
(
s
) while the linear time invariant system G
(
s
) is(17)
G
s
=
G
1
s
G
2
s
,where(18)
G
1
s
=
g
/
l
M
s
2
s
2
-
g
M
+
m
/
l
M
,
(19)
G
2
s
=
k
v
s
3
+
β
s
2
+
k
d
s
+
k
pare the plant and controller, respectively, and g
/
(
l
M
)
>
0. Furthermore, the magnitude of (17) behaves as a low-pass filter, since G
(
s
) has four poles and only three zeros. Then, a limit cycle may exist if [43], Ch. 5,(20)
G
j
ω
=
-
1
N
A
,which implies that the polar plot of G
(
j
ω
) intersects the negative real axis in the open interval (
-
∞
,
-
1
/
k
). This is because -
1
/
N
(
A
) is real and negative. Hence, the oscillation frequency, ω
σ, and the amplitude of the oscillation, A, are found as the values of ω, in G
(
j
ω
), and A, in -
1
/
N
(
A
), at the point σ where their plots intersect [43], Ch. 5. The graphic representation of this is shown in Figure 6.Figure 5
Equivalent representation of block diagram in Figure4.Figure 6
Polar plot ofG
(
j
ω
) and -
1
/
N
(
A
).


### 3.3. Controller Design

The design of the controller gainsk
v, β, k
d, and k
p is achieved as described in [20] for the Furuta pendulum case. In this section, particularities of the controller design for the inverted pendulum on a cart case are introduced. Since the following transfer function of the two internal loops is obtained:(21)
-
g
/
l
M
s
2
+
g
/
l
M
k
v
s
+
g
/
l
M
β
-
g
M
+
m
/
l
M
,when the dead-zone is omitted from Figure 4, then k
v and β must satisfy the following conditions:(22)
k
v
>
0
∧
g
l
M
β
>
M
+
m
g
l
Mto ensure that all coefficients of the characteristic polynomial of the transfer function in (21) are positive.Now, note that when replacings by j
ω in (18), the phase of G
1
(
j
ω
) is -
36
0
∘ for all ω
≥
0 because g
/
(
l
M
)
>
0 and each one of the factors 1
/
-
ω
2
<
0 and 1
/
-
ω
2
-
g
M
+
m
/
l
M
<
0 introduces a phase of -
18
0
∘. Hence, with the intention of forcing the polar plot of G
j
ω to intersect the negative real axis, i.e., to render phase of G
j
ω equal to -
18
0
∘ at some ω
>
0, the frequency analysis performed for the controller G
2
(
j
ω
) in [20] is applied. Such an analysis is described below to facilitate the reference.The phase ofG
2
j
ω must be as follows:(23)
∠
G
2
j
ω
=
arctan
⁡
k
d
ω
-
k
v
ω
3
k
p
-
β
ω
2
=
+
18
0
∘
.This implies that the following conditions have to be satisfied:(24)
k
d
ω
-
k
v
ω
3
=
0
.
(25)
k
p
-
β
ω
2
<
0
.From (24) the following relation to find k
d is obtained:(26)
k
d
=
k
v
ω
2
.Lastly, in order to compute k
p, s is replaced by j
ω in controller (19) to obtain the following: (27)
G
2
j
ω
=
k
v
j
ω
3
+
β
j
ω
2
+
k
d
j
ω
+
k
p
,
=
j
k
d
ω
-
k
v
ω
3
+
k
p
-
β
ω
2
,whose magnitude is determined by(28)
G
2
j
ω
=
k
d
ω
-
k
v
ω
3
2
+
k
p
-
β
ω
2
2
.Hence, when solving (28) for k
p, the formula below is obtained:(29)
k
p
=
±
G
2
j
ω
2
-
k
d
ω
-
k
v
ω
3
2
+
β
ω
2
.Therefore, the sign in this latter expression has to be chosen so that (25) is accomplished.Finally, to propose the frequencyω
=
ω
σ at which it is desired that the polar plot of G
j
ω intersects the negative real axis it is necessary to compute k
p and k
d. Likewise, the magnitude G
2
j
ω
σ that must be introduced by the controller has to be known, for which a desired magnitude of G
j
ω when ω
=
ω
σ has to be proposed. Then, from(30)
G
j
ω
σ
=
G
1
j
ω
σ
·
G
2
j
ω
σ
,the magnitude G
2
j
ω
σ can be computed by(31)
G
2
j
ω
σ
=
G
j
ω
σ
G
1
j
ω
σ
.Since G
1
j
ω
σ can be obtained from the Bode diagrams of G
1
j
ω, then Bode diagrams are a suitable tool to design the controller gains k
v, β, k
d, and k
p.Until here, the procedure and formulas to compute the controller gains have been described. The procedure to choose such gains in order to eliminate limit cycle due to dead-zone nonlinearity is presented in the next section.


## 3.1. Controller Proposal

On the one hand, after applying the Laplace transform to (11), the following transfer function is obtained:(12)
F
s
f
s
=
-
g
/
l
M
s
2
s
2
-
g
M
+
m
/
l
M
,where F
(
s
) and f
(
s
) stand for Laplace transforms of the flat output and the applied force, respectively.On the other hand, the dead-zone nonlinearity has the characteristic function shown in Figure3, whose parameters are described in [19]. An approximate frequency response description of a dead-zone nonlinearity is the following describing function [43], Ch. 5, where it is assumed that the nonlinearity input e is a sinusoidal function of time with amplitude A and frequency ω:(13)
N
A
=
2
k
π
π
2
-
arcsin
⁡
δ
A
-
δ
A
1
-
δ
A
2
.This “transfer function,” N
(
A
), is real, positive, and frequency independent but dependent on the input amplitude A. Its maximal value is N
(
A
)
=
k
>
0, which is reached as A
→
∞, and its minimal value tends to zero if A
→
δ.Figure 3
Representation of a dead-zone nonlinearity.Since transfer function (12) has similar characteristics to that of the Furuta pendulum obtained in [19, 20], hence, the control scheme proposed in [20] to control the Furuta pendulum and the pendubot, that is,(14)
f
s
=
k
v
F
s
s
3
+
β
F
s
s
2
+
k
d
F
s
s
+
k
p
F
s
,where k
v, β, k
d, and k
p are the control gains, is also used to control (12). The block diagram of the plant (12) in closed loop with controller (14) and considering the dead-zone nonlinearity is shown in Figure 4. There, positive feedback is used due to -
g
/
(
l
M
)
<
0.Figure 4
Closed-loop system considering a dead-zone nonlinearity.Lastly, when considering the linear state feedback controller(15)
u
δ
=
f
=
-
k
1
x
δ
1
-
k
2
x
δ
2
-
k
3
x
δ
3
-
k
4
x
δ
4
,where k
1, k
2, k
3, and k
4 are the gains of the controller, u
δ and x
δ stand as defined previously in (2), and using (6)-(10), the following equivalence between (14) and (15) is found:(16)
k
1
=
-
k
p
,
k
2
=
-
k
d
,
k
3
=
-
β
g
+
l
k
p
,
k
4
=
-
k
v
g
+
l
k
d
.


## 3.2. Analysis of Limit Cycle Existence

The analysis of limit cycle existence in the inverted pendulum on a cart is carried out as in [19, 20] for the Furuta pendulum and pendubot, that is, by using thedescribing function method. This is because the approximation of the dead-zone nonlinearity is based on the describing function.The describing function method [43], Ch. 5, suggests representing the system in the standard form shown in Figure 5. Also, such a method requires that the linear time invariant system G
(
s
) behaves as a low-pass filter. Thus, the standard form is obtained applying block algebra on Figure 4. In this case, the nonlinearity input is e
=
f
(
s
) while the linear time invariant system G
(
s
) is(17)
G
s
=
G
1
s
G
2
s
,where(18)
G
1
s
=
g
/
l
M
s
2
s
2
-
g
M
+
m
/
l
M
,
(19)
G
2
s
=
k
v
s
3
+
β
s
2
+
k
d
s
+
k
pare the plant and controller, respectively, and g
/
(
l
M
)
>
0. Furthermore, the magnitude of (17) behaves as a low-pass filter, since G
(
s
) has four poles and only three zeros. Then, a limit cycle may exist if [43], Ch. 5,(20)
G
j
ω
=
-
1
N
A
,which implies that the polar plot of G
(
j
ω
) intersects the negative real axis in the open interval (
-
∞
,
-
1
/
k
). This is because -
1
/
N
(
A
) is real and negative. Hence, the oscillation frequency, ω
σ, and the amplitude of the oscillation, A, are found as the values of ω, in G
(
j
ω
), and A, in -
1
/
N
(
A
), at the point σ where their plots intersect [43], Ch. 5. The graphic representation of this is shown in Figure 6.Figure 5
Equivalent representation of block diagram in Figure4.Figure 6
Polar plot ofG
(
j
ω
) and -
1
/
N
(
A
).


## 3.3. Controller Design

The design of the controller gainsk
v, β, k
d, and k
p is achieved as described in [20] for the Furuta pendulum case. In this section, particularities of the controller design for the inverted pendulum on a cart case are introduced. Since the following transfer function of the two internal loops is obtained:(21)
-
g
/
l
M
s
2
+
g
/
l
M
k
v
s
+
g
/
l
M
β
-
g
M
+
m
/
l
M
,when the dead-zone is omitted from Figure 4, then k
v and β must satisfy the following conditions:(22)
k
v
>
0
∧
g
l
M
β
>
M
+
m
g
l
Mto ensure that all coefficients of the characteristic polynomial of the transfer function in (21) are positive.Now, note that when replacings by j
ω in (18), the phase of G
1
(
j
ω
) is -
36
0
∘ for all ω
≥
0 because g
/
(
l
M
)
>
0 and each one of the factors 1
/
-
ω
2
<
0 and 1
/
-
ω
2
-
g
M
+
m
/
l
M
<
0 introduces a phase of -
18
0
∘. Hence, with the intention of forcing the polar plot of G
j
ω to intersect the negative real axis, i.e., to render phase of G
j
ω equal to -
18
0
∘ at some ω
>
0, the frequency analysis performed for the controller G
2
(
j
ω
) in [20] is applied. Such an analysis is described below to facilitate the reference.The phase ofG
2
j
ω must be as follows:(23)
∠
G
2
j
ω
=
arctan
⁡
k
d
ω
-
k
v
ω
3
k
p
-
β
ω
2
=
+
18
0
∘
.This implies that the following conditions have to be satisfied:(24)
k
d
ω
-
k
v
ω
3
=
0
.
(25)
k
p
-
β
ω
2
<
0
.From (24) the following relation to find k
d is obtained:(26)
k
d
=
k
v
ω
2
.Lastly, in order to compute k
p, s is replaced by j
ω in controller (19) to obtain the following: (27)
G
2
j
ω
=
k
v
j
ω
3
+
β
j
ω
2
+
k
d
j
ω
+
k
p
,
=
j
k
d
ω
-
k
v
ω
3
+
k
p
-
β
ω
2
,whose magnitude is determined by(28)
G
2
j
ω
=
k
d
ω
-
k
v
ω
3
2
+
k
p
-
β
ω
2
2
.Hence, when solving (28) for k
p, the formula below is obtained:(29)
k
p
=
±
G
2
j
ω
2
-
k
d
ω
-
k
v
ω
3
2
+
β
ω
2
.Therefore, the sign in this latter expression has to be chosen so that (25) is accomplished.Finally, to propose the frequencyω
=
ω
σ at which it is desired that the polar plot of G
j
ω intersects the negative real axis it is necessary to compute k
p and k
d. Likewise, the magnitude G
2
j
ω
σ that must be introduced by the controller has to be known, for which a desired magnitude of G
j
ω when ω
=
ω
σ has to be proposed. Then, from(30)
G
j
ω
σ
=
G
1
j
ω
σ
·
G
2
j
ω
σ
,the magnitude G
2
j
ω
σ can be computed by(31)
G
2
j
ω
σ
=
G
j
ω
σ
G
1
j
ω
σ
.Since G
1
j
ω
σ can be obtained from the Bode diagrams of G
1
j
ω, then Bode diagrams are a suitable tool to design the controller gains k
v, β, k
d, and k
p.Until here, the procedure and formulas to compute the controller gains have been described. The procedure to choose such gains in order to eliminate limit cycle due to dead-zone nonlinearity is presented in the next section.


## 4. Experimental Procedure for Limit Cycle Elimination

In this section, the experimental procedure introduced in [20] is applied to eliminate limit cycles in the inverted pendulum on a cart. In [20], the procedure to eliminate limit cycle was executed departing from knowing the numerical value δ of the dead-zone nonlinearity of the Furuta pendulum and pendubot. Also, in that paper, it was mentioned that the procedure can be applied without requiring the knowledge of such a parameter. Thus, the procedure in [20] is applied here for the inverted pendulum on a cart without requiring the knowledge of δ. Additional steps that help to better address the procedure, which do not modify the generality of the procedure introduced in [20], are indicated. Also, particularities of the application of the procedure in the inverted pendulum on a cart are indicated in each step.Before starting the application of the procedure for limit cycle elimination in the inverted pendulum on a cart, the conjecture established in [20] is recalled below.Conjecture. According to the dead-zone nonlinearity characteristic function depicted in Figure 3, if |
e
|
≤
δ then a zero value appears at the plant input c
=
0; i.e., the force applied by the motor to the inverted pendulum on a cart is zero and the mechanism might rest at the operation point defined in (4). Since the threshold δ is uncertain because friction is uncertain, it is natural to wonder whether it is possible to render A
<
δ in experiments, despite (13) being only valid for A
≥
δ. Recall that A
≥
|
e
| because A is the amplitude of e. Then, the mechanism might rest at the operation point if A is chosen to be small enough; i.e., the limit cycle might vanish under these conditions.It is also recalled that, according to Figure6, with the purpose of reducing the amplitude of the limit cycle, the polar plot of G
j
ω must intersect the negative real axis at a point σ located farther to the left of the point -
1
/
k
=
-
1. This latter is computed by considering k
=
1, which is a value usually set for a conventional DC motor. This suggests that G
j
ω
σ
≫
1 and this must occur at an oscillation frequency ω
=
ω
σ.The procedure to eliminate the limit cycle induced by the dead-zone nonlinearity, when regulating position in the inverted pendulum on a cart, was experimentally applied as follows:(1)
Bode diagrams of the plantG
1
j
ω were plotted as shown in Figure 7. For this, (18) was used.
(2)
The frequencyω
σ
=
6
r
a
d
/
s and the magnitude G
j
ω
σ
=
22 were initially proposed. The value of ω
σ was proposed since this renders f
σ
=
ω
σ
/
(
2
π
)
≈
0.9549
H
z, which is a reasonable frequency in Hertz for the experimental prototype that was built. Using the value of ω
σ and Bode diagrams plotted in Figure 7, the following magnitude in dB was measured:(32)
G
1
j
ω
σ
d
B
=
-
26.1
d
B
,
which was converted into(33)
G
1
j
ω
σ
=
1
0
G
1
j
ω
σ
d
B
/
20
=
0.0495
.
The latter numerical value was used in (31) to compute G
2
j
ω
σ, finding the following:(34)
G
2
j
ω
σ
=
4
44.1570
=
444.0406
.
The numerical values ofω
σ and G
2
j
ω
σ shall be used to compute k
p.
(3)
k
v
=
0.94 and β
=
12.5 were selected satisfying (22), that is, rendering all coefficients of the characteristic polynomial of (21) positive. Also, the proposed k
v and β achieve that the sign of the square root in (29) is negative, which is implied from (25), and that k
p
>
0. According to Figure 4, this latter is necessary to ensure closed-loop stability. Note that, in order to avoid negative values for k
p, it is clear from (29) and (25) that larger values of either β or ω
σ are required. From the second degree characteristic polynomial in (21), it is concluded that a larger β is possible if roots of this characteristic polynomial are farther from the origin. This is accomplished since k
v
=
0.94 and β
=
12.5 assign real poles of (21) at -
225.8894 and -
13.6275. In the case that the selection of β does not achieve k
p
>
0 and the designer prefers to increase ω
σ, instead of increasing β, the designer must go back to step (2).
(4)
With the numerical values in steps (2) and (3), (29), and (26), k
d and k
p were computed as follows: (35)
k
d
=
33.84
,
k
p
=
5.9594
.
For (29), a “−” sign was chosen because this renders k
p
-
β
ω
σ
2
=
-
444.0406
<
0. Notice that this ensures that k
p is real and positive, and hence closed-loop stability is ensured. If this were not the case, the designer would have to go back to step (3).
(5)
Through the Bode diagrams of the compensated systemG
s shown in Figure 8, it was corroborated that the open-loop system had the desired phase, -
18
0
∘, at the desired frequency and magnitude, ω
σ
=
6
r
a
d
/
s and G
j
ω
σ
=
22
≈
26.9
d
B, respectively. The corresponding polar plot of G
j
ω is depicted in Figure 9.
(6)
Oncek
v, β, k
d, and k
p were known, the relations in (16) were used to find the following numerical values for the gains of linear state feedback controller (15):(36)
k
1
=
-
5.9594
,
k
2
=
-
33.84
,
k
3
=
-
123.2209
,
k
4
=
-
12.6054
.
Using these gainsk
1, k
2, k
3, and k
4, linear state feedback controller (15) was experimentally implemented to regulate the prototype of the inverted pendulum on a cart depicted in Figure 2. Since (15) only stabilizes the prototype at x
δ
=
0 when operating close to (4), the pendulum was manually taken to near such an operation point. Hence, the following switching condition was used:(37)
f
=
15
for
ϕ
-
ϕ
¯
2
+
ϕ
˙
2
≤
0.3
0
for
ϕ
-
ϕ
¯
2
+
ϕ
˙
2
>
0.3
.
The experimental results obtained when using (37) with (36) are shown in Figure 10, where a limit cycle is observed. Since there is noise in the control signal f, the amplitude and frequency of the limit cycle are difficult to measure there. But as e
=
f
(
s
) is linearly related to F
(
s
) through (14), the analysis in Section III about limit cycle is also valid for F. Hence, the amplitude and the frequency of F were measured to observe the behavior of the limit cycle. The measured amplitude of the limit cycle is denoted as A
F and was computed by summing the maximal and the minimum absolute values of F, whereas the measured frequency of the limit cycle is denoted as ω
σ
F and was computed using the following:(38)
ω
σ
F
=
2
π
n
t
f
-
t
i
,
wheren is the number of oscillations that occurred in the time interval between t
i and t
f. Thus, A
F
=
0.4323
m and ω
σ
F
=
0.2922
r
a
d
/
s were obtained.
(7)
As a limit cycle appeared in the previous step,G
j
ω
σ was increased and we went back to step (3). When G
j
ω
σ
=
38 was reached, k
v
=
1.66 and β
=
21.5 were selected. Then, k
d
=
59.7600 and k
p
=
7.0208 were computed. Thus, the following gains for controller (15) were computed:(39)
k
1
=
-
7.0208
,
k
2
=
-
59.7600
,
k
3
=
-
211.6171
,
k
4
=
-
22.2606
.
When implementing (37) with (39), the results depicted in Figure 11 were obtained. There, it can be observed that the limit cycle was partially eliminated and that A
F
=
0.1371
m when it appears.
Since in the previous experiment the limit cycle was partially eliminated,G
j
ω
σ was incremented so that G
j
ω
σ
=
40. In this case, k
v
=
1.75 and β
=
22.5 were chosen, k
d
=
63 and k
p
=
2.6535 were computed, and the following gains of (15) were found: (40)
k
1
=
-
2.6535
,
k
2
=
-
63
,
k
3
=
-
220.9903
,
k
4
=
-
23.4675
.
Although it may be thought that this time the limit cycle would disappear, after executing the experiment of controller (37) with (40), considerable vibration in the prototype was observed and limit cycle reappeared instead of being eliminated. See experimental results in Figure 12, where A
F
=
0.2901
m and ω
σ
F
=
0.2365
r
a
d
/
s were measured. It is important to highlight that although limit cycle was not eliminated so far, it was actually reduced since A
F
=
0.2901
m
<
A
F
=
0.4323
m. This is in accordance with the conjecture. Also, note that noise in the control signal f is more noticeable because G
j
ω
σ was increased (see Figures 10(d), 11(d), and 12(d)).
(8)
Since in the previous step limit cycle was not eliminated and considerable vibration was observed in the prototype (see noise in Figure12(d)), ω
σ was increased to 8
r
a
d
/
s, G
j
ω
σ
=
22 was set again, and we went back to step (3). As limit cycle still remains, but with a reduced amplitude of oscillation, G
j
ω
σ was increased again. As an example of reduction of limit cycle, with regard to the experimental results in Figure 12, the experimental results when G
j
ω
σ
=
34 are depicted in Figure 13. There, it is remarkable that limit cycle was partially eliminated and little oscillations appeared with A
F
=
0.0786
m, which is less than the amplitude of limit cycle associated with Figures 11 and 12.
To obtain the results in Figure13, the following gains of controller (15) were used:(41)
k
1
=
-
4.8351
,
k
2
=
-
97.28
,
k
3
=
-
226.1135
,
k
4
=
-
24.6392
.
Such gains were found departing from selectingk
v
=
1.52 and β
=
23 and computing k
d
=
97.28 and k
p
=
4.8351.
(9)
Finally, limit cycle disappeared whenG
j
ω
σ
=
36 and ω
σ
=
8
r
a
d
/
s. For that, k
v
=
1.61 and β
=
24.5 were chosen, k
d
=
103.04 and k
p
=
14.5313 were computed, and the following gains of controller (15) were found: (42)
k
1
=
-
14.5313
,
k
2
=
-
103.04
,
k
3
=
-
241.7981
,
k
4
=
-
26.0981
.
The obtained experimental results are shown in Figure14.Figure 7
Bode diagrams ofG
1
s.Figure 8
Bode diagrams ofG
s.Figure 9
Polar plot ofG
j
ω.Figure 10
Experimental results when using (36).
(a)
(b)
(c)
(d)Figure 11
Experimental results whenG
j
ω
σ
=
38 and ω
σ
=
6
r
a
d
/
s.
(a)
(b)
(c)
(d)Figure 12
Experimental results whenG
j
ω
σ
=
40 and ω
σ
=
6
r
a
d
/
s.
(a)
(b)
(c)
(d)Figure 13
Experimental results whenG
j
ω
σ
=
34 and ω
σ
=
8
r
a
d
/
s.
(a)
(b)
(c)
(d)Figure 14
Experimental results whenG
j
ω
σ
=
36 and ω
σ
=
8
r
a
d
/
s.
(a)
(b)
(c)
(d)From the experimental results, it was observed that for eachω
σ there is a maximum value of G
j
ω
σ allowed by the prototype of the inverted pendulum on a cart to perform experiments. This is because noise in the control signal was increased as G
j
ω
σ was increased. The effect of this noise was reflected in the prototype as noticeable vibration when G
j
ω
σ reached some high value. Thus, lower frequencies allow larger magnitudes of G
j
ω and at larger frequencies the magnitude of G
j
ω must be decreased to avoid noticeable vibration in the closed-loop system and to approach to the limit cycle elimination. Another observation is that the experimental results corroborate the conjecture, i.e., that limit cycle is eliminated as selecting controller gains such that the polar plot of G
j
ω crosses the negative real axis at a point located farther to the left. Furthermore, an additional observation from the experiments is that limit cycle elimination is accomplished as frequency ω
σ, where the polar plot of G
j
ω crosses the negative real axis, is chosen larger. Note that these same observations were made for the Furuta pendulum in [20].On the other hand, some differences were found when comparing frequencyω
σ
F of the experiments with the desired one. These differences are mainly due to the following:(i)
According to [43], Ch. 5, since the describing function method has an approximate nature, some inaccuracies are found in results:(a) the predicted amplitude and frequency might not be accurate,(b) a predicted limit cycle might actually not exist, or(c) an existing limit cycle is not predicted, the first kind of inaccuracy, i.e.,(a), being quite common.
(ii)
Dead-zone “transfer function” (13) is an idealization of the nonlinear phenomenon that is actually presented in the practical plant. Hence, not all the dynamics of the dead-zone nonlinearity is concentrated in (13).Until here it has been shown that the controller and the applied procedure allow elimination of the limit cycle in the inverted pendulum on a cart, but it was previously commented thatδ is uncertain because friction is uncertain. This latter implies that knowing the exact value of δ is difficult, which acts as a disturbance. For this reason compensation techniques had to be used to face limit cycle issue online. Thus, it becomes interesting to know the behavior of the linear controller, here implemented for the inverted pendulum on a cart, when the limit cycle in the system changes due to the conditions of operation. Figure 15 presents the results when gains (42) are implemented for the system under study without previously performing an experiment, that is, without “warming up” the actuator. Note that these conditions of operation are different from those when the results of Figure 14 were obtained because then several experiments were consecutively performed before eliminating the limit cycle; that is, the actuator of the system was “warmed up.” In Figure 15 it can be observed that in different occasions a limit cycle reappears, which is natural since static friction is greater when there is no previous movement (δ is different). But it is important to remark from Figure 15 is that limit cycle is eliminated after reappearing. Thus, it can be concluded that the simple linear controller here implemented is feasible and robust enough to eliminate limit cycle.Figure 15
Experimental results when gains (42) are implemented without previously performing an experiment in the prototype.
(a)
(b)
(c)
(d)


## 5. Conclusion

A linear controller based on the frequency response approach and an experimental procedure, introduced recently by the authors for the Furuta pendulum and the pendubot, has been successfully applied to eliminate the limit cycle in the inverted pendulum on a cart. Therefore, from the experimental results, the following can be concluded.(i) The inverted pendulum on a cart has similar behavior to that of the Furuta pendulum under the effect of linear state feedback controller (15), when it is designed through frequency response-based controller (14).(ii) The applicability of the approach introduced in [20] to eliminate limit cycle is confirmed for another inverted pendulum, corroborating that the approach can eliminate limit cycles in different inverted pendulums.(iii) Robustness of the controller is verified when conditions of operation change.



---

*Source: 8271584-2019-02-04.xml*