You are on page 1of 16

38

CHAPTER 4

Experiment.

4.1 Introduction.
This chapter explain the development of an autonomous gust insensitive
unmanned aerial vehicle which using off shelf parts. The development of the ground
control system (GCS) will be explained. Also the test which will be carried out to for
data collection and validation of the results. The development of the algorithms
which will be used to built the PID control by referring the research variable will be
discussed in this chapter.

39

4.2 UAV Airframes


4.2.1 Ez Hawk
Dimension:

Wingspan
: 1370mm
Length
: 870mm
Weight
: 680 g
Airfoil Types : Glider wing types.
Control Surface:

Picture 4.1: EZ hawk

40

Center of the Gravity Formula.

FORMULAS:
C=
MAC =
D=
PA =
BPr =
BPt =

S(A+2B)/(3(A+B))
A-2(AB)(0.5A+B)/3(A+B)
2Y(0.5A+B)/3(A+B)
(A+B)(Y)(0.5)
(%MAC/100)(MAC)+C
BPr-S

4.2.2 Autopilot System.


In this research the Autopilot system is using ArduPilot Mega hardware
(Picture 4.2). The system base is arduino system which designed by Chris Anderson
and Jordi Muoz of DIY Drones using the new ATmega2560. The original version
of this board (with ATmega1280) was used to win the annual autonomous vehicle
competition organized by SparkFun. The ArdupilotMega Board is also known as:
APM, the red board, the controller, the main board or the master board. The
ArduPilotMega Shield/Oilpan is also known as: APM Shield, APM Oilpan, the
oilpan, the shield, the sensor board, the blue board or the slave board. The original
version of APM had an ATmega1280 processor. In early 2011, this was upgraded to
an ATmega2560 processor and all boards shipped since then have used the 2560.

Picture 4.2: ArduMega board

41

The processor of the Arduino Mega (picture 7) is the Atmega2560


microcontroller from Atmel (Picture 4.3), which has 256kB of flash memory .The
motherboard has 4 x 16-bits Timers with 3 independent output captures (PWMs) and
one Input Capture for each Timer. With some coding the system will be able to use
one timer with 2 output captures and 1 Input captures. The Output captures are used
to generate pulse width modulations to control servos, and the input capture is used
to decode either PWM signals or PPM signals. The system use one timer to decode a
PPM signal coming from the Atmega328p that works as a 8channel PPM encoder
and the other 2 output captures were used to control servos. The system used 2
output capture for each timer (In total 8 output captures were used) and one input
capture to read 8 servo inputs encoded in a PPM frame. The schematic diagrams are
in attachment A.

Picture 4.3: Autopilot Motherboard.

42

The system Consists as below:

1.

Designed to be used with autonomous aircraft, quadcopters and helis

2.

Based on a 16MHz Atmega2560 processor.

3.

Built-in hardware failsafe that uses a separate circuit (multiplexer chip and
ATMega328 processor) to transfer control from the RC system to the
autopilot and back again.

4.

Includes ability to reboot the main processor in mid-flight

5.

Dual-processor design with 32 MIPS of onboard power

6.

Supports 3D waypoints and mission commands (limited only by memory-approximately 600-700 waypoints with current code, but can be adapted for
more)

7.

256k Flash Program Memory, 8K SRAM, 4K EEPROM

8.

Comes with a 6-pin GPS connector (EM406 style).

9.

Has 16 spare analog inputs (with ADC on each) and 40 digital input/outputs
to add additional sensors

10.

Four dedicated serial ports for two-way telemetry (using optional XBee
modules) and expansion

11.

Can be powered by either the RC receiver or a separate battery

12.

Hardware-driven servo control, which means less processor overhead, tighter


response and no jitters

13.

Eight RC channels (including the autopilot on/off channel) can be processed


by the autopilot.

14.

LEDs for power, failsafe status, autopilot status.

43

4.2.3 Airspeed sensor.


The airspeed sensor use to measure real-time speed in real environment for
the UAS to study the gust effects to the UAS.
This system is using The MPXV7002 showed at picture 4.4 is series piezo
resistive transducer (picture 8) in the small outline package (SOP) is a state-of-the-art
monolithic silicon pressure sensor designed for a wide range of applications, but
particularly those employing a microcontroller or microprocessor with A/D inputs.
This patented, single element transducer combines advanced micromachining
techniques, thin-film metallization, and bipolar processing to provide an accurate,
high level analog output signal that is proportional to the applied pressure.
The MPXV7002 is designed to measure positive and negative pressure. In
addition, with an offset specifically at 2.5V instead of the conventional 0V, this new
series allows to measure pressure up to 7kPa through each port for pressure sensing
but also for vacuum sensing. The MPXV7002 series piezo resistive transducer
diagrams in attachment B).

Picture 4.4: The MPXV7002 series piezo resistive transducer


Features:
1.

to 2 kPa (-0.3 to 0.3 psi).

2.

0.5 to 4.5 V Output

3.

Weight: 0.1 oz; 4 g

44

4.2.4 Magnetometer.
Current orientation of the aircraft and the direction the airframe is moving is
an important input for navigation and stabilization in ArduPlane.
Without a magnetometer, the orientation of the plane is calculated using
successive GPS fixes plus the inertial sensors: Sensor drift is compensated by
reference to the GPS ground course, as that should fix the current compass point for
the nose of the plane (assuming no wind or opposite rudder).
With a magnetometer, the system no longer has to rely on the GPS ground
course to correct for sensor drift, and the orientation of the plane becomes more
accurate. If the UAS fly with a cross wind, manually or under full autopilot control,
then the magnetometer will provide more accurate fixes for sensor drift.
This is a 3-axis digital compass board based on the Honeywell's HMC5843
(Picture 4.5). Communication with the HMC5843 is achieved through an I2C
interface. The board has an I2C translator and 3.3V power .
The HMC5843 featured with I2C interface with I2C translator for 5V
signals compatibility 2.5 to 3.3V and 4V to 5.5V supply range (one at time, jumper
selectable) Low current draw 7 milli-gauss resolution ArduIMU+ and
ArduPilotMega Shield pin compatible.

Picture 4.5: 3-axis digital compass board HMC5843.

45

4.2.5 GPS Module


GPS (Global Positioning System) module is required as references for the
UAS flight path. The GPS receiver used on the autopilot is the EM406 a. This
receiver suits the autopilot application for several reasons. First, it has an integrated
antenna, which makes it self-contained and low-maintenance. Second, it is very
small and lightweight, weighing only 16grams. Third, it has desirable electronic
characteristics. These include: Very high sensitivity (Tracking Sensitivity: 159dBm),All-in-view 20-channel parallel processing, Snap Lock 100ms reacquisition time, and the maximum acceleration is 4G. Figure 4.6 shows the
specification of EM406A.

Figure 4.6: Specification for EM406A

46

4.3.1 Flight Plan for UAS.


The flight plan is this study is using APM planner (Figure 4.7). The APM
Planner is an easy to use software tool with a friendly interface that enables the user
to configure a series of settings and functions to help them in planning their virtual
aerial path. The latest APM planner version 1.2.15 mav 1.0 has full pid/planner/gcs
while under hil/real using mavlink . The APM planner is created by Michael
Oborne.
The Features of the APM Planner
1.

Point-and-click waypoint entry, using Google Maps.

2.

Select mission commands from drop-down menus for easy setting.

3.

Download mission log files and analyze the datas .

4.

Configure APM settings for the airframes.

5.

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


UAV simulator.

6.

See the output from APM's serial terminal.

Figure 4.7: APM Planner

47

4.3.2 Data logging


There are two ways to data log your flights with APM using the onboard
16Mb data flash memory, which can downloaded on the ground using Xbee/3DR
telemetry stream with a Ground Station in flight.
4.3.3 Recording telemetry
Mission Planner:
MAVLink telemetry ( figure 4.8) is automatically recorded when MAVlink is
connected. Files are in the "logs" subfolder in your Mission Planner folder and given
data and the time file names . There are two types of data saved it are ".tlog" and
".rlog". The tlog files is the flight log for the UAS and the rlogs are just for
debugging and contain all the output from the APM serial stream, including
debugging info.
The tlog can be reloaded and replay anytime and convert to a KMZ file which can
be displayed in Google Earth by clicking on the KMZ button.

Figure 4.8: Telemetry log

4.3.4 Onboard data logging


APM's on-board 16MB data logging memory will also automatically record
information about your flight and the APMs performance.
When the board is connected to APM via the USB cable and the slider switch
is in CLI mode, the logs file can be downloaded using the buttons in the Mission
Planner's Terminal tab. The software will saved the log file in the log folder. The file
can be convert to KML file by clicking "Recreate KML" tab , The KML file which
have been created will allow the user to view the mission which have been
completed by using Google Earth.

48

The data need to be erase before a day of flying due to maximize the space
required to save the flight data log.
Figure 4.9 show the data types that can be logged in the onboard data flash memory.
It can be on or off by typing enable [log name] in the CLI Logs menu.
Log name

Default

Function

ATTITUDE_FAST DISABLED

Logs basic attitude info to the dataflash at 50Hz


(uses more space)

ATTITUDE_MED

ENABLED

Logs basic attitude info to the dataflash at 10Hz


(uses less space than LOG_ATTITUDE_FAST)

MOTORS

DISABLED Logs PWM sent to motors

GPS

ENABLED

Logs GPS info to the dataflash at 10Hz.

PM

DISABLED

Logs IMU performance monitoring info every 20


seconds.

CTUN

Logs control loop tuning info at 10 Hz. This


DISABLED information is useful for tuning servo control
loop gain values.

NTUN

Logs navigation tuning info at 10 Hz. This


DISABLED information is useful for tuning navigation
control loop gain values.

MODE

ENABLED

Logs changes to the flight mode upon


occurrence.

RAW

DISABLED

Logs raw accelerometer and gyro data at 50 Hz


(uses more space).

CMD

ENABLED

Logs new commands when they process.

Figure 4.9: Data Types.

49

4.3.5 Downloading and analyzing log files.


APM also automatically data logs in the air using its built-in data flash
memory. The data also can be access by plugging in your universal serial bus cable
USB cand using the Terminal tab in the Mission Planner (Figure 4.10).

Figure 4.10: Terminal Tab Display.

4.3.6 Downloading log files


To download the data the slider switch at the arduino board must in CLI
mode. The right com ports also must be selected in the Mission Planner
configuration menu.
"Log Download" from the Mission Planner Terminal tab selected. A list of
logs from the onboard memory will be shown at the display. The file can be either
selected individual files to download or download all of them. The file will be saved
in the APMMission Planner/logs folder, along with a KML, that can be opened in
Google Earth.

4.3.7 Analyzing log files


Once the log file has been finish downloaded to the folder the file now can be
analyzed by selecting a log file to analyze and the Log Browser should open.
In Figure 4.11 show the log browse. Each row represents a data log which logged in
several times in a second. The first 256 lines in the data log browse are just mission
commands ("CMD. After that the default log data will alternate between Attitude

50

data ("ATT") and GPS data ("GPS"). If the GPS data is 0s that means that APM
didn't have GPS lock at that time. The Attitude data comes in three forms: Roll,
Pitch and Yaw. Many data fields can be added to the log file, from performance
monitoring to navigation calculations.

Figure 4.11: Log Browse

51

4.4 Ground Control Station.


The ground control station is the circuital part of the UAS due the
ground control is the monitoring station for the UAS to complete the tasks. If
there is error in the auto pilot control the ground control can bypass the auto
control to manual control to avoid the UAS crash or fly out from the flight
paths which had been set.
A typical ground control station (GCS) will envelope three main
functions (figure 4.12):
1.

Mission planning.

2.

Mission control.

3.

Data manipulation.

Figure 4.12: Typical GCS function.


But the main problem to build the GCS is the cost to build the GCS
station. In this research the low cost GCS will be built by using on shelf parts.
The 3DR Radio for telemetry had been selected for the GCS. The 3DR radio
communicates with the GCS using laptop. The laptop installed with APM
planner and also with UAS remote control.

52

The 3DR radio (figure 4.13) are selected due to its specification as below:

very small size

light weight (under 4 grams without antenna)

available in 900MHz or 433MHz variants

receiver sensitivity to -121 dBm

transmit power up to 20dBm (100mW)

transparent serial link

air data rates up to 250kbps

MAVLink protocol framing and status reporting

frequency hopping spread spectrum (FHSS)

adaptive time division multiplexing (TDM)

support for LBT and AFA

configurable duty cycle

builtin error correcting code (can correct up to 25% data bit errors)

demonstrated range of several kilometres with a small omni antenna

can be used with a bi-directional amplifier for even more range

open source firmware

AT commands for radio configuration

RT commands for remote radio configuration

adaptive flow control when used with APM

based on HM-TRP radio modules, with Si1000 8051 micro-controller and


Si4432 radio module

Figure 4.13: 3DR radio.

53

The radio frequency is depends the model of the 3DR radio. For 3DR 443
model the minimum frequency is 414.0 MHZ and the maximum is 454.0 MHZ. For
model 3DR 900 the minimum frequency 895.0 MHZ and maximum frequency is 935
MHZ. But the range using the 3DR radio is about 2 km from the GCS and the UAS.
To solve this problem an amplifier is use which gives 12dB transmit gain, and 18dB
receive gain, automatically switching between transmit and receive modes when the
radio starts and stops transmitting. It can run on 5V from a UBEC, or can use a built
in switching regulator with a 2S or 3S LiPo. The amplifier range about 7.6 km from
the GCS and the UAS. The 3DR radio frequency is civil frequency which can be
referred to the Radio Frequency Spectrum Requirements for Civil Aviation Fifth
Edition 2009 Doc 9718-AN/957.

1. Integrating the autopilot system and the


airframe and its control surfaces
2. Wind tunnel test to measure aerodynamic
coefficients and derivatives. The UAS is mounted
in the test section.
a. To select the best balance to use
b. To measure CL, CD, CM, CMalpha, CMbeta
CLelevatr, CLail, CLrudder, etc
3. Flight test data collection and analysis

Chapter 4 Experimental Wind Tunnel and flight testChapter 5 Analysis, Discussion and
Conclusion

You might also like