Upload
phungkhanh
View
230
Download
4
Embed Size (px)
Citation preview
MODELLING AND CONTROL OF A NONHOLONOMIC MOBILE ROBOT
MOHD ZAFRI BIN BAHARUDDIN
A dissertation submitted in partial fulfilment of the
requirements for the award of the degree of
Master of Engineering (Electrical – Mechatronics and Automatic Control)
Faculty of Electrical Engineering
Universiti Teknologi Malaysia
MAY 2008
iii
DEDICATION
For my loving wife
iv
ACKNOWLEDGEMENTS
All praise to Allah the Almighty. Many people including academicians,
family and friends have assisted me. They have contributed much to my progress in
this project in terms of guidance and moral support. In particular I would like to
express my deepest gratitude to Prof. Madya Dr. Mohamad Noh Ahmad for his
leadership and direction in guiding me through this project till now. The project
would not have progressed this far without his encouragement and vision.
I would also like to thank Universiti Tenaga Nasional for funding my
continuing study at Universiti Teknologi Malaysia. Particular staff members whom I
would like to thank are Hj. Abdul Aziz Bin Hj. Mohamed Yusof and Cik Nazimah
Mohd Mokhtar from Human Resource, Syed Sulaiman, Dr. Izham Zainal Abidin,
Adzly Anuar and all members of the UNITEN Mobile Robotics Group for their
continued efforts and interest in mobile robotics.
Family and friends that constantly push me to complete this project on time,
colleagues, course mates and even students that know me have all helped in various
ways to contribute to this project. Also not forgetting all my lecturers in my masters
course who have inspired me to do better every time. I am grateful to each and every
one of them and I would like to express a big thank you.
v
ABSTRACT
Mobile robots are becoming more common in today's fast growing
environment. Its extensive study and research have become a major part in the
mobile robot's rapid development. An effective method of development is via
modelling tools and computerized simulations. In this project, kinematic and
dynamic models of a nonholonomic two-wheeled mobile robot were simulated with
its behaviour defined by a controller. The robot defined in this project has two
actuated wheels while any other contact with the surface travelled is assumed to be
frictionless. This project identifies two robot controllers, which are the proportional-
integral-derivative (PID) control and pole placement methods. These control
methods are implemented via the MATLAB/Simulink software into the kinematic
and dynamic models of the robot. Controllers were chosen according to its robot
model that conforms to the standard robot designed in this project. The tracking
control method of each controller was also studied to ensure stability of the model.
In the simulation, the robot is given several predetermined paths. The robot does not
know these paths and it has to be able to adapt and react to different paths. The
controller is considered successful when it can follow the predetermined path
accordingly and effectively. Through the simulations, these controllers are studied
and compared.
vi
ABSTRAK
Robot bergerak kini menjadi perkara lazim di dalam persekitaran moden
yang semakin rancak. Pengajian dan penyelidikan oleh pelbagai pihak
membolehkan [area] robot bergerak ini dibangunkan dengan pesat. Salah satu
kaedah pembangunan yang kos efektif adalah melalui pemodelan matematik bersama
simulasi berkomputer. Model kinematik dan dinamik robot bertayar dua disimulasi
dengan sifat-sifatnya diserapkan oleh sebuah pengawal digital. Robot dalam projek
ini mempunyai dua tayar bergerak manakala bahagian lain yang bersentuh dengan
permukaan lantai dilihat sebagai tidak mempunyai geseran. Projek ini mengenalpasti
dua pengawal digital iaitu pengawal Berkadar Terus – Kamiran – Terbitan atau
Proportional-Integral-Derivative (PID) dan [pole placement]. Teknik-teknik
kawalan ini diimplimentasi menggunakan perisian MATLAB/Simulink ke dalam
model kinematik dan dinamik robot tersebut. Pengawalan digital dipilih mengikut
model robot yang didapati. Teknik kawalan jejakan bagi setiap pengawal digital
dikaji bagi memastikan kestabilan model. Dalam simulasi ini, robot diberi sasaran
perjalanan yang ditentukan terlebih dahulu. Robot ini perlu mengadaptasikan dirinya
dan bertindak dengan sesuai mengikut sasaran yang berbeza. Pengawal robot
dianggap berjaya apabila ia mampu mengawal robot untuk mengikut sasaran
perjalanan tersebut. Perbezaan antara pengawal-pengawal ini dikaji dan dibandingi.
vii
TABLE OF CONTENTS
CHAPTER TITLE PAGE
DECLARATION ii
DEDICATION iii
ACKNOWLEDGEMENTS iv
ABSTRACT v
ABSTRAK vi
TABLE OF CONTENTS vii
LIST OF TABLES ix
LIST OF FIGURES x
LIST OF SYMBOLS xiii
LIST OF ABBREVIATIONS xv
LIST OF APPENDICES xvi
1 INTRODUCTION 1
1.1 Overview 1
1.2 Objectives 5
1.3 Project Scope 6
1.4 Thesis Outline 7
2 LITERATURE REVIEW 8
2.1 Control Paradigms 9
2.1.1 Functional Approach 10
2.1.2 Behaviour Based Robotics 11
2.2 Methods of Navigation 13
viii
2.2.1 Dead Reckoning by Odometry 15
2.2.2 Modifying the Environment (Routes) 17
2.3 Mobile Robot Modelling 18
2.3.1 Robot Agent 18
2.3.2 Control Methods 20
2.4 Windows Based Environment Tools 20
2.5 Methodology 22
3 SYSTEM MODELLING 24
3.1 Differential Drive Model 24
3.2 MATLAB/Simulink Model 29
3.2.1 Motor Driver Subsystem Block 31
3.2.2 Data Conditioning Subsystem Block 32
3.3 Visual, Motor Speed and Data Outputs 33
3.4 VRML Environment 34
4 CONTROLLER SELECTION AND CONFIGURATION 38
4.1 Controller Test Setup 38
4.2 Response without Controllers 39
4.3 Proportional Integral Derivative (PID) Controller 40
4.3.1 PID Implementation in MATLAB/Simulink 41
4.3.2 PID Tuning and Configuration 44
4.3.3 Output of Tuned PID Controller 49
4.4 Pole Placement Controller 50
4.4.1 DDM State Space Representation 53
4.4.2 State-Feedback Gain Selection 57
4.5 Comparison and Analysis 61
4.6 Porting to Hardware 62
5 CONCLUSION AND FUTURE DEVELOPMENT 64
REFERENCES 66
APPENDIX A -E 70-75
ix
LIST OF TABLES
TABLE NO. TITLE PAGE
1.1 Classes of robots as classified by the Japanese Robot
Association 2
1.2 Practical robot applications versus technology that has not been
developed past the research stage – some examples. 4
x
LIST OF FIGURES
FIGURE NO. TITLE PAGE
2.1 The robot, its task and environment are all linked and thus all must
be considered. 9
2.2 Sense-think-act cycle: functional decomposition of a mobile robot
control system. 10
2.3 General control scheme for mobile robot systems as suggested by
[10]. 11
2.4 Behaviour-based decomposition of a mobile robot control system
suggested by Brooks [17]. 12
2.5 Cartesian Frame of Reference 14
2.6 Summary of the scales of navigation 15
2.7 Left: An Automated Guided Vehicle (AGV) using lines on the
floor for navigation, right: Boss by the Carnegie Mellon Tartan
Racing Team, winner of the 2007 DARPA Challenge [27] using
GPS as one of its navigation tools. 17
2.8 Robots.net – Robomenu Robot Gallery statistics 19
2.9 Project Methodology 23
3.1 Reference frame for Initial Reference (I) and Robot (R). 25
3.2 Left: Differential drive model of the robot. Right: Wheel model
of the robot. 26
3.3 Basic MATLAB/Simulink model of the robot based on [9]-[15]. 29
3.4 Simulation for random control of robot model. 30
xi
3.5 Left: Output shows controllability of the model by a human user.
Right: Random control of the robot model. 30
3.6 Motor driver block. 31
3.7 Data conditioning block. 32
3.8 Left and right motor speed output. 33
3.9 Visual output showing starting point, end point and direction of
robot movement from the start to finish. 34
3.10 Overall virtual reality modelling framework. 35
3.11 Processing VRML model using V-Realm Builder 2.0. 36
3.12 Basic differential drive model utilizing the Virtual Reality toolbox
in Simulink. 37
4.1 Differential drive simulation without any controller. 39
4.2 Robot response without controller showing the desired heading. 39
4.3 Robot response without controller showing the current heading. 40
4.4 The PID controller. 41
4.5 Simplified PID controller in Simulink. 42
4.6 Contents of the Data Conditioning block. 42
0.1 Complete PID controller with DDM Model in Simulink. 43
4.8 Robot current heading response with untuned PID controller. 44
4.9 Robot desired heading response with untuned PID controller. 44
4.10 Visual output with untuned PID controller. 45
4.11 Mesh analysis for proportional value of the PID controller (KP). 46
4.12 Robot model current heading response with KP = 0.30. 46
4.13 Mesh analysis for integral value of the PID controller (KI). 47
4.14 Robot model current heading response with KP = 0.30 and KI =
0.125. 47
4.15 Mesh analysis for differential value of the PID controller (KD). 48
xii
4.16 Current heading and desired heading output of the finalized tuned
PID controller with gains KP = 0.30, KI = 0.125, and KD = 0.0001. 50
4.17 State space representation of a plant 52
4.18 Plant with state-feedback 52
4.19 Input (red) and output (blue) response of the robot kinematic
model. 53
4.20 Pole-zero map of the robot kinematic model. 57
4.21 Simulation output showing high percentage of steady-state error. 59
4.22 Bode plots of the system with pole placement and its gains. Left:
Desired heading input bode plot, Right: Noise input bode plot. 59
4.23 Current heading and desired heading output of the system with
pole placement and its gains. 60
4.24 Bootloader circuit running on PIC16F877A. 62
4.25 Programming and downloading setup of the Differential Drive
Robot. 63
4.26 Left: Side view of the Differential Drive Robot. Note the castors
on the front. Right: Top view of the Differential Drive Robot. 63
xiii
LIST OF SYMBOLS
™ - Trademark
® - Registered
∑ - Sum
m - Meter
mm - Milimeter
ϕ& - phi for wheel rotation speed
1ϕ& - left motor speed
2ϕ& - right motor speed
x - Robot x-axis location
y - Robot y-axis location
x& - Robot motion in x-direction
y& - Robot motion in y-direction
θ - the previous angle orientation
θ& - theta for robot rotational motion
R - Robot reference frame
ξ - zeta for robot pose
r - Radius of robot wheel
l - Half the distance between wheels
ω - Instantaneous wheel rotation
)(θR - Standard orthogonal rotation transformation
° - degrees
KP - Proportional gain
KI - Integral gain
KD - Differential gain
xiv
GC(s) - Transfer function as a function of s
%OS - percent overshoot
cmax - maximum point
cfinal - final or steady state value
K - feedback vector for pole placement
xv
LIST OF ABBREVIATIONS
JIRA - Japanese Industrial Robot Association
UAV - Unmanned Aerial Vehicles
AGV - Automated Guided Vehicle
BIRG - Biologically Inspired Robotics Group
SWIS - Swarm Intelligent System Research Group
2-D - Two-Dimensional
3-D - Three-Dimensional
e.g. - Example
GPS - Global Positioning System
DARPA - Defense Advanced Research Projects Agency
WMR - Wheeled Mobile Robot
DDM - Differential Drive Model
AI - Artificial Intelligence
PID - Proportional-Integral-Derivative
VRML - Virtual Reality Modeling Language
VR - Virtual Reality
SISO - Single Input – Single Output System
MIMO - Multiple Input – Multiple Output System
LTI - Linear Time-Invariant
PMDC - Permanent Magnet DC Motor
LDR - Light Dependent Resistor
xvi
LIST OF APPENDICES
APPENDIX TITLE PAGE
A List of Mobile Robotics Simulation Software Discussed
in this Document 70
B Coding for Mesh Analysis for PID Tuning 72
C Simulink PID Controller block settings while tuning using
m-file 73
D Simulink blocks for saving input and output variables for
state space modelling 74
E Completed Model with Pole Placement Controller 75
CHAPTER 1
INTRODUCTION
1.1 Overview
A mobile robot is a robot that is has the capability to move about and interact
with its environment. There has been extensive research into mobile robotics as
almost every major engineering university has one or more labs that focus on mobile
robot research. Mobile robots are also found in industry, military and security
environments, and appear as consumer products. According to the Japanese
Industrial Robot Association (JIRA) [1], robots can be divided into several classes
that describe its function and to some extent, its level of complexity.
Mobile robot navigation is an important aspect of mobile robotics system
design since its functionality is greatly depends on “mobility”. As the utilization of
robot goes beyond industrial applications, the practical implementation in human
environment requires the robot to move efficiently in our daily surroundings. The
work on mobile robots is of interest to the researchers to explore the potential of
robots in handling daily chores such as house cleaning, baby sitting, tour guide,
shopping assistant, and many other applications. Such systems require accurate
navigation and guidance control system.
2
The main concern in designing robotics system is the high development cost,
a possible solution to evaluate various designs without adding the cost is to model
the system in order to simulate and analyze before actual fabrication. Therefore, a
general modelling and simulation platform for mobile robot system is important.
Many modelling solutions are mainly concentrated on the design of the control
system and application algorithm. It is normally done with a fixed mechanical
design in order to optimize the control system.
In the military and heavy industries, mobile robots are used in environments
that are deemed hazardous to humans. This provides a convenient and safe condition
for humans to work in and still get the job done. The United States government is
expected to spend billions of dollars on the development of robots for its military
use. Already in the news we have seen robots being deployed in Iraq and
Afghanistan while Unmanned Aerial Vehicles (UAV's) are sent spying over China
[2].
Table Error! Style not defined..1 : Classes of robots as classified by the Japanese
Robot Association [1].
Class 1 Manual handling device: a device with several degrees of freedom actuated by the
operator.
Class 2 Fixed sequence robot: handling device which performs the successive stages of a
task according to a predetermined, unchanging method, which is difficult to modify.
Class 3 Variable sequence robot: the same type of handling device as in class 2, but the
stages can be easily modified.
Class 4 Playback robot: the human operator performs the task manually by leading or
controlling the robot, which records the trajectories. This information is recalled
when necessary, and the robot can perform the task in the automatic mode.
Class 5 Numerical control robot: the human operator supplies the robot with a movement
program rather than teaching it the task manually.
Class 6 Intelligent robot: a robot with the means to understand its environment, and the
ability to successfully complete a task despite changes in the surrounding conditions
under which it is to be performed.
3
Most robots in industrial use today are manipulators that operate within a
bounded workspace and are bolted to the ground or ceiling. Mobile robots, on the
other hand, are completely different. The degree of the ability of a mobile robot to
move around autonomously in its environment determines its best possible
application such as tasks that involve transportation, exploration, surveillance,
inspection, etc. Some examples include underwater robots [3] [4], planetary rovers
[5], or robots operating in contaminated environments. The most common type of
mobile robot for industrial use is the Automated Guided Vehicle (AGV). AGVs
function in specially modified environments.
However to achieve the desired movements in real world environments is not
straightforward. This is why much effort has been put into the development of the
best path planning algorithms for mobile robots. Mobile robotics is a vast research
area. Although industry is actively engaged in robot development, the new robots
produced by industries have little to do with research performed in the academic
sector. A lot of resources are being poured all over the world into advancing
robotics technology research, and hopefully will reach the practical stage soon [1].
When a mobile robot is designed, the three key questions that need to be
answered by the robot are:
Where am I? Where am I going? And how do I get there?
To answer these questions the robot has to have a model of the environment
(given or autonomously built). After that it needs to perceive and analyze the
environment to find its position within the environment. The plan and execution of
the movement will then be finally defined by its control method. Most of the current
practical robot technology in industries are focused on areas such as positioning,
teaching-playback, and two-dimensional vision [1].
4
Non-developed research areas are to be selected for upcoming priority
research by JIRA. By developing a robot model, the very same model can be applied
to test obstacle avoiding technology and learning control systems. Coupling it with
the applications of map referenced navigation systems and self decision making will
produce an attractive direction for research. Making the model as simulation based
will make it cost effective overall.
Cyberbotics Ltd. Has developed WebotsTM
, a commercial software used for
mobile robotics prototyping simulation and can be transferred to real robots. In 1998
and 1999 Cyberbotics developed an Aibo®
simulator for Sony Ltd. Cyberbotics has
now collaborations with the Biologically Inspired Robotics Group (BIRG) and the
Swarm Intelligent System Research Group (SWIS) of the EPFL through the Swiss
CTI technology transfer program [6]. This shows that major entertainment and
research companies are already trusting simulations to develop mobile robots.
Table Error! Style not defined..2 : Practical robot applications versus technology
that has not been developed past the research stage – some examples.
Practical robot applications Non-developed research
• Fast, accurate positioning servos
• Teaching-playback control systems
• Off-line teaching systems
• Map reference mobile robot
navigation systems
• 2-D vision technology
• Unilateral remote control systems
etc.
• Force control technology
• Compliance control technology
• Distribution tactile sensors
• Test environment awareness
technology based on 3-D vision
• Multi-fingered hand
• Obstacle avoidance technology
• Walking robots (with legs)
• Learning control systems etc.
5
Modelling hardware using virtual platforms is becoming mainstream – so
now attention is turning to the speed of simulation [7]. The advantage of modelling
is that a simulation can be very fast, making it feasible to run applications software
on top of the virtual hardware and not just boot code or small test routines.
1.2 Objectives
Design and development of mobile robotics system is relatively time
consuming and costly. Solution: Develop a platform to simulate the system design
before hardware implementation. Several objectives have been set out as the
working focus points. The main objectives of this project are:
1. to control a two-wheeled mobile robot model by using 2 different types of
controllers, and
2. to simulate and compare the controllers applied on the system using the
MATLAB/Simulink software.
6
1.3 Project Scope
The project will cover development of a two-dimensional environment for
the robot to traverse. A mathematical approach is taken to model the robot to define
its kinematic and dynamic features. The simulation model will focus on the control
of the robot and its ability to respond to changing target destinations.
The scope of the project is set to develop a simulation model for basic mobile
robot navigation by using the Simulink tool in MATLAB. The simulation engine
used in this work is MATLAB Simulink. The main reason is of course the popular
and standardized programming environment and incorporated with many research
valuable toolboxes. Controllers are studied and two are chosen to define the
behaviour of the robot model. After implementation of the controllers into the robot
via Simulink, the controllers are then compared.
7
1.4 Thesis Outline
CHAPTER 1 gives an introduction to this work and serves as an overview to
the study and states the objectives and scope of this work.
CHAPTER 2 reviews the background study of this work. It contains the
fundamental knowledge of mobile robot navigation and the available modelling and
simulation solutions for such a system.
CHAPTER 3 explains the overall system modelling and the basic
components that were developed in this work. It covers areas from mathematical
explanations to the integration of these all elements via the Simulink models.
CHAPTER 4 applies the information on developing digital controllers and
applies the controllers into the robot model in Simulink. Evaluation of the
simulation platform is done by performing simulation on two controller systems
namely the proportional-integral-differential controller and the pole placement
controller. These are given a test, simulated and finally compared.
CHAPTER 5 discusses and concludes the results obtained from this work. A
few suggestions had been drawn out for future development.
CHAPTER 2
LITERATURE REVIEW
The ultimate dream in robotics is to create “intelligent machines”. An
interesting observation by Nehmzow [2] is that we humans consider ourselves
intelligent, and therefore any machine that does what we do has to be considered
intelligent as well. For this project, the working definition chosen will be:
An intelligent robot is a machine able to extract information from its
environment and use knowledge about its world to move safely in meaningful and
purposive manner [8].
The main difference between classical robotics and mobile robot is the ability
to navigate. The primary objective of any mobile robot system to remain functional
is the capability to perform certain task at a specific location within the working
environment. This task falls to the controller module. In physical systems, most
controllers are applied using microcontrollers and some using digital logic circuits.
9
2.1 Control Paradigms
The idea of a robotics system is that of a device that can measure its own
state and take action based on it [11]. In other words: the behaviour of the robot.
The behaviour of any robot must be evaluated with respect to the robot’s
environment and to the task that the robot is performing. The task, environment, and
the robot itself are all dependent upon each other and how they interact with each
other, as shown in Figure 2.1 below.
This means that a robot’s function and operation are defined by the robot’s
own behaviour within a specified environment, taking into account a specific task.
Only the simultaneous description of agent, task and environment describes an agent
– alive or machine – completely [2]. The following two subchapters are the two
generally utilized approaches of mobile robot control: functional and behaviour
based robotics.
Figure 2.1 The robot, its task and environment are all linked and thus all must be
considered.
Robot
Task Environment
10
2.1.1 Functional Approach
The sense-think-act cycle was the basic control method for building an
intelligent machine. As shown in Figure 2.2, sensory information is processed in a
serial manner. After sensor signal processing, the data is used to either construct or
update an internal world model. The world model is the basis by which further data
is evaluated and planned, after which control decisions can be made. The planning is
made through the world model and the robots’ perception of the world, which is
different from how humans see the world. Once a plan has been made, the task is
executed via control of the robots’ actuators, usually motors.
Figure 2.2 Sense-think-act cycle: functional decomposition of a mobile robot
control system.
Siegwart and Nourbakhsh [10] have also proposed a similar model in Figure
2.3. This model based navigation requires complete modelling and is function based,
comparable to the one presented above. It is also structured in a horizontal
composition and can clearly shows that the control scheme is a continuous cycle.
Perception Sensors
Modelling
Planning
Task execution
Motor control Actuators
11
Figure 2.3 General control scheme for mobile robot systems as suggested by [10].
This cycle is repeated continuously until the main goal of the robot is
achieved. The functional approach was the fundamental paradigm of most early
work in mobile robotics [2]. However, despite good results in technical applications,
the target of achieving intelligent robot behaviour were so modest that researchers
are now focusing on the “intelligent” (software) part instead.
This led to the view that once a well engineered robot is successfully
designed, the intelligent controller could be ported on to the reliable robot base, and
an intelligent robot would result. So until such bases are available, it is more
constructive to concentrate on control issues rather than to struggle with building real
robots. This has been the experience of the author as well after building robots for
multiple robotic-based competitions and robotic workshops.
2.1.2 Behaviour Based Robotics
An approach advocated by Brooks [17] suggests instead of decomposing the
architecture into functional modules as in the section above, the architecture is
decomposed into task-achieving modules, also called behaviours. The fundamental
idea is that the modules/behaviours operate independently of one another, and that
the overall behaviour of the robot emerges through this concurrent operation.
Bringing together the “right” type of simple behaviours will generate an overall
12
intelligent behaviour through their interaction, without any one agent “knowing” that
it is contributing to some explicit task, but merely following its own rules. Figure
2.4 demonstrates this.
Figure 2.4 Behaviour-based decomposition of a mobile robot control system
suggested by Brooks [17].
In this behavioural decomposition of a control task, each behaviour has direct
access to raw sensor readings, and can control the robot’s motors directly. This is
the main difference from the functional approach. So tight coupling between sensing
and acting dominates the behaviour-based approach, while coupling is loose in the
functional approach. Summarized here are some advantages of behaviour based
control:
• This system supports multiple goals and is more efficient – no functional
hierarchy means that each layer runs parallel and can work on different
goals individually.
• The system is easier to design, to debug and to extend – lower level of
competence is implemented first (e.g. obstacle avoidance). That
behaviour is tested, and once it is working, higher levels of competence
can be added, without influencing the behaviours of lower layers.
• The robot is robust – the failure of one module only has a minor influence
on the performance of the whole system.
Communicate data
Sensors
Discover new area
Detect goal position
Avoid obstacles
Explore/wander
Actuators Σ
Coordination / fusion e.g. fusion via vector summation
13
2.2 Methods of Navigation
For anything mobile, navigation is one of the most important abilities.
Avoiding dangerous situations such as collisions and staying within safe operating
conditions come first. And if any further tasks that relate to a specific place in the
robot’s environment are to be performed, navigation is a must.
The ability to navigate is the capability to determine position, and to be able
to plan a path towards some goal location. Planning usually requires a form of map
and the ability to interpret the map. Navigation has to be anchored to some frame of
reference and is always relative to a certain fixed point.
Navigation in general can be divided into three different scales to define the
resolution of navigation requirements [31]:
• Global navigation – able to locate absolute position in a large or map-
referenced area and to travel to a specific destination.
• Local navigation – able to obtain relative position and make interaction to
stationary or moving objects within the working environment.
• Personal navigation – positioning of various components in object handling
tasks.
With the general assumption of mobile robots are relatively small systems
with room sized working environments, Local and Personal scale navigations are
more suitable to be studied in the robot-environment interactions of mobile robot
navigation.
14
The first fundamental competency of mobile robot navigation is self-
localization [1]. Before the robot able to locate its own position, the navigation
reference has to be well defined. The frame of reference offers a fixed reference
point for the navigation system. A Cartesian co-ordinate system provides a simple
frame of reference to robot navigation (Figure 2.5).
Figure 2.5 Cartesian Frame of Reference
Once the frame of reference is “anchored” on a known position in the World,
the Robot can be easily self-localized with the absolute co-ordinate system.
Normally, the fixed origin is the starting point of the robot. One important note here
is absolute self-localization might be too ideal in real life as a universal positioning
system is needed and it is too technically remanding for a simple self-contained
mobile robot. However, Global Positioning System (GPS) is technology being
introduced for such purpose in mobile robot navigation development.
Robot
Frame of Reference
World
x
y
15
Navigation is an interesting and important exploration in mobile robot
development. The selection of suitable navigation algorithm is greatly dependent on
the requirements and effectiveness for the mobile robot system to perform its task in
a given environment. Figure 2.6 provides a summary of navigation selection based
on the system scales [31].
Figure 2.6 Summary of the scales of navigation
2.2.1 Dead Reckoning by Odometry
Dead Reckoning is a mathematical procedure for positioning by calculating
distance travelled using velocity information over travelling time. Odometry is the
simplest dead reckoning method that uses optical encoders to monitor wheel shaft
rotations. Navigation by odometry is similar to how airline pilots fly their aircrafts
according to waypoints. A set of angles, distances and checkpoints are defined to be
as input to the robot controller. This is basically making the environment which the
robot is traversing into a global Cartesian reference frame. Several components are
needed on a robot to make such systems work. Sensory perception is subject to
noise and variation.
16
A major problem is the odometry drift, for example, wheel slippage. This
method has a critical positioning problem from wheel slippage and mechanical
measurement tolerances that causes this technique alone is insufficient for
navigation. Additional tools such as active beacons for error resetting and distance
measuring sensors are normally coupled together for more effective and reliable
navigation.
The frame of reference in robot navigation system is a Cartesian coordinate
system. Assuming the journey started from a known position, and assuming that
speed and direction of travel are accurately known, the navigation system simply
integrates the robot’s motion over time, a process known as “dead reckoning” [1]-
[9]. Given a Cartesian frame of reference, a robot’s position is always precisely
known and so are all other locations.
The major problem with dead reckoning is that the reference frame is not
anchored in the real world. For this method to work, the robot has to measure its
movement precisely. This is not applicable in real life as problems like wheel
slippage will cause drift errors. In practice, a purely path integration method is
unreliable over all except very short distances or very far distances [11].
In the future this might be possible with the advent of the Global Positioning
System (GPS) and its increasing accuracy. GPS is already being used as road
navigation in high end vehicles. Even the DARPA challenge has had many
participants using the technology and the winning team uses it primarily along with
other navigation systems. Attempts have also been made to combine the odometry
method with dead reckoning [18].
17
Figure 2.7 Left: An Automated Guided Vehicle (AGV) using lines on the floor for
navigation, right: Boss by the Carnegie Mellon Tartan Racing Team, winner of the
2007 DARPA Challenge [27] using GPS as one of its navigation tools.
2.2.2 Modifying the Environment (Routes)
The easiest way of making a robot to move around and go to particular
locations is to guide it. Some methods currently used are by burying an inductive
loop of magnets in the floor, painting lines on the floor, or placing beacons, markers
in the environment. Automated Guided Vehicles used in industries utilize this
method for transportation tasks.
This method may be expensive, as the environment needs to be prepared for
the robot and with the limitation of paths making it inflexible too. But it is a reliable
method of navigation with proven results.
18
2.3 Mobile Robot Modelling
A model can be used for a range of different purposes. It can be used to
represent the environment in such a way that the robot is able to move around
without collision and, since the robot has a particular task to perform, the
representation must include all necessary information needed to develop a plan.
To conduct experiments with mobile can be very time consuming, expensive
and difficult. Because of the complexity of robot-environment interaction,
experiments have to be repeated many times to obtain statistically significant results.
Robots in the actual environment do not perform identically in every experiment.
Wheel slippage, weak batteries, erratic sensor readings are some of the hardware
related issues that make simulation an attractive alternative. For low speed, low
acceleration, and lightly loaded applications, kinematic models of Wheeled Mobile
Robots (WMRs) provide reasonably accurate results.
2.3.1 Robot Agent
The basic Robot module in this work is based on the Differential Drive
Model (DDM). Differential Drive is a steering method widely used by many wheel
type mobile robot systems. It is different from the ‘differential drive’ that used in
automotive engineering for certain drive system. It is the steering mechanism similar
to tank treads vehicles [32]. Generally it is similar to wheelchair steering concept.
Both the wheels are arranged in the same axis and can be rotated independently.
When both rotate in tandem, the robot moves in a straight path. But when the
rotation speeds vary between the two wheels, the robot moves in a curved path. The
robot make a point turn, when the wheels rotate in the same speed but opposite
19
directions, where the center of turning located in the middle of the distance between
the two wheels [11].
The differential drive model is chosen in this work to model the robot
mobility due to its popularity in relatively small-sized applications. Figure 2.1
shows statistics from Robomenu Robot Gallery, Robots.net where 434 mobile robots
were surveyed and compared. The survey shows that the 2-wheel and threads type
design is the most popular mean of locomotion for robots while most of the wheeled
designs are differential drive systems anyway.
0
10
20
30
40
50
60
70
80
90
100
Number of Robots
3 Wheels 2 Wheels 4 Wheels Treads 6 Legs 4 Legs 2 Legs Static 6 Wheels Others
Type of Locomotion
Figure 2.8 Robots.net – Robomenu Robot Gallery statistics
20
2.3.2 Control Methods
Controller is the robot “brain” for decision-making during the operation.
Autonomous mobile robots usually have on-board computing devices which can be
vary from simple logic circuitries for basic system to advanced super computer for
complex AI algorithms or image processing for vision system. Several control
methodologies have been considered for use in this project [19]-[24]. The first
control method considered for this project is the Proportional-Integral-Differential
controller and the second is the Pole Placement controller.
Other methods that are widely used for mobile robot control include sliding
mode tracking control, dynamic behaviour of the system may be tailored by the
particular choice of the sliding function [19] [20]; stable tracking control law for
mobile robots with nonholonomic velocity constraints with controller stability that is
derived by the Lyapunov direct method [22] [23]; adaptive tracking control [12]
where a current state equation is written in terms of a virtual state and control; a
control Lyapunov function is chosen for the system, treating it as a final stage; back-
stepping control [24] which is similar in concept to the adaptive control method.
2.4 Windows Based Environment Tools
Mobile robot development requires intensive hardware technology
competencies. Mathematical modelling and simulation provide an alternative for
design and algorithm developments without the physical constrains. Simulations
under virtual reality environment further enhance output results [26]. Besides the
rapid system reconfiguration capability and resources saving advantages, simulation
also provides details data for performance analysis [33].
21
The simulation engine used in this work is MATLAB Simulink. The main
reason is of course the popular and standardized programming environment and
incorporated with many research valuable toolboxes. The availability of the Virtual
Reality Toolbox in Simulink has provided this work a great degree of simplicity in
terms of visual virtual reality integration. The cross-platform capability has further
extended the usability of this work in various operating systems in the future. But the
drawbacks might be the commercial factor of the product and also the overall
simulation speed is not optimized.
They are numerous robotics simulating solutions available to date. A
complete list of mobile robotics software discussed here is available in APPENDIX
A. Industrial robotics simulation has a long history since the existence of computer
and industrial robots. Mobile robotics is following the same development path.
Simulation has become the mainstream in robotics design along with algorithm
developments. Although virtual reality has brought in 3D capability into mobile
robotics simulation, 2D simulators are still popular due to the reason of many mobile
robots are still designed to work under simple and controlled environments.
The CAS Robot Navigation Toolbox has provided Matlab toolbox for 2D
robot localization and mapping. Many more 2D mobile robot simulators are still
active over the Internet such as BugWorks and POPBUGS by Chris Thornton,
Rossum’s Playhouse as part of open-source robotics software for The Rossum
Project, the Java based Karel J. Robot Simulator, and MobotSim, a commercial
software for 2D simulation of differential drive mobile robots. Apart from wheeled
based robots, Yobotics Simulation Construction Set Software is able to model legged
robot systems.
With the virtual reality integration, many simulators have presented realistic
visualization output for mobile robot simulation. MoRoS3D, eyeWyre, Juice and
Simulator “Bob” are a few examples that come with excellent 3D simulation
environment. Many of the simulation solutions are developed for education, research
22
and development purposes. The famous soccer based simulator, RoboCup Soccer
Simulator and TRSoccerbots are very educational tools for learning autonomous
agents system among students. Apart from educational intentions, many simulators
have been developed as a contribution to the open source community. The simulation
tools are designed on general programming platform for continuous community
development. ROBOOP is a robotics object oriented package in C++. CARMEN or
the Carnegie Mellon Robot Navigation Toolkit is an open source collection of
software for mobile robot control. RobotFlow is another open source robotics toolkit
using FlowDesigner.
Webots is a commercial simulation software by Cyberbotics that able to
simulate various mobile robot systems, including Khepera II, LEGO Mindstorms,
Aibo ERS-7, soccer robots and humanoid robots. It provides a rapid prototyping
environment for modelling and simulating multi mobile robots systems. An
interesting open source solution, Darwin2K is able to simulate and automate robot
system design synthesis using evolutionary algorithm to optimize the task-specific
performance. Recognizing the potential market of mobile robotics, Microsoft
announced their entry into the field with the Microsoft Robotics Studio suite aimed
at academic, hobbyist and commercial developers and handles a wide variety of
robot hardware.
2.5 Methodology
The project began with a search and study of two wheeled robots as well as
modelling and simulation made by other researchers around the world. Based on the
model parameters discussed in Section 2.3, the kinematic model of a two-wheeled
differential drive mobile robot will be simulated with its behaviour defined by a
controller.
23
The controller is to be selected on the basis of several assumptions:
• Movement of the robot is on a horizontal plane
• There is only one point contact on a single wheel
• Wheels are not deformable
• Movement is made by pure rolling of the wheels only (v = 0 at contact
point)
• No slipping, skidding or sliding of the robot on the surface
• No friction for rotation around contact point
• Steering axes are orthogonal to the surface
• Wheels are connected by a rigid frame
The Proportional-Integral-Derivative (PID) and Pole Placement Controllers
are to be ported onto the robot model in Simulink and compared. The controllers are
to be tested on stability, response time, processing speed, and controllability. A
flowchart of the project is shown in Figure 2.9.
Figure 2.9 Project Methodology
Robot Kinematic Modelling
Study models of two-wheeled robots
Study path following controllers for 2-wheeled robots
Robot Controller Simulation
Comparison of Controllers
CHAPTER 3
SYSTEM MODELLING
3.1 Differential Drive Model
To design the robot model, a few requirements are needed: the kinematic or
dynamic model of the robot, model of ground/wheel interaction, and definition of the
required motion such as velocity and position control must be known or assumed.
The control law design is also required to satisfy constraints of the model. Models
can be used for both mobile systems and manipulators. Manipulators allow direct
estimation of position via forward and inverse kinematics and dynamics. This is not
always true for mobile systems as discussed above in Section 2.2.
The differential drive model is derived from the forward kinematics
equations that represent elementary model, where all the physical issues such as
fiction, inertia and mechanical structure inaccuracy are neglected [9]. Many
researchers have opted to use Lagrangian Mechanics to define the geometric model
of two-wheeled differential drive robots [9]-[15]. Differential drive is a
nonholonomic system [25] where the number of control variables is less than the
number of output variables. In this case, there are two control variables which are
25
the wheel rotation speeds 1ϕ& and 2ϕ& , and three output variables, the robot motion x& ,
y& and θ& . Here, a robot is defined in an inertial reference frame, I, while the robot
itself has its own reference frame, R, as shown in Figure 3.1. The robot pose, ξ, is
thus found to be:
I
x
yξθ
=
(3.1)
Figure 3.1 Reference frame for Initial Reference (I) and Robot (R).
From the robot definition in Figure 3.2, the speed of each wheel is r iϕ& and
hence the translational speed is the average velocity:
2
21 ϕϕ &&&
+= rxR (3.2)
θ
xI
yI
xR yR
26
Figure 3.2 Left: Differential drive model of the robot. Right: Wheel model of the
robot.
The differential drive robot is set up with two driving wheels. Wheels have
radius r, and are placed at a distance l from the centre line. Wheels rotate at speeds
1ϕ& and 2ϕ& . Thus the motion between frames is:
( )R IRξ θ ξ=& & (3.3)
The instantaneous rotation of P for one wheel:
l
r
2
11
ϕω
&= (3.4)
The total rotation:
)(2
21 ϕϕθ &&& −=l
r (3.5)
r
l l
rϕ ⋅&
v
27
The relation between the references frame is through the standard orthogonal
rotation transformation:
cos sin 0
( ) sin cos 0
0 0 1
R
θ θ
θ θ θ = −
(3.6)
And the prediction of the motion of the robot motion in the global frame is:
( )1 2, , , ,I
x
y f l rξ θ ϕ ϕθ
= =
&
& & &&
&
(3.7)
From Eq. 3.7 it can be seen that the incremental orientation of the robot with
respect to the inertial frame is a function of
l = length from wheel to the centre of the robot
r = radius of the wheel
θ = the previous angle orientation
1ϕ& = rotation speed of wheel 1
2ϕ& = rotation speed of wheel 2
With reference to the robot model described in Section 2.5 and [9]-[15], the
full model is derived to be:
( ) 1
I RRξ θ ξ−
=& & (3.8)
28
( )
−
+
= −
l
rRI
21
21
10
2 ϕϕ
ϕϕθξ
&&
&&
& (3.9)
Since ( )R θ is a rotational matrix, thus ( ) 1R θ
− is
( ) 1
cos sin 0
sin cos 0
0 0 1
R
θ θ
θ θ θ−
− =
(3.10)
Substituting equations (3.2), (3.5), (3.9) and (3.10) into (3.8), we obtain the
differential drive model:
=
−
+
−
=
θϕϕ
ϕϕθθθθ
ξ&
&
&
&&
&&
& y
x
l
rI
21
21
02
100
0)cos()sin(
0)sin()cos(
(3.11)
It is useful to note that the robot pose is defined when we change the wheel
rotation speed. The wheel radius and robot width is of course constant. The model
has the assumptions lined in the Section 2.5. This mathematical model is simulated
in Simulink that will be discussed in the next section.
29
3.2 MATLAB/Simulink Model
The robot model was initially made with no automatic control. The robot
pose is defined by the x, y and θ variables, while the input to the robot is the wheel
speed. As shown in Figure 3.3, the two green sliding bars on the left control the
motor speed. By simply manually controlling these two sliding bars the robot model
is seen to move on an X-Y graph in Figure 3.5.
Figure 3.3 Basic MATLAB/Simulink model of the robot based on [9]-[15].
To test this model even further, a random input is made to control the sliding
bars and make the robot appear to move randomly across the plane. The Simulink
model for random control is shown in Figure 3.4. A comparison of human control
and random movements are shown in Figure 3.5. At this point it is simply shown
that this model is controllable but is yet to have any objective or any form of digital
control. The next step is to model subsystems for the robot to be attached to the
kinematic model.
30
Lef tMotor
RightMotor
x
y
Zeta_Zero
Kinematic Model XY Graph
Speed Scope
Random Right
Motor Speed
Random Left
Motor Speed Output Scope
Figure 3.4 Simulation for random control of robot model.
Figure 3.5 Left: Output shows controllability of the model by a human user. Right:
Random control of the robot model.
31
3.2.1 Motor Driver Subsystem Block
A motor driver is a device that takes in a small voltage or current reading to
drive a motor that usually requires higher voltage or current ratings. In this model
(Figure 3.6), the motor driver will receive control signals directly from the output of
the controller. The maximum speed is set to 1 for 100%. This value can be changed
to suit the simulation but is otherwise left at a value of 1.
An output value of 0 would mean that the wheel is not moving while a value
of 1 means the wheel is moving forward at full speed. If the output is a negative,
then the wheel would be running in reverse. For example, if both outputs of this
block is negative one (–1), the robot would be moving in the reverse direction at full
speed. For this project, a reverse movement is not required.
Two saturation blocks are placed to ensure the robot satisfies the
nonholonomic constraint. This is done by limiting the outputs of the saturation
blocks to be between 0 and 1. Effectively this will make the robot only be able to
move in the forward direction. The saturation block also provides a limiting factor in
the controller design as gains that are large will have no effect. Large gains will only
be saturated to a maximum number by these blocks so selection of other parameter
values should be made with care.
2
Out2
1
Out1
1
max speed
Saturation1
Saturation
1
In1
Figure 3.6 Motor driver block.
32
3.2.2 Data Conditioning Subsystem Block
The controller needs to receive a target value. In the case of our robot model,
the target value is the angle that robot has to direct itself towards. This is achieved if
the robot knows its target location and its relative location to the robot itself. Thus
the minimum input should be the target location. From the output of the differential
drive model and this data conditioning block, the robot can calculate its own location
on its axis.
This block has a limitation however: in the Divide block used here, there is a
possibility of the numbers to be divided by zero. This is a mathematical
impossibility and should be approaching infinity. Since the Target heading block
converts the value into an angle in radians and then to degrees, the mathematical
output should be 90°. It is possible to correct this but due to time constraints and the
fact that this study is more concerned with the modelling and control portion of the
differential drive model, this error was left as is. The next step is to integrate a
digital controller into the Simulink model. The next chapter will discuss the
controller selection, and implementation.
1
Out1
atan
Target heading
R2DRadians
to Degrees1
R2D
Radians
to Degrees
Divide
-K-
-ve
5
theta_feedback
4
y_feedback
3
x_feedback
2
y_target
1
x_target
Figure 3.7 Data conditioning block.
33
3.3 Visual, Motor Speed and Data Outputs
Direct control of the robot model reveals the visual, motor speed and data
outputs into the MATLAB workspace. Figure 2.1 shows both the left and right
motor output speeds. The direct control algorithm enables the robot to calculate
which motor to move for it to face the target location and then move from its present
location towards the target point. These values are stored in the LeftMotor and
RightMotor variables in the MATLAB workspace.
A visual representation of the robots movement would be useful during
simulation. An x-y graph plot (Figure 3.9) shows the visual output of the robot and
its environment with markings moving from its start location and stopping at the
target location of P(5, 5). These x and y values are stored in the Xaxis and Yaxis
variables in the MATLAB workspace.
0 100 200 300 400 500 6000
0.5
1
Time
Left
Moto
r S
peed (
%)
0 100 200 300 400 500 6000
0.5
1
Time
Rig
ht
Moto
r S
peed (
%)
Figure 3.8 Left and right motor speed output.
34
0 1 2 3 4 5
0
1
2
3
4
5
X
Y
direction of
robot movement
target point,
P(5, 5)
starting
point,
P(0, 0)
Figure 3.9 Visual output showing starting point, end point and direction of robot
movement from the start to finish.
Other outputs are the desired heading and current heading readings which are
stored in the desired and current variables respectively. These values show
angles in degrees. Output samples for these two variables are shown and discussed
in the Reponse without Controllers section (Section 4.2).
3.4 VRML Environment
Matlab Simulink has a Virtual Reality Toolbox that can be used for
modelling, simulation and animation capabilities. Putting the aim and the tool
together, the overall modeling framework (Figure 3.10) is presented in this work.
The framework is built up with three main subsystems, “Robot”, “Environment” and
35
“Virtual Reality”. Each subsystem consists of few modules and some modules are
cross-linked among subsystems. Each module is made up of three components,
Virtual Reality (VR) model, mathematical model and Simulink model.
Before importing into Simulink, the VRML model is created by using the V-
Realm Builder 2.0 that comes along with the Virtual Reality Toolbox. This process
is to rearrange the nodes and parent-child relationship in order to be used by
Simulink [35]. Simple geometry can be created directly using the builder. Graphical
texture also can be added to provide more realistic appearances. The Box geometry
command is used to produce the 150 x 150 x 150 mm robot body and the robot
surface is added with image texture from a graphic file.
Figure 3.10 Overall virtual reality modelling framework.
The advantages of Virtual Reality in this work are the 3D representation that
enhanced the animation of the simulation and the interactive capability of VRML.
Sensor Controller
Environment
Robot
VR Model
Object
36
During simulation, the entire “Robot” subsystem is interacting with the
“Environment” subsystem in “Virtual Reality” subsystem to establish the whole
system simulation.
Figure 3.11 Processing VRML model using V-Realm Builder 2.0.
The Differential Drive Model derived in Section 3.1 is taken as the robot
agent in the simulation. The “Robot” subsystem consists of the robot hardware
locomotion model that represents the two basic mobile robot elements: Actuator and
Robot Structure. The “Environment” subsystem is represented by an image of a
soccer field. The VR models of these two components are merged in VRML
modelling to produce the “Virtual Reality” subsystem. Figure 3.12 shows the basic
differential drive model in Simulink. The Simulink model is linked with the VR
subsystem by using the VR Sink block to produce the complete basic differential
drive model.
37
Figure 3.12 Basic differential drive model utilizing the Virtual Reality toolbox in
Simulink.
CHAPTER 4
CONTROLLER SELECTION AND CONFIGURATION
4.1 Controller Test Setup
A mobile robot is constantly moving. Thus its desired heading and current
heading will always change depending on the robot’s location. The desired heading
is the angle pointing directly from the robot’s present position to the target point.
The current heading is the direction that the robot is facing. These are the two
output readings that will serve as this study’s indication of each controller’s
capability to control the robot model. As the robot moves with its nonholonomic
limitation, the direction of which it is facing will constantly change.
The robot model will start from the origin at point (0, 0). The target location
is placed at point (5, 5). The robot model will have to move a distance of 7.07 units
at 45° from its starting location. However, effectively it will have to rotate and face
the target while moving towards the target point. Simulink model block settings
have been set to ensure the robot satisfies the nonholonomic constraint. The
differential drive model will only be able to move in the forward direction, but its
individual wheel speed may vary between 0% and 100%.
39
4.2 Response without Controllers
The first test and reference would be testing the differential drive robot model
response without a controller. Figure 4.2 shows the desired heading changing
drastically initially and then quickly steadies to an angle of -45.005°. This is in line
with the current heading angle output in Figure 4.3 where it clearly shows the robot
face turning and entering the desired heading.
5
y target
5
x target
Lef tMotor
RightMotor
x
y
t
Zeta_Zero
Kinematic Model
Visual Output
In1
Out1
Out2
Motor Driver
x_target
y _target
x_f eedback
y _f eedback
theta_f eedback
Out1
Data Conditioning
Figure 4.1 Differential drive simulation without any controller.
0 100 200 300 400 500 600-48
-47
-46
-45
Angle
(D
egre
es)
X: 598
Y: -47.65
Figure 4.2 Robot response without controller showing the desired heading.
40
0 100 200 300 400 500 600-50
-40
-30
-20
-10
0
Angle
(D
egre
es)
X: 598
Y: -47.65
Time
Figure 4.3 Robot response without controller showing the current heading.
Also important to note is that the robot completes its run at a time of 626 time
units. The next subchapters will discuss controller methods to improve
controllability and reduce the time of completion.
4.3 Proportional Integral Derivative (PID) Controller
A proportional, integral, derivative (PID) controller is a generic control loop
feedback mechanism widely used in industrial control systems. A PID controller
attempts to correct the error between a measured process variable and a desired set
point by calculating and then outputting a corrective action that can adjust the
process accordingly. The PID controller calculation (algorithm) involves three
separate parameters of the Proportional, the Integral and Derivative values. The
Proportional value determines the reaction to the current error, the Integral
determines the reaction based on the sum of recent errors and the Derivative
determines the reaction to the rate at which the error has been changing. The
weighted sum of these three actions is used to adjust the process via a control
element such as the position of a control valve, motor control or the power supply of
41
1
C(s)
In1 Out1
Robot System
Transfer Function
G(s)Kd
Ki
Kp
K Ts
z-1
2z-2
Ts+2*TcD.z+Ts-2*TcD
Derivative
1
R(s)
a heating element. A PID controller is shown in Figure 4.4 and its transfer function
is:
s
K
Ks
K
KsK
s
sKKsKsK
s
KKsG
D
I
D
PD
DIPD
IPC
++
=++
=++=
2
2
)( (4.1)
This transfer function can easily be placed in Simulink as shown but for this
project, the PID block made available by Simulink will be used directly. The PID
feedback is the current heading angle reading of the robot model in degrees.
Figure 4.4 The PID controller.
4.3.1 PID Implementation in MATLAB/Simulink
The PID controller will receive input (desired target point) and feedback from
the kinematic model. The output from the PID will make corrections to the motor
controls via a motor driver. An XY Plot block was used to provide visual output of
the test at hand (Figure 4.5). Using the PID controller discussed in the previous
section, it was essential to make a data conditioning block to prepare signals to be
sent into the PID controller.
42
5
y target
5
x target
Lef tMotor
RightMotor
x
y
t
Zeta_Zero
Kinematic Model
Visual Output
PID
PID Controller
In1
Out1
Out2
Motor Driver
x_target
y _target
x_f eedback
y _f eedback
theta_f eedback
Out1
Data Conditioning
Figure 4.5 Simplified PID controller in Simulink.
The feedback coming from the kinematic model is in the form of radians. A
Radians to Degrees block is used as the calculations used in the Data Conditioning
block is in degrees. X and Y location from the robot model is also accounted for to
determine the current location of the robot and thus triangulate the desired heading
and shortest path for the robot model to move along.
1
Out1
atan
Target heading
R2DRadians
to Degrees1
R2D
Radians
to Degrees
Divide
-K-
-ve
5
theta_feedback
4
y_feedback
3
x_feedback
2
y_target
1
x_target
Figure 4.6 Contents of the Data Conditioning block.
43
yx
Ya
xis
ou
tpu
t fo
r X
Y g
rap
h2
Xa
xis
ou
tpu
t fo
r X
Y g
rap
h1
0.1
min
err
or
0
de
sire
d h
ea
din
g 0
cu
rre
nt
he
ad
ing
Rig
ht
Moto
r
Left
Moto
r
x y t
Ze
ta_
Ze
ro
Kin
em
ati
c M
od
el
XY
Gra
ph
cu
rre
nt
To
Wo
rksp
ace
1
de
sire
d
To
Wo
rksp
ace
ata
n
Ta
rge
t h
ea
din
g
ST
OP
Sto
p S
imu
lati
on
Sp
ee
d S
co
pe
Rig
htM
oto
r
Rig
ht
Mo
tor
Sp
ee
d
<=
Re
lati
on
al
Op
era
tor
R2
D
Ra
dia
ns
to D
eg
ree
s1
R2
D
Ra
dia
ns
to D
eg
ree
s
0
PID
ou
tpu
t
Ou
tpu
t S
co
pe
In1C
trl_
R
Ctr
l_L
Mo
tor
Dri
ve
r
Le
ftM
oto
r
Le
ft M
oto
r S
pe
ed
Div
ide
PID
Dis
cre
te
PID
Co
ntr
oll
er
-K-
-ve
Figure 4.7
C
om
ple
te P
ID c
on
tro
ller
wit
h D
DM
Mo
del
in
Sim
uli
nk
.
44
4.3.2 PID Tuning and Configuration
Firstly the PID controller is simulated with standard values of KP, KI and KD
that is already placed by the MATLAB block. The values are KP = 0.1, KI = 1 and
KD = 0. The following graphs (Figure 4.8 and Figure 4.9) show the current heading
and desired heading of the robot dramatically changing and oscillating. These
settings are clearly not suitable for our robot plant. Visual outputs show that the
robot does not even reach the target point (Figure 4.10).
0 100 200 300 400 500 600 700-150
-100
-50
0
50
Time
Angle
(D
egre
es)
direct control
with untuned PID
Figure 4.8 Robot current heading response with untuned PID controller.
0 100 200 300 400 500 600 700-100
-50
0
50
100
Time
Angle
(D
egre
es)
direct control
with untuned PID
Figure 4.9 Robot desired heading response with untuned PID controller.
45
0 1 2 3 4 5
0
1
2
3
4
5
X
Y
target point, P(5, 5)
starting point,
P(0, 0)
Figure 4.10 Visual output with untuned PID controller.
As the robot is moving, the current heading and desired heading of the robot
would change according to its position. At the start of the simulation (time zero) the
desired heading is 45°, but this changes as the robot moves and starts to make
corrections while moving. The controller will compare both headings and provide
control signals to the motor driver block.
For tuning via observation, a 3D surface plot is created in MATLAB, using
either the command mesh or surf. These commands facilitate the graphical
analysis of the PID controller’s phase and gain characteristics as a function of the
PID parameters, KP, KI and KD. Figure 4.11 shows how the PID controller variables
vary with parameters. Only the KP variable is varied from 0.01 to 1.00 while the KI
and KD variables are set to zero. Plotting the Mesh for the proportional variable, the
value KP = 0.3 is chosen as it is a good large value, reaches the target point with
good response time and a steady state time of 83 units (Figure 4.12).
46
0.010.035
0.0600.085
0.1100.135
0.16
0
100
200
300
-70
-60
-50
-40
-30
-20
-10
0
Kp valuesTime
Angle
(D
egre
es)
Figure 4.11 Mesh analysis for proportional value of the PID controller (KP).
0 50 100 150 200 250 300 350 400-50
-40
-30
-20
-10
0
X: 89
Y: -47.64
Time
Angle
(D
egre
es) desired
current
Figure 4.12 Robot model current heading response with KP = 0.30.
47
Next the KI value is varied between 0.05 and 1.00. Its mesh 3D plot is
obtained in Figure 4.13. Higher values of KI lead to oscillation of the robot plant.
To achieve a response that does not oscillate severely and still provides timely zero
steady state error, the KI value of 0.125 was chosen. With this KI value, a
%overshoot of 62% based on Figure 4.14 was calculated and is sufficient for the
purpose of this simulation.
0
0.25
0.50
0.75
1.00
0
100200
300400
-100
-80
-60
-40
-20
0
Ki ValuesTime
Curr
ent
Headin
g A
ngle
(degre
es)
Figure 4.13 Mesh analysis for integral value of the PID controller (KI).
0 50 100 150 200 250 300 350 400-80
-60
-40
-20
0
X: 94
Y: -61.58
Time
Curr
ent
Angle
(D
egre
es)
X: 351
Y: -38.03
Figure 4.14 Robot model current heading response with KP = 0.30 and KI = 0.125.
48
The formula for calculating the %overshoot is:
100%max ×
−=
final
final
c
ccOS (4.2)
Lastly we find for the KI value by varying its value while setting KP = 0.30
and KI = 0.125. The KD value appears to have no effect on overshoot (Figure 4.15),
though theoretically a larger value of KD should reduce the overshoot. Overall
transient response is slower and oscillates at a high frequency for larger values of KD
due to signal noise amplification in the differentiation of the error. In this case, a
small value of KD = 0.0001 is chosen to ensure stability of the robot movement.
0.0020.0030.0040.0050.0060.0070.0080.0090.010
0
100
200
300
-60
-50
-40
-30
-20
Kd valuesTime
Figure 4.15 Mesh analysis for differential value of the PID controller (KD).
49
4.3.3 Output of Tuned PID Controller
Matlab m-codes for tuning via observation are provided in Appendix B.
After performing tuning via mesh analysis, the gains KP = 0.30, KI = 0.125, and KD =
0.0001 provided the desired response. The transfer function of the PID controller is
thus found to be:
s
K
Ks
K
KsK
sG
IPD
C
++
= 33
2
)( (4.3)
s
ss
++=
0001.0
125.0
0001.0
30.00001.0 2
(4.4)
s
sssGC
10000
12503000)(
2 ++= (4.5)
These settings result in a system with slight overshoot, fast rise time, and
small steady-state error. This is acceptable for implementation into the robot
controller. In the end the robot still managed to reach its target location. Figure 4.16
shows the Current heading and desired heading output of the finalized tuned PID
controller with the gains and transfer function derived above.
Finding the gains value via observation of 3D plots proved to be time
consuming and tedious. For future purposes of tuning a PID controller, it is
suggested to use a more robust method such as the Ziegler-Nichols tuning method.
In the next subchapter, a pole placement controller is prepared and simulated for
response comparison.
50
0 50 100 150 200 250 300 350-80
-60
-40
-20
0
X: 97
Y: -61.59
X: 348
Y: -38.39
Time
Angle
(D
egre
es)
desired heading
current heading
Figure 4.16 Current heading and desired heading output of the finalized tuned PID
controller with gains KP = 0.30, KI = 0.125, and KD = 0.0001.
4.4 Pole Placement Controller
The closed-loop pole locations have a direct impact on time response
characteristics such as rise time, settling time, and transient oscillations. Root locus
uses compensator gains to move closed-loop poles to achieve design specifications
for SISO systems. However there is a method to use state-space techniques to assign
closed-loop poles. This design technique is known as pole placement, which differs
from root locus as using pole placement techniques, dynamic compensators may be
designed and pole placement techniques are applicable to MIMO systems. Control
by pole placement is introducing additional parameters into a system so that we can
control the location of all closed-loop poles. An nth-order feedback control system
has an nth-order closed-loop characteristic equation of the form:
001
1
1 =++⋅⋅⋅++ −− asasas n
n
n (4.6)
51
Since the coefficient of the highest power of s is unity, there are n
coefficients whose values determine the system’s closed-loop pole locations. Thus,
if we can introduce n adjustable parameters into the system and relate them to the
coefficients in Equation 4.6 above, all of the poles of the closed-loop system can be
set to any desired location.
To start the pole placement approach, the robot model needs to be
represented in state space by:
=x& Ax + Bu (4.7)
y = Cx + Du (4.8)
and is shown pictorially in Figure 4.17, where light lines are scalars and the heavy
lines are vectors. In these equations, u is the vector of control inputs, x is the state
vector, and y is the vector of measurements.
A typical feedback control system as in the PID controller previously
designed, the output, y, is fed back to the summing junction. Now the topology of
the design changes for pole placement. Instead of feeding back y, each state variable
will be fed back to the control, u, through the gain ki . The feedback through the
gains ki , is represented in Figure 4.18 by the feedback vector –K.
The state equations for the closed-loop system of Figure 4.18 can be written
by inspection as:
rru BBK)x(A)KxB(AxBAxx +−=+−+=+=& (4.9)
uy DCx += (4.10)
52
The design of a state-variable feedback for closed-loop pole placement
consists of equating the characteristic equation of a closed-loop system, such as that
shown in Figure 4.18, to a desired characteristic equation and then finding the values
of the feedback gains, ki. To simplify this work, MATLAB built-in functions will be
utilized.
Figure 4.17 State space representation of a plant
Figure 4.18 Plant with state-feedback
B ∫ C
A
x& x y u +
+
–K
r
+
+
B ∫ C
A
x& x y u +
+
53
4.4.1 DDM State Space Representation
To apply pole-placement methodology to the differential drive model, the
state space representation of our model must first be obtained. This can be done by
utilizing the System Identification Toolbox in MATLAB. We start by making an
iddata object containing measured values of the robot input and output signals.
We will only consider the desired heading (as input) and the current heading (as
output) of the system. The robot plant is fed with a sinusoidal wave of amplitude 1
at 1 Hz and the response is recorded Figure 4.19. Vectors thetaInput and
thetaOutput are created in the workspace. Vector thetaInput is a sequence
of 1000 plant input values (desired heading), and thetaOutput is the
corresponding output sequence (1000 current heading values). The sampling period
is 0.025 seconds.
0 100 200 300 400 500 600 700 800 900 1000
-1
-0.5
0
0.5
1
Data points
Input
and O
utp
ut
of
Robot
Model
Figure 4.19 Input (red) and output (blue) response of the robot kinematic model.
54
An iddata object called dry is created as follows:
dry = iddata(thetaOutput, thetaInput, 0.025);
Once the data has been loaded, the System Identification commands are used
to determine a model that best fits the data. The following commands create a
System Identification Toolbox model called m1:
>> dry.InputName = 'Desired Heading';
>> dry.OutputName = 'Current Heading';
>> ze = detrend(dry(1:300));
>> m1 = pem(ze);
>> whos m1
Name Size Bytes Class
m1 4-D 24376 idss object
Grand total is 928 elements using 24376 bytes
The pem function settings govern the type of model generated. The model
m1 defines a model structure and adjustable parameter values that best fit the data. It
also contains System Identification-Toolbox-specific information, such as the
algorithm used to estimate the parameters. The model is next converted to a standard
LTI object prior to using it in the Model Predictive Control Toolbox. The System
Identification Toolbox provides a special conversion function called ss. The
flowing codes converts m1 to m1ss, an LTI ss object, and displays the following:
55
>> m1ss = ss(m1)
a =
x1 x2 x3 x4
x1 0.97 -0.008936 1.007e-005 1.35e-008
x2 0.09792 1.03 -4.734e-005 3.298e-007
x3 -0.001508 0.001123 -0.1909 0.001262
x4 0.2771 0.9053 0.003464 -2.839
b =
Desired Head v@Current He
x1 0.001179 2.093
x2 0.002121 75.66
x3 390.2 3.958e+005
x4 -2352 -8.322e+008
c =
x1 x2 x3 x4
Current Head 0.737 -0.01274 6.793e-006 3.926e-009
d =
Desired Head v@Current He
Current Head 0 0.005233
Input groups:
Name Channels
Measured 1
Noise 2
Sampling time: 0.025
Discrete-time model.
56
The results show that m1ss is a 4th
order, discrete-time, state-space model
with a sampling time of 0.025, one output ("Current Head"), and two inputs
("Desired Head" and "v@Current He"). The System Identification Toolbox
automatically creates a noise input for each output to model the impact of
unmeasured disturbances and measurement noise. This is why where there is only
one output (Current Head), there will also be its associated noise input
v@Current He. The System Identification Toolbox designates the noise inputs
using the LTI model's InputGroup property. In this case, channel 2 (v@Current
He) is classified as Noise, while channel 1 (Desired Head) is Measured.
It is also possible to use the spa command to estimate the frequency
response. There is also another method to estimate a continuous-time model, in a
canonical form parameterization, focusing on the simulation behaviour by using
n4sid. At this point, we should have the A and B variables for the next step:
placing of the pole. But which pole to place? Let us first find out what poles are
already there. To identify the poles of the robot model, the pole command is used
as below and the pole-zero map using pzmap is shown in Figure 4.20:
>> pole(m1ss)
ans =
0.9959
1.0040
-2.8390
-0.1909
Using the functions and commands readily available in MATLAB, we have
now identified the robots state-space model and the location of its poles. The outputs
57
show that there are two poles on the left side and two poles on the right side of the
pole-zero map. The next step is to select where to place the poles for this pole
placement controller.
-3 -2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5
-0.5
0
0.5
1
Pole-Zero Map
Real Axis
Imagin
ary
Axis
Figure 4.20 Pole-zero map of the robot kinematic model.
4.4.2 State-Feedback Gain Selection
Under state feedback u = Kx, the closed-loop dynamics are given by
=x& (A – BK) x , and the closed-loop poles are the eigenvalues of A – BK. Using the
place command, a gain matrix K that assigns these poles to any desired locations
in the complex plane is computed. However the A, B, C and D matrices of the robot
state-space model must first be retrieved. This is done by using the ssdata
command and it will output each matrix similar to the output of the ss command:
[A,B,C,D] = ssdata(m1ss);
58
For a settling time < 0.5 sec and overshoot < 5%, then we might try to place
the two dominant poles at -0.5 +/- 0.5i (at zeta = 0.7 or 45 degrees with sigma = 10 >
4.6*2). The third and fourth pole are placed at -2 and -1 to start, and will be changed
later depending on what the closed-loop behaviour is. The poles are placed using the
place command as shown in the following codes. Then finally we compute the
feedback gain matrix K that achieves the desired closed-loop pole locations or p1 to
p4.
p1 = -1 + 0.1i;
p2 = -1 - 0.1i;
p3 = -2;
p4 = -1;
K = place(A,B,[p1 p2 p3 p4]);
lsim(A-B*K,B, C, D, [u u],t);
The command lsim simulates the time response of the state-space linear
systems to arbitrary inputs, u, with time, t. A sine wave input was chosen to drive
the model and the output is shown in Figure 4.21. As expected of pole placement
method, there is a large steady state error. The system still converges and responds
accordingly to the input signals.
A bode plot is plotted to show the frequency response of our system (Figure
4.22). The plot on the left shows the desired heading input response. Since the
magnitude is well below zero, this is considered to be a stable system. The noise is
of course unstable.
59
Linear Simulation Results
Time (sec)
Am
plit
ude
0 5 10 15 20 25-10
-5
0
5
Figure 4.21 Simulation output showing high percentage of steady-state error.
-100
-80
-60
-40
-20
0
20
40
From: In(1) - Desired Heading
To: O
ut(
1)
10-2
100
102
-90
0
90
180
270
To: O
ut(
1)
From: In(2) - Noise
10-2
100
102
Bode Diagram
Frequency (rad/sec)
Magnitu
de (
dB
) ; P
hase (
deg)
Figure 4.22 Bode plots of the system with pole placement and its gains.
Left: Desired heading input bode plot, Right: Noise input bode plot.
60
The gains and state space model derived in this section are placed into a
State-Space block inside the original Simulink model. The results are shown in
Figure 4.23 where it is clear that the controller responds but is unable to connect the
current heading to the desired heading. This is due to the steady-state error observed
in the time-response made previously.
0 2 4 6 8 10 12-100
-50
0
50
100
Time
Desired &
Curr
ent
Headin
g (
degre
es)
current vs tout
desired vs tout
Figure 4.23 Current heading and desired heading output of the system with pole
placement and its gains.
61
4.5 Comparison and Analysis
Let’s start the comparison by first looking at the PID controller. The PID
controller gave a response with slight overshoot, fast rise time, and small steady-state
error. This is acceptable for implementation into the robot controller. In the end the
robot still managed to reach its target location in good time. It is possible to tune the
controller further by using other tuning methods.
After simulating the pole placement controller, it responds to input and
heading directions but is unable to connect the desired target. This is due to the
steady-state error observed in the time-response made previously and is
characteristic of pure pole placement controllers. It is possible to reduce the error by
introducing an integral controller, but this was not done.
By comparison, the PID controller is better as it actually can perform the task
required: reach the target location. However various points can be looked at such as
the bode diagram and step or frequency responses that were not studied in depth in
this project. Much improvement is possible and suggestions are provided in the final
chapter.
62
4.6 Porting to Hardware
An attempt was made to port the PID and Pole Placement controllers to
hardware. The physical design of the Differential Drive Robot is a combination of
various physical (hardware) and computational (software) elements that integrate the
subsystems of the mobile robot to work in one unit. The robot consists of a
microcontroller (PIC16F877A), two permanent magnet direct current (PMDC)
motors, and Light Dependent Resistor (LDR) sensors. The microcontroller is
programmed using the MicroC compiler which provides functions that allow
creation and editing of source files and debugging.
Source codes created on MicroC is then compiled and downloaded into the
microcontroller chip via PICbootplus through RS-232 serial cable connected
between the computer and the PIC16F877A bootloader. The whole printed circuit
board can then be unplugged from the serial cable for stand-alone operation.
Figure 4.24 Bootloader circuit running on PIC16F877A.
63
Figure 4.25 Programming and downloading setup of the Differential Drive Robot.
The hardware proved to be a major limiting factor. By introducing wheels on
the front of the robot, it makes calculations that have been made to be inaccurate.
PID was able to control the robot and give it a ‘natural’ looking behavior but did not
behave as the simulation did. Since kinematic model does not take into account
dynamic constraints of an actual system, the behavior is different compared to the
simulated results shown in this chapter.
Figure 4.26 Left: Side view of the Differential Drive Robot. Note the castors on the
front. Right: Top view of the Differential Drive Robot.
Due to time constraints only the PID controller was able to be ported to the
hardware. The pole placement could not be finalized as the steady-state error of the
simulation is of an unacceptable amount.
CHAPTER 5
CONCLUSION AND FUTURE DEVELOPMENT
Possible mathematical models of a differential drive two-wheeled mobile
robot have been studied. A kinematic only model has successfully been simulated
with nonholonomic constraints via MATLAB/Simulink and expansion to include
dynamic equations is also possible. The PID controller and pole placement
controller was applied into the robot model separately. It is also possible to generate
a 3D representation of the robot and its environment by integrating the 3D modelling
capability of MATLAB’s VRML in the system modelling and simulation.
For the simple behavior of a line following algorithm, direct control of the
plant will perform this function. However an addition of a PID controller or pole
placement controller has shown that the kinematic model is controllable and thus
future developments of controllers can be applied to this kinematic model. A
combination of sliding mode with PID and also fuzzy logic is possible for future
works.
Dynamic properties are very important to show actual physical errors that
might occur such as overshoot due to inertia and over speeding. The attempt at
porting the PID controller to hardware merely proved that the algorithm for reaching
65
a set target point is working. The hardware did not show a clear relation to the PID
settings made in simulation due to lack of dynamic properties in the robot
mathematical model.
It is suggested for future developments to include continuing attempts using
the Microsoft Robotics Studio. Focus should be put into the development of
controllers especially better methods of tuning for the PID other than via
observation. Pole placement provided an acceptable transient response however it
should be coupled with an integral control to reduce steady state error.
Between the two controllers that were studied during the course of this
project, the PID provides the best overall performance at the point of writing this
report. Various other methods have been developed that can prove even better than
the results presented here. Development of digital controllers for mobile robot
simulation will continue and gain even more value as time progresses.
66
REFERENCES
[1] Japan Robot Association. Summary Report on Technology Strategy for
Creating a “Robot Society” in the 21st Century. Japan. May 2001.
[2] Nehmzow U. Mobile Robotics: A Practical Introduction. London:
Springer-Verlag London Limited. 2000.
[3] Paulson T. Robots Take Scientists Into Sea Depths. Seattle Post-
Intelligencer. 29 July 2005. Retrieved May 12, 2008 from
http://seattlepi.nwsource.com
[4] Bentley M. Next-Generation Robots Take The Plunge. Science/Nature,
BBC News. 9 January 2004. Retrieved May 12, 2008 from
http://news.bbc.co.uk/
[5] Webster G. and Brown D. NASA Extends Operations for Its Long-Lived
Mars Rovers. Mars Exploration Rover Mission. Jet Propulsion Lab,
California Institute of Technology. October 15, 2007. Retrieved May 12,
2008 from http://marsrovers.nasa.gov/
[6] Michel O. WebotsTM
: Professional Mobile Robot Simulation.
International Journal of Advanced Robotic Systems. 2004. 1(1): 39-42.
[7] Edwards C. Model Workers. Engineering & Technology. May 2008.
Herts, United Kingdom: IET Publishing. 3(7): 36-38.
[8] Amin S.H.M. Intelligent Robotics: Behaviour-Based Robotics. Advanced
Robotics. Kuala Lumpur, Malaysia: Universiti Teknologi Malaysia. 2006.
[9] Christensen H. I. Robot Kinematics. Introduction to Perception and
Robotics. United States of America: Georgia Institute of Technology.
April 2005. Retrieved May 12, 2008 from http://borg.cc.gatech.edu/ipr/
[10] Siegwart R. and Nourbakhsh I. Introduction to Autonomous Mobile
Robots. Cambridge, Massachusetts: MIT Press. 2004.
[11] Lucas G.W. A Tutorial and Elementary Trajectory Model for the
Differential Steering System of Robot Wheel Actuators. The Rossum
Project. 11 May 2000. Retrieved May 12, 2008 from
http://rossum.sourceforge.net
67
[12] Takanori Fukao, Hiroshi Nakagawa and Norihiko Adachi. Adaptive
Tracking Control of a Nonholonomic Mobile Robot. IEEE Transactions
on Robotics and Automation. 2000. 16(5): 609-615.
[13] Lobaton E.J. Modelling the Motion and Sensory input of a Two Wheeled
Robot. California: Berkeley College of Engineering, Berkeley University
of California. 2004.
[14] Jeffrey Tan T.C. and Nagi F. H. Modelling and Simulation of Differential
Drive Mobile Robotics System. Proceedings of UNITEN Student
Conference on Research and Development 2005. 6-7 December 2005.
Bangi, Selangor, Malaysia: UNITEN. 2005.
[15] Campion G., Bastin G. and Andrea-Novel B.D. Structural Properties and
Classification of Kinematic and Dynamic Models of Wheeled Mobile
Robots. IEEE Transactions on Robotics and Automation. 1996. 12(1): 47-
62
[16] Martin F.G. A Hands-On Introduction to Engineering. New Jersey:
Prentice Hall. 2001.
[17] Brooks R.A. and Maes P. Learning to Coordinate Behaviors. National
Conference on Artificial Intelligence. July 29–August 3, 1990. Boston,
Massachusetts: AAAI. 1990. 796-802.
[18] Walters D. Implementing Dead Reckoning by Odometry on a Robot with
R/C Servo Differential Drive. Encoder: the Newsletter of the Seattle
Robotics Society. 30 September 2000. Retrieved May 12, 2008 from
http://www.seattlerobotics.org/
[19] Dongkyoung Chwa. Sliding-Mode Tracking Control of Nonholonomic
Wheeled Mobile Robots in Polar Coordinates. IEEE Transactions on
Control Systems Technology. 2004. 12(4): 637-644.
[20] Edwards C. and Spurgeon S.K. Sliding Mode Control: Theory and
Applications. Padstow, U.K.: Taylor & Francis Ltd. 1998.
[21] Tsourdos A., Economou J.T., White B.A. Adaptive Pole Placement for a
MIMO Quasi-Linear Parameter Varying Mobile Robot. Seventh
International Conference on Control, Automation, Robotics and Vision.
2-5 Dec 2002. Singapore: IEEE. 2002. 2: 590-595.
[22] Yutaka Kanayama, Yoshihiko Kimura, Fumio Miyazaki, and Tetsuo
Noguchi. A Stable Tracking Control Method for a Non-Holonomic
68
Mobile Robot. IEEE/RSJ International Workshop on Intelligent Robots
and Systems. 3-5 November 1991. Osaka, Japan: IEEE. 1991. 1236-1241.
[23] Doh-Hyun Kim and Jun-Ho Oh. Globally Asymptotically Stable Tracking
Control of Mobile Robots. Proceedings of the 1998 IEEE International
Conference on Control Applications. 1-4 September 1998. Trieste, Italy:
IEEE. 1998. 1297-1301.
[24] Fierro R. and Lewis F.L. Control of a Nonholonomic Mobile Robot:
Backstepping Kinematics Into Dynamics. Proceedings of the 34th
Conference on Decision & Control. 13-15 December 1995. New Orleans,
LA: 1995. 3805-3810.
[25] Petitt J. Embedded Systems – Position Control of a Non-Holonomic
System. University of Western Australia: 2003
[26] Yang L, Yang X, and He K. The research on Mobile Robot Simulation &
Visualization under Virtual Reality. International Conference on
Information, Communications and Signal Processing ICICS '97. 9-12
September 1997. Singapore: 1997. 390-396.
[27] DARPA Urban Challenge. Popular Mechanics. November 3, 2007.
Retrieved May 12, 2008 from http://www.popularmechanics.com/
[28] Dabney J.B. and Harman T.L. Mastering Simulink 4. New Jersey:
Prentice Hall. 2001.
[29] Martin F.G. Robotic Explorations: A Hands-on Introduction to
Engineering. New Jersey: Prentice Hall. 2001
[30] Weiner T. New Model Army Soldier Rolls Closer to Battle. New York
Times – Technology Section. 16 February 2005. Retrieved May 12 2008
from www.nytimes.com/tech/
[31] Dixon J. and Henlich O. Information Systems Engineering – Mobile
Robot Navigation. London: Imperial College. 1997
[32] McComb G. The Robot Builder’s Bonanza. 2nd
ed. United States of
America: McGraw-Hill. 2000
[33] Rossetti M. D., Kumar A, and Felder R. A. Mobile Robot Simulation of
Clinical Laboratory Deliveries. Proceedings of the 1998 Winter
Simulation Conference. December 13-16, 1998. Washington DC, USA:
ACM. 1998. 1415-1422.
69
[34] Nise N. S. Control Systems Engineering. 4th
ed. United States of
America: John Wiley and Sons. 2004
[35] Carey R. and Bell G. The Annotated VRML 2.0 Reference Manual.
Essex, United Kingdom: Addison-Wesley Longman Ltd. 1997.
70
APPENDIX A
List of Mobile Robotics Simulation Software Discussed in this Document
1. The CAS Robot Navigation Toolbox, 2004. http://www.cas.kth.se/toolbox/
Accessed on 07 February 2008.
2. BugWorks - 2D Robot Simulator and Tutor. http://bugworks.org/
Accessed on 07 February 2008.
3. POPBUGS - A Simulation Environment for Track-driven Robots, 2002.
http://www.cogs.susx.ac.uk/users/christ/popbugs/ Accessed on 07 February
2008.
4. RP1: The Rossum’s Playhouse Mobile-Robot Simulator, 1999.
http://rossum.sourceforge.net/sim/ Accessed on 07 February 2008.
5. Karel J. Robot Simulator, 2004.
http://csis.pace.edu/~bergin/KarelJava2ed/karelexperimental.html
Accessed on 07 February 2008.
6. MobotSim – Mobile Robot Simulator. http://www.mobotsoft.com/mobotsim.htm
Accessed on 07 February 2008.
7. Yobotics Simulation Construction Set Software, 2006.
http://yobotics.com/simulation/simulation.htm Accessed on 07 February 2008.
8. eyeWyre Corporation. http://www.eyewyre.com/ Accessed on 07 February 2008.
9. Juice, 2004. http://www.natew.com/juice/ Accessed on 07 February 2008.
10. Simulator “Bob”, 2006. http://simbob.sourceforge.net/
Accessed on 07 February 2008.
11. The RoboCup Soccer Simulator. http://sserver.sourceforge.net/
Accessed on 07 February 2008.
12. TRSoccerbots, 2006. http://www.trsoccerbots.org/
Accessed on 07 February 2008.
13. ROBOOP – A robotics object oriented package in C++, 2006.
http://www.cours.polymtl.ca/roboop/ Accessed on 07 February 2008.
14. CARMEN Robot Navigation Toolkit. http://carmen.sourceforge.net/
Accessed on 07 February 2008.
15. RobotFlow: Open Source Robotics Toolkit for FlowDesigner, 2005.
http://robotflow.sourceforge.net/ Accessed on 07 February 2008.
71
16. Andreas Koestler, Thomas Bräunl, “Mobile Robot Simulation with Realistic
Error Models”, 2nd
International Conference on Autonomous Robots and Agents,
Palmerston North, New Zealand, December 13 – 15, 2004.
17. MOBS – Mobile Robot Simulator. http://robotics.ee.uwa.edu.au/mobs/
Accessed on 07 February 2008.
18. Olivier Michel, “Cyberbotics Ltd. WebotsTM
: Professional Mobile Robot
Simulation”, International Journal of Advanced Robotic Systems, Volume 1
Number 1, ISSN 1729-8806, 2004, pp 39 – 42.
19. Open Dynamics Engine, 2006. http://ode.org/ Accessed on 07 February 2007.
20. Chris Leger, “Darwin2K: An Evolutionary Approach to Automated Design for
Robotics”, Springer, 2000.
21. VRML 1.0C Specification, 2005.
http://www.web3d.org/x3d/specifications/vrml/VRML1.0/index.html
Accessed on 07 February 2008.
22. Microsoft Robotics Developer Studio 2008 CTP April.
http://msdn.microsoft.com/robotics
Accessed on 07 May 2008.
72
APPENDIX B
Coding for Mesh Analysis for PID Tuning
Ki = 0.05;
q = 1; %CH = zeros(254,3); %DH = zeros(254,3);
while Ki < 1.15 sim('zeta_PID_tuning');
CurrentHeading = CurrentHeading(1,:)'; CH(:,q) = CurrentHeading(1:254);
Ki = Ki + 0.05 q = q + 1;
end
73
APPENDIX C
Simulink PID Controller block settings while tuning using m-file
74
APPENDIX D
Simulink blocks for saving input and output variables for state space modelling
thetaOutput
output for theta
Yaxis
output for XY graph2
Xaxis
output for XY graph1
thetaInput
input for theta
Right Motor
Lef t Motor
x
y
t
Zeta_Zero
Kinematic Model
XY Graph
Speed ScopeSine Wave
RightMotor
Right Motor Speed
Output Scope
In1
Ctrl_R
Ctrl_L
Motor Driver
LeftMotor
Left Motor Speed
75
APPENDIX E
Completed Model with Pole Placement Controller
Yaxis
output for XY graph2
Xaxis
output for XY graph1
Right Motor
Lef t Motor
x
y
t
Zeta_Zero
Kinematic Model
XY Graph
STOP
Stop Simulation
Step
x' = Ax+Bu
y = Cx+Du
State-Space Speed Scope
x_target
y _target
x_f eedback
y _f eedback
theta_f eedback
Reached Sig
Ctrl
Signal conditioning
RightMotor
Right Motor Speed
0
PID output
Output Scope
In1
Ctrl_R
Ctrl_L
Motor Driver
LeftMotor
Left Motor Speed
Band-Limited
White Noise
arriv ed signal