Escolar Documentos
Profissional Documentos
Cultura Documentos
Abstract
In this article, a novel real-time artificial neural networkbased adaptable switching dynamic controller is developed and
practically implemented. It will be used for real-time control of two-wheeled balance robot which can balance itself upright
position on different surfaces. In order to examine the efficiency of the proposed controller, a two-wheeled mobile balance
robot is designed and a test platform for experimental setup is made for balance problem on different surfaces. In a developed
adaptive controller algorithm which is capable to adapt different surfaces, mean absolute target angle deviation error, mean
absolute target displacement deviation error and mean absolute controller output data are employed for surface estimation by
using artificial neural network. In a designed two-wheeled mobile balance robot system, robot tilt angle is estimated via Kalman
filter from accelerometer and gyroscope sensor signals. Furthermore, a visual robot control interface is developed in C
software development environment so that robot controller parameters can be changed as desired. In addition, robot balance
angle, linear displacement and controller output can be observed online on personal computer. According to the real-time
experimental results, the proposed novel type controller gives more effective results than the classic ones.
Keywords
Adaptive switching controller, ANN-based surface estimation, sensor fusion, two-wheeled mobile balance robot
Creative Commons CC BY: This article is distributed under the terms of the Creative Commons Attribution 3.0 License
(http://www.creativecommons.org/licenses/by/3.0/) which permits any use, reproduction and distribution of the work without
further permission provided the original work is attributed as specified on the SAGE and Open Access pages (https://us.sagepub.com/en-us/nam/
open-access-at-sage).
2 International Journal of Advanced Robotic Systems
Figure 1. The structure of TWMBR: (a) front view, (b) top view, (c) side view and top view of TWMBR on the coordinate system.
TWMBR: two-wheeled mobile balance robot.
Many of these studies published are based upon simulation the mathematical analysis for developed TWMBR sys-
results and theoretical analysis. Because of their non-linear tem. The fourth section describes dynamic surface esti-
structure, that kind of system dynamics are rather complex mator on the control system and controller mechanism
and their motion planning is very hard.6 However, many of the robot system. The fifth section presents experi-
researchers have built real-time TWMBR systems and mental results of the balance robot, and the last section
implemented their own control algorithms on those robot gives the study results.
systems. For example, they have developed a robot called
JOE in Industrial Electronic Laboratory in Sweden Federal
Structure of the TWMBR and the robot
Technology Institute.7 Kuindersma et al. working for Per-
ceptual Robotic Laboratories have studied a humanoid U control hardware
Bot-5.8 National Aeronautics and Space Administrations For TWMBRs mechanical design, an appropriate equili-
(NASAs) Robonaut, another two-wheeled robot, has been brium point must be tuned in order to control the robot
made by Defense Advanced Research Projects Agency because of its non-linear structure. The hardware of the
(DARPA) with the cooperation of NASA.9 Cardea, devel- robot was built regarding all the requirements. As shown
oped by Massachusetts Institute of Technology, is another in Figure 1(a) and (b), the developed TWMBR has three
sample of TWMBR.10 The two-wheeled vehicle called B2 layers which make it lighter and has a good centre of
has been designed as an alternative automatic commercial gravity. At the bottom layer, there are two identical per-
transportation system.11 Numerous controller structures are manent magnet DC motors coupled to a gearbox for each
created for the control and balance of TWMBR systems wheel and with an integrated encoder. There is also micro-
such as classical control,12 proportional integral-velocity electro-mechanical systems (MEMS)-based inertia mea-
control,13 Fuzzy logic-based control,14 neural network con- surement unit sensor which contains gyroscope and
trol,3 sliding mode control4 and adaptive control.15 accelerometer together. Cortex M3 microprocessorbased
As seen in the literature studies above, most of the development board which controls all units of the robot
studies about TWMBR have been made on flat and firm system and provides data communication by using Blue-
grounds. In addition, Kim and Lee have developed tooth wireless unit. In the middle layer, there is a DC
a magnet-wheeled mobile robot moving on curved motor driver circuit which can control two identical DC
surfaces.16 Qiao et al. have proposed wheel-legged robot motors moving independently at the robot system. At the
with a front module, a rear module and an active waist top layer, there is a lithium polymer battery supplying
joint in order to make the robot pass through the curved energy for the whole system. Figure 1(c) shows the side
narrow channel.17 view and top view of TWMBR on coordinate system for
In this article, balance performance of the robot is mathematical analysis.
observed on loose surface such as sand, pebble and soil. The general block diagram given in Figure 2(a) shows
Besides, artificial neural network (ANN)-based real-time the detailed hardware component of the developed
switching dynamic controller, which is applied on the TWMBR control system. As shown in Figure 2(a), sensor
robot to solve balance problem on such surfaces, is a data are taken for the robot control on I2C data line by
novel structure. Cortex M3 microprocessor. Furthermore, left and right
This article is organized as follows: The second sec- encoder data are taken on timer 1 and timer 2 input ports.
tion describes structure of the TWMBR, the mobile The robot control interface was designed in Visual C
robot hardware components and the robot control inter- software development environment for online control of
face on personal computer (PC). The third section gives TWMBR remotely, for online change of all robot control
Unluturk and Aydogdu 3
Figure 2. (a) The general block diagram of TWMBR control hardware; (b) robot balance test platform. TWMBR: two-wheeled mobile
balance robot.
parameters and to observe and make sense of robots reac- Table 1. Physical parameters of TWMBR.
tion to different surfaces diagrammatically on PC by using
Symbol Description Unit
the wireless communication unit. Mathematical basis of
parameter adaptation algorithm was built with these online g Gravitational acceleration m/s2
data and performed real-time through the codes of Cortex m Wheel weight (for each of kg
M3 microprocessor. Many real-time experiments were wheel)
R Wheel radius m
done to enable robots stable balance on various surfaces
Jw mR 2 =2 Wheel inertia moment (one kg m2
by means of the designed user interface. wheel)
On the designed TWMBR control system, MEMS-based M Body weight kg
sensor groups were used, which include three-axis gyro- w Body width m
scope sensors and three-axis accelerometer sensors. The D Body depth m
information how we achieved sensor fusion and sensor H Body height m
calibration for TWMBR is given in detail in the work by L H=2 Distance of the centre of mass m
J ML 2 =3 Body pitch inertia moment kg m2
Guner et al.18 Additionally, designed robot balance test
J; Mw 2 D 2 =12 Body yaw inertia moment kg m2
platform is 70 cm 210 cm 4 cm of sizes. It was divided Jm DC motor inertia moment kg m2
into three parts and each part was filled with soil, pebble Rm DC motor resistance O
and sand as shown in Figure 2(b). Kb DC Motor back EMF constant Vs/rad
Kt DC motor torque constant Nm/A
Bm Rotating damper Nms/rad
Mathematical model of TWMBR system Lm DC motor inductance H
n N2 : N1 Gear ratio
Mathematical dynamic modelling of TWMBR is rather fm Friction between body and DC
important in terms of stability analysis and system simula- motor
tion. It is also very important that control algorithms are fw Friction between wheel and
created according to these model parameters. Many floor
researchers generally studying in the field of TWMBR TWMBR: two-wheeled mobile balance robot; Electromotive Force: EMF.
obtain the robots non-linear dynamic model by utilizing
the equations such as Lagrange-Euler or Newton-Euler. In
this article, TWMBR system is modelled based on
Lagrange-Euler equations referred as Yamamoto.19 Figure Lagrange method. If TWMBRs front becomes positive
1(c) shows coordinate system of side and top views of x-axis and t 0, balance equation for each coordinate will
TWMBR. In Figure 1(c), xb , yb , zb denote the systems be as given below
centre of gravity, xm , ym , zm denote the robot wheels centre 1 R
of gravity and l; r defines left and right wheel angle on the ; ; l r ; r l (1)
2 w
coordinate system. It is necessary to specify the robots
physical parameters very well to get the TWMBRs equa- where the robots right and left wheels mean angle is defined
tion of motion properly. Physical parameters of the applied by and body yaw angle by; . As shown in Figure 1(c), shaft
balance robot are given in Table 1. centre to which wheels are integrated (xm ; ym ; zm ), the posi-
Considering the coordinate system in Figure 1(c) and tion of left wheel (xl ; yl ; zl ) and right wheel (xr ; yr ; zr ) on
physical parameters of balance robot in Table 1, the coordinate system and robots bodyweight centre
TWMBRs equations of motion were derived by using (xb ; yb ; zb ) are expressed in equations (2) to (5), respectively
4 International Journal of Advanced Robotic Systems
Z Z
Fr nKt ir fm _ _ r fw _ r (15)
xm ; ym ; zm x_m dt; y_m dt; R ;
F nKt il nKt ir fm _ _ l fm _ _ r (16)
x_m ; y_m R_ cos; ; R_ sin; (2)
where il; r denotes left and right motor current and vl; r
w denotes left and right motor voltage. In the study, we will
xl ; yl ; zl xm sin; ; ym cos; ; zm (3)
2 2 evaluate DC motor equation utilizing the relation between
w w il; r current and vl; r voltage. If we neglect the frictions
xr ; yr ; zr xm sin; ; ym cos; ; zm (4)
2 2 inside the motor (Bm ) and motor inductance (Lm ), the DC
motor current will be as in equation (17)
xb ; yb ; zb
xm L sin cos; ; ym L sin sin; ; zm Lcos Vl; r Kb _ _ l; r
il; r (17)
Rm
(5)
Using equation (17), the generalized forces are
where denotes body tilt angle. The robots energy equa-
expressed as follows
tions can be defines as
1 1 F vl vr 2 fw _ 2_ (18)
T 1 mx_l2 y_l2 z_l2 mx_r2 y_r2 z_r2
2 2 F vl vr 2 _ 2_ (19)
1
Mx_b2 y_b2 z_b2 (6) w w2
2 F; vr vl 2 fw ;_ (20)
1 2 1 2 1 1 2 1 2R 2R
2
T2 Jw _ l Jw _ r J _ J;;_ n 2 Jm _ l
_ 2
2 2 2 2 2 where nK nKt Kb
Rm ; Rm f m .
t
Figure 3. TWMBRs block diagram of adaptive control with switching. TWMBR: two-wheeled mobile balance robot.
Figure 4. Change in (a) tilt angle, (b) linear displacement, (c) controller output on three floors.
Figure 5. (a) MATADE-MATDDE-MACO data on three floor; (b) ANN model of TWMBR control system. MATADE: mean absolute
target angle deviation error ; -MATDDE: mean absolute target displacement deviation error; MACO: mean absolute controller output;
ANN: artificial neural network; TWMBR: two-wheeled mobile balance robot.
Robot parameters
for soil, pebble and sand floor are specified for this goal as to the PID controller test parameter such as Kpt 29;
given in Figure 3. Kit 12; Kdt 9 obtained for soil and data about robot are
transferred to computer via bluetooth unit on the robot.
Firstly, as shown in Figure 4(a), the robots tilt angle; Figure
ANN-based adaptation mechanism 4(b), the distance it takes; and Figure 4(c), controller output
In the study, the robots real-time balance experiments are u t; 1; 2; 3 change in terms of time are observed
done on three different floors which have soil, pebble and on three surfaces for 20 s without any external factor. As
sand on it. During these experiments, actions of the robot Figure 4 shows, the reaction of the robot to different floors
are analysed considering data such as tilt angle t, linear is not the same.
displacement of robot X t and plant input u t for three The robots centre of gravity is 0 as a result of experi-
different surfaces. The action of the robot on each floor mental tests. Therefore, it was chosen as Target 0 . In
(soil, pebble and sand) is analysed one by one referring this article, to overcome this problem, an ANN-based
Unluturk and Aydogdu 7
Figure 6. Change in (a) tilt angle, (b) linear displacement and (c) controller output on three floors.
adaptation mechanism was designed. For the designed These data are classified with ANN in order to define the
parameter adaptation mechanism, the balance state of floor on which the robot stands. After surface classification,
the robot on each floor was observed with the same the prediction of the floor is made by parameter adaptation
controller parameter for 2 min without having any mechanism. The model of ANN structure used for this
external factor, and for each floor, 12,000 data were study is shown in Figure 5(b).
obtained totally. Because that the robot system actions That ANN model is capable of evaluating input data of
are time-variable and non-linear, the data are re-evaluated the robot and defining its ground. Also, three output signals
with the method of systematic sampling (N 600). 1; 2; 3 making controller choice for three surfaces
The equations about mean absolute target angle devia- (pebble is 1, sand is 2 and soil is 3) are obtained. In the
tion error (MATADE), mean absolute target displace- study, it is chosen that hidden neuron number (HNN) as 4,
ment deviation error (MATDDE) and mean absolute 5, 6, 7, 8, 9, 10, learning rate (LR) as 0.2, 0.4, 0.6, 0.8, 1.0,
controller output (MACO) are given in equations 1.2 values, feature number as 3, target stopping criteria as
(2224), respectively 0.001 accuracy value or 1000 iteration number and the
momentum constant as 0.9 to determine the appropriate
1X N
ANN structure. Also, three different activation functions
MATADE j Target Outputj j (22)
N j1 (logarithmic sigmoid, tangent sigmoid, purelin) are used
for neurons on hidden layer and output layer in each experi-
1X N ment. That ANN structure has a feed-forward and multi-
MATDDE jX Target X Outputj j (23) layer network trained with back propagation algorithm.
N j1
The best performance value for ANN model has been
obtained using LR 0.2, HNN 8 in purelin activation
1X N
function. The table of some of ANN structure used for this
MACO jUj j (24)
N j1 study is shown in Table 2.
A real-time ANN algorithm is made and applied on the
Hence, we have 20 meaningful data about the robot for robot real-time considering the weight bias and activation
each floor in a controller test parameter. In Figure 5(a), the function of this network structure and by applying the opti-
20 data (MATADE, MATDDE and MACO) used in the mum controller parameter on the robot it is achieved that
structure of ANN surface classifier are shown. the robot can keep its balance more stably.
8 International Journal of Advanced Robotic Systems
Pebble Sand
Tilt angle change Classic controller 8 7 6 5
ANN-based switching dynamic controller 5 6 4 4
Displacement change Classic controller 7 cm X 5 cm 3 cm X 2:5 cm
ANN-based switching dynamic controller 3 cm X 3 cm 2:5 cm X 2:5 cm
Controller output change Classic controller 5 V V 4 V 3 V V 4 V
ANN-based switching dynamic controller 2:5 V V 2:5 V 2:5 V X 2:5 V
Figure 7. Surface deformation of (a) soil, (b) pebble and (c) sand floor.
Experimental results robot for three surfaces as soil ( 1), pebble ( 2) and
sand ( 3). For this controller, the robots tilt angle, the
In this section, we will implement the TWMBR by using
distance it takes, and plant input u t change in terms of
the effective controller based on the proposed ANN-based
time are observed as shown in Figure 6, three floors for 20 s
adaptive switching controller. Moreover, in the experimen-
without any external factor.
tal test, we assume the robot physical parameters as given
When Figure 6 is compared with the ones obtained with
in Table 3.
just one controller Figure 4, it is seen that the system keeps
Equation (25) shows the state space expression obtained
balance much better on different surfaces. Obtained bal-
from TWMBR physical parameters in Table 3 using math-
ance performance values are shown in Table 4.
ematical model equations (10) to (20)
2 3 2 32 3 However, parameters in Figures 4 and 6 change rapidly
_ 0 0 1 0 because the surfaces are loose. As seen in Figure 7, surface
6 7 6 76 7 deformation affects desired balance of the robot very much.
6 _ 7 6 0 0 0 1 76 7
6 7 6 76 7
6 76 76 7
6 7 6 0 32:1287 2:0883 2:0883 76 _ 7
4 5 4 54 5 Conclusions
0 33:6544 3:0176 3:0176 _
2 3 Many researchers have studied about two-wheeled balance
0 0 robots. However, almost all of the researches have focused
6 7" #
6 0 0 7 vl on the solution of the balance problem on just one kind of
6 7
6 7 surface. In this study, a new controller structure was created
6 3:3776 3:3776 7 vr
4 5 by analysing the balance problem of the robot on different
4:8808 4:8808 surfaces. First of all, the angle oscillation, the distance it
(25) takes forward and backward and controller output changes
at the same time when the robot tries to keep balance were
The controller parameters on different surfaces are classified with ANN and surface estimation was achieved.
found roughly with simulation results by utilizing the math- At the end of ANN-based classification process, the con-
ematical model of the robot system. Then, controller para- troller parameter of the robot was changed on the robot
meters are obtained by fine tuning via real-time robot with respect to surface by using the adaptation mechanism.
control interface. The controller parameters given in The proposed adaptive control structure with switching was
Figure 3 were obtained as a result of real-time tests of the applied real-time on TWMBR for different surfaces. These
Unluturk and Aydogdu 9
real-time experimental results show that the proposed con- robotics, 2009. ICAR 2009, Munich, Germany, 2226 June
troller structure had a positive contribution to the robot 2009, pp. 17. IEEE.
behaviour on different grounds, because the angle oscilla- 9. Ambrose RO, Savely RT, Michael S, et al. Spain I, Radford
tion and distance it takes forward and backward were N. Mobile manipulation using NASAs Robonaut. In: 2004
decreased. At the same time, the controller output change IEEE international conference on robotics and automation,
was considerably limited, thus, the energy efficiency was 2004. Proceedings. ICRA04. New Orleans, Louisiana, USA,
increased. It is seen that TWMBR system becomes more 26 April1 May, pp. 21042109. IEEE.
robust and stable. 10. Brooks R, Aryananda L, Edsinger A, et al. Sensing and
manipulating built-for-human environments. Int J Humanoid
Declaration of conflicting interests Robot 2004; 01: 128.
The author(s) declared no potential conflicts of interest with 11. Tirmant H, Baloh M, Vermeiren L, et al. B2, an alternative
respect to the research, authorship, and/or publication of this two wheeled vehicle for an automated urban transportation
article. system. In: Intelligent Vehicle Symposium, 2002. IEEE, 17
21 June 2002, pp. 594603. IEEE.
Funding 12. Unluturk A, Aydogdu O and Guner U. Design and PID con-
The author(s) received no financial support for the research, trol of two wheeled autonomous balance robot. In: 2013
authorship, and/or publication of this article. international conference on electronics, computer and com-
putation (ICECCO), Ankara, Turkey, 79 November 2013,
References pp. 260264. IEEE.
1. Ahn JK and Jung S. Development of a two-wheel mobile 13. Unluturk A, Guner U and Aydogdu O. Yeni bir PI-V tipi
manipulator: balancing and interaction control. Camb J Robot denetleyici tasarm ve denge robotu uzerinde uygulanmas.
2014; 32: 11351152. Turkiye Otomatik Kontrol Ulusal Konferans (TOK), Kocaeli,
2. Sukvichai K and Parnichkun M. Double-level ball-riding Turkiye, 1113 Eylul 2014, pp. 578582.
robot balancing: from system design, modelling, controller 14. Huang CH, Wang WJ and Chiu CH. Design and implemen-
synthesis, to performance evaluation. Elsevier Mech 2014; tation of fuzzy control on a two-wheel inverted pendulum.
24: 519532. IEEE Trans Ind Electron 2011; 58: 29883001.
3. Kausar Z, Stol K and Patel N. The effect of terrain inclination 15. Ruan X, Ding M and Gong D et al. On-line adaptive
on performance and the stability region of two-wheeled control for inverted pendulum balancing based on feed-
mobile robots. Int J Adv Robot Syst 2012; 9: 111. back-error-learning. Neurocomputing Elsevier 2007; 70:
4. Yang C, Li Z, Cui R, et al. Neural network-based motion control 770776.
of an underactuated wheeled inverted pendulum model. IEEE 16. Kim JH and Lee JC. Dead-reckoning scheme for wheeled
Trans Neural Netw Learn Syst 2014; 25: 20042016. mobile robots moving on curved surfaces. J Intell Robot Syst
5. Xu JX, Guo ZQ and Lee TH. Design and implementation of Springer 2015; 79: 211220.
integral sliding-mode control on an underactuated two-wheeled 17. Qiao G, Song G, Zhang Y, et al. A wheel-legged robot with
mobile robot. IEEE Trans Ind Electron 2014; 61: 36713681. active waist joint: design, analysis, and experimental results.
6. Ratajczak A and Tchon K. Motion planning of a balancing J Intell Robot Syst Springer 2016; 83: 485502.
robot with threefold sub-tasks: an endogenous configuration 18. Guner U, Canbolat H, Unluturk A, et al. MEMS tipi sen-
space approach. In: 2011 IEEE international conference on sorler kullanlarak genel amacl atalet olcum birimi
robotics and automation (ICRA), Shanghai, China, 913 May tasarm ve kalibrasyonu. Turkiye Otomatik Kontrol Ulusal
2011, pp. 60966101. IEEE. http://ieeexplore.ieee.org/docu Konferans (TOK), Denizli, Turkiye, 1012 Eylul 2015;
ment/5979574/. pp. 6873.
7. Grasser F, DArrigo A, Colombi S, et al. JOE: a mobile inverted 19. Yamamoto Y. NXTway-gs (self-balancing two-wheeled
pendulum. IEEE Trans Ind Electron 2002; 49: 107114. robot) Controller Design. Cybernet Systems Co, 2008.
8. Kuindersma SR, Hannigan E, Ruiken D, et al. Dexterous http://www.pages.drexel.edu/~dml46/Tutorials/Balancing
mobility with the uBot-5 mobile manipulator. In: Advanced Bot/files/NXTway-GS%20Model-Based_Design.pdf.