Studying a Flying Robot for Path Planning and

1 downloads 0 Views 8MB Size Report
instead of Connect option, then the APM firmware will be downloaded completely and ...... Available on: http://www.novatel.com/support/ [Accessed: 10/03/2015].
Republic of Iraq Ministry of Higher Education & Scientific Research University of Baghdad Al –Khwarizmi College of Engineering

Studying a Flying Robot for Path Planning and Scanning A Thesis Submitted to the Department of Mechatronics Engineering, Al-Khwarizmi College Of Engineering, University of Baghdad in Partial Fulfillment of the Requirements for the Degree of Master of Science in Mechatronics Engineering

By: Ihab Abdulrahman Sattam BSc. in Mechatronics Engineering 2012

Supervised By: Dr. Wael R. Abdulmajeed Dr. Omar Ali Athab

2015

We certify that the thesis entitled (Studying a Flying robot for Path Planning and Scanning ) was carried out completely under our supervision at the University of Baghdad, Al–Khwarizmi College of Engineering,

Mechatronics

Engineering

Department

in

partial

fulfillment of the requirements for the Degree of Master of Science in Mechatronics Engineering.

Signature: Name: Dr. Wael R. Abdulmajeed Date:

/ /2015

Signature: Name: Dr. Omar Ali Athab Date:

/ /2015

‫جمهىريت العراق‬ ‫وزارة التعليم العالي والبحث العلمي‬ ‫جامعت بغذاد‬ ‫كليت الهنذست الخىارزمي‬

‫دراست روبىث طائر لتخطيط المسار والمسح الجىي‬ ‫رطالة هقذهة‬ ‫الى قظن هنذطة الويكاتزونكض في كلية الهنذطة الخىارسهي‪ ،‬جاهعة بغذاد‬ ‫كجشء هن هتطلبات نيل درجة هاجظتيز علىم في هنذطة الويكاتزونكض‬

‫هن قبل‬ ‫ايهاب عبذالزحون صطام‬ ‫بكالىريىص علىم في هنذطة الويكاتزونكض‬ ‫‪2102‬‬

‫بإشزاف‬ ‫د‪ .‬وائل رشيذ عبذالوجيذ‬ ‫د‪ .‬عوز علي عذاب‬ ‫‪2102‬‬

Acknowledgment First I would like to thank ALLAH For helping me in my life, study and everything. I would like to give my deep thanks and appreciation to my Supervisors Dr. Wael R. Abdulmajeed and Dr. Omar Ali Athab for their guidance, help, advice and patience with me through this work. Members of Mechatronics Engineering Department are greatly acknowledged. I want to thank my father and mother for being the cause of what I reach to now. I am indebted to Mr. Kareem A. Abdul Kareem and Mr. Scott Cuppello for their help in my work. Finally, Special thanks to all my friends for their help and cooperation.

Ihab A. Sattam

Dedication

I would like to dedicate this thesis:

To my father and mother,

To my brothers and sisters,

And to all my friends,

For their Love, support and encouragement

‫بسم اهلل الرمحن الرحيم‬

‫وما أوتيتم من العلم اال قليال‬ ‫صدق اهلل العظيم‬

‫ألخالصة‬ ‫تطبيقات الطائرات بدون طيار اصبحت منتشرة بشكل واسع خصوصا في المجال العسكري اماا فاي المجاال‬ ‫المدني فاستخدامها قليل جدا رغم فائدتها الكبيرة في هذا المجال‪.‬‬ ‫الفكاارة ااساسااية ماان ااطروحااة هااو اسااتخدام الطااائرة باادون طيااار ل غاارا المدنيااة فااي المسااج الج اوي‬ ‫لطوبوغرافيا اار ‪ .‬المركبة المستخدمة هي الهليكوبتر ذات ااربع ماراو‪ ..‬وهاي اباارة اان روباوت‬ ‫اربع مراو‪ .‬يمكن السيطرة اليه‪.‬‬ ‫المساايطر المسااتخدم هااو ‪ ,)APM 2.6‬البرناااما المسااتخدم لااه ياادا ‪ )Mission Planner‬ماان شااركة‬ ‫‪ )3DRobotics‬وهو من البراما المتوفرة ال اانترنت والتي ا تتطل ارقام سرية‪.‬‬ ‫فكرة البحث متكونة من جزئيين‪ .‬الجزء ااول هاو برمجاة الروباوت الا مساار معاين للتحليات بادون تحكام‬ ‫يدوي لتغطياة المسااحات الماراد معاينتهاا بانت اام‪ .‬الروباوت محمال بكااميرا جهااز هااتن والهادن منهاا هاو‬ ‫تسجيل فديو للمنطقة التي يتم مسحها‪.‬‬ ‫الجزء الثاني من ااطروحة هو تحويل هذا الفيديو ال صور واخذ الصور المفيدة وادخالهاا بباراما معالجاة‬ ‫لكي يتم تجيعها معا ضمن صورة جوية واحدة تضم المساحة التي تم معاينتها بالروبوت‪.‬‬ ‫الصورة الجديدة تم اخذ مقياس رسم لها لحسا ااطوال والمساحات ألشياء موجودة داخل الصورة كأطوال‬ ‫بنايات او الشوارع وتم قياس اابعاد الحقيقة لهذه ااشياء وكانت نسبة الخطأ لم تتجاوز ‪ 7.7‬م‪.‬‬ ‫كمااا تاام اخااذ احااداثيات الموقااع لعاادد ماان النقاااط الموجااودة ال ا الصااور الجويااة الجدياادة باسااتخدام برناااما‬ ‫‪ )ArcGIS‬وبنفس الوقت تم حسا ااحداثيات الحقيقية لنفس النقاط ال ار الواقع باستخدام جهاز ‪GPS‬‬ ‫لمعرفة نسبة الخطأ الموجودة والتي كانت ا تتجاوز ‪ 5‬متر وهي ضمن نسبة الخطأ المسمو‪ .‬االميا الذي‬ ‫مقداره ‪ 6‬متر‪.‬‬

Abstract Unmanned Aerial Vehicle (UAV) became widely used in many applications especially in military applications. On the other hand the use of the UAV in the civilian application is not as wide as the military application in spite of its very good usefulness in this field. The basic idea of this thesis is to use the UAV in the civil application in aerial surveying for different topographical ground areas. The UAV in this thesis is represented by quadcopter programmed by software called mission planner and controlled by APM2.6 as autopilot. Both the controller and the software from 3DRobotics. The APM2.6 is usually used for Outdoor Applications. Mission Planner has access to Google Map in order to Upload the Path desired for the robot. The work in this thesis is divided into two parts. The first part is to make a path planning for the robot. A camera is attached to the quadcopter in order to record the area the Robot flies above. The second part is to make an aerial image that cover the whole area. This captured aerial image was compared with the google satellite image since the Google map is old image and it is very expensive to buy the updated Google image. The captured aerial image was used to measure lengths of parameters on the images. The captured images shows that it can be dependent to measure the lengths with error doesn`t exceed 3m . Also a GPS location was taken from points on the aerial image using ArcGIS program. The Captured aerial images can be used to extract GPS location for specific points including the new points (recently altered) that do not exist in the Google Satellite images, but with relative error in the range (0.1 - 5) meters.

CONTENTS Supervisor certification Acknowledgment Dedication Abstract Contents List of Figures List of Table List of Symbols List of Abbreviations

I VI IX X X

CHAPTER ONE: INTRODUCTION 1.1 UAV and quadcopter……………………………………………….1 1.2 Quadcopter coordinate system……………………………………..1 1.2.1 Rotation about Pitch and roll axes…………………………….2 1.2.2 Rotation about Yaw axis……………………………………....4 1.2.3 Altitude control………………………………………………..5 1.2.4 Movement of quadcopter……………………………………...5 1.3 Path Planning………………………………………………………6 1.4 Image Stitching……………………………………………….……6 1.5 Microntroller……………………………………………………….6 1.6 Ardupilot controller………………………………………………...7 1.7 Thesis outline……………………………………………………….7 CHAPTER TWO: LITERATURE REVIEW 2.1 introduction…………………………………………………………8 I

2.2 Literature survey……………………………………………………8 2.3 Concluding marks…………………………………………………14 2.4 research Objective…………………………………………………15 CHAPTER THREE: THEORITICAL CONSIDERATION 3.1 Introduction……………………………………………………….17 3.2 Equation of Straight Line Path……...……………………..……...17 3.3Ardupilot Mega…………………………………………………….20 3.4 Mission Planner………..………………………………………….23 3.5 Flight modes………………………………………………………25 3.6 Microsoft ICE…………………………….....................................28 3.7 Path Planning of APM2.6………………………………………...29 3.8 Global Positioning System(GPS)…………………………………31 CHAPTER FOUR: EXPERIMENTAL WORK 4.1 Introduction……………………………………………………...32 4.2 Assembling of UAV……………………………………………..32 4.2.1 UAV frame type…………………………………………….32 4.2.2 APM controller……………………………………………..34 4.3.3 RC Transmitter…………………………………………….35 4.2.4 GPS Module……………………………………………….35 4.3 Mission Planner….……………………………………………...36 4.3.1Connect APM to Computer…………………………………37 4.3.2 Connect APM to Mission Planner…………………….……38 II

4.3.3 Select the Firmware…………………………………..……39 4.3.4 Connect and Disconnect…………………………………...39 4.3.5 Calibrate The APM….…………………………………….40 4.3.6 Loading Waypoints………………………………………..44 4.4 Automatic Navigation in Quadcopter……………………………45 4.5 Stitching Images in Microsoft ICE……………………………...46 4.6 ArcGIS (Arc Geographic Information System)..………….…...50 CHAPTER FIVE: RESULT AND DISCUSSION 5.1 Introduction……………………………………………………52 5.2 Path Planning…………………………………………………..52 5.3 Comparison between Actual and desired velocity……………..55 5.4 Flying Roll, Pitch and Yaw angle readings…………………....59 5.5 Aerial flight images……………………………………………63 5.6 Comparison between the new aerial image and the Google satellite image………………………………………………………………67 5.7 Length measurements in aerial images………………………..71 5.8 Extract GPS location for specific points………………………75

CHAPTER SIX: CONCLUSIONS AND SUGGESTIONS FOR FUTURE WORKS 6.1 Conclusion………………………………………………………..81 6.2 Future Work………………………………………………………82

III

References APPENDIX A: Install and Setup the ArduPilot Mega 2 in a Quadcopter APPENDIX B: MPU-6000/MPU-6050 9-Axis Evaluation Board User Guide APPENDIX C: Atmega 2560 APPENDIX D: NEO-6 Ublox GPS APPENDIX E: Motors

IV

List Of Figures Figure No. Figure(1.1) Figure(1.2) Figure(1.3) Figure(1.4) Figure(1.5) Figure(3.1) Figure(3.2) Figure(3.3) Figure(3.4) Figure(3.5) Figure(3.6) Figure(3.7) Figure(3.8) Figure(3.9) Figure(3.10)

Description Pitch Roll and Yaw axes Rotate about the Roll axis Rotate about Pitch axis Motor spin Direction Counter Clockwise Yaw Straight Line Robot Movement in space Apm2.6 APM 2.6 Board APM2.6 Parts Mission Planner APM Mission Planner Screenshots: Flight Planner and Firmware RTL mode

Auto mode Uploading Waypoint to the APM APM2.6 RC Transmitter GPS Module Mission Planner

Pages 2 3 4 4 5 18 19 21 22 22 24 24 26 26 30

Figure(4.1) Figure(4.2) Figure(4.3) Figure(4.4) Figure(4.5)

Micro USB And MICRO USB port

36 35 35 36 37

Figure(4.6) Figure(4.7) Figure(4.8) Figure(4.9) Figure(4.10) Figure(4.11) Figure(4.12) Figure(4.13) Figure(4.14) Figure(4.15) Figure(4.16)

Com Port Number Com Port and Baud Rate Firmware Choices in Mission Planner Accelerometer Calibration Forward Position Left Position Right Position Down Position Up Position Back Position Radio Calibration

38 38 39 40 41 41 41 42 42 42 43

VI

List Of Figures Figure(4.17) Figure(4.18) Figure(4.19)

Flight Modes Change Waypoints Waypoint Management in auto

44 45 46

navigation Figure(4.20) Figure(4.21) Figure(4.22) Figure(4.23)

Complete Robot Robot Navigation Image Stitching Steps ArcMap

47 48 50 51

Figure(1) Figure(5.2) Figure(5.3) Figure(5.4) Figure(5.5)

Path for test one Test two path Path for test three Waypoint speed Flying Roll, Pitch and Yaw angle readings of test one Angle readings for test two Flying angle readings of path three Aerial image of first part of path one Aerial image of the second part of path one Aerial image of the third part of path one Aerial image of test two Aerial image of test three Test one image comparison Aerial image of test two and Google satellite image Comparison between Aerial image and Google satellite image of test three Drawing Scale of aerial image of first part of path one Drawing scale of aerial image of part 2 Drawing scale of aerial image of part 3 Drawing scale of test two aerial image

53 54 55 57 60

(Figure(5.6) Figure(5.7) Figure(5.8) Figure(5.9) Figure(5.10) Figure(5.11) Figure(5.12) Figure(5.13) Figure(5.14) Figure(5.15) Figure(5.16) Figure(5.17) Figure(5.18) Figure(5.19)

VII

61 62 64 64 65 66 67 68 69 70 71 72 72 73

List Of Figures Figure(5.20) Figure(5.21) Figure(5.22) Figure(5.23) Figure(5.24) Figure(5.25)

Drawing scale of test three aerial image Points location on aerial image of test one Aerial image of test two in ArcGIS GPS Location of points in Aerial image of test two Aerial image of test three in ArcGIS GPS Location of points in Aerial image of test three

VIII

74 76 77 78 79 80

LIST OF TABLES Table No Table 2.1 Table 4.1 Table 5.1 Table 5.2 Table 5.3 Table 5.4 Table 5.5 Table 5.6 Table 5.7

Table 5.8

Table 5.9

Table 5.10

Table 5.11

Description Summary of researches Multirotor type Actual speed and Error for test one Actual speed and Error for test two Actual speed and Error of test three Error between the length of lines in first part of test one Error of lengths in the second aerial image of path one Error of lengths in the third aerial image of path one Percentage error between some aerial image`s object length to their real length of test two error between the length of parameters on aerial image and their exact length Error between GPS location of point using ArcGIS and Exact GPS location of test one. Error between GPS location of point using ArcGIS and Exact GPS location of test two Error between GPS location of point using ArcGIS and Exact GPS location of test three

IX

Page 14 33 57 58 58 71 72 73 74

75

77

78

80

LIST OF SYMBOLS Symbol b ø

Fg

description Body coordinate system Roll angle Pitch angle Yaw angle Mass Gravity force Angular velocity of motor

LIST OF ABRIVIATIONS UAV GPS PC PSO MFI VIFS LGQ-MP RRT DOF BRM UKF MP 2D 3D PID PWM APM ALTHOLD RTL FPV

Unmanned Aerial Vehicle Global Positioning System Personal Computer Particle Swarn Optimization Micromechanical Flying Insect Virtual Insect Flight Simulator Linear Quadratic Gaussian Motion Planning Rapidly exploring Random Tree Degree of freedom Belief Road Map Unscented Kalman Filter Mission Planner Two dimension Three Dimension Proportional-Integral-Derivative Pulse Width Modulation ArduPilotMega Altitude Hold Return To Launch First Person View X

SSD ESC DC AC WMS Accel CPU ICE GIS WP

Sum of Squared difference Electronic speed Controller Direct Current Alternative Current Web Map Service Accelerometer Control Process unit Image Composite Editor Geographical Information System Waypoint

XI

CHAPTER ONE INTRODUCTION

1.1 UAV and Quadcopter [1] ‘‘Unmanned Aerial vehicles (UAV)have found potential applications in each military and civilian domains. Military applications embody border patrolling, mine detection, intelligence activity, etc., whereas civilian applications are in disaster management, bridge review, search and rescue, etc. With advances in sensing element and battery technology over the previous couple of years, UAVs

became largely accessible to

be

used in

an

exceedingly style

of applications .’’ A quadcopter consists of four motors distributed evenly along the frame.

1.2 Quadcopter coordinate system [2] ‘‘ The system used to describe the orientation of the rigid body in space uses three angles to describe. These three angles are Roll, Pitch and Yaw angles, as shown in figure (1.1) . ’’

1

Fig 1.1 Pitch, Roll and Yaw axes [2] ‘‘The roll angle describes how the tilting side to side state of the quadcopter. The rotation about the roll axis causes the sideways movement. The yaw angle describes the bearing of the quadcopter. Rotation about the yaw axis is similar to a person when s / he shakes their head to say “no”. The Pitch angle describes the quadcopter tilt forward or backward. It causes the quadcopter to move forward or backward.’’ ‘‘ It is very important to understand the quadcopter movement at flying. By adjusting the relative speeds of the motors in the right ways, also it must be considered that the rotational speed of the motors determines how much lift each prop provides. The flight controller controls the rotation of the quadcopter around any of the directional axes (roll, pitch and yaw), and makes the quadcopter gain or lose altitude .

1.2.1 Rotation about Pitch and Roll axes [2] ‘‘ In order to make the quadcopter rotate about the roll or pitch axes, the flight controller makes the motors on one side of the quadcopter spin faster than the motors on the other side. This means that one side of the quadcopter will have more lift than the other side and that causes the quadcopter to tilt.’’

2

‘‘To make the quadcopter roll right or in other word to rotate about the roll axis, the flight controller will make the two motors on the left side of the quadcopter spin faster than the motors on the right side and that will cause the left side of the quadcopter lift more than the right side which makes the quadcopter to tilt . Figure (1.2) shows the quadcopter rotation about the Roll axis.

Fig 1.2 Rotation about the roll axis [2] ‘‘The quadcopter in the same way can pitch down (rotate about the pitch axis), the flight controller will make the two motors on the back of the quads spin faster than the two motors in the front of the quads then the quads have more lift in the back which make it tilt the same way the human head tilts when looking down . Figure (1.3) shows the quadcopter rotation about Pitch axis. ’’

3

Fig 1.3 Rotation about pitch axis [2]

1.2.2 Rotation about the Yaw axis [2] ‘‘ Controlling the rotation of the quadcopter about the yaw axis is more complex than controlling its rotation about roll and pitch axes. When assembling the quadcopter it is very important to make each motor spin in the opposite direction than its neighbors as shown in the figure (1.4).

Fig 1.4 Spin direction of motors [2] ‘‘ When the quadcopter rotates about the yaw axis, the flight controller will slow down the opposite pair of the motors relative to the other pair meaning the motors number 1 and 2 spin slower than motors number 3 and 4. This means that the friction forces between the props and the air are no longer in balance and the quad rotates . ’’ 4

Fig 1.5 Counter clockwise Yaw[2].

’’

1.2.3 Altitude Control of the Quadcopter [2] ‘‘ The force of the gravity that acts on the quadcopter is equal to the mass of the quadcopter multiplied by the gravitational acceleration. The lift of the quadcopter is equal to the sum of the lift produced by the each motor. If the gravity force is equal to the lift force of the motors then the quadcopter will preserve at constant altitude.’’ ‘‘ Ascending the flight controller disrupts the balance of the quads and makes the lift produced by the quads greater than the gravity force. In the same way, descending the flight controller makes the motors lift force less than gravity force.’’

1.2.4 Quadcopter movement [2] ‘‘ Tilting the quadcopter makes it move. By tilting the quadcopter in a different direction, it can move forward, backward, left or right. When the quadcopter pitches down ( clockwise about the pitch axis) it moves forward. The reason of that is when the quadcopter is tilting, some of the lift force produced by the motors is 5

directed horizontally while normally all of the lift force is directed downward. This sideway component of the lift force pushes the quadcopter .

1.3 Path planning “Path Planning can be defined as finding a path between two points in a space, the first point is called a start configuration and the final point is called the goal configuration. “Outdoor robots can use GPS in a similar way to automotive navigation system”[3]. “An Automotive navigation system is a satellite navigation system that is designed for the use of automobiles. It uses a GPS navigation device to acquire position data to locate the user on a road in the units map database [4]. GPS is a space-based Radio positioning system that gathers techniques of computer mapping to provide three dimensional position, velocity and time information to suitably equipped users anywhere on earth [5].

1.4 Image stitching[6] ‘‘ It is an algorithm of aligning and stitching images to produce one photo with high resolution used for mapping or as a satellite photo, image stitching is widely used in computer vision.’’

1.5“Microcontroller [7]” “ Microcontroller is a small pc on one integrated circuit containing a processor core, memory, and programmable input/output peripherals. Microcontrollers are designed for embedded applications, in comparison with the microprocessors utilized in personal computers or different general purpose applications. ”’’ 6

1.6 Ardupilot controller [8] ‘‘ Ardupilot autopilot is based on Arduino boards. An open source controller which has become very popular in the last years because it is inexpensive and easily used [8].’’

1.7 Thesis Outline This thesis is constructed as follows: Chapter One : It describes the research background, introduction to the UAV robots, classification of these robots and some background on path planning , imaging , GPS and microcontrollers.  Chapter Two:- It shows some articles and theses that are related to the main objective of this thesis with an abstract that defines the major idea.  Chapter Three:- It shows the basic theory on which the following chapters are based, the main equations of the static and dynamic forces that affect the flying of the quadcopter. It also describes the electronics part of the quadcopter. And finally the software that is used to make the 3D aerial map.  Chapter Four:- It includes the experimental work for the path planning of quadcopter and how the calibration for the Robot is done.  Chapter Five:- It discusses the results obtained from the theoretical and experimental parts.  Chapter Six:- It gives some suggestions based on the conclusions to enhance the related projects in the future.

7

CHAPTER TWO LITERATURE REVIEW

2.1 Introduction “This Chapter offers a survey of the recent advances in the field of Quadcopter robot, it also offers concluding remarks for these researches and articles and the objectives of this works’.

2.2 Literature survey ‘‘There are many researches and articles that take a specific side of the quadcopter.

’ Reed Siefert Christiansen(2004) [9] Presents the design of the autopilot capable of the flying small unmanned aerial vehicle with wingspans less than 21 inches. The autopilot is extremely small and lightweight allowing to fit in aircraft of this size. The autopilot feature in an advanced, highly autonomous flight control system with auto-Launch and auto-landing algorithms. These features allow the autopilot to be operated by a wide spectrum of skilled and unskilled users. M. Egrestedt, et. al (1999) [10] investigate how to generate flight trajectories for an autonomous helicopter. The planning strategy that they propose reflect the controller architecture. They identify different flight modes such as take-off, cruise, turn and landing, which can be used to compose an entire flight path. Given a set of nominal waypoints, they generate trajectories that interpolate close to these points. The path generation was done for two cases, corresponding to two controllers that either govern the position or velocity of the helicopter. 8

W. Xu, C. et.al (2008) [11] presents a method to solve the Cartesian path planning of free-floating space robot. Firstly, they parameterize the joint trajectory using polynomial functions, and then normalize

the parameterized the trajectory.

Secondly, the Cartesian path planning is transformed into an optimization problem by integrating the differential kinematic equations. The object function is defined according to the accuracy requirement, and it is the function of parameters to be defined. Finally, they used the particle swarm Optimization(PSO) algorithm to search the unknown parameters.’

L. Schenato, et.al (2001) [12] describes the recent results on the design and simulation of flight control system for micromechanical flying insect(MFI), a 1025 mm (wingtip-to-wingtip) device which is eventually capable of the sustained autonomous flight. The biologically inspired system architecture results in a hierarchical structure of different control methodologies which give the possibility to plan complex missions from a sequence of simple flight modes and maneuvers. As a case study, a stabilizing hovering control scheme is presented and simulated with VIFS, a software simulator for the insect flight.’ ’ Duarte Lopes Figueiredo (2014) [13] test and implement an autopilot and a ground control station for an UAV that is being sponsored by LAETA (Laborat ´ orio Associado de Energia, Transportes e Aeron´ autica). The autopilot that was chosen to be implemented is the Ardupilot APM 2.6. he tested the autopilot on a rover then test it on a fixed wing plane. The results of this thesis shows the flexibility of using the autopilot in different vehicles platforms. ’ 9

R. Lampariello, et al (2003) [14] addresses the problem of motion planning for free-flying robots. Full state actuation is considered to allow for large displacements of the spacecraft. Motion planning is formulated as an optimization problem and kinematic as well as dynamic constraints are considered. The chosen optimization criteria are spacecraft actuation and final time. The proposed method allows solutions which do not require any spacecraft actuation for those end goals for which the robot motion is sufficient.’’

Ing jurgen Robmann and Malte Rast (2009) [15] developed and performed a prototypic workflow for the update of the “Virtual Forest”, a database and framework for efficient forest planning and wood mobilization, using aerial image data collected with the quadcopter AirRobot

they have integrated a software

component into VEROSIM , a software solution for virtual reality and GI-Systems, which allows the autonomous routing, flyover and imaging of a selected geographical unit, e.g. a land parcel, and the subsequent georeferenced display of the aerial images.

Xian-Zhong Gao et al (2013) [16] describe an algorithm to find the shortest path during maneuvers and to improve the performance of UAV. The shortest path for UAV during maneuvers is derived firstly by the theory of Dubins curve. Secondly, in order to improve the ability of UAV to follow the derived optimal path, a realtime path planning algorithm is designed by transforming the constraints of Dubins curve into a dynamic equation. To demonstrate the applicability and performance of the proposed path planning algorithm, two numerical examples are presented. The results show that the proposed algorithm is promising to be applied in the path planning for maneuvers of UAV 10

‘‘R. He, et. al (2008) [17] describes a motion planning algorithm for a quadrotor helicopter flying autonomously without GPS. Without accurate global positioning, the ability of the vehicle to localize itself varies across the environment, since different environmental features provide different degrees of localization. If the vehicle plans a path without regard to how well it can localize itself along that path, it runs the risk of becoming lost. They use the Belief Roadmap (BRM) algorithm , an information-space extension of the Probabilistic Roadmap algorithm, to plan vehicle trajectories that incorporate sensing. They show that the original BRM can be extended to use the Unscented Kalman Filter (UKF), and describe a sampling algorithm that minimizes the number of samples required to find a good path. Finally, they demonstrate the BRM path planning algorithm on the helicopter, navigating in an indoor environment with a laser range-finder.’’ ‘‘ M. Hehn & R. D`Andrea, (2011) [18]presents an algorithm that allows the calculation of flight trajectories for quadcopter. Trajectory feasibility constraints regarding the vehicle dynamics and input constraints are derived. They are then used in the planning algorithm to guarantee the feasibility of generated trajectories. The translational degrees of freedom of the quadcopter are decoupled, and timeoptimal trajectories are found for each degree of freedom separately. The trajectory generation is fast enough to be performed online. Control inputs are calculated from the generated trajectory, and used to achieve closed-loop control similar to model predictive control. The trajectory generation and tracking performance is demonstrated in the ETH Zurich Flying Machine Arena testbed. Experimental results show good performance, with unmodeled aerodynamic effects causing trajectory deviations when decelerating from high speeds. Development potential 11

for the future is highlighted, focusing on improving the performance and correcting for aerodynamic effects.’’

L. Techy, et. al (2010) [19] present a simple method for generating candidate minimum time paths from a given initial point and heading to a given final point and headings. They model the vehicle as a particle that travels in the horizontal plane at a constant speed relative to the ambient flow. The vehicle may turn in either direction, subject to symmetric constraints on the turn rate and the turn acceleration.’ ’ Dong Jia and Juris Vagners (2004) [20] Applied EvolutionaryComputation (EC) Technique to compute the near path for Unmanned aerial vehicle (UAV) . The parallel evolution technique provides more exploration capability to planners and significantly reduces the probability that planners are trapped in local optimal solutions.

(LIU Chang-an, et al,(2010) [21] provides a way for flying robot path planning for overhead powerline inspection that is based on the unmanned micro-helicopter model. The robot coordinate system is set up to solve position of the unknown and dynamic obstacles in the robot coordinates. They present the key points algorithm for the path planning that generates new key points through real-time information and data that detected by sensors in an unknown environment. The algorithm has smart convergence which may be used effectively in an unknown dynamic vast environment, and can inspect power lines equipment and location of key areas effectively under the safety of the robot. The simulation results of path planning of 12

the flying robot for overhead powerline inspection based on key Points algorithm prove the feasibleness and validity of the algorithm. ’’ Reagan L. Galveza et al. (2015) [22] use Genetic Algorithm (GA) to determine the shortest path that the quadrotor must travel given one target point to save energy and time without hitting an obstacle. The obstacle is assumed to be any point within the boundary. This algorithm is effective in searching solutions in a given sample space or population. If the possible solutions of the problem can be known, the evaluation can be made, based on its fitness until the fittest individual arrives.

(Fumagalli et al.( 2012) [23] focuses on the modeling and control of a flying robot. The complete system, composed of a quadrotor unmanned aerial vehicle and a custom-made manipulator, has been designed for remote inspection by contact of industrial plants. The goal of (Fumagalli et al., 2012) [23] research is to show the dynamical characteristics of the flying robot during tasks that require physical interaction, and to determine a control strategy that allows to safely interact with unknown environments. The methodology has been implemented on a real prototype and tested in an indoor area. Experimental results validate the proposed controller and show its effectiveness. ’’ S. Noda, et al (2012) [24] presents the control and the mechanism of a flying robot with on-board sensors. This flying robot consists of four rotors, four landing legs, and a body. Also, ultrasonic sensors are installed in the body to measure flight height, while an acceleration sensor, a gyro sensor, and a geomagnetic sensor are attached to the body to measure rotation angles and angular velocities. A GPS 13

sensor is used to detect the present position of the robot. To control the flying robot, a PID controller and PWM signals are used. Through flight experiments, the effectiveness of the mechanism and the control system is verified.

2.3 Concluding Marks There has been a wide range of studies in UAV. Some researches focus on the design of UAV, most of the design work was theoretical and simulation only. Some researches try to use mathematical models to take reading sensors. The researches that are practical they usually use a helicopter because it is easy to control. Table 2.1 shows the summary of research mentioned earlier.

Table 2.1 |Summary of researches Reference

Simulation or experimental

Type of UAV

Type of controller

9

Experimental

Fixed wings

Autopilot

10

Experimental

Helicopter

Autopilot

11

Simulation

12

Both

No. of the research

Fixed wing (Flight insect)

13

Experimental

Rover and fixed wing

14

Simulation

14

APM 2.6

15

Experimental but focus on scanning

16

Simulation

17

Both

18

Simulation

19

Simulation

20

Simulation

21

Simulation

22

Experimental

23

Simulation

24

Experimental

Quadcopter

KK

Quadcopter

Fuzzy controller

Quadcopter

PID controller

2.4 Research Objective The major aims for this thesis are:  Choose the Type of UAV frame and the Controller to implement the flying robot.  Assembly of the Frame with the controller and other components  Apply field test for the robot by planning different paths for the Robot.  Studying the effect of path planning of the Robot on the flying angle (Roll, Pitch and Yaw) readings.

15

 Capturing Flying aerial images for specific areas that the Robot is flying above and assemble these images in one image.  Studying

how much the assembled aerial image can be

dependent to measure the lengths and distances of specific grounds  Studying the dependency of the assembled image to extract the GPS location of any point on it.

16

Chapter Three Theoretical Considerations 3.1 Introduction This chapter describes the theory of the flying robot, the autopilot kit used to control the quadcopter, and the software used for image stitching. The quadcopter is a popular idea for a drone, because of its properties. The most important advantage of the quadcopter is that it is able to hover, and take off vertically. This makes the quadcopter good for many objectives and allows it to operate at any environment. Unlike traditional helicopters, the quadcopter does not have a tail rotor to help controlling the yaw motion. Instead the quadcopter controls the torque forces of the motors to control yaw forces. The torque of the motors will cancel each other because the quadcopter is built with four motors, two of them are spinning clockwise(CW) and the others spinning counterclockwise(CCW). This is only veracious if all the four motors have the same torque. If one of the motors has a reduced torque, the quadcopter will start to spin in the air [25].

3.2 Equation of straight line path [26] The motion of line or straight line was introduced by ancient mathematicians to represent straight objects (i.e., having no curvature) with negligible width and depth. Lines are an idealization of such objects. Until the seventeenth century, lines were defined like this: “The [straight or curved] line is the first species of quantity, 17

which has only one dimension, namely length, without any width nor depth, and is nothing else than the flow or run of the point which will leave from its imaginary moving some vestige in length, exempt of any width. The straight line is that which is equally extended between its points. The equation of a straight line is usually taught in the form: y = mx + c……………(1) which succinctly expresses the fact that if y plotted against x and the variables obey a relationship of this form a straight line graph will be obtained with gradient or slope m and intercept (where the line crosses the y-axis). As shown in figure (3.1).

Figure (3.1) Straight line

As the Quadcopter Robot Flies so the straghit line equation between two points must be consider in 3D.

18

Fig(3.2) Robot movement in space

If the Robot moves from point P to point Q, the Robot Path L through the point P is parallel to

.

⃗⃗⃗⃗⃗

………….(2)

Since ⃗⃗⃗⃗⃗ is parallel to Then ⃗⃗⃗⃗⃗

……………(3)

where t is scalar.

The parametric equations of a path L in 3D space is given By : …………(4)

19

where

is a point passing through the path and

is a vector

that the path is parallel to. This vector is called direction vector for the path and its component a, b and c are called direction numbers. Assuming

, and take equation (4) to solve t, then the

equation be: ,

………….(5)

,

The final equation of the quadcopter path on a straight line will be: ……………..(6)

Since the Quadcopter is Flying on the same Elevation the equation of the path can be solved using Equation (6) or Equation (1) if the elevation is considered as the reference point. But in Take-off or landing Equation (1) cannot be applied on it, since the elevation is changing. In this thesis a straight line path is only used in experimental work.

3.3 Ardupilot Mega(APM) [27] APM is a controller used for UAV. It has the ability to control autonomous multicopters, conventional helicopters, fixed wing aircraft and ground rovers. It is a full autopilot that is capable of autonomous stabilization, waypoint based navigation and can support 8 RC channel with 4 serial port

20

Fig (3.3) APM 2.6 Board The Ardupilot autopilots are based on Arduino which is actually a microcontroller, a circuit board that has a microchip in it, this microchip has the ability to be programmed to do several things, for example, it allows the user to read information from sensors ( photo resistor, motion sensors, heat sensors, GPS, etc), to display the information and store the data or to control devices. The Ardupilot mega 2.6 is based on “Arduino Mega 2560” board. The features of the APM 2.6 are as follow:  The board runs on a 16MHZ ATMega2560 processor, that has a built in hardware failsafe function( this means it can retrieve from a power supply failure and return to the ground station on a radio loss).  It includes “a 3-axis accelerometer, 3-axis magnetometer and 3-axis gyroscope”.

21

 It has 8 input ports and 8 output ports, so any external sensor can be connected to the inputs and any actuator can be connected to the outputs.

Fig 3.4 APM 2.6 Board

22

Fig 3.5 APM2.6 Parts

3.4 Mission Planner [28] Mission planner is the software used for controlling the APM . It is the ground control station for the APM copter, it also the ground station for Plane and Rover as long as the Autopilot (APM,PX4…) is the controller of them. It is compatible with windows only. The mission planner has many features shown as follow: It can load the Firmware or the software“ into the Autopilot(APM,PX4…) that controls the quadcopter.  “Plan, save and load autonomous missions into the Autopilot with a simple point-and click“ away-“point entry on the Google” map or other maps.  Each point includes a series of buttons to perform every action like Returnto-Launch, change speed…etc.

23

It has a tab to configure every parameter of the APM board, from flight states to the RC values.

Fig (3.6) Mission Planner

Fig (3.7) APM Mission Planner Screenshots: Flight Planner and Firmware

24

3.5 Flight Modes [28] There are fourteen flight modes available in APM. In general, all the APM controllers a have default setting of flight modes and they are as follows:  Stabilize mode: this mode allows to fly the quadcopter manually.  Altitude Hold Mode(AltHold): this mode allows the quadcopter to maintain at“a consistent altitude while allowing roll, pitch and yaw to be controlled normally. This” means that the “throttle is automatically controlled to maintain the current altitude”while the“ roll, pitch and yaw”are controlled by the pilot. The flight controller uses the pressure sensor which measures the pressure as the main means to determine the altitude( pressure Altitude), if the air pressure changes during the flight due to extreme weather, the quadcopter “will follow the pressure change rather than actual altitude unless”the quadcopter has an ultrasonic sensor and the flight height will be in the sonar limit, this will provide more accuracy in altitude maintenance.  Loiter Mode: this mode allows the quadcopter to maintain the current location, heading and altitude, for more accuracy Loiter performance, good GPS position, low vibrations and low noise(aka magnetic interference) are required.  Return To Launch Mode: this is an important mode especially if the Quadcopter goes out of control due to a very strong wind, power problems or any other problems that affect the quadcopter flight. RTL mode makes the quadcopter navigate from its current location and hover above the home position.

25

Fig3.8 RTL mode [27]  Auto Mode is another important mode because in this mode there is no need to control the quadcopter manually because the quadcopter will follow the programmed mission stored in the APM which is made up of navigation commands(i.e. waypoint)

Fig3.9 Auto Mode [27] The aforementioned modes are the most important modes for the quadcopter, though there are another flight modes  Acro Mode: also called Rate Mode. It uses the RC sticks to control the angular velocity of the quadcopter. This mode is useful for aerobatics such as flips or rolls, or FPV(First Person View) when smooth and fast control is desired. 26



Sport Mode: also known as Rate controlled Stabilizer plus Altitude Holder. It is useful for flying FPV and filming. The pilot can maintain the quadcopter at a particular angle and it will maintain that angle.

 Drift Mode: allows the quadcopter to fly as if it is a plane with built-in automatic coordinated turns.  “Guided Mode”: it“is”the“capability of APM to dynamically guide the copter to a target location wirelessly using a telemetry radio module station application”.  Circle Mode: “this mode will orbit a point of interest with the nose of the vehicle pointed towards the center.  Position Mode: the same as the Loiter mode but with manual throttle control.  Land Mode: this” mode attempts to bring down the quadcopter straight down but with these features: 1- It descends to 10m (or until the sonar, if existed, Senses something below the quadcopter) using regular Altitude Hold controller

which will

descend at the speed that is set for it. 2- Below 10m the quadcopter should descend at the rate specified in the Land speed parameter which is by default 50cm/s. 3- When the quadcopter reaches the ground it will automatically shut down the motors and disarm the quadcopter if the pilot`s throttle is at minimum.  Follow Me Mode: in this mode the quadcopter could possibly follow the pilot as he moves but with using a telemetry radio and ground station.

27

3.6 Microsoft ICE(Image Composite Editor) [29] Microsoft Image Composite Editor is an advanced panoramic image stitcher made by the Microsoft Research division of Microsoft Corporation. The application takes a set of overlapping photographs of a scene shot from a single camera location and creates a high-resolution panorama incorporating all the source images at full resolution. The stitched panorama can be saved in a wide variety of file formats, from common formats like JPEG and TIFF to multiresolution tiled formats like HD View and Silverlight Deep Zoom, as well as allowing multi-resolution upload to the Microsoft Photosynth site.

It has many feature that can be represented in: 

Stitching algorithms automatically place source images and determine panorama type



Advanced orientation adjustment view allows planar, cylindrical, and spherical projections



Support for different types of camera motion



Panorama stitching from video



Exposure blending using Microsoft Research fast Poisson algorithm



Automatic lens vignette removal



Automatic cropping to maximum image area



Optional automatic completion of missing image parts (helpful for sky, clouds, grass, gravel etc.)



No image size limitation - stitch Giga pixel images



Constrained assembly of image sets taken on a known regular grid, e.g. with a Giga pan head



Native support for 64-bit operating systems 28





Output in a wide variety of image formats: 

HD View



DeepZoom



TIFF, JPEG, PNG, and more



Layered Photoshop format

Panorama publishing to Microsoft Photosynth

However, Microsoft ICE currently does not provide any anti-Ghosting-mechanism, like other panorama stitching programs do, e.g. the open source program Hugin (software) and various commercial applications.

3.7 Path Planning of APM 2.6 Two methods for programming the APM 2.6, either by using USB cable or wireless using Telemetry. In this thesis a USB cable method was used. After connecting the APM to the PC, using Mission Planner program a set of way points with straight line between them uploaded to the APM. These waypoints have coordinates of (x, y, z) stored in the memory of APM in order to be read at the flight by the GPS module. Figure 3.15 shows the Flow chart of Programming.

29

Connect the APM to the PC

Set waypoints

Define the line between one point and the other

Write Waypoints (To store them in APM) Fig 3.10 Uploading waypoint to the APM

30

3.8 Global Positioning System (GPS)[5] GPS is a satellite-based system that uses a constellation of 24 satellite to give a user an accurate position. Accurate means 5m to a ship in a coastal water, means 1 cm in a land survey. GPS was first made only for military, soon after it became available for civilian use. There are several methods for using the GPS. The method used depends on the type GPS receiver available. There are several sources of error that degrade GPS position. “These sources are:  Ionospheric and atmospheric delays.  Satellite and receiver Clock.  Multipath.  Dilution of precision.  Selective availability.  Anti-spoofing”.

31

CHAPTER FOUR EXPERIMENTAL WORK 4.1 Introduction In this Chapter the assembling of the UAV (which includes the frame , the APM controller, the other electronics parts such as the motors, the propellers and the Electronic speed controllers (ESC), will be discussed . as well as the navigation process.

4.2 Assembling the UAV Assembling the UAV means bring all the UAV parts together with all calibration it needs.

4.2.1 UAV frame type [30] The UAV frame used in this thesis is Rotorcraft. The rotorcraft have several type of frames depends on No. of motors used in the UAV. The number of motors and configuration of each type of multicopters brings some up and down sides to their performance. For instance more motors means

more power, more lift

capability, and more time in the air (can carry more battery) while the downside is more expensive for the additional motors and battery packs”. The most familiar type of frames for the multicopters are ”X” and “Y”. Table 4.1 shows types of multicopters classified depending on their frame type and their advantages and disadvantages

32

Table 4.1 Rotorcraft Type

33

From table 4.1, it seems that the best choice for the frame type is the Quadcopter, which is the frame type that used in this thesis. The quadcopter has good stability and the cost is less than the other frames.

4.2.2 APM controller [28] The APM 2.6 is a complete autopilot system and the bestselling technology that won the prestigious 2012 Outback Challenge UAV competition. It allows the user to turn any fixed, rotary wing or Multirotor vehicle (even cars and boats) into a fully autonomous vehicle capable of performing programmed GPS missions with waypoints. This revision of the board has no onboard compass, which is designed for vehicles (especially multicopters and rovers) where the compass should be placed as far from power and motor sources as possible to avoid magnetic interference. APM 2.6 is designed to be used with the 3DR uBlox GPS with Compass, so that the GPS/Compass unit can be mounted further from noise sources.”

Fig 4.1 APM 2.6

34

4.2.3 RC Transmitter The RC transmitter used in this work is of type WFLY07, as shown in figure 4.2. It has the features: Large LCD display, Multi-function proportion of 7 channels remote control, and can store 10 group of model data.

Fig 4.2 RC transmitter

4.2.4 GPS Module The GPS module used is UBLOX GPS module V2.0 shown in figure 4.3 . The NEO-6 module series is a family of stand-alone GPS receivers featuring the high performance u-blox 6 positioning engine

Fig 4.3 GPS module

35

4.3 Mission Planner[28] “There are some features of mission planner that should be noticed: 

Point-and-click waypoint entry, using Google Maps/Bing/Open street maps/Custom WMS.



Select mission commands from drop-down menus



Download mission log files and analyze them



Configure APM settings for your airframe



Interface with a PC flight simulator to create a full hardware-in-the-loop UAV simulator.



See the output from APM’s serial terminal.

The mission planner software is available online and can be downloaded freely. It always needs Internet connection to program the APM. ”

Fig 4.4 “Mission Planner”

36

The quadcopter navigation relies on the use of uploaded flight plans, which it tracks and drives as a list of waypoints. Before loading the waypoints, some steps should be done before that. 4.3.1 Connect APM to Computer There are two ways to connect the APM to the computer, the first method is via Micro USB and the second method is via Telemetry. In this thesis, the first method was used because of the security situation and the second method needs Internet connection all the time.

Fig 4.5 Micro USB And MICRO USB port Once the APM is connected to the computer, windows will detect it and identify the COM port. The com port number can be known from My computer-propertiesdevice manager-Ports. The com port is appears as Arduino Mega 2560 and the number of the port will appear as shown in figure 4.6

37

Fig 4.6 Com Port Number

4.3.2 Connect APM to Mission planner Mission planner needs to know what port is used to the APM connection. The upper right corner in the mission planner window is used to connect the APM. The choice Arduino Mega 2560 is used and the baud rate 115200as shown.

Fig 4.7 Com Port and Baud Rate

. 38

4.3.3 Select the Firmware There are many types of firmware that can use the APM controller(ArduRover, Arduplane, Quadcopter, etc.). It just has to select the firmware to download it to the APM, Select Initial setup-Install firmware. Once the firmware is selected, the mission planner will automatically detect the latest version of the chosen firmware and prompt the user to confirm it.

Fig 4.8 Firmware Choices in Mission Planner

4.3.4Connect and Disconnect To load the parameter to the APM, the icon ‘‘connect” must be pressed . when the window displays‘‘ done’’ and the mission planner shows Disconnect instead of Connect

option

option, then the APM firmware will be downloaded

completely and successfully.

39

4.3.5 Calibrate the APM Since the APM 2.6 of the quadcopter is used for the first time. It needs to calibrate specially the accelerometer. In an Initial Setup section, Mandatory hardware-Accel Calibration. As shown in figure 4.9 .

Fig 4.9 Accelerometer Calibration

Once the Calibrate Accelerometer button is pushed, few steps need to be proceed 

The APM controller needs to set in the forward position.

40

Fig 4.10 Forward position 

Set the APM in the Left position.

Fig 4.11 Left Position 

Set the APM in the Right Position

Fig4.12 Right Position



Set the APM in the Down position

41

Fig4.13 Down Position 

Set the APM in the Up Position

Fig4.14 Up position 

Set the APM in the Back position

Fig4.15 Back position This process needs a flat surface, in order to achieve that weighbridge used.

42

The radio also needs to be calibrated. Its calibration is as follow. When the radio connects to the APM through the receiver, the Radio will automatically connect to the mission planner and by moving the buttons of the channels on the radio the changes in the radio calibration screen in mission planner can be noticed.

Fig4.16 Radio Calibration

In the flight mode section the quadcopter modes can be set according to the channel use of the radio. For this thesis, the quadcopter flight mode change was through Channel Five.

43

Fig4.17 Flight modes change

4.3.6 Loading waypoints Waypoints create the flight path of the quadcopter. Since the Mission planner software has the access to the Google map, the path can be created anywhere. Waypoint loading can be done by clicking at any point on the Google map. The mission planner can set many options on the waypoint, such as for example the command waypoint, it means when the quadcopter reaches the desired waypoint, it`ll continue to the next waypoint. Other commands like, take-off, Land, return to home, etc. , the mission planner also can set the elevation and distance between the waypoints, finally it can show the location(Longitude and Latitude) of the waypoints, as shown in fig 4.18 . The path between two waypoints is a straight line. The complete path for the mission depends on a No. of waypoints.

44

Fig4.18 Waypoints

4.4 Automatic Navigation in Quadcopter The quadcopter navigation relies in the use of uploaded flight plans, which is tracks and drives as a list of waypoints. Each waypoint has its command such as driving to the next waypoint, hold, return to home……etc. also the level of the robot can be set at each waypoint. One of the tests applied to the robot has four waypoints, in figure 4.19 the waypoint management in Automatic navigation.

45

Fig 4.19 waypoint management in automatic navigation

The complete Robot is shown in figure 4.20. the Robot as shown is connected to the Laptop through USB which is as mentioned earlier is what used to program the APM2.6. The flight area of the Robot was in University of Baghdad, at AlKhwarizmi Engineering College. The Robot was smashed more than one time during the flight tests.

46

Fig 4.20 Complete Robot The whole process of navigation can be explained as follows: 1. Connect the Robot to the Laptop using USB. 2. Connect the Robot to the Mission Planner . 3. Install the firmware to the APM2.6. in this thesis the Firmware chosen is a Quadcopter. 4. Set waypoint for the path and upload them to the APM2.6 . 5. After this disconnect the Robot From the Laptop. 6. Set the Robot in the area the Robot supposed to fly. 7. Initiate the Robot using The RC transmitter. 8. Set the flight mode to Auto mode, in this case the mode can be set through channel Five. Figure 4.21 shows the description of the Quadcopter navigation at auto mode through waypoints.

47

Start Set the mode to auto

Uploaded waypoint from the stored flight plan

Read Waypoint commands

Is the mission currently changed

Yes

No Has the UAV reached the Waypoint

No

Uploaded waypoint from the stored flight plan Fig 4.21 Robot Navigation

48

Yes

4.5 Stitching Images using Microsoft ICE The camera used for the is Phone camera. The camera has been downwardfaced and mounted to the bottom of the platform. The camera was set to capture 480p and 15fps video images during aviation. After the Robot finish the missions, the video recorded by the camera was converted to images. The images of each test were assembled in one image cover the flight area using Microsoft ICE software in order to use the assemble image for measuring distances and extracting GPS locations. This will explain in the Next chapter. Image Stitching in Microsoft ICE is done in several steps, first importing the images, images that is desired to be stitched, then ICE will process images in two parts, the first part is aligning images and the second part is compositing images, aligning and compositing images were explained in the previous chapter. After these steps, the new aerial will crop in order to get the perfect stitched image, the final step is to export the new aerial image, in this step the image will be saved in the size, dimension and type wanted. The stitching steps is shown in figure 4.21

49

Fig 4.22 Image Stitching steps

4.6 “

ArcGIS(Arc Geographic Information System) ArcGIS is a geographic information system for working with maps and

geographic information. It is used for creating and using maps. A cornerstone in ArcGIS is the ability to access GIS in any format and use multiple data bases. ArcMap is one of the Applications of ArcGIS used on Desktop. it is a central application of ArcGIS for all maps. ArcMap offers two type of Map view: a geographic data view and a page layout view. In this thesis the work was with the geographical data view because it can give geographic layers to analyze, symbolize and compile GIS data [31].”

50

Fig 4.23 ArcMap

The assembled image that result from Microsoft ICE was installed on the map in the ArcGIS by choosing more than one point to on the map that exist on the assembled image to stich the two images together.. It is preferred to choose point with clear features such as corners, stadium ….etc.

51

CHAPTER FIVE RESULTS AND DISCUSSION 5.1 Introduction “Three flight tests have been accomplished on the quadcopter. The tests were made in order to make surveillance scanning for the area using the Quadcopter. At each test, a path is programmed and uploaded to the robot. Each test has its unique path. For each flight test Pitch, roll and yaw flying angles were read, robot flying velocity was read, also aerial images for the flying area were stitched together to make assembled aerial image. GPS locations are extracted from the Assembled aerial image. The GPS location coordinates are in Decimal degrees. The X coordinate represents the longitude and the Y coordinate represents the Latitude.

5.2 Path Planning Three flight tests in three different places were made. At each test, a path was programmed and uploaded to the APM.

A.

Test One Test one was made at the area of the old building of the Al-Khwarizmi Engineering college. The path programmed for this test is shown in figure (5.1). The area in the figure bounds between the upper right corner (44..371943, 33.270768) and the Lower left corner (44.375297, 33.270862). the scanned area was of 15428

.

52

Figure 5.1 Path for Test One

B.

Test Two The second flight test of the robot is made at the parking area of the ALKhwarizmi Engineering College. The path programmed for the robot at this area is shown in figure (5.2). The area in the figure bound between the upper right corner (44.372712, 33.270768) and the lower left corner (44.373321, 33.70500). the scanned area was of 1445 53

Fig 5.2 Path for Test Two

C.

Test Three Test Three was made at the field in front of the AL-Khwarizmi Engineering College. The path programmed for this test is shown in figure (5.3). The area in the figure bounds between the upper right corner

(44.372638,

33.271422) and the lower left corner (44.3742211, 33.270727). The scanned area was of 2925

54

Fig 5.3 Path for Test Three

5.3 Comparison between Actual and Desired Velocity In the mission planner program the speed between waypoints for the robot can be set as shown in figure (5.4). The speed between waypoints was set to 4.2 m\s. During the quadcopter flight, the actual speed of the robot was calculated by measuring the time for the robot to move from one waypoint to another using a stopwatch, then the speed in Longitude and Latitude was found by calculating the Distance between waypoints in both directions by applying the distance law as shown in equations 5.1 and 5.2 , 55

|

|

|

(5.1)

|

|

|

(

)

(5.2) Where

Polar Radius = 6356750 m

[32]

Equatorial Radius = 6378200 m

[32]

Then by applying Speed Law (5.3) [33]

The speed can be found. The percentage error can be found too by using the error formula which is : |

|

56

(5.4) [34]

Fig 5.4 Waypoint Speed

A.

Test One The home point Coordination is (44.372352, 33.27213)

Table 5.1 Actual speed and Error for test one Waypoint s

Latitude

Longitude

1

33.27166

2

33.27157 4 33.27185 6

44.37243 3 44.37293 2 44.37338 8

3

Lat. Distance (m) 51.47904 10.20705 31.28683

Long. Distanc e (m) 7.5388 7 46.443 34 42.441 1

Time (s) 13

Lat. Speed (m/s) 3.96

Long. Speed (m/s) 0.58

11.75

0.87

3.95

13.1

2.338

3.24

Speed (m/s)

%error

4.006 5 4.04

4.7

4.022 9

4.1

3.6

The actual speed of the quadcopter is nearly close to the set speed with Percent Error doesn`t exceed 4.7 . This is the first flight of the robot and the balancing of the robot needs to reconsider, also the robot flight path has turnover in angles and this leads to the fact that the robot flies in the direction of the wind or against it. 57

B.

Test Two Home point coordination is (44.372867, 33.270697)

Table 5.2 Actual speed and Error for Test Two Waypoint s

Latitude

Longitude

1

33.27063

2

33.27056 9 33.27061 4

44.37300 2 44.37306 6 44.37316 5

3

Lat. Distance (m) 7.4339

Time (s)

6.767

Long. Distanc e (m) 12.564 9 5.956

Long. Speed (m/s) 3.589

Speed (m/s) 4.17

0.707

2.2

Lat. Speed (m/s) 2.123 8 3.077

2.7

4.094

2.53

4.9926

9.2

2.56

1.95

3.59

4.09

2.39

3.5

%error

From the table. The robot speed error does not exceed 2.53 percent. because the path was shorter than the first test and the robot balancing is better in this test. the speed became closer to the desired speed.

C.

Test three The home point coordination is (44.373849, 33.271078)

Table 5.3 The Actual speed and Error of Test Three Waypoint s

Latitude

Longitude

1

33.27107 4 33.27106 9 33.27107 8

44.37365 9 44.37301

2 3

44.37304 4

Lat. Distance (m) 0.44378

Long. Distanc e (m) 17.683

Time (s)

0.5547

60.4

14.5

0.22189

3.3

0.8

58

4.3

Lat. Speed (m/s) 0.103 0.038 25 0.277 4

Long. Speed (m/s) 4.112 5 4.165

Speed (m/s)

%error

4.11

2

4.165

0.8

4.125

4.133

1.5

Since the path was a straight line the error doesn`t exceed 2 %, because there is no change in the direction for the robot except for the last section when it came back with 180 degree change in direction for 3.3m to point three.

5.4 Flying Roll, Pitch and Yaw angle readings. Figures (5.5), (5.6) and (5.7) show the flying angle readings of the quadcopter as well as the estimated readings for the three tests. Each figure has three curves, the upper curve is for the Roll angle, the middle curve is for the Pitch angle and the lower curve is for the Yaw angle. The blue curve represents the estimated readings and the Pink curves represent the Actual readings of the quadcopter. The data collected to draw the curves was taken almost at each second. And from the video used for recording the flight. The location of waypoints on the graph can be known. This means the x-axis represents the Time data No. and the y-axis represents the angle value in Centi-degrees.

59

A. Test One

Fig 5.5 Flying Roll, Pitch and Yaw Angle Readings of Test One The Roll angle reading is close to the estimated value with percentage error of 2% . The Yaw angle reading is almost the same as the estimated readings. The Pitch angle reading is under the estimated readings especially in the part between the waypoint one and two by ratio of 7%, and the part between waypoints two and three by ratio of 4%. The reason of this is that the movement forward and backward is affected by the turning over.

60

B. Test Two

Fig 5.6 Flying Roll, Pitch and Yaw Angle Readings of Test Two From the figure, the Roll Angle actual reading is different from the estimated reading by ratio of 2% while the pitch angle is under the estimated readings of ratio 1% . The Yaw angle reading is oscillate around the Estimated value. This is due to the weather condition which was windy. 61

C.

Test three

Fig 5.7 Flying Roll, Pitch and Yaw Angle Readings of Test Three Angle readings are showing more stability in the robot flight than the other test especially the pitch angle, the actual readings are almost the same with error of 62

0.5% of Roll angle and 1% for Pitch angle. The change in direction in 180 degree doesn`t show a greater effect on the angle readings.

5.5 Aerial flight images As mentioned in the previous chapter. Microsoft ICE is used for stitching images. Several Aerial images were taken at each flight test of the quadcopter, these images were processed in Microsoft ICE in order to make a new aerial image that combines all the flight images of each test

A.

Test one In this test the robot elevation was at 37 m. and as mentioned earlier in this chapter the path was made at the old building of the Al-Khwarizmi Engineering College. The path programmed and uploaded for this test is shown in the path planning section of this chapter. In this test the images were divided into three groups. Each group represents part of the robot path. The reason of this division is that the aerial image made of the full path was not that useful. Figures (5.8), (5.9) and (5.10) show the images taken and the new aerial images.

63

Fig 5.8 Aerial Image of the First Part of Path One

Fig 5.9 Aerial Image of the Second Part of Path One

64

Fig 5.10 Aerial Image of the Third Part of Path One

B.

Test two

In this test, the robot also was also at the elevation of 37m. The path was made at the new Building of the Al-Khwarizmi Engineering College. Figure (5.11) shows the images that were taken during the quadcopter flight over the area and the new aerial image that includes all the useful images in this test.

65

Fig 5.11 Aerial Image of Test Two

C.

Test Three

The robot elevation in this test was 37m. the path was over the football field in front of the new building of the Al-Khwarizmi Engineering College. Figure (5.12) shows the images captured during the robot flight and the new aerial images which are the result of image stitching in Microsoft ICE software. 66

Fig 5.12 Aerial Flight Image of Test Three

5.6 Comparison between the New Aerial Image and the Google Satellite Image A comparison between the new aerial image and the old satellite image was done since the satellite image was taken years ago and changes appear on the wide range of areas. 67

A.

Test one

Fig 5.13 Test one image comparison The new aerial images have new details that don`t exist in Google images like the football stadium.

68

B.

Test Two

Fig 5.14 Aerial image of test two and the Google satellite image

There are many differences between the two images such as the car parking field, the yard inside the building and the street beside the building.

69

C.

Test three

Fig 5.15 Comparison between Aerial Image and Google Satellite Image of Test Three

There are a lot of differences between the two images such as the football field, the street and the car parking area.

70

5.7 Length measurements in aerial images Each aerial image was tested to see if it can be used to measure lengths and areas. A drawing scale was set to every aerial image according to the law (5.5) [35] The images are printed on A4 page to determine the scale.

A.

Test one Because this test aerial image is divided into three aerial mages, drawing scale was determined for each aerial image.

Fig 5.16 Drawing Scale Aerial Image of First Part of Path One Table 5.4 Error between the Length of Lines in First Part of Test One Line

Exact Length (m)

Length on aerial image After

Error (m)

multiplying by Draw scale(m) EF

14.78

15.5475

0.7675

CD

23.8

23.276

0.524

Drawing scale was determined according to line AB 71

Fig 5.17 Drawing Scale of Aerial Image of Part 2 Table 5.5 Error of Lengths in the Second Aerial Image of Path One Line

Exact Length

Length on aerial image after

(m)

Mult. By Draw scale(m)

EF

8.6

8.92

0.32

CD

13.45

13.77

0.32

The drawing scale was taken according to Line AB

Fig 5.18 Drawing Scale of Aerial Image of Part 3 72

Error (m)

Table 5.6 Error of Lengths in the Third Aerial Image of Path One Line

EF

Exact length

Length on aerial image after Mut. By

(m)

draw scale(m)

18.8

18.7

The drawing scale was taken according to line AB

B.

Test two

Fig 5.19 Drawing Scale of Test Two Aerial Image The scale was taken according to Diameter AB of a circle 73

Error (m)

0.436

Table 5.7 Percentage Error between Object Length of Some Aerial Image to their Real Length of test two Line

C.

Exact Length

Length in Aerial image after

(m)

Mult. By draw scale(m)

EF

4.4

4.375

0.025

GI

40

40.6

0.6

GH

10.59

10.85

0.26

CD

6.5

6.475

0.025

Test three

Fig 5.20 Drawing Scale of Test Three Aerial Image The scale was taken according to the diameter.

74

Error (m)

Table 5.8 Error between the Length of Parameters on Aerial Image and their Exact Length Line

Length on aerial image after Mult.

Exact Length (m)

Error (m)

By draw scale(m) CD

12.282

12

0.285

AB

3.471

3.55

0.079

EF

6.675

6.7

0.025

GI

7.3425

7.57

0.2275

5.8 Extract GPS location for specific points Using ArcGIS software, the GPS location of any point on the aerial image can be found. The GPS location of any point was measured in units of Decimal Degrees, in order to calculate the error in meters between the GPS location of any point in aerial image and the exact GPS location of this point, several steps were done[36]:  Units were changed from Decimal Degrees to Degree Minute Second.  For example, the point of longitude 44.372811 the decimal part of the number will be multiplied by 60 in order to convert it to minutes, the next number will be(22.36866), the decimal part of this new number will be multiplied by 60 in order to convert it to seconds, the result is(22.1196). The coordinate of the point in the units of Degree Minute Seconds will be (44°22'22)  The change in one second of the location of the point is equal to 31 m in longitude and 37m in latitude.  The subtraction of this new result number and the other point is the error. 75

 Multiplying the error by 37 or 31 m is equal to the error in meters.  The Error can be calculated according to the Equation 5.6 √

(5.6) [36]

“The Accepted Error in meters is up to 6 meters in the civil engineering community

according to the official U.S Government information about the

Global Positioning System and Related Topics.” [37]

A.

Test one

Fig 5.21 Points Location on Aerial Image of Test One

76

Table 5.9 Error between GPS Location of Point Using ArcGIS and Exact GPS Location of Test One. Points A

B

Location in ArcGIS

Exact Location using GPS

Long: 44.37290053

Long:44.37290760

Lat: 33.2721135

Lat: 33.2721495

Long: 44.37279738

Long: 44.37277638

Lat : 33.27193465

Lat: 33.27194135

Error in meters 5.16

2.507

From the table, it is noticed that the error is in the accepted zone for both points and this is due to the good processing of the images in Microsoft ICE so that when the new Aerial image is used on ArcGIS software, it can give the location of any point on it with the accepted error.

B.

Test Two

Fig 5.22 Aerial Image of Test Two in ArcGIS

77

Fig 5.23 GPS Location of Points in Aerial Image of Test Two Table 5.9 shows the error between the point location of the aerial image in ArcGIS and the Real GPS location. The Error is in meters. From the figure above the point location was found using ArcGIS software.

Table 5.10 Error between GPS Location of Point Using ArcGIS and Exact GPS Location of Test Two Point

Location in ArcGIS

Exact GPS location

Error (m)

A

Long:44.3730637

Long: 44.37305891

0.707

Lat:33.2708301

Lat:33.27083358

Long:44.3730066

Long: 44.3730054

Lat:33.2708365

Lat: 33.27085759

Long:44.3730475

Long:44.37303154

Lat:33.2706989

Lat:33.27071615

Long:44.3729299

Long:44.37293801

Lat:33.2707124

Lat:33.27069525

B

C

D

78

2.79

2.9

2.46

A1(waypoint1)

Long:44.372993

Long: 44.373002

2.847

B1(waypoint2)

Lat:33.270611 Long: 44.373074

Lat: 33.270631 Long:44.373064

3.97

Lat: 33.270595

Lat:33.270570

Long:44.373054

Long:44.373082

Lat:33.270687

Lat:33.270680

C1(waypoint3)

C.

Test Three

Fig 5.24 Aerial Image of Test Three in ArcGIS

79

3.26

Fig 5.25 GPS Location of Points in Aerial Image of Test Three Table 5.11 Error between GPS Location of Point Using ArcGIS and Exact GPS Location of Test Three Points

Location Using ArcGIS

Exact GPS Location

Error in meters

Long:44.3727966

Long:44.3728011

Lat:33.270956

Lat:33.2709651

Long:44.3730364

Long:44.3730426

Lat:33.271171

Lat:33.27118897

Long:44.3729936

Long:44.37300562

Lat:33.271321

Lat:33.27135189

Long:44.3730649

Long:44.3730637

Lat:33.2708648

Lat:33.2708301

A1(waypoint2)

Long:44.372993 Lat:33.271072

Long:44.373010 Lat:33.271070

1.913

B1(waypoint3)

Long:44.373051 Lat:33.271104

Long:44.373048 Lat:33.271070

4.27

A

B

C

D

The error in this test is in the accepted range. It doesn`t exceed 6 m”. 80

1.312

2.128

4.323

4.15

CHAPTER SIX CONCLUSIONS AND SUGGESTIONS FOR FUTURE WORKS 6.1 Conclusions “ The conclusion of this work can be summarized as follows:  The stability of the robot improved after each test.  The Robot actual speed became closer to the desired speed after each test.  Roll angle actual readings became closer to the estimated reading after each test. The actual readings are over the estimated readings in the first two tests with Percentage error of 2% , in the third test the readings are almost the same with percentage error of 0.5%, because the path of the third test is a straight line and has no turnover.  In the first two tests the Pitch angle actual reading have error of 7% and 2% respectively . While in the third test the reading became more accurate. In the first two tests the actual readings are under the estimated readings. in the third test the readings are almost the same as the estimated readings.  Yaw angle isn`t affected by changing the direction,

it represents the

direction about the Z-axis. In the first and the third tests the readings are almost the same, while in the second test the readings oscillate around the estimated reading.  The 180 degree change in direction in test three has less effect on flying angles.  The assembled aerial images contain more details than the Google Satellite image. 81

 The assembled aerial images can be used to measure lengths and areas by using Drawing scale. With error doesn`t exceed 0.7 m  The Assembled aerial images can be used to extract GPS location for specific points including new points do not exist in the Google Satellite image with Error doesn`t exceed 5.16 m .

6.2 Future Work There is a wide range of applications of UAV in both Military and civilian fields. For the current research, the following suggestions are given for further development of the work:  Use fuzzy controller to control the robot.  Add Telemetry to program the APM instead of the USB used in this work as well as ultrasonic sensor and use the robot at a low altitude flight to measure the street level at different points.  Use the quadcopter as a person follower to help police officers chasing the criminals.  In military application, attach mine detector to detect mines without touching to give the exact location without need the to fear from explosion.  Use Raspberry Pi controller to control the Robot instead of APM2.6 and control the flying through the internet.  Use the voice recognition technique to control the robot flight.  Use the quadcopter for indoor applications such as mapping the new discovered tunnels or caves whose grounds are so fragile that sending ground vehicles is risky”.

82

Reference ‫ـــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ‬ [1] V. Ghadiak,‘‘ Autonomous Aerial Manipulator using a quadrotor,’’ Utah State University, Electrical Engineering, M.Sc. thesis, ProQuest, 2011. [2] ‘‘Black Tie Aerial’’[Online].Available: http://blacktieaerial.com/ .[Accessed: 29- March-2014]. [3]A. S. Abdul hadi,‘‘ Path Planning Control for a mobile Robot,’’ University of Baghdad, Al-Khwarizmi Engineering College of Engineering, Mechatronics Department, M.Sc. Thesis, 2011. [4] ‘‘Automotive Navigation System ’’[Online]. http://en.wikipedia.org/. [Accessed: 13- February-2015]. [5] Introduction to GPS(Global Positioning system), Co. , Heerbrugg, Switzerland, 1999, pp. 4-22.

Available:

ed. , Lieca Geosystems Inc

[6] O. S. Cubero, ‘‘ Image Stitching, ’’, Limerick Univ. , Electronic And Computer Engineering, B.Sc. thesis, 2011. [7] ‘‘Microcontroller’’[Online]. Available: http://en.wikipedia.org/ . [Accessed:25April-2015]. [8] ‘‘Ardupilot’’ [Online]. Available: http://en.wikipedia.org/ . [Accessed: 21April-2015]. [9] R. C. Siefert ‘‘ Design of an Autopilot for Small Unmanned Aerial Vehicles’’ Brigham Young University. Electrical and Computer Engineering, M.Sc. thesis, 2004. [10] M. Egrestedt, T. J. Koo, F. Hoffman and S. Sastry, ‘‘Path planning and flight controller scheduling for an Autonomous Helicopter ,’’ in Hybrid System: Computation and Control, Second International Workshop, HSCC'99, Berg en Dal, The Netherlands, March 29-31, 1999, 1999, pp. 91-102. [11] W. Xu, C. Li, B. Liang, Y. Liu and Y. Xu,‘‘ The Cartesian path planning of Free-Floating space Robot using Particle swarm Optimization,’’ Int. J. Adv. Robot Sys., vol.5, No. 3, pp. 301-310, 2008 [12] L. Schenato, X. Deng and S. Sastry‘‘ Flight Control System for a Micromechanical Flying Insect: Architecture and Implantation,’’ in Proceeding 2001 ICRA. IEEE international Conference on Robotics and Automation (cat. No.01CH37164), vol. 2, pp. 1641-1646, 2001.

102

Reference ‫ـــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ‬ [13] D. L. Figueredo ‘‘Autopilot and Ground control Station for UAV ,’’ LISBO Technical college, Aerospace Department, M.Sc. Thesis, 2011. [14] R. Lampariello, S. Agrawal and G. Hirzinger, ‘‘ Optimal motion planning for free-flying robots,’’ in 2003 IEEE international conference on Robotics and Automation (Cat No.03CH37422, vol. 3, pp. 3029-3035, 2003. [15 J. Robmann, M. Rast , ‘‘High-Detail Local Aerial Imaging Using Autonomous Drones’’ in 12th AGILE International Conference on Geographic Information Science,2006, pp 1-8. [16] Xian-Zhong Gao, Zhong-Xi Hou, Xiong-Feng Zhu, Jun-Tao Zhang, and Xiao-Qian Chen, “ The shortest Path Planning of Manoevuvres of UAV” Int. J. Acta Pol. Hungarica, . Vol 10, No 1, pp:221-239, 2013 [17] R. He, S. Prentice and N. Roy, ‘‘Planning in information space for a quadrotor helicopter in a GPS-denied environment,’’ 2008 IEEE International conference on Robotics and Automation, pp. 1814-1820, May 2008. [18] M. Hehn and R. D’Andrea,‘‘Quadcopter trajectory generation and control, ’’ in 18th IFAC world Congress, Milano, Italy, 2011. [19] L. Techy, C. A. Woolsey, &K. A. Morgansen, ‘‘ Planar path planning for flight vehicles in wind with turn rate and acceleration bounds,’’ in international conference in Robotics and Automation, Anchorage, AK, may 3-7, 2010, 2010, pp. 3240-3245. [20] Dong Jia and Juris Vagner,‘‘ Parallel Evolutionary Algorithms For UAV Path Planning,’’ in International conference on Intellegent Systems, Sep 20-22, 2004, pp. 4469-4474. [21] C. LIU, Y. Cheng, G. Yang . ,‘‘ Path planning of flying robot for overhead power line inspection based on key points algorithm,’’ in International conference

103

Reference ‫ـــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ‬ on Electrical and Control Engineering, Wuhan, June 25-27,2010, 2010, pp. 14701473. [22] ] A. Bandala. R. L. Galvez and Elmer P. Dadios. Path Planning for Quadrotor UAV Using Genetic Algorithm,’’ in International Conference on Humanoid, Nanotechnology, Information Technology, Communication and Control, Environment and Management (HNICEM), At Puerto Princesa City, Philippines.2014. [23] M, Fumagalli, R. Naldi, A. Macchelli and R. Carloni, ‘‘ Modeling and control of a flying robot for contact inspection ,’’ in 2012 IEEE/RSJ International conference on intelligent Robots and Systems(IROS), Vilamoura, Oct 7-12, 2012, 2012, pp. 3532-3537. [24] S. Noda, H. Mastue and H. Lim, ‘‘ The Fuzzy position control for the four rotor flying robot,’’ in Soft Computing and Intelligent System (SCIS) and 13th International Symposium on Advanced Intelligent System (ISIS)international conference, Kobe, Nov 20-24, 2012, 2012, pp. 1238-1234. [25] O. Magnussen,‘‘ Modeling, Design and experimental study for quadcopter system construction, ’’ University of Agder, Collehe of Engineering,Faculty of Technology and Science, M.Sc. thesis, 2011. [26] “Calculus III”, Available : http://tutorial.math.lamar.edu/ .[ Accessed: 15sep2015] [27] ‘‘APM Drone code’’, Available : http://planner.ardupilot.com/ .[Accessed: 19-April-2013] [28] “APM copter’’[Online]. Available: http://copter.ardupilot.com/ .[ Accessed: 19-March-2014]. 104

Reference ‫ـــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ‬ [29] R. Szeliski, ‘‘ Image alignment and Stitching, ’’ Technical report Microsoft research, Vol.92 , 2004 [30] ‘‘ Types of Multicopters.’’ [Online]. Available: http://blog.oscarliang.net/ . [Accessed: 13/2/2013]. [31] ‘‘ GIS system.’’ [Online]. Available: http://www.esri.com/software/arcgis [Accessed: 13/2/2013]. [32] “ Finding distance in meters between 2 decimal degrees coordinations,” [Online]. Available on: http://www.novatel.com/support/ [Accessed: 10/03/2015]. [33]‘‘The Physics Hypertextbook.’’ [Online]. Available: http://physics.info/ . [Accessed: 14/04/2015]. [34]‘‘Math is fun.’’ [Online]. Available: https://www.mathsisfun.com .[Accessed: 28-02-2014]. [35] ‘‘Drawing Scale.’’[Online]. Available: https://en.wikipedia.org . [Accessed: 28/02/2015]. [36] ‘‘ Points and Degrees.’’[Online]. Available: http://www.fao.org/ .[Accessed: 20/102013]. [37] ‘‘GPS Acuuracy’’, [Online]. Available: http://www.gps.gov/ .[Accessed: 18Sep-2014].

105

Appendices ‫ــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ‬ APPENDICES

APPENDIX A: Install and Setup of the ArduPilot Mega 2 in a Quadcopter

Figure 1 Quadcopter A. For an assembeled Qadcopter with motors and ESC`s but no control or power board begins here 1- Quad power board distribution need, appropriate battery for Quad. Battery retention strap, 12 gauge wire, battery connector, four %” nylon standoffs and necessary hardware. 2- Solder The ESC power leads to the Power distribution board. 3- Solder 12 gauge positive and negative battery wire leads to the power distribution board. 4- Solder a battery connector correctly to the leads from the power distribution board. 5- Mount the power distribution board on standoffs over the top center of the Quad. 6- Attach the battery retention strap to the bottom of the Quad and install the battery.

A

Appendices ‫ــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ‬ B. For an assembled Quad with control and power distribution boards begin here 1. You need: APM2 flight control board and USB cable, 5+ channel receiver to use with your 2.4GHz transmitter, Five 3 wire servo leads with female connectors to connect your receiver to your APM2, an oversize plastic or fiberglass APM2 mounting plate with aluminum tape on the bottom, four 1.5” nylon standoffs and Velcro or double sided foam tape. 2. Disconnect and remove any existing flight control board. 3. Drill and mount the plastic mounting plate for the APM2 board in the center of the Quad over the power distribution board on 4 standoffs and aligned with the front of the Quad in your choice of X or + configuration. (X configuration has the front between 2 motors and + has a motor in front.) 4. Using double sided shock absorbing tape or Velcro mount the APM2 board on to the fiberglass mounting plate aligned in the direction of travel (GPS to the back, SDI card toward the front). 5. Retention can be improved by attaching a rubber band over the APM2 board. 6. A clear (not black) plastic bowl cover over the APM2 board can reduce damage in a crash. 7. Install your receiver onto the Quad with Velcro tape and with the antenna exposed externally. 8. Install channels 1 - 5 servo leads to the receiver. 9. Install channels 1 - 5 servo leads to the front connector on the APM2 board, Channel 1 is next to the white GPS connector. The white or yellow signal wire goes towards the center of the board. (Red and black wires on all but one connector can be clipped but this is generally not necessary since power and ground are common bussed at both the receiver and APM2 board.) 10. Install The 4 ESC control leads on the connector at the back of the APM2 board with the white or yellow signal lead towards the center of the board. 11. For X Quad frame configuration: a. The Front Right motor goes to the right most (first) connector position next to the LEDs. b. The Left Rear motor goes to the second connector position. c. The Front Left motor goes to the third connector position. d. The Rear Right motor goes to the fourth connector position. B

Appendices ‫ــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ‬ 12. For + Quad frame configuration: a. The Right motor goes to the right (first) connector position next to the LEDs. b. The Left motor goes to the second connector position. c. The Front motor goes to the third connector position. d. The Rear motor goes to the fourth connector position. 13. The BEC plus (red) and ground (black) wires can be cut on all but one of the ESC control leads. C. Install the Mission Planner program and Arducopter firmware and Set initial parameters. 1. Your RC transmitter should initially be set up for a Quad as follows: a. Four primary channels are Aileron (roll), Elevator (pitch), Rudder (yaw) and Throttle. b. Channel 5 is set to a 3 position switch for in flight mode changing. c. All channels are set to plus and minus 100 percent servo travel range. d. Set the throttle, roll, pitch and yaw trims to zero. (May need to trim throttle down to arm). e. Some minus expo (-40%) is a good idea on the pitch and roll channels to start. 2. Go to the ArduPilot website at http://code.google.com/p/ardupilotmega/downloads/list and download the most recent "Mission Planner” and install it on your computer. 3. Ensuring that the battery is NOT connected, start the "Mission Planner” and hook up your USB cable between your PC and the APM2 board. 4. If you get a message indicating "New hardware found”, select install driver when asked. If you are told "No driver found”, you will need to load the driver from the Arducopter web site. Go to the Arducopter web site and in the search projects page search for "apm2code”. At the top of the list, select the "APM2Code” item and then load the USB driver as instructed. You should get a confirming message indicating that the USB driver is installed. 5. In the Mission Planner, ensure that on the top right of the screen 115200 is selected for baud rate and the new driver Com. (But not Com1, TCP or UDP) is selected. Fix if necessary. 6. In the Mission Planner click on the Firmware tab then click on the Connect Icon at the top right of the Mission Planner screen to open the MavLink C

Appendices ‫ــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ‬ connection. 7. It is possible you may still get an error indicating that your serial rate is too low. If you do you will need to open your PC’s Control Panel -> System -> Device Manager -> Hardware and set the 2650 Com device to 115200 baud. (Windows 7 has a different method for setting up the port.) 8. Once connected; select the Firmware tab and Click on the bottom center "APM Setup” button. 9. Turn on your transmitter with your Quad set up selected. (Mode 2 is shown, adapt for Mode 1). 10. In the "Radio Calibration” menu, select "Calibrate Radio” and move the control sticks to all limits. a. Right stick Left (Roll Left) should equal low PWM. If not, reverse the transmitter channel. b. Right stick Up (Pitch Forward) should equal low PWM. If not, reverse transmitter channel. c. Left stick Down (Throttle Low) should equal low PWM. If not, reverse transmitter channel. 11. e the three position mode select switch to all 3ions to calibrate it too. 12. When calibration is dine, select the "Finished” button at the bottom right of the screen. 13. Select "Flight Modes” on the left side of the Mission Planner screen and set all 6 of the Flight Modes to "Stabilize”, uncheck all the "simple” mode boxes and click the "Save Modes” box. 14. Now select "Hardware Options” and click on "Enable Compass”. 15. Select the "Go to the Declination Web Site” box and retrieve your locations magnetic declination. 16. Enter your home declination in the Declination window as described and hit the tab key to exit. 17. Select "Arducopter Level” on the Mission planner left edge. With your Quad setting very level, click on the "Level Arducopter” item then select the X or + Quad to set your frame orientation. D. ESC calibration sets the ESC endpoints to be equal and is essential for

correct operation. 1. There are 2 modes for adjusting ESC endpoints. Automatic adjusts ESCs all at D

Appendices ‫ــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ‬ once and is the easiest. Manual individually adjusts each ESC. Try Automatic mode first then Manual if that fails. 2. Automatic Setup (all ESCs at once) (Remove the Props and disconnect the USB cable). a. Turn on your transmitter and put the throttle full on, then connect the Quads battery. b. When the APM2 boots the LEDs will cycle continuously. c. Disconnect the battery and then reconnect it initiating ESC calibration. d. Drop the throttle stick to the lowest position. There should be 1 or 2 confirming beeps and when you move the throttle up the motors should start and turn in sync. e. Disconnect the battery. The ESCs should now be calibrated. 3. Manual ESC Calibrate (Each ESC calibrated individually). (Remove props and disconnect USB). a. With the battery not connected, plug the 3 wire plug of the ESC you wish to calibrate into the throttle channel of your RC receiver. b. Turn on your transmitter and put the throttle full on. c. Connect the battery and after you hear 2 beeps drop the throttle to full down, you should now hear 3 beeps and then a longer beep indicating the ESC is calibrated. d. Disconnect the battery, then repeat the above for each ESC. 4. Even after Manual calibration occasionally the ESCs will not initialize (continuous loud beeping). If this is the case, try one additional automatic calibration. 5. Normally if the ESCs are properly calibrated, when you power up the Quad and APM2 by plugging in the battery, there should be a slow ticking and the motors may "twitch” just a bit. 6. Once you have the slow twitch / motor tick on battery connection, arm the motors by holding all the way down and to the right on the throttle for at least 4 seconds. The red LED should come on solid and the motors should respond to throttle and turn on at the same time in sync. 7. Disarm by holding the throttle down and to the left for 4 seconds. 8. If the APM2 board failed to arm set the throttle trim a few clicks lower and try again. The bottom throttle setting must be below zero to permit arming. 9. Once armed, the motors should start at the same time and run at the same speed E

Appendices ‫ــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ‬ with only the throttle being moved. If not, you need to go through ESC calibration again. E. Setting Prop Direction and checking the sensors for correct operation. 1. A Quadcopter has two props turning clockwise and two turning counter

clockwise which keeps it from inadvertently turning on its own axis, but permits it to turn (Yaw) when it is commanded to. 2. You need 2 matched clockwise propellers usually marked R or P and 2 counter clockwise ones. 3. The 2 clockwise propellers are opposite each other as are the 2 counter clockwise propellers. 4. Without propellers installed, turn on your transmitter, plug in the battery and verify and correct each motor so it is turning in the direction as indicated below then install the propellers. Reverse any 2 of the ESCs 3 motor lead connections to reverse the direction of the motor.

F

‫‪Appendices‬‬ ‫ــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ‬

‫‪G‬‬

‫‪Appendices‬‬ ‫ــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ‬

‫‪H‬‬

‫‪Appendices‬‬ ‫ــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ‬ ‫‪APPENDIX B: MPU-6000/MPU-6050 9-Axis Evaluation Board‬‬ ‫‪User Guide‬‬

‫‪Figure 2 MPU-600‬‬

‫‪Power selection jumpers‬‬

‫‪I‬‬

‫‪Appendices‬‬ ‫ــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ‬ ‫‪1‬‬ ‫‪User Interface connector signals‬‬

‫‪J‬‬

‫‪Appendices‬‬ ‫ــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ‬ ‫‪APPENDIX C: Atmega 2560‬‬

‫‪Figure 3 Atmega 2560‬‬

‫‪K‬‬

‫‪Appendices‬‬ ‫ــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ‬

‫‪Figure 4 Block diagram of Atmega architecture‬‬

‫‪L‬‬

‫‪Appendices‬‬ ‫ــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ‬ ‫‪APPENDIX D: NEO-6 Ublox GPS‬‬

‫‪Figure 5 NEO-6‬‬

‫‪Figure 6 Block Diagram‬‬

‫‪Figure 7 Pin Assignment‬‬ ‫‪M‬‬

‫‪Appendices‬‬ ‫ــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ‬ ‫‪Description of Pins‬‬

‫‪Maximum Rating‬‬

‫‪N‬‬

‫‪Appendices‬‬ ‫ــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــــ‬ ‫‪APPENDIX E : Motors‬‬

‫‪O‬‬

Suggest Documents