You are on page 1of 4

2012 International Conference on System Science and Engineering

June 30-July 2, 2012, Dalian, China

Adaptive fuzzy balance controller


for two-wheeled robot
Kuo-Ho Su
Graduate Institute of Digital Mechatronic Technology,
Chinese Culture University
55, Haw-Kang Rd., Yang-Ming-Shan, Taipei, 11114, Taiwan
E-mail address: sgh@faculty.pccu.edu.tw
control systems. One major feature of fuzzy logic is its ability
to express the amount of ambiguity in human thinking. Thus,
when the mathematical model of the process does not exist, or
exists but with uncertainties, fuzzy control (FC) is an
alternative way to deal with the unknown process [7].
However, the huge amount of fuzzy rules for a high-order
system makes the analysis complex. Nowadays, much attention
has focused on the combination of FC and SMC to form an
intelligent system. The main advantages of the FC design based
on SMC are that the fuzzy rules can be reduced, and the
requirement of uncertainty bound can be relaxed. However if
the announced intelligent control architectures are adopted in
the control of two-wheeled robot, some drawbacks will occur,
such as difficult to steer on a bumpy road, large circumgyrating
radius, needing more gyroscope and accelerometer, chattering
phenomena and increasing accumulated error, etc. [8-12]. So it
is a stringent topic to research a new balance controller for the
two-wheeled robot to overcome above drawbacks under same
specifications of motor and tire.

AbstractAn adaptive fuzzy sliding-mode balance controller


(AFSMBC) for a two-wheeled robot is developed in this study. In
the proposed balance controller, a novel sliding surface is
adopted as the input variable of fuzzy system to outstanding its
merit of insensitivity to uncertainties. In the fuzzy membership
function, the translation width is utilized to reduce the chattering
phenomena. Moreover, consider the parametric variation,
external disturbance and nonlinear friction for the practical
wheeled robot motions, the transient and unmodelled uncertainty
will be occurred. An adaptive tuner, which is derived in the sense
of Lyapunov stability theorem, is added into the fuzzy controller
to reduce the accumulated error and to ascend the stability. The
hardware of whole control system includes a microcontroller,
gyroscope, accelerometer, and two autonomous motors. The
effectiveness is verified by simulated and experimental results,
and the performance is compared with conventional PD control
scheme for the same wheeled robot.
Keywords- adaptive tuner, fuzzy control, Lyapunov stability
theorem, sliding surface, two-wheeled robot

I.

To deal with these problems, an adaptive fuzzy slidingmode balance controller (AFSMBC) for two-wheeled robot is
developed in this paper. In the proposed intelligent control
scheme, a novel sliding surface is adopted as the input variable
of fuzzy system to outstanding the merit of the insensitivity to
uncertainties. In the fuzzy membership function, the translation
width idea is utilized to reduce the chattering phenomena.
Moreover, consider the parametric variation, external
disturbance and nonlinear friction for the practical wheeled
robot motions, the transient and unmodelled uncertainty will be
occurred. An adaptive tuner, which is derived in the sense of
Lyapunov stability theorem, is added into the proposed balance
controller to reduce the accumulated error and to ascend the
stability. Some experimental data are provided and the result is
presented in comparison with conventional PD control for the
same two-wheeled robot.

INTRODUCTION

The two-wheeled robot possesses the merits of low cost,


slight volume, small circumgyrating radius and easy to carry,
etc. If the bottlenecks of balance and stability can be tackled,
the development space of two-wheeled robot will be infinite.
For example nBot, Joe, Segway, Puma and Toyotas Winglet
etc., will or have been as personal transporters or data
acquisition tools. However, seldom intelligent control
architectures are addressed in the announced dissertations
when balance control problems are considered for two-wheeled
robot. Looking over the announced IEL dissertations about
two-wheeled robot in recent decade, the profound discussion of
intelligent controller is seldom and the conventional linear
feedback, decoupled adaptive or sliding-mode control (SMC)
methods were utilized mostly [1-6]. Among these methods,
SMC is one of the effective nonlinear robust control
approaches since it provides system dynamics with an
invariance property to uncertainties once the system dynamics
are controlled in the sliding mode. However, the undesired
chattering control effort might wear the mechanism and excite
unstable system dynamics.

II.

DESCRIPTION OF TWO-WHEELED ROBOT

The nonlinear dynamical inverted pendulum system is


utilized to derive the balance controller of the two-wheeled
robot and it can be represented as [3, 5]
( M c + M w ) g sin( ) M c L sin( ) cos( ) 2 + cos( ) u b
(1)
 =
+d

On the other hand, fuzzy systems have supplanted


conventional technologies in many applications, especially in

L[ 43 ( M c + M w ) M c cos 2 ( )]

978-1-4673-0945-5/12/$31.00 2012 IEEE


30

Zc

where g is the acceleration due to gravity; M c is the mass of


vehicle (mass of two wheels are excluded); M w is the mass of
two wheels; L is the half height of the robot; is the angle of
the cant; d is the disturbance and u b is the control effort. The
outline and balancing diagram of a two-wheeled robot are
shown in Fig. 1. Equation (1) can be simplified into some
linear time-invariant (LTI) subsystems.
 = Ap + B p ub + d
(2)
where A p and B p are the functions of g , M c , M w , L and
for each LTI subsystem with respect to operation point.
Consider the parameters in the operation point without
deviation, external load disturbance, nonlinear friction and
unpredicted uncertainties, the nominal balance system given by
(2) can be written as follows:
 = A p + B p ub
(3)

2L

ub
Xc
rw

Fig. 1 Outline and balancing diagram of a two-wheeled robot


Adaptive Tuner

Adaptive Tuner
2 n +1

r(t ) = s (t ) ( n l + 1) wl

0 _

where A p and B p are the nominal values of A p and B p ,


respectively.

+
+

r

C (E )

e

Sliding Surface

s (t )

Fuzzifier

A
A

Consider the operation deviation, external load disturbance,


nonlinear friction, unpredicted uncertainties for two-wheeled
robot, (2) can be expressed as follows:
(4)
where W is the total uncertainty and is called lumped
uncertainty in this research. The bound of the lumped
uncertainty is assumed to be given; that is, W < where ||
represents the absolute value and is a positive constant.

Defuzzifier

ub

Nominal Model
Controller

Fig.2 Overall scheme of the AFSMBC strategy


0
k p

where E = [e e]T and A =


surface is designed as

1
. Now, a novel sliding
k v

(9)

H = { E | s(t ) = 0}

DESIGN OF ADAPTIVE FUZZY SLIDING-MODE BALANCE


CONTROLLER

where
t

AE d
(10)
E T
in which C ( E ) satisfies C ET = [0 B p1 ] and E0 is the
s(t ) = C ( E ) C ( E 0 ) 0

The derivation of the proposed AFSMBC for a twowheeled robot is discussed into two parts (fuzzy sliding-mode
balance controller and adaptive tuner) in this study. The control
problem is to find a control law so that the two-wheeled robot
can be balanced and the steering capability on a bumpy road
can be promoted. The overall scheme of the AFSMBC strategy
is depicted in Fig. 2 and the detailed descriptions of each
control part are exhibited in the following subsections.

initial state of E . It is obvious that s(0) = 0 and


s(t ) =

C  C
E
AE = 0
E T
E T

(11)

The idea of translation width is utilized to reduce the


chattering phenomena. The design principle is that, when the
error states are near the sliding surface, the hitting control
effort will vanish to avoid imperfection of actual switching
device. On the contrary, while the error states take away from
the sliding surface, the translation width term will be embedded
to pull the error states back to the sliding surface rapidly. By
using the center average defuzzifier, the output of the proposed
fuzzy sliding-mode balance controller is

A. Fuzzy Sliding-Mode Balance Control


To designate a novel sliding surface, the tracking error is
defined as
e = d
(5)
where is the actual angle of the cant and d is the desired
angle of the cant. In the balance controller, the differential of
e can be expressed as
e = 0
(6)

m

u fsmbc = y l wl
l =1

wl

l =1

(12)

where m is the number of rules, y l is the center of the lth


fuzzy set and wl is the firing strength of the corresponding
rule. In this research, (2n + 1) equal-span triangular
membership functions are adopted for input linguistic variable
and (2n + 1) singleton membership functions are used for
output linguistic variable. The utilized membership functions
of input and output fuzzy sets are depicted in Figs. 3(a) and
3(b).

where is the detected angular speed of the cant. Then the


nominal model controller, unom , is given as
u nom = B p1 (d k p e k v e A p)

Fuzzy Inference
Mechanism
u nom

Fuzzy Sliding-Mode Balance Controller

 = A p + B p ub + W

III.

Fuzzy Rule Base

l =1

(7)

in which k p and k v are nonzero positive constants. The state


variable form of error equation is
E = AE
(8)

31

S n 1

Sn

S1 ZO

1.0

B n 1

B1

""
Z n Z n 1

To evaluate the effectiveness of the proposed architecture,


some numerical simulation and experimentation are carried out
in complex circumstances to prove its robustness. Firstly, the
proposed AFSMBC is adopted to control the two-wheeled
robot by simulation. The proposed control laws are represented
in (7), (17) and (18). The simulation condition due to mixed
command is addressed as: d = 2.0 x cos(t 5.5)Nm occurring at
5.5s and removing after 8.5s, d = 2.0 x cos(t 14.0)Nm
occurring at 14.0s and removing after 17.0s. The tracking
response due to mixed reference trajectory is depicted in Fig.
4(a); the associated control effort is depicted in Fig. 4(b); and
the tracking error is depicted in Fig. 4(c), respectively. From
the simulation results, not only the chattering phenomena are
avoided in the control efforts but also favorable tracking
response can be obtained under the occurrence of uncertainties.

""

Z 2 Z1

0.0

Z1

Z n 1

Z2

Zn

s (t )

(a) Input fuzzy sets.


DE n

DE n 1

DE 1

NOM

IN 1

IN n 1

IN n

""

""

u fsmbc (t )

u nom (t ) nr u nom (t ) (n 1) r unom (t ) r

unom (t ) u nom (t ) + r u nom (t ) + ( n 1) r u nom (t ) + nr

(b) Output fuzzy sets.

Fig. 3 Utilized membership functions of I/O fuzzy sets


The output of the proposed fuzzy sliding-mode balance
controller can be further simplified as
2 n +1

u ftsmc = unom r ( n l + 1) wl

D e s ire d
A n gle

(13)

ee
rg
e
d

l =1

B. Adaptive Tuner
The control effort in (13) has much reduced the chattering
phenomena. However, the magnitude of the control effort is
deeply affected by the translation width. There exists an
optimal translation width, r* , as follows to achieve minimum
control effort and match the sliding condition:
r* = W

2 n +1

( B p ( n l + 1) wl ) +

SIMULATION AND EXPERIMENTAL RESULTS

IV.

Bn

A c tu a l
A n gle

add
2 x c o s (t-5.5 )N m

re m o v e
2 x c o s (t-5.5 )N m
Tim e (s )

(a) Tracking response


C o n tro l Ef f o rt
A

(14)

T im e ( s)

l =1

(b) Control effort

where is a small positive constant. The optimal outputs of


balance controller is
2 n +1

ub* = u nom r * ( n l + 1) wl

add
re m o v e
2 x c o s (t-14)N m 2 x c o s (t-14)N m

t r a c k i ng e r r o r
ee
rg
e
d

(15)

l =1

Owing to the unknown lumped uncertainty, the optimal


translation width, r* , cannot be obtained exactly in advance
for practical applications. If the translation width is too small
then the tracking error dynamic trajectory may be away from
the sliding surface. Therefore, a conservative control law with
large width is usually selected. Although using a conservative
value for the translation width results in hitting the sliding
surface rapidly, it will yield large control effort such that it is
difficult to implement in practical applications. In order to
solve this problem, an adaptive algorithm is derived in the
sense of Lyapunov stability theorem to estimate the translation
width, and its estimated error is defined as
~
r ( t ) = r (t ) r *
(16)
where r( t ) is the estimated value of the optimal translation
width. Now, the following adaptive algorithm for the bound of
W is considered as

T im e ( s )

(c) Tracking error

Fig.4 Simulation results of the proposed AFSMBC


Some experimental results are provided to further
demonstrate the effectiveness of the proposed control system.
The proposed AFSMBC is implemented and equipped in the
two-wheeled robot. The hardware of whole system includes a
microcontroller (BS2SX), gyroscope (ADXRS610-300),
accelerometer (Memsic 2125), infrared sensors, motor
encoders, driving circuits, two autonomous controlled motors
and mechanical chassis. The outline of the two-wheeled robot
used in this study is shown in Fig. 1. The proposed AFSMBC
is embedded into the BS2SX to calculate the necessary driving
currents of DC motors according to the detected angle and
angular speed of the cant.
8

12

10

(17)

where > 0 is denoted as adaptation gain. Replacing r by


r (t ) in (13), the control law of the AFSMBC can be
represented as

-2

2 n +1

r(t ) = s(t ) ( n l + 1) wl
l =1

2 n +1

ub = u nom r ( n l + 1) wl

-4

-6

-2

-8

-4

-10

(18)

l =1

20

40

60

80

100

Iteration

(a) Angle of the cant

32

120

20

40

60

80

100

Iteration

(b) Angular speed of the cant

120

Self-tuning property is good for bumpy road. 2) Sensitivity of


uncertainties, chattering phenomena and cost of two-wheeled
robot can be reduced.

Output of Gyroscope

Output of Accelerometer
Voltage (V)

Voltage (V)

Table 1: Experimental data of the proposed AFSMBC


1V

1V

5 ms

0
0

10

20

30

40

100 ms

200

400

Time (ms)

800

600
Time (ms)

(c) Output of accelerometer

(d) Output of gyroscope

Fig. 5 Experimental results of the proposed AFSMBC


The experimental results of actual angle and angular speed
of the cant are provided in Table 1 and Fig. 5. Furthermore, a
conventional PD balance control scheme is adopted to control
the same two-wheeled robot for comparison and the results are
presented in Fig. 6. Compare Figs. 5(a), (b) and 6(a), (b), the
inclined angle and angular speed of the proposed AFSMBC are
smaller and converging to zero. Compare Figs. 5(c), (d) and
6(c), (d), the output voltage variation in Figs. 5(c), (d) is
smaller than that in Figs. 6(c), (d). From a practical point of
view, it is important to possess converging and stable response
under the possible occurrence of uncertainties. And the
tracking performance can be further improved by using other
high-performance microprocessors or digital signal processor
(DSP). The recent development in semiconductor has pushed
the performance of microprocessors or DSP to an
unprecedented level with high execution rate for advanced
control and the extra time of estimating the translation width
can be shorten.
10

4
2

-15

0
-2
-4
-6

-20

-8

50

100

150

200

250

50

Iteration

100

150

200

250

Iteration

(a) Angle of the cant

(b) Angular speed of the cant


4

Output of Accelerometer

Output of Gyroscope
Voltage (V)

Voltage (V)

1V

1V

5 ms

0
10

20

30

40

200

100 ms
400

600

800

Time (ms)

Time (ms)

(c) Output of accelerometer

(d) Output of gyroscope

Fig. 6 Experimental results of conventional PD control scheme


V.

Iteration

1
2
3
4
5
6
7
8
9
10

4
2
1
-1
-4
-1
-2
-1
-2
-4

3
5
2
2
0
6
3
6
5
1

36
37
38
39
40
41
42
43
44
45

4
1
-8
-8
-1
-2
-2
-5
-7
-2

2
1
2
2
2
1
1
6
0
6

71
72
73
74
75
76
77
78
79
80

-4
-5
-4
-3
4
-4
-6
-6
-7
-1

7
10
9
5
1
7
10
6
5
6

G. Oriolo, A.D. Luca, and M. Vendittelli, WMR control via dynamic


feedback linearization: design, implementation, and experimental
validation, IEEE Trans. Control System Technology, vol. 10, pp. 835852, 2002.
[2] D.S. Nasrallah, H. Michalska, and J. Angeles, Controllability and
posture control of a wheeled pendulum moving on an inclined plane,
IEEE Trans. Robotics, vol. 23, pp. 564-577, 2007.
[3] A. Salerno, and J. Angeles, A new family of two-wheeled mobile
robots: modeling and controllability, IEEE Trans. Robotics, vol. 23, pp.
169-173, 2007.
[4] L. Sun, and J. Gan, Researching of two-wheeled self-balancing robot
base on LQR combined with PID, 2nd Int. Workshop on Intelligent
Systems and Applications, Wuhan China, pp. 1-5, May 2010.
[5] J.A. Huang, Z.H. Guan, T. Matsuno, T. Fukuda, and K. Sekiyama,
Sliding-mode velocity control of mobile-wheeled inverted-pendulum
systems, IEEE Trans Robotics, vol. 26, pp. 750-758, 2010.
[6] T. Canada, Y. Watanabe, and C. Gan, Robust H2 control for twowheeled inverted pendulum using LEGO Mindstorms, Proc. 2011
Australian Control Conference, Melbourne, Australia, pp. 136-141, Nov.
2011.
[7] T.J. Ross, Fuzzy Logic with Engineering Applications, 2nd ed.,
England: Wiley, 2004, pp. 476536.
[8] X. Ruan, J. Cai, Fuzzy backstepping controllers for two-wheeled selfbalancing robot, Int. Conf. on Informatics in Control, Automation and
Robotics, Bangkok, pp. 166-169, Feb. 2009.
[9] K.H. Su, Y.Y. Chen, and S.F. Su, Design of neural-fuzzy-based
controller for two autonomously driven wheeled robot,
Neurocomputing, vol. 73, pp. 2478-2488, 2010.
[10] M.T. Das, L.C. Dlger, Control of a SCARA robot: PSO-PID
approach, Control and Intelligent Systems, vol. 38, pp. 24-31, 2010.
[11] H. Ferdinando, H. Khoswanto, D. Purwanto, and S. Tjokro, Design and
evaluation of two-wheeled balancing robot chassis: Case study for Lego
bricks, Int. Symp. on Innovations in Intelligent Systems and
Applications, Istanbul, pp. 514-518, June 2011.
[12] S. Ahmad, N.H. Siddique, and M.O. Tokhi, A Modular Fuzzy Control
Approach for Two-Wheeled Wheelchair, Journal of Intelligent and
Robotic Systems: Theory and Applications, pp. 1-26, 2011.

[1]

-10

Iteration

REFERENCES

10

-5

ACKNOWLEDGMENT

12

This work was supported by the National Science Council


of Taiwan, under grant no. NSC-100-2221-E-034 -004.

14

Iteration

CONCLUSIONS

A novel AFSMBC is developed for a two-wheeled robot to


balance the cants angle and to promote the steering capability
on a bumpy road. In the proposed AFSMBC, the spirits of
translation width and adaptive tuner are embedded into fuzzy
system to tackle the uncertainties and chattering phenomena.
Compare with conventional two-wheeled robot control
methods, the proposed controller possesses some features: 1)

33

You might also like