OPTIMAL CONTROL OF AUTONOMOUS UNDERWATER VEHICLE (AUV) USING GENETIC ALGORITHMS
LEE HUEY YEE
This report is submitted in partial fulfilment of the requirements for the award of Bachelor of Electronic Engineering (Computer Engineering) With Honours
Faculty of Electronic and Computer Engineering Universiti Teknikal Malaysia Melaka
April 2010
ii
UNIVERSTI TEKNIKAL MALAYSIA MELAKA
FAKULTI KEJURUTERAAN ELEKTRONIK DAN KEJURUTERAAN KOMPUTER
BORANG PENGESAHAN STATUS LAPORAN
PROJEK SARJANA MUDA II
Tajuk Projek : OPTIMAL CONTROL OF AUTONOMOUS UNDERWATER VEHICLE USING GENETIC ALGORITHMS
Sesi Pengajian : 2009/2010
Saya Lee Huey Yee
mengaku membenarkan Laporan Projek Sarjana Muda ini disimpan di Perpustakaan dengan syarat-syarat kegunaan seperti berikut:
1. Laporan adalah hakmilik Universiti Teknikal Malaysia Melaka.
2. Perpustakaan dibenarkan membuat salinan untuk tujuan pengajian sahaja.
3. Perpustakaan dibenarkan membuat salinan laporan ini sebagai bahan pertukaran antara institusi
pengajian tinggi.
4. Sila tandakan ( √ ) :
SULIT*
(Mengandungi maklumat yang berdarjah keselamatan atau kepentingan Malaysia seperti yang termaktub di dalam AKTA RAHSIA RASMI 1972)
TERHAD* (Mengandungi maklumat terhad yang telah ditentukan oleh organisasi/badan di mana penyelidikan dijalankan)
TIDAK TERHAD
Disahkan oleh:
__________________________ ___________________________________
(TANDATANGAN PENULIS) (COP DAN TANDATANGAN PENYELIA)
Alamat Tetap:
17-11, TAMAN PERMATA, JALAN HAJI JAIB, 84000, MUAR, JOHOR
“I hereby declare that this report is the result of my own work except for quotes as
cited in the references”
Signature : ……….
Author : Lee Huey Yee
Date : ……….
“I hereby declare that I have read this report and in my opinion this report is
sufficient in terms of scope and quality for the award of Bachelor of Electronic Engineering (Computer Engineering) with Honours”
Signature : ………..
Supervisor’s Name : Madam Wong Yan Chiew
Date : ………..
Special dedicated to my beloved parents, family, lecturers and fellow friends, who had strongly encouraged, help and supported me in my entire journey of learning.
ACKNOWLEDGEMENT
Firstly, thanks to my family who are always supportive upon assisting me in completing my final year project and the thesis. Thanks for their understanding and endless love through the duration of my studies.
Secondly, I am heartily thankful to my supervisor, Madam Wong Yan Chiew, who was abundantly helpful and offered invaluable assistance support and guidance. Also thanks for her encouragement, and support from the initial to the final level enabled me to completing my final year project and my thesis.
Next, deepest gratitude and appreciations also to Mr. David Yap and Mr. Sani Irwan Bin Md. Salim who are always helpful when needed. Without their knowledge and assistance, this project would not have been successful.
Lastly, special thanks also to all my graduate friends, especially group member Tan Chong Kai and Tam Wei Ee for sharing the literature and invaluable assistance. I offer my regards and blessings to all of those who supported me in any respect during the completion of the project.
ABSTRACT
This thesis describes the optimal control of autonomous underwater vehicle (AUV) with Genetic Algorithms (GA) Optimization. Due to the harsh and unstable condition of underwater environment, the demand of AUV in underwater exploration field is increasing rapidly.
AUV use in this project is low cost, small and light. Thus, it is more unstable compare to other huge sized AUV. Its stability is easily affected by several factors, such as underwater wave current and other unpredicted underwater condition. As a result, the process of capturing data is more difficult and the quality of data obtained is low and inaccurate.
. Objective in this project is to overcome the current weaknesses, by implementing GA in Matlab environment for stability control and obstacle avoidance purpose. Genetic algorithm is a search technique used in computing to find exact or approximate solutions to optimization and search problems. Besides, fitness functions are developed in order to optimize the movement of AUV.
Initially, analysis of the fitness function developed is done by using some data create manually. Data generated from the sensors will be fed to GA and applied it into fitness functions. The best fitness value will be fed back to AUV in order to control the motors propulsion force.
By implementing GA, AUV able to maintain its stability, avoid obstacles and also travels at the certain distance from the seabed. The fitness functions of the stability problem and simulation results are presented in this thesis.
ABSTRAK
Tesis ini membahaskan kawalan optimum kenderaan bawah air autonomi (AUV) dengan Algoritma Genetik (GA) Optimasi. Oleh kerana keadaan yang keras dan tidak stabil di persekitaran bawah air, permintaan AUV dalam bidang eksplorasi bawah air meningkat dengan cepat.
Disebabkan penggunaan AUV dalam projek ini adalah kos rendah, kecil dan ringan. Jadi, perbandingan dengan AUV lain yang besar, kestabilannya adalah mudah dipengaruhi oleh beberapa faktor, seperti gelombang air dan keadaan bawah air lain yang tidak dijangkakan. Akibatnya, proses penggambilan data adalah lebih sukar dan juga tidak tepat.
Objektif projek ini adalah untuk mengatasi kelemahan AUV dengan menerapkan GA di lingkungan Matlab untuk pengendalian kestabilan dan tujuan mengelakkan rintangan. Algoritma genetik adalah teknik carian yang digunakan dalam komputasi untuk mencari atau anggaran penyelesaian yang tepat untuk optimasi dan masalah carian. Selain itu, fungsi kecergasan dikembangkan untuk mengoptimumkan pergerakan AUV.
Pada awalnya, analisis fungsi kecergasan yang diujikan dengan menggunakan beberapa data yang dibuat secara manual. Data dihasilkan dari sensor akan diberi kepada GA dan diterapkan ke dalam fungsi kecergasan. Nilai fitness terbaik akan dikembalikan kepada AUV untuk mengawal kekuatan penggerak motor.
Dengan menerapkan GA, AUV mampu menjaga kestabilan, mengelakkan rintangan dan juga bergerak pada jarak tertentu dari dasar laut.
F
ungsi kecergasan dan hasil simulasi dibincangkan dalam tesis ini.TABLE OF CONTENTS
CHAPTER TITLE PAGES
PROJECT TITLE i
DECLARATION OF THE PROJECT STATUS ii
DECLARATION iii
SUPERVISOR APPROVAL iv
DEDICATION v
ACKNOWLEDGEMENT vi
ABSTRACT vii
ABSTRAK viii
TABLE OF CONTENTS x
LIST OF TABLE xiv
LIST OF FIGURE xv
LIST OF ABBREVIATION xvii
LIST OF APPENDIX xviii
I INTRODUCTION
1.0 Introduction 1
1.1 Background 1
1.2 Problem Statement 2
1.3 Objective 3
1.4 Scope 4
1.5 Important of Project 4
1.6 Report Layout 5
II LITERATURE REVIEW
2.0 Introduction 6
2.1 Autonomous Underwater Vehicle 7
2.2 Genetic Algorithm 8
2.2.1 Genetic Algorithm Overview 9
2.2.2 Search Space 9
2.2.3 Selection Stage 11
2.2.4 Crossover Stage 12
2.2.5 Mutation Stage 14
2.2.6 Differences between Genetic Algorithm and Traditional Methods
16
2.2.7 Comparison with Other Methods 16
2.2.7.1 Neural Network 17
2.2.7.2 Random Search 17
2.2.7.3 Gradient Methods 17
2.2.7.4 Iterated Search 18
2.3 Matlab 18
2.3.1 The Matlab GA Toolbox 19
2.3.2 Data Structures 20
2.3.3 Toolbox Structure 20
2.3.3.1 Population Initialization 20
2.3.3.2 Fitness Assignment 22
2.3.3.3 Selection Functions 23
2.3.3.4 Reproduction Operators 24
2.3.3.5 Mutation Operators 25
2.3.3.6 Crossover Operators 26
2.3.3.7 Migration Options 27
2.3.3.8 Algorithm Settings 28
2.3.3.9 Hybrid Function Options 28 2.3.3.10 Stopping Criteria Options 29
2.3.3.11 Plot Options 30
2.3.3.12 Output Function Options 31 2.3.3.13 Display to Command Window Options 32 2.3.3.14 User Function Evaluation 33
2.4 Summary 33
III METHODOLOGY
3.0 Introduction 34
3.1 Flow Chart Diagram 34
3.2 Block Diagram of the Project 36
3.3 Summary 39
RESULT
4.0 Results 40
4.1 Structure of AUV 41
4.2 Results Based On Accelerometer 42
4.3 Results Based On Sonar Sensors 50
4.4 Results Based On Accelerometer And Sonar Sensors 58
V VALIDATION
5.0 Introduction 60
5.1 Experiment 1: Maintain A Constant Distances From The Surface
61
5.2 Experiment 2: Obstacles Avoidance 66
VI CONCLUSION 70
REFERENCES 72
APPENDIX 74
LIST OF TABLE
NO. TITLE PAGES
4.1 Position of AUV 44
5.1 Parameters of the experiments 61
5.2 Fitness values of GA based on sensors data 62
5.3 Overall movement of AUV 63
5.4 Speed of motor diverse from constant speed 64
5.5 Fitness values of GA based on sensors data 67
5.6 Overall movement of AUV 67
5.7 Angle of AUV to be torque 68
LIST OF FIGURE
NO. TITLE PAGES
2.1 Example of Roulette Wheel 11
2.2 Example of Genetic Crossover 13
2.3 Example of Genetic Mutation 14
2.4 Genetic Algorithm Architecture 15
2.5 GA Tool Box 19
2.6 Population Option 21
2.7 Fitness Scaling Options 22
2.8 Selection Options 23
2.9 Reproduction Options 24
2.10 Mutation Function Options 25
2.11 Crossover Function Options 26
2.12 Migration Options 27
2.13 Algorithm Settings 28
2.14 Hybrid Function Options 29
2.15 Stopping Criteria Options 30
2.16 Plot Options 31
2.17 Output Function Options 32
2.18 Display To Command Window Options 32
2.19 User Function Evaluation Options 33
3.1 Flow Chart Diagram 35
3.2 Overview of Connection Between AUV And GA 36
3.3 Example of .Mat File 37
3.4 Options of Parameter 37
3.5 Constraints 38 3.6 Fitness Function And Number of Variable Column 38
4.1 Prototype of AUV 41
4.2 Data of Sensors Shown In .Mat File of MATLAB 42
4.3 Axes Plane of AUV 43
4.4 Position of AUV 43
4.5 Motor Movements of AUV Based On X Axis 47
4.6 Motor Movements of AUV Based On Y Axis 48
4.7 Motor Movements of AUV Based On Z Axis 49
4.8 Final Movements of Motors Based On Accelerometer 50
4.9 Motor Movements of AUV Based On Left Sonar 53
4.10 Motor Movements of AUV Based On Right Sonar 54
4.11 Motor Movements of AUV To Maintain The Constant Depth 56 4.12 Final Movements of Motors Based On Sonar Sensors 57 4.13 Final Movements of Motors Based On Combination of
Accelerometer And Sonar Sensors
59
5.1 Randomly Generated Landscape 61
5.2 Path of AUV 64
5.3 Path of AUV After Optimized By GA 65
5.4 Randomly Generated Obstacles 66
5.5 Path of AUV 68
5.6 Path of AUV After Optimized By GA 69
xvii
LIST OF ABBREVIATION
AUV - Autonomous Underwater Vehicle
GA - Genetic Algorithms
MATLAB - Matrix Laboratory DNA - Deoxyribonucleic acid
xviii
LIST OF APPENDIX
NO. TITLE PAGES
A Get Data File 75
B Main File 76
C Accelerometer Main File 77
D Accelerometer Axis File 79
E Accelerometer Fitness Function File 80
F Sonar Sensor Main File 81
G Sonar Sensor Movement File 83
H Sonar Sensor Fitness Function File 84
I Journal Under Review – Development of Genetic Algorithms In Autonomous Underwater Vehicle
85
J Journal Under Review – Orientation Control of AUV Using Genetic Algorithms
98
K Optimal Control Of Autonomous Underwater Vehicle By Genetic Algorithms
1
CHAPTER I
INTRODUCTION
1.0 Introduction
Chapter one is discuss about the background, problems statement, objectives, scope and important of the projects. For background, the basic idea of Autonomous Underwater Vehicle (AUV) and Genetic Algorithm (GA) is introduced. Next, the problem statements faced in this project is clarified. Furthermore, based on the problem statement, the objectives and scope of the project is set and indentified. Lastly, the important of this project is discussed.
1.1 Background
Autonomous Underwater Vehicle (AUV) is a type of underwater robotic device which can drive through the underwater propulsion system without any human controls. It is self-piloted where it is using the feedback received from the surrounding in order to determine its actions and movement during operation.
2
vast solution set. Bad proposals do not affect the end solution negatively as they are simply discarded. The inductive nature of the GA means that it doesn't have to know any rules of the problem - it works by its own internal rules. This is very useful for complex or loosely defined problems.
1.2 Problem Statement
The Autonomous Underwater Vehicle (AUV) in this project is low cost, small and light; it is more unstable compare to other huge sized AUV. Since it is a light-weight type AUV, its stability is easily affected by the propagation of wave underwater and the force of wave will make it out of course. Furthermore, its stability is also easily affected by several factors where they are unpredicted such as sea creatures and earthquake. As a result, the process of capturing data is more difficult and the quality of data obtained is low and inaccurate. Therefore, GA which is an adaptive method needed to be study and applied in the Matlab environment to solve the search and optimization problems.
Besides, sensitivity of AUV can be increased by increasing number of sensors; therefore, there is a lot of sensor data needs to analyze and optimize on real time simulation. These sensors need to process in order to produce corresponding output and subsequently control the movement of AUV. As a result, fitness functions of GA are needed to develop and apply in AUV. Subsequently, the best fitness value obtained from the fitness functions will be used to optimize the movement of AUV.
3
1.3 Objectives
In this project, there are four objectives are stated for the achievement of the project.
i. To study Genetic Algorithm
ii. To develop Genetic Algorithm in Matlab environment
iii. To apply fitness function in AUV, in order to optimize its movement iv. To control the stability of AUV by analyzing data from sensors
The main objective of this project is to study Genetic Algorithm (GA) in order to apply in AUV. Therefore, basic model and elements of GA will be understood and analyzed. Basically, GA contains of three main stages, which are selection, crossover, and mutation.
Secondly, Matlab environment is used in order to develop the GA. Using Matlab, it has the toolbox that support GA and very suitable for beginner to study the process and flow of GA.
Thirdly, the fitness function of GA is required to apply in AUV. The development of fitness function for stability optimization is first undergoes and the final best fitness value is integrated into the AUV.
4
1.4 Scope
The scope of this project is using GA as the controller of AUV in order to
control AUV’s stability. Moreover, the implementation of GA is developed in
Matlab environment with the aid of GA Tool as fundamental tool to further understand the characteristic of GA.
Furthermore, optimization of a group of sensors data that feedback from AUV is undergoes through GA analysis in Matlab. After the analysis, the result will be perform as the optimized output to control the movement and position of AUV back to its stable state.
Besides that, the development of the fitness function for stability optimization and obstacles avoidance is carry out using Matlab. Eventually, the best fitness function will be used and implemented in GA for stability control and obstacle avoidance for AUV.
1.5 Important of Project
The important of project is the implementation of GA in Matlab environment. By using the GA concept, AUV always can be optimized in balance position and will not crash onto obstacles. Through GA, variety of sensors data can be analyzed and optimized in real time simulation.
This project also contributes to provide the solution to the stability control and obstacles avoidances problem by implementing GA in AUV. Sensors data from AUV will always being optimized and feedback to AUV for further processes.
5
1.6 Report Layout
This thesis consists of six main chapters where all the chapters are essential to describe all the architecture and functionality of the project itself. Chapter I describes briefly about the project’s introduction. It is also discuss about the
objectives, scopes of project and project application.
Chapter II describes about the literature review that consists of the background of the project. It also describes about the same projects that have been done of previous person and it is more to make research on different, advantages and disadvantages of previous project.
6
CHAPTER II
LITERATURE REVIEW
2.0 Introduction