Академический Документы
Профессиональный Документы
Культура Документы
DECLARATION
This report is submitted to the Department of Mechanical Engineering (King’s College London) as part
of course 7CEMM721 and is solely the original work of its author, except where clearly specified
otherwise. It has not been previously submitted to this or another university.
This research describes the design and development of a fully scalable electronic architecture,
implementing a control system for an Omni-directional drive system to autonomously
regulate its position, heading, and velocity based on feedback from on-board sensors whilst
operating in conjunction with a navigation system, incorporating a novel application of
CAD/CAM tools so as to allow the robot to exhibit autonomous behaviour to a degree of
sophistication.
i
Acknowledgements
“Not everything that counts can be counted, and not
everything that can be counted counts.”
My parents continued love and support have truly given my life meaning and I am ever
grateful to them. Since the passing of my Father, my Mom has been a pillar of incredible
strength whilst making great sacrifices to ensure my future with a sound education.
I thank my thesis supervisor, Professor Jian S. Dai, for taking the time to read this report
and for the many suggestions, comments, and invaluable advice provided. I would also like
to express thanks to the second thesis marker, Dr. Catarina Nunes, for taking the time to
read my report as well.
I am grateful to Dr. Kaspar Althoefer for taking the time to discuss aspects of this project
as well as his monumental support during a difficult period. I am also grateful to my
personal tutor, Dr. Samjid Mannan, for his invaluable support.
Many thanks to HI-TECH Software1 for their generous support of this research.
I am especially grateful to my Aunt Anita and Uncle Hema for their kind generosity, love,
and support as well as my cousin Hemanthi for reviewing this report. Last but not least, I
would like to thank my cousins Cheryl and Cheanthe for being there in my hour of need as
well as my Aunt Ianthe and Uncle Felix for their love and support.
This report has been entirely composed in LATEX on an Apple Mac, running OS X v10.4.11.
1
http://www.htsoft.com
ii
I dedicate this work to my Mother Melody, my late Father and best friend Nilhan de Silva
(1939 - 2002), and my illustrious grandfather Dr. Harold P. A. Wijetunge - Chief Medical
Officer for 35 years to the University of Peradeniya, Ceylon.
iii
Contents
1 Introduction 1
2 Literature Survey 3
3 Theoretical Development 10
iv
3.2.3 Higher Order Polynomials and Complex Paths . . . . . . . . . . . . 23
4.1 Concept . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.2.1 Motors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
v
4.5.2.3 Current Sensing and Thermal Output . . . . . . . . . . . 51
5 Implementation 61
vi
5.3.1.2 Motor Driver . . . . . . . . . . . . . . . . . . . . . . . . . 64
6 Results 73
7 Discussion 76
8 Conclusions 79
Appendices 88
vii
B.2 Discrete PI Controller Design . . . . . . . . . . . . . . . . . . . . . . . . . 97
viii
List of Figures
3.2 The robot rotated by φ radians, with respect to the absolute reference frame. 13
3.3 A cubic Bézier curve, its control polygon, and control points. . . . . . . . . 18
3.5 Plot of a few cubic Bézier curves in MATLAB, showing their control polygons. 22
3.8 The robot’s pose following a cubic Bézier path (not to scale). . . . . . . . . 25
ix
4.3 US Digital E4P-300-079 Optical Encoder. . . . . . . . . . . . . . . . . . . . 33
4.10 PCB Gerber output showing the component side and silkscreen. . . . . . . 48
4.11 PCB Gerber output showing the solder side and silkscreen. . . . . . . . . . 48
4.14 Simplified Diagram of the Current Sense Circuitry of the LMD18200 [5]. . 51
5.2 The Motor Driver with FT232RL USB to Serial interfaces mounted to the left. 64
x
5.4 Current Sense Output of a LMD18200 IC During a Change in Direction. . 65
6.1 Plot of Calculated and Measured Duty Cycle Ratio vs. PDCXH Register
Value. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
6.2 Plot of the MaxSonar’s Analogue Output (mV) vs. the Object Distance (cm). 75
xi
B.7 Unit Step Response of an Ideal DC Motor Under PID Control. . . . . . . . 96
C.1 Functional Block Diagram of the ADXL320 ±5g Dual Axis Accelerometer [9].102
xii
List of Tables
6.1 Duty cycle ratio values obtained from the Power Control PWM Module. . 73
B.1 Ideal DC Motor Parameters for Simulating the PI/PID SIMULINK Model. 95
xiii
Nomenclature
µ Micro [10−6 ]
c Centi [10−2 ]
G Giga [109 ]
k Kilo [103 ]
kg Mass [Kilogram]
M Mega [106 ]
xiv
ms−1 Speed, Velocity [Metre per Second]
n Nano [10−9 ]
p Pico [10−12 ]
s Time [Second]
xv
Chapter 1
Introduction
Reliable and accurate robot self-localisation and control is one of the the most challenging
and important aspects of mobile robotics. Operations involving robotic motion, such as
path planning, path following and obstacle collision avoidance, rely on the knowledge and
accuracy of the robots location in the environment.
Performing the above tasks at any specified location within the environment, requires for
the robot to be able to navigate and localise itself within a certain degree of accuracy.
The aims and objectives of the project involved the development of a control system for
an Omni-directional drive system to autonomously regulate its position, heading, and
velocity based on feedback from on-board sensors as well as operate in conjunction with a
navigation system so as to allow the robot to exhibit sophisticated autonomous behaviour.
The challenge presented by the robot localisation problem laid in determining and tracking
the location of the robot and its heading with respect to a form of local and global
reference frame. It has been said that, “using sensory information to locate the robot
in its environment is the most fundamental problem to providing a mobile robot with
autonomous capabilities” [11].
1
The majority of the work presented in this thesis has been concentrated on two distinct
goals: (i) developing a sound mathematical model for modelling the robotic kinematics
and controlling its path following ability and (ii) designing, developing and building a fully
scalable architecture for a mobile robotic vehicle, with a large focus on the electronics
involved in the implementation.
This research is based on the knowledge obtained from many areas in Electronic and
Mechanical Engineering such as Robotics Systems, Computer Aided Design, Dynamic
Systems and Simulations, Embedded Systems Design, Silicon Technology, and Control
Systems Design.
The official project title was re-arranged as ‘Omni-Directional Mobile Autonomous Robotic
Vehicle’ or simply MARV, so as to provide a suitable nickname for ease of reference to the
robot and project alike.
The presented work is divided into six chapters. Chapter 2 presents the background and
literature survey to the project. Chapter 3 describes the theoretical development that was
accomplished. In Chapter 4, the design and development conducted have been presented.
The current work and progress of the project is detailed in Chapter 5 with results obtained
from various tests presented in Chapter 6, whilst Chapter 7 describes further research and
development that needs to be conducted.
2
Chapter 2
Literature Survey
The literature presented in this chapter is a critical review of previous work achieved in
this and related areas pertaining to Omni-directional control and navigation of wheeled
mobile robotic vehicles, whilst providing further insight into Omni-directional motion and
its viability for implementation in commercial, industrial, and military applications.
The most common means of transportation for mobile robotic vehicles are those imple-
menting a wheeled drive, since most wheeled systems provide relatively accurate odometry
whilst travelling over smooth surfaces as found in many in-door environments.
Akermann steering [12] is favoured in the automobile industry, where it utilises a steering
mechanism in the form of a rack and pinion by which the front, and in some cases the
rear, pair of wheels may be steered to determine different turning radii. However, vehicles
employing Omni-directional drive and synchronous-drive [13] have the kinematic advantage
of simultaneous translation and rotation in any direction.
The advantage of such means of locomotion are made quite apparent in confined spaces such
as factory floors, material transfer to workstations, and other spaces where manoeuvrability
is an issue and the Akermann steering would fail. Robots implementing an omni-directional
drive system are also able to de-couple translational and rotational motion.
3
2.1 Omni-directional Drive Systems
Holonomicity in robotics refers to the relationship between the controllable and total
degrees of freedom (DOF) of a given robot [14]. Mobile robotic vehicles are classed as
holonomic if the controllable DOF are greater than or equal to their total DOF. If the
controllable DOF are less than the total DOF, it is then classed as non-holonomic.
The basis of most common Omni-directional drive system are wheels that allow free-
wheeling motion in the unconstrained direction which is orthogonal to the actual drive
direction of the wheel. It is the combination of such wheels applying a force on the centre
of mass resulting in a velocity being induced on the system, causing a single wheel or a
combination of wheels to free-wheel in the unconstrained direction to a certain degree.
Omni-directional transport systems may be separated into two basic classes: orthogonal
wheels (pairs of near-spherical wheels) and universal wheels (wheels with rollers on their
circumference).
As described by Pin and Killough [17] the “orthogonal-wheels” concept provides normal
traction in a given direction whilst being able to free-wheel in the orthogonal direction to
that of the normal traction.
These wheels rely on the timed and synchronised transition of the wheels rotation about
their vertically mounted axis, perpendicular to the surface of the floor.
4
For example, the inner wheel may shift from providing normal traction to free-wheeling
and the outer wheel may shift from free-wheeling to providing normal traction.
Pin and Killough [17] also discuss the “universal wheel” concept, which is an assembly
that provides a combination of constrained and unconstrained motions whilst rotating.
The most common form of a universal wheel is a large wheel with many small rollers
mounted in its rim. As the drive shaft turns the wheel rotates in the actuated direction
and the rollers mounted in the rim allow the wheel to free-wheel parallel to the drive shaft,
thereby providing the unconstrained direction of motion.
One particular variation of this universal wheel concept is one which incorporates elongated
rollers which are positioned at 45 ◦ from the axis of the main shaft. This wheel design was
pioneered in 1973 by Bengt Ilon, an engineer with the Swedish company Mecanum AB,
and as such is known as a Mecanum wheel or Swedish 45 ◦ [18].
Figure 2.1: Assembled Omniwheel and a dimensional illustration of a single wheel [1].
The Omniwheel, as shown above, is another variation of the universal wheel concept.
5
2.1.3 Omni-directional Robot Configurations
Common Omni-directional robot configurations depend upon the class of wheels deployed:
orthogonal wheels or universal wheels. As such, a large portion of the designs are formed
of: (i) 3-universal wheels, (ii) 3-castor wheels mimicking the orthogonal wheel concept as a
synchronous-drive, and (iii) 4-universal wheels.
The three wheel concept has been implemented in two ways: (i) the classical Omni-
directional configuration of three universal wheels mounted 120◦ apart, radiating from the
centre of the chassis, and (ii) adaptations of this 120◦ geometry implementing orthogonal
wheels or a synchro-drive system.
The orthogonal wheel concept introduced by Pin and Killough [17], has been simplified
in execution by connecting two motors to a wheel that is mounted in a similar fashion to
that of a ‘castor’. The two motors provide a means for independently driving and steering
the wheel simultaneously as described by D. S. Kim et al. [13] and A. El-Shenawy et al.
[19], thereby forming a synchronous-drive mechanism as an adaptation of the orthogonal
wheel concept.
The 4-universal wheel implementation has two forms: (i) the classical arrangement similar
to that of an automobile [20] [21] with each wheel having its own independent drive and (ii)
four universal wheels mounted forming a square [22] [23] whilst maintaining an independent
drive to each wheel.
Robots featuring the classical arrangement of the four wheel design favour an implemen-
tation of the Mecanum wheel with an improvement, also proposed by Bengt Ilon, where
the rollers are mounted centrally whilst being split in two [18]. Am implementation of
this significant improvement to the Mecanum wheel design has also been included in an
industrial Omni-directional forklift by Airtrax [24] and is commonly found in many robotic
designs of this configuration.
6
To ascertain the market viability of Omni-directional drive systems in commercial and
industrial applications, case studies were compiled on various systems currently in operation
and production and are located in Appendix A.1.
Work by J. Aranda et al. [25] describe a ‘Control Architecture for a Three-wheeled Roller
Robot’, which is driven by stepper motors. The implemented trajectory control process was
heavily dependent upon dead reckoning1 as a means of position estimation and odometry.
Related work by P. Muir et al. [20] illustrates a similar approach utilising dead reckoning
to implement a Kinematics-based wheeled mobile robot control system. Their approach
utilises the actuated inverse and sensed forward solutions, i.e. the Inverse Kinematics of
the robot geometry and Forward Kinematic solution applied to the ‘sensed’ wheel velocities,
to implement dead reckoning.
Further work by D. Feng et al. [16] implemented velocity control with integral action
by means of programmable motor control chips. Their system also allowed the user to
formulate trajectories with manual joystick control as well as execute trajectory profiles as
required.
With local robot navigation and localisation an a priori model of the environment is not a
prerequisite as the robot senses the environment during motion execution, thereby placing
an emphasis on real-time efficiency.
1
Dead reckoning is the process by which the current position is an estimation based upon a previously
determined position, and advancing that position based on the current velocity, elapsed time, and course.
7
In implementing local navigation, simple Bug Algorithms [26] have been devised where the
motion of the robot is comparable to that of an ant moving around. The most common Bug
Algorithms are comprised of: (i) Bug 1, (ii) Bug 2, and (iii) Tangent Bug Algorithms. The
focus of these algorithm are on modelling boundary following and motion to goal behaviour,
as these traits are easily devised with contact sensors or ultrasonic range-finders.
Local navigation may be implemented by the application of Potential Field Methods such
as the Advanced Potential Field (APF) method or Virtual Force Field (VFF) method [27],
which subject the robot to attractive and repulsive potentials depending on the obstacles in
the environment. However, Potential Field Methods suffer from the local minima problem
and tend to perform poorly in narrow corridors [27][28].
Further to this, robot navigation comprises of two distinct phases, reference guidance
and dead reckoning, as discussed by I. J. Cox [29]. Reference guidance is the process by
which navigation is achieved with respect to a co-ordinate frame based on visible external
landmarks. Dead reckoning on the other hand, is a positional estimation made with respect
to a co-ordinate frame that is inherent to the guidance equipment and its estimate relies
upon the accuracy of its previous estimate, or positional fix.
Dead reckoning offers the advantage of complete self-containment, however, its disadvantage
is that the positional error grows unbounded, unless an independent external reference is
utilised periodically to contain the error. Likewise, the advantage of reference guidance
is that its positional errors are bounded although detection of landmarks and real-time
positional fixing may not always be possible. It is apparent that dead reckoning and
external reference guidance are complementary and a combined implementation of both
approaches can provide for an accurate and robust positioning system.
8
systems for intelligent machines by decomposing the problem at hand into a series of
functional units via symbolic processing approaches. Instead, his Subsumption Architecture
focusses on biologically inspired robotic architectures which address sensorimotor and
perceptual tasks; in essence the AI sets about interacting with the real world rather than
attempting to symbolically reason about it. This perspective is most eloquently described
in his classic paper, “Elephants Don’t Play Chess” [31].
This approach of task achieving behavioural based navigation would result in the robot
working to achieve multiple goals concurrently, with the more critical behaviours forming
the base-line behaviour. These functional behavioural slices are layered together forming a
robust robot control system, where the most fundamental behavioural traits take precedence
above all else, i.e. collision avoidance would form one of the most fundamental behavioural
traits upon which other traits such as mapping and goal searching would build upon.
Simultaneous Localisation and Mapping (SLAM) is a method by which data obtained from
sensor arrays on-board an autonomous robot are utilised to aid in creating a map within
an unknown environment whilst, quite accurately, estimating its current position within
that environment. The inherent inaccuracies and positional errors of the sensor data are
compensated for by utilising statistical tools in SLAM which include Extended Kalman
Filters (EKF), particle filters, Bayesian inference, and Monte Carlo Methods [32].
Work by Davison et al. [33] describes SLAM classically being restricted to sensors such as
laser2 range-finders and sonar3 . Their work is a successful application of SLAM methodology
from mobile robotics to a purely “vision” based sensor such as an uncontrolled camera.
Select concepts and methodologies discussed in this critical review of related work have
been built upon and extended in the theoretical development conducted in the following
chapter, especially with regards to a novel implementation of Trajectory Interpolation.
2
Light Amplification by Stimulated Emission of Radiation
3
Sound Navigation and Ranging
9
Chapter 3
Theoretical Development
In concluding the study, the challenges faced in implementing accurate localisation and
odometry, for a three-wheeled Omni-directional robot in particular, are the focus of further
discussion.
10
3.1 Kinematic Modelling
The geometry of the omni-directional vehicle is shown below in Figure 3.1, where universal
wheels attached to motors have been mounted 120◦ apart from the centre of mass (CM) of
the robot. Therefore, each wheel assembly can propel in the constrained direction of the
actuator or free-wheel passively, orthogonally to the rotating direction of the actuator.
The model assumes that the point of symmetry coincides with the CM of the robot,
although this may not be the case in the implemented robot due to a shifting of the CM
by the various on-board components attached to the chassis.
Two frames of reference exist: (i) The absolute reference frame (x, y), and (ii) the internal
reference frame (Xref , Yref ) where ψ̇ is the angular velocity (in rad/sec) of the latter with
respect to the absolute reference frame. The translational velocity of the robot (in m/s)
is denoted by |V | and its direction with respect to the internal reference is denoted by
11
3.2 Path Planning and Planar Trajectory Generation
Planning the path and trajectory of the robot requires considering different aspects such
as specifying a trajectory, representing this trajectory in software, and computing the
trajectory at runtime.
The path defined by the trajectory generator is further decomposed into the individual
wheel velocities by means of Inverse Kinematics, as previously discussed, where it populates
a set point table managed by the trajectory planner. The set points are fed into a closed-
loop control system, which utilises pose and velocity feedback for ultimately controlling
the robot.
The Euclidean distance between the robot and a way-point or goal could be described
in its simplest form as a linear spline trajectory. Although splines may be adapted into
quadratic, cubic, and higher order splines a different approach to trajectory generation has
been considered.
A novel approach has been considered in this study to geometrically define a curve and
to produce a resultant parametric function to reflect the path by utilising a cubic Bézier-
Bernstein polynomial since the properties of the curve, such as tension and continuity, are
modifiable by simple matrix manipulations.
This study is an application of similar work by Sharma et al. [34], where Bézier curves were
extended into 3-dimensions for trajectory generation and path planning of autonomous
Aerobots.
Bézier curves are the basis for many CAD1 operations and utilising them in 2-dimensional
planar robot navigation makes its application unique in the study of controlling Omni-
directional robots, and can be applied to other wheeled or legged robotic designs.
1
Computer Aided Design
15
Figure 3.4: Plot of the cubic Bernstein basis functions obtained in MATLAB.
n n
P(u) = P0 (1 − u)n + P1
u(1 − u)n−1 + P2 u2 (1 − u)n−2 + · · ·
1 2
n n−1
+Pn−1 u (1 − u) + Pn un , u ∈ [0, 1] (3.14)
n−1
Equation (3.13) may be used to obtain all the Berstein basis polynomials up to degree
n = 3, since cubic Bézier curves have four control points and as such require a cubic
19
3.3 Trajectory Navigation
Figure 3.8: The robot’s pose following a cubic Bézier path (not to scale).
The unique use of cubic Bézier curves for trajectory navigation of Omni-directional robots
presented in this study alone cannot control the robots motion and as such this knowledge
and methodology needs to interact with the Inverse Kinematic solution of the robot and a
closed-loop control system for complete kinematic and dynamic control of the robot.
In the implementation of linear point to point motion, the motion itself from one point to
the next provides the direction of the velocity vector and can be achieved with minimal
computation.
The task of navigating a more complicated path, however, requires the velocity vector of
the robot to follow the path’s curvature and therefore it can be seen that the task is reduced
to simply evaluating the gradient of the tangent to the Bézier curve at each sub interval.
The tangent to the curve at each point is essentially a representation of the velocity vector
|V | at that instantaneous point in time and once obtained this can be decomposed into its
25
4.2 Mechanical Design
An existing chassis was provided for the project, as shown in Figure 4.2. This included
three DC motors mounted at 120◦ apart on an acrylic base plate via CNC1 milled mounts
with Omniwheel assemblies attached to the end of each drive shaft by means of a collar
and stop screw.
Metric hex cap screws were used throughout the design as they provided a secure, ‘non-slip’,
means for tightening with the use of hex screwdrivers or Allen keys.
The acrylic base plate featured sufficient space to install large batteries and associated
circuitry. Aluminium spacers from the base plate allowed for a top acrylic layer to mount
logic boards, circuits, and sensors.
1
Computer Numerical Control
32
4.2.1 Motors
Three geared reversible DC motors were provided with the robot chassis, as previously
detailed. The electrical and performance specifications of the motors are tabulated below,
Dimensional specifications of the motors are further detailed in the datasheet [10].
The US Digital E4P-300-079 Optical Encoder [47] was attached to each motor, thereby
providing digital quadrature encoder feedback at 300 Cycles-Per-Revolution (CPR) on C-A
with the C-B output 90◦ out of phase, as well as requiring its own 5 VDC power supply.
33
The supplied motors were ideal for the task, as they offered a gearing ratio of 30:1 and
thereby provided a relatively high torque. The resulting torque developed at the drive
shaft allowed the robot to rapidly accelerate its entire mass to a desired velocity.
The electronic design on-board MARV was largely directed by the conceptual overview
presented in Figure 4.1. It directly outlined the need for a higher level of software to
be implemented on a computer, with fast processing capabilities. This also allowed for
the robot’s electronics to be scalable, simply by interfacing the computer with other
forms of sensors and communication mediums. For example, the robot may be given
WiFi capabilities for development and monitoring purposes as well as attaching an Omni-
directional camera for the purpose of visual odometry [48][49].
The low-level sub-systems were clearly outlined, where the motors and sensors needed to
be interfaced with the on-board computer. Since the computer or low-level microcontroller
(MCU or µC) are unable to provide the high currents and protection circuitry for driving
the motors, a suitable motor driver was required.
Since the number of sensors feeding back to the robot could be increased or reduced as
necessary, two independent low level controllers were chosen to tackle each task separately.
Therefore, a self-contained approach was taken towards the development and testing of
each module, until final integration, thereby further aiding any troubleshooting required.
Choosing appropriate MCUs for each task required considerable planning and consideration
of the sensors and actuators involved as well as means for communication and integration
into the final system.
34
4.5.2 The Motor Driver
The motors were driven via PWM signals from the Motor Controller and as such, the
motors needed to be interfaced to the Motor Controller via additional circuitry that would
handle the high current supply and switching, which the MCU simply could not provide
directly as it is only capable of sourcing ∼20 mA per pin designated as an output.
A functional description of the pinout are tabulated in Table 4.6 as obtained from the
datasheet [5], which should be referred for further details.
Pinout Description
45
The generated CAD/CAM files for prototyping the PCB were carefully scrutinised using
gerbv with the following command line arguments: $ gerbv MotorDriver.sol MotorDriver.cmp
MotorDriver.plc MotorDriver.drd and the output are shown below.
Figure 4.10: PCB Gerber output showing the component side and silkscreen.
Figure 4.11: PCB Gerber output showing the solder side and silkscreen.
48
4.7.4 Asynchronous Serial Communications
Introduced in 1969, the serial port on personal computers were usually of the RS-232-C,
EIA-232-D, or EIA-232-E standard. These three standards were essentially the same as
the original RS (Recommended Standard) prefix became the EIA (Electronics Industries
Association) and later EIA/TIA after EIA merged with TIA (Telecommunication Industries
Association) [63].
Asynchronous transmission of data as per the EIA-232 specification has proved its reliability
over low capacitance data grade cabling such as the grade of cabling used in Universal
Serial Bus (USB) cables. With modern ICs such as the FTDI FT232RL USB to serial
UART interface, an appropriate USB cable was utilised to interface the on-board computer
with the MCUs, with one FT232RL IC per MCU.
Further technical details of the on-board serial communications are located in Appendix
C.6.
To ensure that the data received is identical to the the data transmitted, routines were
developed as several C programs to compute the CRC-16, CRC-16-CCITT18 , and CRC-32
checksums for given bytes and strings (which were essentially multi-byte arrays). The
17
The number of signal level changes per second, regardless of the information content of those signals.
18
International Telegraph and Telephone Consultative Committee, (from the French name “Comité
Consultatif International Téléphonique et Télégraphique”)
59
programs were tested extensively with the aid of an online CRC calculator application [64].
In the event the direct computation of the CRC checksum on-board the MCU was far too
processor intensive, alternative algorithms were developed for employing a look-up table 19
to achieve the same task. However, implementing a look-up table on a MCU in reality
would sacrifice available ROM capacity in favour of increased computational performance.
The source code of the direct CRC-16-CCITT routine is located in Appendix E.1.
19
A lookup table is a data structure, usually an array or associative array, used to replace a runtime
computation with a simpler array indexing operation. The speed gain can be significant, since retrieving
a value from memory is often faster than undergoing an expensive computation but at the sacrifice of
available memory.
60
Chapter 5
Implementation
The electronic design on-board MARV was implemented to provide a working demonstration
of the robot so as to exhibit sophisticated Omni-directional motion by evaluating the
Inverse Kinematics of the robot’s geometry.
Due to time and budgetary constraints, many aspects of the Theoretical Development
including discrete PI motor control, dead reckoning, Bézier path generation and navigation
via the on-board computer, and the Control Application remain to be implemented.
The underlying electronic modules were extensively tested and implemented, including the
Motor Controller, Motor Driver, and Serial Communications with CRC Error Checking as
well as integrating the sub-systems together in constructing the robot.
The Motor Driver in particular underwent stringent performance and operational testing in
driving and controlling the DC motors by means of Sign/Magnitude PWM control, thereby
ensuring safe and efficient operation.
61
5.1 Equipment and Instrumentation
The following equipment and instrumentation were utilised in the development and imple-
mentation of the robot.
The design was focussed on utilising a project box to house the ‘core’ electronics including
the Motor Controller, Sensor Controller, the Motor Drivers, and associated circuitry. This
central hub would in-turn interface with the motors, on-board computer, and power sources.
Installing the low-level modules into a separate enclosure would allow them to be tested
in situ as well as offering the capability of easily being isolated from rest of the robot for
routine maintenance and troubleshooting.
The entire mass of cabling from the sensors, motors, optical encoders, power supplies, and
on-board computer would interface directly with the dedicated enclosure.
62
5.3 Final Design and Integration
Due to time and budgetary constraints, the final design of the robot was restricted to
a simple open-loop demonstration of motor control whilst ensuring this implementation
offered the ease of true plug and play connectivity during development and testing.
The Motor Controller was prototyped on breadboard and mounted inside a translucent
polycarbonate ‘Hammond’ project box.
Figure 5.1: Prototyped Motor Controller Integrated into the Project Box.
The miniature breadboard at the back contained the voltage regulation circuitry whilst
the project box was drilled to accommodate a power switch, power LED1 indicator, 4mm
Banana connectors for power, and routing of wiring to other modules and a panellised
Hirose HR10 ICSP connector.
1
Light Emitting Diode
63
5.3.1.2 Motor Driver
The CAD/CAM files were sent to SilverCircuits in Malaysia [65] for production, where
they were fabricated as dual layer PCBs with Plated Through Hole (PTH) immersion silver
surface finishing, 1/16” FR4 1 oz copper traces, dual sided solder-masking, and silkscreen
printing on the (top) component layer. Since all the components utilised PTH, none of the
components required soldering on the solder side - as often seen in dual sided PCBs with
SMT2 components, also referred to as Surface Mount Devices (SMD).
The received PCBs were soldered using an OKI Metcal PS-800E High Performance Soldering
System with RoHS3 certified components and lead-free solder.
Figure 5.2: The Motor Driver with FT232RL USB to Serial interfaces mounted to the left.
Initial testing was carried out on the Motor Driver with only a single LMD18200 ‘block’
soldered onto the PCB and a single motor attached with a 12 VDC supply obtained from
the bench power supply.
The testing was continued with all three motors attached to the completely assembled
Motor Driver, initially with the Motor Controller breadboard located outside of the project
box, as shown in Figure 5.3.
2
Surface-Mount Technology.
3
Restriction of Hazardous Substances Directive
64
5.3.2.2 Power Control PWM Module Testing
The Power Control PWM Module was configured with PDCXL=0x00 and the output of
PWM1 and PWM3 are shown below as each channel was alternatively increased in duty
cycle ratio until reaching 100%,
The accuracy of the PWM signals generated by the Power Control PWM Module, are
studied in Chapter 6.
69
5.3.3 Control Application Software Development
The Control Application utilised a 3rd party serial port Application Programming Interface
(API) that is distributed freely via the GPL6 license. The ‘ezV24’ API [67] is implemented
as a simple library which provides control over the serial ports of a Linux system.
The Control Application was developed to transmit bytes and strings as well as read the
‘receive’ buffer, only if the buffer had received data. This implementation allowed for the
Control Application to operate at maximum efficiency without having to waste resources
by constantly monitoring the serial port.
The wiring of the motors were completely redone with routing of the cables to the Motor
Driver PCB, that was mounted onto the side of the project box by means of heavy duty
Velcro.
6
GNU General Public License
70
An in-line 20 mm screw fit fuse-holder, with a 3 A slow blow fuse, was installed with a
SPST7 switch between the dedicated SLA and Motor Driver circuitry.
The project box was drilled to facilitate the cabling from the Motor Driver and FT2323RL
USB to Serial interfaces, to enter the enclosure, encased in braided cable sheathing.
7
Single Pole Single Throw; Configuration for an on/off toggling action of the switch.
71
The following image shows the panellised Hirose HR10 connector, which allowed the MCU
to be programmed via ICSP without the need for accessing the project box.
Figure 5.10: Hirose HR10 Panellised Connector for ICSP of the MCU.
The completed robot implementing open-loop motor control is shown below, with the ICD2
programmer attached via the panellised ICSP connector.
72
Chapter 7
Discussion
The open-loop performance of the robot was not quantifiable as its operation was directly
dependent on the voltage across the battery at any particular moment in time.
Since a direct means of Euclidean odometry, dead reckoning, or quadrature encoder feedback
was not implemented on-board, the robot prototype could not be instructed to move an
Euclidean distance so as to compare the actual distance travelled as a measure of its
accuracy.
Further to this, the lack of discrete PI control implemented on-board resulted in the robot
being unable to maintain the reference velocity of each individual wheel between set point
traversal - as made clear during repeated testing of the open-loop system. Therefore,
tangible results of the robot’s performance could not be obtained.
The review of related work, in Chapter 2, suggested that position estimation was primarily
achieved through dead reckoning and this level of accuracy was significantly improved
upon when coupled with a means of reference guidance.
76
Rather than attempting to evaluate robot’s entire performance, select sub-systems were
tested as reported in Chapter 6. Further experimentation would have required many of
the features discussed in Chapter 4 and Chapter 5 to be included in the robot prototype,
with dead reckoning as a minimum requirement.
In enabling dead reckoning, feedback from the quadrature encoders would need to be
interfaced with the QEI of the Motor Controller’s MCU. Since each of the US Digital
optical encoders require its own dedicated supply of power, three I/O pins from the MCU
could be utilised as a means for ‘selecting’ which encoder is to be sampled by the MCUs
QEI interface at that particular point in time.
The robot prototype was lacking the implemented Sensor Controller, and it would need to
be incorporated into the design along with a selection of sensors to provide feedback with
regards to its ‘actual pose’ during set-point traversal. The accelerometer could be coupled
with a gyroscope to deploy a complete Inertial Measurement Unit (IMU) to further aid in
the positional estimation of the robot.
Reference guidance would enable the robot to improve its position estimation greatly and
as such Visual Odometry with a catadioptic camera could be directly integrated with
the on-board computer over USB. Further to this, the robot could also be given WiFi
capability by installing a suitable USB Wifi adaptor on-board the computer as a means for
wirelessly monitoring and controlling the robot as required.
Another avenue of exploration would be to implement a bootloader1 onto the MCUs of the
Motor and Sensor Controllers. This would allow for the firmware of the controllers to be
1
A bootloader, in terms of microcontrollers, is the term given to a form of firmware that occupies a
certain area of ROM. It allows for machine code to be executed on-board simply by uploading the user
compiled firmware over a serial link, without the use of a hardware programmer.
77
updated as required over a serial connection without the requirement of a separate PIC
programmer.
As the high level control is handled by the on-board computer, task achieving behavioural
control could be enabled with the use of the POSIX2 pthread library and POSIX timers.
This high level real-time operating system would therefore allow the implementation of the
Subsumption Architecture, as described in Chapter 2.
SLAM could be incorporated together with cubic Bézier Trajectory Generation and
Navigation to truly enable the robot to autonomously map and navigate itself within
unknown environments. This form of advanced navigation could be incorporated with a
means for modelling surface friction, thereby allowing the robot to make the necessary
adjustments to maintain its desired course.
In terms of improving the actual robots construction, another ‘layer’ could be provided
by the installation of another set of aluminium spacers on the top layer. This would
provide more space to incorporate more sensors, batteries, and other electronics as required.
However, care should be taken so as to ensure the robot is not made heavier than the
torque currently provided by the motors - else they will need replacing as well.
Further research into the performance of the developed discrete-PI controller could aid
the robot in further maintaining the reference velocities of its individual wheels during
set-point traversal.
2
Portable Operating System Interface
78
Chapter 8
Conclusions
This research, based on a critical review of related work in this and related fields, lead to
the development of a navigation system incorporating a novel application of CAD/CAM
tools for Trajectory Interpolation, as well as the design and development of a fully scalable
electronic architecture implementing an on-board computer aboard the robot.
The interface between the low-level controllers and on-board computer were further en-
hanced with an industry recognised standard for error detection of transmitted information.
The developed control system resulted in the design and fabrication of a compact and
reliable DC Motor Controller, which was scalable due to its ‘block’ design, as well as
the development of a discrete-time PI controller for implementation in the firmware of a
low-level controller.
As a result of time and budgetary constraints, the developed prototype did not incorporate
all facets of this research, however, it demonstrated sophisticated Omni-directional motion
under open-loop control.
The primary project objectives involving the development of a control and navigation
system were achieved, although the developed prototype may be improved upon in terms
of accuracy and performance whilst increasing the complexity of the system.
79
References
[1] Kornylak Corporation, “Omni Wheels: Both Heavy-Duty & Lightweight Plastic
Wheels,” http://www.omniwheel.com/omniwheel/omniwheel.htm, last viewed 12 July
2008.
[4] Microchip Technology Inc., “In-Circuit Serial Programming (ICSP) Guide,” ww1.
microchip.com/downloads/en/DeviceDoc/30277d.pdf, 2003, last viewed 1 September
2008.
80
[7] Übergizmo, “Rovio: WiFi enabled surveillance robot by WoWee,” http://www.
ubergizmo.com/15/archives/2008/01/rovio wifi enabled surveillance robot by wowee.
html, last viewed 15 August 2008.
[14] Y. Liu, X. Wu, J. Jim Zhu, and J. Lew, “Omni-directional mobile robot controller
design by trajectory linearization,” American Control Conference, 2003. Proceedings
of the 2003, vol. 4, pp. 3423–3428, June 2003.
81
[16] D. Feng, M. B. Freidman, and B. H. Krogh, “The Server-Control System for an
Omnidirectional Mobile Robot,” Robotics and Automation, 1989. Proceedings., 1989
IEEE International Conference on, vol. 3, pp. 1566–1571, May 1989.
[18] O. Fiegel, A. Badve, and G. Bright, “Improved Mecanum Wheel Design for Omni-
directional Robots,” Proc. Australasian Conference on Robotics and Automation, pp.
117–121, 27-29 Nov 2002.
[20] P. Muir and C. Neuman, “Kinematic modeling for feedback control of an omnidi-
rectional wheeled mobile robot,” Robotics and Automation. Proceedings. 1987 IEEE
International Conference on, vol. 4, pp. 1772–1778, Mar 1987.
[21] O. Purwin and R. D’Andrea, “Trajectory Generation for Four Wheeled Omnidirectional
Vehicles,” American Control Conference, 2005. Proceedings of the 2005, pp. 4979–4984
vol. 7, June 2005.
[22] L. Wilson, C. Williams, J. Yance, J. Lew, R. L. W. II, and P. Gallina, “Design and
Modeling of a Redundant Omni-directional RoboCup Goalie,” The RoboCup 2001
International Symposium, 2001.
82
[24] “Airtrax Omni-Directional Vehicles,” http://www.airtrax.com/vehicles/, last viewed
13 July 2008.
[25] J. Aranda, A. Grau, and J. Climent, “Control architecture for a three-wheeled roller
robot,” Advanced Motion Control, 1998. AMC ’98-Coimbra., 1998 5th International
Workshop on, pp. 518–523, Jun-1 Jul 1998.
[27] J. Borenstein and Y. Koren, “The Vector Field Histogram - Fast Obstacle Avoidance
for Mobile Robots,” Robotics and Automation, IEEE Transactions on, vol. 7, no. 3,
pp. 278–288, Jun 1991.
[30] R. A. Brooks, “A Robust Layered Control System for a Mobile Robot,” Robotics and
Automation, IEEE Journal of [legacy, pre - 1988], vol. 2, no. 1, pp. 14–23, Mar 1986.
[31] ——, “Elephants Don’t Play Chess,” Robotics and Autonomous Systems, vol. 6, pp.
3–15, 1990.
[33] A. Davison, I. Reid, N. Molton, and O. Stasse, “MonoSLAM: Real-Time Single Camera
SLAM,” Pattern Analysis and Machine Intelligence, IEEE Transactions on, vol. 29,
no. 6, pp. 1052–1067, June 2007.
83
[34] S. Sharma, E. A. Kulczycki, and A. Elfes, “Trajectory Generation and Path Plan-
ning for Autonomous Aerobots,” IEEE International Conference on Robotics and
Automation, Roma, Italy., April 2007.
[40] N. S. Nise, Control Systems Engineering, 4th ed. John Wiley and Sons Ltd., 2003.
[44] M. Maimone, Y. Cheng, and L. Matthies, “Two years of visual odometry on the mars
exploration rovers: Field reports,” J. Field Robot., vol. 24, no. 3, pp. 169–186, 2007.
84
[46] M. M. W. de Silva, “Optical Mouse-based Odometry,” BEng (Hons) Individual Project
Report, The University of Leeds, England, 2006.
[47] US Digital, “US Digital E4P OEM Miniature Optical Kit Encoder Datasheet,” http:
//www.usdigital.com/assets/general/85 e4p datasheet 1.pdf, last viewed 10 September
2008.
[48] J. Xiao, A. Calle, J. Ye, and Z. Zhu, “A mobile robot platform with dsp-based controller
and omnidirectional vision system,” Robotics and Biomimetics, 2004. ROBIO 2004.
IEEE International Conference on, pp. 844–848, Aug. 2004.
[49] K. Onoguchi, M. Watanabe, Y. Okamoto, and H. Asada, “Visual navigation system for
a mobile robot,” Intelligent Robots and Systems ’89. The Autonomous Mobile Robots
and Its Applications. IROS ’89. Proceedings., IEEE/RSJ International Workshop on,
pp. 590–597, Sep 1989.
85
[56] Wikipedia, “Cross compiler,” http://en.wikipedia.org/wiki/Cross compiler, last
viewed 13 July 2008.
[58] M. H. Rashid, Power Electronics: Circuits, Devices and Applications, 3rd ed. Pearson
Education, September 2003.
[62] HI-TECH Software, “HI-TECH PICC-18 STD ANSI C compiler for Microchip’s range
of enhanced 8-bit RISC microcontrollers,” http://microchip.htsoft.com/products/
compilers/pic18ccompiler.php, last viewed 13 July 2008.
86
[68] M. Johnson, J. Wilkie, and R. M. Katebi, Control Engineering. Palgrave Macmillan,
October 2001.
87
Appendix B
Theoretical Development:
Mathematical Derivations and
Simulations
of an Ideal DC Motor
The traditional PI control system in Figure B.1 could be described in the Laplace (frequency)
domain illustrating the integral action using positive feedback with a first-order system as
shown in Figure B.2.
91
Figure B.2: Block diagram of a PI controller.
The transfer function of a PI controller is obtained below from the block diagram, Figure
B.2, where Ti is the integral time constant,
1 + sTi Kp Ki
Gue = Kp = + Kp = + Kp (B.1)
sTi sTi s
To simulate the PI control, first a mathematical model of an ideal DC motor was developed
and a simplified equivalent electric circuit of the armature windings of the motor are shown
below.
dθ
The angular velocity of the motor shaft is given by ω(t) = and the angular acceleration
dt
d2 θ
of is given by ω̇(t) = .
dt2
92
Figure B.6: Unit Step Response of an Ideal DC Motor Under PI Control.
To evaluate the response obtained under PI control in this simulation, derivative control
was introduced and observed. The simulation was carried out with the controller in ‘PID’
mode and the following parameters Kp = 500, Ki = 100, and Kd = 40.
Figure B.7: Unit Step Response of an Ideal DC Motor Under PID Control.
The PID response obtained offered significant improvement over PI control alone as the
response reached steady-state in little over 0.5 s with no overshoot and sufficient damping.
96
B.2 Discrete PI Controller Design
Kp
u̇(t) = Kp ė(t) + Ki e(t) = Kp ė(t) + e(t) (B.13)
Ti
The derivatives u̇(t) and ė(t) are approximated utilising the forward finite-difference
approach [36], where h is an infinitesimally small step size, for use in a low-level controller.
f (t + h) − f (t)
f 0 (t) = lim ≈ f 0 (t) (B.14)
h→0 h
Hence,
uk+1 − uk ek+1 − ek
u̇(t) = ; ė(t) = (B.15)
h h
Therefore, substituting the approximations to the derivatives of u̇(t) and ė(t) from Equation
(B.15) into Equation (B.13) and collecting the terms results in the discrete-time PI controller.
The step size, h, has been re-defined as the sample time, ∆T , for clarity.
ek ∆T
uk+1 = uk + Kp ek+1 + − ek (B.16)
Ti
Limits will need to be imposed on the output of the discrete-time PI controller, uk+1 , and
ensure it is within the limits of the PWM control (Figure B.1) being applied to the motors.
97
B.3 Linear Splines by Lagrange Interpolation
The elementary Lagrange interpolation formula for a set of data points xi , yi and i = 1, ..., n
and n > 1 with a degree no greater than n − 1, is shown below,
n
Y x − xj
lin (x) = , i = 1, ..., n (B.17)
x i − xj
j=1,j6=i
Its value at any data point within the data set, xk , is either 1 or 0 and as such,
n
Y xk − xj
lin (xk ) = = 1, for i = k (B.18)
j=1,j6=i
xi − xj
n
Y xk − xj
lin (xk ) = = 0, for i 6= k (B.19)
j=1,j6=i
xi − xj
1, i = k
lin (xk ) = δik = (B.20)
0, i 6= k
n
X
pn−1 (x) = yi lin (x) (B.21)
i=1
99
and its values at the data points are therefore given by,
n
X n
X
pn−1 (xk ) = yi lin (xk ) = yi δik = yk , k = 1, ..., n (B.22)
i=1 i=1
Polynomials
n−1 i
(1 − u) Bi,n−1 (u) + uBi−1,n−1 (u) = (1 − u) u (1 − u)n−1−i +
i
n − 1 i−1
u u (1 − u)n−1−(i−1)
i−1
n−1 i n−1 i
= u (1 − u)n−i + u (1 − u)n−i
i i−1
n − 1 n − 1 i
= + u (1 − u)n−i
i i−1
n i n−i
u (1 − u)
=
i
= Bi,n (u) (B.23)
100