7cemm721 final msc (dist) thesis report (michael m. wijetunge de silva) ~ distribution version

64
Department of Mechanical Engineering King’s College London MSc Project Report (7CEMM721) Mobile Autonomous Omni-Directional Robotic Vehicle Control for Indoor Navigation by Michael. M. Wijetunge de Silva Supervised by Professor Jian S. Dai 16 th September 2008 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. Student: Michael M. W. de Silva Signature: Date: 16/09/2008 Supervisor: Professor Jian S. Dai Signature: Date: 2 nd Marker: Dr. Catarina Nunes Signature: Date:

Upload: michael-m-w-de-silva

Post on 12-Nov-2014

1.198 views

Category:

Documents


4 download

DESCRIPTION

"The focus of this research was the mathematical modeling of a novel means of motion navigation for Omni-directional mobile robots. The work on interpolation was innovative, particularly considering current literature, making this the first instance in the field to utilise parametric modeling for trajectory interpolation and motion navigation for mobile robots. Inverse Kinematics (IK) of the robotic geometry related the robots pose (with respect to a global Cartesian frame of reference) to the individual wheel velocities; application of the geometry IK along the parametrically defined path and discretised PI closed-loop motor control provided kinematic and dynamic control over the robot’s pose and Euclidean translation during navigation. Feedback from ultrasound sensors eliminated the cumulative odometry errors of dead reckoning whilst providing a means for obstacle avoidance during autonomous navigation.The implemented prototype incorporated a scalable electronic architecture comprising of an on-board Mini-ITX based computer running Linux and a low-level motor and sensor interfacing microcontroller (MCU). 16-bit CRC routines coded into the MCU firmware ensured accurate communications with the C++ “AI” control application."This is a pruned version of the original dissertation that was bound as a total of 150 pages. The module grade awarded for this research was 77% (including Viva Voce) and King's College London awarded a "Pass with Distinction", i.e. a First Class only achieved with a required minimum average of 70% across all modules (written papers) and a required minimum of 70% for the thesis/project, on the 1st of August 2009.This research was examined via a viva voce on the 26th of September 2008. Project Supervisor and first marker: Professor Jian S. Dai, Professor of Mechanisms and Robotics, Head of the The Centre for Mechatronics & Manufacturing Systems, Division of Engineering, King's College London, Strand, London, WC2R 2LS, The United Kingdom.

TRANSCRIPT

Page 1: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

Department of Mechanical Engineering King’s College London

MSc Project Report (7CEMM721)

Mobile Autonomous Omni-Directional Robotic Vehicle Control for Indoor

Navigation

by

Michael. M. Wijetunge de Silva

Supervised by Professor Jian S. Dai

16th September 2008

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. Student: Michael M. W. de Silva Signature: Date: 16/09/2008 Supervisor: Professor Jian S. Dai Signature: Date: 2nd Marker: Dr. Catarina Nunes Signature: Date:

Page 2: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

Abstract

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

Page 3: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

Acknowledgements

“Not everything that counts can be counted, and not

everything that can be counted counts.”

— Sign hanging in Einstein’s office at Princeton

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.

1http://www.htsoft.com

ii

Page 4: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

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

Page 5: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

Contents

1 Introduction 1

2 Literature Survey 3

2.1 Omni-directional Drive Systems . . . . . . . . . . . . . . . . . . . . . . . . 4

2.1.1 Orthogonal Wheels . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2.1.2 Universal Wheels . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2.1.3 Omni-directional Robot Configurations . . . . . . . . . . . . . . . . 6

2.2 Trajectory Generation and Control . . . . . . . . . . . . . . . . . . . . . . 7

2.3 Local Robot Navigation and Localisation . . . . . . . . . . . . . . . . . . . 7

3 Theoretical Development 10

3.1 Kinematic Modelling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

3.2 Path Planning and Planar Trajectory Generation . . . . . . . . . . . . . . 15

3.2.1 Spline Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

3.2.2 Cubic Bezier-Bernstein Polynomials . . . . . . . . . . . . . . . . . . 17

iv

Page 6: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

3.2.3 Higher Order Polynomials and Complex Paths . . . . . . . . . . . . 23

3.3 Trajectory Navigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

3.4 Kinematic and Dynamic Control . . . . . . . . . . . . . . . . . . . . . . . . 27

3.4.1 Proportional-Integral Motor Control . . . . . . . . . . . . . . . . . 28

3.5 Localisation and Odometry . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

4 Analysis and Design 31

4.1 Concept . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

4.2 Mechanical Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

4.2.1 Motors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

4.3 Preliminary Electronic Design . . . . . . . . . . . . . . . . . . . . . . . . . 34

4.3.1 Sensors and Actuators . . . . . . . . . . . . . . . . . . . . . . . . . 35

4.3.2 Overview of the Proposed Electronic System . . . . . . . . . . . . . 36

4.4 Energy Supply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

4.5 Detailed Electronic Design . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

4.5.1 Low-Level Controller Selection . . . . . . . . . . . . . . . . . . . . . 40

4.5.1.1 Programming of the Microcontroller Firmware . . . . . . . 44

4.5.2 The Motor Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

4.5.2.1 Motor Driver PCB Design . . . . . . . . . . . . . . . . . . 46

4.5.2.2 PWM Motor Control . . . . . . . . . . . . . . . . . . . . . 49

v

Page 7: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

4.5.2.3 Current Sensing and Thermal Output . . . . . . . . . . . 51

4.5.3 Motor Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

4.5.4 Sensor Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

4.6 MARV’s Computer and Operating System . . . . . . . . . . . . . . . . . . 55

4.6.1 The On-board Computer . . . . . . . . . . . . . . . . . . . . . . . . 55

4.6.2 The Operating System . . . . . . . . . . . . . . . . . . . . . . . . . 55

4.7 Software Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

4.7.1 Development Platform . . . . . . . . . . . . . . . . . . . . . . . . . 57

4.7.2 MCU Firmware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

4.7.3 The Control Application . . . . . . . . . . . . . . . . . . . . . . . . 58

4.7.4 Asynchronous Serial Communications . . . . . . . . . . . . . . . . . 59

4.7.4.1 Cyclic Redundancy Check Routines for Verifying Data

Integrity . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

5 Implementation 61

5.1 Equipment and Instrumentation . . . . . . . . . . . . . . . . . . . . . . . . 62

5.2 Initial Design Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . 62

5.3 Final Design and Integration . . . . . . . . . . . . . . . . . . . . . . . . . . 63

5.3.1 Electronic Module Implementation . . . . . . . . . . . . . . . . . . 63

5.3.1.1 Motor Controller . . . . . . . . . . . . . . . . . . . . . . . 63

vi

Page 8: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

5.3.1.2 Motor Driver . . . . . . . . . . . . . . . . . . . . . . . . . 64

5.3.2 MCU Firmware Development . . . . . . . . . . . . . . . . . . . . . 66

5.3.2.1 Serial Communications with CRC Error Checking . . . . . 67

5.3.2.2 Power Control PWM Module Testing . . . . . . . . . . . . 69

5.3.3 Control Application Software Development . . . . . . . . . . . . . . 70

5.4 The Completed Robot Prototype . . . . . . . . . . . . . . . . . . . . . . . 70

6 Results 73

6.1 Power Control PWM Module Performance . . . . . . . . . . . . . . . . . . 73

6.2 LV-MaxSonar-EZ1 Range-finder Performance . . . . . . . . . . . . . . . . 75

7 Discussion 76

7.1 Further Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

8 Conclusions 79

Appendices 88

A Literature Review: Case Studies 88

A.1 Omni-directional Drive Market Viability . . . . . . . . . . . . . . . . . . . 88

B Theoretical Development: Mathematical Derivations and Simulations 91

B.1 Continuous-Time Simulation of PI/PID Control of an Ideal DC Motor . . 91

vii

Page 9: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

B.2 Discrete PI Controller Design . . . . . . . . . . . . . . . . . . . . . . . . . 97

B.3 Linear Splines by Lagrange Interpolation . . . . . . . . . . . . . . . . . . . 99

B.4 Recursive Definition for Computing Bernstein Polynomials . . . . . . . . . 100

C Analysis and Design: Technical Details 101

C.1 LV-MaxSonar-EZ1 Ultrasonic Range-Finders . . . . . . . . . . . . . . . . . 101

C.2 ADXL320 ±5g Dual Axis Accelerometers . . . . . . . . . . . . . . . . . . . 102

C.3 Motor Controller Flowchart . . . . . . . . . . . . . . . . . . . . . . . . . . 103

C.4 Sensor Controller Flowchart . . . . . . . . . . . . . . . . . . . . . . . . . . 104

C.5 Control Application Flowchart . . . . . . . . . . . . . . . . . . . . . . . . . 105

C.6 Asynchronous Serial Communications . . . . . . . . . . . . . . . . . . . . . 106

D MATLAB Simulations 108

D.1 Plotting Cubic Bezier Curves . . . . . . . . . . . . . . . . . . . . . . . . . 108

D.1.1 ‘bezier direct’ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108

D.1.2 ‘bezier direct circle’ . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

D.1.3 ‘bezier direct patch’ . . . . . . . . . . . . . . . . . . . . . . . . . . 113

E Developed Source Code 115

E.1 Direct CRC Routine Developed in Linux . . . . . . . . . . . . . . . . . . . 115

E.2 Motor Controller MCU Firmware . . . . . . . . . . . . . . . . . . . . . . . 120

viii

Page 10: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

List of Figures

2.1 Assembled Omniwheel and a dimensional illustration of a single wheel [1]. . 5

3.1 Geometry of the Omni-directional robot [2]. . . . . . . . . . . . . . . . . . 11

3.2 The robot rotated by φ radians, with respect to the absolute reference frame. 13

3.3 A cubic Bezier curve, its control polygon, and control points. . . . . . . . . 18

3.4 Plot of the cubic Bernstein basis functions obtained in MATLAB. . . . . . 19

3.5 Plot of a few cubic Bezier curves in MATLAB, showing their control polygons. 22

3.6 Generating a circular path with a 5th order Berstein polynomial. . . . . . . 23

3.7 Generating a complex path by patching two cubic Bezier curves. . . . . . . 24

3.8 The robot’s pose following a cubic Bezier path (not to scale). . . . . . . . . 25

3.9 Kinematic and dynamic control. . . . . . . . . . . . . . . . . . . . . . . . . 27

3.10 Block Diagram of a Closed-Loop System. . . . . . . . . . . . . . . . . . . . 28

4.1 Overview of the mechatronic system. . . . . . . . . . . . . . . . . . . . . . 31

4.2 Photograph of the supplied chassis and mounted hardware. . . . . . . . . . 32

ix

Page 11: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

4.3 US Digital E4P-300-079 Optical Encoder. . . . . . . . . . . . . . . . . . . . 33

4.4 Overview of the proposed on-board electronics. . . . . . . . . . . . . . . . . 36

4.5 The PIC18F4331 device pin-out as per the datasheet [3]. . . . . . . . . . . 43

4.6 The In-Circuit Serial Programming interface [4]. . . . . . . . . . . . . . . . 44

4.7 Partial schematic of the prototyped Motor Driver PCB. . . . . . . . . . . . 46

4.8 Diagram of the Motor Driver PCB’s MCU Interface Pinout. . . . . . . . . 47

4.9 PCB Gerber output showing the silkscreen printing. . . . . . . . . . . . . . 48

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.12 Locked anti-phase PWM control [5]. . . . . . . . . . . . . . . . . . . . . . . 49

4.13 Sign/Magnitude PWM Control [5]. . . . . . . . . . . . . . . . . . . . . . . 50

4.14 Simplified Diagram of the Current Sense Circuitry of the LMD18200 [5]. . 51

4.15 Schematic of the Motor Controller. . . . . . . . . . . . . . . . . . . . . . . 53

4.16 Schematic of the Sensor Controller. . . . . . . . . . . . . . . . . . . . . . . 54

4.17 Relationship between high and low level software. . . . . . . . . . . . . . . 56

4.18 Efficiency of the Direct CRC-16-CCITT Checksum on a 25-byte Payload. . 60

5.1 Prototyped Motor Controller Integrated into the Project Box. . . . . . . . 63

5.2 The Motor Driver with FT232RL USB to Serial interfaces mounted to the left. 64

5.3 Initial Testing of the Motor Driver. . . . . . . . . . . . . . . . . . . . . . . 65

x

Page 12: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

5.4 Current Sense Output of a LMD18200 IC During a Change in Direction. . 65

5.5 Serial output from the Motor Controller shown on screen. . . . . . . . . . . 67

5.6 Power Control PWM Module Duty Cycle Output. . . . . . . . . . . . . . . 69

5.7 Wiring of the Motors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70

5.8 In-line Fuse Holder Installed. . . . . . . . . . . . . . . . . . . . . . . . . . . 71

5.9 Project Box Cabling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

5.10 Hirose HR10 Panellised Connector for ICSP of the MCU. . . . . . . . . . . 72

5.11 The Completed Robot. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

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

A.1 Hammonds G-30 Series ODV towing an aircraft [6]. . . . . . . . . . . . . . 89

A.2 The Rovio by WoWee [7]. . . . . . . . . . . . . . . . . . . . . . . . . . . . 89

B.1 Traditional PI Control Diagram [8]. . . . . . . . . . . . . . . . . . . . . . . 91

B.2 Block diagram of a PI controller. . . . . . . . . . . . . . . . . . . . . . . . 92

B.3 Equivalent Circuit Diagram of an Ideal DC Motor. . . . . . . . . . . . . . 92

B.4 SIMULINK Model of an Ideal DC Motor. . . . . . . . . . . . . . . . . . . . 94

B.5 An Adaptable PI/PID Controller Designed in SIMULINK. . . . . . . . . . 94

B.6 Unit Step Response of an Ideal DC Motor Under PI Control. . . . . . . . . 96

xi

Page 13: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

B.7 Unit Step Response of an Ideal DC Motor Under PID Control. . . . . . . . 96

B.8 Flowchart of an implemented discrete-time PI controller in software. . . . . 98

C.1 Functional Block Diagram of the ADXL320 ±5g Dual Axis Accelerometer [9].102

C.2 Flowchart of the Motor Controller Firmware. . . . . . . . . . . . . . . . . . 103

C.3 Flowchart of the Sensor Controller Firmware. . . . . . . . . . . . . . . . . 104

C.4 Flowchart of the Control Application. . . . . . . . . . . . . . . . . . . . . . 105

C.5 Description of the Signals for Asynchronous Serial Communication. . . . . 106

xii

Page 14: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

List of Tables

4.1 DC Motor Electrical and Performance Specifications [10]. . . . . . . . . . . 33

4.2 Sealed Lead-Acid Battery Specifications. . . . . . . . . . . . . . . . . . . . 38

4.3 Estimated Power Consumption by On-board Sub-Systems. . . . . . . . . . 39

4.4 MCU and FPGA Comparative Study . . . . . . . . . . . . . . . . . . . . . 40

4.5 Review of minimum MCU peripherals required for each controller. . . . . . 42

4.6 Description of the pinout of the LMD18200 H-bridge Integrated Circuit. . . 45

5.1 Detailed description of instrumentation utilised in the development of the

robot. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

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

Page 15: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

Nomenclature

µ Micro [10−6]

Ω Electric Resistance [Ohm] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V/A [m2 · kg · s−3 · A−2]

m2 Area [Square Metre]

m3 Volume [Cubic Metre]

A Electric Current [Ampere]

C Electric Charge [Coulomb] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . s·A

c Centi [10−2]

F Capacitance [Farad] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C/V [m−2 · kg−1 · s4 · A2]

G Giga [109]

H Inductance [Henry] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wb/A [m2 · kg · s−2 · A−2]

Hz Frequency [Hertz] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . s−1

J Energy, Work, and Quantity of Heat [Joule] . . . . . . . . . . . . . . . . . . N·m [m2 · kg · s−2]

k Kilo [103]

kg Mass [Kilogram]

M Mega [106]

m Length [Metre] or Milli [10−3]

xiv

Page 16: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

ms−1 Speed, Velocity [Metre per Second]

ms−2 Acceleration [Metre per Square Second]

N Force [Newton] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . m · kg · s−2

n Nano [10−9]

p Pico [10−12]

s Time [Second]

V Electric Potential [Volt] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . W/A [m2 · kg · s−3 · A−1]

W Power [Watt] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . J/s [m2 · kg · s−3]

Wb Magnetic Flux [Weber] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . V·s [m2 · kg · s−2 · A−1]

xv

Page 17: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

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

Page 18: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

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

Page 19: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

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

Page 20: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

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.

An Omni-directional drive system is capable of simultaneous rotation and translation in

any direction, and therefore as a minimum is a 3-DOF system which is classed as holonomic.

To achieve Omni-directional motion a minimum of three wheels are required, however,

more than three wheels provides redundancy and the system can then be described as

‘over-determined’ [15][16].

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).

2.1.1 Orthogonal Wheels

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

Page 21: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

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.

2.1.2 Universal Wheels

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

Page 22: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

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

Page 23: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

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.

2.2 Trajectory Generation and Control

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.

2.3 Local Robot Navigation and Localisation

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.

1Dead reckoning is the process by which the current position is an estimation based upon a previouslydetermined position, and advancing that position based on the current velocity, elapsed time, and course.

7

Page 24: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

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.

A revolutionary paper published by Rodney A. Brooks in 1986 titled, “A Robust Layered

Control System for a Mobile Robot” [30], inaugurated a fundamental shift in Artificial

Intelligence (AI) research in robotics. Brooks argued strongly against building control

8

Page 25: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

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.

2Light Amplification by Stimulated Emission of Radiation3Sound Navigation and Ranging

9

Page 26: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

Chapter 3

Theoretical Development

The following theoretical study presents the development of a mathematical model to

evaluate the kinematics of a three-wheeled Omni-directional robot, parametrically generate

a planar path for trajectory navigation, and ultimately evaluate the path in conjunction

with a controller implementing closed-loop feedback with Proportional-Integral control to

employ kinematic and dynamic control over the robot’s motion.

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.

Ideally, sophisticated autonomous behaviour could be achieved by implementing Visual

Odometry on-board the robot in junction with a highly advanced navigation system; one

capable of recognising and tracking landmarks and utilising this information to compensate

for inaccuracies resulting from sensors and other means of odometry as well as external

disturbances to the system such as surface friction and wheel slip due to loss of traction.

10

Page 27: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

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.

Figure 3.1: Geometry of the Omni-directional robot [2].

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

Page 28: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

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 Bezier-

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 Bezier curves were

extended into 3-dimensions for trajectory generation and path planning of autonomous

Aerobots.

Bezier 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.

1Computer Aided Design

15

Page 29: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

Figure 3.4: Plot of the cubic Bernstein basis functions obtained in MATLAB.

Equation (3.12) can be expanded to give,

P(u) = P0(1− u)n + P1

n

1

u(1− u)n−1 + P2

n

2

u2(1− u)n−2 + · · ·

+Pn−1

n

n− 1

un−1(1− u) + Pnun, u ∈ [0, 1] (3.14)

Equation (3.13) may be used to obtain all the Berstein basis polynomials up to degree

n = 3, since cubic Bezier curves have four control points and as such require a cubic

19

Page 30: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

3.3 Trajectory Navigation

Figure 3.8: The robot’s pose following a cubic Bezier path (not to scale).

The unique use of cubic Bezier 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 Bezier 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

Page 31: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

4.2 Mechanical Design

Figure 4.2: Photograph of the supplied chassis and mounted hardware.

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.

1Computer Numerical Control

32

Page 32: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

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,

Manufacturer Hsiang Neng / Jameco Electronics

Model HN-GH12-1634T-R / GH35GM Series

Jameco Part No. 161382

Rated Voltage (VDC) 12

Operating Range (VDC) 4.5 - 12

Current @ Max. Efficiency (mA) 293

Speed @ Max. Efficiency (RPM) 145

Torque @ Max. Efficiency (kg-cm) 0.85

Gear Ratio 30:1

Table 4.1: DC Motor Electrical and Performance Specifications [10].

Dimensional specifications of the motors are further detailed in the datasheet [10].

Figure 4.3: US Digital E4P-300-079 Optical Encoder.

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

Page 33: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

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.

4.3 Preliminary Electronic Design

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

Page 34: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

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.

Typical implementations of PWM driven motor drivers utilised a H-bridge of CMOS8

technology (such as MOSFETs9 for example) to handle the task of switching the high

current supply to the motors [58].

To control the motors of MARV, the LMD18200 H-bridge IC by National Semiconductor

was chosen since it is capable of delivering 3 A continuous current at supply voltages

between +12 VDC and +55 VDC and withstand a 6 A spike lasting 200 ms. It also features

a low switch on resistance (typically 0.3 Ω per switch), TTL and CMOS compatible inputs,

thermal shutdown at 170 C, internal clamp diodes, and shorted load protection.

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

Pin 3 DIRECTION Input

Pin 4 BRAKE Input

Pin 5 PWM Input

Pin 6 VS Power Supply

Pin 7 GROUND Connection

Pin 8 CURRENT SENSE Output

Pin 9 THERMAL FLAG Output

Table 4.6: Description of the pinout of the LMD18200 H-bridge Integrated Circuit.

Source: LMD18200 H-bridge Integrated Circuit Datasheet [5]

8Complementary Metal Oxide Semiconductor9Metal Oxide Semiconductor Field-Effect Transistor

45

Page 35: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

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.9: PCB Gerber output showing the silkscreen printing.

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

Page 36: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

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].

Although it is nearly impossible to effectively screen an RS-232 signal on a signal cable

from internal noise and crosstalk, the influence of external noise could be greatly reduced

by utilising a cable that is entirely screened. As the baud17 rate and line length increases,

the effect of capacitance between the different lines introduces serious crosstalk until the

data itself is unreadable, however, this could be reduced by using low capacitance cabling.

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.

4.7.4.1 Cyclic Redundancy Check Routines for Verifying Data Integrity

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

17The number of signal level changes per second, regardless of the information content of those signals.18International Telegraph and Telephone Consultative Committee, (from the French name “Comite

Consultatif International Telephonique et Telegraphique”)

59

Page 37: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

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 table19

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.

CRC-16-CCITTpolynomial = x16 + x12 + x5 + 1 (4.3)

The direct CRC-16-CCITT checksum routine, implementing the polynomial shown in

Equation (4.3), was tested with a PIC18F4331 running at 8 MHz on a 25-byte payload.

An I/O pin was pulsed to time the duration of the actual computation, and the output

captured via the oscilloscope is shown in Figure 4.18. The implemented routine is proven

to be efficient, taking a mere 2 ms to execute.

Figure 4.18: Efficiency of the Direct CRC-16-CCITT Checksum on a 25-byte Payload.

The source code of the direct CRC-16-CCITT routine is located in Appendix E.1.

19A lookup table is a data structure, usually an array or associative array, used to replace a runtimecomputation with a simpler array indexing operation. The speed gain can be significant, since retrievinga value from memory is often faster than undergoing an expensive computation but at the sacrifice ofavailable memory.

60

Page 38: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

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, Bezier 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.

Integrating further components such as quadrature encoder feedback, ultrasonic range-

finders, and the Sensor Controller into the design remain to be implemented in the future

as well.

61

Page 39: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

5.1 Equipment and Instrumentation

The following equipment and instrumentation were utilised in the development and imple-

mentation of the robot.

Description Make and Model

Digital Multimeter Fluke 189 True RMS Multimeter

Fluke SureGrip TP220 Test Probes

Fluke SureGrip AC220 Alligator Test Clips

Fluke SureGrip TL222 Silicon Insulated Test Leads

Oscilloscope Tektronix 2012B 100 MHz, 2CH, 1Gs/S

Tektronix P2220 Probes (Pair)

PIC Programmer Olimex MPLAB ICD2 ‘Clone’ PIC Programmer

Bench Power Supply Maplin 0-20 VDC 5 A Power Supply (Ref. N93CX)

Battery Charger Maplin 12 VDC 350 mA SLA Charger (Ref. LL30H)

Table 5.1: Detailed description of instrumentation utilised in the development of the robot.

5.2 Initial Design Considerations

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

Page 40: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

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.

5.3.1 Electronic Module Implementation

5.3.1.1 Motor Controller

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.1Light Emitting Diode

63

Page 41: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

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.

2Surface-Mount Technology.3Restriction of Hazardous Substances Directive

64

Page 42: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

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%,

Figure 5.6: Power Control PWM Module Duty Cycle Output.

The accuracy of the PWM signals generated by the Power Control PWM Module, are

studied in Chapter 6.

69

Page 43: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

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.

5.4 The Completed Robot Prototype

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.

Figure 5.7: Wiring of the Motors.

6GNU General Public License

70

Page 44: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

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.

Figure 5.8: In-line Fuse Holder Installed.

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.

Figure 5.9: Project Box Cabling.

7Single Pole Single Throw; Configuration for an on/off toggling action of the switch.

71

Page 45: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

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.

Figure 5.11: The Completed Robot.

72

Page 46: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

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

Page 47: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

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.

7.1 Further Work

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

1A bootloader, in terms of microcontrollers, is the term given to a form of firmware that occupies acertain area of ROM. It allows for machine code to be executed on-board simply by uploading the usercompiled firmware over a serial link, without the use of a hardware programmer.

77

Page 48: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

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 Bezier 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.

As suggested in Chapter 3, a surface scanning optical encoder could be implemented

to provide a direct means of odometry to further aid in improving the robots position

estimation.

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.

2Portable Operating System Interface

78

Page 49: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

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

Page 50: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

References

[1] Kornylak Corporation, “Omni Wheels: Both Heavy-Duty & Lightweight Plastic

Wheels,” http://www.omniwheel.com/omniwheel/omniwheel.htm, last viewed 12 July

2008.

[2] T. Kalmar-Nagy, R. D’Andrea, and P. Ganguly, “Near-optimal dynamic trajectory

generation and control of an omnidirectional vehicle,” Robotics and Autonomous

Systems, vol. 46, no. 1, pp. 47–64, 2004.

[3] Microchip, “Microchip PIC18F2331/2431/4331/4431 Datasheet,” http://www.

datasheetcatalog.org/datasheet/microchip/39616b.pdf, last viewed 13 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.

[5] National Semiconductor, “National Semiconductor LMD18200 3A, 55V H-Bridge

Datasheet,” http://www.national.com/ds.cgi/LM/LMD18200.pdf, last viewed 13 July

2008.

[6] “Hammonds Omni-Directional Vehicle to assist in production of Boeing’s 787 Dream-

liner,” http://www.gizmag.com/hammonds-omni-directional-vehicle-boeing-787/

8720/, last viewed 13 July 2008.

80

Page 51: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

[7] Ubergizmo, “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.

[8] R. Valentine, Motor Control Electronics Handbook. McGraw-Hill Professional, 1998.

[9] Analog Devices Inc., “Analog Devices - ADXL320 Datasheet,” http://beta.octopart.

com/Analog Devices ADXL320JCP 0.pdf, last viewed 14 September 2008.

[10] Jameco Electronics, “Jameco Electronics - HN-GH12-1634T-R 12 VDC Motor Specifi-

cation / Cat. 283, Page 90,” http://www.jameco.com/Jameco/catalogs/c283/P90.pdf,

last viewed 13 July 2008.

[11] I. J. Cox, “Blanche - An Experiment in Guidance and Navigation of an Autonomous

Robot Vehicle,” IEEE Transactions on Robotics and Automation, vol. 7, no. 2, pp.

193–204, April 1991.

[12] Wikipedia, “Ackermann steering geometry,” http://en.wikipedia.org/wiki/Ackermann

steering geometry, last viewed 13 July 2008.

[13] D. S. Kim, H. C. Lee, and W. H. Kwon, “Geometric kinematics modeling of omni-

directional autonomous mobile robot and its applications,” Robotics and Automation,

2000. Proceedings. ICRA ’00. IEEE International Conference on, vol. 3, pp. 2033–2038,

2000.

[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.

[15] R. Rojas and A. G. Forster, “Holonomic Control of a Robot with an Omni-directional

Drive.” Kunstliche Intelligenz, BoettcherIT Verlag, 2006.

81

Page 52: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

[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.

[17] F. G. Pin and S. M. Killough, “A new family of omnidirectional and holonomic

wheeled platforms for mobile robots,” Robotics and Automation, IEEE Transactions

on, vol. 10, no. 4, pp. 480–489, Aug 1994.

[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.

[19] A. El-Shenawy, A. Wellenreuther, A. S. Baumgart, and E. Badreddin, “Comparing

Different Holonomic Mobile Robots,” Systems, Man and Cybernetics, 2007. ISIC.

IEEE International Conference on, pp. 1584–1589, October 2007.

[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.

[23] H. Asama, M. Sato, L. Bogoni, H. Kaetsu, A. Mitsumoto, and I. Endo, “Development

of an Omni-Directional Mobile Robot with 3 DOF Decoupling Drive Mechanism,”

Robotics and Automation, 1995. Proceedings., 1995 IEEE International Conference

on, vol. 2, pp. 1925–1930 vol.2, May 1995.

82

Page 53: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

[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.

[26] I. Kamon, E. Rimon, and E. Rivlin, “TangentBug: A Range-Sensor-Based Navigation

Algorithm,” The International Journal of Robotics Research, vol. 17, no. 9, pp. 934–953,

1998. [Online]. Available: http://ijr.sagepub.com/cgi/content/abstract/17/9/934

[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.

[28] H. M. Choset, S. Hutchinson, K. M. Lynch, G. Kantor, W. Burgard, L. E. Kavraki,

and S. Thrun, Principles of Robot Motion: Theory, Algorithms, and Implementations.

The MIT Press, June 2005.

[29] I. J. Cox, Autonomous Robot Vehicles, G. T. Wilfong, Ed. Springer-Verlag, 1990.

[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.

[32] M. Dissanayake, P. Newman, S. Clark, H. Durrant-Whyte, and M. Csorba, “A Solution

to the Simultaneous Localization and Map Building (SLAM) Problem,” Robotics and

Automation, IEEE Transactions on, vol. 17, no. 3, pp. 229–241, Jun 2001.

[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

Page 54: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

[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.

[35] W. Gautschi, Numerical Analysis. Birkhauser, Boston, 1997.

[36] E. Cheney and D. Kincaid, Numerical Mathematics and Computing (International

Student Edition), 6th ed. Brooks/Cole, August 2007.

[37] Wikipedia, “Pierre Bezier,” http://en.wikipedia.org/wiki/Pierre B%C3%A9zier, last

viewed 2 August 2008.

[38] ——, “Paul de Casteljau,” http://en.wikipedia.org/wiki/Paul de Casteljau, last

viewed 2 August 2008.

[39] ——, “Bezier curve,” http://en.wikipedia.org/wiki/B%C3%A9zier curve, last viewed

3 August 2008.

[40] N. S. Nise, Control Systems Engineering, 4th ed. John Wiley and Sons Ltd., 2003.

[41] G. F. Franklin, J. D. Powell, and M. L. Workman, Digital Control of Dynamic Systems,

3rd ed. Pearson Education, April 1998.

[42] K. J. Astrom and R. M. Murray, Feedback Systems: An Introduction for Scientists

and Engineers. 6 Oxford Street, Woodstock, Oxfordshire OX20 1TW: Princeton

University Press, 2008.

[43] Wikipedia, “Dead reckoning,” http://en.wikipedia.org/wiki/Dead reckoning, last

viewed 15 August 2008.

[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.

[45] N. Winters, J. Gaspar, G. Lacey, and J. Santos-victor, “Omni-directional vision for

robot navigation,” in In Proc. IEEE Workshop on Omnidirectional Vision, South,

2000, pp. 21–28.

84

Page 55: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

[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.

[50] Maxim Integrated Products, “Maxim - MAX1555EZK+T,” http://beta.octopart.com/

Maxim MAX1555EZK%2BT 0.pdf, last viewed 10 September 2008.

[51] Wikipedia, “Lithium-ion Battery,” http://en.wikipedia.org/wiki/Lithium ion, last

viewed 10 September 2008.

[52] Fairchild Semiconductor, “Fairchild - LM7805CT,” http://beta.octopart.com/

Fairchild LM7805CT.pdf, last viewed 10 September 2008.

[53] National Semiconductor, “National Semiconductor - LM317T,” http://alpha.octopart.

com/National Semiconductor LM317T.pdf, last viewed 10 September 2008.

[54] R. C. Jaeger, Introduction to Microelectronic Fabrication (Modular Series on Solid

State Devices), 2nd ed. Prentice Hall, November 2001, vol. 5.

[55] Microchip, “Microchip PIC18F1230/1330 Datasheet,” http://www.datasheetcatalog.

com/datasheets pdf/P/I/C/1/PIC18F4331.shtml, last viewed 13 July 2008.

85

Page 56: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

[56] Wikipedia, “Cross compiler,” http://en.wikipedia.org/wiki/Cross compiler, last

viewed 13 July 2008.

[57] Microchip, “MPLAB Integrated Development Environment (IDE) v8.10,” http://

www.microchip.com, last viewed 13 July 2008.

[58] M. H. Rashid, Power Electronics: Circuits, Devices and Applications, 3rd ed. Pearson

Education, September 2003.

[59] “Cadsoft EAGLE,” http://www.cadsoft.de/, last viewed 31 July 2008.

[60] “PCB Trace Width Calculator,” http://circuitcalculator.com/wordpress/2006/01/31/

pcb-trace-width-calculator/, last viewed 31 July 2008.

[61] “gerbv - A Free Gerber Viewer,” http://gerbv.sourceforge.net/, last viewed 31 July

2008.

[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.

[63] Wikipedia, “RS-232,” http://en.wikipedia.org/wiki/RS-232, last viewed 3 September

2008.

[64] L. Bies, “On-line CRC calculator,” http://www.lammertbies.nl/comm/info/

crc-calculation.html, last viewed 2 August 2008.

[65] “Silver Circuits Sdn Bhd, Malaysia,” http://www.silvercircuits.com, last viewed 31

July 2008.

[66] Wikipedia, “Nibble,” http://en.wikipedia.org/wiki/Nibble, last viewed 13 July 2008.

[67] J. Desch, “The ‘ezV24’-Library Project,” http://ezv24.sourceforge.net/, last viewed

12 September 2008.

86

Page 57: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

[68] M. Johnson, J. Wilkie, and R. M. Katebi, Control Engineering. Palgrave Macmillan,

October 2001.

[69] MaxBotix Inc., “LV-MaxSonar-EZ1 Datasheet,” http://www.maxbotix.com/uploads/

LV-MaxSonar-EZ1-Datasheet.pdf, last viewed 13 September 2008.

87

Page 58: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

Appendix B

Theoretical Development:

Mathematical Derivations and

Simulations

B.1 Continuous-Time Simulation of PI/PID Control

of an Ideal DC Motor

Figure B.1: Traditional PI Control Diagram [8].

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

Page 59: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

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,

Gue = Kp1 + sTisTi

=Kp

sTi+Kp =

Ki

s+Kp (B.1)

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.

Figure B.3: Equivalent Circuit Diagram of an Ideal DC Motor.

The angular velocity of the motor shaft is given by ω(t) =dθ

dtand the angular acceleration

of is given by ω(t) =d2θ

dt2.

92

Page 60: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

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

Page 61: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

B.2 Discrete PI Controller Design

Taking the derivative of Equation (3.27) with Kd = 0 and Ki = Kp/Ti,

u(t) = Kpe(t) +Kie(t) = Kpe(t) +Kp

Tie(t) (B.13)

The derivatives u(t) and e(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) = limh→0

f(t+ h)− f(t)

h≈ f ′(t) (B.14)

Hence,

u(t) =uk+1 − uk

h; e(t) =

ek+1 − ekh

(B.15)

Therefore, substituting the approximations to the derivatives of u(t) and e(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.

uk+1 = uk +Kp

(ek+1 +

ek∆T

Ti− ek

)(B.16)

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

Page 62: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

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,

lni (x) =n∏

j=1,j 6=i

x− xjxi − xj

, i = 1, ..., n (B.17)

Its value at any data point within the data set, xk, is either 1 or 0 and as such,

lni (xk) =n∏

j=1,j 6=i

xk − xjxi − xj

= 1, for i = k (B.18)

lni (xk) =n∏

j=1,j 6=i

xk − xjxi − xj

= 0, for i 6= k (B.19)

which is equivalent to,

lni (xk) = δik =

1, i = k

0, i 6= k

(B.20)

The Lagrange interpolation polynomial of degree n− 1 is [35],

pn−1(x) =n∑i=1

yilni (x) (B.21)

99

Page 63: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version

and its values at the data points are therefore given by,

pn−1(xk) =n∑i=1

yilni (xk) =

n∑i=1

yiδik = yk, k = 1, ..., n (B.22)

B.4 Recursive Definition for Computing Bernstein

Polynomials

(1− u)Bi,n−1(u) + uBi−1,n−1(u) = (1− u)

n− 1

i

ui(1− u)n−1−i +

u

n− 1

i− 1

ui−1(1− u)n−1−(i−1)

=

n− 1

i

ui(1− u)n−i +

n− 1

i− 1

ui(1− u)n−i

=

n− 1

i

+

n− 1

i− 1

ui(1− u)n−i

=

n

i

ui(1− u)n−i

= Bi,n(u) (B.23)

100

Page 64: 7CEMM721 Final MSc (Dist) Thesis Report (Michael M. Wijetunge de Silva) ~ Distribution Version