obstacle avoidance robot applying fuzzy control 3.2 block diagram of fuzzy based obstacle avoidance

Download OBSTACLE AVOIDANCE ROBOT APPLYING FUZZY CONTROL 3.2 Block diagram of fuzzy based obstacle avoidance

If you can't read please download the document

Post on 31-May-2020

0 views

Category:

Documents

0 download

Embed Size (px)

TRANSCRIPT

  • OBSTACLE AVOIDANCE ROBOT APPLYING FUZZY CONTROL SYSTEM

    LIEW CHIA WOON

    A project report submitted in partial

    fulfillment of the requirement for the award of the

    Master of Electrical Engineering

    Faculty of Electrical and Electronic Engineering

    Universiti Tun Hussein Onn Malaysia

    JULY, 2014

  • iv

    ABSTRACT

    This project primarily addresses the design and implementation of fuzzy logic based

    controller for obstacles avoidance robot. Some techniques, sensors and controller

    have been applied to fulfill the requirements of the robot. The robot able to interact

    with an unknown environment using a reactive strategy determined by the sensors

    information. The obstacle avoidance controller is a two inputs and two outputs

    system. The inputs are two proximity measurement of the obstacles distance, and the

    outputs are the velocities of the two wheels. The robot is driven by two independent

    DC motors. The ultrasonic sensors are mounted at left, front and right side of the

    mobile robot. It can detect the obstacles within the range 3 cm to 300 cm. The

    kinematic model was developed to control the movement of the robot’s wheels. The

    detection of the obstacles by the sensors activates the controller which simply

    attempts to avoid the robot with the obstacles. Once the robot avoids the obstacles,

    the robot will keep sense for the new environment. Based on these signals, the

    controller control the velocity of left and right wheels thus making the robot to move

    forward and turning at the same time, i.e., the robot avoid the obstacle by turn left

    with left motor velocity is 6.57 cm/s, right motor velocity is 8.29 cm/s and angular

    velocity is 0.066154 rad/s when the obstacle detected from left sensor is 100 cm,

    right sensor is 100 cm and front sensor is 50 cm. Different obstacles distance

    orientation also been tested and the robot response is working as expected.

  • v

    ABSTRAK

    Projek ini untuk menyampaikan reka bentuk dan pelaksanaan pengawal fuzzy logic

    untuk mengelak halangan robot. Beberapa teknik, pengesan dan pengawal telah

    digunakan untuk memenuhi keperluan robot ini. Robot ini boleh berinteraksi dengan

    persekitaran yang tidak diketahui dengan menggunakan strategi reaktif yang

    ditentukan oleh pengesan. Kawalan fuzzy logic sebagai kawalan pintar digunakan

    untuk robot bagi mengelakkan halangan-halangan. Pengesan ultrasonik digunakan

    untuk mengesan halangan-halangan dan sebagai pemboleh ubah bagi masukan

    pengawal. Ia boleh mengesan halangan-halangan dalam lingkungan 3 cm ke 300 cm.

    Model kinematik telah dibangunkan untuk mengawal pergerakan bagi roda robot.

    Pengawal mengawal pergerakan roda kiri, roda kanan dan sudut pusingan dalam

    masa yang sama berdasarkan isyarat dari masukan pengesan, iaitu robot

    mengelakkan halangan dengan pusing ke kiri dengan halaju motor kiri 6.57 cm/s

    halaju motor kanan 8.29 cm/s dan halaju sudut 0.066154 rad/s apabila halangan

    dikesan daripada pengesan kiri adalah 100 cm, pengesan kanan 100 cm dan pengesan

    depan 50 cm. Halangan dengan orientasi jarak yang berbeza telah diuji dan tindak

    balas robot berfungsi seperti yang dijangkakan.

  • vi

    CONTENTS

    TITLE i

    DECLARATION ii

    ACKNOWLEDGEMENT iii

    ABSTRACT iv

    CONTENTS vi

    LIST OF TABLES ix

    LIST OF FIGURES x

    LIST OF SYMBOLS AND ABBREVIATIONS xiii

    LIST OF APPENDICES xiv

    CHAPTER 1 INTRODUCTION 1

    1.1 Project Background 1

    1.2 Problems Statement 2

    1.3 Project Objectives 3

    1.4 Project Scopes 3

    1.5 Thesis Outline 3

    CHAPTER 2 LITERATURE REVIEW 5

    2.1 Introduction 5

    2.2 Description of Previous Methods 5

    2.3 Fuzzy Control System 8

  • vii

    2.4 Kinematics Model 11

    2.5 Typical Mobility Configurations 14

    2.5.1 Differential Drive 14

    CHAPTER 3 METHODOLOGY 16

    3.1 Project Methodology 16

    3.2 Fuzzy Controller Design and Modeling 16

    3.2.1 Obstacle Avoidance 17

    3.2.2 Robot Behavior 19

    3.3 Operation of the Robot 24

    3.4 Hardware Components 26

    3.4.1 Ultrasonic Sensor 26

    3.4.2 dsPIC30F4011 Microcontroller 30

    3.4.3 Motor Driver MC33886 31

    3.4.4 DC Motor 32

    3.4.5 Quadrature Encoder 33

    3.5 Software Development 35

    CHAPTER 4 DATA ANALYSIS AND RESULTS 37

    4.1 Simulink Model of the Robot 37

    4.2 FIS Editor 38

    4.3 Matlab Simulink Result 43

    4.4 Robot System 50

    4.4.1 Actual Response of the Robot 52

  • viii

    4.4.2 Behavior of the Robot during Avoiding

    the Obstacles 53

    4.5 Limitations 58

    CHAPTER 5 DISCUSSION AND CONCLUSIONS 59

    5.1 Conclusion 59

    5.2 Recommendation for Future Work 60

    REFERENCES 61

    APPENDIX 64

    VITA

  • ix

    LIST OF TABLES

    3.1 Fuzzy rule for velocity of the left motor 18

    3.2 Fuzzy rule for velocity of the right motor 19

    3.3 List of rules for the obstacle avoidance 19

    3.4 Parameters for object distance 20

    3.5 Parameters for object difference 21

    3.6 Parameters for left motor 21

    3.7 Parameters for right motor 21

    3.8 Rising and falling edges of the encoder’s outputs 34

    4.1 Simulation result from the Matlab Simulink model 43

  • x

    LIST OF FIGURES

    2.1 Fuzzy Logic Controller 8

    2.2 Sugeno rule operator 9

    2.3 The example of fuzzy tipping model developed

    by using Sugeno system. 10

    2.4 Kinematics model of the robot 11

    2.5 A typical differential-drive mobile robot (robot

    view) 14

    3.1 Block diagram of fuzzy behaviour robot control

    architecture 17

    3.2 Block diagram of fuzzy based obstacle avoidance

    robot control behaviour architecture 18

    3.3 Rules viewer for the membership functions 22

    3.4 Flow chart of robot operation 25

    3.5 Design concept 26

    3.6 Sensors location 27

    3.7 Ultrasonic sensor HC-SR04 27

    3.8 General diagram of ultrasonic sensor 28

    3.9 Timing diagram of HC-SR04 28

    3.10 Ultrasonic working principle 29

    3.11 dsPIC30F4011 package layout and pin

    configuration 30

    3.12 dsPIC30F4011 pin assignment 30

    3.13 33886 simplified application diagram 31

    3.14 Truth table of MC33886 32

    3.15 DC Motor 32

    3.16 Quadrature encoder output 34

    3.17 MPLAB X IDE layout 35

    3.18 PIC kit 2 Programmer 36

  • xi

    4.1 Simulink model of the robot 37

    4.2 FIS Editor 38

    4.3 Membership function for object distance 39

    4.4 Membership function for object different 39

    4.5 Membership function of Sugeno type for left

    motor output 40

    4.6 Membership function of Sugeno type for right

    motor output 40

    4.7 Rule editor 41

    4.8 FIS surface view 41

    4.9 Resultant left motor and right motor velocities in

    RuleView of Sugeno FIS 42

    4.10 The sensors inputs of case 1 44

    4.11 Simulation result when obstacle detected at

    100 cm from left sensor, 100 cm from right

    sensor, and 50 cm from right sensor (case 1) 44

    4.12 The sensors inputs of case 2 45

    4.13 Simulation result when obstacle detected at 50 cm

    from left sensor, 100 cm from right sensor, and

    100 cm from right sensor (case 2) 46

    4.14 The sensors inputs of case 3 46

    4.15 Simulation result when obstacle detected at

    100 cm from left sensor, 100 cm from right

    sensor, and 100 cm from right sensor (case 3) 47

    4.16 The sensors inputs of case 4 47

    4.17 Simulation result when obstacle detected at

    100 cm from left sensor, 100 cm from right

    sensor, and 30 cm from right sensor (case 4) 48

    4.18 The sensors inputs of case 5 48

    4.19 Simulation result when obstacle detected at 30 cm

    from left sensor, 100 cm from right sensor, and

    100 cm from right sensor 49

    4.20 Main components of the robot 50

    4.21 Top view of the robot 51

  • xii

    4.22 Two wheels robot with ultrasonic sensors 51

    4.23 Experiment environment of obstacle avoidance

    robot 52

    4.24 Robot moving forward when the front direction is

    clear 53

    4.25 Robot turning right when left and front obstacle

    detected 53

    4.26 Robot moving forward when front sensor is clear 54

    4.27 Robot turns right when obstacle dete

Recommended

View more >