vices and their integration with the helicopter and ground station. In the mechanical ..... 3.19 Raw and Gyro stabilized X acceleration data . . . . . . . . . . . . . 69 ..... aerodynamic forces to provide vehicle lift, can fly autonomously or be ..... meant to serve as a guide or manual for new researchers in the field to approach such.
Development of Ground Station and Onboard Sensors for an Autonomous Mini Helicopter A Thesis submitted in partial fulfillment of the requirements for the degree of
Master of Technology by
Puneet Singh
to the
Department of Aerospace Engineering Indian Institute of Technology Kanpur May 2013
Abstract
Unmanned aerial vehicles are gaining prominence in civil and military roles throughout the world. Keeping with this development, IIT Kanpur initiated work on the Design and Development of an Autonomous Mini Helicopter in 2006. Several studies over the past years have focused on mechanical, electrical and control aspects of the vehicle. The current work presents a comprehensive study of the on-board devices and their integration with the helicopter and ground station. In the mechanical systems, the main rotor blade was tested for its mass and inertia properties. In the electronic systems, a radio control transmitter was modified and configured for use from the ground station. An RPM measurement circuit was designed and built. Integration of a global positioning system with the helicopter is presented. Furthermore, the ground station software with the control algorithms is implemented on a Real Time PXI system. The ground station is designed to be user friendly and modular for ease in further development. The entire system was tested and flown under various degrees of autonomy. The RPM dynamics of the main rotor was analyzed and compared with theory. These results bore a good match with the experimental data. The results of the test flight were analyzed and used for developing robust control in hover.
To the men and women behind the science of flight
Acknowledgements It is a difficult task to do justice and acknowledge every single person who has helped make this work possible. Firstly, I would like to thank my professor and guide, Prof. C. Venkatesan. He has played a pivotal role in my studies at IIT Kanpur, and provided me an opportunity to work in his lab since the beginning of my second year. Through him I have gained access to many opportunities and my gratitude is unbound for him. I would like to thank all the staff in the helicopter lab, without whom not a single percent of the work in this thesis would have gotten done. I would also like to thank the students and people who worked in the project much before me, and whom I could never meet, but their work was the foundation on which I could build upon. A hearty thanks goes to all the faculty that I have had the privilege of learning from at IIT Kanpur. In many unexpected ways, I have required the knowledge I gained in every course, right from the first year, in my work. I would also like to mention the people who are most relied upon on our stay in campus, but too often forgotten. The mess workers, the washer men and women, the cleaning staff, the gardeners and the security guards. Lastly, I would like to mention the amazing company of friends I have made at IIT Kanpur. From seniors to juniors, I have learnt many things from everyone. I wish them thanks from the bottom of my heart.
Contents List of Figures
vi
List of Tables
xi
Glossary
xiii
1 Introduction 1.1
1
Unmanned Aerial Vehicles . . . . . . . . . . . . . . . . . . . . . . .
2
1.1.1
Applications . . . . . . . . . . . . . . . . . . . . . . . . . . .
2
1.1.2 Economics . . . . . . . . . . . . . . . . . . . . . . . . . . . . Rotary Wing UAVs . . . . . . . . . . . . . . . . . . . . . . . . . . .
3 3
1.2.1
Historical Origin . . . . . . . . . . . . . . . . . . . . . . . .
4
1.2.2
Industry . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6
1.2.3 1.2.4
Academic Research . . . . . . . . . . . . . . . . . . . . . . . Prior Work at IIT Kanpur . . . . . . . . . . . . . . . . . . .
8 14
1.3
Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
14
1.4
Thesis Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
15
1.2
2 Mini Helicopter 2.1
17
Main Components . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1.1 Engine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
18 18
2.1.2
Clutch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
20
2.1.3
Main Gear . . . . . . . . . . . . . . . . . . . . . . . . . . . .
20
2.1.4 2.1.5
Stabilizer Bar . . . . . . . . . . . . . . . . . . . . . . . . . . Linkages . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
21 23
2.1.6
Tail Rotor . . . . . . . . . . . . . . . . . . . . . . . . . . . .
23
2.1.7
Receiver Box . . . . . . . . . . . . . . . . . . . . . . . . . .
25
iv 2.1.8 2.1.9 2.2
Sensor Tray . . . . . . . . . . . . . . . . . . . . . . . . . . . Safety Cross Bar . . . . . . . . . . . . . . . . . . . . . . . .
25 28
Blades . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
28
2.2.1
Blade Balancing . . . . . . . . . . . . . . . . . . . . . . . . .
30
2.2.2
Blade Tracking . . . . . . . . . . . . . . . . . . . . . . . . .
44
3 Electronic Systems 3.1 Communication Units
3.2
3.3
3.4
. . . . . . . . . . . . . . . . . . . . . . . . .
47 47
3.1.1
R/C Transmitter and Receiver . . . . . . . . . . . . . . . . .
47
3.1.2
XBee Units . . . . . . . . . . . . . . . . . . . . . . . . . . .
58
Actuators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.1 Servo S3151 . . . . . . . . . . . . . . . . . . . . . . . . . . .
60 62
3.2.2
Servo S9256 and Gyro GY611 . . . . . . . . . . . . . . . . .
64
Sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
67
3.3.1 3.3.2
IMU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Sonar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
67 71
3.3.3
RPM Measurement . . . . . . . . . . . . . . . . . . . . . . .
73
Power Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
81
3.4.1 3.4.2
81 81
UBEC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Battery . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4 Ground Station 4.1
4.2
4.3
83
Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
83
4.1.1 4.1.2
Real Time PXI system . . . . . . . . . . . . . . . . . . . . . Acquisition Cards . . . . . . . . . . . . . . . . . . . . . . . .
84 85
Control Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
85
4.2.1
RPM Control . . . . . . . . . . . . . . . . . . . . . . . . . .
87
4.2.2 4.2.3
Height Control . . . . . . . . . . . . . . . . . . . . . . . . . Yaw Control . . . . . . . . . . . . . . . . . . . . . . . . . . .
89 89
4.2.4
Roll-Pitch Control . . . . . . . . . . . . . . . . . . . . . . .
91
Software Architecture . . . . . . . . . . . . . . . . . . . . . . . . . .
93
4.3.1 4.3.2
Shared Variables . . . . . . . . . . . . . . . . . . . . . . . . Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . .
96 98
4.3.3
Conditioning . . . . . . . . . . . . . . . . . . . . . . . . . . 107
4.3.4
Data Logging . . . . . . . . . . . . . . . . . . . . . . . . . . 110
v
5 RPM Dynamics 5.1
Theoretical Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 5.1.1
5.2
Closed Form Solution . . . . . . . . . . . . . . . . . . . . . . 114
5.1.2 Validation from Experiment . . . . . . . . . . . . . . . . . . 116 Experiments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 5.2.1
Results and Analysis . . . . . . . . . . . . . . . . . . . . . . 121
5.2.2
Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
5.2.3
Collective Link . . . . . . . . . . . . . . . . . . . . . . . . . 124
6 Global Positioning System 6.1
6.2
126
System Description . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 6.1.1
Satellites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
6.1.2 6.1.3
Reference System . . . . . . . . . . . . . . . . . . . . . . . . 127 Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 6.2.1
6.3
113
Expansion Board . . . . . . . . . . . . . . . . . . . . . . . . 130
6.2.2 Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 Calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
7 Flight Testing
136
7.1
Semi Autonomous Flight . . . . . . . . . . . . . . . . . . . . . . . . 136
7.2
Pilot aided Outdoor Flight . . . . . . . . . . . . . . . . . . . . . . . 147
8 Conclusions
158
References
161
Appendices
165
A Basic Atom Pro Code
166
B Navstik Code
168
B.1 GPS Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 B.2 GPS Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 B.3 Main . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
List of Figures 1.1
Gyrodyne QH-50C DASH . . . . . . . . . . . . . . . . . . . . . . .
4
1.2 1.3
Industrial helicopter UAVs . . . . . . . . . . . . . . . . . . . . . . . Academic research helicopter UAVs . . . . . . . . . . . . . . . . . .
9 13
2.1 2.2
Mini Helicopter Setup . . . . . . . . . . . . . . . . . . . . . . . . . Zenoah G260PUH engine . . . . . . . . . . . . . . . . . . . . . . . .
17 19
2.3
Fuel Tank . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
19
2.4
Centrifugal Clutch Bell . . . . . . . . . . . . . . . . . . . . . . . . .
20
2.5 2.6
Main and Tail rotor transmission . . . . . . . . . . . . . . . . . . . Stabilizer Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
21 21
2.7
Helicopter linkages and transmission . . . . . . . . . . . . . . . . .
22
2.8
Swash plate Motion . . . . . . . . . . . . . . . . . . . . . . . . . . .
22
2.9 Tail rotor blade planform . . . . . . . . . . . . . . . . . . . . . . . . 2.10 Tail swash plate Motion . . . . . . . . . . . . . . . . . . . . . . . .
24 24
2.11 Tail rotor transmission shaft . . . . . . . . . . . . . . . . . . . . . .
25
2.12 Receiver Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
26
2.13 Sensor Tray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.14 Sensor Tray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
26 27
2.15 Vibration Isolator . . . . . . . . . . . . . . . . . . . . . . . . . . . .
27
2.16 Safety Cross Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . .
29
2.17 Rotor blade . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.18 Blade cross section . . . . . . . . . . . . . . . . . . . . . . . . . . .
29 29
2.19 Blade CG Location . . . . . . . . . . . . . . . . . . . . . . . . . . .
31
2.20 Keyence LK-2001 Laser Displacement Sensor . . . . . . . . . . . . .
32
2.21 Blade inertia estimation experiment setup . . . . . . . . . . . . . . 2.22 H Link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
33 34
vii
2.23 Simplified blade model . . . . . . . . . . . . . . . . . . . . . . . . .
35
2.24 Free Body Diagram of Blade and Attachments . . . . . . . . . . . .
36
2.25 Oscillation Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . .
40
2.26 Complete blade displacement data . . . . . . . . . . . . . . . . . . . 2.27 H Link Experiments . . . . . . . . . . . . . . . . . . . . . . . . . .
41 41
2.28 Blade 1 Experiments . . . . . . . . . . . . . . . . . . . . . . . . . .
42
2.29 Blade 2 Experiments . . . . . . . . . . . . . . . . . . . . . . . . . .
42
2.30 Blade tracking setup . . . . . . . . . . . . . . . . . . . . . . . . . . 2.31 Blade contact with cloth . . . . . . . . . . . . . . . . . . . . . . . .
45 46
2.32 Tracking cloth with blade streaks . . . . . . . . . . . . . . . . . . .
46
3.1
Mini Helicopter Onboard Electronics schematic . . . . . . . . . . .
48
3.2
Futaba 10CHP Transmitter . . . . . . . . . . . . . . . . . . . . . .
49
3.3
Futaba R1410DP Receiver . . . . . . . . . . . . . . . . . . . . . . .
49
3.4 3.5
Internal wiring of the transmitter . . . . . . . . . . . . . . . . . . . DB-15S Connector . . . . . . . . . . . . . . . . . . . . . . . . . . .
51 52
3.6
Pin Diagram of DB-15S Connector . . . . . . . . . . . . . . . . . .
53
3.7
Blade pitch angle measurement . . . . . . . . . . . . . . . . . . . .
56
3.8 3.9
Collective Pitch v/s Stick Position . . . . . . . . . . . . . . . . . . . Duty Cycle v/s Stick Position Calibration (Normal Setting) . . . .
57 58
3.10 Duty Cycle v/s Stick Position Calibration (Reversed Setting) . . . .
59
3.11 Ground station XBee units . . . . . . . . . . . . . . . . . . . . . . .
60
3.12 Futaba Servos used on the Mini Helicopter . . . . . . . . . . . . . . 3.13 Servo Angle Calibration Test Setup . . . . . . . . . . . . . . . . . .
62 63
3.14 Potentiometer Calibration . . . . . . . . . . . . . . . . . . . . . . .
63
3.15 S3151 Servo Angle Calibration . . . . . . . . . . . . . . . . . . . . .
65
3.16 GY611 Gyro and Controller . . . . . . . . . . . . . . . . . . . . . . 3.17 3DM-GX1 Inertial Measurement Unit . . . . . . . . . . . . . . . . .
65 68
3.18 Raw and Gyro stabilized Pitch Angle data . . . . . . . . . . . . . .
69
3.19 Raw and Gyro stabilized X acceleration data . . . . . . . . . . . . .
69
3.20 IMU-XBee 4 Pin Connector Diagram . . . . . . . . . . . . . . . . . 3.21 Sonar modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
70 72
3.22 Sonar-Circuit 4 Pin Connector Diagram
. . . . . . . . . . . . . . .
74
3.23 Magnetic Probe and Collar . . . . . . . . . . . . . . . . . . . . . . .
75
3.24 RPM Sonar Circuit schematic . . . . . . . . . . . . . . . . . . . . .
76
viii
3.25 RPM Filter Circuit response . . . . . . . . . . . . . . . . . . . . . .
78
3.26 Basic Atom Pro 40 on development board . . . . . . . . . . . . . .
79
3.27 RPM Circuit-XBee 4 Pin Connector Diagram . . . . . . . . . . . .
79
3.28 UBEC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.29 LiPo Batteries and Charger . . . . . . . . . . . . . . . . . . . . . .
81 82
4.1 4.2
Ground Station . . . . . . . . . . . . . . . . . . . . . . . . . . . . . RPM Control Diagram . . . . . . . . . . . . . . . . . . . . . . . . .
84 86
4.3
Height Control Diagram . . . . . . . . . . . . . . . . . . . . . . . .
90
4.4
Yaw Control Diagram . . . . . . . . . . . . . . . . . . . . . . . . . .
92
4.5 4.6
Pitch Control Diagram . . . . . . . . . . . . . . . . . . . . . . . . . Roll Control Diagram . . . . . . . . . . . . . . . . . . . . . . . . . .
94 95
4.7
Menu for Host Programs . . . . . . . . . . . . . . . . . . . . . . . .
99
4.8
Settings for Ground Station . . . . . . . . . . . . . . . . . . . . . . 100
4.9 Front panel for DAQ Testing . . . . . . . . . . . . . . . . . . . . . . 101 4.10 Front Panel for IMU Testing . . . . . . . . . . . . . . . . . . . . . 102 4.11 Front Panel for RPM-Sonar Testing
. . . . . . . . . . . . . . . . . 103
4.12 Front Panel for GPS Testing . . . . . . . . . . . . . . . . . . . . . . 104 4.13 Front Panel for Transmitter Calibration . . . . . . . . . . . . . . . . 105 4.14 Front Panel for Full Experiment Run . . . . . . . . . . . . . . . . . 106 4.15 Log File reader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 5.1 5.2
Forces and Moments acting on Rotor and shaft . . . . . . . . . . . 113 RPM variation with time . . . . . . . . . . . . . . . . . . . . . . . . 117
5.3
Thrust variation with time . . . . . . . . . . . . . . . . . . . . . . . 118
5.4
Torque variation with time . . . . . . . . . . . . . . . . . . . . . . . 118
5.5 5.6
Moment acting on loadcell . . . . . . . . . . . . . . . . . . . . . . . 120 RPM v/s Throttle Setting . . . . . . . . . . . . . . . . . . . . . . . 121
5.7
Theoretical main rotor power requirement . . . . . . . . . . . . . . 122
5.8
Calculated Power v/s Throttle Setting . . . . . . . . . . . . . . . . 123
5.9 Moment Coefficient at different pitch angles . . . . . . . . . . . . . 123 5.10 RPM Experiment and Simulation . . . . . . . . . . . . . . . . . . . 125 6.1 6.2
Scale factors of Earth Flatness . . . . . . . . . . . . . . . . . . . . . 128 NavStik mounted on the Mini Helicopter . . . . . . . . . . . . . . . 130
ix
6.3
Testing ground for GPS . . . . . . . . . . . . . . . . . . . . . . . . 134
6.4
GPS data over different trajectories . . . . . . . . . . . . . . . . . . 135
7.1
Outdoor RC Pilot Free Flight . . . . . . . . . . . . . . . . . . . . . 137
7.2
RPM during RC Pilot Flight . . . . . . . . . . . . . . . . . . . . . . 137
7.3
Throttle during RC Pilot Flight . . . . . . . . . . . . . . . . . . . . 138
7.4 7.5
Helicopter Attitude during RC Pilot Flight . . . . . . . . . . . . . . 139 Rotational rates during RC Pilot Flight . . . . . . . . . . . . . . . . 139
7.6
Rotational accelerations during RC Pilot Flight . . . . . . . . . . . 140
7.7
Translational Accelerations during RC Pilot Flight . . . . . . . . . 140
7.8 7.9
X-Y jerk values during RC Pilot Flight . . . . . . . . . . . . . . . . 141 X-Y snap values during RC Pilot Flight . . . . . . . . . . . . . . . 141
7.10 RC Pilot input during RC PilotFlight . . . . . . . . . . . . . . . . . 142 7.11 Servo Outputs during RC Pilot Flight . . . . . . . . . . . . . . . . . 142 7.12 X-Y displacements during RC PilotFlight . . . . . . . . . . . . . . . 143 7.13 Helicopter Heading Angle during RC Pilot Flight . . . . . . . . . . 143 7.14 Yaw stick input during RC Pilot Flight . . . . . . . . . . . . . . . . 144 7.15 Sonar height during RC Pilot Flight . . . . . . . . . . . . . . . . . . 144 7.16 Vertical acceleration during RC Pilot Flight . . . . . . . . . . . . . 145 7.17 Collective during RC Pilot Flight . . . . . . . . . . . . . . . . . . . 145 7.18 Outdoor tethered flight . . . . . . . . . . . . . . . . . . . . . . . . . 147 7.19 RPM during Outdoor Tethered Flight . . . . . . . . . . . . . . . . . 148 7.20 Throttle during Outdoor Tethered Flight . . . . . . . . . . . . . . . 148 7.21 Helicopter Attitude during Outdoor Tethered Flight . . . . . . . . . 149 7.22 Rotational rates during Outdoor Tethered Flight . . . . . . . . . . . 150 7.23 Rotational accelerations during Outdoor Tethered Flight . . . . . . 150 7.24 Translational Accelerations during Outdoor Tethered Flight . . . . 151 7.25 X-Y jerk values during Outdoor Tethered Flight . . . . . . . . . . . 151 7.26 X-Y snap values during Outdoor Tethered Flight . . . . . . . . . . 152 7.27 X-Y speed during Outdoor Tethered Flight . . . . . . . . . . . . . . 152 7.28 Pilot input during Outdoor Tethered Flight . . . . . . . . . . . . . 153 7.29 Outputs to servos during Outdoor Tethered Flight . . . . . . . . . . 153 7.30 X-Y displacements during Outdoor Tethered Flight . . . . . . . . . 154 7.31 Helicopter Heading Angle during Outdoor Tethered Flight . . . . . 154 7.32 Yaw control output during Outdoor Tethered Flight . . . . . . . . . 155
x
7.33 Sonar height during Outdoor Tethered Flight
. . . . . . . . . . . . 155
7.34 Vertical speed during Outdoor Tethered Flight . . . . . . . . . . . . 156 7.35 Vertical acceleration during Outdoor Tethered Flight . . . . . . . . 156 7.36 Vertical jerk during Outdoor Tethered Flight . . . . . . . . . . . . . 157 7.37 Collective during Outdoor Tethered Flight . . . . . . . . . . . . . . 157
List of Tables 1.1
Gyrodyne QH-50C DASH Specifications . . . . . . . . . . . . . . .
5
1.2
Industrial helicopter UAV Specifications . . . . . . . . . . . . . . .
8
2.1
Zenoah G260PUH engine specifications . . . . . . . . . . . . . . . .
18
2.2 2.3
Linkage Lengths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Blade Mass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
23 30
2.4
Blade Center of Gravity from Tip . . . . . . . . . . . . . . . . . . .
31
2.5
Laser Displacement Sensor Specifications . . . . . . . . . . . . . . .
34
2.6 2.7
Blade data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Inertia Calculation for H Link . . . . . . . . . . . . . . . . . . . . .
39 43
2.8
Inertia Calculation for Blade 1 . . . . . . . . . . . . . . . . . . . . .
43
2.9
Inertia Calculation for Blade 2 . . . . . . . . . . . . . . . . . . . . .
43
2.10 Lock number data . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.11 Final Blade Pitch Link Setting . . . . . . . . . . . . . . . . . . . . .
43 45
3.1
Receiver Connections . . . . . . . . . . . . . . . . . . . . . . . . . .
54
3.2 3.3
PIT-CURVE Settings . . . . . . . . . . . . . . . . . . . . . . . . . . XBee Pro Specifications . . . . . . . . . . . . . . . . . . . . . . . .
57 59
3.4
XBee Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
61
3.5
Potentiometer Angle Calibration . . . . . . . . . . . . . . . . . . . .
64
3.6 3.7
GY611 Controller Settings . . . . . . . . . . . . . . . . . . . . . . . IMU Data Precision . . . . . . . . . . . . . . . . . . . . . . . . . . .
67 68
3.8
3DM-GX1 Commands . . . . . . . . . . . . . . . . . . . . . . . . .
70
3.9
Sonar Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . .
74
3.10 Magnetic Probe Specifications . . . . . . . . . . . . . . . . . . . . . 3.11 RPM Sonar Commands . . . . . . . . . . . . . . . . . . . . . . . .
75 80
xii
4.1
RPM Gains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
88
4.2
Height Control Gains . . . . . . . . . . . . . . . . . . . . . . . . . .
89
4.3
Roll-Pitch Gains . . . . . . . . . . . . . . . . . . . . . . . . . . . .
93
5.1
BEMT Calculations for steady state RPM . . . . . . . . . . . . . . 117
7.1
Roll Pitch Gains during RC Flight . . . . . . . . . . . . . . . . . . 146
Glossary ARCAA Australian Research Centre for Aerospace Automation AVATAR Autonomous Vehicle Aerial Tracking And Reconnaissance BEAR BErkeley Aerial Robotics CSIRO Commonwealth Scientific and Industrial Research Organisation DARPA Defense Advanced Research Projects Agency DGPS Differential GPS FAA
Federal Aviation Administration
GPS
Global Positioning System
GTAR Georgia Tech Aerial Robotics I2C
Inter Integrated Circuit bus
IFF
Identification Friend or Foe
IMU
Inertial Measurement Unit
INS
Inertial Navigation System
ISTAR Intelligence Surveillance Target Acquisition and Reconnaissance LOS
Line OF Sight
MAV
Micro Air Vehicle
MTI
Moving Target Indicator
xiv
NASA National Aeronautics and Space Administration PCI
Peripheral Component Interconnect
PXI
PCI eXtensions for Instrumentation
RC
Radio Control
RPM
Revolutions Per Minute
UAV
Unmanned Aerial Vehicle
UBEC Universal Battery Eliminator Circuit UCAV Unmanned Combat Aerial Vehicle VTOL Vertical Take Off and Landing
Chapter 1 Introduction The last decade has witnessed a surge of interest in small, unmanned flying vehicles in the aerospace industry. With rapid developments in technology, the required sensors, actuators, batteries and on board computers have reached the stage where they are small, lightweight, accurate, reliable, and powerful enough to be used for flying small scale model aircraft . Unmanned rotary wing vehicles have attracted a great deal of attention all over the world, due to their unique hovering capability and ability to land and takeoff from confined spaces. Department of Science and Technology, Govt. of India initiated a research activity at IIT Kanpur in 2006 to set up a laboratory for design and development of an autonomous mini helicopter. The major focus of the research has been to develop and integrate the sensors, communication systems, actuators onboard a model helicopter, and interface it with a ground station to provide autonomous control and navigation capability. During the progress of this research, test setups for sensors, actuators, and mechanical parts have been designed and developed. A significant amount of effort has gone into re-engineering and manufacturing of critical components of the vehicle, such as the blades, transmission and control linkages. This thesis builds on the past work to develop an autonomous helicopter. To begin with, it is worthwhile to understand what are unmanned aerial vehicles and what is their importance in the global context.
2
1.1
Unmanned Aerial Vehicles
The Joint Publication 1-02, Department of Defense Dictionary, USA (1, 2) defines a UAV as: “A powered, aerial vehicle that does not carry a human operator, uses aerodynamic forces to provide vehicle lift, can fly autonomously or be piloted remotely, can be expendable or recoverable, and can carry a lethal or non lethal payload. Artillery projectiles are not considered unmanned aerial vehicles.” The above definition is based on a UAV’s characteristics and not its application. The definition tries to distinguish between UAVs and ballistic missiles. It also distinguishes UAVs from gliders, since they are unpowered, and blimps or balloons which fly due to buoyancy and not lift. Although UAVs are flown commercially for agriculture and cinematography, their focus in military circles is overwhelmingly focused on reconnaissance. Hence for this reason the term Unmanned Combat Air Vehicle (UCAV) is used to distinguish UAVs for strike missions. Another derivative from this class of vehicles are Micro Air Vehicles (MAV), which are less than a foot in size and weigh in grams . The word ‘unmanned’ is removed as it is considered superfluous for such small vehicles.
1.1.1
Applications
“The UAV is fit for missions that are dirty, dangerous and dull.” American saying Unmanned Aerial Vehicles have found applications in various fields and are likely to find many more uses as they become more popular. For example, UAVs have collected air samples from affected areas in the aftermath of the Chernobyl reactor radiation spill. Agriculture is thought to be a major market for UAVs since it has fewer impediments and bigger incentives for early technological adoption. UAVs also have applications in wildfire detection and management, pollution management, event security, traffic monitoring, disaster relief, fisheries management,
3
pipeline monitoring and oil and gas security, meteorology and storm tracking, remote aerial mapping, and transmission line inspection. NASA has used the Draganfly UAV for examining volcano plumes. In India recently, fixed wing UAVs have been procured for the Kaziranga National Park to protect rhinoceros from poaching.
1.1.2
Economics
In 2002, the annual spending on UAVs around the world was about $2 billion. The US accounted for nearly half of the spending, while Indian contribution was of the order of 5%. Of the about 2400 UAVs in operation then, 66% were for commercial use, 31% were used by the military, 2% in civil roles and less than 1% were in academic circles. Illustrating the growth in the UAV market, a 2012 study by consulting firm Teal Group estimates that UAV spending will almost double over the next decade from $6.6 billion annually today to $11.4 billion (2). An important point in the discussion is that UAVs do not cost less to build than their manned equivalents. Ejection seats, oxygen regulators and glass canopies are cheap compared to ground stations, lines of software and computing power to substitute a pilot. Operating costs and times are however substantially reduced. For example, a new Predator drone can be built in less than six weeks, but a new combat pilot takes two years to be fully trained.
1.2
Rotary Wing UAVs
Unmanned helicopters have significant advantages over fixed wing UAVs. They are able to takeoff and land vertically. They do not require a runway, and they have the ability to hover and fly at very low heights. Lightweight and small-scale helicopters are thought to be the first candidates to be granted permission to fly in civilian airspace (3). Small scale helicopters have all the flight characteristics of full sized manned vehicles. Additionally, they have more agility and dexterity than big helicopters, and RC pilots are known to execute various complicated maneuvers very commonly that are not even attempted by real helicopter pilots. Hence, the reduced size and cost, along with the diverse applications of the system have made
4
Figure 1.1: Gyrodyne QH-50C DASH
the unmanned helicopter a subject of intense research by industry and academia. However, the highly unstable, nonlinear and coupled under-actuated helicopter system makes the system and control design a huge challenge.
1.2.1
Historical Origin
The first rotary wing model was steam powered and made by Pontan d’Amecourt in the 1860s. This was followed by Thomas Alva Edison, who made an electric motor helicopter in 1880 (4). The helicopter in its manned form became a common sight only after the successes of Juan Cierva, and Igor Sikorsky, in the first half of the 20th century. However efforts were on to develop smaller radio control models of helicopters in the next few decades. 1.2.1.1
Gyrodyne QH-50C DASH
The first free flight of an unmanned helicopter was performed by the US Navy Gyrodyne QH-50A (Fig. 1.1∗ ) at NATC Patuxent River Maryland on 12 August 1960 (2). The Navy QH-50 drone was based on a small, one man coaxial helicopter, ∗
Source Ref.(5)
5
Engine 1 × 300hp Boeing T50 Turboshaft Rotor Diameter 6.1 m Length 3.94 m Gross Weight 1035 kg Payload Weight 393 kg Empty Weight 499 kg Speed 148 km/hr Ceiling 4.9 km Endurance 3.9 hr
Table 1.1: Gyrodyne QH-50C DASH Specifications
the YRON-1 Roto cycle, made by the Gyrodyne Company of America for the US Marine Corps in 1955. The vehicle was meant to extend the range of the antisubmarine warfare torpedoes. The specifications of the vehicle are given in Table 1.1. The unmanned vehicle performed its first flight from a ship at sea in December 1960. It entered operational service in January 1963. Over the next 6 years, pairs of helicopters were deployed on 240 destroyers. The vehicles carried two homing torpedoes. But it was also extensively used for surveillance, gunfire spotting, bombing, cargo transfer, smokescreen laying and rescue. The vehicles were equipped with a television camera and video data link under Project Snoopy, during the Vietnam War. DARPA funded two projects, the Nite Panther and the Nite Gazelle to improve this capability. The Nite Panther project added a low-light television, a laser rangefinder and target designator, and an early moving-target indicator (MTI) radar. In the Nite Gazelle project, the vehicle was equipped with armaments such as a minigun, a grenade launcher, bomb dispensers and guided rockets. The flyaway price in 1965 of the vehicle was about $154,000 ($1.12 million in 2012 USD). 1.2.1.2
Recent developments
According to a UAV census in 2002, there were an estimated 2400 UAVs in use around the world. The majority 65% of them were Japanese produced, radio-
6
controlled helicopters used for agricultural purposes. There were 1565 helicopters in Japan , with 6000 licensed operators for them. They performed about onethird of the agricultural aviation in Japan, and cover about 10% of their total rice acreage. Their sales accounted for nearly $100 million annually. The Japanese UAV market was a result of a government sponsored competition in 1986, to boost farming. The population of farmers was dwindling due to rapid urbanization of society. By some estimates, the robotic helicopter is now doing the work of 15 farm laborers.
1.2.2
Industry
There are currently several companies that are building conventional single main rotor unmanned helicopters for use in civil and defense markets. The most notable ones are listed below according to increasing size. A comparison of their specifications is given in Table 1.2. 1.2.2.1
DP-5X Wasp
Dragonfly Pictures Inc., an American company develop and supply unmanned rotary winged vertical take-off and landing (VTOL) aerial platforms for photography and time critical IMage INTelligence (IMINT) needs. Their DP-5X Wasp (Fig. 1.2(a)) is a fully autonomous, hands-off flying vehicle, which can withstand 30knots of crosswind (6). 1.2.2.2
Pelicano
Indra’s Pelicano (Fig. 1.2(b)) is capable of covering the operational needs of a short range unmanned tactical aircraft system (up to 150 km from the control station) and carry out surveillance missions to protect ground forces. Indra has also launched a simplified version of the system that is equipped with a variety of payloads and adapted to the operating needs of police forces and emergency teams for surveillance missions, managing emergencies and searching for survivors. The ground station is equipped with three pilot and payload operator stations (7).
7
1.2.2.3
Skeldar UAS
SAAB’s Skeldar UAS (Fig. 1.2(c) ∗ ) is a modular design and can operate in both day and night. It is powered by a 2 cylinder 625cc two-stroke 55hp IC engine. The vehicle is constructed from carbon fiber, titanium and aluminum composite. It has a low visual signature, and has redundant on-board avionics that enable fully autonomous flight. Since it is designed for naval operations, the tail section is easily detached to minimize space requirements (8). 1.2.2.4
TANAN 300
Cassidian, an EADS company is producing the TANAN 300 (Fig. 1.2(d)† ) compact UAV for maritime and land missions. The vehicle uses a diesel engine for power. The avionics include an IFF (Identification Friend or Foe) system, a maritime radar, an electronic surveillance system and a direction finder. It is intended to carry out Intelligence, Surveillance, Target Acquisition and Reconnaissance (ISTAR) missions, as well as civilian assignments. It provides full HD color video in real time at maximum range. (9) 1.2.2.5
Northrop Grumman Firescout
Northrop Grumman’s MQ-8B Fire Scout (Fig. 1.2(e)‡ ) has the ability to autonomously take off and land from ships and at unprepared landing zones in proximity to people. The vehicle is based on a Schweizer helicopter with four rotor blades. It uses a single Rolls Royce 250-C20W turboshaft engine. The UAV is currently being used by the US Navy. The vehicle is fully autonomous with no pilot in the loop required for launch and recovery. (10) 1.2.2.6
Boeing A160T Hummingbird
The A160T developed by Frontier Systems Inc. was acquired by Boeing in 2004. The Boeing A160T Hummingbird (Fig. 1.2(f)§ ) can operate in austere land environments, at sea and in complex urban terrain. In May 2008, it flew for 18.7 hours, ∗
Source: Source: ‡ Source: § Source: †
Ref. (8) Ref. (9) Ref.(10) Ref. (11)
8
Vehicle Wasp Rotor Diameter (m) 3.23 Length (m) 3.35 Maximum Weight (kg) 245 Maximum Payload (kg) 45 Endurance (hr) 4.8 Ceiling (km) 4.5 Maximum Speed (kmph) 204
Pelicano Skeldar Tanan 3.3 4.5 5.0 4.0 5.2 4.3 200 235 300 30 40 50 5 6 8 3.6 3.5 2 185 140 150
MQ-8B A160 8.4 11 7.3 10.7 1429 2948 227 1134 8 18.7 6.1 6.1 231 306
Table 1.2: Industrial helicopter UAV Specifications
setting a world record for endurance in its weight class for UAVs. (11) The Hummingbird is powered by a Pratt& Whitney PW207D Turboshaft engine. The vehicle has an optimum speed rotor system that changes the rotor RPM at different flight conditions to significantly improve engine efficiency. By varying the A160T’s RPM to account for differences in weight, altitude and cruise speed, peak efficiency of its rotor system can be achieved throughout various flight regimes.
1.2.3
Academic Research
Major universities and academic institutions around the world are working on developing autonomous helicopters. A brief overview of the research groups is given below. A detailed comparison of the subsystems with the work done in this thesis is presented in the subsequent chapters. 1.2.3.1
Chiba University, Japan
The Chiba University UAV Group (12) started research of autonomous control of helicopters in 1998. It began advanced joint research with Hirobo Ltd. in 2001, and created a fully autonomous control small scale helicopter for hobbyists. They developed a powerline monitoring UAV called the Sky Surveyor (Fig. 1.3(a) ∗ ). The vehicle had various on board cameras and weighed a gross 48 kg. It had an endurance of about 1 hour and a maximum payload of 20 kg. The group also ∗
Source: Ref.(12)
9
(a) DP-5X Wasp
(b) Pelicano
(c) SAAB Skeldar
(d) TANAN 300
(e) MQ-8B Firescout
(f) A 160T Hummingbird
Figure 1.2: Industrial helicopter UAVs
10
developed other smaller vehicles weighing up to a few kilograms. These vehicles had cruising times between 10-20 minutes and could carry payloads about 0.8-7.0 kg as per their size. 1.2.3.2
ETH Zurich, Switzerland
There have been a number of projects on unmanned aerial vehicles (UAV) at the Measurement and Control Laboratory (IMRT) at ETH Zurich under the guidance of Professor Hans P. Geering. In 1995, the development of an autonomously freeflying helicopter was initiated. During the years 1996 to 2002, the research at IMRT focused on navigation. A thesis on autonomous acrobatic flights (13) in 2008, under the ‘AkroHeli’ project, gives a complete system hardware and control design for a small mini helicopter. The vehicle used was the Nova Cuatro made by Robbe Modelsport with 15cc , 3.1 hp two-stroke engine(Fig. 1.3(b)∗ ). 1.2.3.3
Sugeno Laboratory, Tokyo Institute of Technology, Japan
Some of the earliest work in the field was demonstrated by M. Sugeno (14). A Yamaha R50 (Fig. 1.3(c)† ) agricultural model was equipped with sensors and a fuzzy logic controller. The developed system was able to demonstrate that a novice could effectively pilot the helicopter without any previous experience. 1.2.3.4
Carnegie Mellon University Robotics Institute, USA
Work on the Autonomous Helicopter Project began in September 1991 at the Carnegie Mellon University Robotics Institute. Over the next decade, they aimed to achieve a goal mission which included a number of crucial technologies such as autonomous take-off and landing, navigation, obstacle avoidance, target tracking and aerial mapping (15, 16). The work done in this laboratory presents some of the most comprehensive research in system identification (17) and control (18) of an autonomous helicopter. The vehicle used was the Yamaha R50 as shown in Fig. 1.3(c)† . ∗ †
Source: Ref.(13) Source: Ref. (15)
11
1.2.3.5
Draper Labs and MIT, USA
The Massachusetts Institute of Technology and Draper Laboratory students cooperated to develop an autonomous helicopter that won the 1996 International Aerial Robotics Competition (19). Navigation was accomplished using ground-based sensors. The guidance subsystem was run on the ground computer while the inner-loop flight control was accomplished entirely on-board. They used a Schluter Champion RC helicopter with 0.61 cu. in. engines (Fig. 1.3(e)∗ ). The vehicle had a maximum take off weight of 10.6 kg , and an empty weight of 4.5 kg. 1.2.3.6
UC Berkeley, USA
The BErkeley Aerial Robotics (BEAR) group’s work on autonomous helicopters began in 1996 with support from the U.S. Army Research Office, the Office of Naval Research, and DARPA. It operates six fully instrumented helicopter-based UAVs, implemented on various models such as Yamaha R-50 (Fig. 1.3(c)), RMAX (Fig. 1.3(d)† ), Maxi-Joker electric helicopter, and Bergen Industrial Twin. The UAVs are equipped with a small-size inertial navigation system, high-accuracy DGPS and a flight computer. Several other sensors such as Laser range finders, firewire cameras, and ultrasonic sensor arrays are also used. (20, 21) 1.2.3.7
University of Southern California, USA
The USC Autonomous Flying Vehicle Project was initiated in 1991. Since then, the Robotic Embedded Systems Laboratory has designed, built and conducted research with four robot helicopters, the most recent being the 3rd generation AVATAR (Autonomous Vehicle Aerial Tracking And Reconnaissance). The helicopters are able to perform tasks such as GPS waypoint navigation, autonomous vision-based landing and autonomous sensor deployment. The Bergen Industrial Twin helicopter used (Fig. 1.3(f)‡ ), is powered by a 46cc twin cylinder two-stroke petrol engine that produces 4.5hp. It is capable of lifting approximately 10kg, and can stay aloft for 30min on a single tank of fuel. ∗
Source: Ref.(19) Source: Ref.(20) ‡ Source: Ref.(22) †
12
1.2.3.8
Georgia Insitute of Technology, USA
The UAV Research Facility at Georgia Tech uses Yamaha RMax (Fig. 1.3(d)) and Mikada Logo 14 helicopters. The Georgia Tech Aerial Robotic (GTAR) team has participated in the International Aerial Robotics Competition since 1991, and holds the record for winning the maximum missions. The R-Max helicopter weighs about 93 kg and has a payload capacity of 30kg. The vehicle is able to follow trajectories and fly in conjunction with ground robots.(23) 1.2.3.9
Stanford University, USA
The Stanford AI Lab (24) flies the XCell Tempest (Fig. 1.3(g)∗ ), a competitionclass aerobatic helicopter (length 1.37m, height 0.48m, weight 5.9kg), powered by a 0.91-size, two-stroke engine. The helicopter uses a Microstrain 3DM-GX1 orientation sensor, and a Novatel RT2 GPS receiver. They also use three PointGrey DragonFly2 cameras that track the helicopter from the ground. The ground station uses a Kalman filter to estimate the state from the sensor readings. Control commands are generated at 10Hz (25). 1.2.3.10
CSIRO and ARCAA, Australia
CSIRO is joint venture partner with Queensland University of Technology (QUT) in the Australian Research Centre for Aerospace Automation (ARCAA). ARCAA operates a number of fully autonomous small unmanned helicopters, referred to as the ARCAA Heli UAS or as the Hotels. The vehicles are based on a modified Vario Gasser RC helicopter (Fig. 1.3(h)† ). The endurance is up to 45 minutes at maximum weight. The Hotels are capable of autonomous beyond visual range operation. The Hotels are currently being used for research into the development of sensor payloads for autonomous infrastructure inspection tasks and for the phenotyping of agricultural crops. The unique flight profiles of the helicopters have also made them a valuable test platform in experiments exploring different automated airspace management concepts.(26, 27) ∗ †
Source: Ref. (24), picture by Eugene Fratkin Source: Ref. (26)
13
(a) Hirobo Sky Surveyor
(b) Robbe Modelsport Nova Cuatro
(c) Yamaha R50
(d) Yamaha RMax
(e) MIT Draper Lab Helicopter
(f) USC Bergen Industrial Twin
(g) Stanford XCell Tempest
(h) CSIRO-ARCAA Vario Gasser Helicopter
Figure 1.3: Academic research helicopter UAVs
14
1.2.4
Prior Work at IIT Kanpur
In the year 2004, at IIT Kanpur, an initiative was undertaken to develop an autonomous mini helicopter. Several Masters’ theses over the next few years investigated the theoretical modeling of the system and its control and stability analysis (28, 29, 30, 31). On the experimental side, Ravinder (32) developed a load measurement test rig. He measured main rotor loads at various RPM and compared them with theory. Prasad, (33) analyzed the servo actuators, gyros and IMU used on board the mini-helicopter. Wireless communication for ground based control of the autonomous mini-helicopter was also discussed. Swaroop (34) describes the hardware and software used in design, development and testing of the mini-helicopter. Semi autonomous flight with an RC pilot is discussed. The most recent work (35) describes the challenges faced in the entire development history of the project. Apart from the Masters’ theses and conference papers, there are several technical reports from the laboratory that deal with operational aspects of the specific subsystems of the helicopter. For example, Refs. (36, 37) discuss the servo motion and the blade angles. References (38, 39, 40) are devoted to the RPM measurement and regulation. Sonar calibration and integration is discussed in Ref. (41). The pitch and roll attitude control is detailed in Ref. (42).
1.3
Objectives
Prior to this thesis work, the Helicopter Laboratory had demonstrated stabilized tethered hover of the vehicle. The ground station used two National Instruments PXI 1050 systems, two radio transmitters and associated electronics. The complete system was bulky and the performance was slow. Due to these reasons, a National Instruments Real Time PXI 1042-Q was purchased to replace the old ground station. Additionally, a complete new helicopter was assembled. The major focus of this thesis are: 1. To transfer the ground station codes from the previous systems by adapting and optimizing it for the new compact Real Time PXI unit. 2. To prepare a complete testbed helicopter by integrating sensors, actuators, communication units and power devices, and characterizing them.
15
3. To use experimental observations of the rotor RPM at different conditions to develop a theoretical dynamic model 4. To demonstrate an effective and robust control logic for the helicopter in hover 5. To enable autonomous and semi-autonomous capability in all modes of the vehicle 6. To integrate a global positioning system with the vehicle for position estimation The process of practical and experimental work is riddled with hindrances and is a time and resource consuming affair. Hence, a need was felt to develop a systematic procedure to conduct flight experiments with minimal problems. Also, this thesis is meant to serve as a guide or manual for new researchers in the field to approach such a complicated experimental setup as the mini helicopter. Therefore, an underlying objective in the writing of the thesis is to give a bare bones account of the building and development of the complete autonomous mini helicopter.
1.4
Thesis Outline
The work has been presented in the thesis in the following manner: Chapter 2 details the main hardware of the helicopter. Emphasis is put on the helicopter main rotor blades which were tested to establish the weight, center of gravity and moment of inertia. Also, some aspects of the actuator and swash plate linkages are also given. In Chapter 3, the setup of the radio transmitter, sensors and communication units of the helicopter is presented. The servo motion is calibrated. Chapter 4 details the ground station code architecture. Each subsystem of the code is discussed along with its timing and speed. In the use of the Real Time system, the interaction between the different modules of the code is also presented.
16
Chapter 5 presents results and analysis of RPM dynamics of the helicopter. A theoretical model is framed and then compared with the experiments. The implementation of an auto throttle function, and linking with collective control is also discussed. In Chapter 6, the working of the global positioning system is explained. The integration of the Ublox6 GPS module using the NavStik micro-controller is discussed. The communication protocol is defined. Results of the calibration and experiments are also presented in this chapter. In Chapter 7, the results of the tethered and free flight experiments, in different states of autonomy are analyzed. Chapter 8 finally presents the conclusions of the study. The scope for future work is also discussed. The appendices include the developed codes on the ground station.
Chapter 2 Mini Helicopter The mini helicopter as shown in Fig. 2.1 is the Intrepid Bergen Gas EB. Several attachments have been added to the vehicle. A brief description of the major mechanical components is given in the next section. It is important to understand how all the parts works together so that the helicopter can fly. The assembly of the parts is explained in the manual (43) and details are provided in several reports produced in the helicopter laboratory.
Figure 2.1: Mini Helicopter Setup
18
2.1 2.1.1
Main Components Engine
The engine used for the helicopter is the G260PUH from Zenoah Komatsu (Fig. 2.2). It requires petrol/gasoline (octane over 90) mixed with high grade two cycle engine oil as fuel. The filtering of the fuel is an important step before operating the engine. The engine tuning is also a critical process for the proper operation of the engine. The engine is started by pulling the starter cord. It can be shut off instantaneously by grounding a lead wire from the engine coil. Some important specifications of the engine are given in Table. 2.1. In comparison, the Boeing Hummingbird and the Northrop Grumman Firescout are powered by turbo-shaft engines. The other industrial helicopters all have internal combustion engines. The Skeldar UAV uses heavy aviation fuel, while the Tanan 300 uses diesel. The academic research UAVs mentioned in Section 1.2.3 all have internal combustion engines. Recently, advances in lithium polymer batteries have led to the development of electric motor helicopters as well. 2.1.1.1
Fuel Tank
The fuel tank (Fig. 2.3) is made of plastic and has a capacity of 500 ml. There are three fuel pipes which are connected to the tank. One of them, the ‘Fuel Tank Pickup’, feeds the fuel to the engine through the throttle valve. Inside the tank, Type Air Cooled Bore 34 mm Stroke 28 mm Compression Ratio 8.4 Max Power 1.71 kW @ 13000 rpm Max Torque 1.42 Nm @ 9500 rpm Fuel Consumption 760 g/kW.H Weight 1.77 kg
Table 2.1: Zenoah G260PUH engine specifications
19
Figure 2.2: Zenoah G260PUH engine
Figure 2.3: Fuel Tank
20
this is connected to a fuel clunk which also filters the fuel. Another pipe, the ‘Fuel Return’, goes to the engine carburettor. The third pipe, known as the ‘Overflow Vent’, is for fueling and is kept open during operation.
2.1.2
Clutch
Figure 2.4: Centrifugal Clutch Bell
The centrifugal clutch bell (Fig. 2.4) is one of the most important components in the helicopter transmission system. It transmits the engine power to the main gear. The spur gear ratio between the engine clutch and the main gear is 12:90. As the engine rpm increases, the engine clutch attachment expands with the centrifugal force. The arms of the clutch engage with the clutch lining material of the clutch bell which rotates the main spur gear. A detailed report on the clutch lining material can be found in Ref. (44). A simple mathematical model of the centrifugal clutch is presented in Ref. (45).
2.1.3
Main Gear
The main gear is a critical part of the transmission. It is a single piece with both spur and bevel gears cut onto it. The spur gear engages with the clutch bell gear, while the bevel gear engages with the tail shaft gear as shown in Fig. 2.5.
21
Figure 2.5: Main and Tail rotor transmission
2.1.4
Stabilizer Bar
The Stabilizer Bar is shown in Fig. 2.6. It is also known as the flybar. It has two main linkages, the Bell push rods and the Hiller push rods. The Hiller push rods are short (29mm) and transfer the actuation of the stabilizer bar to the main rotor blades. The bell pushrods are long (97mm) and transfer the swash plate tilt to the stabilizer bar.
Figure 2.6: Stabilizer Bar
22
Figure 2.7: Helicopter linkages and transmission
(a) Collective
(b) Lateral
Figure 2.8: Swash plate Motion
(c) Longitudinal
23
Throttle Linkage 160 mm Elevator (Longitudinal) Yoke Push Rods 70 mm Elevator (Longitudinal) Servo Push rods 149 mm Primary Collective Push Rods 51 mm Secondary Collective Push Rods 70 mm Aileron (Lateral) Servo Push Rods 106 mm Aileron (Lateral) Swash Plate Push Rods 58 mm Bell Push Rods 97 mm Hiller Push Rods 29 mm Washout Arm 47 mm
Table 2.2: Linkage Lengths
2.1.5
Linkages
A view of the helicopter fuselage in close up is given in Fig. 2.7. There are three servos that actuate the main rotor swash plate. The collective servo lifts the swash plate, increasing the blade pitch angle at all azimuth locations (Fig. 2.8(a)). The lateral servo tilts the swash plate about the fuselage longitudinal axis as shown in Fig. 2.8(b). Similarly, the longitudinal servo tilts the swash plate about the lateral axis as show in Fig. 2.8(c). The tilting of the swash plate causes the blade pitch angle to be different at each azimuth angle. This creates hub forces and moments which move the vehicle in a particular direction. The servo horn attachment must make sure that the movement is equalized in both directions. To avoid differential movement, the angle between the linkages and the line joining the center must be kept at 90o at the neutral position. It is also important to make sure that both the linkages are of the same length. The lengths of the linkages which were finally set is given in Table 2.2.
2.1.6
Tail Rotor
The tail rotor, like the main rotor, has two blades. The rotor diameter is 0.295m. The blade planform is given in Fig. 2.9. The airfoil is symmetrical with a thickness of 5mm. The tail rotor swash plate only has collective motion, which is actuated
24
Figure 2.9: Tail rotor blade planform
(a) Clockwise Yaw
(b) Anti Clockwise Yaw
Figure 2.10: Tail swash plate Motion
25
by the tail servo. The tail rotor thrust generates a yawing moment on the vehicle. This allows heading control. The direction of the thrust and the swashplate motion can be seen in Fig. 2.10. The direction of rotation of the vehicle is seen from the top. The tail rotor shaft is prone to rust and attracting dust. Hence, before each flight, it is cleaned and smooth motion of the swash plate is ensured. The main gear transmits the engine power via the bevel gear as shown earlier in Fig. 2.5. The gear ratio between the main and tail rotor is 70:15. This rotates the bevel gear attached to the tail rotor shaft with the tail coupler. The tail rotor shaft is actually in two segments which are connected in the middle with a torque tube, as can be seen in Fig. 2.11. After many runs, the shaft got cut due to the torque loads. The other end of the shaft is fixed into the tail rotor gear box. This contains two perpendicular bevel gears with 1:1 gear ratio.
Figure 2.11: Tail rotor transmission shaft
2.1.7
Receiver Box
The receiver box (Fig. 2.12) is a rectangular cardboard box filled with foam. There is space made to house the receiver unit of the helicopter, and also the controller unit of the GY611 gyro. Cutouts are present on the sides of the box to allow the servo connectors and the antenna to pass through.
2.1.8
Sensor Tray
The sensor tray is a key addition to the helicopter. The tray geometry is shown in Fig. 2.13. The tray is made of two composite L-angles of 0.59 m. The distance between them is 0.18 m. At the back end of the tray, two L-angles have been attached to create a battery box. In the front, carbon fiber strips are placed at appropriate intervals to mount the sensors. Between all the carbon fiber strips and the tray, thick pieces of styrofoam have been used to reduce vibrations. At
26
Figure 2.12: Receiver Box
Figure 2.13: Sensor Tray
27
(a) Upper View
(b) Bottom View
Figure 2.14: Sensor Tray
Figure 2.15: Vibration Isolator
28
the front end, the IMU is placed. This is because the magnetometers inside the IMU are affected by the magnetic field generated by the engine, hence it must be as far away as possible. Just below the IMU, the sonar is attached. The next sensor behind the IMU is the GPS and Navstik unit. Behind this, a broad carbon fiber strip is used to mount the Xbee pro boards, which are the downlink communication units. Beneath this, the UBEC (Universal Battery Eliminator Circuits) are attached. The switches kept are on the top side. Behind this, the RPM and sonar circuit is mounted. A view of the sensors above is given in Fig. 2.14(a) and below is given in Fig. 2.14(b). The front side of the L angles of the tray are reinforced with a rubber strip. Similarly, the central section is reinforced with a metal strip. These have been put because in the course of earlier experiments, it was observed that these sections are prone to damage during hard landings. The tray is connected to the landing gear with vibration isolators as shown in Fig. 2.15. They play a significant role in reducing vibrations to the inertial measurement unit. Reducing the noise due to vibration in the sensors is a challenging problem in the field. The MIT-Draper Autonomous Helicopter project (19) owes its success to rubber shock mounts that allow over half an inch of travel and prevent virtually all high-frequency vibration from reaching the sensors. They were invented after failing to find a commercial mount that worked well enough.
2.1.9
Safety Cross Bar
The safety cross bar consists of two 1.7 m bamboo sticks. The ends are fixed into 60mm diameter plastic balls. There are two more balls fitted in the center portion of the sticks as shown in Fig. 2.16. They are cushioned with square pieces of foam with sides of 95 mm and thickness of 45 mm. The purpose of the crossbar is to prevent the helicopter rotor blades from striking the ground. The plastic ball at the end does not allow any edge from getting stuck in a groove on the ground. The foam pieces allow the vehicle to sit comfortably on the ground and absorb large shocks during hard landings.
2.2
Blades
The helicopter has a rotor diameter of 1.6 m. The blades are made of carbon fiber. The cross-section (Fig. 2.18) is a symmetrical airfoil which has a solid composite
29
Figure 2.16: Safety Cross Bar
Figure 2.17: Rotor blade
Figure 2.18: Blade cross section
30
leading and trailing edge. The inner portion is filled with foam. There is a slender circular metal rod passing through the leading edge section as a spar. The flight dynamics of helicopters is highly dependent on the flap motions of the blades of the main rotor. It is essential for all the rotor blades to be identical, as the rotation of blades with different CGs, masses and/or inertia causes severe vibration and makes the helicopter extremely difficult to control. If the two blades flap differently and do not follow the same plane, then the symmetry of the rotor loads is broken.
2.2.1
Blade Balancing
Blade balancing is a term used to describe adding or removing weights from the blades to make them equal in their mass properties. In conventional helicopter blades, there are compartments built in the inside of the blades at various locations, in which weights are placed to balance the blades. In the mini helicopter, there is no provision for such a method, hence we only confined ourselves to experimentally obtain the mass, center of gravity and moment of inertia of each blade. To easily identify the blades, the blades were numbered 1 and 2. 2.2.1.1
Mass
The mass of the two blades was measured on a precision weighing machine. The weighing machine had a least count of 0.01 g. The weights of the blades are given in Table 2.3. Blade 1 189.87 g Blade 2 190.22 g
Table 2.3: Blade Mass
2.2.1.2
Center of Gravity
To locate the center of gravity of the blades, a smooth aluminum circular cylinder was attached to a fixture on a table. The blade was balanced on this cylinder.
31
Figure 2.19: Blade CG Location
Both the blades had the identical CG location from the tip of the blade as given in Table 2.4. Blade 1 0.335 m Blade 2 0.335 m
Table 2.4: Blade Center of Gravity from Tip
2.2.1.3
Moment of inertia
The helicopter blade is a three-dimensional body. Hence it has three principal moments of inertia. However, the blade is usually modeled as a thin slender beam, because the length of the blade is of a much larger magnitude than either the thickness or the width of the cross-section. The dominant motion is of the flapping of the blade. Hence the moment of inertia about the flapping axis at the blade hub is the most important. To estimate this inertia, experiments were conducted by
32
Figure 2.20: Keyence LK-2001 Laser Displacement Sensor
finding the natural frequency of flap oscillations, and using the known mass, center of gravity and acceleration due to gravity. 2.2.1.4
Experimental Setup
The rotor blade was attached to an H link. A drawing of the link is shown in Fig. 2.22. This H link was manufactured out of an aluminum sheet. The H link was rigidly attached with the blade using a bolt, nuts and washers. The other end of the H link was connected using a bolt, and washers to the inner race of frictionless bearing. The outer race of the bearing was fixed to a rigid support. This allowed the blade and the H link to oscillate as a rigid body about the axis of the bearing. At a location 200mm below the joint, a laser displacement sensor directed its light onto the blade. The laser displacement sensor is shown in Fig. 2.20 and its specifications are given in Table 2.5. The oscillations of the blade were picked up as change in displacement of this point by the sensor. The experiment was conducted in a room with the fans off, to prevent disturbances due to motion of air.
33
Figure 2.21: Blade inertia estimation experiment setup
34
Controller LK-2001 Light Wavelength 670 nm Measuring Range ±5 mm Sampling Period 512µs Power Supply 24 V
Table 2.5: Laser Displacement Sensor Specifications
Figure 2.22: H Link
2.2.1.5
Theory
Consider a long slender body of mass m and length l hung from a pivot at point O, as shown in Fig. 2.23. Let the moment of inertia about O be I/o . The center of mass of the body is located at a distance c along the length. At a displaced angle of θ, the moment acting about O will be only due to the weight at the center of gravity (Neglecting aerodynamic forces). So the equation of motion will be: I/o θ¨ + mgcθ = 0
This implies the natural frequency of oscillations is: r mgc ω= I/o
(2.1)
(2.2)
But due to friction in the link and aerodynamic drag, there will be damping in the system. By assuming viscous drag (proportional to the angular velocity with
35
Figure 2.23: Simplified blade model
a factor C), the equations are modified to: I/o θ¨ + C θ˙ + mgcθ = 0
(2.3)
The equation can be simplified to a system: θ¨ + 2ζωn θ˙ + ωn2 θ = 0
(2.4)
Where: mgc I/o C ζ= p 2 mgcI/o r
ωn =
But now the frequency of oscillations will be smaller due to damping term: ω = ωn
p 1 − ζ2
(2.5)
So the FFT of the experimental oscillations data will give us the ω. By using the
36
proportion of consecutive peaks r = p1 /p2 , the damping ratio can also be estimated as:
ln r ζ=p 4π 2 + (ln r)2
(2.6)
However we would like to know the inertia of just the blade itself. The free body
Figure 2.24: Free Body Diagram of Blade and Attachments
diagram of the blade with the H-link and nut-bolts is given in Fig. 2.24. Hence, we split the total mass of the system between the weights of the nut bolt combinations (N 1, N 2), the H-link (H) and the blade (B): m = MN 1 + MN 2 + MH + MB Similarly, the moment of inertia is split between the H link, the blade and the shift due to center of gravity: I/o = IL/o + IB/q − MB X2 2 + 2MB XB X2 The linkage inertia is sum of the H-link and the nut-bolts attached to it IL/o = IH/o + IN 1/o + IN 2/o
If we know the natural frequency of just the linkages, we can estimate the inertia
37
of the linkages as: (MN 1 + MN 2 + MH ) IL/o =
MN 2 X2 + MH XH MN 1 + MN 2 + MH
g
ωL2
=
(MH XH + MN 2 X2 )g ωL2
For the whole system however, the moment of inertia will be: I/o =
(MH XH + MN 2 X2 + MB XB )g ωs2
The moment of inertia is the sum of the blade inertia from the hinge point and the inertia of the linkages. So we can write: I/o = IB/o + IL/o =
(MH XH + MN 2 X2 + MB XB )g ωs2
From the parallel axes theorem, the blade inertia about its own hinge Q is: IB/Q = 2.2.1.6
(MH XH + MN 2 X2 + MB XB )g − IL/o + MB X2 2 − 2MB XB X2 ωs2
(2.7)
Theoretical Estimation of Blade Inertia
The blade moment of inertia can be estimated by the assumption of uniform distribution of mass. Z Ib =
R
r2 dm
e
M · dr (R − e) Z R M Ib = r2 dr R−e e M Ib = (R3 − e3 ) 3(R − e) M 2 Ib = (R + e2 + Re) 3 dm =
38
Where M (mass of one blade) = 0.190kg R(radius) = 0.794m e(root cutout) = 0.15R = 0.15 × 0.794 = 0.119m
Ib = 2.2.1.7
0.190 · 0.7942 (1 + 0.152 + 0.15) = 0.0468 kg m2 3
Error Analysis
The time can be measured accurately up to milliseconds: 4t = 10−3 s
(2.8)
From the FFT of the signal , the frequency estimate is also accurate only upto the third decimal place 4f = 10−3 Hz
(2.9)
The mass of the components is accurate up to milligrams: 4M = 10−6 kg
(2.10)
The distances measured by the ruler were able to resolve distances in millimeters: 4X = 10−3 m
(2.11)
The error magnitude can be obtained as the following: MH XH + MN 2 X2 + MB XB 2 4IB/Q = 4 + 4I + 4 M X + 4 [2MB X2 XB ] B 2 L/o ωs2 (2.12) Or by expanding: MH XH + MN 2 X2 + MB XB 4(MH XH + MN 2 X2 + MB XB ) 4ωs 4IB/Q = +2 ωs2 MH XH + MN 2 X2 + MB XB ωs 2 + 4 IL/o + 4MB (X2 + 2X2 XB ) + 2MB X2 (4X2 + 4XB ) + 2MB XB 4 X2
39
MH MN2 XH X2 XB
10.7 g 5.87 g 30 mm 60 mm 435 mm
Table 2.6: Blade data
2.2.1.8
Results
For both the blades, five experiments were recorded. Also five experiments were conducted for just the H link assembly. The laser displacement sensor readings were acquired at 1000 Hz. As can be seen from a sample raw data reading from the blade (Fig. 2.26), the oscillations had very little damping and were sustained for a long time. For a reliable estimate of the natural frequency and damping, a small set of data of roughly 20-30 seconds was taken which had the least noise. For the experiments with just the links, the set was for nearly 4 seconds. The data was recorded for five experiments for each blade, and also for just the H link mechanism. During analysis, one of the experimental data set for Blade 1 was discarded because of too much noise. The oscillations observed in the H link are shown in Fig. 2.27. The experiments are distinguished according to the line type as shown in the legend. Similarly, the data for Blade 1 and 2 are shown in Figs. 2.28 and 2.29 respectively. Although the actual oscillations used for analysis were up to 20-30 seconds, to easily differentiate between the experimental lines, only the first 10 seconds have been shown in these graphs. The data used in the calculations are shown in Table 2.6.
40
Figure 2.25: Oscillation Analysis
2.2.1.9
Analysis
The data was collected using a program in LabVIEW. The program acquired the voltage signal from the laser. The laser was calibrated as 1V = 1mm. The data obtained was analyzed using a program in LabVIEW with the front panel as shown in Fig. 2.25. As can be seen, a subset of the total data can be taken, and the oscillations be offset about a mean. The peaks in the data are plotted, and their consecutive ratios are used to obtain the damping constant. A fast fourier transform of the data is used to obtain the frequency of the signal. Using the damping constant, the natural frequency of the system is calculated. 2.2.1.10
Lock Number
The Lock number is a non dimensional parameter which represents the ratio of the aerodynamic and inertia forces on the blade. It is given by: γ=
cρaR4 Ib
(2.13)
For hinged blades, instead of the rotor radius, the blade length outside of the
41
Figure 2.26: Complete blade displacement data
Figure 2.27: H Link Experiments
42
Figure 2.28: Blade 1 Experiments
Figure 2.29: Blade 2 Experiments
43
Experiment 1 2 3 4 5 Average
f (Hz) 2.105 2.025 2.250 2.051 2.010 2.088
ζ fn (Hz) I (kgm2 ) 0.100 2.116 3.74 × 10−5 0.083 2.032 4.05 × 10−5 0.079 2.257 3.28 × 10−5 0.107 2.063 3.93 × 10−5 0.068 2.015 4.12 × 10−5 0.088 2.097 3.824×10−5
Error (kgm2 ) 1.0 × 10−6 1.1 × 10−6 8.8 × 10−7 1.1 × 10−6 1.1 × 10−6 1.0×10−6
Table 2.7: Inertia Calculation for H Link
Experiment 1 2 3 4 Average
f (Hz) 0.653 0.682 0.659 0.667 0.665
ζ fn (Hz) I (kgm2 ) 0.0071 0.653 0.0392 0.0079 0.682 0.0352 0.0083 0.659 0.0384 0.0083 0.667 0.0373 0.008 0.665 0.0375
Error (kgm2 ) 3.743 × 104 3.554 × 104 3.703 × 104 3.650 × 104 3.663 × 10−4
Table 2.8: Inertia Calculation for Blade 1
Experiment 1 2 3 4 5 Average
f (Hz) 0.659 0.680 0.686 0.684 0.654 0.673
ζ fn (Hz) I (kgm2 ) 0.0080 0.659 0.0385 0.0083 0.680 0.0356 0.0090 0.687 0.0347 0.0081 0.684 0.0351 0.0082 0.654 0.0392 0.008 0.673 0.0366
Table 2.9: Inertia Calculation for Blade 2
c ρ a R
0.06 m 1.225 kg/m3 5.73 /rad 0.7 m
Table 2.10: Lock number data
Error (kgm2 ) 3.449 × 10−4 3.334 × 10−4 3.300 × 10−4 3.314 × 10−4 3.476 × 10−4 3.375 × 10−4
44
flap hinge is generally used. The data used is given in Table 2.10. By using the parameters of the mini helicopter, an the average blade inertia of the two blades the lock number turns out to be: γ = 2.73 Usually, the lock number of helicopters is around 8. Small helicopters have a low lock number such as the Robinson R22 with a lock number of 4.19. A low lock number implies heavy blades. Big helicopters have much larger lock numbers, such as the Sikorsky CH-53E with a lock number of 14.87.
2.2.2
Blade Tracking
Blade tracking is a procedure followed to make sure that the rotor blades follow the same plane. Even though the mass properties of the blades are identical, it is possible that they do not track properly due to aerodynamic manufacturing imperfections. For resolving such a problem, the lengths of the pitch links of the blades are adjusted. 2.2.2.1
Experimental Setup
The experimental setup is shown in Fig. 2.30. The helicopter was restricted to move by placing heavy L angles on the cross-bar. A cloth was fixed to an aluminum frame, which was attached to a traverse. The collective pitch of the rotor was set at 0 degrees and the tips of each blade were marked with yellow and red color respectively. Once the RPM of the rotor was brought to 800, the traverse was used to bring the cloth slowly close to the rotor disk. By keen observation, the contact of the blades with the cloth was kept such that it got streaked with the color. The relative position of the streaks was used to determine which blade was at a higher angle. The pitch link length of the was increased/decreased in a fixed number of half turns depending on the gap between the two streaks on the cloth. As a rough measure, a gap of 2 mm in the streak lines, was compensated by one full turn in the link.
45
Figure 2.30: Blade tracking setup
Blade 1 109.2 mm Blade 2 107.8 mm
Table 2.11: Final Blade Pitch Link Setting
2.2.2.2
Results
The final lengths of the pitch links once the blades were tracked are given in Table 2.11. The tracking cloth used in the experiments is shown in Fig. 2.32. For better visibility, the right ends of the streaks have been highlighted. The first marking from the top is for experiments conducted on 30 November 2012. The blades were well tracked, so there is only one line visible, where both the red and yellow lines are overlapping. After some adjustment and repairs in the intervening period, the blades became out of track for the experiments conducted on 19 December 2012. Blade 1 (yellow) was flapping higher than Blade 2 (red). By decreasing the pitch link length of Blade 1 by two full turns, the experiment was conducted again. This time the red line was slightly higher than the yellow line, hence the pitch link lenght of Blade 1 was increased by half a turn. The last line on the cloth is for the experiment conducted on 20 December 2012, which shows the two lines overlapping perfectly.
46
Figure 2.31: Blade contact with cloth
Figure 2.32: Tracking cloth with blade streaks
Chapter 3 Electronic Systems There are several electronic components that have been used on the helicopter. Their setup and calibration plays an important role in the conduction of experiments. The devices can be classified as Communication Units,Actuators, Sensors and Power Units. A schematic of all the electronic components onboard the mini helicopter is presented in Fig. 3.1.
3.1
Communication Units
There are two types of communication units being used for the experiments. For sending commands to the actuators on the system a modified R/C transmitter is used. The data from the on-board sensors is sent to the ground station by the XBee wireless modules.
3.1.1
R/C Transmitter and Receiver
The Futaba 10CHP 10 channel radio control system (Fig. 3.2) along with the R1410DP receiver (Fig. 3.3)is used for the wireless control of the helicopter. The system works at a frequency of 35.17 MHz. The transmitter has a total of 2 levers or joysticks. There are 3 knobs and 8 switches available. There are 4 trim buttons present. The programming on the display can be navigated using a dial and a cursor. The transmitter is powered by
48
Figure 3.1: Mini Helicopter Onboard Electronics schematic
49
Figure 3.2: Futaba 10CHP Transmitter
Figure 3.3: Futaba R1410DP Receiver
50
a rechargeable 9.6V NiCd battery. If need arises, a regulated power supply unit can be used to power the transmitter instead of the battery. 3.1.1.1
Wiring
Primarily, the pilot uses the two joysticks to fly the helicopter. Each joystick has 2 degrees of freedom, namely up-down and left-right. There are different conventions that pilots use to assign the controls to each stick. For our convenience, we have used the most common ‘Mode 2’ type of transmitter. However, the transmitter purchased was of a ‘Mode 1’ type. To convert it to a ‘Mode 2’ transmitter, from the back panel, the two joysticks were swapped. The controls were hence now as per the following. Note that only the sticks were swapped. The trim buttons corresponding to the stick were still at the old places. Hence care needs to be taken if the trim controls are being used. The left joystick is free to move in the up-down direction. This is for the throttlecollective control. However, the left-right direction is spring loaded so that it always maintains the middle position. This is the tail control. On the other joystick however, both the degrees of freedom are spring loaded. The up-down direction is for the swash-plate pitch or longitudinal motion as shown in Fig. 2.8(c) and the leftright direction is for the swash-plate roll motion (Fig. 2.8(b)). Often, the terms used to describe these motions are borrowed from the fixed wing controls, so in manuals these are referred to as the elevator and aileron controls respectively. The tail yaw motion is also referred to as rudder motion. Each motion of the joystick is connected to the shaft of a potentiometer. Hence there are four potentiometers for the two joysticks. Each knob too is connected to a potentiometer. The potentiometer voltages are fed into the microprocessor of the transmitter, which according to the user settings and programming, converts the signals from the joysticks, knobs and switches into appropriate radio signals for each channel and transmits them to the receiver. 3.1.1.2
Potentiometer
A potentiometer is essentially a variable resistance device. It has three terminals:
51
Figure 3.4: Internal wiring of the transmitter
52
• Ground • Reference Voltage • Output Voltage In the given transmitter, the reference voltage for all the potentiometers is 3.3V. By rotating the shaft, the output voltage varies between the ground (0 volts) and reference voltage. But the stick and knob motions are restricted due to the size and shape of the control panel. Due to this reason, none of the controls moves the potentiometer outputs to the extreme position. They move from a minimum voltage level to a maximum voltage level, which is unique to each control. Normally, the output wire from the potentiometer is connected to the microprocessor in the transmitter. In our case, each potentiometer output wire was split into two parts. The part connected to the potentiometer was sent to the PXI as an input voltage, and the part connected to the transmitter microprocessor was connected with the output voltage from the PXI. To maintain uniformity, all the potentiometer output voltages were soldered with yellow wires, and the PXI output voltages were connected with green wires. The ground wire was kept as black and the reference voltage wire was kept as red. Other than this, two switch outputs were also tapped from the transmitter. The above 14 wires were soldered to a 15 pin DB-15S connector (Fig. 3.5), which was attached to the transmitter, in place of the CAMPac slot, which is not being used. The internal wiring can be seen in Fig. 3.4. The pin diagram of the connector is shown in Fig. 3.6.
Figure 3.5: DB-15S Connector
53
Figure 3.6: Pin Diagram of DB-15S Connector
The potentiometer outputs were taken as analog inputs into the PXI system. These output voltages were non-dimensionalized for use in the controls. The reasons for doing so are the following: • All voltage signals are prone to ambient noise. For a particular stick/knob position, the resistance ratio inside the potentiometer is fixed. Therefore the ratio of the output voltage and the reference voltage remains constant, if the noise affects the output and reference signals equally. • Although the reference voltage is regulated at 3.3V, there can be some shifts or changes due to transmitter battery power and noise. As mentioned earlier, the ratio does not change even if reference voltage changes. • By using a non dimensional number, we can have a consistent comparison of the different control motions. Rather than using different voltage limits for each stick, it is easier to work with a non dimensional number that can be directly related to the actual position of the stick. • In future developments, the transmitter or pilot controls can be changed. If their motion is also appropriately non-dimensionalized, the gains and sensitivity calibration can be easily obtained. This technique of non dimensionalization was implemented in the ground station code which is explained in detail in the next chapter.
54
Channel Connection 1 GY611 Rx.1-4 2 Longitudinal Servo 3 Unconnected 4 Lateral Servo 5 GY611 Rx.AUX 6 Collective Servo 7 Unconnected 8 Throttle Servo 9 Unconnected 10 Battery/UBEC
Table 3.1: Receiver Connections
3.1.1.3
Transmitter-Receiver Settings
The output channels of the receiver were connected as given in Table 3.1. The detailed steps for changing the transmitter settings are available in the manual (46). In the transmitter programming, the following important settings were used in each section: D/R, EXP This setting allows the user to have an exponential relation between the stick and the servo motion for channels 1, 2 and 4. We have kept the motion to be linearly related by setting D/R as 100% and EXP as 0% for all the three channels. END POINT In the endpoint setting, the servo extent in each direction can be increased or decreased. The default setting of 100% in both the directions is kept for all the channels. Note that this is the default setting, and extent can be set between 0% and 140%. For the throttle servo on Channel 8, the endpoint setting is 77% in both the directions. This is so, because the throttle knob can has much wider range of motion than the stick.
55
REVERSE The servo linkage arrangement determines the direction of motion of the swash plates and the throttle lever. The stick motion must correspond to the vehicle motion by setting the convention in the Reverse setting mode. For our vehicle, it is determined that channel 4, 6 and 8 are reversed while rest are in the normal mode. The convention is in the following fashion: • Throttle: Turning the knob VR(B) clockwise opens the throttle valve to increase fuel into the engine. • Collective: Pushing up the left stick lifts up the main rotor swash plate. • Roll: Pushing the right stick towards the right tilts the main rotor swash plate towards the right, and make the vehicle move right wards (Fig. 2.8(b)). • Pitch: Pushing up the right stick tilts the main rotor swash plate towards the front, and make the vehicle move forwards (Fig. 2.8(c)). • Yaw: Pushing the left stick towards the right causes the tail rotor swash plate to shift and make the vehicle yaw clockwise as viewed from above (Fig. 2.10(a)). AUX-CH The auxiliary channel setting allows us to use the switches and knobs on the transmitter for the unused channels on the transmitter. For this: • Channel 5 is assigned to Switch A. This switch allows the pilot to move between the GY611 AVCS mode and normal mode. • Channel 8 is assigned to Knob B. This knob is being used for the throttle servo. THR-CURVE/NOR and PIT-CURVE/NOR In most R/C helicopters, the left stick up-down motion gives a coupled response to both the throttle and collective servos. The throttle and pitch curve settings generate a non linear response to Channel 3 and Channel 6 which are supposed
56
to be connected to the Throttle and Collective servos respectively. However, in our case, the throttle is decoupled from the stick by assigning the throttle servo to Channel 8 and Knob B. Hence for us the THR-CURVE setting has no importance. But the PIT-CURVE setting must be properly calibrated. Typically, the collective servo moves in a quadratic fashion with the stick movement. But we configure the servo to move linearly be setting the curve according to Table 3.2. The blade pitch angle is measured by using a measuring device as shown in Fig. 3.7. The blade is fit into the slot. The top edge of the device is kept parallel to the stabilizer bar. The angle is read from the markings of the scale. The stick to angle calibration was obtained as shown in Fig. 3.8. Note that the swash plate collective motion is restricted due to the presence of the magnetic collar on the rotor shaft. Therefore, the stick motion less than -40% does not change the blade pitch angle.
Figure 3.7: Blade pitch angle measurement
GYRO SENSE This setting allows us to configure the gyro modes and the switch. We have used the settings: • Rate - Up = NOR (For normal mode) at 90% • Rate - Down = AVC (For AVCS mode) at 65%
57
Point Setting 1 -75 2 -26 3 -9 4 20 5 39 6 57 7 93
Table 3.2: PIT-CURVE Settings
Collective Pitch Angle(deg)
15
10
5
0 −100
−50 0 50 Stick Position(%)
100
Figure 3.8: Collective Pitch v/s Stick Position
58
This means that when Switch A is in the UP position, the normal mode is enabled, while in DOWN position, it is in AVCS mode. 3.1.1.4
Calibration
The receiver unit outputs a 70Hz PWM signal, the duty cycle of which varies according to the stick position. Experiments were conducted to measure the duty cycle from the receiver with respect to the stick position as defined in the transmitter. The output from the receiver was connected into the counter inputs of the NI-PXI 6289 card. At each stick position, the duty cycle of the PWM signal was recorded. For the normal setting, the PWM duty cycle varied as given in Fig. 3.9. For the reversed setting, the PWM duty cycle varied as shown in Fig. 3.10. Note that the results were uniform for all channels.
Figure 3.9: Duty Cycle v/s Stick Position Calibration (Normal Setting)
3.1.2
XBee Units
There are a total of six XBee Pro modules being used. Specifications of these wireless modules are given in Table 3.3 .Three of them are the transmitting units which are installed on the helicopter, while the corresponding receiving units are connected to the ground station. The three pairs are used for IMU , RPM-Sonar and GPS data respectively. The XBee units communicate using the Serial Port
59
Figure 3.10: Duty Cycle v/s Stick Position Calibration (Reversed Setting)
Indoor Range Outdoor LOS Range Supply Voltage Transmit Current Operating Frequency
60 m 750 m 2.8-3.5V 150 mA 2.4 GHz
Table 3.3: XBee Pro Specifications
Interface or RS232 ports. The settings for the XBees are given in Table 3.4. These settings are configured using the XCTU software which is freely available. 3.1.2.1
Ground Station
The XBee Pro units are mounted on the RS232 Explorer boards. They communicate at 2.4GHz. The board is powered by USB cables, and RS232 ports from the PXI are connected to the XBee Pros to obtain the data. The ground station units can be seen in Fig. 3.11.
60
Figure 3.11: Ground station XBee units
3.1.2.2
Onboard
Two XBee Pro units are mounted on RS232 Explorer boards on the vehicle. These are connected to the IMU and RPM-Sonar circuit respectively. For these connections, four pin round connectors are used. The four pins are used for the Ground, +5V , Rx and Tx terminals. The third XBee Pro unit is connected to the ‘Ivy XB’ of the Navstik. The power and data transmission is through the Navstik connection itself. It may be noted that the explorer boards are bulky and heavy. They require 5V for power, while the actual XBee only requires 3.3V. Significant savings in the weight can be made by replacing it with a small module such as the Navstik’s IvyXB.
3.2
Actuators
For the actuators, commercial servo motors are used. There are two types of servos being used on the helicopter. For the throttle, collective, lateral and longitudinal
61
Data
IMU
RPM + Sonar
GPS
Ground Station Onboard CH C CH C ID 1234 ID 1234 DL 30 DL 20 MY 20 MY 30 BD 38400 BD 38400 CH 17 CH 17 ID 2222 ID 2222 DL 60 DL 10 MY 10 MY 60 BD 38400 BD 38400 CH 11 CH 11 ID 3332 ID 3332 DL 50 DL 40 MY 40 MY 50 BD 9600 BD 9600
Table 3.4: XBee Settings
62
(a) S3151
(b) S9256
Figure 3.12: Futaba Servos used on the Mini Helicopter
motions, the Futaba S3151 servos (Fig.3.12(a)) are used. For the tail rotor collective, the Futaba S9256 servo (Fig.3.12(b)) is used. A comprehensive study of the servo characteristics can be found in the Ref. (33).
3.2.1
Servo S3151
To calibrate the motion of the servo, a test setup was built. In this, a protractor was mounted on the servo horn, and on the other side, a potentiometer was fixed such that its shaft moved with the servo horn. A marker was used to read the angle of the protractor. The setup can be seen in Fig. 3.13. The first step was to obtain the potentiometer calibration with respect to the angle. As explained earlier, the voltage ratio between the output terminal and the reference voltage terminal gives an accurate estimate of the potentiometer shaft position. The voltage was acquired using the PXI-1042Q with the NI-PXI 6289 analog input voltage card. The protractor was fixed at particular angles, and the average voltage reading of a 100 samples at 20Hz were measured, which is presented in Table 3.5. The voltage ratio at each angle is plotted in Fig. 3.14. A linear fit to the curve is obtained as: θ(deg) = 337.94(Vratio ) − 231.44 Once the potentiometer was calibrated, the servo motion was calibrated according to the transmitter stick position. The servo was connected to the receiver
63
Figure 3.13: Servo Angle Calibration Test Setup
Figure 3.14: Potentiometer Calibration
64
Angle (degrees) Voltage Ratio 70 0.892 60 0.863 50 0.833 40 0.806 30 0.769 20 0.741 10 0.714 0 0.685 -10 0.655 -20 0.627 -30 0.596 -40 0.567 -50 0.538 -60 0.508 -70 0.479
Table 3.5: Potentiometer Angle Calibration
channel, and the transmitter stick was moved to different positions. The voltage ratio from the potentiometer was obtained and converted into angle. As mentioned earlier, the servo motion was dependent on the transmitter setting. Both the normal and reversed settings of the channels are plotted in Fig. 3.15. Note that the absolute magnitude of the angle is not important, since it depends on the initial protractor setting. It can be seen that considering the 0% stick position as neutral, the servo horn moves to angles of ±39o .
3.2.2
Servo S9256 and Gyro GY611
The GY611 gyro is a commercial yaw controller which has been used on the mini helicopter. Earlier attempts to control the yawing motion of the helicopter with just the IMU yaw data and S3151 servo were unsuccessful. This was because the
65
Figure 3.15: S3151 Servo Angle Calibration
Figure 3.16: GY611 Gyro and Controller
66
yaw motion of the helicopter is very fast, and the servo and sensor response is slow. The S9256 servo operates at a 760 µs pulse which corresponds to nearly 1316 Hz. The GY611 gyro gives a more accurate and fast angular rate response to the controller. The controller generates the PWM signal for the servo. It obtains feedback as the yaw rate from the gyro, and also the yaw input from the pilot. Based on these it gives a control command to the tail servo. The controller can also switch its control mode from the switch input from Channel 5. There are two modes available, the Normal mode and the AVCS mode. In the normal mode, the yaw control is essentially a rate control system. For no pilot input, the vehicle maintains a zero turn rate. The pilot commands, which come from the receiver’s Channel 1 act as ‘rate commands’. But this mode has a disadvantage. During flight, if due to air disturbances the vehicle starts to yaw, the normal mode controller is able to completely stop the turn rate. But the final heading might be different from the original heading the pilot was flying. The AVCS mode is like a heading direction control system. In the AVCS mode, no stick input should go to the controller when it is first turned on. The controller then recognizes the current heading as the reference. If no stick input is given, the vehicle maintains both the same heading and zero yaw rate. If due to disturbances the vehicle begins to yaw, the controller returns the vehicle to its original heading. The pilot stick inputs are treated as ’attitude controls’. Hence any non neutral stick input will cause the vehicle to yaw until the angle reference is reached. This often creates a problem while testing. When the the tail rotor swash-plate motion is being checked before a flight, and if the AVCS mode is used, the stick input is recognized as an angle command. Since the tail rotor is not rotating, the helicopter does not yaw. As a consequence the controller tends to push the swash-plate to the extreme position. In the AVCS mode, the controller will show a black spot on the display screen, signifying a non neutral stick input. If the stick is at its neutral, the screen will show an ‘A’. In the normal mode, a letter ‘N’ is visible. The settings which were finally set for the helicopter are given in Table 3.6. Detailed instructions and explanations are available in the instruction manual (Ref.
67
Setting DIR G: 1A G: 2N NCG ACG D1 D1 TRK MODE FMOD AVS LMT
Value Rev 35% 100% A 130% , B 130% A 120% , B 70% IA 0%, IB 0% DB 0%, DA 0% 0% CMT F3C 100% A100%, B100%
Table 3.6: GY611 Controller Settings
(47)). A study on the gyro and controller response was done in Ref. (33).
3.3
Sensors
There are four main sensors being used on the vehicle. There is an inertial measurement unit, a sonar for height measurement, an rpm measurement circuit and a global positioning system. The setup and calibration of the global positioning system is explained in a later chapter.
3.3.1
IMU
The inertial measurement unit is at the heart of the control of the mini helicopter. The IMU used is the 3DM-GX1 from Microstrain Inc. It contains three accelerometers, three rate gyros and three magnetometers. The IMU has an embedded micro-processor, with which it is able to calculate and output data in the form of euler angles, accelerations, rotation rates, magnetic field and quaternions.
68
Data Accelerations Rotation Rates Euler Angles
Precision 10−4 m/s2 10−4 deg/s 0.1deg
Table 3.7: IMU Data Precision
3.3.1.1
Gyro Stabilized Data
The IMU has its own filtering algorithms with which it outputs ‘gyro-stabilized’ accelerations, rate and angles. There are two types of error that are found in accelerometers and rate gyros. These are bias and drift. A bias is a constant offset component in the sensor output. A drift is an error that keeps on increasing or decreasing linearly with time. The use of ‘gyro stabilized’ outputs from the sensor removes these errors to a very large extent. An estimate of the gyro stabilized filtering capability can be seen in Figs. 3.18 and 3.19. The black line represents the raw data while the gray line represents the gyro stabilized data at the same position. The IMU was kept static during the data acquisition. As can be observed from the figure, the noise in the data is reduced substantially. For example, the raw acceleration data has a mean of -0.170, and the gyro stabilized data has a mean of -0.173. The standard deviation of the raw data is about 0.023, while for the gyro stabilized data is less than half of it, i.e. 0.010. The precision of the data obtained is given in Table 3.7.
Figure 3.17: 3DM-GX1 Inertial Measurement Unit
69
Figure 3.18: Raw and Gyro stabilized Pitch Angle data
Figure 3.19: Raw and Gyro stabilized X acceleration data
70
Command Hexadecimal Character Raw Vectors 0x03 Gyro Stabilized Vectors 0x02 Raw Euler Angles 0x0E Gyro Stabilized Euler Angles 0x0D
Table 3.8: 3DM-GX1 Commands
3.3.1.2
Communication
The IMU operates in the polling mode, and uses RS-232 serial port communication protocol. In this polling mode, a command is sent to the unit. Based on the required output of the command, the instrument replies. The various commands used are given in Table. 3.8 and are transmitted as hexadecimal characters. Other available commands can be obtained from the manual in Ref. (48). The term Vectors here means the three-axis quantities from accelerometers, rate gyros and magnetometers. The output cable from the IMU was modified to suit the connector requirements in the sensor tray. The four wires in the cable were connected to the XBee as shown in Fig.3.20.
Figure 3.20: IMU-XBee 4 Pin Connector Diagram
71
3.3.1.3
Conversion Factors
The output from the IMU is in the form of a long message string. This string is decoded to obtain the required sensor outputs. Each message has a start character and ends with a check sum byte. The sum of all the bit values in a properly received message must be equal to the value of the check sum byte. Depending on the command message, the sensor values are written in between the start character and the check sum bytes. These values need to be multiplied by factors to obtain values in SI units. The factors for each value are given as per the following: • Acceleration: ×(9.81 ∗ AccelGainScale/32768000)m/s2 • Rates: ×(GyroGainScale/32768000)rad/s • Euler Angles: ×(180/32768)degrees The values of the gain scale factors are calibrated by the manufacturer. These values are saved in the non volatile memory of the unit. The ‘Accel Gain Scale’ is saved in the EEPROM location #230. Its value is 8500 for the IMU used. The ‘Gyro Gain Scale’ is saved in EEPROM location #130, and has a value of 10000. 3.3.1.4
Timing
The time taken for the IMU to respond to the given command decides the control loop timings. The delay experienced between consecutive readings of euler angles is 18ms, while the delay for obtaining the acceleration and rotation rate data is 19ms. This is the delay when the IMU is connected with the RS232 port, directly to the computer. Using the wireless XBee modules significantly introduces further delay in the system. The amount of delay due to the wireless communication is dependent on the length of message being transmitted. Since the size of the message is large (23 bytes for Vector data, and 11 bytes for Angle data), the total delay is nearly doubled to 40 ms. Switching over to faster communication methods will have a significant impact on the control timings.
3.3.2
Sonar
The sonar is used to measure distance from an obstacle. Our purpose in using a sonar is to determine the height of the vehicle above the ground.
72
(a) SRF08
(b) SRF235
Figure 3.21: Sonar modules
3.3.2.1
Theory of Operation
The sonar sends out a sound pulse, and measures the time taken for the pulse to reflect back. It uses the speed of sound in air and the time of flight to determine the distance from the object. One of the critical specification for sonars is the frequency of sound used. The frequency of sound determines the cone angle of the sound pulse. As the sound leaves the sonar, it tends to expand to form a conical lobe. The closest object inside the lobe reflects the sound. Higher frequency sounds form a sharper or small half angle cones. The reflected sound also travels back in the form of a cone. The sonar must lie within this cone to receive this echo. A high frequency sound will also have a tendency to dissipate energy much faster than a low frequency sound. This means that beyond a particular distance, the reflected echo will not reach back to the sonar, or in other words, it is too weak to be detected. The minimum range is limited by the time it takes to emit a pulse and eliminate any residual ringing in the sensor. This is usually about 0.1 ms.
73
3.3.2.2
Comparison of Sonar modules
The two sonars which have been tried on the helicopter are the SRF08 3.21(a) and the SRF235 3.21(b). Both the sonars are manufactured by Devantech and their specifications are given in Table 3.9. Note that cone angle specified in the table is the approximate angle of the sensor cone at its half range. The actual cone has curved surface. Both sonars were tried on the helicopter during operation and there were problems experienced for each. The SRF08 has wide cone angle which has a tendency to pickup the presence of tethers when they drift into the cone. Also, distance measurements beyond 0.5 m become unreliable during engine operation. This is due to possible engine noise affecting the echoes. On the other hand, the use of the SRF235 limits the range of use to just 1.2m. With a small cone angle of about 15 degrees, the beam behaves more like a beam of light. If tilted beyond 8 degrees, the sound bounces off the surface and the sonar is unable to detect the obstacle. With the helicopter attitude roll and pitch changing in flight, it is extremely difficult to ensure the sonar beam falls flat on the ground surface. In experiments, this sonar too was found to be not useful as a height measurement device, beyond heights of 0.4-0.5m. In static lab experiments however, both sonars reliably worked as per the listed specifications. The sonar modules communicate using the I2C protocol (inter-integrated circuit bus). This is an industry standard which allows multiple slave devices to be chained to a master device. The sonar requires four connections, the ground, +5 volts, SDA and SCL pins. These are communicating with the Basic Atom Pro Module. The connector used is a 4 pin connector with the connections as shown in Fig. 3.22.
3.3.3
RPM Measurement
The measurement of rotor rpm is done using a magnetic probe and a collar as shown in Fig. 3.23. The collar is attached to the rotor shaft. On the collar, eight magnets are fixed such that their north pole points outwards from the collar. The magnetic probe is mounted on the helicopter such that it faces the magnets of
74
SRF08 SRF235 Voltage (V) 5 5 Current (mA) 15 25 Frequency (kHz) 40 235 Minimum Range (cm) 3 10 Maximum Range (m) 6 1.2 o Beam Angle 60 15o Ranging Time (ms) 65 10 Table 3.9: Sonar Specifications
Figure 3.22: Sonar-Circuit 4 Pin Connector Diagram
75
Diameter 6.35 mm Length 22 mm Coil Resistance 130 ohms ± 10% Table 3.10: Magnetic Probe Specifications
the collar. This magnetic probe is a self excited and non contact based device, which gives a voltage output proportional to the speed of passing magnetic field. Specifications of the probe are given in Table. 3.10. Further details are provided in Ref. (39).
Figure 3.23: Magnetic Probe and Collar
3.3.3.1
Circuit Design
The voltage output of the probe for the given magnets and range of RPMs is between ±0.4V . This voltage signal is very noisy. To eliminate the noise in the circuit and amplify the signal, a dual op-amp LM358 was implemented as a low pass amplifier circuit and an inverting comparator. The circuit diagram, including connections to the microcontroller, sonar and XBee units is given in Fig. 3.24. In the low pass amplifier circuit, the output of the op-amp is given by: Vo R2 1 =− Vi R1 1 + R2 C1 s
(3.1)
76
Figure 3.24: RPM Sonar Circuit schematic
Here, the input voltage Vi is the probe output. Note that this output is coerced between the maximum output voltage of 3.3 V and minimum of 0 V. The output of the comparator circuit is given as: Vo = Vsat
(V+ − Vi ) |V+ − Vi |
(3.2)
The saturation voltage for the given op-amp is 3.3 V. The positive end voltage V+ is kept to a mid value using resistors in series. Hence, for the given circuit, its value becomes:
V+ =
R5 R5 + R6
5V
(3.3)
After some trial and error, the appropriate values of components used in the circuit were as given in Fig. 3.24. The circuit was tested on a breadboard and then implemented on a PCB for mounting on the helicopter. The output from each part of the circuit was measured as shown in Fig. 3.25. The sampling rate was 10000Hz. Figure 3.25(a) shows the voltage output of the magnetic probe. It can be seen that the peaks and widths of the pulses are not constant. This shows that the magnetic field strength of the magnets is different, and they are not placed precisely equidistant on the collar. A large amplification factor was chosen for the low pass amplifier and filter, whose response is plotted in Fig. 3.25(b). As can be
77
observed, the negative probe voltage is nullified. The amplification beyond 3.3 V is coerced. Most importantly, the noisy spikes obtained in the probe output are eliminated and not amplified. The output of the comparator portion of the circuit is shown in Fig. 3.25(c). The output is now completely digital, and is fed into the microcontroller. 3.3.3.2
Microcontroller
The Basic Atom Pro 40 microcontroller (Fig. 3.26) has been used for the RPM and sonar measurements. The microcontroller has its own language and development environment. Its purpose is to act as an interface between the ground station and the two sensors. It communicates with the ground station using the serial port interface on the XBee units. The connector used is the 4-pin round connector with the pin diagram as shown in Fig. 3.27. The microcontroller code is provided in the appendix. To bring all the communication protocols to the same standard, the polling mechanism as discussed for the IMU was implemented. The advantages of such a system are: • The sensor replies on demand. It does not need to waste its resources if the data is not required. • Continuous transmission of data will always lead to data and timing loss if the ground station control loop timings are not in phase. At some instances the ground station will have to wait for the current process to finish, and in other cases it will get excess or incomplete data which will be discarded. Another feature implemented is that the message is always of a fixed length, depending on the command. Also to minimize delay in transmission through XBees, the message length has been kept as short as possible. This has been done by transmitting the values in hexadecimal base rather than decimal base. Hexadecimal characters can represent more values per character. So it is more suitable for our purpose. The data is sent in the format specified in Table 3.11. For RPM data, a three place hexadecimal value preceded by a capital R and ending with an end of line character is sent. With a three place hexadecimal value, RPMs of up to 4096 can be sent. Similarly, the sonar data in centimeters is preceded by an S
78
(a) Magnetometer Probe Output
(b) Low Pass Amplifier Output
(c) Comparator Output
Figure 3.25: RPM Filter Circuit response
79
Figure 3.26: Basic Atom Pro 40 on development board
Figure 3.27: RPM Circuit-XBee 4 Pin Connector Diagram
80
Data RPM Sonar Combined RPM Sonar
Command Response R R123\n S S123\n C R123S123\n
Table 3.11: RPM Sonar Commands
and ended with an end of line character. As before, the three place hexadecimal number can represent up till 40.96m. The combined command sends both the data in one message. Commands In the RPM command (‘R’), the time period of a single pulse is measured and transmitted instantaneously. Hence the delay is dependent on the time period of the pulse. If the time for the pulse to end exceeds 65ms, the code assumes zero RPM. Therefore, this sets a limit to the minimum RPM that can be measured. So rotation rate below 118 RPMs cannot be measured by this sensor. The relation between the time of pulse (tp ) in seconds and the RPM (ΩRP M ) for an eight magnet collar is given as: ΩRP M =
60 8tp
(3.4)
In the Sonar command (‘S’), the sonar always takes 65ms to respond. The sonar is first initialized and then the program waits for 65 ms before checking the sensor output. In the Combined command (‘C’), First the sonar is initialized. Then, the pulse width of the RPM pulse is measured. The time period of this pulse is used to determine how many more pulses can be measured in 65ms (the waiting time for sonar). After the remaining pulses are also measured, the sonar output is taken. The combined data is then transmitted.
81
3.4 3.4.1
Power Units UBEC
Figure 3.28: UBEC
The Universal Battery Eliminator Circuit (Fig. 3.28) is connected to the battery at 11.1 V. It has two regulated outputs, which can be at 5V or 6V, depending on the requirement. There are two UBECs being used on the vehicle. One UBEC is labeled the sensor UBEC, which powers the RPM-Sonar circuit and the IMU. The other UBEC is labeled as the Servo UBEC, which powers the receiver unit. With the addition of the Navstik-GPS unit, the other output of the servo UBEC is used for powering it.
3.4.2
Battery
Currently, two rechargeable Lithium Polymer batteries are being used on the vehicle. The batteries are rated at 11.1V. A 1300 mAh battery is used for the servo UBEC and a 1000mAh battery is used for the sensor UBEC. This is because the current requirement of the servos is higher. The 1300 mAh battery weighs about 115 gms, while the 1000mAh battery weighs about 70gms. At full charge, the voltage level of the battery is nearly 12.55 V. After a flight of 30 minutes, the
82
Figure 3.29: LiPo Batteries and Charger
battery discharges nearly 0.4-0.5 V. If the battery voltage drops below 11.4 V, it is recharged using a charger. The batteries and the charger can be seen in Fig. 3.29.
Chapter 4 Ground Station The ground station design is one of the most important factor in the success of an autonomous flying vehicle. Human error remains a leading cause of unmanned aerial vehicle crashes. The problem is that drones are currently controlled by many different mechanisms, from joysticks, mouse, keyboard configurations and even touchscreen interfaces. This variety introduces more opportunities for mistakes, especially when multiple important controls are placed in close proximity. For the mini helicopter, all the control logic calculation takes place on the ground station, since there is no on-board computer. Sensor data is received from the wireless units and control outputs are transmitted through the r/c transmitter.
4.1
Setup
The ground station is shown in Fig. 4.1. All the units are placed on a portable table that can be taken near the vehicle as necessary. The units consist of: 1. A personal computer system, with a CPU, monitor, mouse and keyboard. 2. A National Instruments PXI 1042-Q Real Time System. This is connected to 2 signal conditioning boards. 3. An R/C Transmitter and a board on which 3 Xbees are mounted. 4. A power supply for powering the transmitter unit if required. 5. Two UPS units for power backup
84
Figure 4.1: Ground Station
4.1.1
Real Time PXI system
The LabVIEW Real-Time Module allows LabVIEW graphical programming on a real-time operating system. A real-time operating system does not mean it is quick. More precisely, real-time means in-time. With most general operating systems, a response cannot be ensured to occur within any given time period, and calculations might finish much later or earlier than expected. For a system to be considered real-time, all parts of it must be real-time. Just having an application running in a real-time operating system may not have it behave with real-time characteristics. The application may rely on something that does not behave in real-time. For our ground station system, the use of wireless communication and the sensors introduces a lot of uncertainty. The data logging on the host computer is also an indeterminate timing task. Therefore, the system cannot be called a real-time system. The variation of loop cycle time from the desired loop cycle time is known as jitter. Even with real-time operating systems, the loop cycle time can vary between cycles. The maximum amount that a loop cycle time varies from the desired loop cycle time is known as maximum jitter. High determinism, a characteristic of real-time systems, guarantees that calcula-
85
tions and operations occur within a given time. It means that the jitter magnitude is small. The time between input and output is known as latency. Deterministic systems may still have a high latency. Properly implemented real-time systems guarantee a worst case latency, since the maximum loop cycle time is fixed.
4.1.2
Acquisition Cards
The Real Time PXI 1042-Q system communicates with the main computer through an ethernet cable. The main computer is known as the ‘Host’ computer, and the PXI is known as the ‘Target’ computer. The PXI system is a headless embedded system, which means it does not have a monitor, keyboard or mouse that lets the user interact with it directly. It also does not have any hard disk storage. The codes that run on the system are written on the host computer and then transferred for execution to the PXI. These codes are the main control logic implemented on the ground station. The user interface runs on the host computer. Both these codes run simultaneously on the two computers so that the user inputs are communicated to the target and all the sensor and control inputs and outputs are shared to the host computer. The host programs are mainly for data visualization and logging. There are three cards being used on the PXI system: 1. NI PXI-6733 16 Bit Analog Output: This generates the control commands to the transmitter. 2. NI PXI-6289 Multifunction DAQ: This measures the stick and knob positions of the transmitter. 3. NI PXI-8430/8 RS232 Serial Ports: This card is used to communicate with the XBee units which receive the sensor data.
4.2
Control Design
The most essential component of the ground station software is the control logic. Hence the control logic of each state of the helicopter is presented in this section.
Figure 4.2: RPM Control Diagram
86
87
4.2.1
RPM Control
The RPM control loop uses the conventional PID closed loop system, and a feed forward mechanism to couple the collective pitch angle to the throttle. The closed loop diagram is shown in Fig. 4.2. In addition to the closed loop control, a feature known as auto throttle is implemented. 4.2.1.1
Auto Throttle
The auto throttle mechanism is basically a ramp control input to the system. There are two modes for this feature, the take off mode and the descent mode. In the take off mode, the throttle increases linearly with time and in the descent mode, the throttle decreases linearly with time. In the take off mode, if the RPM exceeds the setpoint RPM the feature automatically cuts off and the throttle attains a steady value. Similarly, in the descent mode, if the measured RPM falls below the setpoint, the auto throttle stops at the current value. This feature is very useful for quick increase or decrease in RPM. With the help of this, significant saving in the fuel of the helicopter was made, which was wasted during a slow take off. After several experimentation, the recommended values of the takeoff rate was found to be 0.005 throttle per second, while the descent rate was much faster at -0.015 throttle per second. With this particular take off rate, the usual time for taking up the RPM from 200 to 1300 is between 2 and 3 minutes. The descent from about 1200 RPM to 200 RPM is just over a minute. This feature also has considerable application in the autonomous takeoff and landing of the vehicle. 4.2.1.2
Collective Link
In the collective link feature, the final output (manual or auto) to the collective servo is used to counter the effect of change in aerodynamic drag on the rotor and hence change in RPM. The collective output before the feature is turned on is stored as the neutral collective. The difference between the current collective and the neutral collective is multiplied by two factors, Kc and dt/dc and added to the control output of the RPM control. The factor dt/dc is the collective link factor which is the slope between the change in throttle with change in collective. The value of this factor is obtained from open loop experiments and theoretical calculations, which is explained in the next chapter. The factor Kc is a safety
88 Kp 1.4 × 10−4 /rpm Ki 1.9 × 10−6 /rpm.s Kd 0s/rpm Kc 0.8 dt/dc 9.6 × 10−2 Take Off Rate 0.005/s Descent Rate −0.015/s KSP :T hrottle 1500rpm Table 4.1: RPM Gains
factor which is kept less than one. This allows us to tune the RPM response with the change in collective. The current values being used for the vehicle are dt/dc = 0.0961 and Kc = 0.8. 4.2.1.3
PID Control
The RPM obtained from the sensor is used as feedback to the throttle. The throttle position when the Auto RPM is turned on is stored as the neutral throttle. To this value, the control compensation and feed forward compensation is added. The difference between the measured RPM and the set point RPM is multiplied by the proportional gain. The integral of this error is multiplied with the integral gain. The derivative is multiplied by the derivative gain, but for our system this is kept as zero. The integral component of the throttle compensation can be nulled by using the reinitialize button on the computer. This allows a faster decrease in the RPM. The set point RPM can be set either by typing on the screen, which is called as the Computer Setpoint. Or, by changing the authority from the front panel, the throttle knob on the transmitter can act as a set point control. Since the throttle knob can move between 0 and 1, the factor KSP represents the maximum RPM set point required. However, usually this is an unused feature, as the RPM is kept a constant at 1300 RPM only. The default value of this factor is 1500. The values of all the RPM control gains that are used have been presented in Table 4.1.
89
Kheight:GainF actor Kz Kz˙ Kz¨ Kz¨˙ KSP :Collective
1.0 0/m 0s/m −0.009s2 /m −0.05s3 /m 3m
Table 4.2: Height Control Gains
4.2.2
Height Control
The height control is implemented with a simple feedback loop, as shown in Fig. 4.3. The acceleration in the Z direction is obtained from the IMU. The height from the ground is picked up from the Sonar. The GPS provides the height from the mean earth sphere. The acceleration from the IMU is differentiated with time to obtain the jerk in the Z direction. Similarly, the displacements from the Sonar and GPS are differentiated to obtain the climb rate. These values are multiplied by the control gains to obtain the control compensation. This compensation is added to the neutral collective. This can be either a computer entered value, or the output of the collective stick, depending on the authority switch. The height gains are multiplied by a gain factor, which is used for the tuning the height response of the vehicle without changing the relative magnitudes of the individual feedback gains. The height set point can also be entered on the computer screen or be a factor multiple of the collective stick input. Currently, this feature is not being used since our height measurements from both the sonar and GPS are bad. The height gain is kept zero. The default value of the set point gain is 3, which implies a set point height change from 0 to 3 meters. The outputs from the sensors do not follow the same convention. For the sonar and GPS, the z direction is upwards from the ground, while it is opposite for the IMU Z direction. Due to this the z gains multiplied by the IMU sensor outputs are negative. The final values of gains which are being used are given in Table 4.2.
4.2.3
Yaw Control
The yaw control system is shown in Fig. 4.4. The feedback from the yaw angle and the error between the reference angle is multiplied by the gain to obtain a control
Figure 4.3: Height Control Diagram
90
91
output to the GY611 controller. The controller uses its own rate gyro to generate the servo outputs. This feedback control is found to be sufficient to maintain good control over the yaw angle of the helicopter. A yaw gain factor is used to tune the controller. The set point yaw angle can be changed either from the computer screen or from the transmitter, depending on the authority switch. The sensitivity of the stick input can be adjusted by changing the value of KSP :yaw . The gain factor value is kept as 1, while the yaw angle gain used is 0.0008.
4.2.4
Roll-Pitch Control
The roll and pitch control logic is identical, and is shown in Figs. 4.5 and 4.6. It consists of two loops. The inner loop consists of six quantities namely, angle, angular rate, angular acceleration, translational acceleration, translational jerk and translational snap. The measured angle is subtracted from the reference angle and multiplied by the angle gain. The rest of the quantities are negated and multiplied by their individual gains which is fed as the control compensation to the servo. This compensation is added to a neutral roll or pitch component. This neutral component can be changed during operation, either from the computer or from the radio transmitter, depending on the authority chosen. The reference angle for the inner loop is a sum of three components. The first component is the value chosen on the computer screen or input by the joystick. The sensitivity of the joystick is adjusted by changing the value of KSP . The stick neutral needs to be subtracted to have a zero set point angle when the stick is in the mean position. The second component is obtained form the stick motion in the perpendicular direction. So a stick input in the pitch direction also gives a change in set point in the roll control loop, and vice versa. This is adjusted by using a coupling factor, which in effect allows us to have decoupled motion of the helicopter in the horizontal plane. The third component is obtained by multiplying appropriate gains to the position error, speed, acceleration, jerk and snap of the vehicle. Due to the convention of the pitch angle and X motion, the gain factor for the pitch and X motions are both kept negative. This is due to the reason that an
Figure 4.4: Yaw Control Diagram
92
93
Roll
Pitch Roll Sensitivity 400 deg Pitch Sensitivity -300 deg Pitch-Y Coupling 0.08 Roll-X Coupling −0.17 Inner Loop Kroll:gf 1.0 Kpitch:gf −1.0 −4 Kφ 7.04 × 10 /deg Kθ 7.65 × 10−4 /deg Kφ˙ 7.84 × 10−6 s/deg Kθ˙ 1.092 × 10−5 s/deg Kφ¨ 7.98 × 10−6 s2 /deg Kθ¨ 1.114 × 10−5 s2 /deg Ky¨ 4 × 10−3 s2 /m Kx¨ 1.0 × 10−2 s2 /m Ky¨˙ 1 × 10−3 s3 /m Kx¨˙ 1.0 × 10−3 s3 /m Ky¨¨ 2 × 10−4 s4 /m Kx¨¨ 2.0 × 10−4 s4 /m Outer Loop KY :gf 1.0 KX:gf −1.0 KySP 0.0deg/m KxSP 0.0deg/m Ky˙SP 0.0deg.s/m Kx˙ SP 0.0deg.s/m Ky¨SP 400deg.s2 /m Kx¨ 200deg.s2 /m Ky¨˙SP 20deg.s3 /m Kx¨˙ SP 10deg.s3 /m Ky¨¨SP 3.5deg.s4 /m Kx¨¨SP 1deg.s4 /m Table 4.3: Roll-Pitch Gains
increase in pitch angle implies a nose up motion, or negative X motion. An increase in X acceleration would imply that the set point pitch angle should increase to control it. Therefore the negative gain factors are used in both the loops. The values of the final gains are shown in Table 4.3.
4.3
Software Architecture
The ground station software can be classified into two categories, programs running on the host machine, which is the personal computer, and the programs running on the the target machine, which is the PXI 1042Q system. The tasks required for the operation of the ground station and vehicle have to be split between these two systems. Also, to minimize time delays, the communication between the two systems has to be as compact and short as possible. This is done by sharing the least amount of information possible between them. These are known as Network Shared
Figure 4.5: Pitch Control Diagram
94
Figure 4.6: Roll Control Diagram
95
96
Variables. An attempt has been made to optimize the tasks and sharing between the programs. There is still considerable scope in improving the computation algorithm, however the key tasks that are acting as the bottlenecks are the data logging and sensor communication.
4.3.1
Shared Variables
The data being communicated between the two systems in LabVIEW is known as Network Shared Variables. These have been classified in libraries as per the following: 1. Device Settings: This library contains the com port and baud rates of each sensor. It also contains the physical channel information for the inputs and outputs from the transmitter. The data in this library is used for initializing the target and sensor communication. 2. Transmitter Calibration: This library contains the maximum and minimum voltage ratios for each of the five controls: throttle, collective, roll, pitch and yaw. These values are used for the non dimensionalization of the stick and knob positions. 3. Analog Inputs: This library contains input voltages of the eight connections for the throttle knob, collective, roll, pitch and yaw sticks, and the two switches F and H. The switch positions are also stored as boolean values of true and false. 4. Analog Outputs: This library contains the five output voltages to the transmitter: the throttle, collective, roll, pitch and yaw. 5. IMU data: This library contains three element arrays each for the euler angles, accelerations and rotation rates. Each element represents the magnitude of the data in the particular axis, in the order X-Y-Z or Roll - Pitch - Yaw. It also stores the conditioned or filtered data for each quantity.
97
6. RPM Sonar data This library contains the raw and conditioned values of the RPM and Sonar data. 7. GPS data This library contains the displacements in the earth frame as output by the GPS, the displacements in the body frame of reference and the speeds. All these are 3 element arrays representing the data in each reference axis. This library also contains the command variable used to communicate with the GPS. 8. Processed Data: This library contains the data obtained after processing sensor data such as rotational accelerations and jerks, translational jerks and snap values. It also contains the climb rate obtained from the sonar data. 9. RPM Controls: This library contains the switches for Auto RPM, Authority, Collective Link and Reinitialize. It also has the computer and transmitter set point values. The non dimensional stick input, control output and final output data are stored in this library. An array of all the RPM control gains also exists in this library. 10. Height Controls: Similarly, this library contains the switches for Auto Height and Authority control. It also has the computer and transmitter set point values. The non dimensional stick input, control output, neutral collective and final output data are stored in this library. An array of all the height control gains also exists in this library. 11. Yaw Controls: This library contains the switches for Auto Yaw and Authority control. It also has the computer and transmitter set point values. The non dimensional stick input, control output and final output data are stored in this library. An array of all the yaw control gains also exists in this library.
98
12. Roll Controls: This library contains the switches for Auto Roll (inner loop) and Authority control. It also has the computer and transmitter set point values. The non dimensional stick input, control output, neutral roll and final output data are stored in this library. An array of all the roll control inner loop gains also exists in this library. 13. Pitch Controls: As for the Roll Controls, this library contains the switches for Auto Pitch (inner loop) and Authority control. It also has the computer and transmitter set point values. The non dimensional stick input, control output, neutral pitch and final output data are stored in this library. An array of all the pitch control inner loop gains also exists in this library. 14. Position Controls This library contains the switches for Auto X and Y (outer loop) control. The X and Y set point values are stored here, which determine the outer loop set point output to the inner loop. The X and Y neutral values are the reference voltage levels for the servos.
4.3.2
Programs
The host programs have been grouped under a single Menu program which follows the State Machine Architecture. This means that all the operations that are required by the host machine, can be accessed through the Menu as shown in Fig. 4.7. This program is the master control for the operation of the helicopter. Before any experiment, all the required settings, calibrations and testing are done through it. It acts as a record keeping system, so that every command pressed is logged into a file, for future reference. The helicopter weight, battery charge, equilibrium angles are all recorded along with a time stamp of the data. Additionally, any comment regarding the experiment from the flight engineer can be entered and saved. The program generates the files to which the experimental data is written, and creates the folders according to the run number and the date of experiment. It makes it
99
Figure 4.7: Menu for Host Programs
mandatory to go through the individual transmitter and sensor tests, before proceeding with the flight experiment. Otherwise it generates an error message. The details of the individual programs is given below. 4.3.2.1
Settings
There are two settings programs, the channel settings for the transmitter connections and the port settings for sensor communication. They are shown in Fig. 4.8. The programs simply write the user selection for the channels, ports and baud rate into the appropriate variables for use by the PXI. These settings are also written into the log file of the menu program. Hence it is necessary to run these programs before starting any acquisition on the PXI system. The colour of the front panel controls in the DAQ settings corresponds to the wire colour used in the connections with the PXI.
100
(a) DAQ Settings
(b) XBee Settings
Figure 4.8: Settings for Ground Station
4.3.2.2
DAQ Testing
Figure 4.9 shows the front panel which is operated on the host computer. The program allows the flight engineer to test whether the analog voltage inputs and outputs of the radio transmitter are working. The dial shows the voltage inputs and the knob can be used to change the voltage outputs. The direct buttons can be used to directly connect the stick inputs to the radio output. This reverts the transmitter unit back to its original configuration, and like a conventional RC control for hobbyists. By changing the outputs, the servo motion can be observed. As an extra feature, the position of Switch F and H can be observed, which have been labeled as Engine Kill and Authority switch, although they have not been used for any such purpose. In future work, they can be integrated into the ground station control. On the target computer, the transmitter voltages are acquired and then non dimensionalized. The extreme positions of the stick or knob are demarcated as 0 and 1. The voltage ratio at the extreme is calibrated for each stick as Rmin = Vmin /Vref and Rmax = Vmax /Vref . If the voltage output from the stick potentiometer is Vo and the reference voltage from the transmitter is Vref , the linear non dimensionalization
Figure 4.9: Front panel for DAQ Testing
101
102
Figure 4.10: Front Panel for IMU Testing
is done according to: Non Dimensional Stick Position =
Vo − Rmin .Vref (Rmax − Rmin )Vref
(4.1)
In a similar manner, the control output which is non dimensional is dimensionalized into a voltage generated for the radio unit, using the inverse of the above equation: Vo = Vref [Non Dimensional Stick Position.(Rmax − Rmin ) + Rmin ]
(4.2)
103
Figure 4.11: Front Panel for RPM-Sonar Testing
4.3.2.3
IMU Testing
The IMU testing is done using the program shown in Fig. 4.10. The euler angles, accelerations and rotation rates are displayed in their raw and conditioned states in this program. During operation of the IMU testing, the helicopter is lifted from the rotor head, and the roll and pitch angles noted. This denoted the attitude of the helicopter when its center of gravity is positioned directly beneath the rotor hub. In the target machine, a loop iterates at about 65 ms. In each iteration, the IMU data is acquired and then filtered. The details of the conditioning are explained in the next section. 4.3.2.4
RPM Sonar Testing
The RPM and Sonar testing is done using the program shown in Fig. 4.11. The data from the sensors is directly displayed in the graphs on screen. The loop iteration takes about 70 ms. 4.3.2.5
GPS Testing
Similarly, the GPS testing is done using the program shown in Fig. 4.12. The command to the GPS can be chosen by the user so as to give either the LatitudeLongitude (GPSPosition), or the displacements (GPSDisplacements)from the reference position set as ‘Home’. The GPS loop iteration takes about 220 ms.
104
Figure 4.12: Front Panel for GPS Testing
4.3.2.6
Transmitter Calibration
The transmitter stick minimum and maximum positions can be calibrated using the program shown in Fig. 4.13. Here the actual voltage levels and the non dimensional values can be seen. This program writes the minimum and maximum voltage ratios as explained earlier, into the calibration file. This calibration file is then used for the other programs. As can be seen form the figure, the noise in the voltage levels is diminished in the non dimensional magnitude. 4.3.2.7
Full Experiment
After the settings, testing and calibrations are done, the full experiment is started. The front panel for the same is shown in Fig. 4.14. The operation of the various switches turns the controls on or off. The gain values, sensitivities can be changed during the run. So can the reference set points, and the neutral outputs to each servo. The RPM (measured and reference) is displayed on a meter as well as on a graph. The throttle output to the servo is also displayed. For the roll, pitch and yaw controls, the measured and set point angle are displayed on the graph.
Figure 4.13: Front Panel for Transmitter Calibration
105
Figure 4.14: Front Panel for Full Experiment Run
106
107
The yaw angle is additionally also displayed on a dial. The height picked up from the sonar and the reference height is displayed on the height plot. The authority switches allow the user to give commands either through the computer screen or from the transmitter stick motions. A button allows the user to save the current time as the start time of the video recording. This helps to analyze the data saved along with the video playback. This program on the host computer manages all the data storage. The program that runs on the target machine takes care of the controls.
4.3.3
Conditioning
For all the sensor data received, there are some software filters implemented to reduce noise and get meaningful data. The technique used for each is explained below: 4.3.3.1
RPM
The RPM goes through the following processing: 1. If the absolute difference between the measured RPM and the previous RPM is more than 250, it implies that the data is bad. So it is discarded and the previous RPM value is used. 2. The value of the RPM is coerced between ±150 of the previous recorded RPM. 3. The RPM goes through low pass filtering in each iteration as per the following: ˆ i = αΩ ˆ i−1 + (1 − α)Ωmeasured,i Ω
(4.3)
The hat quantities represents the conditioned RPM, and the subscript index represents the iteration number. The value of α used is 0.96. 4.3.3.2
Sonar
The Sonar height goes through the following processing:
108
1. If the absolute difference between the measured height and the previous height is more than 0.5m, it implies that the data is bad. So it is discarded and the previous height value is used. 2. The value of the height is coerced between ±0.2 of the previous recorded height. 3. The height also goes through low pass filtering in each iteration as per the following: zˆi = αˆ zi−1 + (1 − α)zmeasured,i
(4.4)
The value of α used is 0.96. 4. The difference in this height and the previous height value is divided by the iteration time (4t ≈ 70ms) to get the climb rate: z˙ = 4.3.3.3
zˆi − zˆi−1 4t
(4.5)
Euler Angles
Each of the euler angles goes through the following processing: 1. Any NaN values are discarded and replaced by previous iteration values. 2. If all angles are zero, they are discarded and replaced by previous iteration values. 3. If there is a jump between the previous values and the current measurement of more than 20o , the data is discarded. 4. The average of the current measurement and the last 14 measurements is output as the conditioned euler angle data. 4.3.3.4
Accelerations
The acceleration values go through the following processing: 1. Any NaN values are discarded and replaced by previous iteration values. 2. If all accelerations are zero, they are discarded and replaced by previous iteration values.
109
3. The average of the current measurement and the last 14 measurements is obtained. 4. Based on the current attitude of the vehicle, the accelerations in the body frame of reference are obtained and compensating for gravity. This is done by using the euler angle transformation: sin θˆi a ˆx ax a ˆ y = ay − g − cos θˆi sin φˆi a ˆz i az i,measured − cos θˆi cos φˆi
(4.6)
The euler roll and pitch angles used are the conditioned outputs from the same iteration. The value of g used is 9.81m/s2 This final output is known as the conditioned accelerations 5. The jerk values are obtained by using the difference between the conditioned accelerations divided by the iteration time (4t ≈ 40ms): xˆ¨i − xˆ¨i−1 x¨˙ i = 4t
(4.7)
6. Similarly, the snap values are obtained by using the difference between the consecutive jerk values divided by the iteration time (4t ≈ 40ms): x¨˙ i − x¨˙ i−1 x¨¨i = 4t 4.3.3.5
(4.8)
Rotation Rates
The rotation rates go through the following processing: 1. Any NaN values are discarded and replaced by previous iteration values. 2. If all rotation rates are zero, they are discarded and replaced by previous iteration values. 3. The average of the current measurement and the last 14 measurements is obtained. This becomes the conditioned rotation rate value.
110
4. The rotational acceleration values are obtained by using the difference between the conditioned rotation rates divided by the iteration time (4t ≈ 40ms): θˆ˙i − θˆ˙i−1 ¨ θi = 4t 4.3.3.6
(4.9)
GPS
The GPS output is processed as per the following 1. The GPS output is in terms of displacements in the Latitude and Longitude Axis. These are transformed to the Body X-Y plane using the conditioned yaw angle: ˆ X cos ψˆi sin ψˆi Xnorth = Yeast i,measured Yˆ i − sin ψˆi cos ψˆi There is no change made in the vertical direction. 2. The velocities are obtained by using the difference between the body frame displacements divided by the iteration time: ˆi − X ˆ i−1 X X˙ i = 4t 3. These velocities go through a low pass filter to remove spikes in the data: ˆ˙ = αX ˆ˙ ˙ X i i−1 + (1 − α)Xi The value of α used is 0.9.
4.3.4
Data Logging
The files that are saved for each run are organized in folders according to the following: 1. RPM 2. Height 3. Roll 4. Pitch
111
5. Yaw 6. X 7. Y For each variable, four files are created. The first file contains the variable data in a datalog file, which requires less memory and has faster operation than standard text files. The second file is a text file of the same data which is created after the experiment is finished, so does not hamper the running time of the program. Text files are required since they can be opened by any standard data analysis program. The third file contains the states of the switches of the particular control. Any time a switch is pressed or released, the time instant is recorded in this file. Similarly, the fourth file contains the gain values of the particular control. Each time a gain is entered or changed, the gain value along with the time instant is recorded. Both these files are also datalog files for optimizing the file writing speed. Other than these individual files, a combined text file of all the variables is created at the end of the experiment. This text file is then used for data analysis. The data analysis can be done by a number of programs. The log file that is created by the menu can be read as shown in Fig.4.15. As can be noticed, the time stamp is recorded for each event. The files that are saved and the video time is also displayed for future data analysis.
112
Figure 4.15: Log File reader
Chapter 5 RPM Dynamics In this chapter, the RPM dynamics of the helicopter main rotor is analyzed using theory and experiments. This helps in understanding the effect of the various parameters on the rotor RPM, and how to create a robust controller for the same.
5.1
Theoretical Model
Figure 5.1: Forces and Moments acting on Rotor and shaft
The moments acting on the rotor are shown in Fig. 5.1. From dynamics we
114
can write: Ib ·
d Ω = Mengineshaf t + Maerodynamicdrag dt
(5.1)
The aerodynamic moment can be said to be: Maerodynamicdrag = −ρπR2 (ΩR)2 RCq
(5.2)
The key assumption made is that the engine delivers constant power for a particular throttle setting. This power is a product of the torque and angular velocity of its shaft. Pengine = τ · Ω
(5.3)
Hence we can write the moment provided by engine as: Mengineshaf t =
Pengine Ω
(5.4)
The complete equation is therefore: Ib ·
5.1.1
d Pengine Ω= − ρπR5 Ω2 Cq dt Ω
(5.5)
Closed Form Solution
The above equation can be integrated to obtain a closed form solution of the rotational velocity. We rearrange the terms to get: ΩdΩ ρπR5 Cq = dt (5.6) S 3 − Ω3 Ib where: S=
Pengine ρπR5 Cq
31
By factoring out the cubic terms in the denominator, we get: ΩdΩ ρπR5 Cq = dt (S − Ω)(S 2 + Ω2 + SΩ) Ib
(5.7)
115
The left hand side can be resolved into partial fractions as: dΩ (Ω − S)dΩ 3SρπR5 Cq + = dt S − Ω S 2 + Ω2 + SΩ Ib We again split the second term into the following: 1 (2Ω + S)dΩ 3S dΩ 3SρπR5 Cq dΩ + − = dt S−Ω 2 S 2 + Ω2 + SΩ 2 S 2 + Ω2 + SΩ Ib Let the initial speed be Ωo at t = to . By integrating with this initial limit we get: 3SρπR5 Cq I1 + I2 + I3 = (t − to ) Ib Where: Z
Ω
dΩ Ωo S − Ω S − Ωo ⇒ I1 = log S−Ω Z Ω 1 (2Ω + S)dΩ I2 = 2 2 Ωo 2 S + Ω + SΩ Let I1 =
Z = S 2 + Ω2 + SΩ Then dZ = (2Ω + S)dΩ 2 dZ 1 1 S + Ω2 + SΩ ⇒ I2 = = log 2 S 2 +Ω2o +SΩo Z 2 S 2 + Ω2o + SΩo Z
S 2 +Ω2 +SΩ
We solve for the third integral in the following manner: Z 3S Ω dΩ I3 = − 2 2 Ωo S + Ω2 + SΩ Z 2 Ω dΩ ⇒ I3 = − ! S Ωo Ω + S 2 2 √ +1 3S 2
116
Assume that: Ω+
tan β =
√
S 2
!
3S 2
Hence √ 3S sec2 βdβ dΩ = 2 This gives us: √
√ Z β sec2 βdβ dβ =− 3 tan2 β + 1 βo βo √ ⇒ I3 = 3(βo − β) " ! !# S S √ Ω + Ω + o 2 2 √ √ ⇒ I3 = 3 tan−1 − tan−1 2 I3 = − S
Z
β
3S 2
3S 2
3S 2
The complete expression can be given as: log
S − Ωo S−Ω
1 + log 2
" √ S 2 + Ω2 + SΩ + 3 tan−1 S 2 + Ω2o + SΩo 3SρπR5 Cq = (t − to ) Ib
Ωo + √
3S 2
S 2
! − tan−1
Ω+ √
S 2
3S 2
(5.8)
The above expression is implicit in Ω hence it would be difficult to evaluate it directly. A much more easier method is to numerically integrate the expression, and solve for Ω.
5.1.2
Validation from Experiment
An experiment conducted earlier in Ref. (32) had recorded the RPM, Thrust and Torque variation with time for a step input in throttle. The measurements are shown in Figs. 5.2, 5.3 and 5.4. The experiment was conducted at a fixed collective pitch of 6o . The work later showed that this corresponded to an effective collective of 4.8o . The throttle was increased at 1763 seconds. The thrust coefficient
!#
117
Time < 1763 s > 1768 s Change
RPM 900 1300 400
Thrust (N) Moment (Nm) Power (W) 19.45 0.83 78.24 40.58 1.73 235.80 21.13 0.90 157.56
Table 5.1: BEMT Calculations for steady state RPM
and moment coefficient can be calculated using non uniform inflow blade element theory for the given rotor blades at 4.8o blade angle as: CT = 0.0014315 CQ = 0.000076956
Using these values, the thrust, moment and power at the two steady state RPMs can be calculated as seen in Table 5.1.
Figure 5.2: RPM variation with time
118
Figure 5.3: Thrust variation with time
Figure 5.4: Torque variation with time
119
5.1.2.1
Thrust
The load cell measures the force acting on it, hence the sign convention for thrust is negative. Also, the load cell readings have an inherent drift. This is why the absolute measurements of force are unreliable. However the change in force measured is the actual change in force experienced. As can be seen in Fig. 5.3, before 1763 seconds, the force is about -33 N and it shifts to -52.5 N once the RPM settles to 1300. The force increased by about 19.5 N. The BEMT result is very close, as it predicted an increase of 21.13 N. 5.1.2.2
Moment
As can be seen from the free body diagram in Fig. 5.4, the load cell moment is equivalent to engine torque. At the instant the power to engine changes, there is an imbalance of moment on the rotor due to low value of aerodynamic moment (M = 0.83N m) and increase in torque (τ =
P Ω
= 2.50N m) by the engine. As
soon as the angular velocity of the shaft starts increasing, the torque due to engine starts decreasing because power remains constant (P = τ Ω). At the final RPM of 1300, the torque becomes equal to aerodynamic moment (τ = 1.73N m) and it steadies off. (Note that the load cell uses the opposite sign convention so the graph is a mirror image about a horizontal axis.) Again it can be seen that although the absolute values of the moment is different, the change predicted in the moment from the BEMT is same as that as experiment. At 900 RPM, the BEMT moment is about 0.83 Nm while the experiment shows about -0.1Nm. At 1300 RPM, the BEMT moment is 1.73 Nm but the experimentally measured moment is -1.0 Nm. The change in moment is the same in both cases, 0.9 Nm. The engine torque can hence be written as: 78.24 Ω Pengine τ= = Ω 235.80 Ω 5.1.2.3
if t < 1763s if t > 1763s
Transient Behaviour
By numerically integrating the rotor dynamics equation using trapezoidal rule, the RPM, thrust and moment variation were obtained. The values used for the constants were:
120
Figure 5.5: Moment acting on loadcell
• P = 235.80 W • R = 0.794 m • I = 0.091 kg m2 • dt = 0.01 s As can be observed from Fig. 5.2, the settling time and RPM variation is almost the same as experiment. It takes nearly 5 seconds to reach the final RPM. Similarly the thrust increase follows the same pattern as seen in Fig. 5.3. Due to the opposite sign convention in the experimental data, the figures seem different but the time variation and change in thrust are nearly equal. The same can be said of the moment experienced by the load cell as seen in Fig. 5.4. Although the sign convention is opposite, both have the same time variation and net change.
5.2
Experiments
The importance of the engine power and torque as understood from the above section, leads to the need to characterize its performance. With this in mind, several experiments were conducted on the helicopter RPM, collective pitch angle and throttle position.
121
5.2.1
Results and Analysis
Experiments were conducted for collective pitch angles of 0o − 1o − 2o − 3o − 4o − 5o − 6o − 7o − 8o . At different throttle settings, the RPM was measured for each collective angle. The results of the experiments can be seen in Fig. 5.6.
Figure 5.6: RPM v/s Throttle Setting
The different collective angles used have been represented by different symbols as per the legend. It can be noticed that with increasing throttle, the RPM increases for all collective pitch angles. It can also be seen that for a particular throttle, the maximum RPM corresponds to the collective angle of 2o . This is contrary to expectation, since we expect the collective angle of 0o to have the least aerodynamic drag and consequently allow higher RPMs. This observation can be explained by the fact that the actual effective pitch angle is less than the measured one. As observed in the thesis of Ref. (32), the actual pitch angle is −1.8o than the measured angle. With the non uniform inflow blade element momentum theory, we can estimate the main rotor power requirement at different collective pitch angles and RPM. The results are shown in Fig. 5.7. We can see a similarity in the trend of rotor RPMs between Fig. 5.6 and Fig. 5.7. With increase in throttle or power, the RPM increases for each collective angle.
122
Figure 5.7: Theoretical main rotor power requirement
With a larger collective angle, the RPM decreases for a particular throttle. By taking into account the angle offset of −1.8o , the main rotor power was calculated for each experimental point of Fig. 5.6. The power was plotted with respect to the throttle in Fig. 5.8. A linear relation between the throttle and main rotor calculated power is obtained from this figure: P (W ) = 2118.1 × T − 139.4
5.2.2
(5.9)
Simulation
The moment coefficient was calculated using the blade element momentum theory for different pitch angles. This is plotted in Fig. 5.9. A quadratic curve was used to fit the above curve which was calculated to be: Cq = (3.375 × 10−5 ) − (5.614 × 10−7 )θo + (2.57 × 10−6 )θo2
(5.10)
With the help of Eqns. 5.9 and 5.10, we can calculate the aerodynamic moment and the shaft power, given the throttle and collective angle. Using these and the dynamic model of Eqn. 5.6, the RPM of the main rotor can be estimated. A sample RPM open and closed loop experiment data was chosen. For this, the throttle and the collective input was fed into the model at the same timings as were observed
123
Figure 5.8: Calculated Power v/s Throttle Setting
Figure 5.9: Moment Coefficient at different pitch angles
124
in the real time experiment. The results of the simulation were plotted in Fig. 5.10(a). The throttle input was varied manually during the experiment, and for two periods of time, switched to the closed loop (580-940s and 1130-1410s). The collective pitch angle was also changed several times during the run. The simulated RPM bears a very close match to the experimentally measured values, especially at the higher RPMs.
5.2.3
Collective Link
In the RPM control algorithm, a feed forward component due to change in collective was implemented. To determine the gain factor between the collective and the throttle, the following calculation was done. The throttle is related to the shaft power linearly as shown, where T is throttle and P is power: T = To +
∂T ∂P
P
(5.11)
The power is obtained from the rotor dimensions and moment coefficient: P = ρπR5 Ω3 (Cqo + Cqθ θo + Cqθ2 θo2 )
(5.12)
Where the moment coefficient is approximated by the quadratic curve as shown earlier in Eqn. 5.10. By taking a partial derivative of the throttle with respect to the pitch angle we get: ∂T ∂T 5 3 = ρπR Ω (Cqθ + 2θo Cqθ2 ) (5.13) ∂θ ∂P Using the parameters of the helicopter as observed from the experiments and simulations earlier, the collective throttle coupling factor was calculated at different RPMs and initial collective angle. For our experiments, the reference RPM is kept at 1300 and 3o collective gives the collective link factor as 0.0961. In future work, this factor can be continuously changing as per the state of the helicopter as an adaptive control gain.
125
(a) RPM
(b) Throttle
(c) Collective
Figure 5.10: RPM Experiment and Simulation
Chapter 6 Global Positioning System 6.1
System Description
The Global Positioning System is a network of satellites that orbit the earth. These satellites transmit signals that can be received by a GPS antenna. In the presence of unobstructed line of sight to four or more GPS satellites, the location and time information can be calculated. The GPS full description is: NAVigation System with Timing And Ranging Global Positioning System (NAVSTAR-GPS). It was developed by the U.S. Department of Defense (DoD) and can be used both by civilians and military personnel. A civil signal, SPS (Standard Positioning Service) can be used freely by anyone, whilst a military signal PPS (Precise Positioning Service) can only be used by authorised US government agencies.
6.1.1
Satellites
There are currently 28 operational satellites orbiting the Earth at a height of 20,180 km on 6 different orbital planes. Their orbits are inclined at 55o to the equator, to ensure that at least 4 satellites are in radio communication with any point on the planet. Each satellite orbits has a time period of approximately 12 hours and has four atomic clocks on board. All 28 satellites transmit time signals and data synchronized by on board atomic
127
clocks at the same frequency (1575.42 MHz). The minimum signal strength received on Earth is approximately -158dBW to -160dBW. The navigation message is a continuous stream of data transmitted at 50 bits per second. Each satellite relays the following information to Earth: • System time and clock correction values • Accurate own orbital data • Approximate orbital data for all other satellites • System health This navigation message is needed to calculate the current position of the satellites and to determine signal transit times.
6.1.2
Reference System
The GPS receiver works primarily with the the WGS-84 (World Geodetic System 1984) reference system. The WGS-84 co-ordinate system is geocentrically positioned with respect to the center of the Earth. The WGS-84 coordinate system is three-dimensional, right-handed and in Cartesian coordinates. The center point of the ellipsoid is at the center of mass of the earth. The positive X-axis of the ellipsoid lies on the equatorial plane and extends from the centre of mass through the point at which the equator and the Greenwich meridian intersect (0o Longitude). The Y-axis also lies on the equatorial plane and is 90o east of the X-axis. The Z-axis lies perpendicular to the X and Y-axis and extends through the geographical north pole. To convert the latitudinal and longitudinal differences to distances on the reference ellipsoid, several methods exist. Among them, the easiest one to use is as per the following. Two factors, K1 and K2 are calculated for a particular latitude and then used to determine the distance between the two latitude-longitude coordinates. Northwards Displacement = K1 4 Latitude Eastwards Displacement = K2 4 Longitude
128
The values of these two factors is obtained from the equations: K1(km/deg) = 111.13209 − 0.56605 cos(2φlat ) + 0.00120 cos(4φlat )
(6.1)
K2(km/deg) = 111.41513 cos(φlat ) − 0.09455 cos(3φlat ) + 0.00012 cos(5φlat ) (6.2) The magnitude of these two factors varies with the latitude angle from the equator to the north pole as shown in Fig. 6.1. As an example, the latitude and longitude of the Helicopter Laboratory at IIT Kanpur is: • Latitude: 26.516085o • Longitude: 80.233372o The corresponding factors are: • K1 = 110.7913544 km/deg • K2 = 99.67803476 km/deg
Figure 6.1: Scale factors of Earth Flatness
129
6.1.3
Errors
According to Ref. (49), the following are the sources of error in a GPS measurement: • Satellite clocks: Each satellite has four atomic clocks on board for precise measurement of time. But an error of just 10 ns can create an error of 3 m. • Satellite orbits: The satellite position can be evaluated only to within approximately 1-5 m. • Speed of light: The signals from the satellite travel through the ionosphere and troposphere, where the speed of light is no longer constant. • Measurement of signal transit time: The point of time at which an incoming satellite signal is received can only be determined to within a period of about 10-20 ns. This corresponds to a positional error of 3-6 m. • Satellite constellation geometry: The ability to determine a position deteriorates if the four satellites used to take measurements are close together. Measurements undertaken by the US Federal Aviation Administration over 24 hours indicate that in the case of 95% of all measurements, horizontal error is under 7.4 m and vertical error is under 9.0 m.
6.2
Setup
On the mini helicopter, we use a NavStik microcontroller unit connected with a UBlox 6 GPS module, GPS Antenna, and an IvyXB module for wireless transmission. This is shown in Fig.6.2. The NavStik (Ref. (50)) consists of a 32-bit Cortex M4 microcontroller which operates at 168 MHz. It has several sensors including a Ublox 6 GPS. The key features of the NavStik are: • 3-axis Accelerometer • 3-axis Gyroscope
130
Figure 6.2: NavStik mounted on the Mini Helicopter
• 3-axis Magnetometer • Barometer (Static Pressure Sensor) • Temperature Sensors for Temperature Compensation of Sensor Data • Cortex M4 Based Microcontroller (STM32F4: 32 bit, 168 MHz) • Onboard SPI Flash with 16 Mb Memory • Connectors for Interface Board (required for power and interface to external world) • Power Regulators and Switches (for programatically controlling power to different subsections) With the help of an interface board, we can connect an XBee unit for direct communication with the NavStik, without need for a separate power supply. The NavStik module is very light (5.8g) and has a size of 59mm × 18mm.
6.2.1
Expansion Board
The expansion board being used with the NavStik is the IvyEZ. It has the following features: • 12 PWM Channels (6 input/ 6 output reconfigurable) • Micro-SD Card Support for Data-logging • Telemetry Port (UART) used for XBee wireless communication
131
• Micro-USB port for firmware update and power • Battery Voltage Monitor • Battery Input Voltage Range of 3.5V 5.5V • Auto Power Switching (between USB and battery sources) • ESD and Short-Circuit Protection • Debug Port (for connection to IvyGS during development) • Boot Mode Selection and Reset Switches • Weight = 5 grams We are using this expansion board since it allows a telemetry connection and regulates power supply from an input of 5 V, which is available from the UBEC.
6.2.2
Software
The NavStik runs on the open source ChibiOS operating system. The programming is done using ‘C’ language. The code is compiled and written to the NavStik board using the ‘OpenOCD’ software, which is freely available. The communication between the programming computer and the Navstik is through an HDMI cable that connects to a USB port through an IvyGS unit. By default the NavStik contains its own shell interface, from where we can test out all the different sensors of the system. However, our purpose in using the NavStik is just to communicate with the GPS and transmit the data to the ground station. Due to the advantages of the open source code of the NavStik, we are able to shutoff all the unnecessary sensors and features on the NavStik. The NavStik and GPS communicate using UART protocol. The XBee communicates the same way. The algorithm used on the NavStik was: 1. Initialize port for communication with the GPS 2. Send configuration messages to GPS for the following (a) Switch off continuous NMEA messages (b) Increase update rate to 5 Hz
132
(c) Save changes 3. Run two parallel threads: (a) Wait for command messages from XBee (b) Poll GPS for Latitude-Longitude-Height data and store it There are three types of command messages that the XBee receives. The thread responds according to the following cases: • ‘L’: The NavStik prints the current Latitude Longitude and Height in the message format to the XBee, which is then transmitted. • ‘H’: The NavStik prints the current Latitude Longitude and Height in the message format to the XBee, which is then transmitted. This position information is saved as the reference or home position. • ‘G’: The NavStik prints the displacement of the current position with respect to the home position in the message format to the XBee, which is then transmitted. The message format for the position and displacement information is kept as short as possible. To decrease the number of characters, the values are transmitted as hexadecimal numbers. The above algorithm makes the sensor data collection uniform for the IMU, RPM, Sonar and GPS. The message formats for GPS are: • Position: The string is “N12345678E12345678H12345\n”. The first character is N or S, signifying the sign of the Latitude Angle. The next eight hexadecimal characters give the latitude in degrees ×108 . Similarly the letter E or W signify the sign of the Longitude angle, which is represented in the next eight hexadecimal character in terms of 108 degrees. The letter H or h is used to signify the positive or negative height from the WSG-84 ellipsoid respectively, in centimeters. • Displacement: The string is “X123Y123Z123\n”. The first character is X or x, signifying positive or negative latitudinal displacement respectively. The next three hexadecimal characters give the displacement in centimeters. Similarly the letter Y or y signifies the sign of the longitudinal displacement,
133
which is represented in the next three hexadecimal character in terms of centimeters. The letter H or h is used to signify the positive or negative height displacement in centimeters. The large multiplication factors allow us to transmit the values without a decimal point. The values are divided by the same factor at the ground station. The preceding letters for each quantity serve a dual purpose. They separate the three data and allow us to signify the sign of the values, without a separate character.
6.3
Calibration
To test the GPS unit, an outdoor area was demarcated. A square with sides of 6m each was marked using bricks. The sides were split into 3 divisions. This can be seen in Fig. 6.3. The sides AD and GJ were aligned with the North-South direction, while the sides DG and AJ were aligned with East-West direction. The GPS was moved in different trajectories about the points. The results of the GPS data over reference trajectories are shown in Fig. 6.4. Figure 6.4(a) shows a clockwise motion about the square, while Fig. 6.4(b) shows anti clockwise motion about the square. It can be noticed that the displacements are close to the magnitudes of the reference square (shown by the dashed line), although there is a tendency to drift. Similarly, the GPS data was recorded over triangular motion also. In Fig.6.4(c), the initial diagonal motion is well captured but the westwards motion drifts. In Fig. 6.4(d), the motion is very close to the reference trajectory. The results of these experiments confirm that the GPS is able to provide a good estimate of the position on a moving frame. There are several errors in the data, but for the distances involved, it can be considered as useful for position control of our helicopter.
134
Figure 6.3: Testing ground for GPS
135
(a) Trajectory: ADGJA
(b) Trajectory: AJGDA
(c) Trajectory: AGDA
(d) Trajectory: ADJA
Figure 6.4: GPS data over different trajectories
Chapter 7 Flight Testing After the integration of onboard sensors and implementation of ground station, the vehicle was tested and flown in different settings. Among the many experiments, there are two most notable ones: outdoor semi autonomous flight with an RC pilot, and outdoor autonomous flight with pilot aid inputs.
7.1
Semi Autonomous Flight
In the semi autonomous flight, a professional RC pilot flew the vehicle untethered outside. This enabled us to collect all data such as the pilot stick inputs, vehicle states from the sensors and GPS data. The flight is called semi autonomous because the pilot was given collective pitch control, with the RPM regulated by the computer. The Pilot was also given the Roll and Pitch control, which was added to the control outputs from the attitude control when kept on. The gain factors used are shown in Table 7.1.The yaw control was also given to the pilot with the AVCS mode of the gyro turned off. The pilot was able to perform a short 2 minute flight with good hover control as shown in Fig. 7.1. The RPM control can be seen from Fig. 7.2 and Fig. 7.3. The rpm is well regulated at about 1250 RPM, after which the pilot decreased collective by a large amount causing the RPM to shoot up at 550 seconds. Immediately afterwards the set point was bought down and hence throttle and RPM also decreased.
137
Figure 7.1: Outdoor RC Pilot Free Flight
Figure 7.2: RPM during RC Pilot Flight
138
Figure 7.3: Throttle during RC Pilot Flight
The roll pitch angle is plotted in Fig. 7.4. The rotational rates and accelerations during the period are shown in Fig. 7.5 and Fig. 7.6 respectively. The translational accelerations, jerk and snaps in the horizontal plane of the helicopter are shown in Figs. 7.7, 7.8 and 7.9 respectively. The pilot input during this period is shown in Fig. 7.10. The final output to the servo after adding the inner loop compensation is given in Fig. 7.11. It can be noticed that the magnitude of the control output is very small compared to the pilots input. The motion of the helicopter as recorded by the GPS is shown in Fig. 7.12. It can be observed that the motion of the helicopter was restricted to distances of 3 m. This corresponds well with the observation from the flight video. The heading control was in the manual mode. The measured heading angle is given in Fig. 7.13. The pilot input to the gyro is shown in Fig. 7.14. Similarly, the height control is completely in manual mode. The sonar height data can be seen in Fig. 7.15, with the pilot collective input plotted in Fig. 7.17.
139
Figure 7.4: Helicopter Attitude during RC Pilot Flight
Figure 7.5: Rotational rates during RC Pilot Flight
140
Figure 7.6: Rotational accelerations during RC Pilot Flight
Figure 7.7: Translational Accelerations during RC Pilot Flight
141
Figure 7.8: X-Y jerk values during RC Pilot Flight
Figure 7.9: X-Y snap values during RC Pilot Flight
142
Figure 7.10: RC Pilot input during RC PilotFlight
Figure 7.11: Servo Outputs during RC Pilot Flight
143
Figure 7.12: X-Y displacements during RC PilotFlight
Figure 7.13: Helicopter Heading Angle during RC Pilot Flight
144
Figure 7.14: Yaw stick input during RC Pilot Flight
Figure 7.15: Sonar height during RC Pilot Flight
145
Figure 7.16: Vertical acceleration during RC Pilot Flight
Figure 7.17: Collective during RC Pilot Flight
146
Roll
Pitch Roll Sensitivity 450 deg Pitch Sensitivity -300 deg Pitch-Y Coupling 0.0 Roll-X Coupling 0.0 Inner Loop Kroll:gf 0.3 Kpitch:gf −0.08 −4 Kφ 7.04 × 10 /deg Kθ 7.65 × 10−4 /deg Kφ˙ 1.24 × 10−5 s/rad Kθ˙ 1.09 × 10−5 s/rad Kφ¨ 8.367 × 10−5 s2 /rad Kθ¨ 1.11 × 10−5 s2 /rad Ky¨ 4 × 10−3 s2 /m Kx¨ 1.0 × 10−2 s2 /m Ky¨˙ 1 × 10−3 s3 /m Kx¨˙ 1.0 × 10−2 s3 /m Ky¨¨ 2 × 10−4 s4 /m Kx¨¨ 2.0 × 10−4 s4 /m Table 7.1: Roll Pitch Gains during RC Flight
147
7.2
Pilot aided Outdoor Flight
In this flight, the vehicle was flown tethered outside. Angle setpoint change was given manually with both the inner and outer loop on by a flight engineer. All data was collected including the pilot stick inputs and sensors outputs. The The gain factors used are shown in Table 4.3. However, the coupling was turned off i.e. Roll-X and Pitch-Y coupling factors were made zero. Although it was difficult to fly the vehicle in severe ground effect and light winds, several seconds of stable hover were achieved, even though the flight engineer is not trained to pilot the vehicle. The data for the time period is given in the following graphs. The RPM control can be seen from Fig. 7.19 and Fig. 7.20. The rpm is very well regulated at about 1260 RPM. The roll pitch angle is plotted in Fig. 7.21.
Figure 7.18: Outdoor tethered flight
The rotational rates and accelerations during the period are shown in Fig. 7.22 and Fig. 7.23 respectively. The translational accelerations, jerk and snaps in the horizontal plane of the helicopter are shown in Figs. 7.24, 7.25 and 7.26 respectively. Additionally, the velocity from the GPS was obtained in Fig. 7.27. The pilot input during this period is shown in Fig. 7.28. This input goes as setpoint angle to the inner loop. The final output to the servo after adding the inner and outdoor loop compensation is given in Fig. 7.11. The motion of the helicopter as
148
Figure 7.19: RPM during Outdoor Tethered Flight
Figure 7.20: Throttle during Outdoor Tethered Flight
149
recorded by the GPS is shown in Fig. 7.30. It can be observed that the motion of the helicopter was restricted to distances of less than a meter. The yaw angle can be seen in Fig.7.31. During this period, the yaw control output in the auto mode is given in Fig. 7.32. The height control is based on the z acceleration and jerk feedback. The sonar data is shown in Fig. 7.33. Climb rate evaluated from the GPS data is given in Fig.7.34. The acceleration and jerks in the vertical direction are shown in Figs. 7.35 and 7.36. The control output to the collective servo is given in Fig. 7.37. During the end of this flight, the main rotor gear’s spur teeth were worn out. After inspection of the flight records, it was found that the gear had operated 614 minutes of flight time. This observation that a new gear can last for 10 hours indicates the lifetime of the critical component.
Figure 7.21: Helicopter Attitude during Outdoor Tethered Flight
150
Figure 7.22: Rotational rates during Outdoor Tethered Flight
Figure 7.23: Rotational accelerations during Outdoor Tethered Flight
151
Figure 7.24: Translational Accelerations during Outdoor Tethered Flight
Figure 7.25: X-Y jerk values during Outdoor Tethered Flight
152
Figure 7.26: X-Y snap values during Outdoor Tethered Flight
Figure 7.27: X-Y speed during Outdoor Tethered Flight
153
Figure 7.28: Pilot input during Outdoor Tethered Flight
Figure 7.29: Outputs to servos during Outdoor Tethered Flight
154
Figure 7.30: X-Y displacements during Outdoor Tethered Flight
Figure 7.31: Helicopter Heading Angle during Outdoor Tethered Flight
155
Figure 7.32: Yaw control output during Outdoor Tethered Flight
Figure 7.33: Sonar height during Outdoor Tethered Flight
156
Figure 7.34: Vertical speed during Outdoor Tethered Flight
Figure 7.35: Vertical acceleration during Outdoor Tethered Flight
157
Figure 7.36: Vertical jerk during Outdoor Tethered Flight
Figure 7.37: Collective during Outdoor Tethered Flight
Chapter 8 Conclusions In this thesis, the following objectives have been accomplished • A sensor tray made completely out of carbon fiber has been fabricated. The individual sensors and communication units have been mounted on it. • The main rotor blade was analyzed for its mass and inertia properties. • A new 10 channel transmitter was configured and modified for use on the helicopter. • The servos were calibrated for the transmitter inputs • A sensor package consisting of a filtering circuit and a microcontroller to measure the RPM was built. • Control logic for autonomous RPM, Height, Roll, Pitch, Yaw and Position control was implemented on a Real Time PXI system. • The ground station control was built to allow manual, autonomous and mixed input to the vehicle. • A technique to couple the stick inputs to both roll and pitch was implemented. • Theoretical analysis of the RPM dynamics was done and matched with experiments. This was found to match well with the load measurements also. • A global positioning system was integrated into the sensor package.
159
• Flight experiments were conducted for stable hover of the helicopter. • Coupling of the pilot input to the two lateral and longitudinal servos was done. Tests are in progress to fine tune the magnitude of these coupling factors. The scope and future direction of developing an autonomous vehicle is extremely broad. Hence there is considerable scope for future work in this direction of research. Some of the main issues that can be resolved are: • The vibrations on the sensor tray should be reduced even further using gel based vibration dampers. • The on board electronics can be made compact to reduce weight and increase available space on the helicopter. • The RPM measurement can be done with more faster and accurate techniques. One method is to use a hall effect sensor which will eliminate the requirement for a filtering circuit. Other ways such as optical laser based tachometers can be tried. • The sonar data is not suitable for the height control of the helicopter. For indoor flights, a passive IR sensor can be used. However, the best way forward would be to use a depth camera which can sense the proximity from the ground, and can be used indoors or out of doors • The programs implemented on the target PXI system can be transferred to an onboard computer. This offers several advantages. The system will be able to fly itself if communication is lost. The sensor data will be updated at a much faster rate, improving the control response of the vehicle. However, the host ground computer can still communicate and give commands to the vehicle, as being done between the host and target machine on ground. • Image processing sensors and computers can be established on board, for navigation and obstacle avoidance. • For practical use of such a vehicle, it is important to have fail safe mechanisms in case of power loss or communication loss. Simple algorithms can be designed to resolve such issues
160
• The current control design is for just the hovering of the vehicle. It is anticipated that the gains will be different during other regimes of flight. A gain scheduling algorithm needs to be implemented for this. • The current work has focused only on the experimental method for control. With the available theoretical model of the helicopter, the control algorithms can be simulated and proved. This may lead to even better control of the helicopter. • With the knowledge gained for the system design of such a vehicle, the algorithms can be used for larger scale helicopters. This will be well received by the aerospace industry. It is hoped that the work compiled in this thesis will benefit the academic and industrial community to reach greater heights in science, technology and engineering in this research field.
References [1] Joint Chief Of Staff. Joint Publication 1-02. Department of Defense Dictionary of Military and Associated Terms. [2] Lawrence R. Newcome. Unmanned Aviation: A Brief History of Unmanned Aerial Vehicles. AIAA, Reston, Virginia, 2004. [3] Ioannis A. Raptis and Kimon P. Valavanis. Linear and Nonlinear Control of SmallScale Unmanned Helicopters. Springer, Dordrecht, The Netherlands, 2011. [4] Kimon P. Valavanis. Advances in Unmanned Aerial Vehicles. Springer, Dordrecht, The Netherlands, 2007. [5] Smithsonian National Air and Space Museum. Gyrodyne QH-50C Drone AntiSubmarine Helicopter (DASH), 2013. Available from: http://airandspace. si.edu/collections/artifact.cfm?id=A20090023000. [6] DragonFly Pictures Inc. dragonflypictures.com.
DP-5X WASP, 2007.
Available from:
http://
[7] Indra. Pelicano brochure, 2013. [8] SAAB Group. Skeldar UAS: Naval Operations brochure, 2013. [9] Cassidian. TANAN 300 brochure, 2013. [10] Northrop Grumman. Fire Scout, 2013. Available from: http://www. northropgrumman.com/Capabilities/FireScout/Pages/default.aspx. [11] Boeing. A 160 Hummingbird, 2013. Available from: http://www.boeing.com/ boeing/bds/phantom_works/hummingbird.page. [12] Kenzo Nonami, Farid Kendoul, Satoshi Suzuki, Wei Wang, and Daisuke Nakazawa. Autonomous Flying Robots: Unmanned Aerial Vehicles and Micro Aerial Vehicles. Springer, 2010.
162
[13] Marco Beat Gerig. Modeling, Guidance, and Control of Aerobatic Maneuvers of an Autonomous Helicopter. PhD thesis, ETH Zurich, 2008. [14] M. Sugeno, I. Hirano, S. Nakamura, and S. Kotsu. Development of an intelligent unmanned helicopter. In Fuzzy Systems, 1995. International Joint Conference of the Fourth IEEE International Conference on Fuzzy Systems and The Second International Fuzzy Engineering Symposium., Proceedings of 1995 IEEE Int, 5, 1995. [15] Omead Amidi, Takeo Kanade, and Keisuke Fujita. Vision-Based Autonomous Helicopter Research at Carnegie Mellon Robotics Institute 1991-1997. In Heli Japan 98, 1998. [16] Omead Amidi, Takeo Kanade, and Keisuke Fujita. A visual odometer for autonomous helicopter flight. Robotics and Autonomous Systems, 1999. Intelligent Autonomous Systems (IAS-5). Available from: http://www.sciencedirect.com/ science/article/pii/S0921889099000160. [17] Bernard Mettler, Mark B Tischler, and Takeo Kanade. System identification of small-size unmanned helicopter dynamics. In Annual Forum ProceedingsAmerican Helicopter Society, 2, 1999. [18] Bernard Mettler, MB Tischler, T Kanade, and William Messner. Attitude control optimization for a small-scale unmanned helicopter. In AIAA guidance, navigation and control conference, 2000. [19] E.N. Johnson, P.A. DeBitetto, C. A. Trott, and M.C. Bosse. The 1996 MIT/Boston University/Draper Laboratory autonomous helicopter system. In Digital Avionics Systems Conference, 1996., 15th AIAA/IEEE, 1996. [20] University of California Berkeley. The Berkeley Aerial Robotics Project, 2005. Available from: http://robotics.eecs.berkeley.edu/. [21] R Vidal, Sh Sastry, J Kim, O Shakernia, and D Shim. The Berkeley aerial robot project (BEAR). In Proceeding of the International Conference on Intelligent Robots and Systems, IROS, 2002. [22] University of Southern California. USC Autonomous Flying Vehicle Project, 2006. Available from: http://www-robotics.usc.edu/~avatar/. [23] Georgia Institute of Technology. UAV Research Facility: Georgia Tech Aerial Robotics, 2012. Available from: http://controls.ae.gatech.edu/wiki/gtar.
163
[24] Stanford University. Stanford University Autonomous Helicopter, 2010. Available from: http://heli.stanford.edu/. [25] Pieter Abbeel, Adam Coates, Morgan Quigley, and Andrew Y Ng. An application of reinforcement learning to aerobatic helicopter flight. Advances in neural information processing systems, 2007. [26] G Buskeya, J Robertsa, P Corkea, M Dunbabina, and G Wyethb. The CSIRO autonomous helicopter project. IMU, 2002. [27] Australian Research Center for Aerospace Automation. Helicopter UAS, 2013. Available from: http://www.arcaa.net/facilities/helicopter-uas/. [28] K. R. Prashant. Development of Flight Dynamic Equations for Mini Helicopters for Trim and Stability. Master’s thesis, IIT Kanpur, 2005. [29] K. Pradeep. Flight Dynamic Modeling and Analysis of a Mini Helicopter For Trim and Stability. Master’s thesis, IIT Kanpur, 2006. [30] B. Seenu. Flight Dynamic Modeling and Trim Analysis of a Mini Helicopter. Master’s thesis, IIT Kanpur, 2007. [31] Kumar Saurabh. Flight Dynamic Modeling Using Symbolic Manipulator: Trim and Stability Analysis of a Mini Helicopter. Master’s thesis, IIT Kanpur, 2011. [32] H. Ravinder. Experimental Determination of Rotor Loads of a Mini Helicopter. Master’s thesis, IIT Kanpur, 2010. [33] Vishnu Prasad. Characterization of Servo Actuators and Implementation of Wireless Communication in a Mini-Helicopter. Master’s thesis, IIT Kanpur, 2011. [34] B.B. Swaroop. Design, Development and Testing of Control Algorithm for Autonomous Hover of a Mini-Helicopter. Master’s thesis, IIT Kanpur, 2012. [35] C Venkatesan, BB Swaroop, P Haritha, and Rahul Gupta. Autonomous Mini Helicopter: Challenges Faced.
Development of
[36] Sanjeev Kumar Gupta. Measurement of Blade Pitch Angle. Technical report. [37] Sanjeev Kumar Gupta. Investigation of Servo Motor Behavior. Technical report. [38] V. Ravi. Magnetic Sensor based Rotational Speed Controller. Technical report.
164
[39] Sanjeev Kumar Gupta. RPM Measurement. Technical report. [40] Rahul Gupta and B.B Swaroop. RPM control linking with Collective Control. Technical report. [41] B.B. Swaroop and Gokul Bala. Calibration of Sonar SRF08 For Horizontal and Inclined Surfaces, Rugged Terrain and Vegetation. Technical report. [42] B.B Swaroop. Pitch and Roll Control of Autonomous Mini-Helicopter. Technical report. [43] Bergen RC Helicopters. Intrepid Bergen Gas EB Assembly Manual. [44] Puneet Singh. Clutch Liner Material for Autonomous Mini-Helicopter. Technical report. [45] Puneet Singh. Modeling of Centrifugal Clutch. Technical report. [46] Futaba. Futaba 10CAP/10CHP/10CP Manual. [47] Futaba. GY611 Instruction Manual. [48] Microstrain Inc. 3DM-GX1 orientation sensor. [49] Jean-Marie Zogg. GPS Basics: Introduction to the System. [50] Nitin Gupta. Navstik, 2013. Available from: http://navstik.org/home/.
Appendices
Appendix A Basic Atom Pro Code SDA Con P8 ’ Define Data pin SCL Con P9 ’ Define Clk pin SRF08 Con 0xE0 ’ Sonar I2C Address CmdReg Con 0x00 ’ Sonar Command register Cmd Con 0x51 ’ Ranging Command in cm.s RangeReg Con 0x02 ’ Range register (for 1st echo) sonar_t Con 65 ’ Sonar waiting time Light Var Word ’ This will save the Light intensity Reading Dist Var Word ’ This will save the Distance reading Ontime Var Long ’ This saves the on time in steps of 0.5 microseconds Offtime Var Long ’ This saves the off time in steps of 0.5 microseconds omega Var Word ’ Rpm total_no Var Byte ’ Number of RPMs to be measured counter Var Byte ’ Number of RPMs measured total_t Var Long ’ Time elapsed while waiting for Sonar value Command
Var Byte ’ User Command Byte
magnets Var Word ’ Number of magnet passes Main serin s_in, i38400, [Command] if Command = "S" then Gosub Sonar elseif Command = "R" Gosub RPM elseif Command = "C" Gosub Combine else endif Goto Main
Sonar ’ Returns Sonar Reading i2cout SDA, SCL, SRF08, [CmdReg, Cmd] ’ This will give the command Cmd to the Sonar at the command register CmdReg pause sonar_t ’ This will wait for the Sonar i2cout SDA, SCL, SRF08, [RangeReg-2] ’ This is an anomaly of the I2C functions for Atom Pros. Ideally just RangeReg should work as the address, but we need to move 2 bytes backward i2cin SDA, SCL, SRF08, [Light.HighByte, Light.Lowbyte, Dist.Highbyte, Dist.lowbyte] ’ Since we moved backward, we will need to read the address data and the light intensity readings as well serout S_OUT, i38400, [DEC Dist, 13] ’ Serial Port output to Terminal, 13 is for endline character return
167
RPM ’ Return RPM Reading (Based on 8 Magnets) Ontime = 0 Offtime = 0 ’count p0, 1300000, magnets ’if magnets = 0 then ’Omega = 0 ’else ’Omega = magnets*60000/(8*65) ’endif ’while IN0 = 0 ’ Waits for the pulse ’wend if IN0 = 0 then rctime p0, 1, Offtime ’ Measures time it is rctime p0, 0, Ontime ’ Measures time it is else rctime p0, 0, Ontime ’ Measures time it is rctime p0, 1, Offtime ’ Measures time it is endif
to be on
off on
on off
if (Ontime = 0 AND Offtime = 0) then Omega = 0 else Omega = 15000000/(Ontime+Offtime) ’ 15000000 is 1/8th of a revolution per minute in 0.5 mu seconds endif serout s_out, i38400, [ DEC Omega,13] ’ Serial Port output to Terminal, 13 is for endline character return Combine ’
See Subroutine Sonar
i2cout SDA, SCL, SRF08, [CmdReg, Cmd] ’ See Subroutine RPM magnets = 0 count p0, 1300000, magnets if magnets = 0 then Omega = 0 else Omega = magnets*60000/(8*65) endif ’
See Subroutine Sonar i2cout SDA, SCL, SRF08, [RangeReg-2] i2cin SDA, SCL, SRF08, [Light.HighByte, Dist.Highbyte, Dist.lowbyte, Light.Lowbyte] serout s_out, i38400, ["R", DEC3 Omega\3, "S", HEX3 Dist\3, 13]
return
Appendix B Navstik Code B.1
GPS Configuration
void configure_gps(void); void configure_gps() { char *s; int i = 0; /*turn off gsa, gll, rmc, vtg, gsv, gga*/ //turn off GLL s = "$PUBX,40,GLL,0,0,0,0*5C\r\n"; for (i=0; i