13.07.2015 Views

Modelling and Autonomous Flight Simulation of a Small Unmanned ...

Modelling and Autonomous Flight Simulation of a Small Unmanned ...

Modelling and Autonomous Flight Simulation of a Small Unmanned ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

AbstractThis project describes the use <strong>of</strong> <strong>Flight</strong>Gear, an open-source flight simulator, <strong>and</strong>JSBSim, an open-source flight dynamics model, to model <strong>and</strong> simulate a smallautonomous <strong>Unmanned</strong> Aerial Vehicle (UAV).A small commercial electric engine Cessna-182 radio controlled (RC) aircraft waschosen to represent the UAV. The first step was to create the required JSBSim aircraftconfiguration files by using the Aeromatic v0.8, a free web application to createaircraft configuration files for use with the JSBSim. The next step was to makeeducated guesses to refine important sections in the created configuration files with theassistance <strong>of</strong> available data <strong>of</strong> similar UAV.In order to perform a visual simulation, a 3D model for the Cessna-182 (RC) wascreated using AC3D, a commercial 3D modelling s<strong>of</strong>tware tool.To fly the modelled UAV autonomously a tuning process was made for the built-ingeneric PID (proportional, integral, <strong>and</strong> derivative) autopilot <strong>of</strong> <strong>Flight</strong>Gear, which hasthe ability to hold aircraft velocity, vertical aircraft speed, altitude, pitch angle, angle<strong>of</strong> attack, bank angle, <strong>and</strong> true heading.Finally, a flight path, which contains a number <strong>of</strong> waypoints chosen over a selectedarea using Google Earth map, was constructed. In order to use the chosen waypointswith <strong>Flight</strong>Gear navigation system, a unique ID was assigned to each waypoint, <strong>and</strong>the <strong>Flight</strong>Gear database was altered to include the new waypoints with their IDs.The outcome <strong>of</strong> the project was a complete JSBSim flight dynamic model for theCessna-182 (RC), with 3D model for visual simulation <strong>and</strong> an effective autopilot. Agood autonomous flight simulation was performed.This project concluded that modelling <strong>and</strong> simulating a UAV accurately is not an easytask, due to the need to calculate many parameters either by physical measurements,experiments, or estimation from available data <strong>of</strong> similar UAV, or by s<strong>of</strong>tware tools.iii


AcknowledgmentsThis project is dedicated to my family for their unconditional support <strong>and</strong> sacrifice,which has enabled me to reach the position where I am. Special thanks to mysupervisor Dr Gorden Manson, who helped me in every possible way. Lastly, I wouldlike to thank my friends <strong>and</strong> well-wishers, who encouraged me <strong>and</strong> supported me inany way during this development time.iv


ContentsMODELLING AND AUTONOMOUS FLIGHT SIMULATION OF A SMALL UNMANNEDAERIAL VEHICLE..........................................................................................................................1SIGNED DECLARATION...............................................................................................................IIABSTRACT.....................................................................................................................................IIIACKNOWLEDGMENTS................................................................................................................IVCONTENTS......................................................................................................................................VLIST OF FIGURES........................................................................................................................VIICHAPTER 1 : INTRODUCTION.....................................................................................................11.1 AIMS OF THE PROJECT.................................................................................................................11.2 PROJECT DELIVERABLES.............................................................................................................11.3 STRUCTURE OF THE PROJECT ......................................................................................................2CHAPTER 2 : UAV SYSTEM TECHNOLOGY..............................................................................32.1 PAYLOADS.................................................................................................................................32.1.1 Sensors..............................................................................................................................32.1.2 Non Sensor Payloads.........................................................................................................32.1.3 Payload Stabilization.........................................................................................................32.2 DATA LINK ................................................................................................................................32.2.1 Functions...........................................................................................................................42.2.2 Data Link Implementation..................................................................................................42.2.3 Data Compression..............................................................................................................42.3 FLIGHT PATH MANAGEMENT ......................................................................................................42.3.1 Navigation.........................................................................................................................42.3.2 UAV Control System..........................................................................................................52.3.3 Guidance...........................................................................................................................52.4 POWER PLANT............................................................................................................................62.4.1 Propeller Efficiency...........................................................................................................62.4.2 Internal Combustion Engines.............................................................................................62.4.3 Electric Propulsion............................................................................................................62.5 CONFIGURATION ........................................................................................................................62.5.1 Fixed Wings.......................................................................................................................62.5.2 Rotary Wings.....................................................................................................................72.5.3 Lighter than Air.................................................................................................................72.6 STRUCTURE................................................................................................................................72.6.1 Fixed Wings.......................................................................................................................72.6.2 Rotary Wings.....................................................................................................................72.6.3 Materials...........................................................................................................................72.7 LAUNCH AND RECOVERY............................................................................................................72.7.1 Launch...............................................................................................................................72.7.2 Recovery............................................................................................................................7CHAPTER 3 : BASIC AERONAUTICAL CONCEPTS AND DEFINITIONS...............................93.1 WING GEOMETRY .......................................................................................................................93.1.1 Wing Span..........................................................................................................................93.1.2 Chords...............................................................................................................................93.1.3 Wing Area..........................................................................................................................93.1.4 Mean Chords...................................................................................................................103.1.5 Aspect Ratio.....................................................................................................................103.1.6 Sweep Back......................................................................................................................103.1.7 Dihedral Angle.................................................................................................................103.1.8 Airfoil..............................................................................................................................113.1.9 Angle <strong>of</strong> Attack.................................................................................................................123.2 THE AIRCRAFT AERODYNAMICS ...............................................................................................123.2.1 Lift...................................................................................................................................12v


3.2.2 Drag................................................................................................................................133.2.2 Side Force........................................................................................................................143.2.3 Pitch Moment...................................................................................................................153.2.4 Yaw Moment....................................................................................................................153.2.5 Roll Moment....................................................................................................................163.3 THE AIRCRAFT MAIN COMPONENTS..........................................................................................16CHAPTER 4 : A REVIEW OF FLIGHT SIMULATORS.............................................................184.1 AEROSIM BLOCKSET................................................................................................................184.2 JSBSIM FLIGHT DYNAMIC MODEL VERSION 2.0........................................................................184.3 FLIGHTGEAR FLIGHT SIMULATOR VERSION 0.9.10.....................................................................194.4 MICROSOFT FLIGHT SIMULATOR 2004......................................................................................194.5 THE CHOSEN FLIGHT SIMULATORS ...........................................................................................204.5.1 <strong>Flight</strong> Dynamic Model......................................................................................................204.5.2 <strong>Flight</strong> Simulator...............................................................................................................20CHAPTER 5 : DESCRIPTION AND CONSTRUCTION OF THE REQUIRED FILES TOMODEL THE UAV AND PERFORM THE SIMULATION.........................................................215.1 FLIGHTGEAR FLIGHT SIMULATOR REQUIRED FILES ...................................................................215.1.1 UAV Main Folder............................................................................................................215.1.2 Engines Folder.................................................................................................................225.1.3 Systems Folder.................................................................................................................235.1.4 Models Folder..................................................................................................................235.2 JSBSIM FLIGHT DYNAMIC MODEL REQUIRED FILES..................................................................245.2.1 MAIN AIRCRAFT CONFIGURATION FILE ...................................................................................245.1.2 ENGINE CONFIGURATION FILE ...............................................................................................335.1.3 Propeller Configuration File............................................................................................345.1.4 Electrical system Configuration File.................................................................................355.1.5 3D Graphical model Configuration File...........................................................................365.1.6 Top level Configuration File.............................................................................................38CHAPTER 6 : FLIGHTGEAR AUTOPILOT AND FLIGHT PATH...........................................416.1 PID CONTROLLER.....................................................................................................................416.1.1 PROPORTIONAL .....................................................................................................................416.1.2 INTEGRAL .............................................................................................................................416.1.3 DERIVATIVE..........................................................................................................................426.1.4 COMBINING P + I + D.............................................................................................................426.2 FLIGHTGEAR AUTOPILOT..........................................................................................................426.3 CONSTRUCTING THE UAV FLIGHT PATH (ROUTE).....................................................................506.7.1 Calculating the Cessna 182 RC route...............................................................................506.7.2 Deploying the Calculated Waypoints with <strong>Flight</strong>Gear Database.......................................51CHAPTER 7 : RUNNING AND TESTING THE SIMULATION.................................................527.1 STARTING FLIGHTGEAR FLIGHT SIMULATOR.............................................................................527.2 SELECTING THE CESSNA 182 RC...............................................................................................527.3 SELECTING THE TAKE OFF LOCATION........................................................................................537.4 SETTING THE SIMULATION PARAMETERS...................................................................................547.4.1 Setting the <strong>Flight</strong> Dynamic Model....................................................................................547.4.2 Setting Latitude <strong>and</strong> Longitude Coordinates <strong>of</strong> the Take <strong>of</strong>f Point.....................................557.5 RUNNING THE SIMULATION ......................................................................................................567.5.1 Settings for the Autopilot..................................................................................................567.5.2 Specifying the Waypoints..................................................................................................577.6 TESTING THE SIMULATION........................................................................................................57CHAPTER 8 : CONCLUSION AND FUTURE WORK................................................................59REFERENCES................................................................................................................................61vi


List <strong>of</strong> FiguresFigure 1.1: Cessna 182 RC..........................................................................................1Figure 3.1:Wing geometry...........................................................................................9Figure 3.2: Dihedral angle.........................................................................................11Figure 3.3: Airfoil <strong>and</strong> Angle <strong>of</strong> attack......................................................................11Figure 3.4: The forces <strong>and</strong> moments acting on an aircraft..........................................12Figure 3.5 Traditional Aircraft Components..............................................................17Figure 5.1: Main UAV folder contents.......................................................................22Figure 5.2: Engines folder contents............................................................................22Figure 5.3: Systems folder contents...........................................................................23Figure 5.4: Models folder contents............................................................................23Figure 5.5: Sections <strong>of</strong> the main aircraft’s configuration file......................................24Figure 5.6: Metrics section <strong>of</strong> the main aircraft’s configuration file...........................25Figure 5.7: Mass balance section <strong>of</strong> the main aircraft’s configuration file..................25Figure 5.8: Ground reactions section <strong>of</strong> the main aircraft’s configuration file............26Figure 5.9: Propulsion section <strong>of</strong> the main aircraft’s configuration file......................27Figure 5.10: Generating the JSBSim main configuration file using Aeromatic...........28Figure 5.11: JSBSim version 1.65 configuration file format.......................................29Figure 5.12: <strong>Flight</strong> control section <strong>of</strong> the main aircraft’s configuration file................30Figure 5.13: Aerodynamics section <strong>of</strong> the main aircraft’s configuration file (a).........31Figure 5.14: Aerodynamics section <strong>of</strong> the main aircraft’s configuration file (b).........32Figure 5.15: Aerodynamics section <strong>of</strong> the main aircraft’s configuration file (c).........33Figure 5.16: Electric engine specification file............................................................33Figure 5.17: Propeller configuration file....................................................................34Figure 5.18: Generating propeller configuration file using Aeromatic v 8.0...............35Figure 5.19: Electrical system configuration file........................................................36Figure 5.20: 3D graphical model configuration file....................................................37Figure 5.21: 3D graphical model <strong>of</strong> Cessna 182 RC...................................................38Figure 5.22: Set configuration file.............................................................................39Figure 6.1: Autopilot configuration file (a)................................................................43Figure 6.2: Autopilot configuration file (b)................................................................44Figure 6.3: Autopilot configuration file (c)................................................................45Figure 6.4: Autopilot configuration file (d)................................................................46Figure 6.5: Autopilot configuration file (e)................................................................47Figure 6.6: Autopilot configuration file (f).................................................................48Figure 6.7: Autopilot configuration file (g)................................................................49Figure 6.8: Cessna 182 RC flight path.......................................................................51Figure 6.9: Modifying the <strong>Flight</strong>Gear fix database.....................................................51Figure 7.1: <strong>Flight</strong>Gear desktop short cut....................................................................52Figure 7.2: Selecting Cessna 182 RC in <strong>Flight</strong>Gear wizard........................................53Figure 7.3: Selecting a take <strong>of</strong>f location in <strong>Flight</strong>Gear wizard....................................53Figure 7.4: Main settings window in <strong>Flight</strong>Gear wizard.............................................54Figure 7.5: Setting <strong>Flight</strong> Dynamic Model in <strong>Flight</strong>Gear wizard................................55Figure 7.6: Settings <strong>of</strong> the Cessna 182 RC initial position in <strong>Flight</strong>Gear wizard.........55Figure 7.7: Cessna 182 RC before take <strong>of</strong>f.................................................................56Figure 7.8: Autopilot settings window.......................................................................56Figure 7.9: Add waypoints window..........................................................................57Figure 7.10: Cessna 182 RC in hold altitude flight....................................................57Figure 7.11: Side view for Cessna 182 RC altitude hold flight...................................58Figure 7.12: Cessna 182 RC in True heading flight....................................................58vii


Chapter 1: IntroductionChapter 1 : Introduction<strong>Small</strong> <strong>Unmanned</strong> Aerial Vehicles (UAVs) are increasingly used by researchers,hobbyists, civilian organizations, <strong>and</strong> the military for different purposes, due to thelack <strong>of</strong> risk to a pilot <strong>and</strong> their low cost. In some cases, these UAVs are flownautonomously by on-board autopilots, with highly integrated systems <strong>and</strong> complexcontrol laws. The use <strong>of</strong> simulation environments to test the UAVs design <strong>and</strong> controlsystems is an important phase in their development cycle, since it reduces the time <strong>and</strong>the risks associated with the real flight (Sorton <strong>and</strong> Hammaker , 2005).The new iUAV (intelligent <strong>Unmanned</strong> Aerial Vehicle) research group in the faculty <strong>of</strong>Engineering in Sheffield University has started to investigate how to simulate swarms<strong>of</strong> UAVs, <strong>and</strong> it is also interested in high-level UAV intelligence such as monitoring aground target or recognizing certain targets. Therefore, a sample UAV model <strong>and</strong>simulation is required. This project is also useful for the students <strong>of</strong> Aerospace <strong>and</strong>Control engineering degrees, who use simulators as a design tool.1.1 Aims <strong>of</strong> the projectThe aims <strong>of</strong> this project are to investigate how to create a <strong>Flight</strong> Dynamic Model fora given small UAV, <strong>and</strong> how to visualise that model in a <strong>Flight</strong> Simulator with theability to perform autonomous flight simulation. The approach followed in this projectshould be clear <strong>and</strong> relatively easy in order to allow the students <strong>and</strong> researchers t<strong>of</strong>ollow it in their research.1.2 Project DeliverablesA commercial small Cessna 182 radio controlled aircraft shown in Figure 1.1 wasconsidered to be the starting point <strong>of</strong> the project.Figure 1.1: Cessna 182 RCTo achieve the aims <strong>of</strong> the project the following related items to Cessna 182 RC mustbe delivered:• A complete <strong>Flight</strong> Dynamic Model• A 3D graphical model• An effective autopilot• A way to identify flight route• <strong>Autonomous</strong> flight simulation1


Chapter 1: Introduction1.3 Structure <strong>of</strong> the ProjectThis project outlines the approaches taken to model <strong>and</strong> simulate a small UAV. Theproject starts with a summary <strong>of</strong> the available UAV system technology in Chapter 2 .Then it introduces the basic aeronautical concepts <strong>and</strong> definitions required to beunderstood in order to deal with the flight dynamic model in Chapter 3. Chapter 4reviews the possible flight dynamic models <strong>and</strong> flight simulators related to the project,<strong>and</strong> justifies the chosen simulators. Chapter 5 describes the files required for thechosen simulators to model <strong>and</strong> simulate the Cessna 182 RC <strong>and</strong> explains the tools <strong>and</strong>techniques used to construct those files. Chapter 6 gives an overview <strong>of</strong> the PIDcontroller used in the <strong>Flight</strong>Gear Simulator <strong>and</strong> describes the autopilot configurationfile, it also explains how the autopilot file for Cessna 182 RC was constructed, <strong>and</strong>finally, it explains how the flight route can be calculated. Running <strong>and</strong> testing <strong>of</strong> themodelled Cessna 182 RC are described in Chapter 7. Finally, Chapter 8 concludes theproject by evaluating the work carried out.2


Chapter 2: UAV System TechnologyChapter 2 : UAV System TechnologyThe UAV system depends on its mission <strong>and</strong> range, however, most UAV systemsinclude: airframe <strong>and</strong> propulsion systems for the UAV, control systems <strong>and</strong> sensors t<strong>of</strong>ly the UAV, sensors to collect information, launch <strong>and</strong> recovery systems, data linksto get collected information from the UAV <strong>and</strong> send comm<strong>and</strong>s to it, <strong>and</strong> a groundcontrol station.The purpose <strong>of</strong> this chapter is to give the reader (who has no knowledge in this field)enough information about the UAV system technology. The information in this chapterwas taken from (Cameron, 1995).2.1 PayloadsThe payload represents the most vital part <strong>of</strong> the UAV system. The objective <strong>of</strong> therest <strong>of</strong> the system is to deliver the payload to its targeted position <strong>and</strong> collect,manipulate, <strong>and</strong> spread the gathered information by the payload. The payloadmass/size, along with mission requirements, operator requirements, <strong>and</strong> operationalrequirements are used to determine the UAV specification. Generally, the total mass <strong>of</strong>the UAV is around four times the total mass <strong>of</strong> the payload according to anexamination <strong>of</strong> the manufacture’s data on UAVs. Large UAVs need large systems,which increases the cost <strong>and</strong> complexity. Consequently, a balance between therequirements <strong>of</strong> the payload performance <strong>and</strong> its mass must be considered.2.1.1 SensorsCommonly electro-optical sensors, which include daylight video <strong>and</strong>/or forwardlooking infrared, are used with the UAV to return a real video image to the groundcontrol station. Other sensors may be used to collect different types <strong>of</strong> data, forinstance, radar, nuclear, biological <strong>and</strong> chemical. The chosen sensors depend on themission requirements, the UAV carrying capacity, <strong>and</strong> costs.2.1.2 Non Sensor PayloadsUAV can transport equipment such as radio relays, which are used to broadencommunication ranges between the UAVs <strong>and</strong> the ground control station, <strong>and</strong>jammers, which are used to interfere with the enemy’s communication <strong>and</strong> othersystems.2.1.3 Payload StabilizationThe UAV motion <strong>and</strong> vibrations have negative effects on the outcome <strong>of</strong> the Electroopticalsensors; therefore, stabilisation is required to reduce these effects, <strong>and</strong> providesthe ability to steer the sensor around two axes, which means a complex mechanicalstabilisation system. However, this system increases the overall UAV weight.Alternatively, image processing <strong>and</strong> optical stabilisation may be used to reduce themass by comparison with the mechanical stabilisation system.2.2 Data LinkThe communications between the UAV <strong>and</strong> the ground control station are provided bythe data link. In most cases the data link represents the foundation <strong>of</strong> the UAV’snavigation system.3


Chapter 2: UAV System Technology2.2.1 FunctionsThe main functions <strong>of</strong> the data link are: transmitting the control signals to control theUAV <strong>and</strong> its payload from the ground station, sending the data gathered by thepayload <strong>and</strong> the UAV condition parameters back to the ground control station. In thecase <strong>of</strong> the autonomous UAV the data link may be shut down temporarily.2.2.2 Data Link ImplementationThere are many implementation methods for the data link methods such as highfrequency (HF) radio, very high frequency (VHF) b<strong>and</strong>, ultra high frequency (UHF)b<strong>and</strong>, optical fibre, <strong>and</strong> satellite.2.2.3 Data CompressionThe use <strong>of</strong> data compression reduces the b<strong>and</strong>width used for transmission, <strong>and</strong>increases the stored data in a given storage capacity. The data compression is speciallyused with electro-optical sensors, which require high b<strong>and</strong>width. However, in somecases such as target detection mission, the quality <strong>of</strong> images after decompression is animportant factor, thus, special compression techniques are needed.2.3 <strong>Flight</strong> Path ManagementThe UAV’s position <strong>and</strong> the sensor pointing angles must be known by the UAVground operator in order to direct the UAV <strong>and</strong> the sensors in the required direction. Insome sophisticated systems, it may be done automatically.2.3.1 NavigationThe long range UAV requires a navigation system to determine its position. Therequired accuracy is mission dependent, which plays a major factor in deciding whichsystem to implement. The following systems are used:• Sensor Information: The operator can use the video image <strong>of</strong> a well known areareturned by the electro-optical sensor to determine the UAV position. However,this may not be practical in most cases due to the partial field view <strong>and</strong>abnormal viewing angles. Radar payload may be used in determining theUAV’s position; however, it can not be used as a st<strong>and</strong>-alone navigationsystem.• Dead Reckoning: The UAV’s position is determined by using its air speed <strong>and</strong>direction in combination with the information <strong>of</strong> the electro-optical sensor,which is reliable over a limited area. However, it can not be used as a generalarea navigation system.• Data Link: The UAV’s range <strong>and</strong> bearing from the ground station can beobtained using the data link. This navigation system is commonly used in smallUAVs. However, loss <strong>of</strong> data link denies the UAV the navigation information,<strong>and</strong> therefore, a fall back system is required.• Satellite Navigation System: The Global Positioning System (GPS) based ona group <strong>of</strong> American satellites can be used to determine position <strong>and</strong> timeinformation. Simple light GPS sensors can be used in small UAVs, allowingthe operator to track the UAV in the ground control station.• Inertial: Inertial navigation systems do not need to send out or receive signals.The main disadvantages <strong>of</strong> these systems are: they are expensive, consumelarge power, heavy, <strong>and</strong> the position errors increase with time.4


Chapter 2: UAV System Technology• Terrain Matching: Terrain matching uses a radio altimeter together with abarometric altimeter to compare the ground shape being crossed with a shapeobtained from a digital map <strong>of</strong> the area. The combination <strong>of</strong> the providedinformation with a primary navigation system produces an accurate low driftnavigation system. However, this system is expensive <strong>and</strong> heavy for a smallUAV.• Scene Matching: The accuracy <strong>of</strong> a primary navigation system can beimproved by the matching <strong>of</strong> a picture obtained by the primary sensor with aknown view. However, this is practical only for limited views, <strong>and</strong> requiresformer knowledge <strong>of</strong> scenes.• Radio Location: The UAV’s position can be determined from observation <strong>of</strong> anumber <strong>of</strong> known radio transmitters, for instance commercial radio stations.However, this requires the stations to be working during the UAV’s flight.2.3.2 UAV Control SystemThe UAV control system stabilises the UAV <strong>and</strong> controls its speed, altitude, <strong>and</strong>direction. In most UAVs this can be done automatically (using Autopilot). However, inshort range UAVs it can be done manually using radio control. The autopilot requiresinformation on the current UAV speed, attitude, height, <strong>and</strong> flight plan. Theseparameters can be measured using sensors or onboard systems. The autopilot forcesthe measured parameters to follow the dem<strong>and</strong>ed values.2.3.3 GuidanceGuidance is the element <strong>of</strong> the system that guarantees that the UAV follows therequired flight path. Therefore, information about the required flight path <strong>and</strong> the UAVposition must be available. The alterations required in the UAV’s parameters to keepthe UAV on course may then be worked out <strong>and</strong> adjustments passed to the controlsystem.The guidance <strong>of</strong> the UAV has three major phases:• Launch phase: the type <strong>and</strong> period <strong>of</strong> the launch phase decide whether thecontrol is required during the launch phase or not. Accurate guidance over asignificant distance <strong>and</strong> time is required when taking <strong>of</strong>f from a runway. Themain problem is to get a suitably accurate distance reference for the controlsystem. However, physical restrictions in the form <strong>of</strong> guide rails during thelaunch phase are provided in the case <strong>of</strong> taking <strong>of</strong>f from launchers. There arethree ways to control the UAV in the launch phase, direct operator, groundstation, <strong>and</strong> fully automatic controls. In direct operator control, the operatorwatches the UAV visually <strong>and</strong> sends comm<strong>and</strong>s directly to its control surfacesto change the flight path. In the case <strong>of</strong> launchers, the ground control stationcan control the UAV take <strong>of</strong>f quite easily, because the flight speed is achievedclose to the end <strong>of</strong> the launcher. However, it is more difficult to control the take<strong>of</strong>f from a runway due to the partial information <strong>of</strong>fered to the GCS operators<strong>and</strong> close view <strong>of</strong> the ground from the UAV sensors. Fully automatic take <strong>of</strong>fcontrol is possible in the case <strong>of</strong> taking <strong>of</strong>f from launchers, however it is quiteimpractical in the case <strong>of</strong> the runway without support, due to the shortage <strong>of</strong>information such as spatial references appropriate for accurate guidance <strong>of</strong> theUAV on/or close to the runway.• Mission phase: The mission phase starts once the UAV has been launched <strong>and</strong>ends before the recovery phase. It may include flying outside the data link5


Chapter 2: UAV System Technologyrange under automatic control, which executes pre-planned procedures torecover from losing the data link. The direct operator control is limited byvisual range. The process requires two operators at least, one controls the UAVusing a directional <strong>and</strong> an altitude control. The second operator directs the datalink antenna at the UAV. Most ground control stations support many UAVfunctions such as mission planning, data analysis, <strong>and</strong> UAV control. The directcontrol may include entering speed, direction, altitude, <strong>and</strong> waypointscomm<strong>and</strong>s; it may also include steering the sensors to gather information overthe targeted area. If the mission requires the UAV to operate over a large areathat can not be covered by one GCS, auxiliary station(s) may be used to coverthe area. In fully automatic control, the UAV is flown according to the preplannedflight path installed in the onboard computer.• Recovery Phase: UAV recovery without any damage to its body or equipmenthas been a major problem, because it requires accurate guidance <strong>and</strong> control,which is very complicated in the presence <strong>of</strong> wind. In the direct operatorcontrol, the operator controls the UAV l<strong>and</strong>ing in the same way as the take <strong>of</strong>f.The ground control station uses the UAV sensors <strong>and</strong> data link to control thel<strong>and</strong>ing. However, it is very difficult to perform the l<strong>and</strong>ing due to the lack <strong>of</strong>information. A fully automatic l<strong>and</strong>ing is still impractical, instead, a netrecovery is used, in which the UAV is flown into the net.2.4 Power PlantPower plant is one <strong>of</strong> the important aspects in the UAV development, since it affectsother aspects such as UAV range.2.4.1 Propeller EfficiencyThe propellers used in the UAV operate at low Reynolds numbers. They are small incomparison with manned aircraft. Therefore, their efficiencies are low, which leads togreater fuel consumption <strong>and</strong> installed power.2.4.2 Internal Combustion EnginesInternal combustion engines are used in most UAVs. They vary from two stroke, fourstroke petrol engines to gas turbine engines.2.4.3 Electric PropulsionElectric propulsion engines are used in small UAVs, as they are cheap <strong>and</strong> easy toinstall. However, the lack <strong>of</strong> appropriate power source represents a major problem.2.5 ConfigurationMost UAVs have the same configuration as manned aircraft with either fixed wingwith tail or rotary wing. However, some UAVs are just flying wings, <strong>and</strong> some arelighter than air.2.5.1 Fixed WingsMost currently working UAVs are in this group. The requirement <strong>of</strong> forward view,imposed by the primary sensor, leads to the use <strong>of</strong> pusher propellers at the back <strong>of</strong> theUAV.6


Chapter 2: UAV System Technology2.5.2 Rotary WingsThe rotary wing configuration solves some <strong>of</strong> the fixed wings UAVs’ problems suchas launch <strong>and</strong> recovery problems. Moreover, it gives the ability to hover over the target<strong>and</strong> point the sensor in any direction. However, it has many problems such as flightperformance, the need for greater power, <strong>and</strong> the effect <strong>of</strong> altitude conditions in theperformance.2.5.3 Lighter than AirThe lighter than air UAVs, for instance balloons, have the ability to remain in the airwithout consuming much power. However, they have many problems such asdifficulty controlling the altitude due to the temperature effect, are huge <strong>and</strong> heavy todeploy, <strong>and</strong> have a low speed.2.6 StructureThe UAV’s sub systems are protected by the structure <strong>of</strong> its body. The UAV structuremay have many restrictions, such as minimising the radar reflections.2.6.1 Fixed WingsThe structure <strong>of</strong> small UAVs required to resist the aerodynamic forces is very light.However, it should be strong enough to cope with the launch <strong>and</strong> recovery phases.2.6.2 Rotary WingsIn the rotary wing UAVs, the lift <strong>and</strong> control forces are generated by the rotor(s). Therotor(s) <strong>and</strong> their connections are critical parts <strong>of</strong> the UAV. Material fatigue is a majorproblem for these parts due to the cyclic behaviour <strong>of</strong> the forces related to the rotor.The capability <strong>of</strong> rotary wings UAVs to manoeuvre is limited, which reduces theaerodynamics forces applied to the structure. The forces generated during the take <strong>of</strong>f<strong>and</strong> l<strong>and</strong>ing are small.2.6.3 MaterialsThe materials in UAVs include aluminium or composites, for instance glass fibre.Because the composites are light, strong <strong>and</strong> damage resistant, they are used inconstructing most UAVs.2.7 Launch <strong>and</strong> Recovery2.7.1 LaunchLaunching the UAV is one <strong>of</strong> the important issues. In most cases, the operationrequires the UAV to be launched from limited areas, which makes the launch difficult.A variety <strong>of</strong> methods have been used such as h<strong>and</strong> launch, mechanical launch, rocketassisted take <strong>of</strong>f, runway, vertical take <strong>of</strong>f, <strong>and</strong> air launch.2.7.2 RecoveryThe recovery <strong>of</strong> the UAV is the most difficult <strong>and</strong> dangerous part <strong>of</strong> its operations.Many methods have been used such as crash l<strong>and</strong>ing, parachute, net, arrester, runway,<strong>and</strong> vertical l<strong>and</strong>ing.7


Chapter 2: UAV System TechnologyThis chapter indicates that there is a wide range <strong>of</strong> different technologies involved inthe UAV system, which must all be considered. The system <strong>of</strong> autonomous UAV ismore complex than the systems <strong>of</strong> some basic manned aircraft. <strong>Small</strong> aircraft havebeen used as the starting point for the development <strong>of</strong> UAVs. In order to develop aUAV, subsystems must be developed from scratch, or estimated from manned aircraft.8


Chapter 3: Basic Aeronautical Concepts <strong>and</strong> DefinitionsChapter 3 : Basic Aeronautical Concepts <strong>and</strong> DefinitionsIn order to calculate the forces <strong>and</strong> moments present on the aircraft, which are due tothe aircraft’s surfaces, engine, <strong>and</strong> wind, flight dynamics simulators consist <strong>of</strong> acomplicated flight model.This chapter gives information about the aircraft wing geometry, aircraft components,<strong>and</strong> the aircraft aerodynamic coefficients used by most dynamic flight simulators.These coefficients, which represent the classical linear aerodynamic forces <strong>and</strong>moments <strong>of</strong> aircraft, are used with the dynamic pressure, aircraft geometry <strong>and</strong> mass,to find the forces <strong>and</strong> moments acting on the aircraft (Zyskowski, 2003).3.1 Wing geometryThis section illustrates the various parameters <strong>of</strong> the wing geometry shown in Figure3.1.Figure 3.1:Wing geometry3.1.1 Wing SpanThe wing span (b) is the distance between the wing tips (b). The wing semi-span (s) isthe distance from each tip to the centre line (Houghton <strong>and</strong> Carpenter, 2003).3.1.2 ChordsThe distance between the intersections <strong>of</strong> the leading <strong>and</strong> trailing edges with thefuselage centre line is the root chord co. The length CT is the tip chord. The taper ratioλ is the ratio CT/ co. (Houghton <strong>and</strong> Carpenter, 2003).3.1.3 Wing AreaThe gross wing area SGis the plan area <strong>of</strong> the wing including the continuation withinthe fuselage. The net wing area SNis the plan area <strong>of</strong> the wing without thecontinuation within the fuselage (Houghton <strong>and</strong> Carpenter, 2003).9


Chapter 3: Basic Aeronautical Concepts <strong>and</strong> Definitions3.1.4 Mean ChordsThe st<strong>and</strong>ard mean chord c (<strong>of</strong>ten abbreviated to SMC) is defined by c = S G/b orIt is also called geometric mean chord. It also can be redefined as+ s∫−s=+ s∫−scdyc 3.1dyWhere y is the distance measured from the centre line towards the right tip.The aerodynamic mean chord cA(AMC) is defined bySN/b.cA+ s∫c−s=+ s∫−s2dycdy3.2(Houghton <strong>and</strong> Carpenter, 2003)3.1.5 Aspect RatioThe aspect ratio is a measure <strong>of</strong> the narrowness <strong>of</strong> the wing plan form. It is referred toby (A) or (AR), <strong>and</strong> is presented asspan bA = =3.3SMC c(Houghton <strong>and</strong> Carpenter, 2003)3.1.6 Sweep BackThe sweep-back angle <strong>of</strong> a wing is the angle between a line perpendicular to the centreline, <strong>and</strong> a line drawn along the span at a constant part <strong>of</strong> the chord from the leadingedge or trailing edge. It is referred to by either ΛLEorφLE, if it is measured from theleading edge, <strong>and</strong> by either ΛTEor φTE, if it is measured from the trailing edge(Houghton <strong>and</strong> Carpenter, 2003).3.1.7 Dihedral AngleThe dihedral angle is the angle between the lines drawn on the wings along the locusintersections between the chord lines <strong>and</strong> the nose section as shown in Figure 3.2. It isdenoted by Γ . It is said they are dihedral if the wings are inclined upwards, <strong>and</strong>anhedral if they inclined downwards (Houghton <strong>and</strong> Carpenter, 2003).10


Chapter 3: Basic Aeronautical Concepts <strong>and</strong> DefinitionsFigure 3.2: Dihedral angle3.1.8 AirfoilAn airfoil is a shape designed to create lift. It is a cross section <strong>of</strong> the wing as shown inFigure 3.3.The chord is an imaginary direct line connecting the leading edge with the trailingedge. The mean camber line is an imaginary line that forms an equal distance from theupper <strong>and</strong> lower surfaces <strong>of</strong> the wing. The camber is the curvature <strong>of</strong> the mean camberline (Anderson <strong>and</strong> Eberhardt, 2001).Figure 3.3: Airfoil <strong>and</strong> Angle <strong>of</strong> attack11


Chapter 3: Basic Aeronautical Concepts <strong>and</strong> Definitions3.1.9 Angle <strong>of</strong> AttackThe angle <strong>of</strong> attack is “the angle between the mean chord <strong>of</strong> the airfoil <strong>and</strong> thedirection <strong>of</strong> the relative wind ”as shown in Figure 3.3. It is denoted by α (Anderson<strong>and</strong> Eberhardt, 2001:4).3.2 The Aircraft AerodynamicsUnderst<strong>and</strong>ing the forces <strong>and</strong> moments acting on the aircraft <strong>and</strong> their act directions isimportant to be able to model an aircraft in a flight simulator. The term 6 DOF meanssix degrees <strong>of</strong> freedom. The aircraft can move in three dimensions in space <strong>and</strong> canrotate about three axes. Figure 3.4 shows the three axes <strong>and</strong> the forces <strong>and</strong> momentsacting on an aircraft (Anderson <strong>and</strong> Eberhardt, 2001).Figure 3.4: The forces <strong>and</strong> moments acting on an aircraftThe forces <strong>of</strong> lift, weight, drag, thrust, <strong>and</strong> side force act along the axes, forcing theaircraft to move in the axes direction. On the other h<strong>and</strong>, the three moments, yaw, roll,<strong>and</strong> pitch force the aircraft to turn around the axes.3.2.1 LiftThe lift is the component <strong>of</strong> force perpendicular to the flight direction, <strong>and</strong> actingupwards. It is denoted by L (Houghton <strong>and</strong> Carpenter, 2003).The lift produced by the wing is dependent on the speed <strong>of</strong> flight, the air density, wingarea, <strong>and</strong> the lift coefficient. The lift coefficient depends on the aer<strong>of</strong>oil shape, angle pfattack, <strong>and</strong> aspect ratio. The lift can be calculated from the equation:12


Chapter 3: Basic Aeronautical Concepts <strong>and</strong> Definitionswhere:2VL = CL × ρ × × S3.42C L is the lift coefficient,ρ is the air density ,V is the free stream velocity,S is the wing surface area,L is the lift force produced.Since the dynamic pressure2ρVq = , the equation 3.4 can be rewritten as2L = CL× q × S3.5Despite the wing, the lift force is contributed from other surfaces such as elevator <strong>and</strong>horizontal tail. The total lift coefficient is calculated from the following equationCL= C + C α + Cδδ + C i + ∆C+ ∆C3.6LOLaL eeLih hLflapLspoilerwhereC LO is the lift coefficient at zero angle <strong>of</strong> attackC La is the lift coefficient due to angle <strong>of</strong> attackα is the angle <strong>of</strong> attackC Lδe is the lift coefficient due to elevator deflectionδ e is the elevator deflectionC Lih is the lift coefficient due to horizontal tail incidencei h is the horizontal tail incidence angle.C Lflap is the lift coefficient due to flapsC Lspoiler is the lift coefficient due to spoiler(Zyskowski, 2003)3.2.2 DragThe drag is the component <strong>of</strong> force acting in the opposite direction to the line <strong>of</strong> flight.In other words, it is the force that resists the motion <strong>of</strong> the aircraft (Houghton <strong>and</strong>Carpenter, 2003)Drag can be calculated from the equationwhere:D = CD × q × S3.7CDis the coefficient <strong>of</strong> drag,q is the dynamic pressure,S is the wing surface area,D is the drag force produced.13


Chapter 3: Basic Aeronautical Concepts <strong>and</strong> DefinitionsThe total drag coefficient is calculated from the equationCD= C + C α + Cδδ + C i + ∆C+ ∆C3.8DODaD eeDih hDflapDspoilerWhere:C DO is the drag coefficient at zero angle <strong>of</strong> attackC Da is the drag coefficient due to angle <strong>of</strong> attackα is the angle <strong>of</strong> attackC Dδe is the drag coefficient due to elevator deflectionδ e is the elevator deflectionC Dih is the drag coefficient due to horizontal tail incidencei h is the horizontal tail incidence angle.C Dflap is the drag coefficient due to flapsC Dspoiler is the drag coefficient due to spoiler(Zyskowski, 2003)3.2.2 Side ForceThe side force (or cross-wind force) is the component <strong>of</strong> force acting on the aircraftperpendicular to the lift <strong>and</strong> drag (Houghton <strong>and</strong> Carpenter, 2003).It can be calculated from the equation:Y = CY × q×S3.9where:C Y is the coefficient <strong>of</strong> side force,q is the dynamic pressure,S is the wing surface area,Y is the side force produced.The total side force coefficient is calculated from the equationCY= C + CC δ3.10YOYβ β + CYδaδa+YδrrWhere:C YO is the side force coefficient at zero angle <strong>of</strong> attack,C Yβ is the side force coefficient due to sideslip angle,β is the angle <strong>of</strong> sideslip,C Yδα is the side force coefficient due to aileron deflection,δ α is the aileron deflection,C Yδr is the lift coefficient due to rudder deflection,δ r is the rudder deflection.(Zyskowski, 2003)14


Chapter 3: Basic Aeronautical Concepts <strong>and</strong> Definitions3.2.3 Pitch MomentPitch moment is the moment which tends to rotate aircraft around the pitch axis (lateralaxis) as shown in Figure 3.4. In this rotation, the aircraft nose <strong>and</strong> tail pitch up ordown. The pilot pitches up to climb, <strong>and</strong> pitches down to dive (Houghton <strong>and</strong>Carpenter, 2003).The pitch moment can be calculated from the equation:where:M = CM × q × S × c3.11C M is the coefficient <strong>of</strong> pitch,q is the dynamic pressure,S is the wing surface area,c is the chord length,M is the pitching moment produced.The total pitch moment coefficient can be calculated from the equation:CM= C + C δMOMα α + CMδee+ CMihih+ ∆CMflap+ ∆CMspoiler3.12Where:C MO is the pitch moment coefficient at zero angle <strong>of</strong> attackC Ma is the pitch moment coefficient due to angle <strong>of</strong> attackα is the angle <strong>of</strong> attackC Mδe is the pitch moment coefficient due to elevator deflectionδ e is the elevator deflectionC Mih is the pitch moment coefficient due to horizontal tail incidencei h is the horizontal tail incidence angle.C Mflap is the pitch moment coefficient due to flapsC Mspoiler is the pitch moment coefficient due to spoiler(Zyskowski, 2003)3.2.4 Yaw MomentThe yaw moment is the moment which tends to rotate the aircraft about the yaw axis(vertical axis) (Houghton <strong>and</strong> Carpenter, 2003).The yaw moment can be calculated from the equation:Where:N = CN× q × S × b3.13C N is the coefficient <strong>of</strong> yaw moment,q is the dynamic pressure,S is the wing surface area,b is the wing span,N is the yaw moment produced.15


Chapter 3: Basic Aeronautical Concepts <strong>and</strong> DefinitionsFigure 3.5 Traditional Aircraft ComponentsThe elevator is used to control the pitch <strong>of</strong> the aircraft. The rudder is used to controlthe yaw <strong>of</strong> the aircraft. The ailerons, which are movable surfaces on the outer trailingedge <strong>of</strong> the wings, are used to control the roll <strong>of</strong> the aircraft. The flaps, which arehinged parts on the inner trailing edge <strong>of</strong> the wings, are used to produce higher lift atlow speed, <strong>and</strong> to increase drag on l<strong>and</strong>ing to get the required l<strong>and</strong>ing speed <strong>and</strong>approach angle. The l<strong>and</strong>ing gears configurations are either tricycle l<strong>and</strong>ing gear,which has the main l<strong>and</strong>ing gears just behind the aircraft centre <strong>of</strong> gravity <strong>and</strong> asteerable nose gear, or tail dragger, which has the main l<strong>and</strong>ing gear forward <strong>of</strong> theaircraft centre <strong>of</strong> gravity <strong>and</strong> a small steerable gear at the tail (Anderson <strong>and</strong>Eberhardt, 2001).In order to model an aircraft in any <strong>Flight</strong> Dynamic Model, the aircraft geometry, thelift, drag, <strong>and</strong> side forces, <strong>and</strong> the roll, pitch, <strong>and</strong> yaw moments acting on the aircraftmust be understood. It is also important to know the aircraft control surfaces <strong>and</strong> theireffects on the aircraft motion.17


Chapter 4: A Review <strong>of</strong> <strong>Flight</strong> SimulatorsChapter 4 : A Review <strong>of</strong> <strong>Flight</strong> SimulatorsA flight simulator is a system that attempts to imitate the experience <strong>of</strong> flying anaircraft as practically as possible. The types <strong>of</strong> flight simulators vary from personalcomputer video games to full size cockpit replicas controlled by sophisticatedcomputer systems. <strong>Flight</strong> simulators are widely used by academic researchers, theaviation industry, <strong>and</strong> air forces for pilot training <strong>and</strong> aircraft development (WWW1).This chapter reviews some <strong>of</strong> the most relevant flight simulators available for use inthis project, explaining the advantages <strong>and</strong> disadvantages <strong>of</strong> using each, <strong>and</strong> justifiesthe chosen flight simulators. Two flight dynamic model (FDM) simulators, AeroSimblockSet, <strong>and</strong> JSBSim, (FDM is “the physics/math model that defines the movement <strong>of</strong>an aircraft under the forces <strong>and</strong> moments applied to it using the various controlmechanisms <strong>and</strong> from the forces <strong>of</strong> nature”)(Berndt, 2000), <strong>and</strong> two visualisation flightsimulators, <strong>Flight</strong>Gear <strong>and</strong> Micros<strong>of</strong>t <strong>Flight</strong> Simulator, have been reviewed.4.1 AeroSim BlockSetThe AeroSim blockSet is a Matlab/Simulink block library designed by flight controlengineers, <strong>and</strong> provides elements for fast development <strong>of</strong> nonlinear 6-degree-<strong>of</strong>freedom(6-DOF) aircraft dynamic models. Academic <strong>and</strong> non-commercial users c<strong>and</strong>ownload the AeroSim blockSet freely for use.Aerosim blockSet Features (WWW2):• Non-linear 6-DOF aircraft dynamics are implemented in various referenceframes.• Linear aerodynamics, piston-engine propulsion, <strong>and</strong> time-varying inertiamodels are provided.• The model can read the aerodynamic, propulsion, <strong>and</strong> inertia data from userdefinedsources.• St<strong>and</strong>ard atmosphere model, wind shear, background wing, <strong>and</strong> turbulencemodels are available.• Detailed earth models are provided.• Transformations to <strong>and</strong> from multiple reference frames are provided.• Conversions between engineering units are provided.• XML aircraft configuration files <strong>of</strong> JSBSim flight dynamic model can be used.• Pilot interface blocks for joystick input <strong>and</strong> for visual output in <strong>Flight</strong>Gear<strong>Flight</strong> Simulator or Micros<strong>of</strong>t <strong>Flight</strong> Simulator are provided.• Pre-built aircraft models, which can be reused by changing the parameters file,are provided.• By using the Real-Time Workshop, which is one <strong>of</strong> the Matlab tools, Clanguage code can be generated automatically from the model.The main disadvantage <strong>of</strong> AeroSim blockSet is that it does not model aircraft with anelectric propulsion system.4.2 JSBSim <strong>Flight</strong> Dynamic Model version 2.0JSBSim is an open source flight dynamic model (FDM) written in the C++programming language. It is the default flight dynamic model for the <strong>Flight</strong>Gear flightsimulator.JSBSim Features:18


Chapter 4: A Review <strong>of</strong> <strong>Flight</strong> Simulators:• Compiles <strong>and</strong> runs under many operating systems.• Can be run as a st<strong>and</strong>-alone programme, or it can be run as an integrated part<strong>of</strong> the flight simulator, which provides visual output.• The code is generic, <strong>and</strong> particular aircraft flight control systems, propulsion,aerodynamics, l<strong>and</strong>ing gears, <strong>and</strong> autopilot are defined in XML formatconfiguration files.• Can be used to model many propulsion systems including an electricpropulsion system.• Models the rotational earth effects on the equation <strong>of</strong> motion.• Many data output formats such as to screen, socket, file.One <strong>of</strong> the strongest advantages <strong>of</strong> the JSBSim is that it is an open source project,which gives a very flexible environment for academic researchers <strong>and</strong> volunteersaround the world to use it as a tool in their research or to develop it itself (Berndt,2000)4.3 <strong>Flight</strong>Gear <strong>Flight</strong> Simulator version 0.9.10<strong>Flight</strong>Gear is an open-source flight simulator written in the C++ programminglanguage, available on the World Web Wide. It is used “to create a sophisticated flightsimulator framework for use in research or academic environments, for thedevelopment <strong>and</strong> pursuit <strong>of</strong> other interesting flight simulation ideas, <strong>and</strong> as an end-userapplication”(WWW3).<strong>Flight</strong>Gear features:• High Degree <strong>of</strong> Freedom: <strong>Flight</strong>Gear is open-source, its source code can bedownloaded <strong>and</strong> altered to meet a specific research purpose.• <strong>Flight</strong> Dynamics Models: <strong>Flight</strong>Gear has three primary flight dynamicsmodels; JSBSim, YASim <strong>and</strong> UIUC- the researchers can use any one accordingto their requirements. In addition, it is possible to add a new dynamic model orinterface with an external model.• Extensive <strong>and</strong> accurate world scenery database.• Accurate <strong>and</strong> Detailed Sky Model: <strong>Flight</strong>Gear provides accurate sun, moonstars <strong>and</strong> planets, positions for a certain time <strong>and</strong> date.• Flexible <strong>and</strong> Open Aircraft <strong>Modelling</strong> System: <strong>Flight</strong>Gear can model a widevariety <strong>of</strong> aircrafts. It has very good instrument animation <strong>and</strong> infrastructure tobuild 3d cockpits. Moreover, it models real world instrument behaviour, <strong>and</strong>system failures.• Moderate Hardware Requirements: <strong>Flight</strong>Gear can be run on a personalcomputer.• Internal Properties Exposed: <strong>Flight</strong>Gear allows the user to access the internalproperties too <strong>and</strong> monitor any <strong>of</strong> its internal state variables. By editingconfiguration files it is possible to create sound effects, model animations,instrument animations <strong>and</strong> network protocols for approximately any situation.• Networking Options: By setting its networking options, <strong>Flight</strong>Gear cancommunicate with external flight dynamics models, GPS receivers, otherinstances <strong>of</strong> <strong>Flight</strong>Gear, <strong>and</strong> other s<strong>of</strong>tware. (WWW4)4.4 Micros<strong>of</strong>t <strong>Flight</strong> Simulator 2004Micros<strong>of</strong>t flight simulator (MSFS) 2004 is a popular commercial programme; it isavailable in most computer games stores.19


Chapter 4: A Review <strong>of</strong> <strong>Flight</strong> SimulatorsMSFS 2004 Features:• Contains many aircraft models.• Provides a tool to generate scenery automatically.• Provides detailed visual effects.• Provides detailed flight information using flight analysis maps <strong>and</strong> graphs.• Provides 3D interactive cockpits.• Provides moving maps <strong>and</strong> GPS positioning system.• Provides multiplayer capability.The main disadvantage <strong>of</strong> Micros<strong>of</strong>t <strong>Flight</strong> Simulator is that it is only for the Windowsoperating system. (WWW5)4.5 The Chosen <strong>Flight</strong> Simulators4.5.1 <strong>Flight</strong> Dynamic ModelAeroSim blockSet was chosen at the beginning <strong>of</strong> the project, <strong>and</strong> a lot <strong>of</strong> time wasspent in learning how to use it. However, later on, JSBSim was chosen to be the flightdynamic model due to the following reasons:• The UAV to be modelled has an electric propulsion system, which theAeroSim blockSet does not model.• The JSBSim is the default flight dynamic model for the <strong>Flight</strong>Gear flightsimulator, which was chosen to visualise the output, which is an importantfactor in terms <strong>of</strong> computer performance.• Using AeroSim blockSet requires good experience <strong>of</strong> using Matlab <strong>and</strong>Simulink, which is not the case for the author. On the other h<strong>and</strong>, usingJSBSim is easier.4.5.2 <strong>Flight</strong> Simulator<strong>Flight</strong>Gear was chosen to be the flight simulator instead <strong>of</strong> Micros<strong>of</strong>t flight simulatordue to the following reasons:• <strong>Flight</strong>Gear is an open source, can be downloaded from the internet <strong>and</strong> usedfreely.• The <strong>Flight</strong>Gear source code can be altered according to the requirements <strong>of</strong> theproject.• <strong>Flight</strong>Gear uses the JSBSim flight dynamic model as a default model. JSBSimis installed automatically with <strong>Flight</strong>Gear.JSBSim <strong>and</strong> <strong>Flight</strong>Gear are described in more details in the next chapter.20


Chapter 5: Description <strong>and</strong> Construction <strong>of</strong> the Required Files to Model the UAV <strong>and</strong>Perform the <strong>Simulation</strong>Chapter 5 : Description <strong>and</strong> Construction <strong>of</strong> the Required Filesto Model the UAV <strong>and</strong> Perform the <strong>Simulation</strong>In the previous chapter the relevant flight dynamic models <strong>and</strong> flight simulators thatcan be used in the project to model the small commercial Cessna 182 Radio Controlledaircraft, which was chosen to represent the UAV, were reviewed . The decision wastaken to use the JSBSim as a <strong>Flight</strong> dynamic model to model the Cessna-182 (RC), <strong>and</strong>the <strong>Flight</strong>Gear flight simulator as flight simulator to visualise the modelled UAV.Many issues were involved in modelling the UAV. One <strong>of</strong> the big challenges wascalculating its aerodynamics coefficients. Usually these coefficients are calculated byexperiments, by using computer s<strong>of</strong>tware, or from available data <strong>of</strong> similar aircraft.Many approaches were investigated such as using DATCOM+, which is a computerprogramme to estimate the design aerodynamics coefficients <strong>of</strong> an aircraft; however,this approach was ignored due to the complexity <strong>of</strong> the programme <strong>and</strong> the need formany refinements to the programme output.The next approach was to use Aeromatic version 0.8, a web application to createaircraft configuration files for use with the JSBSim <strong>Flight</strong> Dynamics Model.According to the Aeromatic web site (WWW6), the output aircraft configuration filesformat is JSBSim version 2.0. However, this is not the case at the time <strong>of</strong> constructingthe Cessna-182 (RC) configuration files. The output format was JSBSim version 1.65,consequently, the UAV configuration files were rewritten in version 2.0 format.Although, the Aeromatic gives a fast <strong>and</strong> effective way to construct the UAVconfiguration files, some important refinements are required. Due to that, anotherassistance approach had to be found.The use <strong>of</strong> available data <strong>of</strong> similar UAV was the missing part that was required to geta good JSBSim model. Unfortunately, there are not many UAV JSBSim modelsavailable, however, the Rascal 110 R/C UAV, which is quite similar to the Cessna-182(RC) in shape, <strong>and</strong> bigger in size, was very helpful in refining the Cessna-182 (RC)configuration files.This chapter describes the architecture <strong>of</strong> <strong>Flight</strong>Gear <strong>and</strong> JSBSim <strong>and</strong> explains the filesstructure required to model Cessna 182 (RC) <strong>and</strong> perform a visual simulation. It alsogives explanations about how these files were constructed using the Aeromatic <strong>and</strong>Rascal 110 RC Model, <strong>and</strong> how the 3D graphical model was created by using thecommercial 3D modelling s<strong>of</strong>tware AC3D. The architecture <strong>of</strong> <strong>Flight</strong>Gear autopilot,Autopilot tuning process, <strong>and</strong> flight path construction are discussed in chapter 6.5.1 <strong>Flight</strong>Gear <strong>Flight</strong> Simulator Required FilesThe <strong>Flight</strong>Gear flight simulator needs essential files arranged in folders in order toperform successful simulation. This section represents the top level <strong>of</strong> all requiredfiles.5.1.1 UAV Main FolderThe name <strong>of</strong> this folder is the name <strong>of</strong> the modelled UAV (RC-Cessna-182). Itcontains the UAV main (c182.xml) <strong>and</strong> Set (c182-set.xml) JSBSim configuration files,Engines folder, Models folder, <strong>and</strong> systems folder as shown in Figure 5.1 . The mainUAV folder should be the directory: FG_ROOT\<strong>Flight</strong>Gear\data\Aircraft.21


Chapter 5: Description <strong>and</strong> Construction <strong>of</strong> the Required Files to Model the UAV <strong>and</strong>Perform the <strong>Simulation</strong>Figure 5.1: Main UAV folder contents5.1.2 Engines FolderThe Engines folder contains the engine (Cessna_RC_Engine.xml), <strong>and</strong> the thruster(Cessna_RC_Propeller.xml) JSBSim configuration files as shown in Figure 5.2.Figure 5.2: Engines folder contents22


Chapter 5: Description <strong>and</strong> Construction <strong>of</strong> the Required Files to Model the UAV <strong>and</strong>Perform the <strong>Simulation</strong>5.1.3 Systems FolderThe systems folder contains the autopilot (Cessna182-auropilot.xml) <strong>and</strong> the electricsystem (electrical.xml) JSBSim files as shown in Figure 5.3.Figure 5.3: Systems folder contents5.1.4 Models FolderThe Models folder contains the JSBSim 3D graphical model configuration file (c182-dpm.xml), the 3D graphical model (c182.ac), <strong>and</strong> textures (c182-01.rgb <strong>and</strong> c182-02.rgb) used by the 3D model as shown in Figure 5.4.<strong>Flight</strong>Gear supports many 3D file formats such as AC3D, DXF, VRML1, <strong>and</strong> MDL.Megginson (2002)Figure 5.4: Models folder contents23


Chapter 5: Description <strong>and</strong> Construction <strong>of</strong> the Required Files to Model the UAV <strong>and</strong>Perform the <strong>Simulation</strong>The required files <strong>and</strong> their arrangement have been defined in this section. Thefollowing section goes through each file <strong>and</strong> describe its structure <strong>and</strong> explains how itwas constructed.5.2 JSBSim <strong>Flight</strong> Dynamic Model Required FilesJSBSim is an open source project written in the C++ programming language. The use<strong>of</strong> an object-orientated approach makes JSBSim a generic simulator, <strong>and</strong> allows themodelling <strong>of</strong> any aircraft, missile, or rotorcraft without the need to change theprogramme code. The modelling process can be done by the use <strong>of</strong> specification fileswritten in eXtensible Markup Language (XML) format. The JSBSim version used inthis project is version 2.0, which is the current available version.Several files are involved in modelling the aircraft. The aircraft’s metrics <strong>and</strong>aerodynamics characteristics are specified in the main aircraft configuration file. Theaircraft’s propulsion system is specified in two files, one for the engine, <strong>and</strong> the otherfor the thruster (a thruster is the device that turns the power <strong>of</strong> the engine into a thrustforce such as a propeller or a nozzle). Other files are required for use with <strong>Flight</strong>Gearflight simulator, which include the autopilot file, electric system file, <strong>and</strong> 3D graphicalmodel specification file. The final file required is a file to tie the previous files togetherin order to perform complete simulation using <strong>Flight</strong>Gear flight simulator. Due to thelack <strong>of</strong> clear documentation <strong>of</strong> <strong>Flight</strong>Gear <strong>and</strong> JSBSim, <strong>and</strong> to make these files clear toread, comments were added to the XML files to explain every parameter.5.2.1 Main aircraft configuration fileThe main aircraft configuration file specifies the aircraft’s airframe geometry, mass<strong>and</strong> inertia properties, l<strong>and</strong>ing gear positions <strong>and</strong> their ground reactions, propulsionsystem, flight control system, <strong>and</strong> aerodynamic characteristics. Figure 5.5 showsdifferent sections <strong>of</strong> the main aircraft configuration file. These sections will bedescribed one by one.Figure 5.5: Sections <strong>of</strong> the main aircraft’s configuration file24


Chapter 5: Description <strong>and</strong> Construction <strong>of</strong> the Required Files to Model the UAV <strong>and</strong>Perform the <strong>Simulation</strong>Metrics SectionThe metrics section specifies the aircraft’s wing <strong>and</strong> tail characteristics, <strong>and</strong> severallocations <strong>of</strong> important points as shown in Figure 5.6. The imperial unit system is usedin all measurements. The original point for all measurements in the files is at the nose<strong>of</strong> the aircraft, X-axis is along the aircraft body (positive towards the tail), Y-axis isalong the wings (positive towards the right wing tip, <strong>and</strong> Z-axis is in the vertical axis(positive downward).Figure 5.6: Metrics section <strong>of</strong> the main aircraft’s configuration fileIn this section some values were measured physically from the Cessna 182 (RC) suchas wing span, wing area, wing chord, horizontal tail area, horizontal tail arm, <strong>and</strong>vertical tail arm. Other values were estimated from the available data <strong>of</strong> Rascal 110RC.Mass Balance SectionThe mass balance section specifies the aircraft’s moment <strong>of</strong> inertia <strong>and</strong> the location <strong>of</strong>the centre <strong>of</strong> gravity as shown in Figure 5.7.Figure 5.7: Mass balance section <strong>of</strong> the main aircraft’s configuration fileThe values in this section were difficult to calculate, due to the need for experimentalresults. Therefore, with the help <strong>of</strong> Rascal 110 RC data, moments <strong>of</strong> inertia <strong>and</strong> centre25


Chapter 5: Description <strong>and</strong> Construction <strong>of</strong> the Required Files to Model the UAV <strong>and</strong>Perform the <strong>Simulation</strong><strong>of</strong> gravity were estimated <strong>and</strong> altered many times by changing the value <strong>and</strong> runningthe simulation until a good aircraft balance was achieved.Ground Reactions SectionGround reactions section specifies the wheels location, <strong>and</strong> the coefficients associatedwith each wheel, as shown in Figure 5.8.Figure 5.8: Ground reactions section <strong>of</strong> the main aircraft’s configuration fileSome values in the section were measured physically from the Cessna 182 RC such asthe location <strong>of</strong> gears. Other values were obvious, such as the type <strong>of</strong> brake, <strong>and</strong>whether or not the gear was retractable. Static friction, dynamic friction, rollingfriction, spring, <strong>and</strong> damping coefficients values need to be calculated by experiment,which was not available, therefore, they were estimated from the Rascal 110 RC.Propulsion SectionJSBSim can model different types <strong>of</strong> engines, for instance electric, piston, rocket <strong>and</strong>turbine engines. Engine <strong>and</strong> thruster characteristics are specified in separate files.These files are referred to in the propulsion section in the main aircraft specificationfile, which allows the researcher to assign different kinds <strong>of</strong> engines <strong>and</strong> thrusters tothe aircraft. The propulsion section specifies information about engine, thruster, <strong>and</strong>fuel tank, as shown in Figure 5.9.26


Chapter 5: Description <strong>and</strong> Construction <strong>of</strong> the Required Files to Model the UAV <strong>and</strong>Perform the <strong>Simulation</strong>The locations <strong>of</strong> engine <strong>and</strong> propeller were measured physically. JSBSim ignores thetank section in Cessna 182 RC because the engine used is an electric engine.Figure 5.9: Propulsion section <strong>of</strong> the main aircraft’s configuration file<strong>Flight</strong> Control SectionJSBSim provides components which can be connected together to model a flightcontrol system for an aircraft. The flight control surfaces are elevator, right <strong>and</strong> leftailerons, <strong>and</strong> rudder.This section was generated by Aeromatic v 8.0. As shown in Figure 5.10, theAeromatic v 8.0 takes inputs from the user such as system <strong>of</strong> measurements used, theaircraft name, type <strong>of</strong> aircraft, maximum take <strong>of</strong>f weight, wing span, length, wing area,l<strong>and</strong>ing gear layout, number <strong>of</strong> engines, engine type, <strong>and</strong> engine layout. By clicking onthe Generate button, the main JSBSim configuration file will be generated in anotherwindow. The next step is to save the generated file by using save as, <strong>and</strong> giving the filea name (for instance, c182.xml). The saved xml file is in JSBSim version 1.65 format,as shown in Figure 5.11. Therefore, it should be rewritten in version 2.0. The controlsection is shown in Figure 5.12.27


Chapter 5: Description <strong>and</strong> Construction <strong>of</strong> the Required Files to Model the UAV <strong>and</strong>Perform the <strong>Simulation</strong>Figure 5.10: Generating the JSBSim main configuration file using Aeromatic28


Chapter 5: Description <strong>and</strong> Construction <strong>of</strong> the Required Files to Model the UAV <strong>and</strong>Perform the <strong>Simulation</strong>Figure 5.11: JSBSim version 1.65 configuration file format29


Chapter 5: Description <strong>and</strong> Construction <strong>of</strong> the Required Files to Model the UAV <strong>and</strong>Perform the <strong>Simulation</strong>Figure 5.12: <strong>Flight</strong> control section <strong>of</strong> the main aircraft’s configuration file30


Chapter 5: Description <strong>and</strong> Construction <strong>of</strong> the Required Files to Model the UAV <strong>and</strong>Perform the <strong>Simulation</strong>Aerodynamics SectionThe aerodynamic section specifies the aerodynamic characteristics <strong>of</strong> the aircraft. Theclassic build up method is used to model the aerodynamic forces <strong>and</strong> moments (drag,side force, <strong>and</strong> lift forces, <strong>and</strong> roll, pitch, <strong>and</strong> yaw moments) acting on the aircraft.Many factors affect each <strong>of</strong> the forces <strong>and</strong> moments. The total force or moment is thesum <strong>of</strong> the individual effect (Berndt, 2005). This section was generated automaticallyby Aeromatic v8.0.The complete aerodynamic section is shown in Figure 5.13, Figure 5.14, <strong>and</strong> Figure5.15 respectively.Figure 5.13: Aerodynamics section <strong>of</strong> the main aircraft’s configuration file (a)31


Chapter 5: Description <strong>and</strong> Construction <strong>of</strong> the Required Files to Model the UAV <strong>and</strong>Perform the <strong>Simulation</strong>Figure 5.14: Aerodynamics section <strong>of</strong> the main aircraft’s configuration file (b)32


Chapter 5: Description <strong>and</strong> Construction <strong>of</strong> the Required Files to Model the UAV <strong>and</strong>Perform the <strong>Simulation</strong>Figure 5.15: Aerodynamics section <strong>of</strong> the main aircraft’s configuration file (c)5.1.2 Engine Configuration FileThe engine file specifies the specific engine characteristics used. JSBSim can modelmany kinds <strong>of</strong> engines such as piston engine, rocket engine, <strong>and</strong> electric engine. Sincethe Rascal 110 RC has an electric propulsion system, it was easy to know how tomodel the electric engine, which includes just the engine power as shown in Figure5.16 . The engine power for Cessna 182 RC was estimated from the Rascal 110 RC.Figure 5.16: Electric engine specification file33


Chapter 5: Description <strong>and</strong> Construction <strong>of</strong> the Required Files to Model the UAV <strong>and</strong>Perform the <strong>Simulation</strong>5.1.3 Propeller Configuration FileThe propeller file specifies the propeller measurements <strong>and</strong> characteristics as shown inFigure 5.17Figure 5.17: Propeller configuration fileThis file was generated automatically by Aeromatic v8.0. As shown in Figure 5.18,Aeromatic takes the engine power, maximum engine RPM, pitch condition, <strong>and</strong>propeller diameter from the user.34


Chapter 5: Description <strong>and</strong> Construction <strong>of</strong> the Required Files to Model the UAV <strong>and</strong>Perform the <strong>Simulation</strong>Figure 5.18: Generating propeller configuration file using Aeromatic v 8.05.1.4 Electrical system Configuration FileThe electrical system file specifies the battery characteristics, <strong>and</strong> the lights <strong>and</strong> otherparameters as shown in Figure 5.19.The electrical system configuration file is required to perform a simulation in<strong>Flight</strong>Gear flight simulator. Aeromatic does not generate this file. Therefore, a similarconfiguration to Rascal 110 RC electrical system file was used.35


Chapter 5: Description <strong>and</strong> Construction <strong>of</strong> the Required Files to Model the UAV <strong>and</strong>Perform the <strong>Simulation</strong>Figure 5.19: Electrical system configuration file5.1.5 3D Graphical model Configuration FileIn order to perform a visual simulation, a 3D graphical model should be specified. Theanimated control surfaces <strong>and</strong> their kind <strong>of</strong> animation are specified in this file asshown in Figure 5.20.36


Chapter 5: Description <strong>and</strong> Construction <strong>of</strong> the Required Files to Model the UAV <strong>and</strong>Perform the <strong>Simulation</strong>Figure 5.20: 3D graphical model configuration file<strong>Flight</strong>Gear supports many 3D formats. The common extension used in <strong>Flight</strong>Gear is acextension. The AC3D is commercial 3D modelling s<strong>of</strong>tware <strong>and</strong> can be used for manypurposes such as game model creation <strong>and</strong> virtual reality simulators (WWW7).The modelled Cessna 182 RC is a scale model <strong>of</strong> the real Cessna 182, which meansthat the body geometry is exactly the same. Therefore, the real Cessna 182 model,which is modelled by Stuart Buchanan <strong>and</strong> available to download from the <strong>Flight</strong>Gearaircrafts download web page, was the starting point to construct the 3D model <strong>of</strong> theCessna 182 RC UAV. The constructing process included resizing the real model toadapt to the UAV dimensions. It included adapting the position <strong>of</strong> the new modelinside the <strong>Flight</strong>Gear during the simulation. The 3D graphical model <strong>of</strong> Cessna 182RC UAV is shown in Figure 5.21.37


Chapter 5: Description <strong>and</strong> Construction <strong>of</strong> the Required Files to Model the UAV <strong>and</strong>Perform the <strong>Simulation</strong>Figure 5.21: 3D graphical model <strong>of</strong> Cessna 182 RC5.1.6 Top level Configuration FileThe set file ties all the previous files together by specifying their names <strong>and</strong> paths. Theset file is the first file processed in the simulation. Figure 5.22 shows an example <strong>of</strong> theset file.38


Chapter 5: Description <strong>and</strong> Construction <strong>of</strong> the Required Files to Model the UAV <strong>and</strong>Perform the <strong>Simulation</strong>Figure 5.22: Set configuration file39


Chapter 5: Description <strong>and</strong> Construction <strong>of</strong> the Required Files to Model the UAV <strong>and</strong>Perform the <strong>Simulation</strong>It was clear that the modelling <strong>of</strong> an aircraft in general <strong>and</strong> the Cessna 182 RC UAVby using JSBSim is not an easy task. It involved many calculations <strong>and</strong> required muchexponential data that in most cases was not available. However, the Cessna 182 RCUAV was modelled accurately to some extent with the help <strong>of</strong> the available data <strong>of</strong> thesimilar aircraft, the Rascal 110 RC.40


Chapter 6: <strong>Flight</strong>Gear Autopilot <strong>and</strong> <strong>Flight</strong> PathChapter 6 : <strong>Flight</strong>Gear Autopilot <strong>and</strong> <strong>Flight</strong> PathIn the previous chapter the architecture <strong>of</strong> the required files to model <strong>and</strong> simulateCessna 182 RC without autonomous flight <strong>and</strong> the ways used to construct them weredescribed. However, to perform autonomous flight simulation autopilot configurationfile must be added <strong>and</strong> a waypoint must be calculated to construct the UAV flight path.This chapter starts by giving a brief overview <strong>of</strong> PID (Proportional, Integral, <strong>and</strong>Derivative) controller used in the <strong>Flight</strong>Gear autopilot, then it describes the Autopilotconfiguration file <strong>and</strong> the Autopilot tuning process, <strong>and</strong> finally, it explains how theflight path was constructed <strong>and</strong> deployed within the <strong>Flight</strong>Gear navigation system.6.1 PID controllerTypical autopilots are built using a PID algorithm. Typically a PID controllermanipulates one control output to force a current value (or process value) towards atarget value (or reference point). The information in this section was taken fromOlson, 2004.6.1.1 ProportionalAll three components <strong>of</strong> the PID algorithm are driven by the difference between thecurrent value <strong>and</strong> the target value. This difference (or error) is called for one particulartime step en. For that same time step, the current value is yn<strong>and</strong> the target point r n.en= r − y6.1nnThe output value is called un.The proportional component simply calculates unbased on the size <strong>of</strong> the error enbymultiplying it by a constant, K .nPnPu = K . e6.26.1.2 IntegralIntegral refers to the area under a curve. The integral <strong>of</strong> a function produces a secondfunction, which gives the area under curve <strong>of</strong> the first function.By multiplying the en, which is the difference between the process value <strong>and</strong> thereference point at each step time, by dt(the time step) the area, which approximates theerror under the curve for this step time, can be calculated. . An approximation <strong>of</strong> thearea under the curve can be calculated by adding those areas up over time.41


Chapter 6: <strong>Flight</strong>Gear Autopilot <strong>and</strong> <strong>Flight</strong> Path6.1.3 DerivativeThe derivative <strong>of</strong> a function is the rate <strong>of</strong> change <strong>of</strong> its output. If the function is known,the derivative <strong>of</strong> that function can be taken to produce a second function. For any pointin time, the derivative function will give the rate <strong>of</strong> change (or slope) <strong>of</strong> the firstfunction.In the context <strong>of</strong> controller, the rate <strong>of</strong> change from each time step to the next is veryimportant information, which can be helpful in building a more stable system that canachieve the target value quickly.6.1.4 Combining P + I + DThe proportional component is very stable. The Integral <strong>and</strong> Derivative componentsare very unstable.If the proportional is the only controller used, it will be very stable but will stabilize tothe wrong value.If the integral is the only controller used, it will quickly achieve the target value, butwill overshoot, then overcompensate, <strong>and</strong> will oscillate wildly around the target value.It is very unstable.The trick then is to combine these components together by summing them. The actualoutput is equal to the P component output plus the I component output plus the Doutput. A weighting value should be assigned to each component to increase ordecrease its relative power to influence the final output value.u = K . uP + K . uI + K . uD6.3nPnInDnThe PID controller is quite simple to implement. The real trick in creating a wellbehaved PID controller <strong>and</strong> a well behaved autopilot is tuning the relative weights <strong>of</strong>each <strong>of</strong> the P, I, <strong>and</strong> D components.6.2 <strong>Flight</strong>Gear autopilot<strong>Flight</strong>Gear uses a PID algorithm designed by Roy Ovesen. <strong>Flight</strong>Gear implements thealgorithm in a flexible way, which makes it reusable with similar aircrafts. Anynumber <strong>of</strong> PID controllers can be defined in the autopilot configuration file. Eachcontroller can be assigned a process value, reference point, any number <strong>of</strong> outputvalues, <strong>and</strong> other tuning constants. Moreover, cascading controllers can beimplemented by specifying multiple PID controllers, in which the output <strong>of</strong> the currentstage is used as the input to the next stage (Olson, 2004).The complete generic autopilot configuration file is shown in Figure 6.1, Figure 6.2,Figure 6.3, Figure 6.4, Figure 6.5, Figure 6.6, <strong>and</strong> Figure 6.7 respectively.42


Chapter 6: <strong>Flight</strong>Gear Autopilot <strong>and</strong> <strong>Flight</strong> PathFigure 6.1: Autopilot configuration file (a)43


Chapter 6: <strong>Flight</strong>Gear Autopilot <strong>and</strong> <strong>Flight</strong> PathFigure 6.2: Autopilot configuration file (b)44


Chapter 6: <strong>Flight</strong>Gear Autopilot <strong>and</strong> <strong>Flight</strong> PathFigure 6.3: Autopilot configuration file (c)45


Chapter 6: <strong>Flight</strong>Gear Autopilot <strong>and</strong> <strong>Flight</strong> PathFigure 6.4: Autopilot configuration file (d)46


Chapter 6: <strong>Flight</strong>Gear Autopilot <strong>and</strong> <strong>Flight</strong> PathFigure 6.5: Autopilot configuration file (e)47


Chapter 6: <strong>Flight</strong>Gear Autopilot <strong>and</strong> <strong>Flight</strong> PathFigure 6.6: Autopilot configuration file (f)48


Chapter 6: <strong>Flight</strong>Gear Autopilot <strong>and</strong> <strong>Flight</strong> PathFigure 6.7: Autopilot configuration file (g)49


Chapter 6: <strong>Flight</strong>Gear Autopilot <strong>and</strong> <strong>Flight</strong> PathAccording to Olson (2004), the best start to constructing the autopilot configurationfile for the modelled aircraft is by copying the autopilot configuration file from anexisting, similar aircraft, <strong>and</strong> tuning the autopilot parameters to adapt to the modelledaircraft. The most basic method <strong>of</strong> tuning autopilot parameters is the trial <strong>and</strong> errormethod. In this method the proportional gain, integral time, <strong>and</strong> derivative time areadjusted until the performance is acceptable. (Please refer to the reference for moredetails about tuning methods <strong>and</strong> tips).Fortunately, in the case <strong>of</strong> the Cessna 182 RC, the Rascal 110 RC autopilotconfiguration file was very effective, <strong>and</strong> few refinements were made. However, thereare some parts in the file are not documented clearly, <strong>and</strong> could not be understood.6.3 Constructing the UAV <strong>Flight</strong> Path (Route)<strong>Flight</strong>Gear is used for navigation fixed waypoints such as airports <strong>and</strong> navigation aidssuch as radio stations. The fixed points are determined by latitude <strong>and</strong> longitude.<strong>Flight</strong>Gear uses a database created by Robin A. Peel, in which a unique ID <strong>and</strong> itslatitude <strong>and</strong> longitude coordinates identify each waypoint. When a waypoint is enteredin the aircraft route during the simulation time, <strong>Flight</strong>Gear checks this database to seeif it is a valid fixed point or not. This data is stored in the compressed file calledfix.dat, which can be found in the directory FG_ROOT\ <strong>Flight</strong>Gear\data\Navaids.Because <strong>Flight</strong>Gear is used to replicate the real navigation system around the world, itwas clear that none <strong>of</strong> the waypoints stored in the <strong>Flight</strong>Gear fix database weresuitable for the Cessna 182 RC UAV. Consequently, a way <strong>of</strong> calculating the UAVflight route had to be found.6.7.1 Calculating the Cessna 182 RC routeSince the UAV is a small aircraft <strong>and</strong> has a limited range, it was logical that the flightroute should be short. The free s<strong>of</strong>tware map Google Earth provides a very helpfulway to calculate the waypoints <strong>of</strong> the flight route.An area around Sheffield University was chosen to calculate the flight path byidentifying a number <strong>of</strong> waypoints <strong>and</strong> draw a line to connect them. For eachwaypoint, the latitude <strong>and</strong> longitude values were recorded (they should be in degrees)<strong>and</strong> assigned a unique ID (for instance UAV01, UAV02, etc). An example is shown inFigure 6.8.50


Chapter 6: <strong>Flight</strong>Gear Autopilot <strong>and</strong> <strong>Flight</strong> PathFigure 6.8: Cessna 182 RC flight path6.7.2 Deploying the Calculated Waypoints with <strong>Flight</strong>Gear DatabaseIn order to deploy the calculated waypoints with <strong>Flight</strong>Gear, the fix.dat database had tobe altered by adding those waypoints with their IDs. This can be done simply byextracting the fix.dat file, opening it with TextPad <strong>and</strong> adding the waypoints, <strong>and</strong>finally deleting the old compressed fix.dat file <strong>and</strong> recompressing the modified fix.dat.Figure 6.9: Modifying the <strong>Flight</strong>Gear fix databaseThis chapter indicated that tuning the <strong>Flight</strong>Gear autopilot to adapt with the modelledUAV does not require a specialist control engineer, because it is a generic <strong>and</strong> can bereused with similar aircrafts. It also indicated that in order to construct the flight path,the <strong>Flight</strong>Gear navigation system must be altered, which could be done because<strong>Flight</strong>Gear is an open source project.51


Chapter 7: Running <strong>and</strong> Testing the <strong>Simulation</strong>Chapter 7 : Running <strong>and</strong> Testing the <strong>Simulation</strong>To run the modelled Cessna 182 RC UAV simulation <strong>Flight</strong>Gear flight simulatorversion 0.9.10 should be installed <strong>and</strong> configured properly.( Please refer to the<strong>Flight</strong>Gear documentation on how to install <strong>and</strong> configure <strong>Flight</strong>Gear). The projectwas done using Windows operating system.The modelled UAV main folder (Rc-Cessna-182) with its contents should be placed inthe directory:FG_ROOT\<strong>Flight</strong>Gear\data\Aircraft\Rc-Cessna-182For instance:C:\Program Files\<strong>Flight</strong>Gear\data\Aircraft\Rc-Cessna-1827.1 Starting <strong>Flight</strong>Gear <strong>Flight</strong> SimulatorThe <strong>Flight</strong>Gear can be started from comm<strong>and</strong> line, from the desktop short cut shown inFigure 7.1, or from the programmes list. The processes described here use the desktopshort cut.Figure 7.1: <strong>Flight</strong>Gear desktop short cut7.2 Selecting the Cessna 182 RCThe first window in <strong>Flight</strong>Gear wizard allows the selection <strong>of</strong> an aircraft. The Cessna182 RC can be selected by clicking on the UAV name (c182(R/C)), <strong>and</strong> then clickingnext as shown in Figure 7.2.52


Chapter 7: Running <strong>and</strong> Testing the <strong>Simulation</strong>Figure 7.2: Selecting Cessna 182 RC in <strong>Flight</strong>Gear wizard7.3 Selecting the Take <strong>of</strong>f LocationThe next window after Select aircraft window is Select a location window. In thiswindow the airport is selected. It does not matter which airport is selected, because thelocation <strong>of</strong> the Cessna 182 RC will be defined by latitude <strong>and</strong> longitude later. Figure7.3 shows the Select a location window.Figure 7.3: Selecting a take <strong>of</strong>f location in <strong>Flight</strong>Gear wizard53


Chapter 7: Running <strong>and</strong> Testing the <strong>Simulation</strong>7.4 Setting the <strong>Simulation</strong> ParametersThe third window in the <strong>Flight</strong>Gear wizard is the settings window. From this window,the parameters <strong>of</strong> the simulation can be specified. The main settings window is shownin Figure 7.4.Figure 7.4: Main settings window in <strong>Flight</strong>Gear wizardImportant settings should be done from the advanced settings button. These settingsare:7.4.1 Setting the <strong>Flight</strong> Dynamic ModelThis can be done from the advanced settings window by clicking on the <strong>Flight</strong> Modelon the left window as shown in Figure 7.5 , <strong>and</strong> making sure that FDM setting is jsp (JSBSim model ), which is the default <strong>Flight</strong>Gear setting.54


Chapter 7: Running <strong>and</strong> Testing the <strong>Simulation</strong>Figure 7.5: Setting <strong>Flight</strong> Dynamic Model in <strong>Flight</strong>Gear wizard7.4.2 Setting Latitude <strong>and</strong> Longitude Coordinates <strong>of</strong> the Take <strong>of</strong>f PointThis can be done from the advance settings window by clicking on initial Position onthe left window as shown in Figure 7.6, <strong>and</strong> specifying the coordinates in degrees. Thispoint is the first point in the calculated flight route.Figure 7.6: Settings <strong>of</strong> the Cessna 182 RC initial position in <strong>Flight</strong>Gear wizard55


Chapter 7: Running <strong>and</strong> Testing the <strong>Simulation</strong>7.5 Running the <strong>Simulation</strong>The simulation can be run from the main settings window by clicking on the Runbutton. Please refer to the <strong>Flight</strong>Gear user manual on how to use the keyboard ormouse to control the aircraft, <strong>and</strong> to see the aircraft from different views. Figure 7.7shows the Cessna 182 RC on the ground before take <strong>of</strong>f.Figure 7.7: Cessna 182 RC before take <strong>of</strong>f7.5.1 Settings for the AutopilotThe autopilot settings can be specified from the autopilot settings window shown inFigure 7.8.Figure 7.8: Autopilot settings window56


Chapter 7: Running <strong>and</strong> Testing the <strong>Simulation</strong>7.5.2 Specifying the WaypointsWaypoints can be specified before or during the flight from the add waypoint window,as shown Figure 7.9. It is also possible to remove any waypoint during the flight.Figure 7.9: Add waypoints window7.6 Testing the <strong>Simulation</strong>After setting the autopilot <strong>and</strong> adding the waypoints to the flight path, an autonomousflight simulation was ready to test. The autonomous simulation was performed withvery satisfactory performance. For instance, autopilot can control the UAV to ascendto the specified altitude <strong>and</strong> hold it, as shown in Figure 7.10 <strong>and</strong> Figure 7.11 byactivating the altitude hold in the autopilot settings window.Figure 7.10: Cessna 182 RC in hold altitude flight57


Chapter 7: Running <strong>and</strong> Testing the <strong>Simulation</strong>Figure 7.11: Side view for Cessna 182 RC altitude hold flightIt is also possible to hold a constant speed, zero bank angle, pitch angle, angle <strong>of</strong>attack. To force the UAV to follow the selected waypoints, the true heading should beactivated in the autopilot settings window. Figure 7.12 shows the Cessna 182following the waypoints listed in the top left <strong>of</strong> the screen.Figure 7.12: Cessna 182 RC in True heading flight58


Chapter 8: Conclusion <strong>and</strong> Future WorkChapter 8 : Conclusion <strong>and</strong> Future Work<strong>Unmanned</strong> aerial vehicles (UAVs) can replace manned vehicles in many applications,either military or civilian, due to the possibility <strong>of</strong> reaching dangerous <strong>and</strong> inaccessibleareas without exposing pilots to any risks. The UAVs can be remotely piloted byground operator or autonomously by an onboard autopilot. Some UAVs have internalspace to carry payload such as sensors <strong>and</strong> cameras. Although UAVs have beendevolved mainly in military laboratories to perform military operations, there isgrowing interest in the developing process from academic researchers <strong>and</strong> hobbyists toextend their use to other applications in civilian operations such as searching formissing people, aerial photography, monitoring <strong>of</strong> sea pollution <strong>and</strong> traffic control.<strong>Flight</strong> Dynamic Models <strong>and</strong> <strong>Flight</strong> Simulators are used in the development process <strong>of</strong>the UAV to test its design <strong>and</strong> control systems, since it reduces the time <strong>and</strong> the risks<strong>of</strong> damaging the UAV in the real flight.In any <strong>Flight</strong> Dynamic Model, the coefficients <strong>of</strong> lift, drag, <strong>and</strong> side forces <strong>and</strong> roll,pitch, <strong>and</strong> yaw moments must be estimated in order to calculate the forces <strong>and</strong>moments acting on the UAV.The combination <strong>of</strong> <strong>Flight</strong>Gear <strong>Flight</strong> Simulator <strong>and</strong> JSBSim <strong>Flight</strong> Dynamic model,which are open source projects written in the C++ programming language <strong>and</strong> used inthis project, provided a solid base for building the simulation environment.To model the Cessna 182 RC UAV (or any aircraft) in JSBSim <strong>Flight</strong> Dynamic Model<strong>and</strong> simulate it with <strong>Flight</strong>Gear flight simulator, essential configuration files must beconstructed. These files include main Cessna 182 configuration, engine configuration,propeller configuration, electric system configuration, <strong>and</strong> 3D model configuration, foran autonomous flight autopilot configuration file is required. All these files are tiedtogether in the top level configuration file.The real challenge was to construct an accurate model for the Cessna 182 RC due tothe need to estimate its parameters as accurately as possible. Some <strong>of</strong> these parameterswere measured physically from the Cessna 182 RC UAV, <strong>and</strong> others were generatedby the free web application Aeromatic v8.0. However, not all parameters could begenerated by Aeromatic, therefore, the similar UAV Rascal 110 RC was used toestimate the missing parameters, <strong>and</strong> to refine some parameters. The constructedconfiguration files format should be the format <strong>of</strong> JSBSim version 2.0 in order to workwith the current version <strong>of</strong> <strong>Flight</strong>Gear <strong>and</strong> JSBSim.In order to visualise the JSBSim model output <strong>of</strong> the Cessna 182 RC UAV with<strong>Flight</strong>Gear, a 3D graphical model was constructed by using the commercial 3Dmodelling s<strong>of</strong>tware AC3D. The 3D graphical model <strong>of</strong> the real Cessna 182, which isavailable to download from the <strong>Flight</strong>Gear web page, was the starting point forconstructing a 3D graphical model <strong>of</strong> the Cessna 182 RC UAV. The model was resizedto fit the UAV dimensions, <strong>and</strong> a quite tedious process was performed to allocatethe 3D model within <strong>Flight</strong>Gear.The autopilot configuration file was constructed with the help <strong>of</strong> the Rascal 110 RCautopilot configuration file. The tuning process involved changing the autopilotconstants until an acceptable performance was achieved.The flight path needed to be followed by the autopilot was constructed from waypointscalculated over a selected area by using the free s<strong>of</strong>tware map, Google Earth. Then thecalculated waypoints were deployed in the <strong>Flight</strong>Gear navigation system.By combining all the files <strong>and</strong> arranging them in specific folders within <strong>Flight</strong>Gearflight simulator, the simulation was performed perfectly, <strong>and</strong> the modelled Cessna 182RC UAV was flown normally by an operator, <strong>and</strong> autonomously by its autopilot. The59


Chapter 8: Conclusion <strong>and</strong> Future Workautopilot has the capability to perform many tasks such as altitude, velocity hold, bankangle, pitch angle, <strong>and</strong> true heading hold.Although many challenges were faced at the beginning <strong>of</strong> the project due to the needto investigate different approaches, <strong>and</strong> the lack <strong>of</strong> clear documentation for <strong>Flight</strong>Gearflight simulator, the aims <strong>of</strong> the project were met, <strong>and</strong> the project deliverablesspecified in section 1.2 were all delivered.The outcomes <strong>of</strong> the project were a complete JSBSim flight dynamic model <strong>and</strong> a 3Dgraphical model for the Cessna 182 RC UAV, an effective <strong>Flight</strong>Gear autopilot. Anautonomous <strong>Flight</strong> was performed.This project also opens the doors to future work in performing Hardware-in-the-loop(HITL) simulation, in which the physical system, for instance onboard autopilot, to betested is fooled into thinking that it is working with real inputs <strong>and</strong> outputs. This canbe done by connecting the autopilot hardware to <strong>Flight</strong>Gear flight simulator <strong>and</strong>configuring it to control the Cessna 182 RC UAV instead <strong>of</strong> <strong>Flight</strong>Gear autopilot.60


ReferencesReferencesAnderson, D.F. & Eberhardt, S. (2001), Underst<strong>and</strong>ing <strong>Flight</strong>, McGraw-Hill.Berndt, J.S. (2000), JSBSim The Open Source <strong>Flight</strong> Dynamics Model in C++viewed 16/08/ 2006 .Berndt, J.S. (2005), A Journal for the Creation <strong>and</strong> Refinement <strong>of</strong> a JSBSimAircraft <strong>Flight</strong> Model, viewed 18/08/ 2006.Cameron, K. (1995), <strong>Unmanned</strong> Aerial Vehicle Technology, Report NumberDSTO-GD-0044, Aeronautical <strong>and</strong> Maritime Research Laboratory,Melbourne, Australia.Houghton, E.L. & Carpenter, P.W. (2003), Aerodynamics for EngineeringStudents, Fifth ed, Butterworth-Heinemann.Megginson, D. (2002), Mini-HOWTO: 3D Aircraft Models in <strong>Flight</strong>Gear, viewed19/08/ 2006 .Olson, C.L. (2004), <strong>Flight</strong>Gear Autopilot: Theory, Configuration, <strong>and</strong> Tuningviewed 18/08/ 2006 .Zyskowski, M.K. (2003), 'AIRCRAFT SIMULATION TECHNIQUES USED INLOW-COST, COMMERCIAL SOFTWARE', paper presented to theAIAA <strong>Modelling</strong> <strong>and</strong> <strong>Simulation</strong> Technologies, Austin, Texas, 11-14August 2003.(WWW1), '<strong>Flight</strong> Simulator', viewed 16 August 2006 ,.(WWW2), AeroSim Blockset<strong>Unmanned</strong> Dynamics, viewed 16/08/ 2006 .(WWW3), Introduction to <strong>Flight</strong>Gear, viewed 17/08/ 2006.(WWW4), <strong>Flight</strong>Gear Features, viewed 17/08/ 2006.(WWW5), Micros<strong>of</strong>t <strong>Flight</strong> Simulator 2004, viewed 17/08/ 2006.(WWW6), Aeromatic, viewed 19/08/ 2006.(WWW7), AC3D, viewed 20/08/ 2006 .61

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!