You are on page 1of 25

Available online at www.sciencedirect.

com

Journal of the Franklin Institute 354 (2017) 7241–7265


www.elsevier.com/locate/jfranklin

Critically damped stabilization of inverted-pendulum


systems using continuous-time cascade linear model
predictive control
L. Messikh∗, El.H. Guechi, M.L. Benloucif
Université du 20 Août 1955, Faculté de Technologie, Département Génie Electrique, Laboratoire d’Automatique de
Skikda (LAS), Route El-Hadaeik, Skikda, Algeria
Received 27 June 2016; received in revised form 31 May 2017; accepted 28 August 2017
Available online 1 September 2017

Abstract
In this paper, a cascade continuous-time linear MPC controller with 7 well defined parameters is
proposed to stabilize the inverted pendulum system around the desired equilibrium points. The proposed
controller scheme is composed of two MPC controllers in cascade. These controllers are tuned so as to
obtain a doubly critically damped behavior for the inner and outer loops. Explicit generalized expressions
of the MPC controller parameters in relation to the inverted pendulum characteristics and the chosen
horizon time parameter with the robustness analysis of the controlled system are given to facilitate the
controller design for a wide class of inverted pendulum systems. Simulation results show that the MPC
controller is compared favorably to the well known parallel two-PID control scheme.
© 2017 Published by Elsevier Ltd on behalf of The Franklin Institute.

1. Introduction

The inverted pendulum is one of the most important studied systems in academic and
industrial researches. This system can be used to approximate many complex models such
as rockets during liftoff, bipedal walking, cranes, and robots. There are several versions for
inverted pendulum systems, among them the most familiar ones are the rotational single-arm
pendulum [1], the cart inverted pendulum [2], and the double inverted pendulum [3]. Some less

∗ Corresponding author.
E-mail address: l.messikh@univ-skikda.dz (L. Messikh).

http://dx.doi.org/10.1016/j.jfranklin.2017.08.039
0016-0032/© 2017 Published by Elsevier Ltd on behalf of The Franklin Institute.
7242 L. Messikh et al. / Journal of the Franklin Institute 354 (2017) 7241–7265

common versions are the rotational two-link pendulum [4] and the triple inverted pendulum
[5]. The inverted pendulum is nonlinear, unstable, non-minimum phase and underactuated
system. Because of such characteristics, the presence of physical constraints on inputs and state
variables, and the control requirements, it provides many challenging problems to standard
and modern techniques both in linear and nonlinear control theories.
Since 1950s, the inverted pendulum benchmark, especially the cart version, was used for
designing, testing, evaluating and comparing different classical and modern control techniques.
The principal control tasks considered for the cart pendulum can be divided into three aspects.
The first aspect is the swing-up of the inverted pendulum from the stable position and its
stabilization around the unstable position [6-8]. The second aspect is the stabilization of the
pendulum around the instable position while driving the cart at its desired position [9,10]. The
third aspect is tracking control of the inverted pendulum [11-13]. Many control techniques
are developed for the inverted pendulum system in the literature, including fuzzy logic and
neural network control [14,15], PID and fractional order PID control [16,17], Lyapunov-based
control [18,19], sliding mode control [10-13], and predictive control [20-22]. A comparative
study of control approaches verified on the inverted pendulum benchmark leads to the follow-
ing statements [23]: using fuzzy logic and neural network with simple structures are highly
recommended due to their simple design and low computational complexity, but the lack of
stability conditions is often observed when such approaches are applied. PID controllers can
give satisfactory results in performances but should be frequently tuned using sophisticated
techniques. The most rigorous and perhaps more complicated control approaches applied to
the inverted pendulum benchmark are the so-called Lyapunov-based methods which provide
global stability conditions of the overall system. When using sliding mode control approach
stability conditions are well proven and robustness performances are often guaranteed. Pre-
dictive control techniques can give very satisfactory results by solving optimization problems
but this control approach suffers in many cases of a lack of stability condition proofs.
This study focuses on the second aspect of the inverted pendulum control problem and its
aim is to design an efficient linear model predictive controller to resolve this problem. Model
predictive control (MPC), also termed receding horizon control, is one of the most used control
method in academic and industrial applications due to its simple and intuitive concepts, to
its ability to handle multivariable systems, and explicitly take into account equipment and
state constraints. Recent survey and review of MPC methods can be found in Refs. [24,25].
The main characteristic of this method is the explicit use of a single system model and
system measurements for predicting the future behavior of the controlled variables over a
specified future time horizon. This information is then used by the controller to obtain the
optimal control input, according to a predefined optimization criterion. A primary concern in
the design of a model predictive controller for a nonlinear system is 1) how to adequately
determine a mathematical model for the above system because the performance of the resulting
controller depends directly on the accuracy of this model, and 2) how to specify an adequate
cost function that represents the desired behavior of the system.
In the context of inverted pendulum control, a lot of control methods rely on the use
of linear approximation of its nonlinear system model to design the system controller. Such
linear models simplify the controller design and the system analysis but the obtained results
should be carefully interpreted in order to avoid unacceptable closed-loop system performance
(such as instability and poor closed-loop system behavior) due to the approximation in the
process of linearization. The choice of the cost function is also of most importance and
is application dependent. The frequently used basis cost function is an additive (quadratic)
L. Messikh et al. / Journal of the Franklin Institute 354 (2017) 7241–7265 7243

Nomenclature

x1 = θ pendulum angle
x2 = θ˙ pendulum angle velocity
x3 cart position
x4 cart velocity
xˆi (t ) predicted state at time t
m pendulum mass
M cart mass
l pendulum length
g gravity acceleration
u, u0 control variables
u0n normalized control variable
ai , bi linearized model parameters
Ai , Bi , Ei , Gi model prediction parameters
K1i , K2i controller gains
c, d, e normalized controller gains
c0 , d0 , e0 normalized controller gains with critically damped constraint
ε positive design parameter
x10 (t ), x20 (t ) constrained state variables
S(s) sensitivity function
C(s) complementary sensitivity function
P noise power
ωn0 , ωn1 natural frequencies
ωu stability limit parameter
ρ1 , ρ2 , μ weight factors
h1 , h2 horizon times
J, J1 , J2 cost functions
x1d desirable angle position
x3d desirable cart position α = l ε −1 β = gε −1
σ standard deviation of noise

weighted measure of errors between the references and the predicted variables with some
constraints on controlled variables and/or input control.
In this paper, a cascade linear model predictive controller with only seven parameters
is introduced to stabilize accurately and quickly the inverted pendulum system around the
desired equilibrium points. The proposed controller is composed of an inner linear controller
with three adjusted parameters and an outer linear controller with four fixed parameters.
Based on an approximate linear model of the inverted pendulum nonlinear model, the inner
controller is designed exclusively to stabilize the pendulum angle of this system with no
significant overshoot. The outer linear controller is however designed to adjust the inner
controller input in such a way to stabilize the cart position. Explicit expressions of the MPC
controller parameters in relation with the inverted pendulum parameters and the horizon time
of the MPC method are given to simplify the proposed controller design. The simulation
results presented in this paper show the efficiency of this adopted tuning method.
7244 L. Messikh et al. / Journal of the Franklin Institute 354 (2017) 7241–7265

Fig. 1. The inverted pendulum system.

The paper is organized as follows. In Section 2, the task of inverted pendulum control is
defined. In Section 3, the controller design procedure is presented. The robustness analysis
of the inner MPC controller is described in Section 4. Section 5 studies the performance
of our controller via a set of simulations and compares it to a parallel two-PID controller.
Section 6 concludes this paper.

2. Inverted pendulum models and problem statement

The single inverted-pendulum system consists of a cart and a pendulum hinged to the top
of the cart as shown in Fig. 1. The cart can move left or right on a one-dimensional bounded
track, whereas the pendulum can swing in the vertical plane determined by the track. Let us
assume that the pendulum rod, with a length l, is mass-less, and the hinge is frictionless.
With this assumption, the whole pendulum mass is concentrated in the center of gravity
located at the center of the pendulum ball. The cart mass and the ball point mass at the upper
end of the inverted pendulum are denoted as M and m, respectively. There is an externally
x-directed force on the cart, u(t ), and a gravity force acts on the point mass at all times.
The coordinate system considered is shown in Fig. 1, wherex(t ) represents the cart position,
and θ (t ) indicates the pendulum angle referenced to the vertically upward direction. Setting
x1 = θ , x2 = θ˙, x3 = x, x4 = x˙, and using a force balance on the system in x-direction and
a torque balance on the system, the dynamics of the cart inverted pendulum is described by
the following equations [9]:

x˙1 = x2
ul −1 cos x1 − (M + m )gl −1 sin x1 + mx22 sin x1 cos x1
x˙2 = −
M + m − mcos2 x1
x˙3 = x4
u + mlx22 sin x1 − mg sin x1 cos x1
x˙4 = (1)
M + m − mcos2 x1

The considered system has one independent control actuator and two degree of freedom
to be controlled. It is thus a single input multi output (SIMO) underactuated system.
L. Messikh et al. / Journal of the Franklin Institute 354 (2017) 7241–7265 7245

2.1. Linear prediction models

Under the following assumptions:

−π /4 < θ ≤ π /4 ; sin θ ≈ θ ; cos θ ≈ ε; gl −1  x22 (2)

where 0.25π ≤ ε ≤ 1 is a constant parameter, the nonlinear dynamical model (1) can be
approximated by the following linear models:
x˙1 = x2
(3)
x˙2 = a1 x1 + b1 u

x˙3 = x4
(4)
x˙4 = −a2 x1 − b2 u

with
(M + m )gl −1 l −1 ε
a1 = + ; b 1 = − (5)
M + m − mε 2 M + m − mε 2
mgε 1
a2 = + ; b2 = − (5)
M + m − mε 2 M + m − mε 2
Using the linearized models (3) and (4), we define the following pendulum and cart pre-
diction models:
xˆ1 (t + h1 ) = A1 x1 (t ) + B1 x2 (t ) + E1 u
(6)
xˆ2 (t + h1 ) = A2 x1 (t ) + B2 x2 (t ) + E2 u

xˆ3 (t + h2 ) = x3 (t ) + h2 x4 (t ) + G3 x1d
(7)
xˆ4 (t + h2 ) = x4 (t ) + G4 x1d

If u(t ) = u is constant on the interval [t, t + h1 ], then by solving (3) we get (6) with the
following pendulum prediction model parameters:
   
A1 = cosh a11/2 h1 ; A2 = a11/2 sinh a11/2 h1
   
B1 = a1−1/2 sinh a11/2 h1 ; B2 = cosh a11/2 h1 (8)
   
−1 1/2 −1/2 1/2
E1 = 2a1 b1 sinh a1 h1 /2 ;
2
E2 = a1 b1 sinh a1 h1

Now, by combining (3) and (4), we get:

ẍ3 = −α ẍ1 + βx1


b2 a1 b2 − a2 b1
α= = l ε −1 ; β = = g ε −1 (9)
b1 b1
If the pendulum angle is assumed to be constant, x1 (t ) = x1d , on the interval [t, t + h2 ],
then by solving (9) we get (7) with the following cart prediction model parameters:
1 2
G3 = βh ; G4 = β h2 (10)
2 2
7246 L. Messikh et al. / Journal of the Franklin Institute 354 (2017) 7241–7265

Fig. 2. Architecture of the proposed inverted pendulum-cart MPC control system.

2.2. MPC control problem formulation

In this paper we are concerned with the stabilization of both pendulum angle and cart
position. More precisely, our aim is to stabilize the inverted pendulum such that the position
of the cart on the track is controlled quickly and accurately so that the pendulum is always
erected in its inverted position during each movement. To achieve this objective, under the
assumptions of partial state measurements (only the positions x1 and x3 are measured) and
known inverted-pendulum system parameters, we propose to design an adequate two-linear
MPC controller, where the output,x1d , of the outer MPC controller is the input of the inner
MPC controller (see Fig. 2a).
We may formulate the problem of the MPC controller design as follows: given the predic-
tion models (6) and (7) together with the following two-horizon time quadratic cost function:
   
J (t, h1 , h2 ) = (1 − μ) e21 (t + h1 ) + ρ1 xˆ22 (t + h1 ) + μ e23 (t + h2 ) + ρ2 x42 (t + h2 )
e1 (t + h ) = x1d − xˆ1 (t + h1 ) (11)
e3 (t + h2 ) = x3d − xˆ3 (t + h2 )
where μ ∈ [0, 1], ρ1 , and ρ2 are positive weight factors, e1 (t + h1 ) is the predicted pendulum
angle error, and e3 (t + h2 ) is the predicted cart position errors. First, design an inner MPC
L. Messikh et al. / Journal of the Franklin Institute 354 (2017) 7241–7265 7247

controller by finding the optimal value of u, namely u0 , that minimize (11) subject to μ = 0
and (6); then, find the optimal value of ρ1 , namely ρ10 , such that the inner closed-loop system
behaves like a critically damped second order system. In the second step, design an outer
MPC controller by finding the optimal value of x1d , namely x1d0 , that minimize (11) subject
to μ = 1 and (7); then, find the optimal value of ρ2 , namely ρ20 , such that the overall closed-
loop system behaves like a critically damped second order system. This two-stage problem
formulation is justified in view of the architecture of the cascade MPC controller.
There are three problems that must be solved. The first one is how to evaluate the unknown
MPC gain vectors, K1 and K2 , by using the linearized model parameters, (a1 , a2 , b1 , b2 , ε ),
the weight factor vector (ρ1 , ρ2 ), and the horizon time vector (h1 , h2 ). The second problem
is how to generate the control input if only the positions, x1 and x3 , are measured. The last
problem is how the critically damped constraint helps in reducing the input control effort.
These problems are addressed in the next sections.

3. Architecture and controller design

As shown in Fig. 2a, the proposed MPC controller architecture is formed of two cascaded
MPC controllers, the inner MPC controller K1 and the outer MPC controller K2 . The inner
controller is used to control the pendulum angle while the outer controller is used to control
the cart position. The design of the inner MPC controller is performed as follows: from the
angle prediction model (6), the control input is obtained by minimization of a quadratic cost
function; then, a critically damped constraint is used to simplify the design and enhance the
closed-loop system performance. Similar steps are used to design the outer MPC controller.

3.1. Inner MPC controller design

3.1.1. Derivation of the inner controller


Given the reference pendulum angle x1d and a desired null angle velocity, the proposed
unconstrained one-horizon time quadratic cost function for stabilizing the pendulum angle is
defined by:
J1 (t + h1 ) = e21 (t + h1 ) + ρ1 × e22 (t + h1 ) (12)
where e1 (t + h1 ) = x1d − xˆ1 (t + h1 ) is the predicted pendulum angle error, e2 (t + h1 ) = 0 −
xˆ2 (t + h1 ) is the predicted angle pendulum velocity error. The horizon time,h1 , and the weight
factor,ρ1 , are two positive design parameters to be determined later. Then, substituting (6) into
(12) and setting the gradient of J1 (t + h1 ) with respect to u to zero yields:
uˆ0 (t ) = −K11 × x1 (t ) − K12 × x2 (t ) + K13 × x1d (13)
with the parameters (K11 , K12 , K13 )of the inner MPC controller given below:
A1 E1 + ρ1 A2 E2
K11 =
E12 + ρ1 E22
B1 E1 + ρ1 B2 E2
K12 =
E12 + ρ1 E22
E1
K13 = 2 (14)
E1 + ρ1 E22
7248 L. Messikh et al. / Journal of the Franklin Institute 354 (2017) 7241–7265

Now, by substituting (8) into (14) we get:


     
2 cosh a11/2 h1 sinh2 a11/2 h1 /2 + ρ1 a1 sinh2 a11/2 h1
K11 = a1 b−1
1    
4sinh4 a11/2 h1 /2 + ρ1 a1 sinh2 a11/2 h1
       
2 sinh a11/2 h1 sinh2 a11/2 h1 /2 + ρ1 a1 cosh a11/2 h1 sinh a11/2 h1
K12 = a11/2 b−1
1    
4sinh4 a11/2 h1 /2 + ρ1 a1 sinh2 a11/2 h1
 
2sinh2 a11/2 h1 /2
K13 = a1 b−1
1     (15)
4sinh4 a11/2 h1 /2 + ρ1 a1 sinh2 a11/2 h1
Using the following equalities
cosh (z ) = 1 + 2sinh2 (z/2 )
2 cosh (z ) sinh (z ) = sinh (2z ) (16)
4 sinh (z )sinh2 (z/2 ) = sinh (2z ) − 2 sinh (z )
in (15), we obtain:
K11 = a1 b−1
1 c ; K12 = a11/2 b−1
1 d ; K13 = a1 b−1
1 e (17)
with
 
2sinh2 a11/2 h1 /2
c = 1+    
4sinh4 a11/2 h1 /2 + ρ1 a1 sinh2 a11/2 h1
     
1/2 1/2 1/2
1 sinh 2a1 h1 − 2 sinh a1 h1 + ρ1 a1 sinh 2a1 h1
d=    
2 4sinh4 a11/2 h1 /2 + ρ1 a1 sinh2 a11/2 h1
 
2sinh2 a11/2 h1 /2
e = c−1=     (18)
4sinh4 a11/2 h1 /2 + ρ1 a1 sinh2 a11/2 h1
From (13), the inner MPC controller can be viewed as a classical linear feedback controller
plus a proportional feedforward controller, which allows controlling the transient response
and the steady state error of the closed-loop system, respectively. This controller can also
be viewed as a PD (i.e. Proportional Derivative) controller plus a proportional feedforward
controller since the MPC controller (13) can also be written as:
uˆ0 (t ) = KP × e1 (t ) + KV × e2 (t ) + KF × x1d
(19)
KP = K11 ; KV = K12 ; KF = K13 − K11
The presence of a PD controller in the closed-loop system of the inverted pendulum ensures
the stability of this robot in the regulation mode as indicated by some theoretical results [26],
but the controller parameters must be well tuned to ensure the desired performances.

3.1.2. Closed-loop critically damped constraint


The transfer function H1 (s) of the pendulum system is given by:
X1 (s ) b1
H1 (s ) = = 2 (20)
U (s ) s − a1
L. Messikh et al. / Journal of the Franklin Institute 354 (2017) 7241–7265 7249

Table 1
ρ10 a1 and d0 as a function of a11/2 h1 .

a11/2 h1 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
ρ10 a1 0.01 0.05 0.10 0.16 0.23 0.29 0.34 0.37 0.39 0.39
d0 11.7 5.93 4.03 3.10 2.57 2.22 1.99 1.82 1.70 1.61

In the design of the inner MPC controller it is required to develop a stable closed-loop pen-
dulum system with limited control signal energy, good tracking, good disturbance attenuation,
and good noise rejection. Fig. 2b shows the proposed bloc diagram of the inner MPC control.
Here we are only interested in designing an inner controller with the first two requirements.
The disturbance d and the external noise n are then assumed to be negligible until the study
of robustness in Section 4. By substituting (13) into (3) and setting K13 b1 = K11 b1 − a1 to
ensure a zero position error, we get the stable second order closed-loop pendulum system
(see Fig. 2b) as follows:

X1 (s ) ωn2
Gin (s ) = = 2
X1d (s ) s + 2ξ ωn × s + ωn2
ωn2 = K11 b1 − a1 = a1 × e
2ξ ωn = K12 b1 = a11/2 d (21)

where the DC gain of Gin (s) is unity, ωn is its undamped natural frequency and, ξ is its
damping ratio. The roots of the characteristic equation of Gin (s) determine its transient re-
sponse. The discriminant of this equation, = a1 d 2 − 4a1 (c − 1 ), may be positive, zero or
negative which will make the roots real an unequal, real and equal or complex. This gives
rise to the three different types of transient response which are the overdamping transient re-
sponse when > 0, the critical damping transient response when = 0, and the undamped
transient response when < 0.
In the design of the inner MPC controller, we adopt a closed-loop critically damped system,
where ξ = 1. From (21) one can see that the constraint ξ = 1 is equivalent to d 2 = 4e =
4(c − 1 ). Hereafter c0 , d0 , e0 , and ρ10 design respectively the values of c, d, e, and ρ1 when the
critically damped constraint is fulfilled. Therefore, we obtain e0 = d02 /4 and c0 = (d02 + 4 )/4.
Substituting these terms into (18) leads to the constrained inner controller gains:
 2 
K11 = a1 b−11 d0 + 4 /4 ; K12 = a11/2 b−1
1 d0 ; K13 = a1 b−1
1 d0 /4
2
(22)
Furthermore, numerical conducted analysis of d02 = 4e0 for the scaled horizon time range
0 < a11/2 h1 < 1, leads us to link ρ10 a1 and d0 to a11/2 h1 and to approximate them with the
following expressions:
 −1
d0 = 2a1−1/2 ωn0 ≈ 1.189 × a11/2 h1
  (23)
ρ10 a1 ≈ −1.019a11/2 h1 + 1.401 × a1 h12

Table 1 shows ρ10 a1 and d0 as a function of a11/2 h1 . It can be seen that ρ10 a1 increases
and d0 decreases with a11/2 h1 .
Now assuming zeros initial conditions, the step response of the critically damped sys-
tem,Gin (s), reaches its steady-state value in the minimum time without overshoot according
7250 L. Messikh et al. / Journal of the Franklin Institute 354 (2017) 7241–7265

to:

x10 (t ) = x1d 1 − (1 + ωn0t ) exp (−ωn0t ) , t ≥0
x20 (t ) = x1d a1−1/2 ωn0
2
t exp (−ωn0t )
1/2
ωn0 = 0.5a1 d0 (24)
where the constrained state variable x20 (t ) is the time-derivative of the constrained state
variable x10 (t ). From (23) and (24) it is obvious that the scaled horizon time a11/2 h1 , or
equivalently the normalized undamped natural frequency d0 , is the only tuning parameter
of the inner MPC controller. It is also obvious from (23) and (24) that the time response
decreases with a11/2 h1 . Therefore, to drive quickly the pendulum angle to its desired reference,
it is necessary to use low horizon time values, or equivalently high values for d0 .
In the derivation of the control law (13) to stabilize the pendulum at its desired angle x1d ,
there is no constraint included in the cost function (12) to reduce the input control effort.
Hereafter, we shall show how the closed-loop critically damped constraint would affect the
extreme values of the input control effort. Now, substituting the unconstrained inner controller
gains (17) and the unconstrained state variables,x1 (t ) and x2 (t ) in the input control effort
(13) with the constrained inner controller gains (22) and the constrained state variables (24),
respectively, and multiplying the resulting equation by −b1 a1−1 x1−1 d , we get the following
expression of the normalized input control effort:
u0n (t ) = −b1 a1−1 x1−1 u0 (t )

d
a11/2 d0 1 1  
= 1 − exp − t 1 + d02 + a11/2 d0 4 − d02 t (25)
2 4 8

The time-derivative of (25) is:




1 2 a11/2 d0   
u˙0n (t ) = d0 exp − t 4a11/2 d0 + a1 4 − d02 t (26)
16 2
Hence, the maximum value of (26) occurs at time:
4 d0
tmax = 1/2  2  (27)
a1 d0 − 4
There are then three types of transient responses for the normalized input control (25).
First, the overdamped transient response occurs when tmax < 0, i.e. d0 < 2, with two extreme
values defined by u0n,min = −d02 /4 and u0n,max = 1. A critically damped transient response
occurs when tmax = ∞, i.e. d0 = 2, with u0n,min = −1 and u0n,max = 1. In this case, u0n (t )
will reach its steady-state value in minimum time without overshoot according to:
 
z (t ) = 1 − 2 exp −a11/2t (28)

An underdamped transient response results when tmax > 0, i.e. d0 > 2. In this case, we
get:
d02
u0n,min = −
4
 2   
d0 2d02
u0n,max = 1+ − 1 exp − 2 (29)
4 d0 − 4
L. Messikh et al. / Journal of the Franklin Institute 354 (2017) 7241–7265 7251

Table 2
The extreme values of u0n (t ) as a function of d0 .

d0 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6


−zmin 0.25 0.56 1.00 1.56 2.25 3.06 4.00 5.06 6.25 7.56 9.00
+zmax 1.00 1.00 1.00 1.00 1.03 1.11 1.21 1.37 1.48 1.65 1.84

From the above discussion, one can notice the dependence of u0n,min and u0n,max upon d0 .
Table 2 summarizes these extreme values as a function of d0 . We can see that both normalized
efforts, −u0n,min and u0n,max , increase monotonically with d0 . Hence, the more speed is required
the more control effort is needed. Moreover, for d0 > 2, it appears that the normalized control
effort,−u0n,min , which occurs at the beginning of the pendulum regulation, is responsible of
the high control effort demand in comparison to the normalized overshoot control effort
u0n,max . Therefore, in such case, the closed-loop critically damped constraint produces less
aggressive normalized overshoot control efforts while ensuring the highest pendulum speed
response without overshoot. Finally, from (25), it can also be seen that the non-normalized
effort increases with the reference pendulum angle x1d .

3.2. Outer MPC controller design

3.2.1. Derivation of the outer controller


Given the reference cart position x3d and the desired null cart velocity, the second proposed
one-horizon time quadratic cost function for stabilizing the cart position is defined by:
J2 (t + h2 ) = e23 (t + h2 ) + ρ2 × e24 (t + h2 ) (30)
where e3 (t + h2 ) = x3d − xˆ3 (t + h2 ) is the predicted cart position error, and e4 (t + h2 ) = 0 −
xˆ4 (t + h2 ) is the predicted cart velocity error. The horizon time,h2 , and the weight factor,ρ2 ,
are two positive design parameters to be determined later. Then, substituting (7) into (30) and
setting the gradient of J2 (t + h2 ) with respect to x1d to zero yields:
x1d0 (t ) = −K21 × x3 (t ) − K22 × x4 (t ) + K23 × x3d (31)
where the parameters (K21 , K22 , K23 ) of the outer MPC controller are given by:
G3 2β −1
K21 = K23 = = 2
G23 + ρ2 G4
2 h2 + 4ρ2
h2 G3 + ρ2 G4 2h22 + 4ρ2 −1 −1
K22 = = β h2 (32)
G23 + ρ2 G24 h22 + 4ρ2

3.2.2. Closed-loop critically damped constraint


The inner MPC controller is intended to stabilize quickly the pendulum angle at a desired
reference and it is evidently insufficient to stabilize the cart position at a desired location
without the use of related cart movement information. More precisely, from (9) we get the
transfer function between x1 and x3 as follows:
X3 (s ) β − α × s2
G31 (s ) = = (33)
X1 (s ) s2
This transfer function is instable and the outer MPC controller is introduced here to make
the stabilization of the cart position via the control of the pendulum angle a possible task. In
7252 L. Messikh et al. / Journal of the Franklin Institute 354 (2017) 7241–7265

order to simplify the design of such controller, the transfer function (33) is a priori transformed
to a double integrator system by adding a constant K24 = α to it giving rise to the following
modified cart transfer function:
Y3 (s ) β + (K24 − α) × s2 β
H3 (s ) = = = 2 (34)
X1 (s ) s 2 s
Fig. 2c shows the proposed bloc diagram of the outer MPC control. Here, we are inter-
ested in designing a stable, accurate, and a relatively low-speed outer-loop controller. If the
disturbance d and the external noise n are assumed to be negligible, we obtain the transfer
function between x3d and y3 as follows:
Y3 (s ) K23
= −1
(35)
X3d (s ) −1
[Gin (s )H3 (s )] − β K23 K24 s2 + K22 s + K21
where
Y3 (s ) βωn0
2
= Gin (s )H3 (s ) = 2 (36)
X1d (s ) s (s + ωn0 )2
Now assuming that
K21 = K22 = K23 = K (37)
and combining (32) with (37), we obtain the following relations:
2β −1
K=
−h22 + 2h2
1  1
0 < ρ2 = − h22 − h2 <
2 8
0 < h2 < 1 (38)
Next, substituting (36) and (37) into (35), we get the following fourth-order system:
Y3 (s ) K
= −1
X3d (s ) [Gin (s )H3 (s )] − β −1 K K24 s2 + K s + K
K βωn02
= 4 (39)
s + 2ωn0 s3 + (1 − K K24 )ωn0 2 s2 + K βω 2 s + K βω 2
n0 n0

Note that the steady state gain of (39) is unity, which ensure a zero-steady state error for
a step input. Applying the Routh’s stability criterion on (39), we get the following stability
conditions:
0 < K < min (Ku1 , Ku2 )
ωn0
Ku1 =
ωn0 K24 + 0.5β
 −2

ωn0 − 2 1 + ωn0 /4
Ku2 = (40)
ωn0 K24
From (40), it can be seen that the ultimate gain Ku = min (Ku1 , Ku2 ) increases with ωn0
and decreases with K24 .
Unlike the situation of the inner MPC controller design, where it is easy to integrate
the critically damped constraint to the second-order system Gin (s), here the incorporation of
L. Messikh et al. / Journal of the Franklin Institute 354 (2017) 7241–7265 7253

Table 3
List of expressions and parameters needed in the MPC controller design.

ε g(m/s2 ) α(m) β(m/s2 ) ωn0 (rad/s) a1 (s−2 ) b1 (k g−1 m −1 ) ωu (rad/s)


(M+m )gl −1 −l −1 ε
π /4 9.81 l ε −1 gε −1 0.6h1−1 M+m−mε 2 M+m−mε 2
2.125 + 8.5 g−1 l

such constraint on the fourth-order system (39) is more difficult and therefore we resort to an
approximation method. By assuming ωn0 high enough, the pole dominant principle leads to the
reduced order approximation Gin (s)H3 (s) ≈ H3 (s), where the stable double mode s = −ωn0
is neglected. Therefore, (39) can be approximated by the following second-order system:
Y3 (s ) K
≈ −1 (41)
X3d (s ) β (1 − K K24 )s2 + K s + K
Now,K is tuned so as to obtain a critically damped behavior for the transfer function (41).
Therefore, we obtain:
K = K21 = K22 = K23 = 4
4K24 +β (42)
K24 = α
From (38), (41) and (42), the undamped natural frequency ωn1 of (41), ρ2 and h2 are
explicitly given by:
ωn1 = 2 rad/s
1
h2 = 1 − 2 − 8αβ −1
2
1  
ρ2 = αβ −1 + 2 − 8αβ −1 − 1 (43)
4
By substituting (42) into (40), the stability condition becomes:
2 < ωn0
   
2 × 1 + 4αβ −1 × 1 + ωn0
−2
/4 < ωn0 (44)
Since 2 < ωn0 , we obtain from (44) a sufficient condition of stability for the fourth-order
system (39) as follows:
ωu < ωn0
ωu = 2.125 + 8.5αβ −1 (45)
From (45) and Table 3, one can easily note that ωu is independent of ε.

3.3. MPC controller design procedure

In designing the continuous-time cascade MPC controller for models (3) and (4), which
are supposed to behave like the dynamical model (1) under the conditions (2), we have used
an exact prediction model for (3) Eqs. (6) and (8) and an approximate prediction model for
(4) Eqs. (7) and (10) together with the separate cost functions, (12) and (30), without additional
constraints. In this context, we have shown that under the critically damped constraint, the
continuous-time MPC controller gains can be expressed analytically with Eqs. (22) and (42).
A link between the horizon times,h1 and h2 , of the inner and outer MPC controllers, to
7254 L. Messikh et al. / Journal of the Franklin Institute 354 (2017) 7241–7265

the optimal weight factors, ρ10 and ρ20 , and the desired closed-loop system parameters, ωn0
and ωn1 , id established by Eqs. (23) and (43). A sufficient stability condition of the whole
system, expressed in term of ωn0 , is given by (45). For convenience, we recall in Table 3 all
expressions and parameters needed for the cascade MPC controller design. In the absence
of noise and disturbances, the proposed cascade MPC controller, depicted in Fig. 2b and c,
outputs a control signal of the form:

u (t ) = −K11 x1 (t ) − K12 x2 (t ) + K13 x1d (t )


x1d (t ) = −(K21 − K23 )K24 x1 (t ) − K22 K24 x2 (t )
−K21 x3 (t ) − K22 x4 (t ) + K23 x3d (46)

From (42) and (46), we get:


u0 (t ) = −N1 x1 (t ) − N2 x2 (t ) − N3 x3 (t ) − N4 x4 (t ) + N5 x3d (47)
where the gains Ni are given by:
N1 = K11
N2 = K12 + K × K13 × K24 (48)
N3 = N4 = N5 = K × K13
Notice that the last three gains are identical.
In order to design a cascade MPC controller with the proposed method, it is necessary to
choose the values of ε and h1 . In Section 2, we have assumed that the constant parameter ε lies
between π /4 and 1. We have found that, for a fixed ωn0 , the choice ε = π /4 instead of ε ≈ 1
makes the inner MPC controller able to regulate the pendulum angle position in a relatively
large domain around the pendulum equilibrium position (see Fig. 4 in Section 5.1). This
behavior is attributed to the validity of the cosine approximation (2) and, to the amplification
of the entire MPC controller gains mainly due to the increase of b−1 1 when ε is reduced (see
Eq. (48) together with Table 3). With the choice ε = π /4, the value of α is then given by
α = 4l/π , where l is the pendulum length.
The choice of h1 is a challenging task. From (23) it is easy to find that ωn0 = 0.5a11/2 d0 ≈
0.6h1−1 . With such relation, the design of the inner MPC controller gains can rely equivalently,
on ωn0 , on d0 , or on h1 . The robustness analysis of Section 4 and the simulation results of
Section 5.2 reveal some compromises that must be done when dealing with the above choice
problem. Indeed, moving ωn0 or d0 far from 0 enhances the stability of the closed-loop system
(condition (45)), attenuates its sensitivity to low-frequency disturbances, improves its speed
performance, and reduces the overshoot of its cart position. But, as side effects, makes the
system more sensitive to high-frequency sensor noise, increases the extreme values of its input
control effort, and increases the overshoot of its pendulum angle position.
In the simplest case, where noise and disturbances are negligible, and where we assume that
the inverted pendulum parameters are fully known, there are principally two major constraints
that must be considered in the choice of ωn0 . The first major constraint imposes to ωn0 to
satisfy the stability condition (45) with a certain margin. The second major constraint is
related to the desired closed-loop system performances (pendulum settling time, pendulum
angle overshoot, cart position overshoot, extreme values of the input control effort, etc.).
The simulation approach, as performed in Section 5.2 (see Table 6), helps in solving this
challenging choice problem. In this case, a simplified MPC cascade design procedure is given
below.
L. Messikh et al. / Journal of the Franklin Institute 354 (2017) 7241–7265 7255

• Step1: The parameters of the outer-loop MPC controller are determined by:
K24 = α
(49)
K21 = K22 = K23 = 4
4α+β

• Step2: To ensure good immunity to instability choose ωn0 such that


ωn0 > 1.5 × ωu (50)
• Step3: To ensure good inverted pendulum closed-loop performances, simulate the closed-
loop system for different values of ωn0 , and find the associated performances (pendulum
settling time, pendulum angle overshoot, cart position overshoot, etc.). Then, choose the
best ωn0 , which meets the required performances. For simulation purposes, the inner-loop
MPC controller gains are evaluated as follows:
 −1 2 
K11 = a1 b−1
1 a1 ωn0 + 1
K12 = 2b−11 ωn0 (51)
−1 2
K13 = b1 ωn0

4. Robustness analysis

Noise and disturbances often arise in control systems and it is important to take them
into account. In this study only high-frequency noise and low-frequency disturbances are
considered. To perform well, the control system should be able to reject the effects of noise
and disturbances in addition to track the reference inputs. In the case of the inner control
loop and from Fig. 2b the pendulum angle can be expressed by:
X1 (s ) = C (s ) R (s ) + S (s ) B (s ) − C (s ) N (s ) (52)
where the sensitivity function S(s) and the complementary sensitivity function C(s) are given
by:
1 s 2 − a1
S (s ) = =
1 + K1 (s )H1 (s ) s2 + a11/2 d0 s + 0.25a1 d02
(53)
K1 (s )H1 (s ) a1/2 d0 s + a1 + 0.25a1 d02
C (s ) = = 1
1 + K1 (s )H1 (s ) s2 + a11/2 d0 s + 0.25a1 d02
with K1 (s) = K11 + K12 s and R(s) = K13 K1−1 (s)X1d (s). Let us take ω = 0.5a11/2 d1 , the Bode
magnitude of S( jω ) is given by:
 
4 + d12
BS (d0 , d1 ) = 20 log10 2 (54)
d0 + d12
Fig. 3a shows the contour plot of the sensitivity function and indicates how the system is
“sensitive” to disturbances in frequency domain. From this figure one can see a bad ability
to reject the disturbances for 0 ≤ d0 ≤ 2. In this interval the magnitude margin, which is
the inverse of the sensitivity function is excessively reduced leading then to a poor stability
performance. Moreover, if S(s) has to be small in low frequencies in comparison to its
magnitude in higher frequencies we need to have d0 > 2. Since the disturbance is assumed
to be in the low-frequency range, more disturbance rejection is achieved as d0 is greater. For
−2
a unit step disturbance, such behavior appears clearly in the value S(0) = −a1 ωn0 = −4d0−2
of the steady state error.
7256 L. Messikh et al. / Journal of the Franklin Institute 354 (2017) 7241–7265

a b
10 10

0dB -0.5dB
9 9
-15dB -10dB
0.5dB -5dB
-1dB -2.5dB
8 8
-2.5dB
-1dB
7 7
0dB
6 6
1dB
-5dB 1dB

1
1

5 5
d

d
1.5dB

4 4
2.5dB 1.7dB

3
-10dB 3
2dB
2 2 2.5dB
5dB
-15dB
1
5dB
1
10dB 10dB
0 0
0 0.4 0.8 1.2 1.6 2 2.4 2.8 3.2 3.6 4 4.4 4.8 5.2 5.6 6 0 0.4 0.8 1.2 1.6 2 2.4 2.8 3.2 3.6 4 4.4 4.8 5.2 5.6 6
d0 d
0

Fig. 3. Bode magnitude plots of the sensitivity (a) and complementary sensitivity (b) functions.

The rejection of noise is also required for pendulum system control. The Bode magnitude
of C( jω ) is:
⎛  2 ⎞
4 + d02 + 4d02 d12
BC (d0 , d1 ) = 20 log10 ⎝ ⎠ (55)
d02 + d12

Fig. 3b shows the contour plot of this function and indicates how the system is “sensi-
tive” to noise in frequency domain. For 0 ≤ d0 ≤ 3.1, the worst noise rejection is located at
d1 = 0, where |C(0)| = 1 + 4d0−2 . For 3.1 < d0 ≤ 6, the worst case is located in a resonance
frequency band that moves
 towards the high frequency region with d0 according to its reso-
nance frequency: d1R = 0.5d02 − 4 − 8d0−2 . For high-frequency noise, more noise rejection is
achieved as d0 is smaller. The highest noise rejection capability is noted around d0 = 0, where
|C(d1 )| = 4d1−2 . Hence a good trade off must be achieved between disturbance rejection and
suppression of measurement noise.

5. Simulation results

The design of the proposed MPC controller relies heavily on the use of some linear approx-
imations of the nonlinear pendulum system (1). It is then of most importance to test whether
such approximations are appropriate to avoid unacceptable closed-loop system performance.
To study the performance of the proposed inner-loop MPC controller in term of convergence,
accuracy and speed of response, a first set of simulations is done in Section 5.1 for the in-
verted pendulum system given in (1). To verify the efficiency of the overall proposed cascade
MPC method as compared to the parallel two-PID (PID) control method [9], another set of
simulation results is also given in Section 5.2. The physical parameters of the cart-pendulum
[9] and the approximate linear model parameters are listed in Table 4.
L. Messikh et al. / Journal of the Franklin Institute 354 (2017) 7241–7265 7257

Table 4
Physical and approached model parameters of the inverted pendulum.

m M l g min (x3 ) max (x3 )


0.23kg 2.4kg 0.36m 9.81 m/s2 −0.5m 0.5m
α β a1 b1 a2 b2
0.46m 12.5 m/s2 28.8s−2 −0.88k g−1 m −1 0.71 m/s2 −0.40k g−1

5.1. Inner MPC stabilization performance

In this section, we are only concerned with the validation of the linear approximation (3),
which is used to design the inner controller. To this end, the inner controller is applied to the
nonlinear inverted pendulum in order to identify the role of the parameter d0 and to optimize
its range values. Fig. 4a shows the step response,x1 , of the closed-loop pendulum system in
the time range 1s ≤ t ≤ 50 s for each value of x1d and each value of d0 . The input control
x1d is selected every 6◦ from 0◦ to 42◦ . When the curve appears as a thin line this means
that the pendulum angle system has reached a steady state value in less than 1 s, otherwise
this means that the system needs more time to reach steady state.
From Fig. 4a, it appears qualitatively that the increase of d0 leads to accelerate the pendu-
lum system response. For that reason, it appears that this parameter keeps its role of acceler-
ating or decelerating system when applied to the considered nonlinear pendulum system. It is
however of most importance to notice that the steady-state error of the closed-loop pendulum
system doesn’t always vanish as in the case of the closed-loop linear system (21). This steady
state error depends heavily on the value of d0 and x1d . For a given x1d , we observe that as the
parameter d0 increases the steady state performance is more efficient. Moreover, for a given
d0 , we observe that as x1d decreases the steady state error also decreases. For x1d = 0, the
pendulum system response is almost zero, i.e. without steady state error. As a consequence,
when d0 is large enough and x1d is low enough, the speed and steady state performances of
the closed-loop linear system (21) and the closed-loop nonlinear pendulum system are quite
similar. If this last condition is fulfilled in the control of cart-pendulum system, efficient con-
trol performance can be achieved. These observations are clearly observed in Fig. 4b, where
the responses of the closed-loop pendulum system for x1d = 1◦ with d0 = 4 (dashed line)
and d0 = 6 (solid line) are shown. By using a high value of d0 , a more accurate and quicker
pendulum response is obtained at the price of larger angular velocity (Fig. 4c) and control
force (Fig. 4d).

5.2. Comparison with the PID method

For comparison purposes, we have implemented the Simulink models of the proposed MPC
and the PID control methods for the control of the inverted pendulum dynamical system (see
Fig. 5). The control methods are used without bounds on the control force. Notice that for the
implementation of the MPC method without velocity measurement, low-pass filter feedback
controls are used in the pendulum and cart controllers. For moderate disturbances and low-
power sensor noise situations, we have found this solution quite effective, so we have not
envisaged to introduce a more complicated and elaborated solution for velocity estimation
utilizing an observer or a Kalman filter that add unnecessary implementation complexity and
supplementary parameter tuning difficulties to our design problem.
7258 L. Messikh et al. / Journal of the Franklin Institute 354 (2017) 7241–7265

a b

c d

Fig. 4. Performance analysis of the inner MPC controller.

The parameters of the MPC and PID controllers are shown in Table 5. The dominant
values of the input control force, the settling time at 0.05◦ of the pendulum angle, and the
overshoot values of the inverted pendulum system responses are used as index criteria for this
comparison. The PID parameters are obtained from Ref. [9]. The integral gains of each PID
were set to zero, leading in fact to a parallel two-PD controller. The tuning of this controller
was done by using a trial and error method and observing the responses achieved to be
optimal without considering input disturbances. Unlike the above method, the proposed MPC
controller parameters are evaluated in a direct manner using the simplified design procedure
of Section 3.3. The MPC controller parameters, listed in Table 5, are obtained for d0 ∈
{1.5, 1.75, 2, 4, 6} using Eq. (48).
L. Messikh et al. / Journal of the Franklin Institute 354 (2017) 7241–7265 7259

Fig. 5. MPC and PID control of nonlinear inverted pendulum dynamical system.

Table 5
PID and MPC controllers parameters.

Pendulum controller Cart controller

N1 N2 N3 N4 N5 h1 h2 ρ1 ρ2
PID −40 −8 −1 −3 −1
MPC1.5 −51.3 −11.5 −5.16 −5.16 −5.16 0.15 0.35 0.01 0.11
MPC1.75 −58.0 −13.93 −7.02 −7.02 −7.02 0.13 0.35 0.01 0.11
MPC2 −65.7 −16.45 −9.17 −9.17 −9.17 0.11 0.35 0.01 0.11
MPC4 −164 −41.3 −36.7 −36.7 −36.7 0.06 0.35 0.003 0.11
MPC6 −328 −74.6 −82.6 −82.6 −82.6 0.04 0.35 0.002 0.11

To compare the performance of the controllers, the reference cart position is set explicitly
to 0.1 m for both controllers, while the reference angle is set implicitly for the MPC method
and explicitly to 0 rad for the PID method. The simulation results for the pendulum angle and
cart position for these control methods, without considering noise and disturbance, are shown
in Fig. 6. It is observed that the PID method achieves the complete stabilization in about
6.36s. This stabilization is performed with two significant overshoots in both the pendulum
angle and in the cart position responses. The PID method has an initial control force of
about −30N. The stabilization achieved by the MPC method, with d0 = 4, is better than
that of the PID method. The complete stabilization is realized in about 2.21s with only one
smaller overshoot in the pendulum angle response, and without significant overshoot in the
cart position response. The initial force is only about −4.64N, which is much better than that
of the PID method. Moreover, the absence of overshoot in the cart position response make
the MPC method more appropriate for driving the inverted pendulum system than the PID
method, especially in the proximity of track ends.
Table 6 and Fig. 7a–c show a more general comparison between the PID and the MPC
methods in the absence of noise and disturbances. For the MPC method, Fig. 7a and b
7260 L. Messikh et al. / Journal of the Franklin Institute 354 (2017) 7241–7265

a b

Fig. 6. Pendulum angle (a) and cart position (b) responses using PID (dashed line) and MPC (solid line) methods.

Table 6.
Comparison between MPC and PID control methods without and with disturbances.

d0 1.5 1.75 2.5 3.5 4.5 5.5 6.5 PID


max (x1 ) (deg) 0.81 0.86 0.98 1.08 1.14 1.18 1.21 1.92
max (x3 ) (m) 0.124 0.119 0.108 0.100 0.100 0.100 0.100 0.16
ts (s) 6.98 6.44 4.47 2.94 2.21 2.28 2.37 6.36
max (u) (N) 0.46 0.51 0.63 0.77 0.97 1.15 1.29 2.27
min (u) (N) −0.52 −0.70 −1.43 −2.81 −4.64 −6.94 −9.69 −30.1
x3 |b = +0.2◦ 0.065 0.071 0.079 0.083 0.085 0.086 0.086 −0.036
x3 |b = −0.2◦ 0.134 0.129 0.121 0.117 0.115 0.114 0.114 +0.237

shows that as d0 increases, the pendulum angle overshoot increase while the cart position
overshoot decrease. There is then a tradeoff to make between these two performances when
an appropriate value of d0 has to be chosen. The amplitudes of these overshoots are always
smaller than those obtained with the PID method for the considered range of d0 . Fig. 7c
compares the settling time associated with the considered controllers. The settling time is
evaluated based on the pendulum angle response. In concordance with Fig. 4a, it is now
obvious in our MPC method that the increase of d0 leads to accelerate the pendulum system
response. However, when d0 exceeds slightly 3.80, the settling time reaches its minimum,
which is about 2.20s. The settling time of the proposed MPC method becomes better than
that of the PID method when d0 exceed about 1.75. The effort needed to control the inverted
pendulum system is smaller in the MPC method as indicated in Table 6.
To check the ability of the above controllers to reject disturbances, step disturbances of
amplitude ±0.2◦ are introduced to perturb the pendulum angle. Fig. 7d shows the impacts of
such disturbances on the steady state cart position for the considered control schemes. It is
clear from this figure that the proposed MPC method provides better steady state accuracy than
the PID method. For the MPC method, disturbance rejection is improved as d0 is increased.
L. Messikh et al. / Journal of the Franklin Institute 354 (2017) 7241–7265 7261

a c

b d

Fig. 7. Performance comparison between the PID (dashed line) and MPC (solid line) methods.

To check the ability of the above controllers to reject sensor noises, two different simulation
sets, with sinusoidal and with random noises, were conducted independently. In the first
simulation set, we have observed the impact of an injected sinusoidal pendulum angle noise,
of amplitude 0.2◦ at various pulsations, on the behavior of the pendulum angle and cart position
using the PID and the MPC methods. Fig. 8a and b compares the performances of the PID
method to those of the MPC method with d0 = 1.75. Note that in such situation, the PID
and MPC methods have approximately the same settling time in the absence of noise and
disturbance (see Table 6 and Fig. 7c). From Fig. 8a, we can see that the PID and MPC
methods exhibit similar sharp resonances, with an advantage in favor or the MPC in low-
frequency band and a minor advantage in favor of the PID method in high frequency band. For
the cart position response, it appears that the above two methods exhibit the same ability of
7262 L. Messikh et al. / Journal of the Franklin Institute 354 (2017) 7241–7265

a b

c d

Fig. 8. Performance comparison between the PID (dashed line) and MPC (solid line) methods with output noises.

noise rejection in high-frequency band, but in low-frequency band, the MPC method performs
well in comparison to the PID method.
From Fig. 8c and d, with d0 = 4 for the MPC method, we can see that the MPC method
is less sensitive to such noise than the PID method in low-frequency band. The PID method
gives, however, a more interesting noise rejection characteristic in high-frequency.
In the second simulation set, a band limited white noise with sampling time= 0.01, seed=
23341, and different power P is used to perturb the pendulum angle position. In this simulation
set we take once again d0 = 1.75 such that the settling times of the PID and MPC methods
become approximately equal. Table 7 summarizes the results in terms of the standard deviation
measure,σ , which is evaluated based on the last 90 s of the inverted pendulum responses, i.e.
in the time interval of the steady state response.
L. Messikh et al. / Journal of the Franklin Institute 354 (2017) 7241–7265 7263

Table 7
Performance comparison of the MPC and PID methods with random noise.

P 10−8 10−7 10−6 10−5 10−4


PID :σ (x1 ) 0.0287 0.0908 0.2871 0.9100 2.9456
MPC :σ (x1 ) 0.0297 0.0939 0.2973 0.9449 3.1506
PID :σ (x3 ) 0.0021 0.0066 0.0210 0.0665 0.2115
MPC :σ (x3 ) 0.0010 0.0033 0.0104 0.0331 0.1109
PID :σ (u) 1.0103 3.1948 10.1028 31.9479 101.0263
MPC :σ (u) 8.5717 27.1065 85.7184 271.0649 857.1648

Fig. 9. Inverted pendulum angle responses with PID and MPC controls with stochastic sensor noise.

Fig. 10. Inverted pendulum cart position responses with PID and MPC controls with stochastic sensor noise.

From Table 7, we can see that the input control force of the proposed MPC method is
more sensitive to stochastic noise than the one associated with the PID method. Otherwise,
we can see that the PID and MPC methods give similar capabilities in rejecting the noise
that affects the pendulum angular position. For controlling the cart position, the MPC method
exhibits better noise rejection capabilities in comparison to the PID method.
7264 L. Messikh et al. / Journal of the Franklin Institute 354 (2017) 7241–7265

Fig. 11. Inverted pendulum control force responses with PID and MPC controls with stochastic noise.

The influence of a white noise, with P = 10−5 , on the performance of the controlled in-
verted pendulum for the PID and MPC methods are shown in Figs. 9–11. The transient
performances obtained from the MPC method for the pendulum angle and cart position re-
sponses appear to be better than those associated with the PID method. Fig. 11 confirms a
higher sensitivity of the input control effort in the MPC method in comparison to that of the
PID method. For higher power noise, the proposed method needs further improvements to
deal with such situation.

6. Conclusion

An efficient continuous-time cascade linear MPC scheme is developed to control the cart
inverted pendulum system. The minimization of the proposed cost functions and the use of
the critically damped condition for the inner and outer MPC controllers allow an analytical
determination of all the necessary expressions to design such a cascade controller. Compared
with the two-parallel PID method, the proposed two-stage MPC method is shown to have
simple and meaningful parameter tuning and to have superior performance with respect to
disturbance rejection and to some steady state and transient performance criteria. To achieve
good performance, especially for low sensor noise, a single parameter has to be adequately
tuned in order to achieve a good tradeoff between disturbance and noise rejection, and a
good tradeoff between the pendulum angle and cart position overshoots. This approach can
be applied to stabilize other underactuated systems, such as the Furuta inverted-pendulum and
the dual-inverted-pendulum systems. Future direction of this research will focus on reducing
the sensitivity of our method to sensor noise, on finding an efficient digital implementation
counterpart, and on further developing the MPC control method for a large class of robot
systems.

Acknowledgment

This work was supported by the Ministry of Higher Education and Scientific Research of
Algeria (CNEPRU J0201620140014). The authors would like to thank the associate editor
and the reviewers for their valuable comments.
L. Messikh et al. / Journal of the Franklin Institute 354 (2017) 7241–7265 7265

References

[1] .K.J. Aström, K. Furuta, Swinging up a pendulum by energy control, Automatica 36 (2000) 287–295.
[2] .K. Yoshida, Swing-up control of an inverted pendulum by energy-based methods, in: Proceedings of the Amer-
ican Control Conference, San Diego, 1999, pp. 4045–4047.
[3] K. Furuta, T. Okutani, H. Sone, Computer control of a double inverted pendulum, Comput. Electr. Eng. 5 (1978)
67–84.
[4] .S.A. Bortoff, Robust swing up control for a rotational double pendulum, in: Proceedings of the Thirteenth
World Congress of IFAC, San Francisco, 1996, pp. 413–419.
[5] .K. Furuta, T. Ochiai, N. Ono, Attitude control of a triple inverted pendulum, Int. J Control 39 (1984) 1351–1365.
[6] J. Yi, N. Yubazaki, K. Hirota, Upswing and stabilization control of inverted pendulum system based on the
SIRMs dynamically connected fuzzy inference model, Fuzzy Sets Syst. 122 (1) (2001) 139–152.
[7] N. Muskinja, B. Tovornik, Swinging up and stabilization of a real inverted pendulum, IEEE Trans. Ind. Electron.
53 (2006) 631–639.
[8] .D. Chatterjee, A. Patra, H.K. Joglekar, Swing-up and stabilization of a cart-pendulum system under restricted
cart track length, Syst. Control Lett. 47 (2002) 355–364.
[9] L.B. Prasad, B. Tyagi, H.O. Gupta, Optimal control of nonlinear inverted pendulum system using PID controller
and LQR: performance analysis without and with disturbance input, Int. J. Autom. Comput. 11 (6) (December
2014) 661–670.
[10] M. Park, D. Chwa, Swing-up and stabilization control of inverted-pendulum systems via coupled sliding-mode
control, IEEE Trans. Ind. Electron. 56 (9) (2009) 3541–3555.
[11] M. Park, D. Chwa, Orbital stabilization of inverted-pendulum systems via coupled sliding-mode control, IEEE
Trans. Ind. Electron. 56 (9) (2009) 3556–3569.
[12] R.J. Wai, L.J. Chang, Adaptive stabilizing and tracking control for a nonlinear inverted-pendulum system via
sliding-mode technique, IEEE Trans. Ind. Electron. 53 (2) (2006) 674–692.
[13] J.J. Wang, Simulation studies of inverted pendulum based on PID controllers, Simul. Model. Pract. Theory 19
(2011) 440–449.
[14] .J. Yi, N. Yubazaki, K. Hirota, Upswing and stabilization control of inverted pendulum system based on the
SIRMs dynamically connected fuzzy inference model, Fuzzy Sets Syst. 122 (1) (2001) 139–152.
[15] .C.W. Anderson, Learning to control an inverted pendulum using neural networks, IEEE Control Syst. Mag. 9
(3) (1989) 31–37.
[16] .W.D. Chang, R.C. Hwang, J.G. Hsieh, A selftuning PID control for a class of nonlinear systems based on the
Lyapunov approach, J. Process Control 12 (2) (2002) 233–242.
[17] S.K. Mishra, D. Chandra, Stabilization and Tracking Control of Inverted Pendulum Using Fractional Order PID
Controllers, Hindawi Publishing Corporation Journal of Engineering, 2014.
[18] J.H. Yang, S.Y. Shim, J.H. Seo, Y.S. Lee, Swing-up control for an inverted pendulum with restricted cart rail
length, Int. J. Control Autom. Syst. 7 (4) (2009) 674–680.
[19] A. Siuka, M. Schoberl, Applications of energy based control methods for the inverted pendulum on a cart, Rob.
Auton. Syst. 57 (2009) 1012–1017.
[20] L. Magni, R. Scattolini, K Aström, Global stabilization of the inverted pendulum using model predictive control,
in: Proceedings of the Fifteenth IFAC World Congress, Barcelona, 2002.
[21] .P.J. Gawthrop, L. Wang, Intermittent predictive control of an inverted pendulum, Control Eng. Pract. 14 (11)
(2006) 1347–1356.
[22] .A. Mills, A. Wills, B. Ninness, Nonlinear model predictive control of an inverted pendulum, in: Proceedings
of the American Control Conference, St. Louis, 2009, pp. 2335–2340.
[23] .O. Boubaker, The inverted pendulum benchmark in nonlinear control theory: a survey, Int. J. Adv. Rob. Syst.
10 (2013) 1–9.
[24] S. Qin, T. Badgwell, A survey of industrial model predictive control technology, Control Eng. Pract. 11 (7)
(Jul. 2003) 733–764.
[25] .L. Wang, Model predictive control, system design and implementation using Matlab, Advances in Industrial
Control, Springer-Verlag, London, 2009.
[26] X. Li, W. Yu, A systematic tuning method of PID controller for robot manipulators, in: Proceedings of the
Nineth IEEE International Conference on Control and Automation (ICCA), Santiago, Chile, 2011, pp. 274–279.

You might also like