Professional Documents
Culture Documents
1s IEEE International Conference on Power Electronics, Intelligent Control and Energy Systems (ICPEICES-2016)
Abstract-Inverted pendulum is widely used in the study FSF, and LQR. Hybrid control approaches and bio-inspired
of control theory. There are different types of inverted methods like genetic algorithms, and particle swarm
pendulums available, out of which a rotary inverted optimization have attracted more attention because of
pendulum (RIP) with an L-shaped arm is considered in this reduced complexity of controllers [8], [9].
work. The aim of this work is to stabilize the pendulum at its The present paper focused on a comparison of three
vertical upright position with minimum oscillations in both different balanced controllers based on experimental results
the pendulum and L-shaped arm. Firstly, a two loop
in terms of (i) steady state errors in pendulum and arm
Proportional Integral Derivative (PID) control is designed
positions, (ii) control effort, and (iii) robustness against
using root locus method, which is quiet challenging as the
disturbance in the pendulum position. The paper is organized
system is highly non-linear and under actuated. Secondly, a
as folIows. The next section describes the dynamics and
Full State Feedback (FSF) control by pole placement
mathematical model of the pendulum. In Section 3, step by
technique, and an Linear Quadratic Regulator (LQR)
technique have been used. Finally, MATLAB based
step procedure of designing two loop PID control is
simulations and ex- perimental results are compared and
presented. Section 4 describes FSF and LQR control. In
discussed. All controllers have been implemented on Quanser Section 5, experimental results have been discussed and
QNET RIP trainer system using LabVIEW tool and found compared. The conclusion is addressed in the last section.
that the LQR based controller is performing weil.
11. SYSTEM DESCRIPTION AND MATHEMATICAL MODELLlNG
Keywords-Rotary Inverted Pendulum; Stabilization;
Proportional Integral Derivative Control; Linear Quadratic The system ROTPEN which is used in this paper is
Control
shown in Fig. 1. It consists of a pendulum attached to an L
I. INTRODUCTION
shaped arm. The L-shaped arm is connected to a 24-Volt DC
motor shaft and pivots between ±180 degrees. At the end of
The Inverted Pendulum is a c1assical control problem in the arm, there is a suspended pendulum attached. The
dynamics and control theory and is a widely used benchmark pendulum and arm angle are measured by encoders attached.
for testing control algorithms. There are different types of
inverted pendulum and they offer variety of interesting control
challenges. Rotary inverted pendulum, one among them, is
non-linear, under actuated, and open loop unstable system. It
has a number of practical applications such as missile
launchers, pendubots, segways, earthquake resistant building
design, etc [1].
The problem of balancing the pendulum at its inverted
position has been divided into two major tasks, i.e., swing up
Fig. I: Quanser ROTPEN Trainer System [2]
control and balance control. The swing up control is used to
bring the pendulum from its stable pending position to its TABLE I: ROTPEN COMPONENTS [2]
vertical upright position and balance control stabilizes the 1D Components 1D Components
pendulum at its upright position. Rotary inverted pendulum, 1. DC motor 8. Pendulum link
invented by Furuta, is also known as Furuta's pendulum. 2. Arm angle encoder 9. Pendulum weight
Swing up control technique is designed based on energy 3. Motor metal chamber 10. PCI connector to NI
shaping [4], speed gradient method [5], sliding mode control 4. Rotary arm pivot ELVIS
5. Rotary arm 11. QNET PWM/Encoder
[6], etc. However, it is the balance control which grabbed the 6. Pendulum encoder board
attention of many authors and different control strategies 7. Pendulum pivot 12. 24V QNET power jack
have been designed and implemented in past. Some of them 13. Fuse
are mathematically complex like sliding mode control, 14. +8, +15V, -15V, +5V
Lyapunov's direct method, optimal sliding mode cascade LEDs
control method, etc. In [7], a comparison is done for PID,
Authorized licensed use limited to: Universidad Nacional Autonoma De Mexico (UNAM). Downloaded on March 22,2023 at 01:22:43 UTC from IEEE Xplore. Restrictions apply.
t
1s IEEE International Conference on Power Electronics, Intelligent Control and Energy Systems (ICPEICES-2016)
The pendulum link and weight combined has the mass and from (3), (4) and (5), we get
Mp and a total length of Lp and can rotate freely in the vertical ( Jo q +MpT � ) Ö Toutpu,+Mp ipTCOSo& - MplpTS i nao. �
=
(8)
plane. It sets up the angle a in the vertical direction. The
From (7) and (8), we obtain,
length from arm pivot to pendulum pivot is rand sets up the
1
angle e in the horizontal direction. The length from pendulum ä: =
ac -b
2 2
'cos-a
(adsiTIO: - b2 sino:cosoa2
centre of mass to its pivot is lp. Fig. 2 shows the calculation
model for inverted pendulum. Let the center of gravity of
- b e coso: & + bfcoso:Vm )
pendulum is at point B. Then the rotational velocity of point (9)
B with respect to 0 has following components
.
and
. 1
e ac _ b2 coS2 o. ( bcsi na:a2 I bdsi nacosa:
L,
=
\ (10)
{�
YB
B =
-lpO: - lp o:szno:
.
JIII Moment of inertia of motor rotor
Equivalent moment of inertia about
I:8xI0'o kg:m'
=
(2) Jeq motor shaft pivot axis with pendulum 1:84xI0' kg:m'
4
assembly
r Length of arm pivot to pendulum pivot 0.0826 m
Mp Mass ofpendulum link and weight 0.0270 Kg
combined
Lp Length ofpendulum center ofmass 0.153 m
from pivot
Jp Pendulum moment of inertia about its 1:70xI0' kg:m'
4
pivot axix
-'-.
Obtained by linearising the non-linear model given by
(10) about the equilibrium point at
Fig. 3: Free Body Diagram for Pendulum and arm
and after substituting the
Now, Fig. 3 describes forces acting on the arm and the value of the system parameters the following linear state
{LFr
-
pendulum. From that we obtain,
= I\'{P�B = '-'''{prO � ;"lplp&GO�O!+ Mpipc. � 8ina,
space model is obtained.
L Fx r
and from the rotational motion of arm around point
(11)
we have,
JeqÖ = Tou.t put - III. Two Loop PID CONTROL
(5)
here A PID control, commonly used in industries, is given by.
Kt(Vm - RTf/i) rlp.
Tautpu t =
(6)
u ( t) = kp e(t ) - k,
10, o
e (T)d(T) + kr--:
dt
(12)
Now, solving (3) and (4), we get where, kp is proportional gain, kr is integral gain, and kd
( J1' + Ml'l�)ä = Ml' ll' rcoso.& + Mp g/l's i no.
(7)
is derivative gain. The controller has been designed using
SISO tool in MA TLAB. At first, a single PID controller has
[2)
Authorized licensed use limited to: Universidad Nacional Autonoma De Mexico (UNAM). Downloaded on March 22,2023 at 01:22:43 UTC from IEEE Xplore. Restrictions apply.
t
1s IEEE International Conference on Power Electronics, Intelligent Control and Energy Systems (ICPEICES-2016)
been designed taking pendulum angle as the only output. So, with single PID is not feasible to implement on the system
plant transfer function taking pendulum angle as output is 1l.
obtained from (11) and is given by (l3). Therefore, a two loop PID structure is used where two
a( s ) 7 . 31s - 3 . 2 46 e - 01 5 PID controllers are implemented. At first the controller for
G( s) = -- = --;;------,---- ,- pendulum position is designed as done previously and then
,.;3 + O .5728,.;2 83, 4 b
Vm(,.;) 28. 94 -
(13) another controller is designed for controlling the arm position
The root locus plot of (13) is shown in Fig. 4. To make for which the plant dynamics is the e10sed inner loop system
the system stable a PID controller with in series with the arm mechanism. So, the open loop transfer
-� function (Gel) to control is given by (14). The root locus is
�r- -' ' -'1'- given in Fig. 8.
I'
Ci'"
�m
� 1'------1
�'76 :!J
1 ".
\
f 1 1�.l-�,---
---c --; , ----!-
---- -;- , ----!-
, ---;----!----:-----!
- -�o!--!--!------"
-;- , ----!-
, ---;- - , """'.
, ....,. . :-,.
--., ......-!
time(s) tlme(s)
(a) (b)
"
; Fig. 6: Simulation Results of Close Loop System with a Single PlD:
(a) Pendulum Angle, (b) Arm Angle
.,I\r-----'\
Fig. 4: Root Locus Plot for Open Loop System Taking Pendulum Angle
as the Output
Vm (s) D( s)
=
(14)
"
where, N (s ) = 17.18s6 + 9.842s5 - 2301s4 - 994, 5s 3 +
7,241e4s2 + 2,513e4s, and D ( s ) = s 8 + 21.1s7 + 263.8s6 +
614,8s 5 - 2.733e4s4 - 1.902e 5 s 3 - 6,263e4 82 + 2.81ge - 01 1 s
[3)
Authorized licensed use limited to: Universidad Nacional Autonoma De Mexico (UNAM). Downloaded on March 22,2023 at 01:22:43 UTC from IEEE Xplore. Restrictions apply.
t
1s IEEE International Conference on Power Electronics, Intelligent Control and Energy Systems (ICPEICES-2016)
the states are controllable. Two states, i.e., pendulum and arm
positions are measurable and other two states, i.e., pendulum
and arm velocity are estimated. The feedback gain matrix K
to stabilize the pendulum can be found as folIows.
Let the desired characteristic equation (CE) is taken
from the integral time absolute error (ITAE) table. The
coefficients that minimizes the ITAE performance criteria for
a step input for the general c1osed-loop system T(s), given
below are shown in Table m and T(s) is given as
. -. . .• _
.------
"
... -
4 •
"
Lf----
-- -------- l Fig. 10: Simulation Results with Two Loop PID Control with a Step
Disturbanee at t=IOs; (a) Pendulum Angle, (b) Arm Angle, (e) Control
Effort
S + Wn
s:A + ;
;.4;VnS +
W 3
s3 + 1.75wns- S- + 2.15wns + Wn
{
Fig. 9: Root Loeus ofPlant with Two Loop PID Control Implemented
For the given plant, a 4th order CE with WI/ 10, i.e., / + =
X(t) = AX(t) + Bu (t), 21i + 340i + 2700s + 10000 is chosen. Hence, using
where the control input is given in (16) results of c10sed loop plant have been shown in Fig. 11.
[4)
Authorized licensed use limited to: Universidad Nacional Autonoma De Mexico (UNAM). Downloaded on March 22,2023 at 01:22:43 UTC from IEEE Xplore. Restrictions apply.
t
�
1s IEEE International Conference on Power Electronics, Intelligent Control and Energy Systems (ICPEICES-2016)
J (" (XTQX + UT RU ) dt
.Jto
=
(19)
In (19), Q is a positive semi-definite matrix and R is a
real positive symmetric matrix. The constraint problem is
solved by augmenting (15) into (19) using an n-vector of
Lagrange multipliers A. The problem reduces to the
minimization of the following unconstrained function
T, (r., A , 1l,t) : x'j ' Q X +rfj ' Rr!] +.\ :I" [A X + RU - X]
=
(20)
After solving (20), we get
pet ) - P (t ) A + AT p et ) - Q + P ( t ) BR- 1 BT p et)
=
(21)
where, K K1BTp. The equation given by (21) is
=
.... - .... -
referred to as the Matrix Differential Riccati equation. For ""r--��-�---
: [fTrr- : :::�
" d ' 'h "
Disturbances (Motor Voltage, Pendulum Angle, and Arm Angle,
Respectively)
:
o 0 0 0
Thus state feedback gain obtained from ARE is K [-
:--
=
i'�
-hf -fsl �
r"''"
�IB'J
E ''''
�
-g ue
!C,�
"
1140
's
time{s) time(s)
<al (b)
-Iqr
-hf
Since the linear model of the RIP system works weil for
a range of ± 30 deg, the controller is activated only when the
pendulum is within this range from its vertical upright
position. Figures 11-13 show the results of two loop PID,
time(s)
(c) FSF, and LQR control, respectively, without disturbances.
We can observe that two loop PID has very high overshoot as
Fig. 11: Simulation Results using FSF/LQR; (a) Pendulum Angle,
compared with other two control techniques. It takes a little
(b) Arm Angle, (c) Control Effort
time to stabilize the pendulum but continuous oscillations
V. RESULTS AND DISCUSSIONS exist even after the pendulum gets stabilized. These
oscillations are least in the case of LQR control as compared
All controllers have been implemented on the Quanser with two loop PID and FSF. Also, the control effort, i.e.,
ROTPEN trainer system and the experimental results (Figs. motor voltage is minimum in case ofLQR control. Fig. 14-16
11-16) show the control effort, pendulum angle, and arm show the results of two loop PID, FSF, and LQR control
angle of the pendulum with different controllers. respectively
[5)
Authorized licensed use limited to: Universidad Nacional Autonoma De Mexico (UNAM). Downloaded on March 22,2023 at 01:22:43 UTC from IEEE Xplore. Restrictions apply.
t
1s IEEE International Conference on Power Electronics, Intelligent Control and Energy Systems (ICPEICES-2016)
concluded that FSF and LQR are better than two loop PID,
but LQR is most efficient in terms of control effort and, the
oscillations in arm and pendulum. LQR is most robust against
disturbances in pendulum position.
--- ,...-.,.Tl.
.--.,-,...--- ..._
� � � � � � � � � .
f, ... W
� � � I� � � I� � ,h �
.-
Fig. 14: Experimental Results with LQR Control without Disturbances Fig. 16: Experimental Results (Motor Voltage, Pendulum Angle, and
(Motor Voltage, Pendulum Angle, and Arm Angle Respectively) Arm Angle Respectively) with FSF Control with Disturbances
Fig. 15: Experimental Results (Motor Voltage, Pendulum Angle, and Fig. 17: Experimental Results (Motor Voltage, Pendulum Angle, and
Arm Angle Respectively) with LQR Control with Disturbances
Arm Angle, Respectively) with 2 PlD Control with Disturbances
based on their experimental data has been done in table (IV). 836-844,2003
TABLE 4: COMAPRAlSON OF PlD, FSF, AND LQR [6 ] M. S. Park and D. Chwa, "Swing-up and Stabilization Control of
Inverted-Pendulum Systems via Coupled Sliding-Mode Control
Controller Seitling Overshoot Range of Range of Range Robustness
Method", lEEE transactions on industrial electronics, vol. 56, no. 9, pp.
Type Time (deg) Pendulum Arm Osc of Motor (deg)
3541-3555,2009
(s) Osc. (deg) Voitage
(de!!) (V) [7] M. Akhtaruzzaman and A. A. Shafie, "Modeling and Control of a
2100p 0.5 16.5 [-3.5,4.5] [-60,60] [-2.5,2] [-6,7] Rotary Inverted Pendulum Using Various Methods, Comparative
PlD Assessment and Result Analysis", IEEE International Conference on
FSF 0.3 -I [-4.5,5] [-18,27] [-2.2,2.2] [-12.5,16] Mechatronics and Automation, Xi'an, China, 2010
LQR 0.2 I [-3,2.21 [-28,181 1[-1.8,1.61 [-13,191
[8] A. Rahimi, K. Raahemifar, K. Kumar and H. Alighanbari, "Controller
Design For Rotary Inverted Pendulum System Using Particle Swarm
VI. CONCLUSION Optimization Algorithm", 26th lEEE Canadian Conference Of
Electrical And Computer Engineering, Toranto, Ontario, 2013
Here, different types of controllers are designed to
[9] C. G. Lhee, J. S. Park, H. S. Ahn, and D. H. Kim "Sliding Mode - Like
balance a rotary inverted pendulum with L-shaped arm
Fuzzy Logic Control with Self -Tuning the Dead Zone Parameters",
structure. All the controllers, i.e., two loop PID, FSF and lEEE Transaction on Fuzzy Systems, vol. 9, no. 2, pp. 343-348,2001
LQR are simulated and successfully tested on the
experimental setup. From the obtained results it can be
[6)
Authorized licensed use limited to: Universidad Nacional Autonoma De Mexico (UNAM). Downloaded on March 22,2023 at 01:22:43 UTC from IEEE Xplore. Restrictions apply.