DEVELOPMENT OF FUZZY PID CASCADE CONTROL SYSTEM FOR DIFFERENTIAL-DRIVE
WHEELED MOBILE ROBOT
MOHD SAIFIZI B. SAIDON
UNIVERSITI MALAYSIA PERLIS 2012
© This
item
is protected
by original
copyright
DEVELOPMENT OF FUZZY PID CASCADE CONTROL SYSTEM FOR DIFFERENTIAL-DRIVE
WHEELED MOBILE ROBOT
by
MOHD SAIFIZI B. SAIDON (
0830610314)
A thesis submitted in fulfillment of the requirements for the degree of Master of Science (Mechatronic Engineering)
School of Mechatronic Engineering UNIVERSITI MALAYSIA PERLIS
2012
© This
item
is protected
by original
copyright
i
UNIVERSITI MALAYSIA PERLIS
NOTES : * If the thesis is CONFIDENTIAL or RESTRICTED, please attach with the letter from the organization with period and reasons for confidentially or restriction.
DECLARATION OF THESIS
Author’s full name : MOHD SAIFIZI BIN SAIDON Date of birth : 23 SEPTEMBER 1983
Title : DEVELOPMENT OF FUZZY PID CASCADE CONTROL SYSTEM FOR
DIFFERENTIAL-DRIVE WHEELED MOBILE ROBOT .
Academic Session : 2011/2012
I hereby declare that the thesis becomes the property of Universiti Malaysia Perlis (UniMAP) and to be placed at the library of UniMAP. This thesis is classified as :
CONFIDENTIAL (Contains confidential information under the Official Secret Act 1972)*
RESTRICTED (Contains restricted information as specified by the organization where research was done)*
OPEN ACCESS I agree that my thesis is to be made immediately available as hard copy or on-line open access (full text)
I, the author, give permission to the UniMAP to reproduce this thesis in whole or in part for the purpose of research or academic exchange only (except during a period of _____ years, if so requested above).
Certified by:
_________________________ _________________________________
SIGNATURE SIGNATURE OF SUPERVISOR
830923-09-5013 Assoc. Prof. Dr. Hazry Desa (NEW IC NO. / PASSPORT NO.) NAME OF SUPERVISOR Date :5 JUNE 2012 Date : 5 JUNE 2012 /
© This
item
is protected
by original
copyright
ii
ACKNOWLEDGEMENT
First of all, I would like to acknowledge the contributions of the many people who provided invaluable help and support for the completion of this thesis. My supervisor, Assoc. Professor Dr. Hazry Desa, deserve thanks for not only guiding me with a steady hand, but also leaving me the freedom to pursue my own research interests. He has given me invaluable suggestions with my research both patiently and generously. He guided me to conduct scientific research as well as theoretical studies. Without the correct directing and financial support of Dr. Hazry Desa, I wouldn’t have finished my thesis research and writing. Special thanks as well to my co-supervisor, Assoc. Professor Paul Raj MP, and Assoc. Professor Dr. Abdul Hamid Adom, who gave me so many precious advices and suggestions. I would like to say thanks to Professor Dr. Mohd Zaki Abd Muin, who seemed always ready to help me with my control systems problems. I also have to thank to the researchers at Autonomous Systems and Machine Vision and School of Mechatronic, University Malaysia Perlis has provided a supportive and enjoyable environment in which to study and work. I thank all the school, staff and students here sincerely. On a personal front, I am forever indebted to my family for my continued study. Special thanks to my my wife and my family who have provided both moral and financial support over the period of my education. Without all their love and support, I wouldn’t have been able to finish this thesis.
© This
item
is protected
by original
copyright
iii
TABLE OF CONTENTS
PAGE
THESIS DECLARATION i
ACKNOWLEDGEMENT ii
TABLE OF CONTENTS iii
LIST OF TABLES vii
LIST OF FIGURES viii
LIST OF ABBREVIATION xiii
LIST OF SYMBOLS xv
ABSTRAK xviii
ABSTRACT xix
CHAPTER 1- INTRODUCTION 1.1 Problem Statements 4
1.2 Scope of Research 6
1.3 Objectives 7
1.4 Structure of the Thesis 7
CHAPTER 2- LITERATURE SURVEY 2.1 Robotic 9
2.1.1 Mobile Robot 10
2.2 Control System of Mobile Robot 13
2.2.1 Fuzzy Logic Controller 14
© This
item
is protected
by original
copyright
iv
2.2.2 Proportional-Integral-Derivative (PID) Controller 17
2.3 Sensing System 20
2.3.1 Vision Sensing for Door Recognition 21
2.3.2 Sonar Sensing for Obstacles Detection 25
CHAPTER 3- DEVELOPMENT OF MOBILE ROBOT 28
CHAPTER 4- LANDMARK RECOGNITION BY USING FUZZY APPROACH 4.1 Landmark Recognition System Architecture 40
4.2 Door Detection Algorithm 42
4.2.1 Canny Edge Detector 44
4.2.2 Line Detection 47
4.2.3 Circle Detection 50
4.2.4 Distance and Orientation of Landmark 52
4.2.5 Fuzzy Logic For Door Recognition 54
4.3 Results and Discussions 61
4.3.1 Experiments 61
4.3.2 Discussions 63
4.4 Conclusion 65
CHAPTER 5- CONTROL SYSTEMS FOR MOBILE ROBOT 5.1 Kinematic Model of the Nonholonomic Mobile Robot 68
5.1.1 Differential Steering System 70
© This
item
is protected
by original
copyright
v
5.2 Path Tracking Control for the Mobile Robot 78
5.3 Master Controller 80
5.3.1 Controller Input for Target Trajectory 80
5.3.2 Controller Input for Obstacles Avoidance 83
5.3.3 Controller Output 87
5.4 The Proposed PID Controller 89
5.4.1 Experimental Based Method 90
5.4.2 Model Based Method 94
5.5 Gain Scheduling 103
5.6 Results & Discussions 104
5.6.1 Experiments 104
5.6.2 Discussions 113
5.7 Conclusion 121
CHAPTER 6- CONCLUSION AND FUTURE WORK 6.1 Conclusion 123
6.2 Future Work 125
REFERENCES 127
APPENDIX A 135
APPENDIX B 136
© This
item
is protected
by original
copyright
vi
APPENDIX C 137
APPENDIX D 139
APPENDIX E 145
APPENDIX F 152
APPENDIX G 153
APPENDIX H 154
APPENDIX I 155
APPENDIX J 156
LIST PUBLICATIONS 158
© This
item
is protected
by original
copyright
vii
LIST OF TABLES
NO. PAGE
3.1 Mechanical specification of the mobile robot 30
3.2 Computer specification of the mobile robot 30
3.3 Computer specification of the mobile robot 30
3.4 Relation between encoder pulses and DC motor speed 32
4.1 Rules for a three-input door fuzzy detection 59
4.2 Experimental results for the calculation of the distance to a landmark 63
4.3 Experimental results for the calculation of the angle orientation to a landmark 64
5.1 Rules table for the target trajectory steering system 83
5.2 Rules table for the obstacles avoidance steering system 86
5.3 The results of the PID auto-tuning for right wheel and left wheel 93
5.4 The result of the PID modeling based tuning for right wheel and left wheel 103
5.5 Left DC motor with second order model parameters approximation 106
5.6 Right DC motor with second order model parameters approximation 106
5.7 Left DC motor estimated second order model and ZOH/FOH parameters 110
5.8 Right DC motor estimated second order model and ZOH/FOH parameters 111
5.9 The orientation of the robot when arrived at target 119
5.10 The distance of the robot when arrived at target 119
5.11 The time taken by robot arrived at target 120
© This
item
is protected
by original
copyright
viii
LIST OF FIGURES
NO. PAGE
2.1 Fuzzy controller (redrawn from [3]) 14
3.1 Mobile Robot “MAR”- Front View 28
3.2 Mobile Robot “MAR”- Side View 29
3.3 Duty cycle vs. Speeds graph for DC motor speed 31
3.4 DC Motor Integrated with Optical Encoder 32
3.5 Camera Sensor or Landmark Recognition 33
3.6 Characteristics for the EZ1 Ultrasonic Sensor 35
3.7 The Layout of Sensors on the Mobile Robot 36
3.8 Block Diagram of Labview Programming 37
3.9 Front Panel of Labview Programming 38
4.1 Approach for door recognition using computer vision 39
4.2 Door as a landmark for mobile robot navigation 41
4.3 Block diagram of the Canny edge detector 44
4.4 (a) Original image (b) edge detection result using the Canny edge detector 46
4.5 The steps of line detection process seen in (a) original image (b) Canny 47
detector and (c) Hough Transform line fit 4.6 Line is fit to a set of points using (a) the Hough Transform and (b) least squares 48 4.7 Parametric polar form of a straight line using r and θ 49
© This
item
is protected
by original
copyright
ix
LIST OF FIGURES
NO. PAGE
4.8 Circle detection using geometric feature matching 52
4.9 The projection of the circle onto the camera image plane 53
4.10 Possible consideration of door recognition 55
(a) two frame edge at left side with a circle (b) two frame edge at left side with a circle (c) One of the frame edge at both sides with a circle 4.11 Input membership functions for vertical line 1 57
4.12 Input membership functions for center circle 57
4.13 Input membership functions for vertical line 2 58
4.14 Output membership functions for door detection 60
4.15 Experiment setup for distances calibration of vision system 61
4.16 Experiment setup for orientation calibration of vision system 62
4.17 The result of door detection using Fuzzy Logic 65
5.1 Posture of mobile robot’s wheel 69
5.2 The differential moving possibilities for differential steering system 71
5.3 The example of differential steering system driving motion 72
5.4 Wheel of the mobile robot 74
5.5 Differential steering system of the mobile robot 76
© This
item
is protected
by original
copyright
x
LIST OF FIGURES
NO. PAGE
5.6 A cascade control system for target trajectory 79
5.7 A cascade control system for obstacle avoidance 80
5.8 Block diagram of the fuzzy logic controller for target trajectory 81
5.9 Input membership functions for target distance Dt 82
5.10 Input membership functions for desired angle θd 82
5.11 Block diagram of Fuzzy controller for obstacles avoidance 84
5.12 Input membership function for distance between robot and obstacles 85
5.13 Obstacle avoidance behavior for the obstacle on the left side 87
5.14 Output membership functions for the speed 88
5.15 Output membership functions for the angular speed 89
5.16 Relay control (On/Off control) used in autotuning 91
5.17 PID autotune wizard for PID parameters tuning 92
5.18 Open-loop motor model 95
5.19 Feedback control system 98
5.20 Block diagram of a system with gain scheduling 104
5.21 Collection of filtered and non-filtered step response experiment data 105
5.22 Step response for estimated model of 5-7 duty cycles. Left wheel: 108 measurement blue, FOH model red, right wheel: measurement green,
FOH model purple
© This
item
is protected
by original
copyright
xi
LIST OF FIGURES
NO. PAGE
5.23 Step response for estimated model of 10-12 duty cycles. Left wheel: 108 measurement blue, FOH model red, right wheel: measurement green,
ZOH model purple
5.24 Step response for estimated model of 12.5-15.5 duty cycles. Left wheel: 109 measurement blue, ZOH model red, right wheel: measurement green,
ZOH model purple
5.25 Step response for estimated model of 12.5-15.5 duty cycles. Left wheel: 109 measurement blue, FOH model red, right wheel: measurement green,
FOH model purple
5.26 The sensor data for the tuning process of the ultrasonic sensors 112 5.27 Time response of left wheel speed with 195 [RPM] step input, 114
Fast Tuning blue, Normal Tuning red, Modeling Base Tuning green
5.28 Time response of left wheel speed with 165 [RPM] step input, 115 Fast Tuning blue, Normal Tuning red, Modeling Base Tuning green
5.29 Time response of left wheel speed with 105 [RPM] step input, 115 Fast Tuning blue, Normal Tuning red, Modeling Base Tuning green
5.30 Time response of left wheel speed with 30 [RPM] step input, 116 Fast Tuning blue, Normal Tuning red, Modeling Base Tuning green
© This
item
is protected
by original
copyright
xii
LIST OF FIGURES
NO. PAGE
5.31 Time response of right wheel speed with 195 [RPM] step input, 116 Fast Tuning blue, Normal Tuning red, Modeling Base Tuning green
5.32 Time response of right wheel speed with 165 [RPM] step input, 117 Fast Tuning blue, Normal Tuning red, Modeling Base Tuning green
5.33 Time response of right wheel speed with 105 [RPM] step input, 117 Fast Tuning blue, Normal Tuning red, Modeling Base Tuning green
5.34 Time response of right wheel speed with 30 [RPM] step input, 118 Fast Tuning blue, Normal Tuning red, Modeling Base Tuning green
© This
item
is protected
by original
copyright
xiii
LIST OF ABBREVIATIONS
ECE Economic Commission for Europe
MAR Mobile Autonomous Robot
AI Artificial Intelligence
PID Proportional+Integral+Derivative
MDARS Mobile Detection Assessment and Response System
PWM Pulse Width Modulation
FOV Field of View
GUI Graphical User Interface
SIFT Scale Invariant Feature Transform
VL1 Vertical Line 1
VL2 Vertical Line 2
C Center Circle
COA Center of Area
ICC Instantaneous Center of Curvature
ICR Instantaneous Center of Rotation
DAQ Data Acquasition
ZOH Zero Order Hold
FOH First Order Hold
FLC Fuzzy Logic Controller
neglarge Negative Large
negsmall Negative Small
© This
item
is protected
by original
copyright
xiv
possmall Positive Small
poslarge Positive Large
© This
item
is protected
by original
copyright
xv
LIST OF SYMBOLS
) (t
r Reference input
) (t
u Input
) (t
y Output
φL Left wheel rotation per seconds φR Right wheel rotation per seconds NR Numbers of encoder per revolution xL Number of encoder pulses for left wheel xR Number of encoder pulses for left wheel
v Speed
ω Angular Speed
T2 Low-threshold
T1 High-threshold
T Global single thresholding
σ Standard deviation of the Gaussian filter
rH Normal from the line to the origin θH Angle the normal
(x, y) Coordinate
Cp The intensity of the pixel Dt Target distance
θc Circle orientation
n Constants derived from the camera calibration
© This
item
is protected
by original
copyright
xvi
c Constants derived from the camera calibration xcenter x-axis center of circle
x' Diameter of circle
Kp Proportional Gain
Ti Integeral Time
Td Derivative Time
θ Angle
uR Speed of right wheel
uL Speed of left wheel
ω Angular Speed of robot
u Speed of robot
d Distance from center of body to the center of the left wheel or right wheel
ṗ Posture of mobile robot
J Wheel Jacobian Matrix
W World coordinate system denoted R X-axis of robot coordinate system
θd Desired orientation Tu Ultimate period Pu Ultimate gain
K Gain
ξ Damping ratio
ωn Natural frequency, rad/s
Ts Time sampling
© This
item
is protected
by original
copyright
xvii
Ki Integral gain
Kd Derivative gain
© This
item
is protected
by original
copyright
xviii
PEMBANGUNAN SISTEM KAWALAN ALIRAN KABUR-PID BAGI PERBEZAAN PEMANDUAN BERODA
ROBOT MUDAH ALIH ABSTRAK
Kajian ini memberi tumpuan kepada pelaksanaan sistem kawalan robot autonomi mudah alih pintar yang dipanggil Mobile Autonomous Robot (MAR). Robot disasarkan untuk penggunaan tertutup, memainkan peranan sebagai panduan atau kakitangan keselamatan di kilang-kilang, gudang, muzium dan pejabat. Ia mempunyai dua roda memandu dikuasakan oleh dua motor yang bebas untuk memandu dan stereng masing-masing. Setiap AT motor dikawal oleh modulasi lebar denyut (PWM) motor pengawal. Satu sistem kawalan aliran telah dilaksanakan untuk mengawal pergerakan robot, dan ia terdiri daripada pengawal induk dan dua pengawal hamba bagi setiap AT motor. Pengawal induk adalah Pengawal Logik Kabur (FLC) untuk mengira kelajuan dan kelajuan sudut yang diperlukan oleh kedua-dua motor. Satu sistem penglihatan digunakan sebagai pengesan untuk gerakan robot. Logik kabur digunakan untuk menjana sasaran gerakan trajektori dengan maklumat yang diekstrak daripada sistem penglihatan seperti jarak sasaran dan orientasi sasaran.
Penanda yang dipilih adalah pintu kerana pintu adalah satu objek yang sangat biasa dalam persekitaran tertutup dan pengesanan pintu membolehkan robot untuk melakukan tugas- tugas seperti navigasi dan laluan perancangan. Kerja ini membentangkan pendekatan yang menggunakan penglihatan pengkomputeran yang mengaplikasikan teknik Penjelmaan Hough dan teknik Penyamaan Sifat selepas imej tersebut diproses menggunakan pengesan pinggir Canny. Kedua-dua pengawal hamba adalah Kadaran - Kamiran - Terbitan (PID) pengawal yang memastikan kelajuan yang diingini diperoleh oleh roda. Dua kaedah telah digunakan bagi pengiraan nilai-nilai yang betul bagi PID. Iaitu menggunakan kaedah eksperimen dan kaedah model. Kaedah eksperimen menggunakan kaedah Zigler-Nichols talaan automatik tanpa mengetahui sifat loji yang hendak dikawal. Dalam kaedah berasaskan model, model matematik bagi motor diterbitkan terlebih dahulu dan ia digunakan untuk mereka bentuk pengawal PID. Parameter pengawal PID telah ditala mengikut empat julat kelajuan. Parameter pengawal PID bagi kedua-dua AT motor ditalakan secara automatik menggunakan Gain Scheduling yang berasaskan kepada empat julat kelajuan. Perbandingan telah dibuat untuk melihat prestasi robot mudah alih yang menggunakan parameter PID yang ditala oleh kedua-dua kaedah. Dalam kajian ini, logik kabur juga digunakan untuk menjana teknik mengelakkan halangan dengan maklumat yang diekstrak daripada pengesan ultrasonik. Prestasi keseluruhan robot apabila berpindah ke sasaran menunjukkan bahawa purata ralat relatif adalah kurang daripada 0.03 meter bagi jarak dan ralat relatif purata untuk orientasi adalah kira-kira 20o apabila tiba pada robot mencapai sasarannya. Purata masa yang diambil oleh robot untuk tiba di sasaran dalam 1 meter kira-kira 23 saat.
© This
item
is protected
by original
copyright
xix
DEVELOPMENT OF FUZZY-PID CASCADE CONTROL SYSTEM FOR DIFFERENTIAL-DRIVE WHEELED
MOBILE ROBOT ABSTRACT
This study focuses on the control systems implementations of an intelligent autonomous mobile robot called Mobile Autonomous Robot (MAR). The robot is targeted for indoor usage, assume the role of a guide or security personnel in factories, warehouses, museums and offices. It has two driving wheels powered by two independent motors for drive and steering respectively. Each DC motor is controlled by a pulse width modulation (PWM) motor controller. A cascade control system has been implemented to control the movement of the robot, and this consists of a master controller and two slave controllers for each DC motor. The master controller is a Fuzzy Logic Controller (FLC) which computes the required speed and angular speed needed by the two motors. A vision system is used as the sensor for the robot motion. Fuzzy logic is applied to generate target trajectory movement with the information extracted from vision system such as the distance of target and the orientation of target. The landmark selected is a door because the door is a very common objects in indoor environments and the detection of a door allows a robot to do tasks such as navigation and path planning. This work presents an approach using computer vision which applies Hough Transform and Feature Matching technique after the image has been process using Canny edge detector. The two slave controllers are Proportional-Integral- Derivative (PID) controllers which ensure the desired speeds are obtained at the wheels.
Two methods are used in calculating proper values of the PID. These are experimental method and model based method. The experimental method uses the Zigler-Nichols autotuning method without any knowledge about the plant to be controlled. In the model based method a mathematical model of the motors are first derived and this is used to design the PID controller. PID controller parameters were tuned according to four ranges of speeds. The PID controller parameters for both DC motors are auto-tuned using Gain Scheduling based on four ranges of speeds. Comparison was made to see the performance of the mobile robot using the PID parameters tuned by the two methods. In this study, fuzzy logic is also applied to generate obstacle avoidance techniques with the information extracted from ultrasonic sensors. Overall performance of the robot when moving to the target shows that the average relative error is less than 0.03 meter for distance and the average relative error for orientation is about 20o when arrived at the robot achieves its target. The average time taken by the robot to arrive at the target in 1 meter is approximately 23 seconds.
© This
item
is protected
by original
copyright
1 CHAPTER 1
INTRODUCTION
Mobile robot has received much attention from scientists and academics over the past two decades. The increased processing capacity and the availability of inexpensive electronic components have contributed to the advancement of mobile robotics to a level of maturity that allows further development. This is especially true since the expected demands for service robotics are increasing.
A robot is autonomous systems used are able to sense its environment and act accordingly to achieve the goals. The main defining characteristic of an autonomous robot is the ability to act on their own decision, and not through the control of a human being (Mataric, 2007).
Navigation is the mechanism in a precise position to identify, plan and follow a path. In robotics, navigation refers to the technique of a robot made its way into the environment (Mataric, 2007) and is a common need and a requirement for almost all mobile robots.
Robot navigation is a vast and can be divided into subcategories for a better understanding of the issues. Leonard and Durrant-Whyte, 1991 outlines the general problem of navigation of mobile robots to three questions, each on a sub-category:
• Where am I?
© This
item
is protected
by original
copyright
2
This issue is the problem of the location can be express as follows: A robot is an unknown position in environment in which it has a map. It "sees" on its position, and based on the observations must infer the place on the map where it could be located (Guibas and Motwani, 1995).
• Where do I go?
The assignment problem consists of a robot living in an unfamiliar environment that has no map, and navigating through it allows the creation of a map display. The robot must identify the specific characteristics of the landmarks of the environment, to recognize that the obstacles are.
• How to get there?
The problem of path planning indicates a general desired to find paths between different locations in an environment based on objective and constraints.
One of the main drivers of the market for robotic automation service is the inner core. As the 2005 World Robotics surveys prepared by the Economic Commission for Europe (ECE) (International Federation of Robotics, 2005) - estimated that the projected sales of domestic robots for the next period 2004-2007 to 4.5 million units. For the same period, the survey also reports a similar trend also in robotics solution for professional use.
A figured 50 thousand the number of new facilities. Robotics professional applications with strong growth include underwater systems, medical systems, defense and rescue and security applications.
The world of robotics is one of the most interesting areas that have gone through constant innovation and evolution. Robotics is interdisciplinary and has become increasingly a part of our lives. Many reasons justify this sudden increase in the use of
© This
item
is protected
by original
copyright
3
robotics. Among those is the quest for increase productivity, the transfer of dangerous and laborious tasks from man to machine, as well as improving quality of life (International Federation of Robotics, 2005). The increase is also in part attributed to the international climate and the need for improving security of airports, public institutions, and private facilities such as factory and utility plants.
Autonomous navigation is the most important topic of study periods of artificial intelligence, various approaches have been tried to solve navigation problems (Brooks, 1986). The researchers have done studies to both holonomic and nonholonomic mobile robots. Autonomous navigation is related to the ability of a mobile robot to move in an environment that is available to achieve a goal, without interacting with humans. The mobile robot is guided by the information obtained during the online navigation is running.
To do this task requires a different ability to perform actions that lead to goal achievement.
A mobile robot, competent to avoid contact with objects, traveling without hitting things, exploring the world, places to see in the distance and voice seem to reach for them, building the environment map and plan routes from one place to another. The system is in its surroundings. It is directly related to the problem domain through sensors and effectors.
The system can change and the effect of its environment through effectors reacts instantly.
The problem domain can be a dynamic environment and the system can react in a limited time. The system environment is a complex real-world environment. No assumption is made for the environment. The system is fully autonomous. It must monitor the problem domain, the real world and determine what the problem is solved, and how to solve it.
Moreover, the system must handle multiple issues simultaneously.
© This
item
is protected
by original
copyright