0% found this document useful (0 votes)
17 views6 pages

Habib 2020

Uploaded by

wiambabaj2003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views6 pages

Habib 2020

Uploaded by

wiambabaj2003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Modeling and Control of a Double Inverted Pendulum using LQR

with Parameter Optimization through GA and PSO


Maki K. Habib and Samuel A. Ayankoso
The American University in Cairo
Cairo, Egypt
[email protected] and [email protected]

Abstract—An inverted pendulum system has potential performance of the system with LQR controller was evaluated
applications in different domains that motivate researchers for through both simulation and experiment. In defining the Q
new innovative development. An inverted pendulum system is an matrix, more weight was given to the position states (and less
underactuated, nonlinear, inherently unstable and a weight for the velocity states) to control the pendulums and
multivariable system. The system is modelled mainly through
the cart quickly; the input weighting matrix (R) was defined in
2020 21st International Conference on Research and Education in Mechatronics (REM) | 978-1-7281-6224-9/20/$31.00 ©2020 IEEE | DOI: 10.1109/REM49740.2020.9313893

either Euler-Lagrange or Newtonian dynamic formulation. This


paper aims to examine the control of a double inverted pendulum a way to have an input that match the limit of the driving DC
(DIP) using pole placement and linear quadratic regulator (LQR) motor: Q as diag(5000 5000 5000 5 5 5) and R as [1.0].
control. To find the optimal parameters of the LQR control law, In [15], pole-placement technique was used to control an
Genetic Algorithm (GA) and Particle Swarm Optimization (PSO)
are used to tune and determine the proper control parameters. inverted pendulum on a cart. From the obtained results, the
Simulations are conducted using MATLAB/Simulink under pendulum and the cart settled very fast when the two other
different circumstances and the performance of each control poles used in the design of the control gain (aside the two
technique is analyzed and compared in terms of the system rise dominant poles) get more negative. A separation factor of 2
time, settling time, peak amplitude, and steady state error. was chosen in [16] between the dominant poles and the other
poles, and this yielded a good performance. In addition, the
Keywords— Double Inverted Pendulum, Underactuated, performance of an inverted pendulum system with LQR and
Unstable, Euler-Lagrange dynamic, Newtonian dynamic, Modern pole-placement techniques was investigated in [17] and the
control, State feedback, LQR, Optimization, GA, PSO. transient results of the pendulum and the cart with LQR
indicated a better result as compared to the pole-placement
I. INTRODUCTION control. The comparative advantage of LQR over PID was
also investigated for a double inverted pendulum in [5] but a
An inverted pendulum system has a wide range of detailed analysis of LQR was not presented.
applications; its operational principle is used in rocket and
missiles launch, segway design, humanoid locomotion design, Furthermore, the stabilization of a rotary inverted pendulum
pendubot design, investigation of human balancing, etc. [1], was verified experimentally with double-PID+LQR and LQR
[2]. The inverted pendulum system is a practical example of a in [12]. The double-PID+LQR controller improved the
nonlinear, unstable, multivariable, and underactuated system stabilization performance of the pendulum and its settling time
which can be modeled and controlled in state space domain by 83.33% and 62.5% respectively as compared to the LQR
[1], [3]. The dynamics of this system is formulated mainly controller. In [18], a two-wheel inverted pendulum robot
either through Euler-Lagrange dynamic formulation [1], [4], (TWIPR) was designed and controlled using fuzzy sliding
[5] or Newtonian dynamic formulation [3]. The resulting mode control (FSMC) while a hybrid fuzzy adaptive controller
dynamic formulation, however, is nonlinear but can be was applied to an inverted pendulum in [13] which performed
linearized around any of the system equilibrium points – better than PID and LQR.
particularly the stable upright position. Then, the system
Moreover, many optimization methods like particle swarm
linearized equations are used for state space representation.
optimization (PSO), genetic algorithm (GA) and bees
Different control methods are applied to the linearized algorithm (BA) are used to optimize the parameters of the
equations of single and double inverted pendulum systems, controllers designed for an inverted pendulum system [19]–
these include: proportional- integral-derivative (PID) control, [21]. In [22], a GA-tuned PID controller gave a faster and
pole placement control, linear quadratic regulator (LQR) better response compared to traditional PID controller for an
control, fuzzy control, model predictive control (MPC), inverted pendulum. The traditional PID is tuned by Ziegler-
sliding mode control (SMC), etc. [6]–[11]. Some of these Nichols method, or sometimes by trial-and-error procedure
control techniques are combined to form a hybrid control which leads to non-optimal gains. The optimal tuning of a
technique such as PID+LQR and Fuzzy SMC [12], [13]. LQR controller for an inverted pendulum using BA was
investigated in [23] while PSO was used in [24].
LQR was applied to a double inverted pendulum in [10]
and [14], and the simulation results showed an improved This paper presents the performance analysis and
performance in the settling time and peak amplitude of the two comparison of a linearized double inverted pendulum system
pendulums when the Q and R control parameters were tuned with two different control techniques (pole placement and
manually in [10]. The design and development of a mobile LQR methods) through simulation in MATLAB/Simulink. In
double inverted pendulum was presented in [11] and the

978-1-7281-6224-9/20/$31.00 ©2020 IEEE

Authorized licensed use limited to: UNIVERSITY OF WESTERN ONTARIO. Downloaded on May 26,2021 at 05:26:02 UTC from IEEE Xplore. Restrictions apply.
addition, GA and PSO are used to tune the Q and R matrices 1
T0 = mc x02 (4)
needed in the design of an LQR controller. 2
1
II. SYSTEM MODELING T1 = m p 1 [ x 0 + θ1 l 1 c o s θ 1 ] 2
2 (5)
This section presents the schematic of a planar DIP system 1 1
and the non-linear mathematical model in part A, while part B + m p 1θ12 l 1 2 s i n 2 θ 1 + J 1θ12
and C deal with the linearization of the non-linear 2 2
mathematical model and the state space representation, 1
T2 = m p 2 [ x 0 + θ1l1 cos θ 1 + θ2 l 2 cos θ 2 ]2 +
respectively. 2 (6)
1 1
A. The Physical and Mathematical Model of a DIP on a Cart
m p 2 [θ1l1 sin θ 1 + θ2 l 2 sin θ 2 ] 2 + J 1θ22
2 2
Euler-Lagrange dynamic formulation is used to model DIP in
[4], [5]. This section introduces the derivation of the nonlinear Where x0 is the cart position; θ1 is the lower pendulum angle
dynamic equation of DIP based on the principles of Euler- and θ2 is the upper pendulum angle
Lagrange approach. The physical model of the system is
illustrated in Fig. 1 and its parameters are described in Table I. Then, T can be obtained as

1
T= ( mc + m p1 + m p 2 ) x02 +
2
1 1
( m p1l12 + m p 2 l12 + J 1 )θ12 + ( m p 2 l2 2 + J 2 )θ22 (7)
2 2

+ ( m p1l1 + m p 2 l1 ) x0θ1 cos θ1 +
m p 2 l2 x0θ2 cos θ 2 + m p 2 l1l2 cos(θ1 − θ 2 )θ1θ2
The total potential energy in the system is:
Fig. 1. A Double Inverted Pendulum (DIP) on a cart
P = P0 + P1 + P2 (8)
Table I. Parameters of a double inverted pendulum
Where P0, P1, P2 are the potential energy terms for the cart, the
Parameter Value Unit lower pendulum, and the upper pendulum, respectively.
Mass of the cart, mc 0.7 Kg
Mass of the lower pendulum, mp1 0.5 Kg P0 = 0 (9)
Mass of the upper pendulum, mp2 0.3 Kg
P1 = m p 1 gl1 cos θ 1 (10)
Earth’s gravity, g 9.8 m/s2
Length of the lower pendulum, l1 0.45 m P2 = m p 2 g (l1 cos θ1 + l2 cos θ 2 ) (11)
Length of the upper pendulum, l2 0.35 m
Then, the total potential energy is:
Moment of inertia of the lower pendulum, J1 0.005 kg.m2
Moment of inertia of the upper pendulum, J2 0.005 kg.m2 P = (mp1l1 + mp 2l1 ) g cos θ1 + mp 2 gl2 cos θ2 (12)

Euler-Lagrange dynamic formulation is expressed as Accordingly, L can be obtained as

∂  ∂L   ∂L  (1) 1
 −  = Fi L= ( mc + m p1 + m p 2 ) x02 +
∂ t  ∂ q i   ∂ q i  2
1 1
From Euler-Lagrange equation, Fi represent the ( m p1l12 + m p 2 l12 + J 1 )θ12 + ( m p 2 l2 2 + J 2 )θ22 +
generalized system forces or external inputs, qi is representing 2 2
(13)
the system coordinates and L is called the Lagrangian and it is ( m p1l1 + m p 2 l1 ) x 0θ1 cos θ1 + m p 2 l2 x0θ2 cos θ 2 +

the difference between the total kinetic (T) and the total
potential (P) energy in the system. m p 2 l1l2 cos(θ1 − θ 2 )θ1θ2 − ( m P1l1 + m P 2 l1 ) g cos θ1

L =T −P (2)
− m P 2 gl2 cos θ 2

Where Let qi represent the system variables in (13): x0 , θ1 and


T = T0 + T1 + T2 (3) θ2 Then, three equations of motions are developed using (1).

Where T0, T1, T2 are the kinetic energy terms for the cart, the
The Lagrange equation with x0 component has an external
lower pendulum, and the upper pendulum, respectively. input denoted by u .

Authorized licensed use limited to: UNIVERSITY OF WESTERN ONTARIO. Downloaded on May 26,2021 at 05:26:02 UTC from IEEE Xplore. Restrictions apply.
( mc + m p1 + m p 2 ) x0 + ( m p1l1 + m p 2 l1 )θ1 cos θ1 + n =
− b1
;z =
− b 4 b5 a 3 g b b ( a g ) + b5 ( a1 g )
;e = 1 3 1
m p 2 l2θ2 cos θ 2 − ( m p1l1 + m p 2 l1 )θ12 sin θ1 (14) b2 b2 b2
− m p 2 l2θ22 sin θ 2 = u  b a g b (b b ( a g ) + b5 ( a1 g )) 
r = 3 1 − 6 1 3 1 
(m l 2 + m l 2 + J )θ + (m l + m l )  x cos θ +  b5 b2b5 
p1 1 p2 1 1 1 p1 1 p2 1 0 1

(15)  −1 b6b1   −b6b4 a3 g   a4 a1 


mp 2l1l2 cos(θ 2 − θ1 )θ2 + m p 2l1l2 sin(θ2 − θ1 )θ − 1
2
w= − ; v =   ; b1 =  − a2  ;
b
 5 b b
5 2   b2   3 a 
(mp1l1 + m p 2l1 ) g sin θ1 = 0
 aa   aa   aa   aa 
( m p 2 l2 2 + J 2 )θ2 + m p 2 l2 
x0 cos θ 2 + b2 =  a4 − 1 5   2 0 − a1  −  4 1 − a2   a3 − 4 0 
 a3   a1   a3  a1 
m p 2 l1l2 cos(θ1 − θ 2 )θ1 + m p 2 l1l2 sin(θ1 − θ 2 )θ12 − (16) a  a  a a   aa 
b3 =  0  ; b4 =  1  ; b5 =  2 0 − a1  ; b6 =  a3 − 4 0 
m p 2 l2 g sin θ 2 = 0 a
 1 a
 3  1a   a1 

 x1   0 1 0 0 0 0   x1  0
B. Linearization of DIP  x   0    k 
 2  0 p 0 q x
0  2 
Equation (14), (15) and (16) are linearized about the  
 x3   0 0 1 0 0 1   x3  0 (26)
pendulum upright position ( at θ1 = 0 and θ 2 = 0 ).  =   +  u
 x 4   0 0 r 0 v 0   x4  w
 x5   0 0 0 0 0 
1 x5   0
cos θ1 = 1,sin θ1 = θ1 , cos θ 2 = 1,sin θ 2 = θ 2       
 x 6   0 0 e 0 z 0   x6  n
cos(θ1 − θ 2 ) = 1,sin(θ1 − θ 2 ) = θ1 − θ 2
θ 2 = 0,θ 2 = 0,θ = 0, θ = 0
1 2 1 2 y = Cx + Du (27)
This yields three linear equations
x0 + a1θ1 + a3θ2 = u
a0  (17) The matrix A, B, C, D of the system’s dynamic equation are:

x0 + a2θ1 + a4θ2 − a1 gθ1 = 0


a1 (18) 0 1 0 1 0 0  0 
0   1.3820 
0 −10.3575 0 −0.1575 0  
 
x0 + a4θ1 + a5θ2 − a3 gθ 2 = 0
a3  (19) 0 0 1 0 0 1  0 
A=   B= 
Where 0 0 53.0796 0 −9.9235 0 −2.9358
0 0 0 0 0 0  0 
a0 = m c + m p1 + m p 2 ; a1 = ( m p1 + m p 2 )l1 ;    
a 2 = m p1l12 + m p 2 l12 + J 1 ; a3 = m p 2 l2 ; 0 0 −34.0234 0 36.2736 0  −0.1531

a 4 = m p 2 l1l2 ; a5 = m p 2 l22 + J 2 C = I 6 ; D = [ 0]

Where I 6 is a 6 by 6 identity matrix


C. State Space Representation of DIP
Equation (17), (18) and (19) can be expressed using state
III. CONTROL DESIGN
space representation as
In the section, part A shows the control design
x1 = x0 ; x2 = x0 ; x3 = θ1 ; x4 = θ1 ; x5 = θ 2 ; x6 = θ2 requirements and goals. This is followed by the discussion of
pole placement control design in part B, LQR control design
x1 = x2 (20) in part C and the tuning of LQR control with GA and PSO in
x2 = px3 + qx5 + ku (21) part D.
x3 = x4 (22) A. Control Design Requirements and Goals
x4 = rx3 + vx5 + wu (23) The design requirements in Table II were considered.
x5 = x6 (24) Table II. The desired control requirements for the DIP system

x6 = ex3 + zx5 + nu (25) Pendulums Requirement Cart Requirement

Where Settling time (s) <3 Settling time <3


Overshoot (deg.) Max. 20 Rise time 0.5
 −a z a v   −a e a r   1 a n a w
q =  3 − 1 ; p =  3 − 1 ;k =  − 3 − 1  Steady state error 0 Steady state error 0
 a0 a0   a0 a0   a0 a0 a0 

Authorized licensed use limited to: UNIVERSITY OF WESTERN ONTARIO. Downloaded on May 26,2021 at 05:26:02 UTC from IEEE Xplore. Restrictions apply.
The control goals are: The first step when using GA or PSO to tune the Q and R
matrices is to initialize the chromosome (genes) in the case of
i. To stabilize the lower and upper pendulum at upright GA or the swarm particle in the case of PSO. Each
position, and chromosome or particle is represented by a vector z whose
ii. To command the cart to a new position (0.1 meters). elements represent the Q and R matrices. Where z(1)
represents Q(1,1), z(2) represents Q(3,3), z(3) represents
The initial condition used for the purpose of simulation is: Q(5,5) and z(4) represents R value. Then, other parameters
x_0= [0; 0; 5*pi/180; 0; 5*pi/180; 0] like the population and bounds of the algorithms are also
defined. To get the optimal control parameters, an objective
B. Pole Placement Control function (J_optim) is proposed based on the control input and
Integral Time Square Error (ITSE) [25].
In pole-placement method, the closed-loop poles are
located at desired positions by means of a state feedback (with 1
∞ ∞
(30)
u  t .e
T 2
J _ o p tim = Ru dt + dt
an appropriate gain for the system states). However, a 2 0 0
necessary condition for placing a pole at any arbitrary point is Both algorithms minimize this objective function through
that the system must be completely state controllable. This test dissimilar processes as illustrated in Fig. 3 and the optimal
is also known as the Kalman’s test.
solution is iteratively searched until the algorithm reached any
The system was tested for controllability, and a dominant of the stopping criteria such as the number of generations or
pole placement of 4.6% overshoot and 1sec settling time was iterations, function tolerance and time limit.
designed. Then, a separation factor of 2 was used for the other
poles.

C. LQR Control
LQR is an optimal control technique that accounts for Q
and R matrices representing the weights or cost functions to
states deviation and control input respectively [11].
In (28), a function J_lqr (the performance index) is defined
which can also be interpreted as the energy function. The
objective in LQR design is to arrive at an optimal control law
that minimizes the performance index [10].

1 (28)
2 0
J _ lqr = ( x T Q x + u T R u ) dt

Optimal control law: u (t ) = − Kx (t ) (29)


Where u is the input of the control and K is the gain.
But a major concern in LQR design is the choice of the Q
and R matrices.
Fig. 2 shows the block structure applicable for both pole- Fig. 3. Flowchart of GA and PSO LQR tuning
placement and LQR controller. Fig. 4 shows the block diagram for a GA or PSO LQR tuning.

Fig. 2. The block diagram for pole-placement / LQR controller


Fig. 4. The block diagram for GA/ PSO LQR (Q and R parameters) tuning
D. Optimal Tuning of an LQR Controller with GA and PSO
Deciding the state and control weighing matrices (Q and IV. SIMULATION
R) that give the optimal control is time consuming by manual This section discusses the results of pole placement
tuning; thus, an automatic tuning approach using Genetic control, manual LQR control, GA and PSO tuned LQR control
Algorithm (GA) and Particle Swarm Optimization (PSO) are in Part A, B and C while the 2D animation of the system is
proposed separately for this purpose [21]. captured in part D.

Authorized licensed use limited to: UNIVERSITY OF WESTERN ONTARIO. Downloaded on May 26,2021 at 05:26:02 UTC from IEEE Xplore. Restrictions apply.
A. Simulation Results for Pole Placement Control
Based on the formulated requirements in Table I and the
discussion in part B of section III, the desired pole location is:
desired_pole = [-4+4.08j, -4-4.08j, -8, -8, -8, -8]
The controller gain, K is then calculated using this
command: Kpole-placment = acker (A, B,des_pole)
The obtained control gain was used with the system block Fig. 5. The cart position response with LQR controller
diagram developed in Simulink (as illustrated in Fig. 2) and
the results are shown in Table III.
Table III. Summary of the system performance with pole placement control
Time response Cart Lower Pendulum Upper Pendulum
characteristics Position angle angle
Ts (s) 0.0791 0.0487 0.1389
Ts (s) 1.6029 1.5413 1.7047
P.A (m/rad) 0.2249 0.1756 0.0893
ess (m/rad) 0 0 0 Fig. 6. The lower and upper pendulum angle response with LQR controller

Where Tr is the rise time, Ts is the settling time, P.A is the


peak amplitude and ess is the steady state error.

B. Simulation Results for Manual LQR Control


This subsection presents the simulation results (in Table
IV) when the Q and R matrices were tuned manually, in a
systematic way, to understand how the elements of the Q and
R matrices contribute to the system response.
Fig. 7. The control effort with LQR controller
For each tuning case, the controller gain was calculated
using this command in MATLAB: Klqr = lqr (A, B, Q, R) C. Simulation Results for GA and PSO Tunned LQR Control
Table IV. Performance of DIP with manually tuned LQR Both optimizations were performed in MATLAB using
GA and PSO toolboxes. And the summary of the results can
Q and R Matrices R. P Results
C.P L.P.A U.P. A
be found in Table V.
Q1=diag (1, 1, 1, 1, 1, 1]) Tr (s) 0.2854 0.2345 0.3532 Optimization parameters/ options: Initial population = 100;
R1 = [1] Ts (s) 4.9040 3.4513 3.5552 Maximum iterations/ Generations=3; Lower boundary, lb= [1
P.A (rad) 0.4748 0.1053 0.0875 1 1 0.001]; Upper boundary, ub= [10000 10000 10000 10];
ess (rad) 0 0 0 Table V. Performance of DIP with GA and PSO tuned LQR
J_lqr 0.0041
Q and R Matrices R. P Results
Q2=diag ([10000, 1, 1, Tr (s) 0.0764 0.0462 0.1379
1, 1, 1]) C.P L.P.A U.P. A
Ts (s) 1.5987 1.7343 2.0400
R2 = [1] GA Tr (s) 0.1367 0.0728 0.0440
P.A (rad) 0.2086 0.1800 0.0895
Q= diag (1.0e+03 * Ts(s) 2.332 1.9197 1.9109
ess (rad) 0 0 0
J_lqr 10 [6.0587, 0.001, 3.5314, P.A (rad) 0.0901 0.1869 0.0901
Q3=diag ([10000, 1, Tr (s) 0.0762 0.0448 0.1348 0.001, 6.0716, 0.001]) ess (rad) 0 0 0
0.001, 1, 0.00 1,1]) Ts (s) 1.545 1.5887 1.7495 R = [ 0.034] J_lqr 6.0587 J_optim 0.0047
R3 = [1] P.A (rad) 0.2109 0.1799 0.0895
ess (rad) 0 0 0 PSO Tr(s) 0.0564 0.0275 0.1077
J_lqr 4.0560 Q= diag (1.0e+04 *[1.0, Ts(s) 1.4130 0.7512 1.0245
Q4=diag ([10000, 1, Tr (s) 0.0554 0.0295 0.1102 0.0001, 0.0001, 0.0001, P.A (rad) 0.1515 0.3094 0.0969
1, 1, 1,1]) Ts (s) 1.3215 1.1461 1.5191 0.906, 0.0001]) ess (rad) 0 0 0
R4 = [ 0.01] P.A (rad) 0.1643 0.2680 0.0941
ess (rad) 0 0 0 R = [ 0.001] J_lqr 3.7873 J_optim 0.0017
J_lqr 8.8403
Where R.P is the response parameters, C.P is the cart
position, L.P.A is the lower pendulum angle and U.P.A is the D. Animate the Dynamic Motion of DIP
upper pendulum angle. To further validate the functionality of the designed
Fig. 5, Fig. 6, and Fig. 7 show the response of the system controllers, an animation was created based on the numerical
when the matrices are set to Q4 and R4. integration of the system non-linear ODE. Fig.8 shows some
captured images while the animation was running.

Authorized licensed use limited to: UNIVERSITY OF WESTERN ONTARIO. Downloaded on May 26,2021 at 05:26:02 UTC from IEEE Xplore. Restrictions apply.
[6] Q. Qian, D. Dongmei, L. Feng, and T. Yongchuan, “Stabilization of the
double inverted pendulum based on discrete-time model predictive
control,” in 2011 IEEE International Conference on Automation and
Logistics (ICAL), Chongqing, China, Aug. 2011, pp. 243–247, doi:
10.1109/ICAL.2011.6024721.
[7] A. Jain, D. Tayal, and N. Sehgal, “Control of Non-Linear Inverted
Pendulum using Fuzzy Logic Controller,” Int. J. Comput. Appl., vol. 69,
no. 27, pp. 7–11, May 2013, doi: 10.5120/12141-8278.
Fig. 8. 2D Animation of the system control
[8] A. N. K. Nasir, “Performance Comparison between Sliding Mode
Control (SMC) and PD-PID Controllers for a Nonlinear Inverted
V. DISCUSSION Pendulum System,” vol. 4, no. 10, p. 6, 2010.
By examining the results in Table V and those in Table IV [9] A. Jose, C. Augustine, S. M. Malola, and K. Chacko, “Performance
Study of PID Controller and LQR Technique for Inverted Pendulum,”
and III, it can be deduced that the PSO tuned LQR gave the World J. Eng. Technol., vol. 03, no. 02, pp. 76–81, 2015, doi:
overall best transient performance in comparison with the GA 10.4236/wjet.2015.32008.
tuned and manually tuned LQR and the pole-placement [10] G. A. Sultan and Z. K. Farej, “Design and Performance Analysis of LQR
controller. The settling time of the cart, the lower pendulum, Controller for Stabilizing Double Inverted Pendulum System,” Circ.
and the upper pendulum were improved by 11.85%, 51.26% Comput. Sci., vol. 2, no. 9, pp. 1–5, Oct. 2017, doi: 10.22632/ccs-2017-
and 39.9% respectively by the PSO tuned LQR when 252-45.
compared with the results of the pole-placement controller. In [11] D. T. Ratnayake and M. Parnichkun, “LQR-Based Stabilization and
Position Control of a Mobile Double Inverted Pendulum,” IOP Conf.
addition, the results in Table V (in which similar optimization Ser. Mater. Sci. Eng., vol. 886, p. 012034, Jul. 2020, doi: 10.1088/1757-
parameters were defined for GA and PSO) validates that PSO 899X/886/1/012034.
is better than GA when searching for the optimal values of the [12] T. F. Tang, S. H. Chong, and K. K. Pang, “Stabilisation of a rotary
Q and R matrices used in LQR control. inverted pendulum system with double-PID and LQR control:
experimental verification,” Int. J. Automation and Control, p. 16, 2020.
VI. CONCLUSION [13] A. I. Isa, M. F. Hamza, and M. Muhammad, “Hybrid Fuzzy Control of
In this paper, the model of a double inverted pendulum Nonlinear Inverted Pendulum System,” p. 14, 2019.
was developed using Euler-Lagrange dynamic formulation, [14] S. K. Yadav and M. N. Singh, “Optimal Control of Double Inverted
Pendulum Using LQR Controller,” vol. 2, no. 2, p. 5, 2012.
and pole placement and LQR controllers were designed to
[15] T. T. Sarkar and L. Dewan, “Pole-placement, PID and genetic algorithm
stabilize the system. The performance of each controller was based stabilization of inverted pendulum,” in 2017 8th International
tested in MATLAB/Simulink simulation environment and the Conference on Computing, Communication and Networking
system gave satisfactory results based on the control goals and Technologies (ICCCNT), Delhi, Jul. 2017, pp. 1–6, doi:
requirements: the pendulums stabilized in less than 3 s with an 10.1109/ICCCNT.2017.8204047.
overshoot less than 20 degrees and the cart move to 0.1 meters [16] A. A. Roshdy, L. Yu zheng, H. F. Mokbel, and W. Tongyu,
in less than 3 seconds with a rise time less than 0.5 s. “Stabilization of Real Inverted Pendulum Using Pole Separation Factor,”
presented at the 1st International Conference on Mechanical Engineering
Furthermore, the Q and R matrices of the LQR controller were and Material Science), China, 2012, doi: 10.2991/mems.2012.107.
tuned by using GA and PSO algorithms. From the simulation [17] E. Vinodh Kumar and J. Jerome, “Robust LQR Controller Design for
results, the PSO-tuned LQR controller gave the overall best Stabilizing and Trajectory Tracking of Inverted Pendulum,” Procedia
transient performance in comparison with the GA tuned and Eng., vol. 64, pp. 169–178, 2013, doi: 10.1016/j.proeng.2013.09.088.
manually tuned LQR and the pole-placement controller. [18] S.-J. Huang, S.-S. Chen, and S.-C. Lin, “Design and Motion Control of a
Two-Wheel Inverted Pendulum Robot,” vol. 13, no. 3, p. 8, 2019.
The future aspect of this research will be centred on the
[19] K. Hassani and W.-S. Lee, “Optimal Tuning of Linear Quadratic
development of a modular and cheap double inverted Regulators Using Quantum Particle Swarm Optimization,” p. 8, 2014.
pendulum system, including intelligent and robust control. [20] L. Moysis, “Balancing a double inverted pendulum using optimal
control and Laguerre functions,” p. 10, 2016.
REFERENCES [21] A. Al-Mahturi and H. Wahid, “Optimal Tuning of Linear Quadratic
Regulator Controller Using a Particle Swarm Optimization for Two-
[1] I. Siradjuddin, B. Setiawan, A. Fahmi, Z. Amalia, and E. Rohadi, “State Rotor Aerodynamical System,” Int. J. Electron. Commun. Eng., vol. 11,
space control using LQR method for a cart-inverted pendulum linearised no. 2, p. 7, 2017.
model,” vol. 17, no. 01, p. 9, 2017.
[22] C. Sravan Bharadwaj, T. Sudhakar Babu, and N. Rajasekar, “Tuning
[2] A. Cerda-Lugo, A. Gonzalez, A. Cardenas, and D. Piovesan, PID Controller for Inverted Pendulum Using Genetic Algorithm,” in
“Experimental Estimation of a Second Order, Double Inverted Pendulum Advances in Systems, Control and Automation, vol. 442, A. Konkani, R.
Parameters for the study of Human Balancing,” in 2019 41st Annual Bera, and S. Paul, Eds. Singapore: Springer Singapore, 2018, pp. 395–
International Conference of the IEEE Engineering in Medicine and 404.
Biology Society (EMBC), Berlin, Germany, Jul. 2019, pp. 4117–4120,
doi: 10.1109/EMBC.2019.8857611. [23] M. A. Sen and M. Kalyoncu, “Optimal Tuning of a LQR Controller for
an Inverted Pendulum Using the Bees Algorithm,” J. Autom. Control
[3] A. KAMIL and et al., “A comprehensive approach to double inverted Eng., vol. 4, no. 5, p. 4, 2016.
pendulum modeling,” 2019, doi: 10.24425/ACS.2019.130201.
[24] H. G. Kamil, O. T. Makki, and H. M. Umran, “Optimal tuning of a
[4] K. Srikanth and N. K. G V, “Stabilization At Upright Equilibrium Linear Quadratic Regulator for Position Control using Particle Swarm
Position of a Double Inverted Pendulum With Unconstrained Bat Optimisation,” IOP Conf. Ser. Mater. Sci. Eng., vol. 671, p. 012047, Jan.
Optimization,” Int. J. Comput. Sci. Appl., vol. 5, no. 5, pp. 87–101, Oct. 2020, doi: 10.1088/1757-899X/671/1/012047.
2015, doi: 10.5121/ijcsa.2015.5508.
[25] Hazem I. Ali and Alza A. Mahmood, “LQR Design using Particle
[5] R. Banerjee, N. Dey, U. Mondal, and B. Hazra, “Stabilization of Double
Swarm Optimization.pdf.” Iraq Academic Scientific Journals, 2016,
Link Inverted Pendulum Using LQR,” in 2018 International Conference [Online]. Available: https://www.iasj.net.
on Current Trends towards Converging Technologies (ICCTCT),
Coimbatore, Mar. 2018, pp. 1–6, doi: 10.1109/ICCTCT.2018.8550915.

Authorized licensed use limited to: UNIVERSITY OF WESTERN ONTARIO. Downloaded on May 26,2021 at 05:26:02 UTC from IEEE Xplore. Restrictions apply.

You might also like