0% found this document useful (0 votes)
82 views5 pages

Unluturk 2013

Uploaded by

Rajat Singh
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)
82 views5 pages

Unluturk 2013

Uploaded by

Rajat Singh
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/ 5

Design and PID Control of Two Wheeled Autonomous Balance Robot

Ali UNLUTURK#1, Omer AYDOGDU#2, Ufuk GUNER*3


#
Department of Electrical and Electronics Engineering, Selçuk University
KONYA/TURKEY
1
aunluturk@selcuk.edu.tr, 2oaydogdu.selcuk.edu.tr
*
Electric-Electronic Engineer
ANKARA/TURKEY
3
gunerufuk@hotmail.com.tr

ABSTRACT greater maneuverability and thus access to places most


able- bodied people take for granted [9]. Two-wheeled
In this study, a two-wheeled autonomous balance robot has carries (Segway) used by ground staff can be seen generally
been designed and implemented practically. A visual in the markets, car parks and airports.
computer interface based on Qt-Creator has been created. In this study, a two-wheeled autonomous balance robot has
Thanks to the computer interface, different control been designed, having an interface by which different
algorithms can be performed on the robot easily, control control algorithms can be performed easily. To maintain
parameters can be set up online, filter algorithms in various itself in upright position, various controller algorithms have
structures can be tried and the reaction of these changeable been carried out on the robot and their effectiveness has
values to the system can be observed. The effects of some been researched. The details about mechanical and
controllers such as Proportional (P), Proportional-Integral mathematical modelling of designed balance robot are given
(PI), Proportional-Integral-Derivative (PID) on developed in section 2; electronic equipment and interface software are
robot have been viewed successfully. Kalman Filters have given in section 3. The results of the study and outcomes
been used for a stable control of the system and it has seen obtained are given in the last section.
that the system can balance itself for a long time with
optimum PID control parameters obtained. 2. MECHANICAL DESIGN AND MATHEMATICAL
MODELLING
Index Terms— Two-wheels Balancing Robot, PID
Controller, Kalman Filter, Qt Creator User Interface, Feedback 2.1. Mechanical Design
Control
Being a non-linear system, the robot’s mechanic design is
1. INTRODUCTION rather important. Thus very smooth light and durable
materials have been preferred for mechanical design of the
The research on a two-wheel inverted pendulum, which is robot and a suitable center of gravity has been created.
commonly known as the self-balancing robot, has gained Balance robot has an interconnecting two boards made up of
momentum over the last decade in a number of robotic fibreglass material. As shown in Fig. 1 bottom board
laboratories [1-4]. The dynamics of such a system are quite contains Direct Current (DC) motors which drive wheels
complex, so its motion planning presents a challenge [5-6]. directly, DC motor driver board and lithium polymer battery
Various control strategies had been proposed by numerous providing system’s energy. On the top board there are
researchers to control the two-wheeled balancing robot such STM32F103RB control board which has 32-bit Acorn
that the robot is able to balance itself [7]. Therefore, a two Reduced Instruction Set Computing (RISC) Machine
wheeled balancing robot needs a good controller to control (ARM) based microprocessor, interface adaptor and Motion
itself in upright position without the needs from outside. Processing Unit (MPU) 6050 balance sensor. General view
Nowadays various types of controllers were implemented on of the balance robot is shown in Fig. 1.
two wheeled balancing robot for example Linear Quadratic
Regulator (LQR), Pole-Placement Controller, Fuzzy Logic
Controller (FLC), PID Controller [8].
These capabilities have the potential to solve a number of
challenges in industry and society. For example, a motorized
wheelchair utilizing this technology would give the operator

978-1-4799-3343-3/13/$31.00 ©2013 IEEE 260 ICECCO 2013


In order to simplificate controller design, the nonlinear
equations of motion have to be linearized. The desired state
of the system is the one in which the angle is small and
close to 0 degrees. Therefore, assuming sin θ = θ, cos θ =
1 and θ̇ = 0 we get the following linearized equations

( + ) ̈ =− ̈+ −2 (8)

Fig. 1. General view of the balance robot + + ̈= − ̈− ̇ (9)

2.2. Mathematical Modelling Using the linear equation system gained in this paper, state-
space form has been obtained and dynamic equations of the
Dynamic performance of the balance robot depends on balance robot have been created.
system’s dynamic model and control algorithm’s efficiency
[10]. There are lots of studies about getting dynamic 3. ELECTRONICS AND SOFTWARE
equations of some system like that. In this study, we dealt
with the balance robot’s dynamic model in reference [4]. 3.1. Electronics

∑ = 0: ̈=− + − ̇ (1) In order that two-wheeled autonomous balance robots stand


in upright position, it’s necessary to measure the tilt angle
∑ between balance robot and horizontal plant. In applications,
= 0: ̈= − − (2)
various sensors are used to measure this angle. For this aim,
Light Dependent Resistor (LDR), infrared, variable resistors
∑ = 0: ̈ = − (3) and Inertial Measurement Unit (IMU) sensors are used
commonly.
Which describe the dynamics of the wheel, and At the same time, some information such as torque on axis
of oscillation, force component of acceleration of gravity on
∑ = 0: ̈ = (4) vertical and horizontal axis need to be known to be used for
control algorithms.
∑ = 0: ̈ = − (5) In this study, MPU 6050 inertial measurement sensor in Fig.
3 has been used. In this integrated circuit, three-axis
Which describe the dynamics of the inverted pendulum. gyroscope and acceleration sensor exist as a whole. The
After combining equations 1-5, two equations of motions of sensor we used can give torque data and acceleration data.
are obtained: Integrated sensor has been connected to ARM based
processor via Inter-Integrated Circuit (I2C) interface
( + ) ̈ =− ̈ cos + sin − 2 (6) software. Acceleration sensor is ±2g sensitive and moment
sensor is 250 degree/second sensitive.
+ + ̈= − cos ̈+ sin ̇ − ̇ (7)

In Fig. 2, there are forces and torques which act on the


wheel and inverted pendulum.

Fig. 3. MPU 6050 structure of inertial moment sensor

ARM based STM32F103RB development board has been


used in the designed balance robot control system in order to
get data from sensors and process it. The development board
contains an ARM based processor operating at 72 Mega
Hertz (MHz) frequency, having high-speed embedded
memories (Flash memory up to 128 Kbytes and
Fig. 2. Forces and torques acting on the wheel and inverted pendulum Synchronous Dynamic Random Access Memory) up to 20

261
Kbytes) and 32-bit RISC architecture. There are 12-bit algorithms can be compared easily in terms of system
Analog Digital Converters (ADCs), three general purpose reaction.
16-bit timers and also one Pulse With Modulation (PWM)
timer. In addition, it has standard and advanced
communication interfaces: up to two I2Cs and Serial
Peripheral Interface (SPIs), three Universal Synchronous
Receiver/Transmitter (USARTs), an Universal Serial Bus
(USB) and a Controller Area Network (CAN). In Fig. 4 the
development board is shown in detail.

Fig. 6. Balance robot control interface

4. CONTROLLER DESIGN AND SIMULATION

In this part, the controller applied on the balance robot has


been researched in detail and the implementation results of
Fig. 4. STM32F103RB development board
these control designs have been included in. Also, there is a
constant bias drift in base of data of moment sensor and it
The development board imports sensor, filters data via
has been seen that accelerometer sensor has been affected
Kalman Filter and sends PWM signal to motor driving
from noise. So it’s necessary to unify two sensor data by
circuit calculating controller outputs of P, PI, PID control
filtering them (sensor fusion) to determine the right angle.
algorithms. Principle structure of the control system
Kalman Filters have been used to filter sensor data and
aforementioned has been summarized in Fig. 5.
make them more reliable.
As shown in Fig. 7, feedback control algorithm has been
used for system control. In the system, P, PI, PID outputs
have been turned into PWM value. Using the angle
determined by Kalman Filter, and then it has been
performed for motor drive circuit. After that, new angles
obtained by means of feedback of system have been
Fig. 5. Principle structure of the control system compared again via Kalman Filter and it has been aimed that
the robot can stand in upright position.
Besides, there are two identical Faulhaber, 12 Volt 400
Revolutions Per Minute (RPM) DC motor and L298
integrated DC motor driving board to drive these motors via
PWM. For system power supply 11.1 V lithium polymer
battery has been used.

3.2. Software

In the designed balance robot control system, there is a


visual computer interface which provides that designed
control algorithms can be performed easily, system response
can be observed online and control parameters can be
changed online when the robot is working. Computer Fig. 7. Block diagram of the feedback control system
interface, its general view is given in Fig. 6, is written in Qt-
Creator visual interface development environment. With the Firstly, in the system P controller has been used and balance
help of interface, PID control parameters can be changed in robot’s reaction to the controller has been viewed. As seen
real time, system reaction against parameter changes can be in Fig. 8, system reaction has been observed when Kp=77
observed online. So, various controllers such as P, PI, PID, by means of robot control interface. As seen in the figure,
FLC can be performed easily on the robot. Filtration robot can balance itself just 1-2 second due to its inertial
algorithms can be operated and deactivated easily and moment and frictional force applied by ground

262
parameters is over 4.10, it has seen that these reactions have
become more speed. But, this high sensitivity has caused
knocking and prevented the robot’s balancing itself for a
long time.

Fig. 8. When Kp=77, Ki=0 ve Kd=0 system response

Because these proportional controllers cannot get zero


steady-state error inherently, the expected balance couldn’t
be realized in our system.
The system has been searched for PI control by adding Ki Fig. 10. When Kp=51, Ki=45 ve Kd=4.10 system response
parameters along with Kp parameters to the system.
Experimentally, Kp and Ki parameters have been tried on 5. CONCLUSIONS
balance robot system. For example, system reaction is more
stable than previous one when Kp=51 and Ki=45 as seen in In this paper, a two-wheeled autonomous mobile robot
Fig. 9. The robot has tried to keep its balance and achieved system has been designed and implemented. The system has
that practically. It has given soft reaction to these chosen flexibility, by means of that various control algorithms can
controller parameters and tried to maintain itself in be performed easily and it has Qt-Creator based computer
vertically upright position. When appropriate Kp and Ki interface when user-friendliness is taken into account. It has
values are realized, it has seen that the robot keeps its been aimed that robot can balance itself in upright position
balance. and to achieve that various controllers such as feedback P,
However, the supervised system can’t balance itself for a PI, PID control have been implemented. Observing robot’s
long time because the integral term in the system sums the reactions to these controllers, the best controller has been
accumulated error over time. determined for robot’s balance in upright position.
As a result of the study, it has seen that P controller is not
enough for robot’s balance. When appropriate Kp and Ki
gain values are chosen for PI controller, it has seen that the
robot can balance itself for a short time and try to maintain
its balance in a certain area by swinging. As for PID
controller, the robot can stand in upright position longer if
the appropriate Kp, Ki and Kd gain values are chosen.
Finally, robot can balance itself best by using PID control
method. Various controller parameters have been
determined easily using the designed visual interface
program and robot system has balanced itself successfully.

6. REFERENCES

[1] H. Bin, L. W. Zhen, and L. H. Feng, “The Kinematics Model of


a Two-Wheeled Self-Balancing Autonomous Mobile Robot and Its
Fig. 9. When Kp=51, Ki=45 ve Kd=0 system response Simulation,” Computer Engineering and Applications (ICCEA),
2010 Second International Conference on, Vol. 2, pp. 64-68, Bali,
Island, March 2010.
As shown in Fig. 10, when Kp=51, Ki=45 and Kd=4.10 for
PID control, the system has resisted to falling down and [2] S. W. Nawawi, M. N. Ahmad, and J. H. S. Osman, “Real-Time
maintained itself in upright position, reacting to very small Control System for a Two-Wheeled Inverted Pendulum Mobile
changes. When Kp=51 and Ki=45 are fixed and Kd

263
Robot,” Proceedings of World Academy of Science, Engineering
and Technology, Vol. 29, May 2008.

[3] N. M. Abdul Ghani, N. I. Mat Yatim, and N. A. Azmi,


“Comparative Assessment for Two Wheels Inverted Pendulum
Mobile Robot Using Robust Control,” Control Automation and
Systems (ICCAS), 2010 International Conference On, pp. 562-567,
Gyeonggi-do, Korea, October 2010.

[4] T. Tomislav, D. Andrea, and C. Mladen, “Self-Balancing


Mobile Robot Tilter,” Transactions of FAMENA Academic
Journal, Vol. 36, pp. 23-32, July 2012.

[5] A. Ratajczak and K. Tchon, “Motion Planning of a Balancing


Robot with Threefold Sub-tasks: An Endogenous Configuration
Space Approach,” Robotics and Automation (ICRA), 2011 IEEE
International Conference on, pp. 6096-6101, Shanghai, China,
May 2011.

[6] N. G. M. Thao, D. H. Nghia, and N. H. Phuc, “A PID


Backstepping Controller For Two-Wheeled Self Balancing Robot,”
Strategic Technology (IFOST), 2010 International Forum On, pp.
76-81, Ulsan, South Korea, October 2010.

[7] A. N. K. Nasir, M. A. Ahmad, and R. M. T. Raja Ismail, “The


Control of a Highly Nonlinear Two-wheels Balancing Robot: A
Comparative Assessment between LQR and PID-PID Control
Schemes,” World Academy of Science, Engineering and
Technology, Vol. 70, pp. 227-232, November 2010.

[8] O. Y. Chee and M. S. B. Abidin, “Design and Development of


Two Wheeled Autonomous Balancing Robot,” Research and
Development, 2006. SCOReD 2006. 4th Student Conference on,
pp. 169-172, Selangor, Malaysia, June 2006.

[9] K. M. Goher and M. O. Tokhi, “Development, Modelling and


Control of a Novel Design of Two-Wheeled Machines,” Cyber
Journals: Multidisciplinary Journals in Science and Technology,
Journal of Selected Areas in Robotics and Control (JSRC), pp. 6-
16, December 2010.

[10] A. Solerno and J. Angeles, “A New Family of Two Wheeled


Mobile Robot: Modelling and Controllability,” Robotics, IEEE
Transactions on, Vol. 23, pp. 169-173, February 2007.

264

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy