formation flight autopilot design for the gaf jindivik mk...

98
Richard Lancaster Formation flight autopilot design for the GAF Jindivik Mk 4A UAV College of Aeronautics MSc thesis

Upload: ledieu

Post on 25-Jul-2018

220 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Richard Lancaster

Formation flight autopilot design forthe GAF Jindivik Mk 4A UAV

College of Aeronautics

MSc thesis

Page 2: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

College of AeronauticsMSc thesisAcademic Year 2003-2004

Richard Lancaster

Formation flight autopilot design forthe GAF Jindivik Mk 4A UAV

Supervisor: Mike Cook

September 2004

This thesis is submitted in partial fulfilment of the requirementsfor the degree of Master of Science.

c© Cranfield University 2004. All rights reserved. No part of this publication may bereproduced without the written permission of the copyright owner.

hey0401
线条
Page 3: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Abstract

This thesis details the development of an autopilot control system capable of flying aJindivik Mk 4A unmanned air vehicle (UAV) in a specified formation position relativeto a lead aircraft. The thesis covers the design process up to and including the testingof the system in a full non-linear simulation.

Page 4: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Acknowledgements

Mike Cook (Supervisor, flight dynamics lecturer and Jindivik authority)

Tony Steer (Non-linear simulation lecturer)

Pio Fitzgerald (Jindivik Simulink model author)

Martin Eshelby (For useful turn rate data)

Stewart Houston (For giving me a spark of understanding)

Alistair Cook (Control systems lecturer)

Dawn Packham and Sandra Fairs (For keeping things running smoothly)

Page 5: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Contents

Contents 2

List of Figures 5

List of Acronyms 6

1 Introduction 71.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71.2 Objective . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71.3 The Jindivik . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81.4 Controller requirements . . . . . . . . . . . . . . . . . . . . . . . . . 81.5 Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101.6 Design methodology . . . . . . . . . . . . . . . . . . . . . . . . . . 101.7 Literature review . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121.8 Axis systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

2 Model assimilation, trimming, validation and linearisation 152.1 Assimilation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152.2 Trimming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162.3 Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202.4 Linearisation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

3 Stability augmentation system design 263.1 Longitudinal augmentation . . . . . . . . . . . . . . . . . . . . . . . 263.2 Lateral augmentation . . . . . . . . . . . . . . . . . . . . . . . . . . 28

4 Control system design 324.1 Control philosophy . . . . . . . . . . . . . . . . . . . . . . . . . . . 324.2 Altitude acquire and hold controller . . . . . . . . . . . . . . . . . . 344.3 Heading acquire and hold controller . . . . . . . . . . . . . . . . . . 454.4 Speed acquire and hold controller . . . . . . . . . . . . . . . . . . . 544.5 Cross track controller . . . . . . . . . . . . . . . . . . . . . . . . . . 544.6 Along track controller . . . . . . . . . . . . . . . . . . . . . . . . . . 57

1

Page 6: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

5 System performance 595.1 Test case 1: Formation acquisition . . . . . . . . . . . . . . . . . . . 595.2 Test case 2: Formation hold . . . . . . . . . . . . . . . . . . . . . . . 635.3 Test case 3: Transition from acquisition to hold . . . . . . . . . . . . 645.4 Test case 4: Transition from acquisition to hold with wind . . . . . . 68

6 Conclusions 76

Bibliography 79

A Trimming and linearisation code 80

B Pitch attitude demand to altitude transfer function generation 89

C Bank angle demand to heading transfer function generation 91

D Heading demand to lateral position transfer function generation 93

2

Page 7: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

List of Figures

1.1 The GAF Jindivik. . . . . . . . . . . . . . . . . . . . . . . . . . . . 91.2 Basic specifications and performance characteristics of the Jindivik

Mk 4 short wing span variant with Mk 9 wing pods. . . . . . . . . . . 9

2.1 Illustration of the exhaustive search cube. . . . . . . . . . . . . . . . 172.2 Pseudo code version of the hill walking trim refinement algorithm. . . 182.3 Calculated trim settings for straight and level flight between 200ft/s

and 800ft/s at 10000ft altitude with 30 gallons of fuel. . . . . . . . . . 192.4 Longitudinal responce of the model to a -1 degree step elevator deflec-

tion when trimmed out in straight and level flight at 10000ft, 450ft/swith 30 gallons of fuel. . . . . . . . . . . . . . . . . . . . . . . . . . 21

2.5 Lateral responce of the model to a -1 degree, 2.5 second aileron pulsewhen trimmed out in straight and level flight at 10000ft, 450ft/s with30 gallons of fuel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

2.6 Flight path responce of the model to a -1 degree, 1 second aileron pulsewhen trimmed out in straight and level flight at 10000ft, 450ft/s with30 gallons of fuel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

2.7 Calculated longitudinal state space representation matrices for aircraftin trimmed straight and level flight at 10000ft, 450ft/s with 30 gallonsof fuel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

2.8 Calculated lateral state space representation matrices for aircraft intrimmed straight and level flight at 10000ft, 450ft/s with 30 gallonsof fuel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

2.9 Transfer functions from elevator to longitudinal state variables for air-craft in trimmed straight and level flight at 10000ft, 450ft/s with 30gallons of fuel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

2.10 Transfer functions from ailerons to lateral state variables for aircraft intrimmed straight and level flight at 10000ft, 450ft/s with 30 gallons offuel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

3.1 Longitudinal and lateral modes of the unaugmented Jindivik in the10000ft, 450ft/s, 30 gallons of fuel flight condition. . . . . . . . . . . 27

3.2 Block diagram of the pitch rate feedback to elevator stability augmen-tation loop. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

3

Page 8: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

3.3 Root locus plot of theq(s)/η(s) transfer function of the unaugmentedaircraft for negative values of K. . . . . . . . . . . . . . . . . . . . . 29

3.4 Calculated longitudinal state space representation matrices for the sta-bility augmented aircraft in trimmed straight and level flight at 10000ft,450ft/s with 30 gallons of fuel. . . . . . . . . . . . . . . . . . . . . . 30

3.5 Transfer functions from elevator to longitudinal state variables for sta-bility augmented aircraft in trimmed straight and level flight at 10000ft,450ft/s with 30 gallons of fuel. . . . . . . . . . . . . . . . . . . . . . 30

3.6 Longitudinal modes of the augmented Jindivik in the 10000ft, 450ft/s,30 gallons of fuel flight condition. . . . . . . . . . . . . . . . . . . . 31

4.1 Illustration of a divergent formation pair. . . . . . . . . . . . . . . . . 334.2 Illustration of a stabilised formation pair. . . . . . . . . . . . . . . . . 334.3 Block diagram of the complete control system. . . . . . . . . . . . . 354.4 Block diagram of the altitude acquire and hold controller. . . . . . . . 354.5 Block diagram of the altitude acquire and hold controller’s inner loop

pitch attitude PI controller. . . . . . . . . . . . . . . . . . . . . . . . 374.6 Block diagram of the altitude acquire and hold controller’s outer loop

PID controller. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374.7 Root locus plot of theθ(s)/η(s) transfer function of the stability aug-

mented aircraft for negative values of K. . . . . . . . . . . . . . . . . 384.8 Responce of the attitude acquire and hold controller to a 2.0 degree

(0.035 radian) step change in pitch attitude demand when trimmed outin straight and level flight at 10000ft, 450ft/s with 30 gallons of fuel. . 40

4.9 Root locus plot of theh(s)/dθ(s) transfer function for positive valuesof K. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

4.10 Responce of the altitude acquire and hold controller to a 2000ft stepchange in altitude demand when trimmed out in straight and level flightat 10000ft, 450ft/s with 30 gallons of fuel. . . . . . . . . . . . . . . . 44

4.11 Block diagram of the elevator roll compensator. . . . . . . . . . . . . 454.12 Block diagram of the heading acquire and hold controller. . . . . . . . 464.13 Block diagram of the heading acquire and hold controller’s inner loop

bank angle P controller. . . . . . . . . . . . . . . . . . . . . . . . . . 464.14 Block diagram of the heading acquire and hold controller’s outer loop

P controller. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464.15 Root locus plot of theφ(s)/ξ(s) transfer function for negative values

of K. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484.16 Responce of the bank angle acquire and hold controller to a 0.5 ra-

dian (29 degree), 15 second long pulse in bank attitude demand whentrimmed out in straight and level flight at 10000ft, 450ft/s with 30 gal-lons of fuel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

4.17 Root locus plot of theψ(s)/dφ(s) transfer function for positive valuesof K. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51

4

Page 9: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

4.18 Responce of the heading acquire and hold controller to a 1.0 radianstep change in heading demand when trimmed out in straight and levelflight at 10000ft, 450ft/s with 30 gallons of fuel. . . . . . . . . . . . . 52

4.19 Block diagram of the lead aircraft bank angle follower. . . . . . . . . 534.20 Block diagram of the speed acquire and hold controller. . . . . . . . . 554.21 Responce of the speed acquire and hold controller to a 50ft/s step

change in speed demand when trimmed out in straight and level flightat 10000ft, 450ft/s with 30 gallons of fuel. . . . . . . . . . . . . . . . 55

4.22 Block diagram of the cross track error minimisation controller. . . . . 564.23 Root locus plot of theE(s)/dψ(s) transfer function for positive values

of K. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 584.24 Block diagram of the along track error minimisation controller. . . . . 58

5.1 Illustration of the initialisation state and lead aircraft flight path for testcase 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

5.2 Flight paths of lead and trail aircraft from a simulation run of test case 1. 615.3 Altitude, heading and speed of the trail aircraft in comparison to the

cross track and along track errors from a simulation run of test case 1. 625.4 Illustration of the initialisation state and lead aircraft flight path for test

case 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 645.5 Altitude, heading and speed of the trail aircraft in comparison to the

cross track and along track errors from a simulation run of test case 2. 655.6 Three dimensional visualisation of the two aircraft during the test case 2

S-turn maneuver. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 665.7 Illustration of the initialisation state and lead aircraft flight path for test

case 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 675.8 Flight paths of lead and trail aircraft from a simulation run of test case 3. 705.9 Altitude, heading and speed of the trail aircraft in comparison to the

cross track and along track errors from a simulation run of test case 3. 715.10 Altitude, heading and speed of the trail aircraft in comparison to the

cross track and along track errors from the final 100 seconds of a sim-ulation run of test case 3. . . . . . . . . . . . . . . . . . . . . . . . . 72

5.11 Flight paths of lead and trail aircraft from a simulation run of test case 4. 735.12 Altitude, heading and speed of the trail aircraft in comparison to the

cross track and along track errors from a simulation run of test case 4. 745.13 Altitude, heading and speed of the trail aircraft in comparison to the

cross track and along track errors from the final 100 seconds of a sim-ulation run of test case 4. . . . . . . . . . . . . . . . . . . . . . . . . 75

5

Page 10: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

List of Acronyms

DOD Department of Defence (US)DOF Degrees of FreedomFCS Flight Control SystemGAF Goverment Aircraft Factories (Australia)GPS Global Positioning SystemINS Inertial Navigation SystemP Proportional controllerPI Proportional plus Integral controllerPID Proportional, Integral, Derivative controllerSAS Stability Augmentation SystemSEAD Supresion of Enermy Air DefenceSIGINT Signals InteligenceUAV Unmanned Air VehicleUCAV Unmanned Combat Air Vehicle

6

Page 11: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Chapter 1

Introduction

1.1 Background

In recent years the desire the utilise Unmanned Air Vehicles (UAVs) for combat oper-ations has proliferated throughout the majority of the world’s military powers. This isdriven partly by defense spending cutbacks and partly by the political desire to reducethe number of human operatives placed in harms way in the battlespace.

In its recent roadmap document [1] the US Department of Defense projected that by2020, Unmanned Combat Air Vehicles (UCAVs), will be undertaking a whole spec-trum of reconnaissance (Maritime patrol, SIGINT, surveillance, battle management)and ground attack (SEAD, strike) roles.

Enabling UCAVs to perform such roles in an airspace populated by other UAVs,manned military platforms and civilian vehicles will therefore require advanced FlightControl Systems (FCS). These will need to support a multitude of autopilot modes, in-cluding coordinated takeoff and landing, waypoint following, loiter, formation flight,evasive maneuvers, targeted observation and ground strike.

1.2 Objective

The objective of this project was therefore to develop a formation flight autopilot con-troller for the GAF Jindivik Mk 4A UAV and test it up to the level of a full non-linearsimulation.

7

Page 12: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

1.3 The Jindivik

The Mk 1 Jindivik first flew on the 28th August 1952. It was designed by the AustralianGovernment Aircraft Factories (GAF). Over the past 50 years the Jindivik has beenused as a weapons target by the Australian RAE and the British RAF. The Mk 4Aversion used in this project entered production in March 1981. A photo of the Jindivikis included in Figure 1.1 and basic specifications and performance characteristics aregiven in Figure 1.2.

The Jindivik was selected as the development platform for the autopilot because itis a jet powered aircraft of similar size and performance characteristics to many ofthe non-stealth UAVs being developed today. However unlike these contemporaryplatforms for which the flight dynamics data is classified, the data for the Jindivikis readily available, as neighboring Cranfield Aerospace Ltd is currently the designauthority for the aircraft. This has resulted in a full non-linear Simulink simulationmodel, developed by a previous Cranfield student, P Fitzgerald, being available foruse in the project. Hence all of the development effort could be directed at the designof the controller rather than the generation of the model.

As an aside, it must be noted that the real Jindivik Mk 4A possesses only elevator,aileron and throttle actuators and lands on a skid. However to aid in his research,Fitzgerald had added active rudder, flaps, spoilers, retractable undercarriage and thrustvectoring to his model. Therefore for the purposes of this thesis these additional actu-ators were all set to their zero positions to make the model behave comparably to thereal Jindivik.

1.4 Controller requirements

The requirements for the formation flight autopilot controller were defined as follows:

1. The formation flight autopilot controller will control the flight path of the Jindi-vik aircraft.

2. The Jindivik will be the “trail” aircraft in a formation pair.

3. Another aircraft, possibly of a different type, will be specified as the “lead”aircraft in the formation pair. This aircraft will follow a flight path, unknown inadvance by the trail Jindivik, dictated by its own autopilot or a human pilot.

4. The controller must maneuver the Jindivik to a target formation point at a givenxyz offset relative to the lead aircraft. Then hold the Jindivik on the target for-mation point with a maximum error of 10m (33ft).

8

hey0401
线条
hey0401
线条
hey0401
线条
hey0401
线条
hey0401
线条
Page 13: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Figure 1.1: The GAF Jindivik.

Wing span 6.32mWing area 7.06m2

Length (excluding nose probe) 7.11mWeight empty 1315kgMax take-off weight 1655kg

Max level speed at operational ceiling Mach 0.86 (490knots)Operational ceiling 16460m (54000ft)Max range 1482km (800nm)

Figure 1.2: Basic specifications and performance characteristics of the Jindivik Mk 4short wing span variant with Mk 9 wing pods.

9

Page 14: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

5. The offset of the target formation point from the lead aircraft will be specified inthe formation axis system defined in section 1.8.3.

6. The maximum offset of the target formation point from the lead aircraft will be100m (328ft).

7. The lead aircraft must be traveling at a speed between 200 knots (338ft/s) and325 knots (550ft/s).

8. The lead aircraft must not perform a turn maneuver with a bank angle greaterthan 25 degrees (0.44 radians).

9. The lead aircraft must not climb or descend with a flight path angle greater than5 degrees (0.09 radians).

10. The controller must be able to cope with winds of up to 30 knots (51ft/s)

1.5 Assumptions

The following assumptions were made:

1. It was assumed that the Jindivik’s existing flight control system could be re-placed with a modern flight control computer. Capable of directly reading datafrom any of the sensors fitted to the aircraft and with 100% athority over theflight control surfaces and engine throttles.

2. It was assumed that, within reason, extra sensors could be added to the airframefor use by the autopilot.

3. It was assumed that, at any moment in time, reasonable estimates of the posi-tion, heading, speed and body orientation of the lead aircraft and the Jindivikare known to the Jindivik’s flight computer. With a combination of GPS mea-surements, inertial navigation systems, Kalman filtering and short range radio orlaser data links this is not an unreasonable assumption.

1.6 Design methodology

It was decided that classical control techniques would be used to develop the autopilotcontroller. Ever since the Sperry Gyroscope Company introduced its “Sperry Aero-plane Stabilizer” in 1914, the classical control approach has been used to design air-craft autopilot systems, and the technique is still widely in use today. This means

10

Page 15: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

that there is a large body of knowledge and information relating to the design of suchsystems for aircraft applications.

A further advantage is that the classical control approach maintains a clear intuitiverelationship between the control system and its physical effect on the behavior of theaircraft. Which is a good thing from both the point of view of the designer trying todesign such a system and the certification agencies trying to decide whether the systemachieves its specified objectives. This is not necessarily true of many modern controltechniques, which tend to hide the physical effect of the control system behind a wallof mathematics. So while such modern control techniques can produce a more optimalcontrol solution, they also tend to obfuscate how they are actually achieving the result.

The steps involved in the classical control system design approach used were as fol-lows, with results from later steps being fed back into earlier steps to refine the designdecisions:

1. Model assimilation, validation, trimming and linearisation

The Jindivik model as provided was morphed into a format suitable for use inthe project. It was then validated that it behaved like an aircraft, trim points werelocated and linearisation around the trim points was performed.

2. Stability augmentation

Stability Augmentation System (SAS) control loops were designed to improvethe natural handling qualities of the airframe.

3. Control philosophy development

A philosophy for achieving the formation flight control function was developed.

4. Implementation of the outer control loops

The control loops required to implement the control philosophy were designedand implemented.

5. Non-linear testing

The autopilot was evaluated against its requirements in a full non-linear simula-tion.

Nominally when designing such a control system the selection of gains for the stabilityaugmentation and outer loops would be performed at multiple flight conditions spreadacross the flight envelope. Gain schedules would then be designed to appropriatelyvary the responce of the control system across the envelope. However as the purposeof the thesis was to develop and evaluate a control philosophy, but not actually take itto the flight test stage, the design was therefore only performed around a single flight

11

Page 16: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

condition. This was an altitude of 10000ft, flying at 450ft/s (266 knots) with 30 gallonsof fuel in the tank. This allowed the control system to be demonstrated and validatedin a small envelope around this flight condition, without spending time repeating thesame calculations over and over again for multiple flight conditions. Obviously ina complete system design the flight envelope would need to be expanded and gainscheduling introduced.

1.7 Literature review

Basic history and specifications of the Jindivik Mk 4A aircraft are available from Jane’sall the World’s aircraft [2].

Details of the Jindivik Simulink model can be found in Fitzgerald’s comprehensiveaccompanying documentation [3]. This begins by detailing the interfaces to the model,including inputs, outputs and co-ordinate systems. It then proceeds to discuss theaerodynamic and engine contributions which go into making up the model. Followedby a discussion of the transfer functions of the aircraft’s sensors and actuators. As suchit therefore forms a detailed document on the basic technical and flight characteristicsof the aircraft.

Further Jindivik data and analysis can be found in Cook’s analytical report [4] onthe approach and landing characteristics of the Jindivik, and from the report [5] onthe Dymola simulation model developed by Cook and Gautrey which preceded theFitzgerald Simulink model.

Original source data on the Jindivik can be found in the aircraft design summary[6] and flight control computer technical requirements specification [7] by AerospaceTechnologies of Australia.

Both Cook [8] and Stevens and Lewis [9] contain detailed discussion of how to im-prove the stability of aircraft using the proportional feedback of aircraft states such aspitch rate to the control inputs.

General discussion of control system design can be found in standard control systemtexts such as Franklin [10] and Dorf [11]. These contain extensive coverage of classicaldesign techniques.

A good introduction to aircraft flight control systems is given in Nelson [12]. This hasa very readable style and clearly describes the difference between classical and moderndesign techniques. It covers the basics of classical design, including PID controllersand forward path compensators. Chapter 7 contains one of the clearest descriptionsavailable of the Ziegler and Nichols technique for tuning PID controllers. Design

12

Page 17: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

of basic pitch attitude, altitude and roll attitude controllers is covered, along with anintroduction to more advanced control systems such as those for automatic landing.

Similar coverage of classical flight control systems is also given in Stevens and Lewis[9]. Which gives coverage of automatic landing systems, turn coordination and navi-gational autopilots.

In depth mathematical coverage of classical flight control systems is given in McRuer[13]. This covers, both single and multi loop controller design. Included are examplesof longitudinal landing approach and lateral directional control systems.

In the same vein, Blakelock [14] gives an in depth mathematical coverage of classicallongitudinal and lateral autopilot design.

Techniques for the non-linear simulation of aerospace vehicles are covered compre-hensively in Stevens and Lewis [9].

Previous Cranfield theses relating to flight control of the Jindivik include those byFitzgerald [15] and Kerachian [16].

Fitzgerald’s thesis covers the design of an automatic landing system for the Jindivik.This is a comprehensive thesis that serves as a good reference for the design of classicalflight control systems in general and for the Jindivik in particular. It also containsinteresting commentary on the Jindivik’s flight characteristics.

Kerachian’s thesis covers the design of a terrain following autopilot system for theJindivik. This thesis is less rigorous than the Fitzgerald thesis but still serves as a goodreference.

Finally, a deliberate decision was made to not seek out information on previous designsfor formation flight autopilot controllers. This was because the author wished the thesisto be a pure design challenge in which he could make his own mistakes and learn fromthem.

1.8 Axis systems

Three axis systems were utilised in both the Jindivik model and the development ofthe control system. These were the Earth axis system, the aircraft body axis systemsand the formation axis system.

13

Page 18: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

1.8.1 Earth axis system

1. The Earth was assumed to be flat.

2. An arbitrary point on the Earth’s surface was defined as the origin (oe).

3. A right handed orthogonal system of axes (oe, xe, ye, ze) was defined at theorigin. Whereoexe pointed due North,oeye due East andoeze vertically down.

1.8.2 Aircraft body axis systems

1. Each aircraft had its own right handed orthogonal axis system (ob, xb, yb, zb)mapped onto it.

2. The origin (ob) was located at the center of gravity of the aircraft and was con-strained to move with it.

3. obxb was defined to point out through the aircraft’s nose,obyb out through theright hand wing andobzb out through the bottom of the aircraft.

4. The axis system was constrained to move with the aircraft as it rolled, pitchedand yawed.

1.8.3 Formation axis system

1. The right handed orthogonal formation axis system (of , xf , yf , zf ) was used tospecify the offset of the target formation point from the lead aircraft.

2. The axis system’s origin (of ) was co-located with the origin of the lead aircraft’sbody axis system.

3. ofxf was defined to be parallel to the Earth’s surface and to point in the compassheading direction of the lead aircraft.

4. ofzf was defined to point vertically down towards the Earth.

5. ofyf completed the right hand orthogonal set.

The xy plane of the formation axis system therefore always remains parallel to thesurface of the Earth, with theofxf axis aligned to the compass heading of the leadaircraft. This is important because if the formation axis system rolled and pitched withthe lead aircraft in the same way as the body axis system, then in low level flight witha reasonably spaced formation, the trail aircraft could be forced into the ground by therolling or pitching motion of the lead.

14

Page 19: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Chapter 2

Model assimilation, trimming,validation and linearisation

2.1 Assimilation

The Jindivik model as provided contained the following elements:

1. Aerodynamic, engine and gravity force models.

2. Actuator models.

3. Sensor models.

4. A model of a flight control system, including stability augmentation and autopi-lot controllers.

5. 6-DOF aircraft equations of motion.

The following modifications were therefore made in order to convert the model into aformat suitable for use in the project:

1. The flight control system, including both the stability augmentation and the au-topilot controllers, was stripped out.

2. The sensor models were removed and replaced with direct, zero lag, calculationsfrom the state variables.

3. The actuator models were removed and replaced with zero lag saturation limits.

15

Page 20: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

4. As described in Section 1.3, the inputs to the rudder, flaps, spoilers, retractableundercarriage and thrust vectoring actuators were all set to their zero positionsto make the model behave like a real Jindivik Mk 4A.

5. A simple wind model was designed and added. This allowed a steady wind tobe blown across the model from any direction.

6. Structure was added to feed a recording of a lead aircraft flight path into theautopilot during a simulation run.

2.2 Trimming

Before validating the model a routine to determine trim settings for specified flightconditions needed to be written.

Only straight and level flight conditions were considered, and as the aircraft is sym-metrical, lateral variables and control surfaces were ignored. A straight and level flightcondition could therefore be specified completely by the parameters speed, altitude andmass of fuel in the tank. The fuel mass essentially determining the center of gravity ofthe aircraft. The trim settings required to maintain the flight condition hence consistedof the engine thrust, aircraft pitch angle and the elevator deflection angle. Thereforegiven a flight condition, the trim routine needed to solve a three variable minimisationproblem to find the trim settings that best maintained the aircraft in the flight condition.

With a Simulink model this would normally be performed using the Matlab trim.mroutine. However experimentation with this on the model as provided produced unre-liable results. For some flight conditions the trim routine produced good trim settings,that when fed back into the full non-linear simulation trimmed the aircraft out well.However for other flight conditions, sometimes even ones positioned between two con-ditions that would trim correctly, the Matlab trim routine would go wild and requireactuator settings beyond the limits of the actuators. This didn’t inspire confidence.

The decision was therefore made to write a custom trim routine which didn’t utiliseany of the optimised search techniques employed by the built in Matlab routine. Thiswould then determine whether the problem was intrinsically with the model or simplyan interaction between the non-linearity of the model and the routines used in theMatlab trim functions.

Before discussing how the custom trim routine worked, it’s worth discussing how theroutine interacted with the Simulink model. From a Matlab script it is possible tomanually setup all the state variables within and inputs to a model. It is then possibleto ask Simulink to calculate the instantaneous rates of change of the states that would

16

Page 21: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

−50000

500010000

15000−1.5

−1−0.5

00.5

11.5−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

1

1.2

Elevator deflection (rad)Thrust (RPM)

Pitc

h an

gle

(rad

)

Figure 2.1: Illustration of the exhaustive search cube.

be produced, given the set of states and inputs. Hence the trim routine could setup thestates and inputs to represent a particular flight condition and a trim setting it wanted totest. Then get Simulink to calculate how rapidly the model’s states would be changingwith the particular trim setting. If the aircraft was perfectly trimmed in the flightcondition then the instantaneous rates of change of the state variablesθ (pitch angle),q (pitch rate),u (velocity in x-axis) andw (velocity in z-axis) would all be zero.

Hence the trim routine could perform a search through different trim settings untilit found the one that best minimised the rate of change of these four variables for aparticular flight condition. How well it minimised them could be evaluated with a costfunction such as that in equation 2.1. Where the lower the cost function the better theaircraft is trimmed.

cost =√

θ2 + q2 + u2 + w2 (2.1)

For a particular flight condition, the custom trim routine performed a two stage searchto find the trim setting that best minimised the rates of change of the four relevant statevariables. The first stage was to perform an exhaustive search of the search space witha large search step granularity. Hence locating the approximate location of the non-

17

Page 22: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

From the exhaustive search algorithm read in the thrust, pitch angle and elevatordeflection which best trim the aircraft.

do

• Does increasing or decreasing the thrust slightly trim the aircraft better? Ifit does then do so.

• Does increasing or decreasing the aircraft’s pitch angle slightly trim theaircraft better? If it does then do so.

• Does increasing or decreasing the elevator deflection angle slightly trim theaircraft better? If it does then do so.

while ( it was possible to improve the trim )

Figure 2.2: Pseudo code version of the hill walking trim refinement algorithm.

local minima of the system. The result was then refined using a hill walking search tofind the exact location of the minima. Both of these stages will now be explained inmore detail.

Conceptually the exhaustive search defined a search cube as illustrated in Figure 2.1.Where the limits of the cube were the physical bounds of the axis variables. So forexample the elevator cannot deflect beyond 0.8 radians in either direction and the en-gine can’t throttle beyond 13800 RPM etc. Each axis of the cube was then dividedinto approximately 20 sections, hence defining around 8000 search points within thecube. Each of these points was then tested to see how well it trimmed the aircraft forthe particular flight condition. The point that best trimmed the aircraft, according tothe cost function in equation 2.1, was then fed into the next stage of the search.

The hill walking refinement of the trim setting is most elegantly described by the al-gorithm in Figure 2.2.

The scripts used to implement the trimming algorithms are included in Appendix A.These proved to be completely stable, producing no wild actuator settings. The re-sults of running the routines to trim the aircraft at a range of straight and level flightconditions from 200ft/s to 800ft/s at 10000ft with 30 gallons of fuel, are given in Fig-ure 2.3. When fed back into the full non linear simulation the trim settings successfullymaintained the aircraft in their respective flight conditions.

The trim settings for the 10000ft, 450ft/s with 30 gallons of fuel flight condition aroundwhich the controller was being validated were: Pitch angle -0.0017 radians, Throttle

18

Page 23: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

200 300 400 500 600 700 800−0.05

0

0.05

0.1

0.15

0.2

pitc

h an

gle,

θ (

rad)

200 300 400 500 600 700 8000.85

0.9

0.95

1

1.05

1.1

1.15

1.2x 10

4

thro

ttle

(rpm

)

200 300 400 500 600 700 8000.03

0.04

0.05

0.06

0.07

0.08

0.09

0.1

Speed (ft/s)

elev

ator

def

lect

ion

(rad

)

Figure 2.3: Calculated trim settings for straight and level flight between 200ft/s and800ft/s at 10000ft altitude with 30 gallons of fuel.

19

Page 24: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

setting 9312 RPM and elevator deflection 0.0736 radians.

It is also worth noting that the aircraft pitch angle and throttle setting graphs in Fig-ure 2.3 are the classic curves for a fixed wing aircraft. For velocities above 300ft/s,the aircraft pitch angle is close to zero and the throttle setting required increases withspeed as the drag increases, giving a classical “front side” of the power curve. Below300ft/s the aircraft pitch angle (which for straight and level flight is equal to the angleof attack of the wing plus a constant that is dependent on the aircraft’s design) starts toincrease rapidly as the speed reduces in order to produce enough lift to hold the aircraftin the air. Consequently as the angle of attack increases, so does the aerodynamic dragand the proportion of the thrust being used to directly hold the aircraft in the air, hencethe throttle setting required increases producing the classical “back side” of the powercurve.

2.3 Validation

Once the model had been assimilated and trimmed, it was validated to check that itactually behaved like an aircraft. It had already been seen from Figure 2.3 that themodel was exhibiting classic fixed wing aircraft trim characteristics. Other tests werethen performed to determine whether the model reacted correctly to control inputs. Allof the tests were performed in the trimmed straight and level 10000ft, 450ft/s with 30gallons of fuel flight condition.

Figure 2.4 shows the responce of the model to a -1 degree step elevator deflection.It can be seen from the graphs that the model had classical short period and phugoidresponces. Figure 2.5 shows the responce of the model to a -1 degree, 2.5 second,aileron pulse. It can be seen from the graphs that the model exhibited classical rollsubsidence and spiral modes. Figure 2.6 shows the flight path of the model whensubjected to a -1 degree, 1 second, aileron pulse. As would be expected the modelgoes into a gentle downwards spiral.

2.4 Linearisation

The model was linearised around trimmed straight and level flight in the 10000ft,450ft/s, 30 gallons of fuel flight condition using the Matlab linmod routine. The scriptdeveloped to drive the linearisation process is included in Appendix A. The resultinglongitudinal state space representation matrices are included in Figure 2.7 with the lat-eral in Figure 2.8. Transfer functions generated from these matrices are included inFigures 2.9 and 2.10.

20

Page 25: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

0 2 4 6 8380

400

420

440

460

u (f

t/s)

Short period responce

0 2 4 6 8−5

0

5

10

15

20

w (

ft/s)

0 2 4 6 80

0.05

0.1

0.15

0.2

q (r

ad/s

)

0 2 4 6 8−0.2

0

0.2

0.4

0.6

θ (r

ad)

0 2 4 6 80.98

1

1.02

1.04

1.06

1.08x 10

4

Time (s)

altit

ude

(ft)

0 20 40 60 80 100100

200

300

400

500

u (f

t/s)

Phugoid responce

0 20 40 60 80 100−5

0

5

10

15

20

w (

ft/s)

0 20 40 60 80 100−0.1

−0.05

0

0.05

0.1

0.15

q (r

ad/s

)

0 20 40 60 80 100−0.5

0

0.5

1

θ (r

ad)

0 20 40 60 80 1000.9

1

1.1

1.2

1.3x 10

4

Time (s)

altit

ude

(ft)

Figure 2.4: Longitudinal responce of the model to a -1 degree step elevator deflectionwhen trimmed out in straight and level flight at 10000ft, 450ft/s with 30 gallons offuel.

21

Page 26: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

0 2 4 6 8−1

0

1

2

3

v (f

t/s)

Short term responce

0 2 4 6 80

0.1

0.2

0.3

0.4

p (r

ad/s

)

0 2 4 6 80

0.01

0.02

0.03

0.04

0.05

r (r

ad/s

)

0 2 4 6 80

0.2

0.4

0.6

0.8

φ (r

ad)

0 2 4 6 80

0.1

0.2

0.3

0.4

Time (s)

ψ (

rad)

0 20 40 60 80 100−1

0

1

2

3

v (f

t/s)

Long term responce

0 20 40 60 80 1000

0.1

0.2

0.3

0.4

p (r

ad/s

)

0 20 40 60 80 1000

0.02

0.04

0.06

r (r

ad/s

)

0 20 40 60 80 1000

0.5

1

1.5

φ (r

ad)

0 20 40 60 80 100−4

−2

0

2

4

Time (s)

ψ (

rad)

Figure 2.5: Lateral responce of the model to a -1 degree, 2.5 second aileron pulse whentrimmed out in straight and level flight at 10000ft, 450ft/s with 30 gallons of fuel.

22

Page 27: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

02000

40006000

800010000

1200014000

1600018000

0

5000

10000

−2000

0

2000

4000

6000

8000

10000

Position East (ft)Position North (ft)

heig

ht (

ft)

Figure 2.6: Flight path responce of the model to a -1 degree, 1 second aileron pulsewhen trimmed out in straight and level flight at 10000ft, 450ft/s with 30 gallons offuel.

23

Page 28: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Along =

−0.0160 0.0168 0.6797 −32.17−0.1364 −1.619 448.5 0.0558

0 −0.0242 −0.7189 00 0 1.000 0

(2.2)

xlong =

uwqθ

(2.3)

Blong =

−3.188 0.0014−45.34 0−22.68 0

0 0

(2.4)

ulong =

[ητ

](2.5)

Figure 2.7: Calculated longitudinal state space representation matrices for aircraft intrimmed straight and level flight at 10000ft, 450ft/s with 30 gallons of fuel.

Alat =

−0.1245 −0.9132 −450.0 32.17 0−0.0183 −1.659 1.298 0 00.0129 −0.0095 −0.2292 0 0

0 1.000 −0.0017 0 00 0 1.000 0 0

(2.6)

xlat =

vprφψ

(2.7)

Blat =

0−26.88−0.2900

00

(2.8)

ulat =[

ξ]

(2.9)

Figure 2.8: Calculated lateral state space representation matrices for aircraft intrimmed straight and level flight at 10000ft, 450ft/s with 30 gallons of fuel.

24

Page 29: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

u(s)η(s)

=−3.1876(s + 15.81)(s− 10.55)(s + 2.155)

(s2 + 0.01435s + 0.00884)(s2 + 2.339s + 12.02)[ft/s/rad] (2.10)

w(s)η(s)

=−45.3389(s + 225.1)(s2 + 0.01584s + 0.009755)(s2 + 0.01435s + 0.00884)(s2 + 2.339s + 12.02)

[ft/s/rad] (2.11)

q(s)η(s)

=−22.6788s(s + 1.569)(s + 0.01777)

(s2 + 0.01435s + 0.00884)(s2 + 2.339s + 12.02)[rad/s/rad] (2.12)

θ(s)η(s)

=−22.6797(s + 1.569)(s + 0.01777)

(s2 + 0.01435s + 0.00884)(s2 + 2.339s + 12.02)[rad/rad] (2.13)

Figure 2.9: Transfer functions from elevator to longitudinal state variables for aircraftin trimmed straight and level flight at 10000ft, 450ft/s with 30 gallons of fuel.

v(s)ξ(s)

=155.05s(s− 5.149)(s + 0.2635)

s(s + 1.768)(s− 0.03795)(s2 + 0.2818s + 5.995)[ft/s/rad] (2.14)

p(s)ξ(s)

=−26.8841s(s + 0.0001209)(s2 + 0.3676s + 5.924)s(s + 1.768)(s− 0.03795)(s2 + 0.2818s + 5.995)

[rad/s/rad] (2.15)

r(s)ξ(s)

=−0.29s(s + 3.83)(s2 − 2.928s + 10.2)

s(s + 1.768)(s− 0.03795)(s2 + 0.2818s + 5.995)[rad/s/rad] (2.16)

φ(s)ξ(s)

=−26.88s(s2 + 0.3677s + 5.924)

s(s + 1.768)(s− 0.03795)(s2 + 0.2818s + 5.995)[rad/rad] (2.17)

ψ(s)ξ(s)

=−0.2901(s + 3.83)(s2 − 2.928s + 10.2)

s(s + 1.768)(s− 0.03795)(s2 + 0.2818s + 5.995)[rad/rad] (2.18)

Figure 2.10: Transfer functions from ailerons to lateral state variables for aircraft intrimmed straight and level flight at 10000ft, 450ft/s with 30 gallons of fuel.

25

Page 30: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Chapter 3

Stability augmentation system design

The purpose of a stability augmentation system is to improve, using feedback from anaircraft’s sensors to its actuators, the stability characteristics of an airframe. Howeverthe question that arises is what are the desired stability characteristics of a UAV? Thereare well defined requirements for manned platforms (E.g. DEF-STAN 00-970 [17] andMIL-F-8785C [18]), but although there are some initial proposals, the requirements forUAVs are less clearly defined.

In this thesis the view was taken that if the aircraft is easy for a pilot to fly, thenit is likely that it is going to be easy for an autopilot to fly. Therefore the stabilityaugmentation system was designed to make the aircraft comply with the applicablesections of DEF-STAN 00-970 and MIL-F-8785C for class IV (high maneuverability)aeroplanes.

3.1 Longitudinal augmentation

Analysis of the elevator to longitudinal state variable transfer functions for the 10000ft,450ft/s, 30 gallons of fuel flight condition from Figure 2.9, showed that the unaug-mented longitudinal stability characteristics of the airframe in this flight condition wereas enumerated in Figure 3.1.

Comparing these to the military flying qualities requirements (DEF-STAN 00-970 andMIL-F-8785C), for which Cook [8] provides a useful summary, it could be seen thatthe short period mode damping was below the minimum requirement of 0.35 for level1 (clearly adequate for mission flight phase) flying qualities in a category A (flightphase that requires precise flight path control) flight condition (Cook [8], table 10.4).

The other longitudinal characteristics were however within the level 1, category Abounds. The phugoid damping was above the 0.04 minimum (Cook [8], table 10.5),

26

Page 31: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Short period damping (ζs) 0.337Short period frequency (ωs) 3.47 rad/sPhugoid damping (ζp) 0.0763Phugoid frequency (ωp) 0.0940 rad/s

Roll subsidence mode time constant (Tr) 0.57s (stable)Spiral mode time constant (Ts) 26.4s (unstable)Dutch roll damping (ζd) 0.0575Dutch roll frequency (ωd) 2.45 rad/s

Figure 3.1: Longitudinal and lateral modes of the unaugmented Jindivik in the 10000ft,450ft/s, 30 gallons of fuel flight condition.

Kq

elevator demand (de) Jindivik+ -+ -

pitch rate (q)

Figure 3.2: Block diagram of the pitch rate feedback to elevator stability augmentationloop.

27

Page 32: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

and the ratio of its frequency to that of the short period,ωp/ωs, was 0.03, so it shouldnot become obtrusive in the handling qualities (Cook [8], section 10.6.2.2).

Finally be defining the normal load factor per unit angle of attack,nα, as:

nα = −zwUe

g= −−1.619× 449.9

32.17= 22.6rad−1 (3.1)

(Cook [8], equation 10.12)

It could be seen that the short period frequency fell within the level 1 bounds of 1.5 to9.0 radians/s for thenα of the flight condition (Cook [8], figure 10.7).

To increase the damping of the short period mode, the classic pitch rate feedback toelevator loop shown in Figure 3.2 was employed. The proportional gain,Kq, wasselected with the aid of the root locus plot in Figure 3.3. This is a plot of the eleva-tor demand to pitch rate transfer function,q(s)/η(s), from Figure 2.9. As the gainneeded to be negative to get the elevator to deflect in the correct direction to damp anoscillation, the plot is therefore for negative values ofKq.

A Kq of -0.15 was selected to give a short period damping ratio of approximately 0.7.The resulting longitudinal state space matrices for the augmented aircraft are includedin Figure 3.4, and the transfer functions generated from these are included in Fig-ure 3.5. Hence giving the augmented longitudinal stability characteristics enumeratedin Figure 3.6.

3.2 Lateral augmentation

Analysis of the aileron to lateral state variable transfer functions for the 10000ft,450ft/s, 30 gallons of fuel flight condition from Figure 2.10, showed that the unaug-mented lateral stability characteristics of the airframe in this flight condition were asenumerated in Figure 3.1. These were compared with the flying qualities requirement.

The roll subsidence mode time constant (Tr), was seen to be satisfactorily lower thanthe level 1, category A maximum value of 1.0 seconds (Cook [8], table 10.6). Similarlythe spiral mode time constant (Ts), although unstable, was greater that the minimumlevel 1 requirement of 17.3 seconds (Cook [8], table 10.8).

The dutch roll however did not meet the level 1, category A requirements (Cook [8],table 10.9). For this the damping ratio (ζd) needed to be greater than 0.19, and thedamping ratio / frequency product (ζdωd) greater than 0.35. The frequency (ωd) wasgreater than the minimum value of 1.0 radians/s. The dynamics did however easily

28

Page 33: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Short period mode locus:

Phugoid mode locus:

Gain: -0.5Damping: 0.468Freq: 3.71 (rad/s)Gain: -1.5

Damping: 0.69Freq: 4.15 (rad/s)

Gain: -2.5Damping: 0.876Freq: 4.57 (rad/s)

Gain: -0.15Damping: 0.0931Freq: 0.07 (rad/s)

Gain: -1.00Damping: 0.171Freq: 0.047 (rad/s)

Figure 3.3: Root locus plot of theq(s)/η(s) transfer function of the unaugmentedaircraft for negative values of K.

29

Page 34: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Along =

−0.0160 0.0168 0.2016 −32.1741−0.1364 −1.6189 441.7614 0.0558

0 −0.0242 −4.1207 00 0 1.0000 0

(3.2)

xlong =

uwqθ

(3.3)

Blong =

−3.1876 0.0014−45.3389 0−22.6788 0

0 0

(3.4)

ulong =

[ητ

](3.5)

Figure 3.4: Calculated longitudinal state space representation matrices for the stabilityaugmented aircraft in trimmed straight and level flight at 10000ft, 450ft/s with 30gallons of fuel.

u(s)η(s)

=−3.1876(s + 15.81)(s− 10.55)(s + 2.155)

(s2 + 0.01456s + 0.006117)(s2 + 5.741s + 17.37)[ft/s/rad] (3.6)

w(s)η(s)

=−45.3389(s + 225.1)(s2 + 0.01584s + 0.009755)(s2 + 0.01456s + 0.006117)(s2 + 5.741s + 17.37)

[ft/s/rad] (3.7)

q(s)η(s)

=−22.6788s(s + 1.569)(s + 0.01777)

(s2 + 0.01456s + 0.006117)(s2 + 5.741s + 17.37)[rad/s/rad] (3.8)

θ(s)η(s)

=−22.6846(s + 1.569)(s + 0.01777)

(s2 + 0.01456s + 0.006117)(s2 + 5.741s + 17.37)[rad/rad] (3.9)

Figure 3.5: Transfer functions from elevator to longitudinal state variables for stabilityaugmented aircraft in trimmed straight and level flight at 10000ft, 450ft/s with 30gallons of fuel.

30

Page 35: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

meet the level 2 requirements. These specify a minimum damping ratio (ζd) of 0.02, aminimum damping ratio / frequency product (ζdωd) of 0.05 and a minimum frequency(ωd) of 0.5.

Dutch roll damping is normally improved by feedback of yaw rate to the rudder input.Unfortunately the Jindivik does not has an actuatable rudder. Therefore rather thanattempting a technique such as yaw rate feedback to the ailerons, which would havethe side effect of cross coupling the roll and yaw axes. It was decided that the dutchroll mode dynamics would be left unaugmented, as level 2 characteristics are still quiteadequate for the successful control of the aircraft.

Short period damping (ζs) 0.689Short period frequency (ωs) 4.17 rad/sPhugoid damping (ζp) 0.0931Phugoid frequency (ωp) 0.0782 rad/s

Figure 3.6: Longitudinal modes of the augmented Jindivik in the 10000ft, 450ft/s, 30gallons of fuel flight condition.

31

Page 36: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Chapter 4

Control system design

Once the model had been assimilated, validated and the stability augmentation systemdesigned. The task of developing the control system commenced.

4.1 Control philosophy

The control philosophy developed to meet the objectives set for the formation flightcontroller is best described through the use of an example.

Figure 4.1 shows the lead aircraft flying due North straight and level at 10000ft and450ft/s. The target formation point is marked behind it. I this example the targetformation point has no vertical displacement from the lead aircraft. The trail aircraft(the Jindivik) is shown heading South East straight and level at 9000ft and 430ft/s. Inother words the two aircraft are rapidly diverging away from each other.

The first stage of the control philosophy was to wrap three conventional control loopsaround the aircraft. These were heading acquire, altitude acquire and speed acquire.Then feed into the demand inputs of these control loops the heading of the lead aircraft,the altitude of the target formation point and the speed of the lead aircraft respectively.The purpose of this was to cause the trail aircraft to acquire the required altitude andmatch the speed and heading of the lead aircraft. This meant that on a macro scale therelative spacial divergence between the two aircraft would be brought to almost zero,as illustrated in Figure 4.2.

However that still left a spacial error between the target formation point and the actuallocation of the trail aircraft. This spacial error was broken down into along track andcross track components as illustrated in Figure 4.2. Two control loops were then addedto minimise the two errors. These loops did not drive the actuators directly. Insteadthey altered the demands being fed into the three basic controllers.

32

Page 37: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Lead aircraftHeading: 0 rad10000ft, 450ft/sStraight and level

Target formation point10000ft

Trail aircraftHeading: 2.4 rad9000ft, 430ft/sStraight and level

Figure 4.1: Illustration of a divergent formation pair.

Lead aircraftHeading: 0 rad10000ft, 450ft/sStraight and level

Trail aircraftHeading: 0 rad10000ft, 450ft/sStraight and level

Cross trackerror

Along trackerror

Figure 4.2: Illustration of a stabilised formation pair.

33

Page 38: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

The along track error minimisation controller added a delta to the speed being fedinto the speed acquire controller. Such that if the trail aircraft was behind the targetformation point then its speed would be increased relative to the lead aircraft until itcaught up. Similarly if the trail aircraft was in front of the formation point then itsspeed would be reduced.

The cross track error minimisation controller added a delta to the heading being fedinto the heading acquire controller. Such that if the trail aircraft was to the right of theformation point then it would be pointed slightly to the left to move it into the correctlateral position. Similarly if it was to the left of the formation point it would be pointedto the right.

A block diagram of the loops and demands is included in Figure 4.3.

4.2 Altitude acquire and hold controller

The altitude acquire and hold controller was implemented using the dual feedbackloop, single feed forward path architecture illustrated in Figure 4.4. In this architecturethe outer feedback loop minimises the altitude error by demanding an appropriate pitchattitude from the inner feedback loop, which then acquires the demanded pitch attitudethrough the actuation of the elevator. The elevator roll compensator feed forward pathis present to improve the reaction speed of the controller when the aircraft performs aturn maneuver.

It is possible to construct a single feedback loop altitude acquire and hold controller,in which the loop minimising the altitude error drives the elevator directly, without theintermediate pitch attitude loop. This is simpler, one controller rather than two, but hasa lower stability margin than the dual loop architecture. This is because if the pitch ofthe aircraft is disturbed, either by a gust or because the aircraft is performing a turnmaneuver. Then the single loop controller, which is performing its control functionbased only on the altitude error, will not correct the pitch disturbance until it has causeda significant altitude error and can hence be detected by the controller. However in thetwo loop controller, the inner loop will directly detect and correct the pitch attitudeerror before it has a chance to cause a significant altitude error.

Therefore while the single loop controller is fine for controlling an individual aircraftflying on its own, where a 50ft error caused by a gust can be tolerated. It is notsatisfactory for holding a tight formation where the errors need to be kept to an absoluteminimum.

34

Page 39: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Stabilityaugmentation

Jindivik

Along trackcontroller

Cross trackcontroller

Formationpoint altitude

Lead aircraftheading

Lead aircraftspeed

Along trackerror

Cross trackerror

+

+

++

Sen

so

rm

ea

su

rem

en

ts

Co

ntr

ol d

em

an

ds

dt

de

da

Speedacquire

Altitudeacquire

Headingacquire

demand

demand

demand

Figure 4.3: Block diagram of the complete control system.

Altitudeacquire andhold outer

loop

Pitch attitudeacquire and

hold

elevatordemand (de)

note:the demand will bemodified by thestability augmentationsystem

altitudedemand (dh)

altitude

err

or

pitch attitude ( )qaltitude (h)

pitch a

ttitud

eerr

or

pitch a

ttitud

e

dem

an

d (

d)

q

+ - + -

Elevator rollcompensator

roll attitude ( )f

+

+de-p

itch

de-roll

Figure 4.4: Block diagram of the altitude acquire and hold controller.

35

Page 40: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

4.2.1 Inner feedback loop

The inner loop of the altitude acquire and hold controller, which implements the pitchattitude acquire and hold function, was implemented using the PI structure illustratedin Figure 4.5. The integrator was included to trim the elevator to hold the requestedpitch attitude without any input from the proportional component once the requestedattitude had been acquired. A derivative component was not necessary because as willbe illustrated later the system being controlled was naturally very stable.

The proportional gain,Kθp, was selected with the aid of the root locus plot in Fig-ure 4.7. This is a plot of the stability augmented elevator demand to pitch attitudetransfer functionθ(s)/η(s) from Figure 3.5. As the proportional gain needed to benegative to get the elevator to deflect in the correct sense to correct a pitch attitudeerror, the plot is therefore for negative values ofKθp.

As the pitch attitude is a significant variable in the phugoid dynamics of the aircraft,the pitch attitude controller therefore modifies the phugoid dynamics. This can be seenin the Figure 4.7 root locus, where for aKθp of -0.09 the pair of poles representingthe phugoid converge and the phugoid dynamics becomes non oscillatory. As thegain is increased further, one of these poles moves from the point of convergence ats = −0.094 to the zero ats = −1.57 when the gain reaches minus infinity. This isnice because this pole represents the rate of responce to the controller / aircraft systemto a change in pitch demand. Therefore by selecting a value ofKθp between -0.09 andminus infinity, the controller could be made to produce a non oscillatory responce witha time constant of anywhere between 10.5 seconds (Kθp = −0.09) and 0.63 seconds(Kθp = −inf ).

Initially a Kθp of -1, which results in a responce time constant of 1 second, was se-lected. Hence the requested attitude would be 63% aquired within 1 second. How-ever when the full control system was simulated in the non-linear environment, it wasfound that this produced angles of attack in excess of 10 degrees when flying at 450ft/s(266 knots). Essentually the attitude controller was yanking back on the stick too hardand hence risking a high speed stall. AKθp of -0.24 was therefore selected, giving atime constant of 2.5 seconds and reducing the resulting angle of attack during manou-vers to a more manageable 3 degrees.

It can be seen from the root locus plot that the effect of this gain on the short periodmode was minimal. Reducing the damping from just under 0.7 to just under 0.6, withthe frequency being marginally increased from 4.17 to 4.54 radians/s.

The integral gain,Kθi, was selected by the educated guess that for a continuous 1 de-gree pitch attitude error, the elevator probably wanted to trim at a rate of 0.1 degrees/s.To achieve thisKθi therefore needed to be -0.1.

36

Page 41: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Kqpelevator demand(de-pitch)

pitch attitude

demand (d )qpitch a

ttitu

de

err

or

pitch attitude ( )q

+ - +

Kqi 1/s

+

Figure 4.5: Block diagram of the altitude acquire and hold controller’s inner loop pitchattitude PI controller.

Khppitch attitude

demand (d )q

altitudedemand (dh)

altitud

eerr

or

altitude (h)

+ - +

Khi

+

Khddu/dt

+0.14

-0.14

+0.07

-0.07

1/s+

+

Figure 4.6: Block diagram of the altitude acquire and hold controller’s outer loop PIDcontroller.

37

Page 42: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Phugoid mode locus:

Short period mode locus:

Gain: -0.24Damping: 0.59Freq: 4.54 (rad/s)

Gain: -1.0Damping: 0.40Freq: 5.94 (rad/s)

Gain: -2.0Damping: 0.30Freq: 7.55 (rad/s)

Gain: -1.0Damping:1.0Time const: 1.0s

Gain: -0.24Damping:1.0Time const: 2.5s

Gain: -infDamping:1.0Time const: 0.63s

Gain: -0.09Damping:1.0Time const: 10.5s

Gain: -0.0Damping: 0.69Freq: 4.17 (rad/s)

Figure 4.7: Root locus plot of theθ(s)/η(s) transfer function of the stability aug-mented aircraft for negative values of K.

38

Page 43: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

The result of placing a 2.0 degree (0.035 radian) step change in pitch attitude demandinto a full non-linear simulation of the pitch attitude controller and aircraft when theaircraft was trimmed in straight and level flight at 10000ft, 450ft/s with 30 gallons offuel is shown in Figure 4.8. It can be seen from this that the controller achieves aclean, only very slightly oscillatory acquisition of the pitch attitude. The time constantof the acquisition is approximately 2.5 seconds as planned, and the angle of attack andelevator deflections are negligible.

4.2.2 Outer feedback loop

The outer loop of the altitude acquire and hold controller was implemented using thePID structure illustrated in Figure 4.6. A full PID controller was used because, as willbe seen later from the root locus plot, the responce of the system to being wrapped ina proportional controller was lightly damped oscillatory. The derivative is thereforeincluded to improve the settling time. While the integrator is there to trim the aircraftto the correct pitch attitude for the flight condition the aircraft is flying in.

The controller also contains two saturation limit pairs. These are present because thecontroller has to respond to both gradual changes in the demanded altitude, e.g. whenthe lead aircraft climbs or descends, and large step changes, e.g. when the system isfirst turned on and the lead is 10000ft above the trail. The basic PID controller handlesthe gradual changes, otherwise known as the hold function of the controller, well.However when faced with a step 10000ft demand, otherwise known as the acquirefunction of the controller, the PID will produce a massive proportional feedback signaland hence demand a pitch attitude beyond the vertical. Secondly even if the aircraftdoes assume a sensible climb attitude, it will take time to climb 10000ft, during whichthe integrator will be integrating away. Hence when the desired altitude is finallyreached the integral term will be a massive figure and will probably cause the aircraftto overshoot by the same distance as it has just climbed.

A saturation limit pair was therefore placed on the output of the controller so that itcannot demand a pitch angle greater than±0.14 radians (±8 degrees). Hence howeverbig the output produced by the proportional or derivatives terms during an acquirephase the aircraft will never pitch up or down more than 8 degrees.

Saturation limits were also placed on the integrator. These prevented the value heldinside the integrator increasing above 0.07 radians (4 degrees) or falling below -0.07radians (-4 degrees), in much the same way as the value output by an operationalamplifier wired as an integrator can’t go outside the bounds of the supply rails. Thisprevents the integrator winding up to a ridiculous value during an acquire phase, butstill allows it to trim the aircraft out to the correct pitch angle during the hold phase.

39

Page 44: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

0 5 10 15 20 25 30

0

0.02

0.04

dθ (

rad)

0 5 10 15 20 25 30

0

0.02

0.04

θ (r

ad)

0 5 10 15 20 25 30−0.01

0

0.01

0.02

0.03

q (r

ad/s

)

0 5 10 15 20 25 30−5

0

5

10x 10

−3

α (r

ad)

0 5 10 15 20 25 30

0.064

0.066

0.068

0.07

0.072

0.074

de (

rad)

time (s)

Figure 4.8: Responce of the attitude acquire and hold controller to a 2.0 degree (0.035radian) step change in pitch attitude demand when trimmed out in straight and levelflight at 10000ft, 450ft/s with 30 gallons of fuel.

40

Page 45: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

To enable the selection ofKhp, Khi andKhd a linear model of everything downstreamof the controller needed to be developed. This model needed to include the aircraft, thestability augmentation and the pitch attitude PI controller, so that a transfer functionfrom the pitch attitude demand to the altitude of the aircraft could be derived. The Mat-lab code used to do this is included in Appendix B and the resulting transfer functionis given in equation 4.1.

h(s)dθ(s)

=−10.88(s− 18.81)(s + 18.8)(s + 0.4167)(s + 0.01154)

s(s + 0.01723)(s2 + 0.4909s + 0.1831)(s2 + 5.248s + 20.04)[ft/rad] (4.1)

Figure 4.9 shows the root locus of equation 4.1 for positive values ofKhp. It can beseen from this that the phugoid mode, which is the mode the controller is trying tocontrol, becomes unstable for values ofKhp above 0.0029. Ziegler/Nichols tuningwas therefore used to select the values ofKhp, Khi andKhd that would minimise theintegral of the altitude error. See Nelson [12], chapter 7 for a full description of thistechnique.

In Ziegler/Nichols tuning, the proportional gain at which the system becomes unstableis referred to as the ultimate gain (Khpu). Therefore in this case:

Khpu = 0.0029 (4.2)

The period of oscillation at the point of ultimate gain (Tu), can be seen from Figure 4.9to be:

Tu =2π

ωu

=2π

0.818= 7.68s (4.3)

To minimise the integral of the altitude error, Ziegler/Nichols tuning suggests that thePID gains should be set as dictated by the formulas in equations 4.4, 4.5 and 4.6.Essentially what these do is reduce the proportional gain to approximately half thevalue at which the system becomes unstable, and then selects values forKhi andKhd

that Ziegler and Nichols calculated would minimise the integral of the error signal.

Khp = 0.6Khpu = 0.0017 (4.4)

Khi =0.6Khpu

0.5Tu

= 0.00045 (4.5)

41

Page 46: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Gain: 0.0029Damping: 0.0Freq: 0.818 (rad/s)

Gain: 0.0017Damping: 0.0829Freq: 0.667 (rad/s)

Gain: 0.0017Damping: 0.594Freq: 4.49 (rad/s)

Figure 4.9: Root locus plot of theh(s)/dθ(s) transfer function for positive values ofK.

42

Page 47: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Khd = 0.6Khpu × 0.125Tu = 0.0017 (4.6)

Figure 4.10 shows a full non-linear simulation of the responce of the altitude acquireand hold controller to a 2000ft step change in altitude demand when trimmed out instraight and level flight at 10000ft, 450ft/s with 30 gallons of fuel. It can be seen fromthis that at soon as the step in demand occurs the aircraft pitches up to its pitch limit of8 degrees (0.14 radians). Then for the next 35 seconds the aircraft climbs at a steady 8degree climb angle until the demanded altitude of 12000ft is reached. At which pointthe aircraft rotates back to a 0 degree pitch attitude to hold the demanded altitude withminimum overshoot. Even though this is a maximum rate climb, it can be seen thatthe angle of attack never exceeds±2.3 degrees (0.04 radians) and that the elevatordeflection is negligible.

4.2.3 Feed forward path

A conventional aircraft performs a turn by banking in the direction of the turn. Thisalters the orientation of the main wing’s lift force vector from pointing vertically up, tobeing inclined in the direction of the turn by an angle approximately equal to the bankangle. The horizontal component of the lift force then provides the centripetal forcenecessary to turn the aircraft. However because the magnitude of the lift force has notbeen changed, its vertical component which is counteracting gravity will be reduced.Therefore without any corrective action the aircraft will descend as it turns.

A pilot will compensate for this by pulling back on the stick. Hence increasing theelevator deflection and therefore the angle of attack of the main wing. Thus increasingthe magnitude of the lift force until its vertical component again matches the magnitudeof the gravity force. The pilot would normally take such action automatically on entryto a turn before a pitch or altitude disturbance became noticeable. Then make minorcorrections when established in the turn.

Without the feed forward path, the altitude acquire and hold controller would be quitecapable of generating such a compensating deflection of the elevator. However itwould not be generated until a change in pitch attitude or a loss of altitude was de-tected. Therefore the aircraft would be likely to suffer a small dip in altitude wheneverit rolled into a turn and a slight gain when it rolled out.

The feed forward path elevator roll compensator was therefore added to mimic thepilot’s instinctive stick back pressure compensation. The internal structure of the com-pensator is shown in Figure 4.11. Basically the compensator generates a delta to thecontroller’s elevator deflection demand which is proportional to the magnitude of theroll angle. This doesn’t need to be precise as the feedback paths will correct any small

43

Page 48: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

0 10 20 30 40 50 60 70 80

1

1.05

1.1

1.15

1.2

x 104

dh (

ft)

0 10 20 30 40 50 60 70 80

1

1.05

1.1

1.15

1.2

x 104

h (f

t)

0 10 20 30 40 50 60 70 80−0.1

0

0.1

0.2

θ (r

ad)

0 10 20 30 40 50 60 70 80−0.05

0

0.05

α (r

ad)

0 10 20 30 40 50 60 70 80

0.04

0.06

0.08

0.1

de (

rad)

time (s)

Figure 4.10: Responce of the altitude acquire and hold controller to a 2000ft stepchange in altitude demand when trimmed out in straight and level flight at 10000ft,450ft/s with 30 gallons of fuel.

44

Page 49: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

|u|

de-roll

roll attitude ( )f

Krcp

elevator demand(de)+

+elevator demand(de-pitch)

Figure 4.11: Block diagram of the elevator roll compensator.

errors. Therefore by setting up the full non-linear model in turns at various bank an-gles. It was found that at 10000ft, 450ft/s with 30 gallons of fuel, a value ofKrcp

of -0.02 maintained the aircraft relatively level. Hence a 45 degree bank angle wouldresult in a -0.9 degree addition to the controller’s elevator deflection.

4.3 Heading acquire and hold controller

The heading acquire and hold controller was implemented using the dual feedbackloop, single feed forward path architecture illustrated in Figure 4.12. In this architec-ture the outer feedback loop minimises the heading error by demanding an appropriatebank angle from the inner loop, which then acquires the demanded bank angle throughthe actuation of the ailerons. The lead aircraft bank angle follower feed forward pathis present to enable the system to maintain a tight formation when the lead aircraft isperforming turn maneuvers. Finally the saturation limit pair is present in the bank an-gle demand path (dφ), to prevent a bank angle of greater than 0.7 radians (40 degrees)from being requested. The heading used for the control task was magnetic compassheading.

4.3.1 Inner feedback loop

The inner loop of the heading acquire and hold controller, which performs the bankangle acquire and hold function, was implemented using the simple P controller struc-ture illustrated in Figure 4.13. The use of a simple proportional controller for bankangle control was possible for three reasons.

45

Page 50: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Headingacquire andhold outer

loop

Bank angleacquire and

hold

ailerondemand (da)

heading

demand (d )y

hea

din

gerr

or

bank angle ( )fheading ( )y

ban

k a

ngle

err

or

+ - + -

Lead aircraftbank angle

follower

lead aircraft

bank angle ( )fL

+

+d-h

ea

din

gf

d -leadf

+0.70

-0.70

ban

k a

ngle

dem

an

d (

d)

f

Figure 4.12: Block diagram of the heading acquire and hold controller.

Kfp aileron demand (da)bank angle

demand (d )f

ba

nk a

ngle

err

or

bank angle ( )f

+ -

Figure 4.13: Block diagram of the heading acquire and hold controller’s inner loopbank angle P controller.

Kyp d -headingfheading

demand (d )y

he

adin

gerr

or

heading ( )y

+ -

+0.70

-0.70

Figure 4.14: Block diagram of the heading acquire and hold controller’s outer loop Pcontroller.

46

Page 51: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Firstly, as detailed in Figure 3.1, the roll subsidence mode is well damped with a smalltime constant of 0.57 seconds. This makes it easy to control.

Secondly, within reason, whatever angle the aircraft is banked to, if the ailerons are setto zero deflection, then the aircraft will maintain its bank angle with minimal controlintervention. Dynamics such as the spiral mode will of course upset this, but as can beseen from Figure 3.1, this has a time constant of almost 30 seconds, so it’s a gradualprocess. Therefore unlike the longitudinal dynamics where a constant elevator deflec-tion is required to keep the aircraft in trim, once the bank angle has been acquired theailerons can be centralised until an error starts to build up. Hence no integral compo-nent is required in the controller.

Finally, unlike the longitudinal dynamics. Where a one degree error in pitch can havequite a dramatic effect on the aircraft’s flight path. A one degree error in bank anglewill only have a very gradual effect which can be corrected by the outer loop con-trollers. Therefore a simple P controller could be used.

The proportional gain (Kφp), was selected with the aid of the root locus plot in Fig-ure 4.15. This is a plot of the aileron demand to bank attitude transfer functionφ(s)/ξ(s) from Figure 2.10. As the proportional gain needs to be negative to getthe ailerons to deflect in the correct sense to correct a bank attitude error, the plot istherefore for negative values ofKφp. It can be seen from this that as the gain is in-creased, the roll and spiral modes converge and form a stable oscillatory responce to abank attitude demand. The dutch roll mode is virtually unaffected.

It was decided that the aircraft should roll into a requested bank angle in a period ofapproximately two seconds. Which is a sensible real world number for a maneuverableaircraft such as the Jindivik. Hence assuming that the aircraft reaches the requestedbank angle on the first peak of the oscillatory responce, which is a valid assumption ifthe system is well enough damped. Then the aircraft would need to performπ radiansof the responce in two seconds to meet the design requirement. Hence the requiredfrequency of responce was:

ω =displacement

time=

π

2= 1.57radians/s (4.7)

It can be seen from Figure 4.15, that a gain of -0.08 produces approximately thisresponce frequency. With this gain a 1.0 radian (57 degree) step change in bank attitudedemand will initially produce a -0.08 radian (-4.6 degree) deflection of the ailerons.Which is a sensible deflection magnitude.

The result of placing a 0.5 radian (29 degree), 15 second long pulse in bank attitudedemand into a full non-linear simulation of the bank angle acquire and hold controllerand aircraft, when the aircraft was trimmed in straight and level flight at 10000ft,

47

Page 52: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Gain: 0.04Damping: 0.873Freq: 0.997 (rad/s)

Gain: 0.08Damping: 0.613Freq: 1.43 (rad/s)

Gain: 0.16Damping: 0.435Freq: 2.01 (rad/s)

Figure 4.15: Root locus plot of theφ(s)/ξ(s) transfer function for negative values ofK.

48

Page 53: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

450ft/s with 30 gallons of fuel is shown in Figure 4.16. It can be seen that as plannedthe aircraft achieves the demanded bank angle in approximately 2 seconds with verylittle overshoot. Once acquired the bank angle is held steady and the maximum ailerondeflection is only 0.04 radians (2.3 degrees).

4.3.2 Outer feedback loop

The outer loop of the heading acquire and hold controller was implemented using theP structure illustrated in Figure 4.14. If there is a heading error then the proportionalcontroller requests a bank angle which will cause the aircraft to turn such that theheading error is minimised. The saturation limit pair are present to prevent overtlylarge bank angle requests being made if the heading error is large, such as when thesystem has just been turned on. In such cases the aircraft will bank over to a 0.7 radian(40 degree) attitude, perform the turn at this bank attitude until close to the demandedheading, and then start to roll out.

To aid the selection ofKψp, a linear model of the aircraft and the inner loop bank anglecontroller was developed. The Matlab code used to do this is included in Appendix C,and the resulting transfer function, relating the bank angle demand to the heading, isgiven in equation 4.8.

ψ(s)dφ(s)

=0.023(s + 3.83)(s2 − 2.928s + 10.2)

s(s2 + 1.747s + 2.032)(s2 + 0.2649s + 6.071)[rad/rad] (4.8)

Figure 4.17 shows the root locus of equation 4.8 for positive values ofKψp. It can beseen from this that the system becomes unstable at a gain of 14.7, and that the effect onthe dutch roll mode is minimal. A gain of 7.0, which is half way back from the pointof instability was selected. Thus giving a quick responce without risking instability.

Figure 4.18 shows the results of placing a 1.0 radian step change in heading demandinto a full non linear simulation of the heading acquire and hold controller and aircraft,when the aircraft is trimmed out in straight and level flight at 10000ft, 450ft/s with 30gallons of fuel. It can be seen from the graphs that on receipt of the change in headingdemand the aircraft banks rapidly over to its maximum bank angle of 0.7 radians (40degrees). Then maintains this bank angle, hence giving a constant turn rate, until thedesired heading is obtained. At which point it rolls level. It can be seen from theheading (ψ) trace that almost no overshoot occurs on acquisition of the demandedheading.

The altitude trace (h), shows that the altitude acquire and hold controller, which wasalso running during this simulation, is managing to maintain the altitude within 10ft

49

Page 54: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

0 5 10 15 20 25 30

0

0.2

0.4

dφ (

rad)

0 5 10 15 20 25 30

0

0.2

0.4

0.6

φ (r

ad)

0 5 10 15 20 25 30−0.4

−0.2

0

0.2

0.4

p (r

ad/s

)

0 5 10 15 20 25 30−0.06

−0.04

−0.02

0

0.02

0.04

da (

rad)

time (s)

Figure 4.16: Responce of the bank angle acquire and hold controller to a 0.5 radian (29degree), 15 second long pulse in bank attitude demand when trimmed out in straightand level flight at 10000ft, 450ft/s with 30 gallons of fuel.

50

Page 55: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Gain: 14.7Damping: 0.0Freq: 1.28 (rad/s)

Gain: 7.0Damping: 0.326Freq: 1.15 (rad/s)

Gain: 7.0Damping: 0.097Freq: 2.47 (rad/s)

Figure 4.17: Root locus plot of theψ(s)/dφ(s) transfer function for positive values ofK.

51

Page 56: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

0 5 10 15 20 25 30 35 40

0

0.5

1

dψ (

rad)

0 5 10 15 20 25 30 35 40

0

0.5

1

ψ (

rad)

0 5 10 15 20 25 30 35 40−0.5

0

0.5

1

φ (r

ad)

0 5 10 15 20 25 30 35 400.995

1

1.005x 10

4

h (f

t)

0 5 10 15 20 25 30 35 400.06

0.065

0.07

0.075

0.08

de (

rad)

time (s)

Figure 4.18: Responce of the heading acquire and hold controller to a 1.0 radian stepchange in heading demand when trimmed out in straight and level flight at 10000ft,450ft/s with 30 gallons of fuel.

52

Page 57: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

X

d -leadf

lead aircraft

bank angle ( )fL

+0

.70

-0.7

0

distance betweenaircraft

gain lookuptable

+

+ bank angle demand

(df)

bank angle demand

(d -heading)f

Figure 4.19: Block diagram of the lead aircraft bank angle follower.

of the target 10000ft during the turn maneuver. The elevator trace (de) shows that thecontroller is applying the expected stick back pressure to compensate for the loss oflift during the turn.

4.3.3 Feed forward path

The original design of the heading acquire and hold controller did not include the leadaircraft bank angle follower feed forward path. However it was found in full non-linearsimulation of the system. That the basic dual feedback loop architecture, while capableof performing the acquisition of the formation, was not capable of maintaining a tightformation while the lead aircraft was performing turn maneuvers.

To understand why, picture two aircraft flying in a tight formation. If the lead aircraftwishes to make a turn, then it will roll to a bank attitude that will give it the requiredturn rate. The tilting of the main wing’s lift vector will then provide the requiredcentripetal force to make its heading change.

Now if the heading of the trail aircraft is being controlled only by the inner and outerfeedback loops as described earlier. Then the first indication the controller will get ofthe maneuver being performed, is when the lead’s heading begins to change. The outerloop will then detect the change and start to maneuver the trail aircraft.

Unfortunately the heading of the lead aircraft is unlikely to change significantly untilit is fully banked over and established in the turn. So while the lead aircraft is fullyestablished and the rate of turn is about to reach its maximum, the trail aircraft is flyingstraight and level and has only just noticed that the turn is occurring. This results in acouple of seconds of lag while the trail aircraft rolls to track the heading demand. By

53

Page 58: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

which point the formation has diverged significantly and passed out of specification.

To counteract this issue, the lead aircraft bank angle follower illustrated in Figure 4.19was added. This feeds the bank angle of the lead aircraft directly into the inner feed-back loop’s bank angle demand input. Hence as the lead aircraft rolls, the trail aircraftwill match it. The outer feedback loop is then simply left correcting any minor diver-gences, rather than actually establishing the turn its self.

However this behavior is only desirable when trying to maintain a tight formation.When the formation is begin acquired and the two aircraft are 3km apart, it is counter-productive for the trail aircraft to match the bank angle of the lead. The gain schedulingstructure in Figure 4.19 was therefore included. When the aircraft separation distanceis less than 200ft, the gain is 1.0. Thus passing the lead aircraft’s bank angle directlyinto the trail’s bank demand. When the separation distance is greater than 2000ft thegain is zero. Hence the feed forward loop is effectively switched off. Between 200 and2000ft, the gain drops off linearly to give a smooth transition between matching andnot matching the lead’s roll angle.

4.4 Speed acquire and hold controller

The speed acquire and hold controller was implemented using the single feedback loopPI controller structure illustrated in Figure 4.20. The controller minimised the speederror by appropriately altering the engine’s throttle setting. The saturation limit pairwas included to prevent the demanded throttle from passing outside sensible tolerancesfor the engine. The speed used for the control task was measured air speed.

Suitable values forKvtp andKvti were found by performing online tuning in the fullnon-linear simulation. AKvtp value of 100 and aKvti of 2.5 were found to give thenon oscillatory 5 second time constant responce shown in Figure 4.21.

4.5 Cross track controller

The cross track error minimisation controller was implemented using the PID con-troller structure illustrated in Figure 4.22. As will be seen later from the root locusplot, the responce of the system the controller is controlling to being wrapped in aproportional controller is lightly damped oscillatory, and becomes unstable for a smallgain value. Hence to get the best responce with the fastest possible settling time a fullPID controller was used.

54

Page 59: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Kvtpthrottledemand (dt)

speeddemand (dVt)

sp

eed

err

or

speed (Vt)

+ - +

Kvti 1/s

+13800

5000

Figure 4.20: Block diagram of the speed acquire and hold controller.

0 5 10 15 20 25 30440

460

480

500

520

dem

ande

d sp

eed

(ft/s

)

0 5 10 15 20 25 30440

460

480

500

520

spee

d (f

t/s)

0 5 10 15 20 25 300.8

1

1.2

1.4

x 104

dt (

rpm

)

time (s)

Figure 4.21: Responce of the speed acquire and hold controller to a 50ft/s step changein speed demand when trimmed out in straight and level flight at 10000ft, 450ft/s with30 gallons of fuel.

55

Page 60: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

heading demanddelta

cross trackerror

+

+

du/dt

+0.4

-0.4

+0.4

-0.4

1/s+

+

X

distance betweenaircraft

X

X

Kctp lookuptable

Kcti lookuptable

Kctd lookuptable

Figure 4.22: Block diagram of the cross track error minimisation controller.

The delta that the controller could add to the heading demand was limited to±0.4radians (23 degrees) by the saturation limit pair on the output. This prevented hugedeflections, that would wrap around the heading compass several times, from beingrequested when the controller was trying to minimise a large cross track error. Aswith the outer loop of the altitude acquire and hold controller, saturation limits werealso placed on the integrator to prevent it winding up during long cross track acquirephases.

The gain scheduling ofKctp, Kcti andKctd was introduced to increase the stability ofthe system through the different stages of the formation acquisition and hold. Close tothe formation point the values ofKctp, Kcti andKctd were optimised to give optimumresponce times with minimum overshoot. However when the trail is three kilometersbehind the lead a smoother responce is all that is required.

To enable the selection ofKctp, Kcti andKctd a linear model of everything downstreamof the controller needed to be developed. This model therefore needed to includethe aircraft, the stability augmentation, the bank attitude controller and the headingacquire and hold controller, so that a transfer function from heading demand to thelateral position of the aircraft could be derived. The Matlab code used to achieve thisis included in Appendix D and the resulting transfer function is given in equation 4.9.Where lateral position is being denoted as position East (E).

E(s)dψ(s)

=−13.75(s− 35.9)(s2 + 0.2499s + 5.784)

s(s + 0.7838)(s2 + 0.7525s + 1.332)(s2 + 0.4759s + 6.076)[ft/rad] (4.9)

56

Page 61: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Figure 4.23 shows the root locus of equation 4.9 for positive values ofKctp. It canbe seen from this that the system becomes unstable for values ofKctp above 0.00175.Ziegler/Nichols tuning was therefore again used to find the optimum values ofKctp,Kcti andKctd. Hence asKctpu = 0.00175,ωu = 0.803 and thereforeTu = 7.82s :

Kctp = 0.6Kctpu = 0.0011 (4.10)

Kcti =0.6Kctpu

0.5Tu

= 0.00027 (4.11)

Kctd = 0.6Kctpu × 0.125Tu = 0.0010 (4.12)

These values were used in the controller when the separation between the aircraft wasless than 200ft. Between 200ft and 2000ft theKcti and Kctd gains were made toreduced linearly to 0 and theKctp gain reduce linearly to 0.0001, to provide the calmerresponce at distance.

4.6 Along track controller

The along track error minimisation controller was implemented using the P controllerstructure illustrated in Figure 4.24. The delta that the controller could add to the speeddemand was limited to±80ft/s by the saturation limit pair. Hence limiting the maxi-mum relative speed between the two aircraft to 80ft/s.

A suitable value forKatp was found by performing online tuning in the full non-linearsimulation. AKatp value of 0.03 was found to give good along track acquire and holdperformance.

57

Page 62: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Gain: 0.00175Damping: 0.00Freq: 0.803 (rad/s)

Gain: 0.0011Damping: 0.263Freq: 0.756 (rad/s)

Figure 4.23: Root locus plot of theE(s)/dψ(s) transfer function for positive values ofK.

Katp speed demanddelta

along trackerror

+80

-80

Figure 4.24: Block diagram of the along track error minimisation controller.

58

Page 63: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Chapter 5

System performance

Once the control system had been designed and implemented. Its performance wasevaluated in a number of full non-linear simulations of realistic formation flight sce-narios.

For each simulation the path of the lead aircraft was generated by using the Jindivikmodel wrapped in the basic heading, speed and altitude controllers designed in Chap-ter 4 with all of the formation flight related structures stripped out. The Jindivik couldtherefore be directly commanded to acquire headings, speeds and altitudes. Hence therequired lead aircraft flight path for a particular simulation could be built up. The gen-erated flight path was then fed back into the full formation flight controller model tosee how the trail aircraft reacted to it. When building the lead aircraft flight paths thegains and limits of the controllers were reduced so that the aircraft could not exceedthe maneuvering limits for the lead aircraft specified in the controller requirements inSection 1.4.

5.1 Test case 1: Formation acquisition

This test case was designed to evaluate whether the controller was capable of acquiringa specified target formation position relative to the lead, when the two aircraft wereinitially widely spaced, at different altitudes and heading in different directions.

The simulation was setup so that the lead aircraft was flying straight and level at12000ft, 450ft/s in a due East direction. Throughout the simulation the lead aircraftperformed no maneuvering. The trail aircraft was placed 20000ft South of the lead,flying straight and level at 10000ft, 450ft/s in a due North direction. This is illustratedin Figure 5.1. The target formation point was set to (-50ft, 50ft, 25ft) in the forma-tion axis system. This corresponds to a point 50ft to the right of the lead aircraft, 50ft

59

Page 64: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Lead aircraftHeading: 1.57 rad12000ft, 450ft/sStraight and level

Trail aircraftHeading: 0 rad10000ft, 450ft/sStraight and level

20000ft s

epera

tion

Lead aircraft’s flight pathis straight and level forthe duration of the test

Figure 5.1: Illustration of the initialisation state and lead aircraft flight path for testcase 1.

behind it and 25 ft below it.

The controller in the trail aircraft therefore needed to acquire the heading and altitudeof the lead aircraft and then minimise the cross track and along track errors.

Figure 5.2 shows the flight paths output from the simulation of the test case. Figure 5.3shows strip charts of the altitude, heading and speed of the trail aircraft throughout thesimulation in comparison to the cross track and along track errors.

It can be seen from the strip charts that the altitude of the target formation point (leadaircraft - 25ft) is smoothly and rapidly obtained by altitude acquire and hold controller.

The flight path plot shows us that the trail aircraft initially starts to turn to match theheading of the lead. However because at this point there is a significant cross trackerror, the cross track controller applies a delta and keeps the aircraft pointing in aNorth-Easterly direction to minimise it. At around 60 seconds into the simulationthe cross track error becomes sufficiently small that the cross track controller starts toreduce the delta it is applying to the heading and the aircraft turns gradually onto a dueEast heading to match the lead. This can be seen in both the heading strip chart and theflight path plot. 100 seconds into the simulation the aircraft gets sufficiently close tothe lead for the cross track controller’s higher gains to start to kick in. Therefore at 100seconds on the heading strip chart the cross track controller can be seen making someminor heading alterations to align the aircraft in exactly the right cross track position.It can be seen from the cross track error strip chart that after this point the cross trackerror remains at zero for the rest of the flight.

60

Page 65: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Trail aircraft

Lead aircraft

Figure 5.2: Flight paths of lead and trail aircraft from a simulation run of test case 1.

61

Page 66: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

0 50 100 150 200 250 3000.9

1

1.1

1.2

1.3x 10

4

altit

ude

(ft)

0 50 100 150 200 250 300−20000

−15000

−10000

−5000

0

5000

cros

s tr

ack

erro

r (f

t)

0 50 100 150 200 250 3000

0.5

1

1.5

2

head

ing

(rad

)

0 50 100 150 200 250 300

0

2000

4000

6000

alon

g tr

ack

erro

r (f

t)

0 50 100 150 200 250 300

440

460

480

500

520

540

spee

d (f

t/s)

time (s)

Figure 5.3: Altitude, heading and speed of the trail aircraft in comparison to the crosstrack and along track errors from a simulation run of test case 1.

62

Page 67: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

As the lead aircraft flies away to the East the along track error can initially be seenbuilding. The along track controller therefore increases the speed up to 530ft/s to playcatch up. After 80 seconds the along track error has been reduced to 2000ft and thealong track controller starts to back the speed off. By 250 seconds the along track errorhas become zero.

From the simulation it could therefore be seen that the controller successfully managesto turn the Jindivik to follow the lead aircraft. Then successfully minimises the crossand along track errors until the target formation point was achieved.

5.2 Test case 2: Formation hold

This test case was designed to evaluate whether the controller was capable of holdinga specified target formation position while the lead aircraft was maneuvering.

The simulation was setup so that the lead aircraft was initially flying straight and levelat 10000ft, 450ft/s in a due North direction. The trail aircraft was setup already inthe desired formation position, which was again (-50ft, 50ft, 25ft), flying at 450ft/sdue North to match the lead. At 5 seconds into the simulation the lead aircraft wascommanded to enter a turn to the right with a bank angle of 23 degrees. It maintainedthis turn for 25 seconds, at which point it was commanded to reverse the turn into a23 degree bank angle turn to the left. After a further 25 seconds it was commandedto roll level. The lead aircraft therefore executed the S-turn flight path illustrated inFigure 5.4.

The controller in the trail aircraft therefore needed to hold the formation spacing whilethe lead aircraft performed its maneuver.

Figure 5.5 shows strip charts of the altitude, heading and speed of the trail aircraftthroughout the simulation in comparison to the cross track and along track errors.Figure 5.6 shows a series of frames from a three dimensional visualisation of the twoaircraft during the turn.

It can be seen from the strip charts that during the maneuver the largest cross trackerror occurs during the bank angle reversal at 35 seconds into the simulation, becausethe system isn’t quite able to react quickly enough to the fairly dramatic maneuver.However even at this point the cross track error doesn’t exceeds 20ft. Which meansthat it is well within the maximum permissible hold error of 33ft (See Section 1.4).

It can be seen from the along track error strip chart that the along track controller ishaving a slightly harder time keeping the formation, with errors pushing 30ft. It henceappears that the along track controller requires more refinement.

63

Page 68: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Lead aircraftHeading: 0 rad

10000ft, 450ft/sStraight and level

Trail aircraftHeading: 0 rad9975ft, 450ft/sStraight and level

50ft

50ft

Lead aircraft flies aconstant velocity,

level S-turn.

Figure 5.4: Illustration of the initialisation state and lead aircraft flight path for testcase 2.

Therefore with the possible exception of the need for refinement to the along trackcontroller, the simulation showed that the control system was capable of maintainingthe Jindivik in formation with a maneuvering lead aircraft.

5.3 Test case 3: Transition from acquisition to hold

This test was designed to evaluate whether the controller was capable of acquiring aformation position relative to a target that was performing aggressive maneuvers andthen holding it.

The simulation was setup so that the lead aircraft was initially flying straight and levelat 12000ft, 450ft/s in a North-Easterly direction. 50 seconds into the simulation thelead starts to perform a continuous set of S-turns. The trail aircraft was placed 20000ftSouth of the lead flying straight and level at 10000ft, 450ft/s in a due North direction.This is illustrated in Figure 5.7. The target formation point was again specified as(-50ft, 50ft, 25ft).

When the lead aircraft started its S-turn maneuvers the trail was still going to be welldown range of it. This meant that while the game of catchup was being played the

64

Page 69: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

0 10 20 30 40 50 60 70 80 90 1009900

9950

10000

10050

altit

ude

(ft)

0 10 20 30 40 50 60 70 80 90 100−50

0

50

cros

s tr

ack

erro

r (f

t)

0 10 20 30 40 50 60 70 80 90 100−0.2

0

0.2

0.4

0.6

0.8

head

ing

(rad

)

0 10 20 30 40 50 60 70 80 90 100−40

−20

0

20

40

alon

g tr

ack

erro

r (f

t)

0 10 20 30 40 50 60 70 80 90 100440

445

450

455

460

spee

d (f

t/s)

time (s)

Figure 5.5: Altitude, heading and speed of the trail aircraft in comparison to the crosstrack and along track errors from a simulation run of test case 2.

65

Page 70: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Lead aircraft

Trail aircraft

T: +0.0 secondsStraight and level flight with stable formation.

T: +6.7 secondsLead aircraft starting to bank.

T: +10.0 secondsBoth aircraft established in the turn.

T: +33.0 secondsHalf way through the turn reversal.Cross track error is at its maximum.

T: +50.0 secondsBoth aircraft established in the reverse turn.

T: +65.0 secondsBoth aircraft levelled out.

Figure 5.6: Three dimensional visualisation of the two aircraft during the test case 2S-turn maneuver.

66

Page 71: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Lead aircraftHeading: 1 rad

12000ft, 450ft/sStraight and level

Lead aircraft flies acontinuous S-turn

flight path

Trail aircraftHeading: 0 rad10000ft, 450ft/sStraight and level

20000ft s

epera

tion

Figure 5.7: Illustration of the initialisation state and lead aircraft flight path for testcase 3.

67

Page 72: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

cross track and along track controllers were tracking a rapidly moving target. Whenthe trail did catch up, the cross track controller’s higher gain settings needed to kick inand successfully hold the target.

Figure 5.8 shows the flight paths output from the simulation of the test case. Figure 5.9shows strip charts of the altitude, heading and speed of the trail aircraft throughout thesimulation in comparison to the cross track and along track errors. Figure 5.10 showsthe same data but at a greater magnification and only for the final 100 seconds of thesimulation where the trail has caught the lead and is trying to hold the formation.

It can be seen from the strip charts that the controller successfully minimises the crosstrack and along track errors to perform the acquire. Between 50 and 200 seconds theheading chart shows the controller steadily increasing the magnitude of the headingoscillations as it gets closer to the lead, until at 200 seconds the oscillations havereached their maximum, the along track error has been minimised to zero and thetarget has been acquired.

Once acquired the the cross track errors can be seen to be below 20ft, while the alongtrack errors are creeping up into the order of 50ft and so the along track controller doesrequire some refinement.

Hence the simulation showed that the controller was capable of acquiring and holdinga target that is performing fairly dramatic maneuvers.

5.4 Test case 4: Transition from acquisition to hold withwind

This test case is exactly the same as test case 3, except a 30 knot wind has been addedblowing from North to South. This means that the lead aircraft now experiences a 30knot head wind when it is pointing North and a 25 knot cross wind when it is pointingNorth-Easterly at the other extreme of its S-turn.

Figure 5.11 shows the flight paths output from the simulation of the test case. Fig-ure 5.12 shows strip charts of the altitude, heading and speed of the trail aircraftthroughout the simulation in comparison to the cross track and along track errors.Figure 5.13 shows the same data but at a greater magnification and only for the final100 seconds of the simulation where the trail has caught the lead and is trying to holdthe formation.

The striking thing about these results is that they are almost exactly the same as thosefrom test case 3. The acquire phase dynamics looks almost exactly the same and the

68

Page 73: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

errors in the hold phase are of the same magnitude. The only difference is that dueto the head wind, the aircraft have flow 20000ft less distance in a Northerly directionduring the course of the simulation than they did in test case 3. This is visible in theflight path plots and is to be expected.

The reason that the wind has had no significant effect on the ability of the controllerto acquire and maintain the formation, is that the controller is to a first order trying tomatch the compass heading and airspeed of the lead aircraft. Therefore if the lead andtrail aircraft are both pointing in the same direction and have the same airspeed, thenthe wind will have exactly the same effect on both of them. Hence the wind has almostno effect on the controller’s ability to maintain the formation. It has a significant effecton the formation’s ground track, but that is a problem for the lead aircraft to correct.

The simulation therefore shows that the controller can cope with a 30 knot wind.

69

Page 74: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Trail aircraft

Lead aircraft

Figure 5.8: Flight paths of lead and trail aircraft from a simulation run of test case 3.

70

Page 75: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

0 50 100 150 200 250 300 350 4000.9

1

1.1

1.2

1.3x 10

4

altit

ude

(ft)

0 50 100 150 200 250 300 350 400−20000

−15000

−10000

−5000

0

5000

cros

s tr

ack

erro

r (f

t)

0 50 100 150 200 250 300 350 400−0.5

0

0.5

1

1.5

head

ing

(rad

)

0 50 100 150 200 250 300 350 400−5000

0

5000

10000

15000

alon

g tr

ack

erro

r (f

t)

0 50 100 150 200 250 300 350 400440

460

480

500

520

540

spee

d (f

t/s)

time (s)

Figure 5.9: Altitude, heading and speed of the trail aircraft in comparison to the crosstrack and along track errors from a simulation run of test case 3.

71

Page 76: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

300 310 320 330 340 350 360 370 380 390 4001.185

1.19

1.195

1.2

1.205

1.21x 10

4

altit

ude

(ft)

300 310 320 330 340 350 360 370 380 390 400−100

−50

0

50

100

cros

s tr

ack

erro

r (f

t)

300 310 320 330 340 350 360 370 380 390 400−0.5

0

0.5

1

1.5

head

ing

(rad

)

300 310 320 330 340 350 360 370 380 390 400−100

−50

0

50

100

alon

g tr

ack

erro

r (f

t)

300 310 320 330 340 350 360 370 380 390 400420

440

460

480

spee

d (f

t/s)

time (s)

Figure 5.10: Altitude, heading and speed of the trail aircraft in comparison to the crosstrack and along track errors from the final 100 seconds of a simulation run of testcase 3.

72

Page 77: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Trail aircraft

Lead aircraft

Figure 5.11: Flight paths of lead and trail aircraft from a simulation run of test case 4.

73

Page 78: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

0 50 100 150 200 250 300 350 4000.9

1

1.1

1.2

1.3x 10

4al

titud

e (f

t)

0 50 100 150 200 250 300 350 400−20000

−15000

−10000

−5000

0

5000

cros

s tr

ack

erro

r (f

t)

0 50 100 150 200 250 300 350 400−0.5

0

0.5

1

1.5

head

ing

(rad

)

0 50 100 150 200 250 300 350 400−5000

0

5000

10000

15000

alon

g tr

ack

erro

r (f

t)

0 50 100 150 200 250 300 350 400440

460

480

500

520

540

spee

d (f

t/s)

time (s)

Figure 5.12: Altitude, heading and speed of the trail aircraft in comparison to the crosstrack and along track errors from a simulation run of test case 4.

74

Page 79: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

300 310 320 330 340 350 360 370 380 390 4001.185

1.19

1.195

1.2

1.205

1.21x 10

4

altit

ude

(ft)

300 310 320 330 340 350 360 370 380 390 400−100

−50

0

50

100

cros

s tr

ack

erro

r (f

t)

300 310 320 330 340 350 360 370 380 390 400−0.5

0

0.5

1

1.5

head

ing

(rad

)

300 310 320 330 340 350 360 370 380 390 400−100

−50

0

50

100

alon

g tr

ack

erro

r (f

t)

300 310 320 330 340 350 360 370 380 390 400420

440

460

480

spee

d (f

t/s)

time (s)

Figure 5.13: Altitude, heading and speed of the trail aircraft in comparison to the crosstrack and along track errors from the final 100 seconds of a simulation run of testcase 4.

75

Page 80: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Chapter 6

Conclusions

Referring back to the requirements for the control system specified in Section 1.4 andcomparing them to the test results in Chapter 5, it can be seen that:

1. The control system is capable of maneuvering the Jindivik to a target formationpoint relative to the lead aircraft.

2. With the exception that the performance of the along track controller needs im-proving, the control system as a whole is capable of holding the Jindivik on thetarget formation point within the maximum allowable error of 10m (33ft), evenwhen the lead aircraft is maneuvering.

3. The controller is capable of dealing with a 30 knot wind speed.

There are however a few important points of note:

1. The sensors and actuators used in the model are all zero lag devices. Thereforewhen realistic models of these devices are included the system’s performance islikely to deteriorate. How significant this effect would be needs investigation.

2. Only a limited number of formation scenarios have been tested and evaluated. Itis probable that situations can be found that will cause the controller to break insome way or another. For example acquisition situations where the two aircraftare flying toward each other need evaluation.

3. As far as the control system is concerned the lead aircraft does not exist, it isjust trying to keep the Jindivik on the target formation point. This means that itis completely possible for the controller to fly the Jindivik straight into the leadwithout even noticing that it is there. This is unlikely to occur if the formationpoint lies a reasonable distance behind the lead aircraft and the Jindivik is behind

76

Page 81: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

the lead when it is first commanded to move into formation. However if theJindivik is in front or to the side of the lead when the controller is turned on thena collision is completely possible. Therefore further work on collision avoidanceis necessary.

Interestingly if a pilot was flying the lead aircraft and noticed the Jindivik flyingtoward him on a collision course. Then if he took avoiding action such as pullingup, the Jindivik would try to follow him...

4. The system as its stands is a demonstration of concept around one specific flightcondition. For a complete system the calculations would need to be reworkedat a significant number of flight conditions around the flight envelope and gainschedules would need to be drawn up. Indeed it has not actually been proventhat the system will work at other points in the flight envelope. It may be thatinstabilities emerge that can not be controlled by the current control structure.

5. A number of detailed engineering considerations have been overlooked in thisthesis in order to make progress in proving the control concept. For example theoutput of the heading sensor wraps fromπ to−π as it passes clockwise throughSouth. Therefore if the lead aircraft has a heading of 3.1 radians and the traila heading of -3.1 radians, then although they are basically heading in the samedirection, the trail aircraft will make a turn all the way through North to acquirethe heading of the lead. Hence little engineering details such as this would needto be cleared up to create a robust system.

6. The performance of the system has not been evaluated in the presence of gustssuch as thermic activity or updrafts from hills. Unlike the steady wind, these arelocalised phenomena which can affect each of the vehicles independently. Theycan also generate pitching and rolling moments. Therefore it is likely that suchgusts are going to have an effect on the performance of the system which needsto be analysed.

77

Page 82: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Bibliography

[1] Office of the Secretary of Defense.Unmanned Aerial Vehicles Roadmap. De-partment of Defense, December 2002.

[2] Anon. Jane’s all the World’s aircraft 1982-83. Janes publishing company, Lon-don, 1983.

[3] P Fitzgerald.Unmanned Combat Air Vehicle Technology Demonstrator Six De-gree of Freedom Flight Dynamics Simulation Mode. College of Aeronautics,Cranfield, UK, October 2003. (currently unpublished).

[4] M V Cook. An analytical review of the approach, flare and landing character-istics of the Mk 4A Jindivik aircraft. College of Aeronautics technical reportNFP9904, Cranfield, UK, July 1999.

[5] M V Cook and J E Gautrey.A Dymola simulation model of the Mk 4A Jindivikaircraft for flight dynamics applications. College of Aeronautics technical reportNFP0007, Cranfield, UK, July 2000.

[6] Anon. Jindivik Mk 4A Design Summary. Aerospace Technologies of Australiaproject report B4A-C00-051 issue 9, April 1991.

[7] Anon. Jindivik Mk 4A Flight Control Computer. Aerospace Technologies ofAustralia technical requirement specification B4A-J83-001 issue 6, August 1991.

[8] M V Cook. Flight Dynamics Principles. Butterworth-Heinemann, 1997.

[9] B L Stevens and F L Lewis.Aircraft Control and Simulation. Wiley, 2003.

[10] G F Franklin, J D Powell, and A Emami-Naeini.Feedback Control of DynamicSystems. Prentice Hall, fourth edition, 2002.

[11] R C Dorf and R H Bishop.Modern control systems. Prentice Hall, ninth edition,2001.

[12] R C Nelson.Flight Stability and Automatic Control. McGraw-Hill, second edi-tion, 1998.

78

Page 83: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

[13] D McRuer, I Ashkenas, and D Graham.Aircraft Dynamics and Automatic Con-trol. Princeton University Press, 1973.

[14] J H Blakelock.Automatic Control of Aircraft and Missiles. John Wiley & Sons,second edition, 1991.

[15] P Fitzgerald.Modern Flight Control System Design for the Jindivik UAV. Collegeof Aeronautics masters thesis, Cranfield, UK, 2000.

[16] M Kerachian. Terrain following autopilot system design for an unmanned air-craft. College of Aeronautics masters thesis, Cranfield, UK, 2002.

[17] Anon. Design and airworthiness requirements for service aircraft. Defence stan-dard 00-970, Issue 1, Volume 1, Book 2, Part 6 - Aerodynamics, Flying Qualitiesand Performance.Ministry of Defence, UK, 1983.

[18] Anon. Military Specifications - Flying Qualities of Piloted Airplanes. MIL-F-8785C. Department of Defense, USA, 1980.

[19] J D Anderson.Introduction to Flight. McGraw-Hill, forth edition, 2000.

[20] J D Anderson. Fundamentals of Aerodynamics. McGraw-Hill, third edition,2001.

[21] A C Kermode.Mechanics of flight. Prentice Hall, tenth edition, 1996.

79

Page 84: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Appendix A

Trimming and linearisation code

This Matlab code in this appendix was used to trim and linearise the Jindivik’s Simulinkmodel.

JindivikTrimAndLin.m

% Trim an linearise the Jindivik model at a range of flight% conditions across the flight envelope.%% Trim settings and linear state space representations for each% flight condition are output to the console.%% Graphs of the variations in the trim settings across the flight% envelope are plotted.%% Authors and modifications:%% 2004 08 11, Richard Lancaster, original code.

% --------------------------------------------------------------------

% Clear workspaceclear

% Make model initialisation variables global so that subroutines% can directly setup the modelglobal initial_fuelglobal initial_N initial_E initial_D

% Define flight conditions at which trimming and linearisation% should occuraltitude = 10000; % ftfuel = 30; % gallonsVt = [200;225;250;275;300;325;350;400; ...

450;500;550;600;650;700;750;800];% Vt = [450; 500];

% Perform trimming and linearisation at each flight conditionfor n = [1:1:length(Vt)]

% Trim at flight condition[ best_c ] = JindivikTrim(Vt(n), altitude, fuel);alpha(n) = best_c(1);de(n) = best_c(2);dt(n) = best_c(3);

% Linearise around trim point[A_long, B_long, A_lat, B_lat, A_lat2long, A_long2lat] = ...

JindivikLin( Vt(n), altitude, fuel, best_c );

fprintf(1, ’\n’);end

% Plot variation of trim settings across the envelope

80

Page 85: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

subplot(3,1,1)plot(Vt, alpha);ylabel(’pitch angle, \theta (rad)’);grid;

subplot(3,1,2)plot(Vt, dt);ylabel(’throttle (rpm)’);grid;

subplot(3,1,3)plot(Vt, de);xlabel(’Speed (ft/s)’);ylabel(’elevator deflection (rad)’);grid;

JindivikTrim.m

function [ best_c ] = JindivikTrim(Vt, altitude, fuel)

% function [ best_c ] = JindivikTrim(Vt, altitude, fuel)%% DESCRIPTION%% Analytically calculates the control settings (elevator, throttle)% and angle of attack required for trimmed straight and level flight% at a specified speed, altitude and fuel payload.%% NOTES%% - Aerilons are set to zero deflection.% - Rudder is set to zero deflection.% - Flaps are fully retracted.% - Spoilers are fully retracted.% - Gear is fully retracted.% - Thrust vectoring deflections is set to zero.%% - There is no movement of air in the atmosphere.%% GLOBAL VARIABLES%% The following variables must be configured as global in the% top level workspace to enable the function to manipulate the% model:%% initial_fuel% initial_N initial_E initial_D%% PARAMETERS%% Vt:%% Speed (ft/s).%% altitude:%% Altitude (ft).%% fuel:%% The amount of fuel in the tanks (gallons).%% RETURNS%% best_c:%% The flight configuration that best trims the aircraft in the% specified speed/altitude/fuel flight condition.%% This is a vector of the format:%% [alpha; de; dt]%% Where alpha is the angle of attack (radian), de is the elevator% demand (radians) and dt is the throttle setting (rpm).

% --------------------------------------------------------------------

% AUTHORS AND MODIFICATIONS%% 2004 06 10, Richard Lancaster, original code.

81

Page 86: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

% --------------------------------------------------------------------

% Output bannerfprintf(1, ’Trimming...\n’);fprintf(1, ’Vt: %0.1fft/s, alt: %0.1fft, fuel: %0.2fgal\n’, ...

Vt, altitude, fuel);

% Allow subroutine access to model initialisation variablesglobal initial_fuelglobal initial_N initial_E initial_D

% Perform initialisation of modelinitial_fuel = fuel; % Fuel quantity (Gallons)

initial_N = 0; % Earth position (ft)initial_E = 0; % Earth position (ft)initial_D = -altitude; % Earth position (ft)

% Compile modelJindivik_trim_lin([],[],[],’compile’);

% Perform brute force exhaustive searchfprintf(1, ’Brute force:\n’);fprintf(1, ’ [’);

c_min = [ -0.20; -0.80; 1000 ];c_max = [ 0.80; 0.80; 13800 ];c_points = [ 30; 20; 20 ];

[best_c, best_dx] = ...JindivikTrimExhaustiveSearch(Vt, c_min, c_max, c_points);

fprintf(1, ’]\n’);fprintf(1, ’ alpha: %frad, de: %frad, dt: %frpm\n’, ...

best_c(1), best_c(2), best_c(3));fprintf(1, ’ dx: %f %f %f %f\n’, ...

best_dx(7), best_dx(9), best_dx(2), best_dx(5));

% Perform hill walk refinementfprintf(1, ’Hill walk:\n’);fprintf(1, ’ [’);

c_step = [ 0.01; 0.01; 10 ];max_iter = 100000;recursions = 100;

[best_c, best_dx] = ...JindivikTrimHillWalk(Vt, best_c, c_step, max_iter, recursions);

fprintf(1, ’]\n’);fprintf(1, ’ alpha: %frad, de: %frad, dt: %frpm\n’, ...

best_c(1), best_c(2), best_c(3));fprintf(1, ’ dx: %f %f %f %f\n’, ...

best_dx(7), best_dx(9), best_dx(2), best_dx(5));

% Close modelJindivik_trim_lin([],[],[],’term’);

return

JindivikLin.m

function ...[A_long, B_long, A_lat, B_lat, A_lat2long, A_long2lat] = ...JindivikLin( Vt, altitude, fuel, c )

% function ...% [A_long, B_long, A_lat, B_lat, A_lat2long, A_long2lat] = ...% JindivikLin( Vt, altitude, fuel, c )%% DESCRIPTION%% Linearises the Jindivik model about a given trimmed straight and% level flight condition.%% GLOBAL VARIABLES%% The following variables must be configured as global in the% top level workspace to enable the function to manipulate the% model:%% initial_fuel

82

Page 87: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

% initial_N initial_E initial_D%% PARAMETERS%% Vt:% altitude:% fuel:%% The striaght and level flight condition to linearise around.%% Where Vt is the speed in (ft/s), altitude is in (ft) and% fuel is the amount of fuel in the tanks (gallons).%% c:%% The flight configuration that best trims the aircraft in the% specified speed/altitude/fuel straight and level flight% condition.%% This is a vector of the format:%% [alpha; de; dt]%% Where alpha is the angle of attack (radian), de is the elevator% demand (radians) and dt is the throttle setting (rpm).%% RETURNS%% A_long:% B_long:% A_lat:% B_lat:%% The longitudinal and lateral A and B linear% state space representation matricies of the Jindivik% model about the specified flight condition.%% A_lat2long:% A_long2lat:%% The cross terms of the A matrix to allow checking for% coupling between the longitudinal and lateral dynamics.%% Hence:%% [ x_dot_long ] = [ A_long | A_lat2long ] [ x_long ]% [ ---------- ] [ ------------------------ ] [ ------ ]% [ x_dot_lat ] = [ A_long2_lat | A_lat ] [ x_lat ]

% --------------------------------------------------------------------

% AUTHORS AND MODIFICATIONS%% 2004 06 10, Richard Lancaster, original code.

% --------------------------------------------------------------------

% Extract flight configurationalpha = c(1);de = c(2);dt = c(3);

% Output bannerfprintf(1, ’Linearising...\n’);fprintf(1, ’Vt: %0.1fft/s, alt: %0.1fft, fuel: %0.2fgal\n’, ...

Vt, altitude, fuel);fprintf(1, ’Alpha: %frad, de: %frad, dt: %frpm\n’, ...

alpha, de, dt);

% Allow subroutine access to model initialisation variablesglobal initial_fuelglobal initial_N initial_E initial_D

% Perform initialisation of modelinitial_fuel = fuel; % Fuel quantity (Gallons)

initial_N = 0; % Earth position (ft)initial_E = 0; % Earth position (ft)initial_D = -altitude; % Earth position (ft)

% Calculate aircraft state variablesu = Vt * cos(alpha);v = 0;w = Vt * sin(alpha);

p = 0;q = 0;r = 0;

83

Page 88: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

phi = 0;theta = alpha;psi = 0;

x = [p;q;r;phi;theta;psi;u;v;w];

% Calculate control inputsu = [de;0;dt];

% Perform linearisation[A,B,C,D] = linmod(’Jindivik_trim_lin’, x, u);

A_long = A([7;9;2;5],[7;9;2;5]);A_lat = A([8;1;3;4;6],[8;1;3;4;6]);

B_long = B([7;9;2;5],[1;2;3]);B_lat = B([8;1;3;4;6],[1;2;3]);

A_lat2long = A([7;9;2;5],[8;1;3;4;6]);A_long2lat = A([8;1;3;4;6],[7;9;2;5]);

% Output state space representation matriciesA_longB_longA_latB_latA_lat2longA_long2lat

return

JindivikTrimExhaustiveSearch.m

function [best_c, best_dx] = ...JindivikTrimExhaustiveSearch(Vt, c_min, c_max, c_points)

% function [best_c, best_dx] = ...% JindivikTrimExhaustiveSearch(Vt, c_min, c_max, c_points)%% DESCRIPTION%% JindivikTrimExhaustiveSearch(...) accepts as parameters maximum% and minimum values for angle of attack, elevator deflection% and throttle. It then performs an exhaustive search of% the parameter cube defined by these limits to find the combination% of the three inputs that best trims out the Jindivik in straight% and level flight at a of speed Vt (ft/s).%% By performing an exhaustive search the non-local minimum can be% found. However as the routine descritises the cube to a granuality% defined by c_points, the trim point found is unlikely to be the% exact trim point. However it will be very close to it.% A hill walking refinement should therefore be performed to further% refine the trim point.%% NOTE: The Jindivik model should have been pre initialised with% the flight altitude and the amount of fuel in the tank.%% PARAMETERS%% Vt:%% The straight and level speed to find the trim point for.%% c_min:% c_max:%% Vectors of the format:%% [alpha; de; dt]%% that define the parameter cube to be searched for the% global minimum.%% Where alpha is the angle of attack (radians), de is the% elevator deflection (radians) and dt is the throttle% setting (rpm).%% c_points:%% A vector of the format:

84

Page 89: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

%% [alpha_points; de_points; dt_points]%% which defines the number of points along each of% the parameter axes at which the search should be performed.%% The number of points along each axis must be at least 2.%% RETURNS%% best_c:%% The configuration which best trims the Jindivik at flight% speed Vt. This will be close to the global minimum.%% This is a vector of the format:%% [alpha; de; dt]%% best_dx:%% The rate of change of the aircraft’s state variables in% flight configuration best_c.%% NOTES%% - Jindivik trim and lin model must have been compiled before% this function is called.

% --------------------------------------------------------------------

% AUTHORS AND MODIFICATIONS%% 2004 06 10, Richard Lancaster, original code.

% --------------------------------------------------------------------

% Setup a default best trimbest_worthyness = inf;best_c = [0; 0; 0];best_dx = [];

% Calculate the granuarity of the searchfor n = [1:1:length(c_points)]

c_step_size(n) = (c_max(n) - c_min(n)) / (c_points(n)-1);end

% Perform search of parameter cubefor alpha = [ c_min(1) : c_step_size(1) : c_max(1) ]

fprintf(1, ’.’);for de = [ c_min(2) : c_step_size(2) : c_max(2) ]

for dt = [ c_min(3) : c_step_size(3) : c_max(3) ]

% Calculate worthyness of configuration and update% current best if required[ worthyness, dx] = ...

JindivikTrimWorthyness( [alpha; de; dt], Vt );

if (worthyness < best_worthyness)best_worthyness = worthyness;best_c = [alpha; de; dt];best_dx = dx;

end

endend

end

return

JindivikTrimHillWalk.m

function [best_c, best_dx] = ...JindivikTrimHillWalk(Vt, c, c_step, max_iter, recursions)

% function [best_c, best_dx] = ...% JindivikTrimHillWalk(Vt, c, c_step, max_iter, recursions)%% DESCRIPTION%% JindivikTrimHillWalk(...) accepts an initial estimate of a% flight configuration c that is close to trimming the Jindivik

85

Page 90: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

% in straight and level flight at Vt (ft/s). It then performs a% simple hill walking refinement algorithm to minimise the% JindivikTrimWorthyness(...) cost function and hence locate the% exact trim point for flight speed Vt.%% NOTE: The Jindivik model should have been pre initialised with% the flight altitude and the amount of fuel in the tank.%% PARAMETERS%% Vt:%% The straight and level speed to find the trim point for.%% c:%% The initial best guess at a trim configuration for flight% speed Vt.%% This should be a vector of the format:%% [alpha; de; dt]%% Where alpha is the angle of attack (radians), de is the% elevator deflection (radians) and dt is the throttle% setting (rpm).%% c_step:%% The initial step sizes to use in the hill walking refinement.%% This should be a vector of the format:%% [alpha_step; de_step; dt_step]%% max_iter:%% The maximum number of steps to take along each of the axes% at each level of recursion.%% recursions:%% The number of times the function should recursivly call its% self. At each level of recursion the step sizes are halved.%% RETURNS%% best_c:%% The value of c which best trims the Jindivik at flight% speed Vt. This could be a local minimum.%% best_dx:%% The rate of change of the aircraft’s state variables in% flight configuration best_c.%% NOTES%% - Jindivik trim and lin model must have been compiled before% this function is called.

% --------------------------------------------------------------------

% AUTHORS AND MODIFICATIONS%% 2004 06 10, Richard Lancaster, original code.

% --------------------------------------------------------------------

% Set the input trim configutation as the best guess so far and% calculate its worthyness.best_c = c;[best_worthyness, best_dx] = JindivikTrimWorthyness( best_c, Vt );

% Loop until we can’t refine anymore or the maximum number of% iterations has been reachediteration = 1;try_more = 1;while (try_more == 1) & (iteration <= max_iter)

try_more = 0;

% Try to refine each configuration parameter in turn by a% single stepfor n = [1:1:length(c)]

% For the configuration parameter under consideration% calculate the effect of taking a single step in each

86

Page 91: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

% directionc_minus = best_c;c_plus = best_c;

c_minus(n) = c_minus(n) - c_step(n);c_plus(n) = c_plus(n) + c_step(n);

[ worthyness_minus, dx_minus ] = ...JindivikTrimWorthyness( c_minus, Vt );

[ worthyness_plus, dx_plus ] = ...JindivikTrimWorthyness( c_plus, Vt );

% If either of the steps have improved the trim then% update best trim configuration accordinglyif (worthyness_minus < best_worthyness)

best_c = c_minus;best_dx = dx_minus;best_worthyness = worthyness_minus;try_more = 1;

end

if (worthyness_plus < best_worthyness)best_c = c_plus;best_dx = dx_plus;best_worthyness = worthyness_plus;try_more = 1;

end

end

% Move on to the next iterationiteration = iteration + 1;

end

% Output a dot if we performed more than one iterationif (iteration > 2)

fprintf(1, ’.’);end

% If recursions remain then halve the step sizes and% continue refinement.if (recursions > 1)

[best_c, best_dx] = JindivikTrimHillWalk ...(Vt, best_c, c_step/2, max_iter, recursions - 1);

end

return

JindivikTrimWorthyness.m

function [ worthyness, dx ] = JindivikTrimWorthyness( c, Vt )

% function [ worthyness, dx ] = JindivikTrimWorthyness( c, Vt )%% DESCRIPTION%% Calculates how well trimmed the Jindivik would be for straight% and level flight at Vt (ft/s) if placed in flight configuration c.%% NOTE: The Jindivik model should have been pre initialised with% the flight altitude and the amount of fuel in the tank.%% PARAMETERS%% c:%% A vector of the format [alpha; de; dt]. Where alpha is the% angle of attack (radians), de is the elevator deflection% (radians) and dt is the throttle setting (rpm).%% Vt:%% The velocity to evaluate the trim configuration at.%% RETURN VALUES%% worthyness:%% A cost function value that describes how well trimmed the% aircraft would be in flight configuration c at speed Vt.% The lower the value the better the aircraft is trimmed.%

87

Page 92: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

% dx:%% The initial rate of change of the aircraft’s states if it was% setup in configuration c at speed Vt.%% NOTES%% - Jindivik trim and lin model must have been compiled before% this function is called.

% --------------------------------------------------------------------

% AUTHORS AND MODIFICATIONS%% 2004 06 10, Richard Lancaster, original code.

% --------------------------------------------------------------------

% Extract flight configurationalpha = c(1);de = c(2);dt = c(3);

% Calculate aircraft state variablesu = Vt * cos(alpha);v = 0;w = Vt * sin(alpha);

p = 0;q = 0;r = 0;

phi = 0;theta = alpha;psi = 0;

x = [p;q;r;phi;theta;psi;u;v;w];

% Calculate control inputsu = [de;0;dt];

% Calculate derivatives of aircraft state variablesJindivik_trim_lin(0, x, u, ’update’);Jindivik_trim_lin(0, x, u, ’outputs’);dx = Jindivik_trim_lin(0, x, u, ’derivs’);

% Calculate worthyness of flight setupworthyness = sqrt( (dx(7))ˆ2 + (dx(9))ˆ2 + (dx(2))ˆ2 + (dx(5))ˆ2 );

return

88

Page 93: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Appendix B

Pitch attitude demand to altitudetransfer function generation

The Matlab code in this appendix generates a transfer function from the input of thepitch attitude aquire and hold controller to the altitude of the aircraft.

% Generates a transfer function from the input of the pitch attitude% aquire and hold controller to the altitude of the aircraft.

% --------------------------------------------------------------------

% AUTHORS AND MODIFICATIONS%% 2004 08 20, Richard Lancaster, original code.

% --------------------------------------------------------------------

% Clear workspaceclear

% Define longitudinal state space representation of aircraftA_long = [ -0.0160 0.0168 0.6797 -32.1741 ;

-0.1364 -1.6189 448.5622 0.0558 ;-0.0000 -0.0242 -0.7189 0 ;

0 0 1.0000 0 ];

B_long = [ -3.1876 0.0014 ;-45.3389 0.0000 ;-22.6788 0.0000 ;

0 0 ];

C_long = eye(4);

D_long = zeros([4 2]);

% Augment matricies with heightA_long(5,:) = [0 -1 0 450];A_long(:,5) = [0; 0; 0; 0; 0];

B_long(5,:) = [0 0];

C_long(5,:) = [0 0 0 0];C_long(:,5) = [0; 0; 0; 0; 1];

D_long(5,:) = [0 0];

% --------------------------------------------------------------------

% Define feedback gain matrix for q to eta feedbackKq = -0.15;

K = [ 0 0 Kq 0 0 ;0 0 0 0 0 ];

% Calculate augmented state space representations

89

Page 94: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

A_long_Kq = A_long - (B_long * K);B_long_Kq = B_long;C_long_Kq = C_long;D_long_Kq = D_long;

% Generate LTI model of q augmented aircraftKq_aircraft_ss = ss(A_long_Kq, B_long_Kq, ...

C_long_Kq, D_long_Kq);

% --------------------------------------------------------------------

% Define state space representation of pitch attitude aquire and% hold PI controllerA_theta_pid = [ 0 ];B_theta_pid = [ -0.1 ];C_theta_pid = [ 1 ];D_theta_pid = [ -0.24 ];

% Generate LTI model of pitch attitude aquire and hold% PI controllerPI_theta_ss = ss(A_theta_pid, B_theta_pid, ...

C_theta_pid, D_theta_pid);

% Connect pitch attitude aquire and hold PI controller to aircraftol_PItheta_Kq_aircraft_ss = ...

series(PI_theta_ss, Kq_aircraft_ss, [1], [1]);

% close loop around controllercl_PItheta_Kq_aircraft_ss = ...

feedback(ol_PItheta_Kq_aircraft_ss, ss([],[],[],[1]), [1], [4]);

% --------------------------------------------------------------------

% Generate transfer function for theta demand to altitude[na, den] = ss2tf(cl_PItheta_Kq_aircraft_ss.a, ...

cl_PItheta_Kq_aircraft_ss.b, ...cl_PItheta_Kq_aircraft_ss.c, ...cl_PItheta_Kq_aircraft_ss.d);

num_h = na(5,:);

tf_h_theta_PItheta_Kq = tf(num_h, den);

% Output resultsfprintf(1, ’tf_h_theta_PItheta_Kq:\n’);zpk(tf_h_theta_PItheta_Kq)

90

Page 95: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Appendix C

Bank angle demand to headingtransfer function generation

The Matlab code in this appendix generates a transfer function from the input of thebank angle aquire and hold controller to the heading of the aircraft.

% Generates a transfer function from the input of the bank angle% aquire and hold controller to the heading of the aircraft.

% --------------------------------------------------------------------

% AUTHORS AND MODIFICATIONS%% 2004 08 20, Richard Lancaster, original code.

% --------------------------------------------------------------------

% Clear workspaceclear

% Define lateral state space representation of aircraftA_lat = [ -0.1245 -0.9132 -449.9993 32.1741 0 ;

-0.0183 -1.6585 1.2975 0 0 ;0.0129 -0.0095 -0.2292 0 0 ;

0 1.0000 -0.0017 0 0 ;0 0 1.0000 0 0 ];

B_lat = [ 0 ;-26.8841 ;

-0.2900 ;0 ;0 ];

C_lat = eye(5);

D_lat = zeros([5 1]);

% Generate LTI model of the aircraftaircraft_ss = ss(A_lat, B_lat, ...

C_lat, D_lat);

% --------------------------------------------------------------------

% Define state space representation phi aquire and hold P controllerA_phi_p = [ ];B_phi_p = [ ];C_phi_p = [ ];D_phi_p = [ -0.08 ];

% Generate LTI model of phi aquire and hold P controllerP_phi_ss = ss(A_phi_p, B_phi_p, ...

C_phi_p, D_phi_p);

% Connect phi aquire and hold P controller to aircraftol_P_phi_aircraft_ss = ...

91

Page 96: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

series(P_phi_ss, aircraft_ss, [1], [1]);

% close loop around controllercl_P_phi_aircraft_ss = ...

feedback(ol_P_phi_aircraft_ss, ss([],[],[],[1]), [1], [4]);

% --------------------------------------------------------------------

% Generate transfer functions for phi demand to heading[na, den] = ss2tf(cl_P_phi_aircraft_ss.a, ...

cl_P_phi_aircraft_ss.b, ...cl_P_phi_aircraft_ss.c, ...cl_P_phi_aircraft_ss.d);

num_psi = na(5,:);

tf_psi_phi_Pphi = tf(num_psi, den);

% Output resultsfprintf(1, ’tf_psi_phi_Pphi:\n’);zpk(tf_psi_phi_Pphi)

92

Page 97: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

Appendix D

Heading demand to lateral positiontransfer function generation

The Matlab code in this appendix generates a transfer function from the input of theheading aquire and hold controller to the lateral position of the aircraft.

% Generates a transfer function from the input of the heading% aquire and hold controller to the lateral position of the aircraft.

% --------------------------------------------------------------------

% AUTHORS AND MODIFICATIONS%% 2004 08 20, Richard Lancaster, original code.

% --------------------------------------------------------------------

% Clear workspaceclear

% Define lateral state space representation of aircraftA_lat = [ -0.1245 -0.9132 -449.9993 32.1741 0 ;

-0.0183 -1.6585 1.2975 0 0 ;0.0129 -0.0095 -0.2292 0 0 ;

0 1.0000 -0.0017 0 0 ;0 0 1.0000 0 0 ];

B_lat = [ 0 ;-26.8841 ;

-0.2900 ;0 ;0 ];

C_lat = eye(5);

D_lat = zeros([5 1]);

% Augment matricies with lateral positionA_lat(6,:) = [1 0 0 0 450];A_lat(:,6) = [0; 0; 0; 0; 0; 0];

B_lat(6,:) = [0];

C_lat(6,:) = [0 0 0 0 0];C_lat(:,6) = [0; 0; 0; 0; 0; 1];

D_lat(6,:) = [0];

% Generate LTI model of the aircraftaircraft_ss = ss(A_lat, B_lat, ...

C_lat, D_lat);

% --------------------------------------------------------------------

% Define state space representation phi aquire and hold P controller

93

Page 98: Formation flight autopilot design for the GAF Jindivik Mk ...read.pudn.com/downloads138/ebook/594353/MK-4-thesis.pdf · Formation flight autopilot design for the GAF Jindivik Mk

A_phi_p = [ ];B_phi_p = [ ];C_phi_p = [ ];D_phi_p = [ -0.08 ];

% Generate LTI model of phi aquire and hold P controllerP_phi_ss = ss(A_phi_p, B_phi_p, ...

C_phi_p, D_phi_p);

% Connect phi aquire and hold P controller to aircraftol_P_phi_aircraft_ss = ...

series(P_phi_ss, aircraft_ss, [1], [1]);

% close loop around controllercl_P_phi_aircraft_ss = ...

feedback(ol_P_phi_aircraft_ss, ss([],[],[],[1]), [1], [4]);

% --------------------------------------------------------------------

% Define state space representation psi aquire and hold P controllerA_psi_p = [ ];B_psi_p = [ ];C_psi_p = [ ];D_psi_p = [ 7.0 ];

% Generate LTI model of psi aquire and hold P controllerP_psi_ss = ss(A_psi_p, B_psi_p, ...

C_psi_p, D_psi_p);

% Connect psi aquire and hold P controller to phi controller% and aircraftol_P_psi_P_phi_aircraft_ss = ...

series(P_psi_ss, cl_P_phi_aircraft_ss, [1], [1]);

% close loop around controllercl_P_psi_P_phi_aircraft_ss = ...

feedback(ol_P_psi_P_phi_aircraft_ss, ss([],[],[],[1]), [1], [5]);

% --------------------------------------------------------------------

% Generate transfer functions for psi demand to lateral displacement[na, den] = ss2tf(cl_P_psi_P_phi_aircraft_ss.a, ...

cl_P_psi_P_phi_aircraft_ss.b, ...cl_P_psi_P_phi_aircraft_ss.c, ...cl_P_psi_P_phi_aircraft_ss.d);

num_E = na(6,:);

tf_E_psi_Ppsi_Pphi = tf(num_E, den);

% Output resultsfprintf(1, ’tf_E_psi_Ppsi_Pphi:\n’);zpk(tf_E_psi_Ppsi_Pphi)

94