You are on page 1of 5

The 5th Student Conference on Research and Development -SCOReD 2007

11-12 December 2007, Malaysia

Development of a Two-Wheeled Inverted


Pendulum Mobile Robot
S. W. Nawawi, M. N. Ahmad and J. H. S. Osman

Abstract-- The research on two-wheeled inverted pendulum (T- verification of the controller using real time implementation is
WIP) mobile robots or commonly known as balancing robots shown experimentally. All the result of the real time
have gained momentum over the last decade in a number of implementation is illustrated in details.
robotic laboratories around the world. This paper describes the
hardware design of such a robot. The objective of the design is to
develop a T-WIP mobile robot to be used as flexible platform
comprises of embedded unstable linear plant intended for
research and teaching purposes. Issues such as selection of
actuators and sensors, signal processing units, modeling and
control scheme will be addressed and discussed. The system is
then tested using a well-known pole-placement state feedback
controller to verify its functionality.

Index Terms--o Embedded System, Two-wheeled Inverted


Pendulum Mobile Robot, Pole-placement. ...............

I. INTRODUCTION

studies in automatic control since the forties. In this paper,_


the development of the theme inspired by the well known
Segway robot is described. This kind of robots has induced a
due to the fact that it provides rich opportunities for
application of control design, signal processing, distri bueFgu1therooyeTdI oil oo
control systems and consideration of real time constraint for
implementation issues. II. MATHEMATICAL MODELING
Fig. 1 shows the prototype design of the robot. The robot The dynamic performance of a balancing robot depends on
is equipped with two servo drives for actuation, a Gyroscope teefcec ftecnrlagrtm n h yai
for measuring angle and angular velocity of pendulum body,mdlothsye.Byapin tecornteytm
adecoders for measuring the position of the wheels. Signal mdlo h ytm B dpm h or
processing and control algorithm are distributed among the shown in Fig. 2 and using the Kane's method [10], it can be
three microprocessors. Two of them are used for servo drives shown that the dynamics of the T-WIP mobile robot under
while the other one is used for stabilizing control. Although consideration is governed by the following motion equations
this kind of layout enables hierarchical control design, it also below. This plant mathematical model only consider for time
complicates implementation, since processor communication invariant. The coordinate system for the robot is described in
must also be considered. Fig. 2.
The remaining of the paper is organized as follows: Section
II describes the mathematical modeling of the robot. Section 3(mC + m,)- m,dcosOO + m,d sinOt(O2 + W)= _"( 3 +,3 )
III treat on hardware design, particularly in the selection of K R )
sensors and their associated algorithms. Section IV presents r2 1 1 L
the controller design and their simulation results. Finally the L(3L2 + 2R2 )mc + m5d2 sin2 09+12j@+ msd2 sinOV.' =-~(a3 -,63) (2)

S. W. Nawawi is with the Faculty of Electrical Engineering, Universiti mSdcsO.3+(-mSd2 -J3)O+mSd2 sinOcosO0.2 +msgdsinO=ca3 +,63
Teknologi Malaysia, Johor Bahru, 81310 Malaysia (e-mail: sophan@ieee.org). (3)
M. N. Ahmad is with the Faculty of Electrical Engineering, UniversitiWhralteprmtrsrestbutdinTle1
Teknologi Malaysia, Johor, 81310 Malaysia (e-mail: noh@fke.utm.my). WhralteprmtrsrestbutdinTle1
J. H. S. Osman is with the Faculty of Electrical Engineering, Universiti
Teknologi Malaysia, Johor Bahru, 81310 Malaysia

1-4244-1470-9/07/$25.OO ©2007 IEEE.


TABLE I Equations (1)-(3) can be represented in the state-space form
PARAMETER OF T-wIP as:

4(t) = f (x) + g(x)u (4)


Symbol Parameter Value [Unit]
where x E $n , U E 9 are respectively the state and the
Ms Mass of Body 10 [kg] control. f(x) is nonlinear dynamic function matrix and g(x) is
nonlinear input function matrix. The state, x of the system is
Mc Mass of wheel 0.420 [kg] defined as:
R Radius of wheel 0. 106 [m] x = [xo xo 0 , , y/, (5)
where xo is the position of TWIP, 0 is the inclination angle
p Distance between 0.4 [m] and xV is the heading angle of the robot.
the x axis and the For simplicity, the details of equation (4) are not shown here
center of gravity of and can be found elsewhere [7].
vehicle
III. HARDWARE DESIGN
L Half of Lateral 0.2 [m] The T-WIP mobile robot is composed of a chassis
distance between carrying a DC motor coupled to a planetary gearbox for each
the contact patches wheel, the DSP board used to implement the controller, the
of the wheels power amplifiers for the motors, the necessary sensors to
measure the vehicle's states. The battery is bolted inside the
g Gravity constant 9.8 [ms2] body casing and it significantly represents 40% of the total
robot mass.
'2 Inertia of the 0.16 [kgm2] The wheels of the vehicle are directly coupled to the
vehicle with output shaft of the gearboxes. The robot is control by applying
respect to the n2 a torque Q2 and 33 to the right and left wheels respectively.
directional Fig. 3 illustrates the block diagram of the control architecture
of the system.
I3 Inertia of the 1. 12[kgm2]
vehicle with LCD Sensor
respect to the n3 Touch Screen (FAS-G)
directional
DA Card
a2and/33 Input torque for RS 232 PC10 Bus
right and left
wheels accordingly Embedded
Controller
(DSP+FPGA)
AxislI Axis 2

FS

COGX C "

Fig. 3. Control Architecture


/KI(2 SV " The controller is implemented on an Embedded DSP board
K1I[11]. It is a standalone motion controller based on
combination of embedded PC 104 main board of X86, motion
ni \ '<J 111control board, terminal board in one structure, and thus has
.R \ the advantages of smaller dimension, less wiring, and higher
reliability. It is easy to upgrade, install and maintain, and thus
4 !_> ~~~~~~~~~increasethe reliability of the robot to operate under adverse
Fi.2* oriaesse fteTI industrial environments, such as humid, dust, and vibration.
Conventional inclinometers, or analog tilt sensors, with system to show the real time result according to the
typically exhibit slow response and cannot be used to track output response needed.
dynamic angular motion. On the other hand, angular rate
sensors can be used to measure fast rotations, but they suffer
from significant drift and error accumulation over time. Encoder
Inertial measurement units (IMU's) can be used to overcome FPG R *
these limitations, but these are relatively large and expensive.
As such, the FAS-G sensor from MicroStrain is used as the FPGA
gyro sensor [12].
Employing micro-electromechanical (MEM) sensors,
Circi x0
FAS-G consists of a combination of two low pass filtered
accelerometers and one piezo-ceramic gyro. The angular rate
signal is integrated internally over time and compared to the __
accelerometer signal to eliminate drift. The gyro output signal |l____
is an analog voltage between 0 and 5 volts corresponding to A/D
the angle of tilt. This signal is read from the Data Acquisition Gyroscope
Card and the result is passed to PC by PC 104 data bus. It was
calculated that one ADC count corresponds to an incremental FPGA
tilt of 0.087890. A secondary angular rate signal is also Cru
generated by means of software computation. . d-1
Both geared servo motor needs to generate a very high F
torque. To achieve this, the IPM100 is used as the motor p

Encoder
J

driver. It is basically a 36V, 3A fully digital intelligent servo


drive based on the DSP controller technology. It is also
embedded with the high level Technosoft Motion Language Fig. 5. Interface between sensor signals and the Embedded DSP board
(TML) and therefore offers a flexible, compact and easy to
implement solution for single or multi-axis applications with
brushless and DC motors. IV. CONTROLLER DESIGN
Ly System performance (i.e. reaction to disturbance forces,
,, - -tracking of driver input, etc.) is driven by the pole placement
controller. In order to test the T-WIP performance, pole-
-'aRlz \ placement controllers with different poles has been applied.
okR For this purpose, the state space equation (4) is linearized
R...'>
L Xr Xy \ \t |around the\ nominal point ofO 0.
For' a.............
1
chosen pole placement, the controller's gains were
calculated and implemented on the embedded board. T-WIP
. l ) g was then tested with the configuration and the response is
x \ ,/ then recorded by the control system. One of the tests
conducted consist of an impulse disturbance force applied to a
position above the center of gravity. The energy transmitted
with a falling weight amounted to about 1.2 J.
Fig. 4. Angle of Rotational Issues like damping ratio and settling time could be
clearly identified on the recorded responses and permitted an
To provide information about T-WIP states for control efficient fine-tuning of the system. Fig. 6 shows the system's
purposes, two incremental encoders and a rate gyroscope are response to the above mentioned test with the initial pole
interfaced together as shown in Fig. 5. All the interfacing is placement chosen attpl
paeetcoe
pole [-1.5,-1.5,-0.5-3i,-0.5±3i].
-.,l5-.-i-+i.Nt h
Note the
based on control structure of embedded system seen in Fig. 3
above. pronounced oscillation of the system which indicates too weak
Staight line position and speed as wells as yaw angle and damping. Increasing the damping ratio when change the pole
Straight line position and speed wells angle and
to [-1.5-i,-1.5+i,-3.5-5i,-3.5+5i] give the result as shown in
rate can be determined from the angle rotation of the two Fig. 7. It can be seen that the response improves significantly.
wheels (ORRand ORR) with respect to the gravity. Fig.4 shows Now it has a harmonious catching of the disturbance force.
the relation of these angles with pitch angle, Op and the body When the force hit T-WIP, it causes the pendulum to fall
angle, 0RPL and 0RPR~ forwards (Op> 0).
The embedded controller has task to monitor all feedback The control system accelerates the wheels in a positive
coming from incremental encoder. Then process the feedback direction to catch this fall and ultimately make the pendulum
to make sure T-WIP is balance at it equilibrium point. The falithohedrcin.Aegivtrqestenple,
command to embedded controller is given by IPC using C moin th veil back........ toisoiia .oito. n etn h
language interfacing. IPC running online or at the same time pedlmbc.na pih psto.
0.15 i F T F Tacceleration phs.Deceleration dmnsmaximum toqeat
---Positionphs.dmnstru
low speeds so a steeper ramp is therefore possible.
-.. peed
Increasing performance with the pole placement chosen
Angle
0.1 Angle-----r---te--can be achieved by moving the poles further to the left, thus
making the system faster [9]. Backlash as well the maximum
torque that can be transmitted to the ground (grip) prevent
0.05 ---- ------------------------- tuners from moving the poles past a certain limit. The authors
think that an adaptive pole placement and nonlinear controller
- ~~~~~~~~~~~(dependingon the system's state) would enable further
0~ ~~ ~ ~ ~ ~~~~~~ improvements.

-O 15 - - T - T - - - ------- -------

0 0.5 1 1.5 2 2.5 3 3.6 4 4.2 3 4 6 7

Fig TheInpole-placementemcontroller"pisdimplementingnd
tostheaT-
disturisbrunninewellsebaeeonrthetesultmshowein1FigJ9andpFigeO
impulse
response toan
to 1he BaeonrsltinFg9diuhontattemytm.si

65 1 15 2 2 3 3 14 aot.Ord

to the pendulum.~
~~~~~~....
~ See
Another issue- ththsbe adesddrigtsigi
drivability. In I--order to-sucessflly----improve------- diAblit,ie a

ofth sysem' reactionRetotaoramp shapedshspeedsinputiand

behavior allowed further improvementceent ontrlleofs T-WImnticontrol T


input with the final pole placementing prpos. Ichosen.w taNote Tthathadthe
maximum acceleration possibleruningwels ise lower esulthann itheg9 maximumIO

a high torque cannot be obtainediumwhen operating o catsihighg


vibatio. Th
sped.2 Hoee,thsixctywaosfeesrt eh Firaig. 9. Rabot4l-time contro reutseofviratink scbaleofranT-Wis

ve hice bakinoaeurghdoitoutlhuedomteateuliru
From the Fig. 10, it can be shown that the output response VIII. REFERENCES
for position, velocity, inclination angle and angular velocity of [1] Salerno, A and Angeles, J, "Nonlinear Conrollability of Quasiholonomic
inclination is following the shape of simulation result. Mobile Robot". Proc. IEEE ICRA, Taiwan, 2003.
However the steady state error of position and velocity is [2] Salerno, A. and Angeles, J, "A new family of Two Wheeled Mobile
Robot: Modeling and Controllability". IEEE Transaction of Robotics,
around 150%o-2O0%o. The values are about 1500 of the inclination Vol. 23. No. 1, Feb 2007, pp. 169-173.
angle and its velocity. This is due to the fact the limitation [3] Ha, Y.S. and Yuta, S, "Trajectory Tracking Control for Navigation of
pole-placement control design which cannot give smooth the Inverse Pendulum Type Self-contained Mobile Robot". Robotic and
Autonomous System, 17, 1996 pp. 65-80.
response of variables position, velocity, inclination angle and [4] Baloh, M. and Parent, M, "Modeling and Model Verification of an
angular velocity. The result however can be confirm that the intelligent self balancing two-wheeled vehicle for an autonomous urban
embedded control system is working well and all sensors give transportation system". Conf. Comp. Intelligence, Robotic and
systems, Singapore, Dec, 15, 2003.
a good feedback signal based on the response getting from the [5] Autonomous
Grasser, F., D'Arrigo, A., Comlombi, S., and Rufer, A, "Joe: A mobile
experimental work. For the next stage of this research the T- inverted pendulum", IEEE Trans. Electronics, vol. 49, no 1, Feb 2002,
WIP will be tested with the various type of linear and pp. 107-114.
nonlinear controller. Among of them are LQR, State feedback [6] Pathak, Kaustubh. Agrawal, Sunil K, "Band-limited trajectory planning
and tracking for certain dynamically stabilized mobile systems",Journal
Linearization and Sliding Mode Control. of Dynamic Systems, Measurement and Control, Transactions of the
ASME, v 128, n 1, March, 2006, pp 104-111.
[7] Kim, Y.H., Kim, S.H., and Kwak, Y.K, "Dynamic Analysis of a
Nonholonomic Two-wheeled Inverted Pendulum Robot", Proc. of the
Eighth Int. Symp. on Artificial Life and Robotics, Beppu, Oita, Japan,
24-26 January 2003, pp. 415-418.
[8] Pathak, Kaustubh. Franch, Jaume. Agrawal, Sunil K, "Velocity and
l- | position control of a wheeled inverted pendulum by partial feedback
linearization" IEEE Transactions on Robotics, v 21, n 3, June, 2005, pp.

[9] Nise, N.S, "Control System Engineering, 3rd ed.", John Wiley and Son,
US 2000.
[10] Kane, T.R. and Levinson, D.A, "Dynamics, Theory and Applications",
McGraw-Hill, 1985.
[11] Googol Technology LTD, "All in one Embedded motion controller
specification". [Online]. Available: http://www.googoltech.com
[12] "FAS-G Gyroscope Manual by Microstrian". [Online]. Available:
http://www.microstrain.com/fas-g.asp

Fig. 10. Real-time control result of T-WIP output


response using Pole placement
outcome
I~
auhr_rtflyakolegdtecnrbtoso
~ VI VI.
ACNO LEGMN
CONCLUSION
ThInthis paper, the development of a T-WIP mobile robot
S.L.W, is anpresented.
system S ogfr hi oko
The issues heoiiamodeling,
of dynamical eso
otis douet
selection of actuators and sensors, configuration of the
embedded controller, as well as the implementation of pole
placement control strategy have been addressed. Results from
the experimental works show that the proposed embedded
design architecture is capable of delivering the desired

You might also like