Professional Documents
Culture Documents
Abstract-- One of the challenging tasks concerning two wheeled [14]. These linear controllers performed well within the
inverted pendulum (TWIP) mobile robot is balancing its tilt to operating region that they are linearized, and also provide
upright position, this is due to its inherently open loop instability. acceptable results in other regions but they operating ranges
This paper presents an experimental comparison between model are restricted.
based controller and non-model based controllers in balancing the
To overcome the restrictions of linear controllers, other
TWIP mobile robot. A Fuzzy Logic Controller (FLC) which is a
controllers apart from linear were also presented in literature
non-model based controller and a Linear Quadratic Controller
(LQR) which is a model-based controller, and the conventional
controller, Proportional Integral Derivative (PID) were
implemented and compared on a real time TWIP mobile robot.
The FLC controller performance has given superior result as
compared to LQR and PID in terms of speed response but
consumes higher energy.
1. INTRODUCTION
Fig. 1. TWIP Mobile Robot
A two wheeled inverted pendulum (TWIP) mobile robot as
shown in Fig. 1 is a mechanical system with nonlinear [15-17], in [15] three fuzzy logic controllers (FLC) were
dynamics. It has three degrees of freedom but only two wheels proposed based on TS fuzzy and Mamdani architectures for
are controlled by the two motors to control all the degrees of balancing the robot. An adaptive control was implemented in
motion [1]. It has the advantage of turning on the spot [2] and [16] using neural network for balancing the robot, in [17]
due to its small body, the robot can enter to the place where the adaptive and robust controllers were presented. All these
conventional four wheels vehicle cannot. controllers give desired results.
Accurate model of systems is required to design a controllers In [18], a FLC and PID controller for balancing the robot was
especially if the controllers are model based controllers [3]. presented and compared. The FLC performed better in terms of
Many researchers have worked on modelling and control of the settling time and less overshoot, while the PID had shown to
TWIP mobile robot. Euler Lagrange methods are implemented have better performance in terms of steady state error and rise
in [1, 2, 4, 5], Newton-Euler equations of motion method is time. In Partial feedback linearization (PFL) and LQR control
used in [6, 7]. In [8, 9] the modelling of TWIP is carried out schemes, the comparison made in [9], had shown that the LQR
using Kane’s method of modelling. A Takagi–Sugeno (TS) controller performed better than the PFL controller in terms of
fuzzy model was used in [10]. All models developed using the settling time, percent overshoot and the required starting
various methods were able to emulate the dynamics torque, while the PFL controller performed better in terms of
characteristics of the TWIP to some extent, the Kane’s method rise time. Comparative assessment between LQR and PID-PID
gives best model presentation. scheme was investigated where LQR controller had shown
In the control of TWIP tilt balancing and position and velocity better performance as compared to PID in [19].
tracking, linear and non-linear controllers were used Based on this, the performance of a linear and model
extensively, [1, 2, 9, 11, 12]. In [1] linear quadratic regulator based controller LQR, a non-model based intelligent controller
(LQR) was developed for balancing and velocity control of the fuzzy logic and a conventional PID controller, will be assessed
robot, in [2, 9] partial feedback linearization method was experimentally in balancing the TWIP mobile robot. The rest
employed, pole placement controllers were used in [11, 12]. of the paper is organized as follows; section 2 describes the
Combination of LQR and proportional integral derivative modelling of the robot, section 3 describes the design of the
(PID) controller was investigated in [13], also a multi operating controllers, section 4 give the explanation on the experimental
point model based control using pole placement is presented in setup, section 5 includes the experimental results and the
Table I
TWIP parameters and variables
PARAMETER Symbol VALUE UNITS
Mass of main body Mb 13. 3 kg
Mass of each wheel Mw 1.89 kg
Center of mass (gravity) from base d 0.13 m
Diameter of wheel R 0.130 m
Distance between the wheels L 0.325 m
Moments of inertia of body wrt x-axis Ix 0.1935 kgm2
Moments of inertia of body wrt z-axis Iz 0.3379 kgm2
Moments of inertia of wheel about the center Ia 0.1229 kgm2
Acceleration due to gravity g 9.81 ms-2
* + ̇ * + ̇ [( ) ( )] ̇ ̇ ̇
Considering x axis:
( ) * + ̇ ̇
̇
( ) * + ̈ ̇ ̈
̇
And from Eq. (2)
* + ̈ ̇ ̈
[ ]* +
* +
Where [ ] which becomes
After simplification:
( )
̈ ̇
For x coordinate:
From Eq. (8)
* ̇ ( )+ ̈
̈
* ̇ ( )+ ̈
̈ [ ] ̇
Now combining the terms with ̈ and making it the subject of the formula yields
( )
̈ ̇
̈
* ( ) +
[ ] ̇ ̇
* ( ) +
146003-8383-IJMME-IJENS © June 2014 IJENS
IJENS
International Journal of Mechanical & Mechatronics Engineering IJMME-IJENS Vol:14 No:03 65
To linearize the non-linear model we assume the operating point to be where the tilt angle . Hence ,
, ̇ , ̇ . Therefore Eq. 15, 18, and 20 becomes;
̈
̈
* ( ) +
Substituting the values from the robot parameters shown in Table 1, Eq. 21-23 becomes;
̈
̈
̈
In state-space form;
[ ] [ ]
Where ̇ ̇ ̇
Eq. 15, 18, and 20 are the dynamical model equations of the The gain of the control law is obtained
TWIP derived using Euler Lagrange method. by application of the performance index of Eq. (28), and using
the solution of algebraic Riccati equation given in Eq. (30)
3. CONTROLLERS DESIGN
This section describes the detail design of control strategies for
After experimental tunings the Q and R were found to be, Q =
model based state feedback LQR controller, non-model based
diag(20 0.1 15 0.1) and R = 5. The controller gain K is
fuzzy logic controller and conventional PID controller for
computed using MATLAB as
balancing the TWIP robot.
a. State feedback LQR controller
b. Fuzzy Logic controller
This type of controller uses linear mathematical model of a
A fuzzy logic is a metaheuristic technique, it is used as a
system in state-space form. An optimal linear quadratic
control algorithm based on a linguistic control strategy, and
regulator (LQR) estimate the controllers gain using system
does not need any mathematical model [21]. While the others
model [20]. The aim of the controller is to minimize the cost
control system use model to provide a controller for the plant,
function;
it only uses simple mathematical calculation to simulate the
∫
expert knowledge. A Fuzzy logic controller design involves the
Q is a positive-definite (or positive-semi definite) Hermitian following:
and real symmetric matrix and R is a positive-definite i. Selection of type and number of membership function.
Hermitian and real symmetric matrix. ii. Selection of rule base.
For the TWIP mobile robot the linearized model is given in Eq. iii. Inference mechanism and,
(27) which comprises all the six states of the robot. For this iv. Defuzzification process.
controller design, only four states will be considered, the yaw The fuzzy controller considered in this paper has two inputs
angle and the velocity of the yaw angle will be neglected. The and one output, the inputs are the tilt angle ( ) of the robot
control scheme is as presented in [1]. Therefore the linearize
with a range [-80 80], and the tilt rate ̇ with a range [-200
model is given by Eq. (29)
200], the output of the fuzzy control is the signal generated
based on decisions as design using rule base with range of [-
[ ] 100 100]. To balance the TWIP in upright position, seven
triangular membership function and rule base are developed for
both inputs and the output, the system has 49 possible control
[ ] signals (rule based) as illustrated in Table II.
meters (m)
Angle (degree)
20 Fuzzy LQR
LQR 0
0
-0.2
-20
-0.4
-40 5 10 15 20 25 30
5 10 15 20 25 30 time (sec)
time (sec)
Fig. 7. Horizontal position of TWIP
Fig. 6. Tilt Position of the TWIP
Control Signal for 3 controllers
10
Current (A)
PID
-10 Fuzzy
LQR
-20
5 10 15 20 25 30
time (sec)
Fig. 7. Current consumed by motor
Table III
Comparative assessment of controllers
Controllers Rise time (s) Settling time (s) % Overshoot Current (A) Horizontal
[Max] distance
absolute(m)
FLC 1.25 2.5 37 8.7 0.05
LQR 0.8 4.2 80 7.5 0.2
PID 0.8 6.5 90 7.5 0.23
6. CONCLUSION ACKNOWLEDGEMENTS
The dynamical model of a TWIP mobile robot was derived These authors are grateful to the Ministry of Higher
using Euler Lagrange approach. Comparison between model Education (MOHE) and Universiti Teknologi Malaysia for the
based and non-model base controllers and also conventional financial support through the GUP research fund, Vote
PID controller for a balancing the robot is also presented. Q.J130000.2523.05H40 and special thanks to Bayero
Practical experiments were carried out to test the controllers University, Kano, Nigeria for their support.
and the results are shown and compared. FLC controller which
is non-model based performs better than the LQR and PID REFERENCE
controllers in terms faster response and less overshoot, but has [1] Y. Kim, S. Kim, and Y. Kwak, "Dynamic Analysis of a
Nonholonomic Two-Wheeled Inverted Pendulum Robot," Journal
higher energy consumption than the other two.
146003-8383-IJMME-IJENS © June 2014 IJENS
IJENS
International Journal of Mechanical & Mechatronics Engineering IJMME-IJENS Vol:14 No:03 68
of Intelligent and Robotic Systems, vol. 44, pp. 25-46, 2005/09/01 for Speed Control of DC Motor Drive," International Journal of
2005. Electrical and Computer Engineering, vol. 5, pp. 287-291, 2010.
[2] K. Pathak, J. Franch, and S. K. Agrawal, "Velocity and position [22] Microcontroller. (2010, 10/09/2013). FiO Std Datasheet Available:
control of a wheeled inverted pendulum by partial feedback http://site.gravitech.us/DevelopmentTools/Matlab-Simulink/FiO-
linearization," Robotics, IEEE Transactions on, vol. 21, pp. 505- Std/fiostdv20_datasheet.pdf
513, 2005. [23] Cytron. (2010). B016 Rotary Encoder. Available:
[3] A. Calanca, L. M. Capisani, A. Ferrara, and L. Magnani, "MIMO www.cytron.com.my/viewProduct.php?pcode=B-106-23983
Closed Loop Identification of an Industrial Robot," Control Systems [24] Cytron. (2011). MDS40A SmartDrive40. Available:
Technology, IEEE Transactions on, vol. 19, pp. 1214-1224, 2011. www.cytron.com.my/viewProduct.php?pcode=MDS40A
[4] Y.-S. Ha and S. i. Yuta, "Trajectory tracking control for navigation [25] I. Allegro MicroSystems. (2011). ACS756 Current Sensor IC.
of the inverse pendulum type self-contained mobile robot," Available: www.allegromicro.com
Robotics and Autonomous Systems, vol. 17, pp. 65-80, 1996. [26] https://www.aimagin.com/amg-imu-9a.html. (2013, amg-imu-9a
[5] R. Xiaogang and C. Jing, "B-2WMR System Model and Sensor.
Underactuated Property Analysis," in Automation and Logistics,
2007 IEEE International Conference on, 2007, pp. 580-585.
[6] K. M. Goher, M. O. Tokhi, and N. H. Siddique, "Dynamic
Modeling and Control of a Two Wheeled Robotic Vehicle with
Virtual Payload," ARPN Journal of Engineering and Applied
Sciences, vol. 6, pp. 7-41, 2011.
[7] L. Jingtao, X. Gao, H. Qiang, D. Qinjun, and D. Xingguang,
"Mechanical Design and Dynamic Modeling of a Two-Wheeled
Inverted Pendulum Mobile Robot," in Automation and Logistics,
2007 IEEE International Conference on, 2007, pp. 1614-1619.
[8] K. Thanjavur and R. Rajagopalan, "Ease of dynamic modelling of
wheeled mobile robots (WMRs) using Kane's approach," in
Robotics and Automation, 1997. Proceedings., 1997 IEEE
International Conference on, 1997, pp. 2926-2931 vol.4.
[9] M. Muhammad, S. Buyamin, M. N. Ahmad, S. W. Nawawi, and Z.
Ibrahim, "Velocity Tracking Control of a Two-Wheeled Inverted
Pendulum Robot: a Comparative Assessment between Partial
Feedback Linearization and LQR Control Schemes," International
Review on Modelling and Simulations, vol. 5, pp. 1038-1048, 2012.
[10] M. Muhammad, S. Buyamin, M. N. Ahmad, and S. W. Nawawi,
"Takagi-Sugeno fuzzy modeling of a two-wheeled inverted
pendulum robot," Journal of Intelligent & Fuzzy Systems, vol. 25,
pp. 535–546, 2013.
[11] F. Grasser, A. D'Arrigo, S. Colombi, and A. C. Rufer, "JOE: a
mobile, inverted pendulum," Industrial Electronics, IEEE
Transactions on, vol. 49, pp. 107-114, 2002.
[12] S. W. Nawawi, M. N. Ahmad, and J. H. S. Osman, "Real-time
control of a two-wheeled inverted pendulum mobile robot,"
International Journal of mathematical and Computer Sciences, pp.
214-220, 2008.
[13] S. Liang and G. Jiafei, "Researching of Two-Wheeled Self-
Balancing Robot Base on LQR Combined with PID," in Intelligent
Systems and Applications (ISA), 2010 2nd International Workshop
on, 2010, pp. 1-5.
[14] M. Muhammad, S. Buyamin, M. N. Ahmad, S. W. Nawawi, and A.
A. Bature, "Multiple Operating Points Model-Based Control of a
Two-Wheeled Inverted Pendulum Mobile Robot," International
Journal of Mechanical & Mechatronics Engineering, vol. 13, pp. 1-
9, 2013.
[15] H. Cheng-Hao, W.-J. Wang, and C. Chih-Hui, "Design and
Implementation of Fuzzy Control on a Two-Wheel Inverted
Pendulum," Industrial Electronics, IEEE Transactions on, vol. 58,
pp. 2988-3001, 2011.
[16] T. Ching-Chih, H. Hsu-Chih, and L. Shui-Chun, "Adaptive Neural
Network Control of a Self-Balancing Two-Wheeled Scooter,"
Industrial Electronics, IEEE Transactions on, vol. 57, pp. 1420-
1428, 2010.
[17] L. Zhijun and L. Jun, "Adaptive Robust Dynamic Balance and
Motion Controls of Mobile Wheeled Inverted Pendulums," Control
Systems Technology, IEEE Transactions on, vol. 17, pp. 233-241,
2009.
[18] A. N. K. Nasir, M. A. Ahmad, R. Ghazali, and N. S. Pakheri,
"Performance Comparison between Fuzzy Logic Controller (FLC)
and PID Controller for a Highly Nonlinear Two-Wheels Balancing
Robot," in Informatics and Computational Intelligence (ICI), 2011
First International Conference on, 2011, pp. 176-181.
[19] A. N. K. Nasir, M. A. Ahmad, and R. M. T. R. Ismail, "The Control
of a Highly Nonlinear Balancing Robot: A Comparative
Assessment between LQR and PID-PID Control Schemes,"
International Journal of Computer and Communication
Engineering, pp. 227-232, 2010.
[20] N. S. Nise, Control Systems Engineering, 6 ed.: John Wiley &
Sons, Inc, 2011.
[21] S. R. Khuntia, K. B. Mohanty, S. Panda, and C. Ardil, "A
Comparative Study of P-I, I-P, Fuzzy and Neuro-Fuzzy Controllers
146003-8383-IJMME-IJENS © June 2014 IJENS
IJENS