Vous êtes sur la page 1sur 51

Fligh System Implementation in a UAV

Johan Puscov

Examensarbete utfrt vid Fysikinstitutionen, KTH, SCFAB Sommaren-Hsten 2002

Abstract

This thesis project is carried out at the Royal Institute of Technology (KTH) with the purpose to implement a flight system in a Short range Unmanned Aerial Vehicle (SUAV). A major part of the work was to install and evaluate the MicroPilot MP2000 autopilot. This report contains a description of the SUAV, results from ground and flight tests, a complete pre-flight checklist, flight codes that enables the MP2000 to trigger payloads and an evaluation of the autopilot. Future development includes continued flight tests and sensor implementation. The SUAV will be capable of carrying magnetometers, scanners, air samplers and GM-tubes.

Contents
1. Introduction 1.1. Aim of Study 1.2. Design Requirements and Limitations 1.3. Design Process 1.5. History of Unmanned Aerial Vehicles 1.6. UAV Examples 1.6.1. The IAI Malat Scout 1.6.2. The Aerosonde Hardware 2.1. Aircraft 2.2. Avionics 2.2.1. MP2000 Autopilot 2.2.2. MP2000 Servoboard 2.2.3. SK II GPS 2.2.4. Servos 2.3. Electric Power System 2.3.2. Batteries 2.4. Installation Software 3.1. PID Control 3.2. Navigation 3.3. Autopilot Software 3.3.1. MP2000 GCS Software 3.3.2. Flight Code 3.3.3. Settings System Evaluation 4.1. Ground Tests 4.1.1. Power Consumption 4.1.2. EMI and Vibration Test 4.1.3. Sensor Test 4.2. Flight Tests 4.2.1. Analysis 4.2.2. Flight Test 2002B 1 1 1 1 2 2 2 3 4 4 5 5 5 5 6 6 7 8 11 11 12 13 13 14 15 16 16 16 16 16 17 18 19

2.

3.

4.

5.

Payload 5.1. Avionics and Payload Interference 5.2. Aerial Photography Improvements 6.1. Aircraft 6.2. Avionics 6.3. Installation 6.4. Settings Conclusions

24 24 25 27 27 27 27 27 28 29 30 31 40 41 45 46

6.

7.

References Appendix A1 A2 A3 A4 A5 Aerodynamics Flight Program Pre-flight Checklist Flight Evaluation in MATLAB Flight 2002B

1.

Introduction

This thesis project is carried out at the Royal Institute of Technology (KTH) with the purpose to implement a flight system in a small aircraft. The project is named SUAV and managed by KTH in co-operation with NDH Marketing AB under the supervision of Professor Thomas Lindblad. A major part of this thesis work will be to install and evaluate the MP2000 autopilot. The background and requirements of the SUAV are presented and discussed in this chapter.

1.1.

Aim of the Study

The objective of this research work is to install a commercial autopilot, the MicroPilot MP2000, in a radio-controlled aircraft, the NDH Marketing AB RPH 218, to perform the system setup and to evaluate the performance of the autopilot and aircraft. The short-term goal with this project is to test the capabilities of a Short range Unmanned Aerial Vehicle (SUAV) and to investigate if the current design, the MP2000 autopilot and the RPH 218 aircraft combined, can perform similar mission as more advanced high cost systems.

1.2.

Design Requirements and Limitations

A small Unmanned Aerial Vehicle (UAV) is well suited for missions that are dangerous to perform with human pilots or inconvenient to carry out with larger UAVs. It has a limited range and payload capacity but it is a low cost system and does not require a specially trained air force pilot and extensive logistics. The SUAV is designed to perform high-risk missions like monitoring radioactive fallout due to nuclear accidents, searching for people lost in hostile environments (fires, mountains, oceans etc.) and surveillance of borders, pipelines and power lines. Such types of tasks require a reliable aircraft with a high performance flight computer and advanced payloads/sensors. A normal mission layout is to takeoff, climb to mission altitude, navigate to the target area, perform the assigned task, return home and land. 5

The present configuration is a preliminary design, built for basic flight system evaluation and no telemetry unit or ultrasonic altimeter is installed. Therefore no autonomous takeoffs and landings will be performed.

1.3.

Design Process

There are three main tasks in the flight system implementation process: autopilot installation, system setup and testing. The process is iterative and all modifications of the airframe, autopilot or program code are followed by a thorough analysis before the changes are approved. All major changes on the aircraft that are required during installation are made by or in cooperation with NDH Marketing AB.

1.4.

History of Unmanned Aerial Vehicles

The history of Unmanned Aerial Vehicles, UAVs, started in 1883 when Douglas Archibald attached an anemometer to the line of a kite. Archibald managed to obtain differential measures of wind velocity at altitudes up to 1200 ft. Five years later Arthur Batat installed a camera on a kite and made the first aerial photo on June 20, 1888 in France. Charles Kettering designed the first unmanned aircraft, the Kettering Aerial Torpedo. The airplane was guided to the target by a system of preset pneumatic and electrical controls. After a predetermined length of time, an electrical circuit would close and shut down the engine. The wings would then be released, and the fuselage and warhead would fall on the target. The RP-1 was the first radio-controlled aircraft or Remote Piloted Vehicle, RPV. It was designed and tested by Reginald Denny in 1935. Several modifyed versions followed and 14.891 were built during World War II 14,891. In 1962, the American company, Ryan Aeronautical started to modify BQM-34 target drones into AQM-34 reconnaissance aircraft. The AQM-34 Lightning Bug performed 3,435 missions in Southeast Asia during the Vietnam War. Israel received several improved AQM34s from the U.S Air Force and used them in the Yom Kippur War in 1973. The Mastiff UAV was developed by Alvin Ellis and it was presented in Israel 1974. The design of the prototype was similar to a large RC airplane but the Mastiff had a different configuration and featured the pusher-propeller twin-boom setup that is common for combat surveillance UAVs. The Scout system was introduced in 1980 and these systems performed target acquisition missions during the war in Lebanon in 1982. More information about the history of UAVs is presented in [Reference 1] and [Reference 2].

1.6.

UAV Examples

1.6.1. The IAI Malat Scout The Scout was designed 25 years ago by Israel. It is presented in Figure 1.1 and the aircraft data is displayed in Table 1.1. The Scout is the predecessor to the American Pioneer and the Israeli Searcher.
IAI Malat Scout Span Length Height Payload weight Empty Weight Launch Weight Maximum Speed Service Ceiling Endurance Launch Scheme Recovery Scheme Payload Guidance System 4.96 m 3.68 m 0.94 m 38 kg 96 kg 159 kg 176 km/h 4500 m 7h Runway / Catapult Runway / Parachute / Net Day / Night imager Autopilot / Radio Control

Figure 1.1. The Scout.

Table 1.1. Specifications.

1.6.2. The Aerosonde The Australian Aerosonde was the first UAV that crossed the Atlantic (1998). It is displayed in Figure 1.2 and the aircraft data is listed in Table 1.2.
Aerosonde Mk3 Span Payload weight Empty Weight Launch Weight Maximum Speed Service Ceiling Endurance Launch Scheme Recovery Scheme Payload Guidance System 2.9 m 2 kg 14 kg No data 115 km/h 6000 m 30+ h Car roof rack Land on belly Camera, sondes, IR sensor Autopilot / Base Command

Figure 1.2. The Aerosonde.

Table 1.2. Specifications.

2.

Hardware

The SUAV system is based on the RPH 218 aircraft and the MP2000 autopilot. The airplane is presented in section 2.1. and the autopilot hardware is discussed in section 2.2. The electric power supply is covered by section 2.3 and the installation process is summarized in section 2.4. Information concerning the ultrasonic rangefinder and autonomous takeoffs/landings is presented in [Reference 3]. Aerodynamics is discussed in Appendix A1.

2.1.

Aircraft

The RPH 218 glider aircraft, shown in Figure 2.1 is equipped with a semi-elliptical wing and a boxer engine. It is designed to carry a payload of 1.0 kg in an external pod or inside the fuselage. The airplane has a maximum endurance of 1.2 h with the standard fuel tank and normal battery load. Aircraft data is displayed in Table 2.1.

RPH218

Span Payload weight Empty Weight Launch Weight Maximum Speed Service Ceiling Endurance Launch Scheme Recovery Scheme Payload Guidance System

4.2 m 1 kg 7 kg 9 kg 110 km/h 3000 m 1.2 h Runway Runway Camera / Magnetometer Autopilot / Radio Control

Table 2.1. RPH218 data.

Figure 2.1. The RPH218 aircraft.

2.2.

Avionics

The avionics system is based on the MP2000 core Printed Circuit Board (PCB), the MP2000 servo system PCB, the Trimble SK II GPS PCB, the GPS antenna, the ultrasonic rangefinder AGL PCB (not used), the AGL transmitter/receiver antenna (not used), batteries, servos and the RC receiver. All sensors except the Global Positioning System (GPS) antenna and the AGL are mounted on the motherboard. The flight sensor equipment is built of standard components: Two piezoelectric gyros, two piezo-electric accelerometers and two (one static and one dynamic pressure sensor) off-the-shelf pressure transducers. The weights and dimensions of all the subsystems are listed in Table 2.2.
Device MP2000 core PCB MP2000 servo PCB Trimble GPS GPS Antenna Size 0.1335 x 0.066 x 0.038 m 0.013 x 0.048 x 0.013 m 0.0826 x 0.0312 x 0.0102 m 0.0505 x 0.042 x 0.0139 m Weight 0.090 kg 0.014 kg 0.196 kg 0.112 kg

Table 2.2. Dimensions and weights of the autopilot subsystems.

2.2.1. MP2000 Autopilot The MP2000 autopilot is designed to stabilize and guide an UAV. It is based on the Motorola 68332 32 bit processor. Memory, pressure sensors, accelerometers and gyros are also mounted on the MP2000 motherboard, displayed in Figure 2.2.

2.2.2. MP2000 Servo Board The servo power and signals are distributed from the MP2000 motherboard to the eight different servos (standard configuration) through the MP2000 servo board. The MP2000 servo PCB is shown in Figure 2.3.

Figure 2.2. The MP2000 core PCB

Figure 2.3. The MP2000 Servo PCB.

2.2.3. SK II GPS The Trimble SK II GPS system is an 8-channel, parallel tracking GPS receiver operating on the L1 frequency. It is compatible with standard 25 dB GPs antennas and communicates through a CMOS TTL level pulse-per-second, PPS output. The information necessary to track

10

satellites is stored in RAM using backup power for Almanac, Ephemeris, Real-time clock and Last position. The GPS micro-patch antenna is connected to the SK II by a shielded cable. The SK II PCB is shown in Figure 2.4 and the GPS antenna is displayed in Figure 2.5.

Figure 2.4. The Trimble SK II GPS PCB.

Figure 2.5. The GPS antenna.

The accuracy of the GPS system is 25 m without Selective Availability (SA) on position readings and 0.1 m/s without SA on speed measurements.

2.2.4. Servos Eight standard analog model servos that operate on 4.8 6.0 V are installed in the RPH 218 aircraft. The servos are analog and controlled by Pulse Wide Modulation (PWM) signals. The position of the servo arm is set by the period and the pulse (1 ms 2 ms) is repeated every 20 ms. Six servos connected to the MP2000 autopilot on 4 channels listed in Table 2.5. The two remaining servos are used to control the airbrakes during manual command of the airplane.
Servo Aileron Elevator Rudder Throttle Channel S1 S2 S3 S4

Table 2.5. Servo channels.

2.3.

Power Supply

The electric system of the SUAV aircraft is based on the autopilot, batteries, servos, cables, connectors and switches. Electric systems connected to the engine ignition and payloads are not studied in this report. 2.3.1. Electric Power System The MP2000 autopilot, shown in Figure 2.6, is a network of 3 printed circuit boards that require electric power: the MP2000 core PCB, the MP2000 servo PCB and the GPS PCB. Power is also supplied to the Radio Control (RC) receiver and the servos. Recommended levels of input voltage and current to each component is shown in Table 2.3. Two of the subsystems are directly connected a power source; the main MP2000 PCB operates at

11

voltages between 5.3 V and 14 V and the servo PCB requires voltages in the interval 4.8 V to 6.0 V. The GPS PCB, the AGL (not used) and the RC receiver are supplied with power through the MP2000 main PCB and the servos receive power from the servo PCB.

Figure 2.6. Layout of the electric system.

The required input of current and voltage to each subsystem is displayed in Table 2.3. Energy consumption during pre-flight testing is included in the test requirements data.
Subsystem MP2000 Autopilot PCB MP2000 Servo PCB SK II GPS PCB RC Receiver Theoretical req. 5.3-14.0 V 0.24 A 1.2 Ah 4.8-6.0 V 3.2-5.0 V 5.0 V 0.8 Ah Test req. 5.3-14.0 V 0.20 A 1.0 Ah 6.0 V 3.2-5.0 V 5.0 V 1.2 A 1.4 Ah 0.10 A 0.05 A Design req. 5.3-14.0 V 0.24 A 1.2 Ah 6.0 V 3.2-5.0 V 5.0 V 1.0 A 1.4 Ah 0.20 A 0.05 A -

Table 2.3. MP2000 system power requirements.

The MP2000 autopilot is supplied by two 9.6 V batteries (NiMH) with the capacity 1.5 Ah (one main battery and one backup battery). The servo board is supplied by two 6.0 V batteries (NiMH) with the capacity 1.5 Ah (one main battery and one backup battery). The batteries are connected as a parallel circuit. More information about power supply circuits is found in [Reference 4].

2.3.2. Batteries Electric power is supplied to the autopilot PCB and the servo PCB by two types of battery packs, shown in Figure 2.7 and Figure 2.8. The data of each type of battery is listed in Table 2.4 and Table 2.5. Rechargeable Nickel Metal Hydride (NiMH) batteries are used due to large capacity per volume/weight unit. This type of battery is not suited for high drain applications that require large currents (not the case in this project). Lithium Ion cells are more advanced but are expensive.

12

Figure 2.7. Autopilot battery, 9.6 V.

Figure 2.8. Servo battery, 6.0 V.

Voltage: Capacity: Dimensions: Weight:

9.6 V 1500 mAh 565028 mm 208 g

Voltage: Capacity: Dimensions: Weight:

6.0 V 1500 mAh 715014 mm 130 g

Table 2.4. Autopilot battery, 9.6 V.

Table 2.5. Servos battery, 6.0 V.

2.4.

Installation

The installation of the autopilot is divided into separate stages: preliminary layout, autopilot installation, power system setup, etc, described by Figure 2.9 to 2.13.

Figure 2.9. General layout. Black and white markings are used to indicate the position of individual components and the estimated center of gravity.

13

Figure 2.10. Rail glued to the aircraft structure.

Figure 2.11. Autopilot mounted on rack. The inertia sensors are placed in the vicinity of the center of gravity when the rack is secured. The cover is installed in order to protect the electronic components from damage during installation and maintenance.

14

Figure 2.12. Avionics with autopilot, batteries, tubes and wires installed.

Figure 2.13. GPS antenna mounted on the top of the hull. This position allows the GPS a clear view of the sky and this position is protected from engine exhausts.

15

3.

Software

The system hardware is controlled by and operated through the software package. Stability and control is discussed in section 3.1, GPS navigation is summarized in section 3.2 and the MP2000 Ground Control Station (GCS) is presented in section 3.3.

3.1.

PID control

The navigation and stability control in MP2000 flight program is based on closed-loop feedback systems [Reference 5]. The controlled signal (current heading, speed, altitude, etc.) is compared with the commanded signal (reference heading, speed, altitude, etc.) and the error is used to drive the output value into agreement with the desired input value. The basic feedback loop, Figure 3.1, is built of a system (aircraft), a controller (autopilot) and a comparator (sensor).

Figure 3.1. Closed-loop system. Each component of the system is defined as a transfer function: R(s) is the reference input signal, C(s) is the output signal, B(s) is the feedback signal and E(s) is the error signal. The error signal is the difference between the input and output signals, Equation 3.1.
E( s ) = R ( s ) B ( s )

(3.1)

PID controllers are used by the MP2000 autopilot. The error is regulated by multiplying it with three gains represented by the letters P, I and D. The P term is multiplied by the difference between the desired value and the actual value, the I gain is applied to the sum of all errors since the feedback-loop started and the D constant is combined with the rate of change of error, Equation 3.2.
C (t ) = Pe(t ) + I e(t ) + D d e (t ) d (t )

(3.2)

16

There are eleven available PID loops in the autopilot flight program, listed in Table 3.1. Each flight state (climb, turn, navigation, etc.) is controlled by a certain combination of these loops.

Input Roll Pitch Y acc. Heading Speed Altitude Altitude AGL Speed Heading Crosstrack

Output Aileron Elevator Rudder Rudder Throttle Throttle Pitch Pitch Pitch Roll Heading

Comments Turn coordination Heading hold at takeoff Throttle control of speed / Final approach Elevator control of speed Flare control at landing Climb Navigation Heading from crosstrack error control

Table 3.1. MP2000 control loops.

3.2.

Navigation

The Global Positioning System is used by the MP2000 autopilot to navigate between the pre programmed waypoints. The core of the satellite network is a constallation of 27 (24 operational and 3 in reserve) Earth-orbiting satellites, Figure 3.2. Each satellite circles the globe with an altitude of 19,300 km and at any time, anywhere on Earth, there are at least four satellites in the sky visible to a GPS receiver.

Figure 3.2. GPS satellites in Earth orbit.

A GPS receiver locks on to four or more satellites and calculates its own position by triangulation. This is made by timing the journey of a signal from satellite to receiver. The

17

length of the delay is equal to the signal's travel time and the receiver multiplies this delay by the speed of light to find the distance to each satellite. The accuracy (circle of 25 m) of GPS navigation is sufficient for most applications, including the SUAV system. Errors related to signal distortion in the atmosphere and inadequate satellite position readings can be corrected by a Differential GPS (DGPS). A stationary receiver is then used to calculate the inaccuracy of the GPS receiver.

3.3.

Autopilot Software

The MP2000 autopilot software is based on three parts: MP2000 GCS program simulation and setup program, part 3.3.1, flight code and autopilot setup program, parts 3.3.2 and 3.3.3.

3.3.1. MP2000 GCS Software The MP2000 Ground Control Station (GCS), Figure 3.3, is used to set control loop gains, make servo adjustments and for pre-flight simulations. It is an important tool during programming of the autopilot since it reports all the fatal errors generated by the flight code and lets the user simulate different weather conditions and flight problems (loss of GPS signal, low battery etc.).

Figure 3.3. MP2000 GCS.

18

3.3.2. Flight Code The flight plans are programmed by the user and uploaded through a serial connection between the MP2000 autopilot and the MP2000 GCS (installed on a computer). They are saved as .fly files in the onboard non-volatile memory. The flight plans supports multi-threaded command buffers. This allows one set of commands to navigate the aircraft while three other sets perform operations like servo control (4 command sets can be executed simultaneously). The buffers or threads are numbered 0 to 3 and assigned automatically in the order they appear in the flight code. Commands that navigate or fly the aircraft can only be executed by thread 0. All of the command sets have their own command pointer, which tracks the command status. Thread 0 is executed five times per second, while the remaining ones may execute more or less than five times per second. The selected commands described in this paragraph are used to fly and navigate the aircraft. Default units are distance in eights of a foot, altitude in negative eights of a foot, speed in feet per second, heading in degrees and 100 and angles of roll/pitch/yaw in radians times 1024. If the metric command is specified SI units will be used. Time is stated in fifths of a second and waypoints are expressed either as relative waypoints or absolute waypoints. climb altitude Initiates a climb to altitude. Altitude is defined as pressure height above the point of initialization (point where the autopilot is turned on). There is no terrain following equipment installed in the MP2000 and altitude 0 is the assumed ground level. waitclimb altitude Waits until altitude is reached before the next command in the buffer is executed. circuit Initiates a landing circuit from the current position. The command flies to the initialization point if a manual takeoff has been performed. fromto (origin),(destination) Follows the line defined by the points origin and destination. The aircraft maintains the airspeed and altitude. This command is useful during missions (aerial photography, etc.) when the airplane is required to follow a flight path with accuracy. flyto (waypoint) Sets the desired heading. The aircraft maintains the airspeed and altitude. This command keeps the heading of the vehicle towards the waypoint. This command is useful in windy conditions. turn heading, bank Initiates a turn to heading with roll angle bank. Maximum bank angle is 30. definepattern name Defines a holding pattern. All patterns are defined in the end of the flight program and must end with repeat or return.

19

repeat -line Repeats a program or a selected part of the code. return Exits a pattern. wait time Pauses the command set for the specified number of ticks. The variable time is in fifths of a second. Error procedures are executed if any in-flight failure is detected by the autopilot. These command sets are defined as patterns and listed in Table 3.2.
In-flight Error Control Failure Fatal Error Loss of GPS Signal Loss of Engine Power Low Battery Voltage RC Link Failure GCS Com. Link Failure Pattern Name controlFailed fatalErrorFailed gpsFailed engineFailed batVFailed rcFailed gcsFailed Recoverable No No Yes No No Yes Yes

Table 3.2. In-flight error patterns. An UAV with a parachute installed would have the possibility to deploy it in case of a non recoverable error. There is no such recovery system installed in the SUAV and the autopilot is programmed to turn the aircraft towards the wind (the runway heading is assumed to be in the wind direction) in order to reduce the vertical speed at impact in case of a critical failure. There are no solution to fatal and control errors due to the complete loss of control over the aircraft. A GPS signal error is handled by leveling the aircraft in order to maximize the probability of re-acquiring the signal. All navigation is based on a valid GPS signal and a permanent failure is fatal. If the RC link is lost, the SUAV is steered back to the takeoff position. A flight code sample is presented in Appendix A2.

3.3.3. Settings Performance data, servo settings, battery warning levels and control gains are set by the user and transmitted to the avionics system. These settings are loaded into the MP2000 from the .vrs file in the autopilot memory. A complete description of the setup file is given in [Reference 3].

20

4.

System Evaluation

The performance of the SUAV system is investigated in a series of ground tests, section 4.1, and flight tests, section 4.2. These experiments are made to verify that the system is operating as specified in the design requirements.

4.1.

Ground Tests

The ground tests are focused on; power consumption described in part 4.1.1, EMI test and vibrations tests are presented in part 4.1.2 and sensor evaluation is summarized in part 4.1.3. The Pre-flight checklist is found in Appendix A3.

4.1.1. Power Consumption Eight servos are installed in the RPH 218 aircraft. Two of these are connected to the airbrakes and are not incorporated into the avionics system. The power consumption of the autopilot and the servos are 0.30 A and 1.2 A (average consumption). The endurance of the system is one hour with the current NiMH (1.5 Ah) batteries installed. This presents a problem during an extended and time consuming pre-flight setup and testing (if made on an airfield). A generator connected to the servo power supply would increase the endurance to the limit set by fuel consumption.

4.1.2. EMI and Vibration Test The Electro Magnetic Interference (EMI) tests are concentrated on radio transmission problems and sensor performance. The assembled UAV is placed on the airfield with engine and avionics turned on. No problems are detected when the engine is advanced from idle to full throttle. No control surface deflections are indicated and the system performed as expected during radio transmission tests.

4.1.3. Sensor Test The autopilot software reports one accelerometer error during startup. This is a frequent problem according to MicroPilot and it does not present a problem as long as the sensor values are correct.

21

4.2.

Flight Tests

Flight data is recorded by the autopilot when the ground speed, the GPS velocity, is greater than zero and continued until the buffer is full or the power to the autopilot is switched off. The log is cleared automatically during the startup sequence. 41 channels are sampled with the frequency 5 Hz when no Altitude above Ground Level sensor (AGL) is used. The data is stored on a non-volatile memory chip with the capacity 0.3 Mb. The log (.txt) is saved as an ascii file with the sampled values in rows and columns. Some of the data fields are presented in Table 4.1 and a complete list is found in [Reference 3].
Position 1 2 10 13 14 15 16 23 25 26 27 29 33 Field Pitch Roll GPS Speed Servo 1 Servo 2 Servo 3 Servo 4 Changed GPS Position E GPS Position N Speed Altitude GPS Altitude Unit radian*1024 radian*1024 ft/s fine servo fine servo fine servo fine servo Note Ground speed (GPS) Aileron command signal Elevator command signal Rudder command signal Throttle command signal

Binary
degrees east degrees north ft/s ft*(-8) M

RC signal etc.
Absolute position Absolute position Airspeed (dynamic pressure) Altitude (static pressure) Altitude (GPS)

Table 4.1. Data fields logged by the MP2000.

The units used in measurements are different from SI or Imperial units and presented in Table 4.2.
Type Heading Orientation Relative position Absolute position Distance Velocity Altitude Fine servo Coarse servo Unit degrees*100 radians*1024 ft*8 radians*5*10^8 ft*8 ft/s ft*8 Range 0 to 35999 +32767 to -32767 1000 to 5000 Comments Pitch, roll and yaw rate East and North are positive East and North are positive MP2000 internal unit Servo signal sent to servo routines

Table 4.2. Units used in the datalog. The flight test analysis is presented in part 4.2.1. and test flight 2002B is explained and discussed in detail in part 4.2.2. The results from a photo reconnaissance test with a digital camera is presented in part 4.2.3.

22

4.2.1. Analysis The flight log is evaluated in MATLAB and the program code can be found in Appendix A4. Position Field 25 and field 26 are containing the GPS coordinates from the datalog and this data is used in order to examine if the SUAV followed the preprogrammed flight path, to evaluate the turns (turn radius) and the test navigation settings (flight commands). Speed The airspeed is stored in field 27 and the groundspeed is stored in field 10. The airspeed is the velocity of the aircraft in relation to the surrounding air (measured with a dynamic pressure sensor) while the groundspeed is the speed of the aircraft with respect to the ground (measured with the GPS). The sensor readings from the pressure sensor and GPS are not the same in windy conditions or when the aircraft performs a climb or dive. The speed-readings are used in order to study aircraft performance (take off, climb, turn, landing and cruise speed) and control loop settings.
Altitude

The altitude measured by the Motorola MPX static pressure transducer is stored in field 29. The pressure sensor is calibrated and zeroed during the startup sequence of the MP2000 autopilot. The altitude of the runway (start position) is stored as ground level (altitude 0 m) and the altitude is measured as the pressure altitude above this level. The GPS altitude reading is saved in field 33 and it is the altitude above Mean Sea Level, (MSL). The accuracy of the GPS altitude calculation is dependent on the number of satellites the GPS receiver can lock on to and the position of the satellites. Status The status report, presented in Table 4.3, is recorded in field 23. All values are stored as decimal numbers but interpreted in the binary notation.
Code XX XX XX X0 XX XX XX X1 XX XX XX 0X XX XX XX 1X XX XX X0 XX XX XX X1 XX XX XX XX X0 XX XX XX X0 Comments Aircraft on ground Aircraft airborne RC switch in CIC mode RC switch in PIC mode Low battery level Normal battery level Transmitter out of range Transmitter in range

Table 4.3. Changed status field. X is 0 or 1. Control signals Stability and trim settings are evaluated and modified with the help of control signal readings. The signals recorded by the MP2000 autopilot are internal and is not the actual commands sent to the actuators. Attitude The accelerometers and gyros mounted on the MP2000 PCB are based on piezo-electric sensors. This type of sensors is not influenced by the magnetic field of the Earth but affected

23

by temperature (all sensors are temperature stabilized). Pitch and roll are measured by gyros while yaw is calculated from GPS data (heading).

4.2.2. Flight test 2002B Introduction Flight 2002B is analyzed in order to evaluate and improve the autopilot control. This test is presented because it was a failure due to the fact that the elevator was out of trim and the unpredicted oscillations. The solution is to reduce the proportional gain and to readjust the elevator.
Test setup

The test is made with the MP2000 autopilot installed in the SUAV aircraft. Approximately 0.2 l of fuel, about 0.5 h of flight, is in the tank and no payload is carried (clean). The sky is clear, temperature is 2 Celsius and the wind speed is 4-6 m/s.
Flight plan

The two main objectives were to perform the first transition between PIC (Pilot In Command) and CIC (Computer in Command) and to evaluate the servo signal noise. The airfield is sketched in Figure 4.1 and the flight plan is described in Table 4.4. The planned program for flight 2002B: A. Perform manual take off B. Climb to 100 m C. Turn 180 degrees D. Fly parallel to the runway E. Turn 90 degrees left F. Fly across the runway G. Turn 90 degrees left H. Fly parallel to the runway I. Turn 90 degrees J. Switch from PIC to CIC K. Switch from CIC to PIC L. Perform a landing
N

WIND 4-6 m/s

RUNWAY

FORREST

SUN

Table 4.4. Planned program flight 2002B.

Figure 4.1. Airfield.

Failures No in flight failure commands are programmed into the memory of the autopilot during this flight. Control failure and Fatal error are not recoverable and there is no possibility for either pilot or computer to save the SUAV aircraft from a crash. If any failure occurs, the pilot will take command and perform the emergency landing. No ultrasonic altimeter is installed and a pre-programmed emergency landing without the equipment needed combined with badly tuned control loops (flight 2002B is the first computer controlled flight) would not be successful. The NiMH batteries installed in the aircraft are recharged during the setup phase and the output voltage is checked during pre flight tests. The normal endurance of the SUAV is >1.0 h

24

1800 m

and if voltages drop below the low battery level during a 10-minute flight there has to be a failure in the electric system or a severe fault within the batteries A voltage drop resulting from normal power consumption will reduce the speed of the servo rotations and the pilot will feel/notice that the aircraft is slow to respond on commands. The main problem during preliminary flight tests is that the operator does not know how the airplane will perform in autonomous mode and it is complicated to distinguish between an in flight failure pattern and movements connected to stability or navigation.
Flight

No major problems appeared during flight 2002B and the aircraft returned safe to the ground. The control was swapped between Computer In Command (CIC) and Pilot In Command (PIC) without any problems and there were no indications of effects from servo signal noise. The aircraft was unstable in pitch because of bad tuning of the proportional gain in the Pitch from elevator feedback loop. The flight path of the SUAV aircraft is presented in Figure 4.2.

Flight Path - Flight 2002B

Switch PIC to CIC 250

200

Switch CIC to PIC

150 Altitude [m]

100

50

-50 59.318 59.316 59.314 59.312 GPS Position N [degrees] 17.104 17.106 17.108 17.11 17.112 17.114 17.116 17.118

GPS Position E [degrees]

Figure 4.2. Flight 2002B. The SUAV aircraft displayed a sinusoidal trajectory in pitch/altitude during the autonomous flight. The amplitude and frequency of the periodic movement where stable and no further stability problems in roll or yaw where indicated. The elevator was out of trim, this is indicated by negative elevator positions during the flight. It was never neutral or positive and the elevator was constantly adjusted by the autopilot during the 10 seconds of Computer In Command. The system was unstable in the longitudinal plane due to bad tuning of the Pitch from elevator feedback loop. The frequency of the oscillations indicated that the proportional gain should be reduced.

25

The computer control of the throttle was bypassed in advance to exclude the effects of speed on altitude and to minimize the risk of stall during high angle altitude corrections. The GPS position of the SUAV aircraft during flight 2002B is shown in Figure 4.3. The SUAV aircraft performs the Take off in the direction 315 (Northeast) and the landing in the direction 340 (North northeast). The altitude of the aircraft during the flight 2002B is plotted in Figure 4.4.
Position - Flight 2002B 59.317

59.316

GPS Position N [degrees]

59.315

59.314

59.313

WGS-84 59.312 17.104

17.106

17.108

17.11 17.112 GPS Position E [degrees]

17.114

17.116

17.118

Figure 4.3. GPS position.


Altitude - Flight 2002B 250

200

150

h [m]

100

50

-50

20

40

60

80

100 t [s]

120

140

160

180

200

Figure 4.4. Altitude.

26

The airspeed is displayed in Figure 4.5, the pitch angle is presented in Figure 4.6 and the elevator signal is shown in Figure 4.7. The fast oscillations in the pitch and elevator signals are related to the instability mentioned earlier. Additional plots are found in Appendix A5.
Airspeed - Flight 2002B 30

25

20

va [m/s]

15

10

20

40

60

80

100 t [s]

120

140

160

180

200

Figure 4.5. Airspeed.

Pitch - Flight 2002B 50

40

30

20

10

[degrees]

-10

-20

-30

-40

-50

20

40

60

80

100 t [s]

120

140

160

180

200

Figure 4.6. Pitch angle.

27

x 10

Elevator - Flight 2002B

2 MP2000 internal servo signal [-]

-1

-2

-3

-4

20

40

60

80

100 t [s]

120

140

160

180

200

Figure 4.7. Elevator signal.

28

5.

Payload

The SUAV is designed to carry different types of payload depending on the actual mission. It can carry cameras, magnetometers, Geiger Muller tubes (GM-tubes), scanners, air samplers or flight recorders.

5.1.

Avionics and Payload Interface

Payloads can be controlled by the MP2000 autopilot or auxiliary microcontrollers/computers discussed in [Reference 6]. The MP2000 can be programmed to send out PWM signals on free servo channels (8 in total) and trigger the payload mechanically with a servo or by serial communication using a signal converter (PWM to Serial/RS232). The flow charts of these three alternatives are displayed in Figure 5.1.

Figure 5.1. Payload control.

Payloads can be triggered by the MP2000 autopilot at certain altitudes or positions, Example1 and Example2. Example1:
metric [fServo6] = -5000 takeoff climb 600 waitclimb 100 flyto (300,0) flyto (500,500) fromto (1000,500),(2000,500) circuit thread waitgreaterthan [currentAltitude], 500 [fServo6] = 25000 wait 5 [fServo6] = -5000 wait 50 repeat // SI units // initialize payload with PWM signal, channel 6 // take off or switch from PIC to CIC // climb to mission altitude 600 m // waypoint 1 // fly in a straight line

// activate trigger loop at altitudes >500 m // trigger payload // trigger payload with PWM signal, channel 6 // wait 10 s

29

Example2:
metric [fServo6] = -5000 takeoff climb 300 waitclimb 100 flyto (400,400) flyto (800,400) startpattern 0,50 flyto (1200,400) starpattern 0,50 circuit definepattern 0 [fServo6] = 25000 wait 5 [fServo] = -5000 repeat // SI units // initialize payload with PWM signal, channel 6 // take off or switch from PIC to CIC // climb to mission altitude 600 m

// execute pattern 0 during 10 s

// pattern 0 // trigger payload with PWM signal, channel 6

5.2.

Aerial Photography

Some photos made from the SUAV (flown manually) are presented in Figure 5.2 and Figure 5.3. About half of the photos made during the photo tests were of bad quality due to slow shutter speed at low altitude, strong sunlight into the lens during turns and vibrations. The camera is placed in a pod, shielded from dirt and smoke from the engine.

Figure 5.2. Low resolution photo made from the SUAV.

30

Figure 5.3. Low resolution photo made from the SUAV.

31

6.

Improvements

There are several possible improvements that would increase safety and system performance. There are five problem areas: electric power capacity, fuel capacity, electromagnetic shielding, vibration shielding and flight safety (connectors and wiring). These issues are discussed in the following sections.

6.1.

Aircraft

A larger fuel tank combined with an electric generator would improve the range and endurance considerably. It is possible to remove the main servo battery and replace it with the generator without affecting the weight balance.

6.2.

Avionics

The connectors and shielding (vibration, shock and electromagnetic interference) of the autopilot should be improved in order to increase the safety and reliability of the system.

6.3.

Installation

Improved electromagnetic shielding of the autopilot, the wiring and the engine ignition electronics would increase the safety and reliability of the system.

6.4.

Settings

The control loop setup was not completed during this project and additional flight tests are required in order to obtain acceptable stability and navigation control.

32

7.

Conclusions

This project demonstrated the capabilities of SUAV concept. The SUAV system costs less than $100,000 including payloads (021213), it is easy to operate (although it requires a some training) and it can be configured to perform several missions such as photo reconnaissance/surveillance or meteorological surveys. The RPH 218 aircraft has adequate range, endurance and payload capacity for short-range missions and is capable of operating from short runways. The MP2000 autopilot is a low cost system capable of controlling a small aircraft. It uses pre-programmed flight code and GPS data to navigate and has the ability to trigger payloads by it self or through auxiliary payload computers. There are errors in the MP2000 GCS software (version 020701) concerning transmission of settings to the autopilot from the GCS. The hardware needs to be improved with an internal backup battery that prevents the MP2000 from erasing the ROM memory in case of a voltage drop during initialization. It should also be fitted with protection against inverted polarity. The capabilities to log sensor data of the MP2000 make it possible for the operator to evaluate test flights, adjust settings and detect problems. The drawback of the current design is that there is no possibility to monitor voltage levels to the MP2000 PCB and to the servo board PCB. The status parameter is recording low battery conditions, not the actual voltages. When all servos move simultaneously, sharp voltage drops occur during short periods of time and this can trigger the low battery warning. The probability for this to happen in the air is moderate but it presents a problem during the post installation check and pre flight check (depending on the test program). If voltage levels were recorded, the time to identify problems during ground or flight tests would be reduced and the possibility to discover battery problems (short or incomplete recharging) would be increased. Short-term development of the SUAV will be concentrated on control loop tuning combined with camera system (GPS triggered) installation. In the near future the SUAV will be capable of carrying cameras, magnetometers, scanners, air samplers and GM-tubes.

33

References
[1] [2] [3] [4] [5] [6] Janes Unmanned Aerial Vehicles and Targets 1995-96, Janes Information Group; ASIN: 0710612575. http://www.vectorsite.net/avuav8.html MP2000 Installation and Operation, MicroPilot, Jan 2002. Power supply system for UAV, R. Said and H. Chayeb, 2002, KTH. Flight Stability and Automatic Control, Robert C. Nelson, 1989, McGraw-Hill, Inc. Microcontroller Systems for a UAV, A. Skafidas, 2002, KTH, TRITA-FYS 2002:51 ISSN 0280-316 X.

34

Appendix
A1 A2 A3 A4 A5 Aerodynamics Flight Program Pre-flight Checklist Flight Evaluation in MATLAB Flight 2002B

35

A1

Aerodynamics

The MP2000 autopilot is programmed with default aircraft performance settings. Parameters such as climb speed and cruise speed can be adjusted to fit the actual aircraft. Several flight tests are needed to optimize the performance settings but preliminary values can be obtained by analytical methods. Aircraft lift and drag data are estimated in sections A1.1. A1.3.

A1.1. CFD TORNADO


TORNADO is a vortex lattice program with flexible wake. The input model is displayed in Figure A.1. The body is not simulated in order to simplify the geometry. The wing profiles are approximated to plates and the body is not modeled.

Figure A.1. Simplified input geometry.

Lift coefficient CL , drag coefficient CD, force coefficient CY and moments Cm, Cn and Cl are calculated for angles of attack between 0 and 10 at the airspeed 20 m/s. The results are shown in Figure A.2.

36

Figure A.2. Simulation results.

A1.2. Lift
Lift computations are based on a method presented in [Introduction to Aeronautics: A Design Perspective, Brandt, Stiles, Bertin and Whitford, 1997, AIAA.]. The lift coefficient CL is defined in Equation A.1. It can also be computed with Equation A.2. L is the lift force, q is the free stream dynamic pressure, S is the reference area and is the angle of attack. CL is the lift curve slope. CL = L q S (A.1)

CL = CL

(A.2)

The main wing of the RPH 218 aircraft is optimized to have almost elliptical lift distribution (high performance wing) and is based on the HQ3.0/14 airfoil. The airfoil geometry and data calculated in XFOIL is displayed in Figure A.3. The lift curve slope of the HQ3.0/14 airfoil cL is approximated to 0.12.

37

Figure A.3. HQ3.0/14 airfoil. Lift data at 20 m/s. The elevator is based on the NACA 64A010 airfoil with the lift curve slope of the tail ctL estimated to 0.09 according to [http://www.aae.uiuc.edu/m-selig/ads.html].If the wing is assumed to be elliptical, the wing lift curve slope CwL is presented in Equation A.3. The aspect ratio AR of the wing is 21. C Lw = cL 57.3cL 1+ AR

(A.3)

CtL is expressed in Equation A.4. e is the wing efficiency factor and it is assumed to be 0.7 (between 0.5 and 1.0 for most common wing shapes). The aspect ratio of the tail ARt is 5.3.
t C L =

c t L 57.3c t L 1+ t eAR

(A.4)

The downwash effect on the tail is formulated in Equation A.5. cavg is the average chord of the wing, lh is the distance from the quarter-chord point of the average chord of the main wing to the quarter chord on the horizontal surface and zh is the vertical distance of the horizontal surface above the plane of the main wing. 21C w L cavg 10 3 zh = 1 b AR 0.725 lh 7

(A.5)

38

The lift of the fuselage is modeled to be zero and the total lift of the aircraft is calculated by Equation A.6. S is the reference area of the wing and St is the reference area of the horizontal tail. St w CL = CL + CL t 1 S (A.6)

The MATLAB code for lift calculations is presented in the end of this chapter. Aircraft lift at angles of attack between 0 and 10 is shown in Figure A.3. A comparison between the results from the analytical solution and the simulated model is displayed in Figure A.4.

Figure A.3. The lift coefficient CL as function of angle .

Figure A.4. Comparison between the analytical solution and results from TORNADO.

39

A1.3. Drag
The total drag of an airplane is the sum of the friction drag, induced drag, form drag, wave drag and interference drag. The form and wave drag components are ignored if the speed of the aircraft is below Mach 0.6. The SUAV is designed for low speeds and the effect of these components are assumed to be zero in the analytical calculations. The drag coefficient, CD is calculated by Equation A.7. D represents the drag acting on the aircraft. CD = D q S

(A.7)

The friction drag or skin friction drag can be calculated by using simple Plate theory and more advanced methods such as CFD calculations. The drag coefficient of aircraft can be calculated by skin friction theory for thin plates and it is assumed that all the parts of the aircraft can be projected to thin plates on the xy-plane and that the thickness, t of these plates is zero. By doing this transformation from 3D to 2D the problem is simplified and the drag of each individual plate is calculated by using boundary layer theory. The friction drag of the SUAV is calculated by using Equation A.8. The friction coefficients CF,Body, CF,,Wing, CF,Stab and CF,Fin is the local friction coefficients of the body, wing, horizontal tail and fin.The S with index Body, Wing, Stab and Fin represents the reference areas of these components. CF and S represents the friction drag coefficient and the total reference area.
CF = C F , Body S Body + C F ,Wing SWing + C F , Stab S Stab + C F , Fin S Fin S

(A.8)

The local Reynolds number, Equation A.3 indicates which of the two Equations A.9 and A.10 is best suited for calculating the friction coefficient of each part. Equation 4.4 is used when the airflow is laminar and the Reynolds number is in the interval 5105 107 and Equation A.11 is used when the flow is turbulent and the Reynolds number is larger than 107 but less than 109. Re is the Reynolds number, is the density of the surrounding air, v is the airspeed of the aircraft, l represents the reference length and is the viscosity of the air. Re = vl

(A.9)

CF =

0.455 (log10 Re) 2.58


1 5

(A.10) (A.11)

C F = 0.074 (Re)

The program FRICTION calculates the skin friction and form drag of each aircraft component using improved plate theory formulas that include compressibility effects. The results based on the wing area as reference area SREF are shown in Table A.1.

40

Friction drag coefficient, FRICTION Laminar flow Turbulent flow CF,Lam = 0.0074 CF,Turb = 0.0165

Table A.1. Friction drag coefficients.

The induced drag is a function of the lift coefficient CL, the aspect ratio AR and the Oswald efficiency factor e. It is expressed in Equation A.12 and the results are presented in Figure A.5. The wings of the SUAV are high aspect ratio wings, AR = 21 and the lift distribution is almost elliptical. The Oswald efficiency factor (total aircraft lift distribution) is approximated to 0.75 (RJ-5 glider: e = 0.79, Cessna 170: e = 0.74). A comparison between results from the analytical equations and TORNADO is shown in Figure A.6. CDi =
2 CL eAR

(A.12)

Figure A.5. Induced drag calculated with Equation 4.6.

41

Figure A.6. Comparison between the analytical solution and results from TORNADO.

The drag CD,extra from landing gear, antennas, engine, propellers and interference is assumed to be 0.06 and the total drag is displayed (analytical induced drag results are used) in Figure A.7.

Figure A.7. Total drag coefficient.

42

clc;clf; %---- PARAMETERS ----% v = 20; Re_wing = 2.75E+5; Re_stab = 1.74E+5; b = 4.2; cref = 0.2; Sref = 0.84; S = Sref*cos(3*pi/180); St = 0.0864; lh = 1.20; lambda = 0.313; zh = 0.20; rho = 1.225; m = 8.0; g = 9.82; AR = 21; ARt = 5.3; et = 0.8;

%[m/s] airspeed %[-] %[-] %[m] %[m] %[m2] %[m2] 3 degree dihedral %[m2] %[m] %[-] %[m] %[kg/m3] SSL %[kg] weight, no payload %[m/s2] %[-] %[-] %[-]

%---- LIFT ----% % Wing progile HQ3.0/14 % XFOIL alphaHQ3014 = 0:1:10; %[degrees] clHQ3014 = [0.4534 0.5744 0.6953 0.8160 0.9365 1.0568 1.1768 1.2965 1.4158 1.5348 1.6534]; %[-] cmHQ3014 = -[0.097 0.098 0.100 0.102 0.104 0.106 0.108 0.110 0.120 0.140 0.160]; %[-] figure(1) plot(alphaHQ3014,clHQ3014) title('c_l_\alpha HQ3.0/14') xlabel('\alpha [degrees]') ylabel('c_l [-]') % alpha 0-10 a cl_hq3014 cm_hq3014

= 0:1:10; = clHQ3014(1:11); = cmHQ3014(1:11);

% Polynomial curve fit, degree 1 [p_cl] = polyfit(a,cl_hq3014,1); f_cl = p_cl(1).*a+p_cl(2); figure(2) plot(a,f_cl,'r-o',a,cl_hq3014,'b-d') title('c_l_\alpha HQ3.0/14') xlabel('\alpha [degrees]') ylabel('c_l [-]') legend('polyfit','XFOIL',1) % Cla profile cla_profile

= p_cl(1)

% CLa wing [elliptical lift distribution approx] % "Introduction to Aeronautics: A Design Perspective" % Brandt, Stiles, Bertin, Whitford % p99 CLa = cla_profile./(1+(57.3.*cla_profile/(pi*AR))) % Rate of change of downwash angle [empirical approx] % "Introduction to Aeronautics: A Design Perspective" % Brandt, Stiles, Bertin, Whitford % p111 k1 = 1-(zh/b); k2 = (10-3*lambda)/7; k3 = cref/lh; k4 = 21*CLa/(AR^0.725); deda = k1*k2*k3*k4

43

% Stabilizator profile NACA64A010 % http://www.aae.uiuc.edu/m-selig/pub/lsat/vol1/N64A.LFT clat = 0.09; %[-] NACA64A010 Re=1.8E+5 CLat = clat./(1+(57.3.*clat/(pi*ARt*et))) % CLa tail deltaCLat % Aircraft lift C_L_a % Lift CL

= CLat*(1-deda)*(St/S)

= CLa + deltaCLat

= C_L_a.*a

% TORNADO load 021126-Cx_alpha.mat CLT = CL_f_a; CDT = CD_f_a; figure(4) plot(a,CL,'r',a,CLT,'b') L % Weight W = 0.5*rho*v^2*S*CLT

= m*g

%---- Induced drag ----% e_ac = 0.75; CDi = CL.^2/(pi*e_ac*AR); plot(a,CDi,'r',a,CDT,'b') %---- Total drag ----% CD0 = CDi = CDextra = CDtot = plot(a,CDtot)

0.0165; % Turbulent flow assumed CDi; 0.006; CD0+CDi+CDextra;

44

A2

Flight Program

45

A3

Pre-flight Checklist

MP2000 Hyperterminal Date Engineer1 Engineer2 Instructor1 Instructor2 Connections Servo board GPS AGL Reciever Time : :

Step A A1

Task Hyperterminal Start Hyperterminal

Engineer1

Engineer2

A2

Check Hyperterminal settings COM1 9600 baud 8 bits N 1 Hardware flow control

A3

Check Format VTJ100 format 132 columns

46

B B1 C C1

COM connection Connect COM cable MP2000 - PC Power supply Turn power supply on No connection to MP2000 DC 6.0V 12.0V

C2

Check polarity and voltage with DMM Voltage Polarity DC 6.0V 12.0V

C3

Check power supply No limit on current

D D1

Startup Connect MP2000 to power supply

D2

Connect servo board to power supply

D3

Wait on sensor zero

E E1

Sensor zero report Sensor zero x0 y0 ct0 spd0 alt0

47

pd0 rd0 F F1 Error report Error messages: Y / N Fatal errors

G G1

Sensor report GPS locked

G2

Voltage MP2000 voltage Servo voltage

G3

Press s-key 4 times

G4

Sensor display hdg pitch roll yaw xd yd spd alt(p) uxd alt(agl) el ail rdr th rollc pitchc

G5

Pitch UAV nose 90 deg up xd pitch

G6

Roll UAV right wing 90 deg down yd roll

G7

Yaw UAV nose 90 deg right yaw

48

G8

Airspeed sensor working

G9 H H1

Altitude sensor working Stability system check Pitch UAV down

H2

Elevator motion

H3

Roll UAV right

H4

Aileron motion

H5

Yaw UAV right

H6

Rudder motion

I I1

Quit Hyperterminal Quit Hyperterminal

J J1

Shutdown Disconnect MP2000 from power supply

49

A4. Flight Evaluation in MATLAB


% Project: % Date: % Programmer: SUAV 021102 Johan Puscov

% - SETUP --------------------------------------------------------------clc fileNAME = input('Enter .mat file to load: ','s'); load('fileNAME'); dataNAME = input('Enter name of data variable: ');

%- UNIT ftM radDEG degRAD

CONVERSION ----------------------------------------------------= 0.3048; = 180/pi; = pi/180;

% % t %

- MAIN ---------------------------------------------------------------Time = length(dataNAME); t = 1:t; t = t/5; s

% GPS data gpsPOS_E = dataNAME(:,25); % degrees east wsg84 gpsPOS_N = dataNAME(:,26); % degrees north wgs84 gpsSPEED = dataNAME(:,10)*ftM; % m/s gpsALT = dataNAME(:,33); % m % Pressure sensor data pSPEED = dataNAME(:,27)*ftM; % m/s pALT = -dataNAME(:,29)*ftM/8; % m % Gyro data gyroPITCH = dataNAME(:,1); % degrees gyroROLL = dataNAME(:,2); % degrees % MP2000 status stateMP = dataNAME(:,23); % decimal binary info % 221 11011101 cic % 223 11011111 pic % 157 10011101 loss of RC signal % Servo signal servoAI = dataNAME(:,13); % servoEL = dataNAME(:,14); % servoRU = dataNAME(:,15); % servoTH = dataNAME(:,16); %

50

A5

Flight 2002B

Roll - Flight 2002B 60

40

20

[degrees]

-20

-40

-60

20

40

60

80

100 t [s]

120

140

160

180

200

1.5

x 10

Aileron - Flight 2002B

0.5

MP2000 internal servo signal [-]

-0.5

-1

-1.5

-2

-2.5

-3

20

40

60

80

100 t [s]

120

140

160

180

200

51

Vous aimerez peut-être aussi