SW5 Final for reals (PDF)




File information


This PDF 1.6 document has been generated by LaTeX with hyperref package / pdfTeX-1.40.15, and has been sent on pdf-archive.com on 13/12/2016 at 21:46, from IP address 192.38.x.x. The current document download page has been viewed 549 times.
File size: 25.91 MB (185 pages).
Privacy: public file
















File preview


Autonomous Quadcopter
- For mapping an indoor space

21. december 2015

Group SW511-E15
Aalborg University

Institut for Datalogi
Selma Lagerløfs Vej 300
9220 Aalborg Ø
Telefon (+45) 9940 9940
Fax (+45) 9940 9798
http://cs.aau.dk

Title:
Quadcopter
Theme:
Embedded system
Project Period:
Fall 2015
Project Group:
SW511E15
Participant(s):
Alexander Kaleta Jensen
Andi Rosengreen Kjærsig Aaes
Kaare Bak Toxværd Madsen
Malthe Dahl Jensen
Niklas Ulstrup Larsen
Thomas Bjelbo Thomsen
Supervisor(s):
Xike Xie
Copies: 8
Page Numbers: 175
Date of Completion:
December 21, 2015

Abstract:
This paper covers the development of
an automated quadcopter that should
have the ability to automatically fly in
an intelligent manner, while mapping its
environment and avoiding obstacles. The
development of the system is divided into
four main tasks with each task focusing
on a different part of the final system.
The four tasks are completed in order
of importance with each task dependent
of the previous task.
The first task
being stabilization of the quadcopter,
second task being movement and obstacle
avoidance, the third task being the system
having knowledge of its own position and
the fourth task being mapping of the
environment.
The system hardware in this project has
been chosen from an analysis of the requirements and a comparison of different
hardware opportunities to find the hardware components that best satisfy a solution to the system requirements. Further
tests on the different hardware and software components have been performed to
modify them to give the best results as
possible.

The content of this report is freely available, but publication (with reference) may only be pursued due to
agreement with the author.

ii

Signatures

Alexander Kaleta Jensen

Andi Rosengreen Kjærsig Aaes

Kaare Bak Toxværd Madsen

Malthe Dahl Jensen

Niklas Ulstrup Larsen

Thomas Bjelbo Thomsen

iii

Preface
This report is written and developed by project group SW511E15 from the fifth semester
of the software study at Aalborg University. The project began on the 2. September
2015, and was completed the 21. December 2015. The theme of the project is Embedded
Systems and the specific problem is to create and implement an autonomous quadcopter.
This report uses monospace for visualization of functions, methods and variables relevant
to the software used in this project. For citation, the Vancouver method is used, where
sources is indicated with a number in square brackets (i.e. [2]), and comma separation if
multiple sources. The title, author(s) and other relevant information can then be found
in the bibliography.
Throughout this report several abbreviations will be used. The abbreviations will be
described when they are used in the report, but for good practice the most frequently
used will be stated here as well:
ESC Electronic Speed Controller
IMU Inertial Measurement Unit
PID Proportional–Integral–Derivative controller

Contents
I Introduction
0.1
0.2
0.3

1

Initial problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Software requirements specification . . . . . . . . . . . . . . . . . . . . . . .
Process model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

2
4
5

II Task One

7

1 Introduction
1.1 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2 System design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8
8
8

2 Analysis and tests
2.1 IMU . . . . . . . . . . . . . .
2.2 Actuators . . . . . . . . . . .
2.3 Sensor fusion . . . . . . . . .
2.4 Sensor fusion test . . . . . . .
2.5 Reduction of the fluctuations
2.6 PID Controller . . . . . . . .
2.7 Flight controller . . . . . . .
2.8 Test of the flight controller .

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.

17
17
17
20
22
25
29
35
37

3 Task conclusion

42

III Task Two

43

4 Introduction
44
4.1 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
5 Analysis
46
5.1 Choosing distance sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
5.2 Sonar sensor (HC-SR04) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
5.3 Bluetooth module (JY-MCU) . . . . . . . . . . . . . . . . . . . . . . . . . . 53
6 Design
56
6.1 Component design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
6.2 Code design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
7 Implementation

61

vi

CONTENTS
7.1
7.2

Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Scheduler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

8 Test
66
8.1 Purpose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
8.2 Setup and execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
8.3 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
9 Task conclusion

71

IV Task Three

72

10 Introduction
73
10.1 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
11 Analysis
74
11.1 Position determination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
11.2 Position determination using IMU . . . . . . . . . . . . . . . . . . . . . . . 75
12 Test
77
12.1 Test precision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
13 Task conclusion

80

V Task Four

81

14 Introduction
82
14.1 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
15 Analysis
15.1 State space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15.2 Grid size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15.3 Search algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

84
84
85
86

16 Design
91
16.1 Component design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
16.2 Code design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
17 Implementation and test
17.1 Step one: simulation . . . . . .
17.2 Step two: physical test . . . . .
17.3 Step three: updated simulation
17.4 Step four: physical test 2 . . .
18 Task conclusion

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

.
.
.
.

93
93
102
104
105
108

vii

CONTENTS

VI Evaluation

109

19 Reflection

110

20 Conclusion

113

21 Future work

115

Bibliography

117

VIIAppendix

120

A Task one
A.1 Technical description of GY-85’s sensors
A.2 Configuration and results of motor tests
A.3 Test configuration . . . . . . . . . . . .
A.4 Test results . . . . . . . . . . . . . . . .
A.5 PID tuning data . . . . . . . . . . . . .

121
. 121
. 123
. 123
. 124
. 127

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

B Task two
135
B.1 Testing of HC-SR04 sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
B.2 Data from testing HC-SR04 . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
C Task three
148
C.1 IMU distance determination . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
D Task four
D.1 Weight test 1 data . . . . . . . . .
D.2 Pictures of physical test 2 . . . . .
D.3 Weight test 2 data . . . . . . . . .
D.4 Class diagram . . . . . . . . . . . .
D.5 Weight test one analysis and result
D.6 Step one result . . . . . . . . . . .
D.7 Step two physical test . . . . . . .
D.8 Weight test two analysis and result
D.9 Step three result . . . . . . . . . .

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

.
.
.
.
.
.
.
.
.

151
. 151
. 157
. 159
. 164
. 165
. 167
. 169
. 171
. 173






Download SW5 Final for reals



SW5 Final for reals.pdf (PDF, 25.91 MB)


Download PDF







Share this file on social networks



     





Link to this page



Permanent link

Use the permanent link to the download page to share your document on Facebook, Twitter, LinkedIn, or directly with a contact by e-Mail, Messenger, Whatsapp, Line..




Short link

Use the short link to share your document on Twitter or by text message (SMS)




HTML Code

Copy the following HTML code to share your document on a Website or Blog




QR Code to this page


QR Code link to PDF file SW5 Final for reals.pdf






This file has been shared publicly by a user of PDF Archive.
Document ID: 0000521744.
Report illicit content