Upload
phungnhan
View
216
Download
2
Embed Size (px)
Citation preview
Design and Development of an Indoor UAV
Muhamad Azfar bin Ramli, Chin Kar Wei, Gerard Leng
Aeronautical Engineering Group
Department of Mechanical Engineering
National University of Singapore
Abstract
The primary objective of this project is to analyse the aerodynamics and propulsion
performance and also to design a control system of a semi-autonomous controlled UAV
that is able to conduct a reconnaissance mission in an indoor environment within a
building. The platform is aided by a collision avoidance system (CAS) to ensure safe
operation within the indoor environment.
This paper will begin by discussing the operations requirements of a UAV in an indoor
environment, followed by the selection of the flying platform and required components.
The basis of selection and the criteria will be discussed. This paper will also study the
aerodynamics and propulsion of the UAV and how it is affected by the indoor
environment. The control architecture of the modified UAV and the development of the
CAS will also be presented.
1) Introduction
A UAV can be described as a smaller scale aerial vehicle which is able to sustain stable
and controllable flight operations by its control system which can be pre-programmed to
follow a certain flight path or remotely-controlled from a ground station, without a pilot
on-board the aircraft. It has the advantage of saving labor cost and reducing need of
placing human life in risky situations. One of its many applications is to conduct
unmanned reconnaissance and surveillance mission whereby human presence or
intervention is undesirable.
In the context of outdoor application, the aircraft has more options to evade obstacles and
avoid collisions because there is less space constraint. It can also utilize GPS to enable
autonomous flight following pre-planned flight path and thus provide more control over
flight destination.
In an indoor environment, however, weak reception of GPS signals and limited space
which restricts the avoidance options have posed additional challenges to the operations
of the UAV. Moreover, due to size constraints, payload capabilities are also diminished
and the UAV can only carry minimal amounts of payload in order to achieve the mission
objectives. It is therefore important to study the effects of indoor aerodynamics on the
stability of the UAV and how small-scale sensors can be used to improve visibility of the
environment to ensure safe operation.
2) Indoor Operations Requirements
In an indoor environment, the common flight terrain in which the UAV may encounter
are mostly enclosed space, doorway, narrow corridor and staircase, while the common
obstacles are walls, ceiling, columns, furniture and people and other miscellaneous
objects. For the purpose of this project, we will focus only on the first three types of
terrains and the first three types of obstacles.
In an enclosed space, for example in a four-wall bounded room, the UAV must be able to
avoid colliding into walls, ceiling and columns present in the room. This mean it must be
able to maintain a safe distance between itself and the wall, at the same time maintain a
safe altitude, and also is able to evade columns successfully.
As the width of a typical doorway is about 100cm, thus the maximum length of the UAV
must be smaller than 80cm. For narrow corridor, the UAV should not be confused by the
smaller clearance on both of its sides and still be able to maintain straight path along the
corridor.
Other than space constraints, the indoor air is also not totally stagnant. There are still
risks of flow disturbances which will affect the control and performance of the UAV.
Some examples of sources of disturbance are the fans, air-conditioner blower, ventilation
shaft as well as external wind flow. To better appreciate the level of disturbance, we
carried out measurement of wind speed using a Testo Term 440 anemometer:
To ensure optimum performance of the UAV, it should either be able to counteract the
disturbance or avoid flying near the source of disturbance. We measured the wind speed
values from four sources of disturbance that are commonly found in an indoor
environment namely external wind draft from windows, draft from fans and draft coming
from an aircon ventilation shaft.
Figure 2.1 : Experimental set-up of wind speed measurement
Wind speed from a table fan
0
1
2
3
4
5
6
7
0 0.5 1 1.5 2 2.5 3 3.5
distance from object (m)
Win
d sp
eed
(m/s
)
Figure 2.2: Results of wind speed measurement
In summary, we have discovered that the wind speed values from fans are the highest
averaging at 3.6 m/s and continue to affect the air around it for at least 3m away from the
source at a speed of about 1 m/s.
Figure 2.3: Ventilation shaft
Maximum recorded Wind speed from a ventilation shaft
-0.5
0
0.5
1
1.5
2
2.5
3
3.5
0 0.2 0.4 0.6 0.8 1 1.2 1.4
Distance away from disturbance
Win
d sp
eed
(m/s
)
Figure 2.4: Results of wind speed from a ventilation shaft
Air-conditioners and ventilation shafts do affect the air up to a range of 1 m., after which
the airspeed is not significant.
Wind speed in a HDB building corridor
0
0.5
1
1.5
2
2.5
3
3.5
4
4.5
5
0 5 10 15 20 25 30
Storey
Win
d sp
eed
(m/s
)
Maximum
Mean ( taken in1 min interval)
Figure 2.5: Wind speed measurement taken from a corridor on a windy day*
* Wind speed was taken at Block 354, Ang Mo Kio Ave 8
Wind speed from windows generally increase with the height from the ground and the
wind speed can go to a maximum of 4 m/s at higher storeys.
3) Overview of Project
From the selection criteria above, we have decided to select the Draganflyer V Ti as our
flying platform on which we will carry out our modifications in order to perform a
successful semi-autonomous reconnaissance flight mission in an indoor environment.
The following reasons are why this platform was finally selected out of various other
platforms.
Figure 3.1: The Draganflyer V Ti
The size of Draganflyer fits nicely with the specifications required in an indoor
environment. With an end-to-end diameter of 80cm, it fits nicely through doors and
corridors. Furthermore, even though the platform is generally small, the estimated
payload as suggested by the manufacturers is 100-300g which fits perfectly with our
payload demand of 200g.
However, there are also a few challenges that we foresee in choosing a flying platform
such as the Draganflyer. Firstly, the quad rotor design means that the Draganflyer needs
to use a non-linear control to achieve the required states of motion. However, since the
on-board electronics are already configured for flight, we do not have to worry about this
problem. However, the difficulty is in controlling the platform without adversely
affecting or making direct modifications to the on-board electronics. Attempting to
communicate with the complicated system as well interfacing our own control algorithms
with the on-board systems will also be a challenge in this project. The information on the
planned control architecture will be discussed in Chapter 5.
4) Aerodynamics and Propulsion
Due to the additional payload that is required to be carried by the Draganflyer, we are
therefore required to test the total thrust capabilities of the platform so as to ensure that
we are able to put on the additional payload of sensors, processors and camera whilst
maintaining stable flight. From the calculations and estimation of additional components
required, we estimate that we require a total payload of 178g in addition to its own
weight. The Figure below lists down the various components that are required to be
added to the platform in order for it to successfully complete its mission.
Component Weight(g)
Full Draganflyer set 484
BASIC Stamp module + programming board + additional sensors 75
PING sonar sensor 9
RF module 14
IR sensor x 4 20
Camera set 20
9 volt battery for camera and/or Stamp module 40
Total weight (Draganflyer + additional weight) 484 + 178 =
662g
Figure 4.1: Weight estimation of components required
Initial flight testing has been conducted in order to discover the total maximum thrust
capability of the Draganflyer. In order to obtain this thrust value, we conducted a simple
test in order to measure the force exerted. The following diagram shows the
experimental set-up: -
Figure 4.2: Experimental set-up for thrust measurement
1kg weight
Connected to ceiling
Measuring tape Spring balance
Figure 4.3: Picture of experimental set-up
A 1kg weight is tethered to the Draganflyer model in order to ensure that it does not fly
away when the rotors begin to spin. The initial weight of the Draganflyer including the
weight is recorded by the spring balance. The Draganflyer is then powered up and put to
maximum throttle. The difference in the weight is then recorded as the thrust provided
by the rotor blades.
It is well known that the thrust provided by the rotors is affected by the ground effect.
Due to the presence of the floor, the flow of air causes a high pressure region to develop
below the rotor blades. In order to measure the effect of the ground on the thrust
provided by the Draganflyer, a measuring tape is used to measure the height of the
Draganflyer above the ground.
Thrust vs height from ground
5.9
6
6.1
6.2
6.3
6.4
6.5
6.6
6.7
6.8
6.9
0 20 40 60 80 100 120 140 160 180
Height from ground(cm)
Thru
st(N
)
Figure 4.4: Results of thrust measurements
From the results, we can see that the thrust provided by the rotors is indeed affected by
ground effect up to a height of 1.2 m after which it remains relatively constant.
In order to measure effectively the total thrust provided in a stable hovering situation
which is not affected by ground effect, we now tested the Draganflyer thrust at full
throttle at a height of 1.77 m to discover the available effective thrust that it can take.
From the experiment conducted, the total measured thrust out of ground effect is 7.8 N or
780g. This shows that the platform is indeed suitable to carry out our required payload of
sensors.
Going upwards
Going downwards
In order to further view the effect of obstacles on the propulsion provided by the UAV as
well as the aerodynamic force exerted by the wall on the UAV, we modeled a simple
form of the Draganflyer by using Solidworks and used COSMOS Floworks to estimate
the forces on the model in an environment whilst varying the distance from the ground.
Figure 4.5: Velocity plot of Draganflyer at 30cm and 80 cm height.
Figure 4.6: Pressure plot of Draganflyer at 30cm and 80 cm height
Figure 4.7: Simulation of Flow trajectories of the Draganflyer
From the simulation, we have found that the thrust provided by the Draganflyer when it is
30cm from the ground is 7.5 N. The thrust then decreases to 6.87 N at 50cm and 5.78 N
at 60 cm. This indeed is consistent with our experimental results that the thrust generally
decreases as we move out of ground effect.
In conclusion, we have proved from experiment that the Draganflyer is indeed able to
carry the amount of payload necessary in order to implement the designed Collision
Avoidance System.
5) Control Architecture and Collision Avoidance System (CAS) Overview In order to preserve the Draganflyer in its original condition for future development, the
proposed control system is shown below, which does not require significant modification.
Figure 5.1: Overview of control system architecture As can be seen from Figure 5.1, the system consists of 3 microcontrollers as labeled. The
CAS consists of a microcontroller (labeled A), 4 infrared ranging sensors, a sonar sensor
B
Sensor data
Transmit sensor data via RF
Modified control
command transmitted to
receiver
Trainer port
Serial communication
Ground station
C
A
and a dual-axis accelerometer will be installed on-board the platform. All sensors data
will be sent via radio signal to a microcontroller (labeled B) on ground. After necessary
calculations and decision making, control command will be sent via serial
communication to another microcontroller (labeled C) for corresponding PWM pulse
generation, which the PWM signal will be sent to the on-board receiver through its
transmitter via trainer port connection.
Control algorithm
Figure 5.2: Control algorithm for indoor flight of Draganflyer
Initialization
Get sensor data
Stable? Stabilize
Obstacle behind?
Obstacle in front?
Obstacle on left?
Obstacle on right?
Move forward
Move forward
Move backward
Roll right
Loop
No
No
No
No
No
Roll left
Yes
Yes
Yes
Yes
Yes
Base on the algorithm, the microcontroller will always seek for sensors’ feedback on the
craft’s attitude, altitude and distance from possible obstacles to determine suitable control
actions.
Components selection To provide visibility of the environment, ranging sensors including laser, sonar and
infrared (IR) can serve the purpose. However, IR sensors were ultimately chosen because
of its low cost, light weight, and most importantly, unlike sonar, it does not give
erroneous result when it is sensing at an angle with target surface. To account for more
distance allowance, the desirable ranging distance is 2m. However, the best IR sensor
available is Sharp GP2Y0A02YK which has a reasonable ranging distance of 20cm –
150cm and each weighs only 5grams.
Figure 5.3: Sharp GP2Y0A02YK (left) and Parallax MEMSIC 2125 (right)
For tilting and stabilization control, a dual-axis accelerometer was used to obtain tilt
angle of the platform with respect to ground from its acceleration outputs of both X and
Y axes. MEMSIC2125 from Parallax was chosen because of the extreme light weight and
its simple code for obtaining acceleration and tilt angle hence lessen program runtime
which is significant during PWM generation.
For altitude control, Parallax’s PING))) sonar sensor was chosen because it requires less
output processing time as compared to IR sensor (the time criticality will be discussed
further in section “Signal update rate”). However, the payoff is it weighs 10grams. Since
the tilting angle of the Draganflyer will be set to be less than 10 degrees, hence the error
in readings would be insignificant.
Figure 5.4: Parallax’s PING))) Sonar sensor (left) and BS2sx microcontroller (right)
As for microcontroller, although not as cheap and large RAM capacity as PIC
microcontroller, Basic Stamp was chosen mostly because our lab has quite a large
amount of them and it is able to deliver to all our requirements. It can also be easily
interfaced with any computer via serial or USB port and is able to support serial and I2C
input. Most importantly, it can easily duplicate and generate the pulse signal from the
transmitter which has important application in this project. Besides, it is also widely used
in many robotics and RC applications and has forums which provide much
troubleshooting information.
Sensor Calibration Before putting into application, sensors need to be calibrated. Since the accelerometer
and the sonar sensor has already been calibrated by manufacturer for operating in typical
room temperature of 250C, and has also been verified to operate normally from
experiments, no further calibration is needed. However, due to the fact that the IR
sensor’s output is of non-linear relationship with the measured distance, proper
calibration is necessary. A calibration curve was produced from experiment based on the
guidelines provided by the distributor, Acroname [1] and was used to obtain several
calibration constants which will be used in the programming codes.
Distance measured vs ADC output
0
20
40
60
80
100
120
140
160
180
0 50 100 150 200 250 300
8-bit ADC output
Dis
tanc
e, L
(cm
)
1 / (L + k) vs ADC output with linear trendline
y = 0.00011614x + 0.00130556
0.000
0.005
0.010
0.015
0.020
0.025
0.030
0.035
0 50 100 150 200 250 300
8-bit ADC output1
/ (L
+ k)
Figure 5.5: Calibration curves of Sharp GP2Y0A02YK IR sensor From the calibration curve, we obtained a linear relationship between the distance and the
Analog Digital Converter’s (ADC) output. From the trend line’s equation, 2 calibration
constants, m' and b', can be obtained from the slope and its intercept. The third constant,
k is a self-determined constant which was deemed to give the most accurate readings.
The calibration equation follows the linear equation format y = mx + c:
1 / (L + K) = m * (ADC output) + c After some manipulation, Distance, L = (m' / (output + b')) – k
where m'=1/m and b'=c/m
With the calibration constants, accurate readings can be obtained from the IR sensors.
Non-perpendicular sensing conditions
When the sensing surface is not perpendicular with the IR sensor, it gives slight error
from the actual distance. Figure 6.6 below shows measurement taken when sensor is at
certain angle with the sensing surface at a fixed distance of 50cm, using both horizontal
and vertical sensor mounting (mounting orientation w.r.t. ground). The results show that
vertical mounting gives less error over wide range of angle as compared to horizontal
mounting, with error ranging from 2cm at 10 degrees angle to 10cm at 80 degrees angle.
Figure 5.6: IR sensor sensing at various angles with respect to sensing surface with 2
different mounting Other than sensing at an angle with the sensing surface, sensing at corner will also bring
some error to the distance measurements. To identify the significance of the error,
measurements were done at known distance (50cm) and were compared with the readings
obtained. The measurements were done at two corner angles: 900 and 1100. Corners of
angle less than 900 are not considered as other two sensors at the sides will forbid the
Draganflyer from approaching that sharp corner.
Horizontal mounting
0
10
20
30
40
50
60
0 10 20 30 40 50 60 70 80
Angle (deg)
Dis
tanc
e (c
m)
ActualMeasured
Vertical mounting
0
10
20
30
40
50
60
0 10 20 30 40 50 60 70 80
Angle (deg)
Dis
tanc
e (c
m)
ActualMeasured
Figure 5.7: Corner measurement
The above results agreed with each other that vertical mounting is a better way for
mounting the IR sensors. The experimental studies also show that there is no problem
with the sensor detecting the floor while it is still on ground, thus the IR sensors will be
mounted vertically with respect to the ground.
PWM Signal Generation As the microcontroller will take over the transmitter’s role to generate control signal, it is
important to analyze the control signal used to control the Draganflyer to ensure that
correct signal is generated as compared to the original signal from the transmitter. The
analysis shows that the signal used is pulse width modulation (PWM) signal consists of 6
channels of pulse information which each represents command signals to the actuators.
As mentioned earlier, the Basic Stamp microcontroller has built-in command which
enables easy generation of PWM pulse by a simple PULSOUT command [2]. This
provides much convenience for generating the 6 channel pulse train of variable pulse
widths. The analysis also shows that the time span of pulse train is approximately 20ms.
Comparison between Horizontal & Vertical Mounting with Actual Measurements
0
50
100
150
200
250
20 30 40 50 60 70 80 90 100 110 120 130 140 150
Distance (cm)
Dis
tanc
e (c
m)
Corner angle: 90 deg
Comparison between Horizontal & Vertical Mounting with Actual Measurements
020406080
100120140160180
20 30 40 50 60 70 80 90 100
110
120
130
140
150
Distance (cm)
Dis
tanc
e (c
m)
ActualHorizontalVertical
Corner angle: 110 deg
The pulse width of each channel ranges from 0.6ms – 1.5ms, all of a magnitude of
approximately 4.2V. The neutral pulse width is about 1.05ms.
Signal update rate Due to the fact that the control signal generation is entirely on the hand of the
microcontroller (labeled C in Figure 5.1), the signal generation condition must be the
same as those from the transmitter. However, besides generating PWM signals, it also has
to receive control command from microcontroller B in order to generate the right pulse
width for each of the 6 channels.
Since each pulse train has a time span of 20ms, and each channel takes up 1ms – 2ms,
hence the only time left for the microcontroller to serial-in control command is only
about 9ms. This implies that the program code has to be kept as short as possible so that
the program runtime will not delay the signal update between the microcontrollers. Thus,
time is a critical issue, which is the reason why in previous section on selection of sensors
the output processing time is one of the important considerations. Many serial
communications between microcontrollers are involved in the proposed control system.
Hence, it is important to investigate the time needed for each serial communication.
Time vs Number of bytes Sent
0.0
2.0
4.0
6.0
8.0
10.0
12.0
14.0
0 2 4 6 8 10
Number of bytes
Tim
e (m
s)
Flow ControlWait method
Time vs Number of bytes Received
0.0
2.0
4.0
6.0
8.0
10.0
12.0
14.0
0 2 4 6 8 10
Number of bytes
Tim
e (m
s)
Flow ControlWait method
Flow Control method: Time to Send vs Receive
0.0
2.0
4.0
6.0
8.0
10.0
12.0
1 2 3 4 5 6 7 8 9
Number of bytes
Tim
e (m
s)
SendReceive
Wait method: Time to Send vs Receive
0.0
2.0
4.0
6.0
8.0
10.0
12.0
14.0
16.0
1 2 3 4 5 6 7 8 9
Number of bytes
Tim
e (m
s)
SendReceive
Figure 5.8: Time needed for serial communication between microcontrollers Figure 5.8 shows that the time varies linearly with the number of bytes received (sent).
Also, the time spent is lesser if “Flow Control method” is used in which the sender waits
for the receiver to establish transmission connection, rather than “Wait method” in which
the receiver wait for the sender. However, flow control can only be established between
wired connections, we will still need to use “wait method” for wireless communication.
Besides, for “Flow Control method” every extra byte will require an additional time of
Receiving is 0.3ms faster than sending
Receiving is 0.2ms slower than sending
1.1ms; for “Wait method” every extra byte will require an additional time of 1.2ms. Also,
it is about 0.3ms faster to receive than to send.
For microcontroller C, since we have only about 9ms for serial communication, from
Figure 5.8 the maximum number of bytes allowed is 6 bytes. However, only 4 variables
which control the speed of 4 motors need to be sent and 2 other channels can be
neglected.
For microcontroller A and B, taking into account the time needed for both wireless and
wired serial communication, data collection and data processing, the program runtime
will definitely be more than 20ms. Hence, the fastest possible signal update rate will be
every 40ms, which is equivalent to a frequency of 25Hz.
6) Conclusion and current Progress of Project and future
From the data of the wind speed values measured, we will then verify the effectiveness of
the Draganflyer in withstanding the various airflow disturbances found. However, since
wind tunnel testing is most probably not possible given the lack of resources, we will
perform Computational Fluid Dynamics using available software to help us estimate the
drag forces experienced by the Draganflyer due to these disturbances. The Draganflyer
will first be modeled using Solidworks and then put under various ambient flow
conditions using COSMOS Floworks. In order to investigate the effect of walls and the
ground on the flow around the Draganflyer, we would also simulate this flow in the
software and obtain the results from the software. The results will then verify our
hypothesis that the Draganflyer is indeed able to withstand the various disturbances in the
air effectively in order to complete its reconnaissance mission.
We are also still currently in the progress of putting together the control architecture and
attempting to interface the communications between the BASIC stamp processor and the
transmitter module. Once this has been completed and the sensors have been placed on
board the Draganflyer, we would then proceed with validating the effectiveness of the
control algorithm through a series of flight testing.
- Ground Flight Testing
In order to prevent damage to the UAV system we have integrated, initial ground-based
flight testing will be done. This is done by running the Draganflyer while it is held on the
ground. Various objects are then placed near the sensors simulating obstacles around the
platform. We can therefore view how the platform reacts to each obstacle and adjust the
control algorithm in the case that any unwanted effects occur. After this preliminary
flight testing is done, we can therefore move on to actual flight testing within a closed
room in order to view the actual performance of the integrated system and whether it is
adequate to avoid the obstacles around it successfully.
7) Future Developments
The current configuration of 4 distance sensors is not adequate for the UAV to have
complete vision of its surroundings. However, the number of sensors allowable on the
platform as well as the complexity of the resulting algorithm prevents us from using more
sensors. Furthermore, the existence of more sensors means that the processor will take
even more time in order to make a decision when reacting to the various inputs thus
increase the lag time and therefore the resulting response time of the system. Due to time
and cost constraints, these objectives could not be met by our group.
We therefore recommend better and more sensors to be added to the flying platform.
Sophisticated vision based systems can be integrated together with the camera to allow
the UAV to better understand the obstacles surrounding it and react accordingly.
Possible future developments can even utilize a scanning device which is able to
construct a 3D image of the surrounding architecture that can be viewed by the UAV in
its current position and it can then map out a safe flight route or passage around the
obstacles and conduct the reconnaissance mission safely.
The current system also utilizes a ground based station that does the calculations for the
UAV as well as control the flight systems of the UAV directly. A better and more robust
solution would be to have all the flight computers on-board the platform itself. However,
this is again constrained by the inherent payload capability of the UAV itself. Further
aerodynamics wind tunnel testing can also provide better first-hand information in
measuring the aerodynamic capabilities of the flying platform when affected by the
various disturbances spelt out in this paper.
8) Acknowledgements We would like to thank our project supervisor A/Prof. Gerard Leng Siew Bing for
invaluable assistance and advice during the course of this project. We would also like to
thank DSO National Laboratories for sponsoring the cost of our project materials without
which we could not hope to successfully achieve the required objectives.