By
RICH SUTRISNO 11601063
BACHELOR’S DEGREE in
MECHANICAL ENGINEERING – MECHATRONICS CONCENTRATION FACULTY OF ENGINEERING AND INFORMATION TECHNOLOGY
SWISS GERMAN UNIVERSITY The Prominence Tower
Jalan Jalur Sutera Barat No. 15, Alam Sutera Tangerang, Banten 15143 - Indonesia
July 2020
Revision after Thesis Defense on 10 July 2020
Rich Sutrisno STATEMENT BY THE AUTHOR
I hereby declare that this submission is my own work and to the best of my knowledge, it contains no material previously published or written by another person, nor material which to a substantial extent has been accepted for the award of any other degree or diploma at any educational institution, except where due acknowledgement is made in the thesis.
Rich Sutrisno
_____________________________________________
Student Date
Approved by:
Dr. Rusman Rusyadi, B.Eng., M.Sc.
_____________________________________________
Thesis Advisor Date
Dr. Eka Budiarto, S.T, M.Sc.
_____________________________________________
Thesis Co-Advisor Date
Dr. Maulahikmah G. S.Kom, M.Sc.
_____________________________________________
Dean Date
Rich Sutrisno ABSTRACT
AUTONOMOUS OBSTACLE AVOIDANCE FOR QUADCOPTER
By Rich Sutrisno
Dr. Rusman Rusyadi, B.Eng., M.Sc., Advisor Dr. Eka Budiarto, S.T, M.Sc., Co-Advisor
SWISS GERMAN UNIVERSITY
Obstacle avoidance for UAV can help to increase safety feature on autopiloting flight of Autonomous UAV. The obstacle avoidance feature that can sense and react accordingly can significantly help and open much more opportunity for future autonomous UAV development. The goal of this thesis is to develop and test autonomous UAS and integrate obstacle avoidance feature to a standard quadcopter in autopiloting UAS. The quadcopter used in this thesis will use ArduCopter flight controller with distance sensor to detect and avoid simple shape static obstacle.
Experiment for the UAS system will include basic autonomous flight testing, simple mission testing such as point to point navigation and delivery mission and lastly testing for obstacle avoidance feature.
Keywords: UAV, Drone, Autonomous, Obstacle Avoidance, Quadcopter, UAS.
Rich Sutrisno
© Copyright 2020 by Rich Sutrisno All rights reserved
Rich Sutrisno DEDICATION
First and foremost, I dedicated this work for GOD’s glory.
I also dedicated this work to those who take action to make the future better than the present.
To all my friend, with special dedication in memory of Ari.
To all my relatives and family members especially in loving memory of my grandfather who inspired me to make a better future for everyone by helping others
unconditionally.
Actions speaks louder than words
Rich Sutrisno ACKNOWLEDGEMENTS
Firstly, I thank GOD for all that is given to me to this day especially for the greatest support throughout making this thesis.
I would like to thank my Family that believe in me and for their continuous support, who played an important role which allows me to be in this position to accomplish
this thesis work.
To all my SGU friend who always support and help me socially and academically to finish my bachelor’s degree in time.
To all faculty member, lecturer, mentor and professor for their support and guidance that allows me to make this thesis with special mention to my advisor Rusman Rusyadi and co-advisor Eka Budiarto for their guidance that help me to accomplish
this thesis.
To all the church organization and employee for authorizing access to the complex for quadcopter testing.
And to those who directly or indirectly contribute by inspiring me to successfully completed this thesis.
Rich Sutrisno TABLE OF CONTENTS
Page
AUTONOMOUS OBSTACLE AVOIDANCE FOR QUADCOPTER ... 1
STATEMENT BY THE AUTHOR ... 2
ABSTRACT ... 3
DEDICATION ... 5
ACKNOWLEDGEMENTS ... 6
TABLE OF CONTENTS ... 7
LIST OF FIGURES ... 11
LIST OF TABLES ... 15
CHAPTER 1 - INTRODUCTION ... 16
1.1. Background ... 16
1.2. Overview ... 17
1.3. Research Problems ... 18
1.4. Research Objectives ... 18
1.5. Significance of Study ... 18
1.6. Research Questions ... 18
1.7. Hypothesis ... 18
CHAPTER 2 - LITERATURE REVIEW ... 20
2.1. UAS ... 20
2.1.1. UAS classification ... 20
2.1.1.1. Organization Classification ... 21
2.1.1.2. Autonomy Classification ... 22
2.1.1.3. UAV Structural Classification ... 23
2.1.2. UAV ... 24
2.1.2.1. Quadcopter ... 25
2.1.3. Ground Control Station ... 25
2.1.4. Communication in UAS ... 26
2.1.4.1. Radio Control communication ... 26
2.1.4.2. MAV-Link Communication Protocol ... 27
2.2. On-board Flight Controller (FC)... 28
Rich Sutrisno
2.2.2.1. Nvidia Jetson ... 29
2.2.2.2. Raspberry Pi ... 30
2.2.2.3. Arduino Family ... 31
2.3. Additional Module for autonomous UAS ... 31
2.3.1. GPS ... 31
2.3.2. Radio Telemetry ... 32
2.3.3. Servo ... 32
2.3.4. Landing Gear ... 33
2.4. Obstacle avoidance ... 33
2.4.1. Distance sensing ... 34
2.4.1.1. Principal of distance sensing ... 34
2.4.1.2. Sensor Types ... 35
2.4.2. Path planning ... 36
2.4.3. UAV control maneuvering ... 36
2.4.4. Currently available obstacle avoidance features in autonomous UAV 36 2.5. Potential architecture ... 37
2.5.1. (Nvidia Jetson and stereo camera) Potential architecture ... 37
2.5.2. (Raspberry Pi and stereo camera) Potential architecture ... 38
2.5.3. (Raspberry Pi and VIO tracking camera) Potential architecture ... 38
2.5.4. (Arduino and TOF sensor) Potential architecture ... 39
2.5.5. Comparison summary of studied architecture ... 40
2.6. Mathematical modelling ... 41
2.6.1. Coordinate system used for UAV modelling ... 41
2.6.1.1. ECEF coordinate system ... 42
2.6.1.2. NED coordinate system ... 42
2.6.1.3. Geodetic coordinate system ... 43
2.6.1.4. Body coordinate system ... 43
2.6.1.5. Vehicle-carried NED... 44
2.6.2. Translational Kinematics ... 45
2.6.3. Rotational Kinematics ... 46
2.6.4. Electrical Brushless Motors ... 46
2.6.5. Translational Dynamics ... 47
2.6.6. Rotational Dynamics ... 48
2.6.7. Equations of Motion ... 50
2.7. Control System Design ... 50
2.7.1. Simplified PID Control ... 52
2.7.2. Position Control ... 54
2.7.3. Attitude and Altitude Control ... 54
2.7.4. Angular Velocity Control ... 55
2.7.5. Motor control ... 56
2.8. Summary of literature review ... 57
CHAPTER 3 - RESEARCH METHODS ... 59
3.1. Basic Quadcopter Material ... 59
Rich Sutrisno
3.1.2. Motors ... 60
3.1.3. Propellers ... 61
3.1.4. Electronic Speed Controller ... 62
3.1.5. Power supply and Battery ... 63
3.1.6. Remote Control Transmitter and Receiver ... 64
3.1.7. Power Module ... 65
3.2. Controller ... 65
3.2.1. ArduCopter (APM V2.8) ... 66
3.2.2. Firmware ... 67
3.2.3. Companion Computer ... 68
3.3. Supporting Module and component ... 68
3.3.1. U-blox GPS and compass Module ... 69
3.3.2. Telemetry Module ... 70
3.3.3. Servo module ... 71
3.3.4. TOF Sensor ... 72
3.3.5. Battery Monitoring ... 73
3.4. Calculation regarding the quadcopter ... 74
3.4.1. Power calculation for battery ... 74
3.4.2. Thrust calculation ... 75
3.4.3. Torque proportionality constant calculation ... 76
3.5. Architecture ... 77
3.5.1. The basic Quadcopter ... 80
3.5.2. Autopiloting Quadcopter (Autonomous) ... 80
3.5.3. Auto Delivery Quadcopter ... 81
3.5.4. Obstacle avoidance Quadcopter ... 82
3.6. Assembly of Quadcopter ... 82
3.6.1. Mechanical assembly quadcopter ... 82
3.6.2. Autonomous Quadcopter wiring ... 86
3.6.3. Servo module integration of delivery mission quadcopter ... 87
3.6.4. Obstacle avoidance architecture ... 88
3.6.5. Obstacle avoidance development ... 92
3.6.6. Obstacle avoidance integration ... 94
3.7. General methodology of autopiloting program ... 96
3.7.1. Initial installation for Mission Planner (Ardupilot software) ... 98
3.7.2. Initial setup for APM ... 100
3.7.2.1. Frame type setup ... 101
3.7.2.2. Accelerometer calibration ... 102
3.7.2.3. Compass calibration for direction heading ... 104
3.7.2.4. Radio and Remote Controller calibration ... 106
3.7.2.5. ESC calibration ... 109
3.7.2.6. Flight Mode Setting ... 112
3.7.2.7. Fail Safe setting ... 115
3.7.2.8. PID tuning ... 116
3.7.3. Optional setup for APM ... 118
Rich Sutrisno
3.7.3.3. Setup for delivery servo module ... 126
3.8. Data Capture of the Testing (Log files) ... 127
3.8.1. Payload Testing ... 130
3.8.2. RTL Testing ... 133
3.8.3. Auto Delivery Testing ... 135
3.8.4. TOF sensor Testing ... 141
3.8.5. Obstacle Avoidance Testing ... 144
3.9. Testing flowchart ... 146
CHAPTER 4 - Testing Result and Discussion ... 149
4.1. Payload testing analysis ... 149
4.1.1. 100 grams testing ... 149
4.1.2. 200 grams testing ... 151
4.1.3. 300 grams testing ... 152
4.1.4. 400 grams testing ... 154
4.1.5. 500 grams testing ... 156
4.1.6. 600 grams testing ... 157
4.2. Payload and maneuvering testing Result ... 159
4.2.1. Thrust analysis ... 161
4.2.2. Stabilization analysis ... 163
4.3. Further analysis of quadcopter ... 165
4.3.1. Thrust analysis ... 165
4.3.2. Torque proportionality constant analysis ... 166
4.3.3. Validation of mathematical modeling ... 167
4.4. GPS accuracy results ... 168
4.5. Automatic delivery results ... 175
4.6. TOF sensor result ... 183
4.7. Obstacle avoidance results ... 187
CHAPTER 5 - Conclusion and Recommendations ... 191
5.1. Conclusion ... 191
5.2. Recommendation ... 191
GLOSSARY ... 193
REFERENCES ... 195
CURRICULUM VITAE ... 205
Rich Sutrisno LIST OF FIGURES
Figures Page
Automated and autonomous UAS behaviour (Industrial and Group, 2004)... 22
Fixed Wing UAV (World Defence News, 2012) ... 23
Multirotor UAV Figure 4. Common multi rotor UAV ... 24
Six degree of freedom ... 24
Basic quadcopter motor arrangement (ArduPilot Dev Team, no date d)... 25
Virtual Cockpit of a GCS ... 26
FS-i6X two stick RC transmitter (FLY SKY, 2016) ... 27
MAVLink Message Frame (ArduPilot Dev Team, no date c) ... 28
ArduCopter FC ... 29
NVIDIA Jetson Modules (Serzhenko, 2020) ... 30
Raspberry Pi computer (Raspberry Pi, 2020) ... 30
UAV GPS Module ... 32
Radio Telemetry Module (ArduPilot Dev Team, no date g) ... 32
Types of servo motor (EG Projects, 2019) ... 33
Retractable UAV landing gear (Hobby King, no date) ... 33
Coordinate System for UAV modelling (Mohammad Ryan Dirgantara, 2018) ... 41
Body Coordinate System (Mohammad Ryan Dirgantara, 2018) ... 43
Vehicle Carried North-East Down (Mohammad Ryan Dirgantara, 2018) ... 44
Thrust and Toque free-body diagram (Mohammad Ryan Dirgantara, 2018) ... 46
Output with different value of kP in P control (Astrom and Hagglund, 1995) ... 53
Output with different value of kI in I control (Astrom and Hagglund, 1995)... 53
Output with different value of kD in D control (Astrom and Hagglund, 1995) ... 54
F450 Quadcopter Frame with landing gear ... 59
DYS 2212 brushless motor ... 60
DJI 9450 Self-Tightening Propeller ... 61
ZTW Spider 30A OPTO ESC ... 62
Tiger Li-po battery 5400mah 3s 45c ... 63
FlySky-i6 RC transmitter (Left) and FS-iA6 Receiver and bind plug ... 64
3-dr Power Module (ArduPilot Dev Team, no date a). ... 65
ArduCopter V2.8 APM FC Board ... 66
Available ArduPilot Firmware ... 67
Arduino Mega ... 68
U-blox GPS Neo 6M chip with compass module ... 69
3-dr Radio telemetry Module ... 70
TowerPro SG90 Servo Motor ... 71
Rich Sutrisno
Motor speed bench testing by Boentoro (Boentoro, 2016) ... 77
Standard ArduPilot architecture ... 78
Quadcopter target architecture ... 79
Quadcopter assembly flowchart progress ... 80
Assembly of F450 frame (DJI, 2015) ... 83
Assembly of F450 landing gear ... 83
ESC to Motor and battery connector connection to the base PCB (DJI, 2015) ... 84
Final quadcopter assembly with integrated obstacle avoidance (Top View)... 85
Final quadcopter assembly with integrated obstacle avoidance (Bottom View) ... 85
Autonomous quadcopter wiring with supporting module ... 87
Servo module wiring with APM and companion computer ... 88
Architecture and flowchart of the obstacle avoidance ... 90
Screenshot of the obstacle avoidance program ... 91
Final weight of the qudcopter after assembly and integration ... 93
Final wiring of the obstacle avoidance feature to the quadcopter... 95
Program of the obstacle avoidance ... 95
Setup of RTL mode after obstacle avoidance integration ... 96
Flowchart for autopilot program ... 98
Mission Planner Setup Wizard ... 99
Windows security warning pop-up window ... 99
Mission Planner Application ... 100
Frame Type setup with Parameter Compare window ... 101
Manual Frame Type setup (X-QUAD) ... 102
Accelerometer Calibration setup window ... 103
Accelerometer Calibration of Tri-Copter ... 103
Tilt and leveling check in virtual cockpit... 104
Compass calibration window ... 104
Live Compass calibration pop-up window ... 105
New Mag Offsets pop-up window ... 105
Radio calibration window ... 106
Radio calibration powered and connection window ... 106
Radio calibration window with red markings ... 107
RC Radio calibration extreme position ... 107
Radio calibration window with red markings on Max. and Min. point ... 108
Radio calibration summary pop-up window ... 108
ESC Calibration window ... 109
RC Initial position ... 110
RC position for ESC calibration ... 110
Flight mode setup window ... 114
Complete setup for autonomous mission ... 115
Complete setup of failsafe autonomous mission ... 116
Example of test rig for PID tuning (Fields, 2017) ... 117
PID tuning window ... 118
Device Manager of USB to UART Bridge (Telemetry) ... 119
Drivers update for USB to UART Bridge (Telemetry)... 120
Rich Sutrisno
USB to UART Bridge is recognised ... 121
Sik Radio Telemetry setup window ... 122
Sik Radio Telemetry setting ... 123
Connecting to UAV using Radio Telemetry ... 123
Battery monitoring module connection ... 124
Battery Monitoring window ... 125
Battery Monitoring calibrating window ... 125
Full parameter list view for servo module ... 126
Left: initial servo position, Right: Final servo position ... 126
Servo calibration window ... 127
Servo calibration result ... 127
Enabling data logging in Mission Planner GCS ... 128
Data flash section in Mission Planner GCS ... 128
Downloading data log in Mission Planner GCS ... 129
Example of data log graph in Mission Planner GCS ... 129
Payload testing rig with safety rope attachment ... 131
Additional weight attachment ... 132
Home drop pin on flight plan map ... 134
GPS 3D Fix seen from virtual cockpit ... 134
Successful connection the UAV to GCS... 135
Flight plan tab of ArduPilot GCS with homing drop pin ... 136
Additional information about the mission planner ... 137
Making flight plan in mission planner 1 ... 137
Making flight plan in mission planner 2 ... 138
Making flight plan in mission planner 3 ... 139
Making flight plan in mission planner 4 ... 139
Making flight plan in mission planner 5 ... 140
Saving flight plan in mission planner ... 140
Wiring of sensor to Arduino ... 142
Arduino Program for VL53L0X testing ... 142
Measurement rig for sensor distance testing ... 143
Testing of TOF sensor after integration ... 144
Testing flowchart of the research ... 146
Altitude vs time graph of 100g payload testing ... 150
Throttle vs time graph of 100g payload testing ... 150
Altitude vs time graph of 200g payload testing (- 1-meter offset)... 151
Throttle vs time graph of 200g payload testing ... 152
Altitude vs time graph of 300g payload testing ... 153
Throttle vs time graph of 300g payload testing ... 153
Altitude vs time graph of 400g payload testing (+ 1-meter offset) ... 155
Throttle vs time graph of 400g payload testing ... 155
Altitude vs time graph of 500g payload testing ... 156
Throttle vs time graph of 500g payload testing ... 157
Altitude vs time graph of 600g payload testing (with suspected offset) ... 158
Throttle vs time graph of 600g payload testing ... 158
Total weigth after final payload testing (600 grams testing) ... 159
Rich Sutrisno
Real Yaw (RED) and Desired Yaw (GREEN) vs Time graph for 400 g testing ... 164
Lift testing provided by Boentoro (Boentoro, 2016) ... 165
Google eath image of the RTL testing ... 169
First RTL testing in church complex ... 170
Second RTL testing in church complex ... 171
Third RTL testing in church complex ... 171
Sketch of RTL testing in church complex ... 172
Sketch of additional RTL from other testing ... 173
GPS Multipathing of reflected signals ... 174
Flight plan of the first automatic delivery testing with actual path ... 176
First successful autonomous delivery testing... 176
Illustration of suburban delivery mission testing ... 177
Second delivery testing flight plan ... 177
Long delivery testing flight plan ... 178
Proof of three consecutive succesfull autonomous delivery testing ... 179
Proof of two consecutive succesfull long autonomous delivery testing ... 179
Illustration of three consecutive succesfull autonomous church complex delivery mission testing ... 180
Illustration of two consecutive succesfull long autonomous delivery mission testing ... 180
Illustration of all autonomous delivery test result ... 182
Measurement testing result of VL53L0X (0.5m, 1m, 1.25m max) ... 183
TOF testing graph after integration ... 185
Proof of changing flight mode (Blue or Pink loiter, Green auto) ... 187
Path planning of the second try from Dirgantara Thesis work (Mohammad Ryan Dirgantara, 2018) ... 187
Screenshoot of the quadcopter clearing the obstacle during autonomous delivery testing ... 188
Rich Sutrisno LIST OF TABLES
Table Page
NATO UAS Classification Guide. September 2009 JCGUAV meeting ... 21
DoD UAV Classification ... 21
NASA UAS Classification ... 21
Summary of studied architecture ... 40
F450 Quadcopter frame full specification ... 59
DYS 2212 brushless motor full specification ... 60
DJI 9450 Self-Tightening Propeller full specification ... 61
ZTW Spider 30A OPTO ESC full specification ... 62
Tiger Li-po battery 5400mah 3s 45c full specification ... 63
3-dr Power Module Specification ... 65
U-blox Neo 6M GPS Module Specification ... 69
3-dr Radio telemetry Module Specification ... 70
TowerPro SG90 Servo Motor Specification ... 71
VL53L0X TOF Sensor Specification ... 72
1-8 S Battery Monitoring Module full specification ... 73
Wiring table for servo module ... 88
Flight mode available with ArduPilot ... 112
Collective data from Payload Testing ... 160
Compilation of RTL testing result ... 173
Collective data of delivery testing done ... 182
Testing result of 100 data of TOF sensor ... 185