81
i Department of Aeronautical Engineering ISTANBUL TECHNICAL UNIVERSITY FACULTY OF AERONAUTICS AND ASTRONAUTICS GRADUATION PROJECT June 2018 FINITE STATE AUTOMATA BASED APPROACH TO AUTONOMOUS STALL AND UPSET RECOVERY FOR AGILE AIRCRAFT Thesis Advisor: Asst. Prof. Nazım Kemal Üre Anıl YILDIZ

FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

  • Upload
    votram

  • View
    222

  • Download
    0

Embed Size (px)

Citation preview

Page 1: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

i

Department of Aeronautical Engineering

ISTANBUL TECHNICAL UNIVERSITY FACULTY OF AERONAUTICS AND ASTRONAUTICS

GRADUATION PROJECT

June 2018

FINITE STATE AUTOMATA BASED APPROACH

TO AUTONOMOUS STALL AND UPSET

RECOVERY FOR AGILE AIRCRAFT

Thesis Advisor: Asst. Prof. Nazım Kemal Üre

Anıl YILDIZ

Page 2: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

ii

June 2018

ISTANBUL TECHNICAL UNIVERSITY FACULTY OF AERONAUTICS AND ASTRONAUTICS

FINITE STATE AUTOMATA BASED APPROACH

TO AUTONOMOUS STALL AND UPSET

RECOVERY FOR AGILE AIRCRAFT

GRADUATION PROJECT

Anıl YILDIZ

110150701

Thesis Advisor: Asst. Prof. Nazım Kemal Üre

Department of Aeronautıcal Engineering

Page 3: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

iii

Thesis Advisor : Asst. Prof. Nazım Kemal Üre ..............................

Istanbul Technical University

Jury Members : Prof. İbrahim Özkol .............................

Istanbul Technical University

Asst. Prof. Emre Koyuncu ..............................

Istanbul Technical University

Asst. Prof. Nazım Kemal Üre ..............................

Istanbul Technical University

Anıl Yıldız, student of ITU Faculty of Aeronautics and Astronautics with student ID

110150701, successfully defended the graduation entitled “FINITE STATE

AUTOMATA BASED APPROACH TO AUTONOMOUS STALL AND UPSET

RECOVERY FOR AGILE AIRCRAFT”, which he prepared after fulfilling the

requirements specified in the associated legislations, before the jury whose signatures

are below.

Date of Submission : 28 May 2018

Date of Defense : 11 June 2018

Page 4: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

iv

To humanity,

Page 5: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

FOREWORD

First of all, I would like to express how deeply thankful I am to my advisor Prof.Nazım Kemal Ure, who has been, to say the least, a splendid mentor who accepted meto his research when I was only a sophomore. It would not be an overstatement to saythat without his guidance, my undergrad years would have been over before I realizedhow much I enjoyed being a researcher. Prof. Ure’s attribute of being a great listenerand his valuable past experiences have left my labmates and I passionate and in awe tocontinue when we got stuck, which is most needed in this line of work. I feel lucky tohave known and worked with such a great academician.

My labmates were also a great motivation and inspiration at the Aerospace Re-search Center. Mehmet Ugur Akcal, Batuhan Hostas, Majid Moghadam and BurakYuksek were always there for me when I needed a lending hand. Although they werealready MSc and PhD students and were occupied with their own research, they neverpostponed helping me when I got lost. Mevlut Uzun and Barıs Baspınar have alsobeen, despite working on a different field of research than mine, very helpful with theirsmall-talks that later contributed to my first publication.

My roommate in my senior year, Anıl Berk Atalar was also supportive with his un-matchable sense of humor. Him and my oldest friend in ITU, Mustafa Berkay Akbıyık,have been two great people to hang out with throughout my undergrad years. Both oftheir friendships are gold, and always will be.

This acknowledgment section would be incomplete without mentioning Prof.Gokhan Inalhan, who has perhaps been the single most important person during myundergrad years. I will never forget the day he accepted to see me in his office inthe Rectorate Building. The 15 minutes he spared has been, in the most humble ex-pression, a “game-changer” in my life and career as I would have never thought ofproceeding in the field of academic research after graduation, and likely would haveended being an engineer at a company, regretting as the years went by.

Prof. Emre Koyuncu and Prof. Hulya Cebeci have also been great sources of wis-dom and inspiration, which could also be sensed in minutes from the way they lecturedtheir classes. They were also the ones to inform me about the Boeing Scholarship Pro-gram, which was a great aid in my senior year. It has been a great honor to have sharedthe same workspace with these four incredible academicians.

Last but not least, my family has been very supportive from beginning to end, and Icannot possibly express how grateful I am to them. Our long talks with my mother andfather shaped my point of view on many matters, especially my life after graduation,and made me the person I am today.

May 2018 Anıl YILDIZ

v

Page 6: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

(Page intentionally left blank.)

vi

Page 7: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

TABLE OF CONTENTS

Page

FOREWORD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vTABLE OF CONTENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . viiiABBREVIATIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ixSYMBOLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xLIST OF TABLES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiiLIST OF FIGURES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xivSUMMARY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv1 INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.1 Purpose of This Thesis . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Literature Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.3 Hypothesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2 BACKGROUND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42.1 Recoverability Criteria . . . . . . . . . . . . . . . . . . . . . . . . . 42.2 F-16 Aircraft Model . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.3 Extended Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . 13

3 NONLINEAR CONTROLLERS IMPLEMENTED IN SIMULATIONS 143.1 Single-Loop NDI Controller for P,Q and R (C1) . . . . . . . . . . . . 153.2 Double-Loop NDI Controller for α,β and φ (C2) . . . . . . . . . . . 193.3 Switching NDI Controller (C3) . . . . . . . . . . . . . . . . . . . . . 21

4 FINITE STATE AUTOMATON . . . . . . . . . . . . . . . . . . . . . . 214.1 Automata Fragment No. 1: Regulation of Angular Rates . . . . . . . 234.2 Automata Fragment No. 2: Simple Stall . . . . . . . . . . . . . . . . 264.3 Automata Fragment No. 3: Nose-High, Small Bank Angle Upset . . . 284.4 Automata Fragment No. 4: Nose-High, High Bank Angle Upset . . . 314.5 Automata Fragment No. 5: Nose-Low, Small Bank Angle Upset . . . 334.6 Automata Fragment No. 6: Nose-Low, High Bank Angle Upset . . . . 354.7 Automata Fragment No. 7: Upset Recovery Finalization . . . . . . . 374.8 Composition of Fragments . . . . . . . . . . . . . . . . . . . . . . . 394.9 Discrete System Verification . . . . . . . . . . . . . . . . . . . . . . 40

4.9.1 Safety Properties . . . . . . . . . . . . . . . . . . . . . . . . 404.9.2 Blocking Properties . . . . . . . . . . . . . . . . . . . . . . . 42

5 OPTIMIZATION ALGORITHM . . . . . . . . . . . . . . . . . . . . . 425.1 Off-Line Optimization . . . . . . . . . . . . . . . . . . . . . . . . . 455.2 On-Line Optimization . . . . . . . . . . . . . . . . . . . . . . . . . . 48

6 SIMULATION RESULTS . . . . . . . . . . . . . . . . . . . . . . . . . . 506.1 Elementary Recovery Example: From a Simple Stall . . . . . . . . . 516.2 Advanced Recovery Example: From a Nose-High Upset . . . . . . . 536.3 Recoverability Envelope . . . . . . . . . . . . . . . . . . . . . . . . 566.4 Optimization Improvements . . . . . . . . . . . . . . . . . . . . . . . 59

vii

Page 8: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

7 CONCLUSION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 608 PUBLICATIONS FROM THIS THESIS . . . . . . . . . . . . . . . . . 61REFERENCES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

viii

Page 9: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

ABBREVIATIONS

6DOF : Six Degrees of FreedomFAA : Federal Aviation AdministrationGNC : Guidance, Navigation and ControlGTM : Generic Transport ModelHBA : High Bank AngleHi-Fi : High-FidelityLOC : Loss-of-ControlNASA : National Aeronautics and Space AdministrationNDI : Nonlinear Dynamic Inverse (Controller)NH : Nose-HighNL : Nose-LowPI : Proportional-Integral (Controller)SBA : Small Bank AngleTCM : Transport Class Model

ix

Page 10: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

SYMBOLS

α : angle of attackαstall : stall angle of attackβ : sideslip angleφ : roll (bank) angleθ : pitch angleψ : yaw angleδa : aileron deflection angleδe : elevator deflection angleδr : rudder deflection angleδT : throttle percentageNP : North positionEP : East positionh : altitudeNZ : normal load factorP : roll angular rateQ : pitch angular rateR : yaw angular rateVC : calibrated airspeedVT : true airspeed

x

Page 11: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

LIST OF TABLES

Page

Table 2.1 : Summary of procedures suggested by FAA [1] for recovery whenunder an upset condition. These procedures apply mostly to com-mercial passenger aircraft, not to agile fighter jets, but still give aninsightful set of recommendations. . . . . . . . . . . . . . . . . . 5

Table 4.1 : Elements of X , the continuous states vector. . . . . . . . . . . . . 23Table 4.2 : Elements of Q1, which are the discrete states of H1 that is respon-

sible for regulating angular rates. . . . . . . . . . . . . . . . . . . 24Table 4.3 : Controllers used and the given reference signals while at fragment

H1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24Table 4.4 : Elements of E1 and G1 that define the events and guards of discrete

state transitions within H1, respectively. . . . . . . . . . . . . . . 24Table 4.5 : Elements of I1 that define the invariants of each discrete state that

prevent the transition to any other state within H1. . . . . . . . . . 25Table 4.6 : Elements of Q2, which are the discrete states of H2 that is respon-

sible recovering a simple stall. . . . . . . . . . . . . . . . . . . . 27Table 4.7 : Controllers used and the given reference signals while at fragment

H2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27Table 4.8 : Elements of E2 and G2 that define the events and guards of discrete

state transitions within H2, respectively. . . . . . . . . . . . . . . 27Table 4.9 : Elements of I2 that define the invariants of each discrete state that

prevent the transition to any other state within H2. . . . . . . . . . 28Table 4.10 : Elements of Q3, which are the discrete states of H3 that is respon-

sible for recovering from a nose-high upset with small bank angle. 29Table 4.11 : Controllers used and the given reference signals while at fragment

H3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29Table 4.12 : Elements of E3 and G3 that define the events and guards of discrete

state transitions within H3, respectively. . . . . . . . . . . . . . . 30Table 4.13 : Elements of I3 that define the invariants of each discrete state that

prevent the transition to any other state within H3. . . . . . . . . . 30Table 4.14 : Elements of Q4, which are the discrete states of H4 that is respon-

sible for recovering from a nose-high upset with high bank angle. 31Table 4.15 : Controllers used and the given reference signals while at fragment

H4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32Table 4.16 : Elements of E4 and G4 that define the events and guards of discrete

state transitions within H4, respectively. . . . . . . . . . . . . . . 32Table 4.17 : Elements of I4 that define the invariants of each discrete state that

prevent the transition to any other state within H4. . . . . . . . . . 32Table 4.18 : Elements of Q5, which are the discrete states of H5 that is respon-

sible for recovering from a nose-low upset with small bank angle. 33

xi

Page 12: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

Table 4.19 : Controllers used and the given reference signals while at fragmentH5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

Table 4.20 : Elements of E5 and G5 that define the events and guards of discretestate transitions within H5, respectively. . . . . . . . . . . . . . . 34

Table 4.21 : Elements of I5 that define the invariants of each discrete state thatprevent the transition to any other state within H5. . . . . . . . . . 35

Table 4.22 : Elements of Q6, which are the discrete states of H6 that is respon-sible for recovering from a nose-low upset with high bank angle. . 36

Table 4.23 : Controllers used and the given reference signals while at fragmentH6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

Table 4.24 : Elements of E6 and G6 that define the events and guards of discretestate transitions within H6, respectively. . . . . . . . . . . . . . . 37

Table 4.25 : Elements of I6 that define the invariants of each discrete state thatprevent the transition to any other state within H6. . . . . . . . . . 37

Table 4.26 : Elements of Q7, which are the discrete states of H7 that is respon-sible for finalizing the upset recovery procedures. . . . . . . . . . 38

Table 4.27 : Controllers used and the given reference signals while at fragmentH7. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

Table 4.28 : Elements of E7 and G7 that define the events and guards of discretestate transitions within H7, respectively. . . . . . . . . . . . . . . 39

Table 4.29 : Elements of I7 that define the invariants of each discrete state thatprevent the transition to any other state within H7. . . . . . . . . . 39

Table 6.1 : Legend for Tables 6.2 and 6.3, where colors indicate recovery timefor a specific scenario. . . . . . . . . . . . . . . . . . . . . . . . 57

Table 6.2 : Stall Condition: Results of the simulations run over an envelopeof θ and φ . Simulations only use the hybrid system H describedthroughout this thesis. Colors indicate recovery time range, num-bers indicate maximum G force (or minimum if under -1.5 G)acted on the aircraft during recovery. Angles and angular rates inthe title and heading describe the initial conditions before exitingthe idle state. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

Table 6.3 : Deep-Stall Condition: Results of the simulations run over an en-velope of θ and φ . Simulations only use the hybrid system Hdescribed throughout this thesis. Colors indicate recovery timerange, numbers indicate maximum G force (or minimum if under-1.5 G) acted on the aircraft during recovery. Angles and angularrates in the title and heading describe the initial conditions beforeexiting the idle state. . . . . . . . . . . . . . . . . . . . . . . . . 58

xii

Page 13: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

LIST OF FIGURES

Page

Figure 1.1 : Flowchart representation of the methodology used by the hybridsystem. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

Figure 2.1 : Variance of the lift coefficient with respect to angle of attack andelevator deflection. Decay in lift can be observed after 35 angleof attack. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

Figure 2.2 : Upper: The lift coefficient varies almost constantly for a large por-tion of elevator deflection changes when α = 60, and is an indi-cation of the ineffectiveness of the control surface. Lower: Thelift coefficient holds an almost linear relation between lift coeffi-cient and elevator deflection for α = 10. The control surface’seffectiveness can be seen by observing that a change in elevatordeflection can effectively alter the coefficient of lift acting on theaircraft. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

Figure 3.1 : Block diagram of NDI based angular rate controller. . . . . . . . 15Figure 3.2 : Block diagram of the double loop NDI controller. . . . . . . . . . 19Figure 3.3 : Block diagram of the switching mechanism. . . . . . . . . . . . . 21Figure 4.1 : Flowchart of the automata fragment no. 1 which is responsible for

regulating angular rates. Square brackets, parentheses and curlybrackets represent guards, controllers and invariants, respectively. 25

Figure 4.2 : Flowchart of the automata fragment no. 2 which is responsible forrecovering from a simple stall. Square brackets, parentheses andcurly brackets represent guards, controllers and invariants, respec-tively. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

Figure 4.3 : Flowchart of the automata fragment no. 3 which is responsiblefor recovering from a nose-high, small bank angle upset. Squarebrackets, parentheses and curly brackets represent guards, con-trollers and invariants, respectively. . . . . . . . . . . . . . . . . 30

Figure 4.4 : Flowchart of the automata fragment no. 4 which is responsible forrecovering from a nose-high, high bank angle upset. Square brack-ets, parentheses and curly brackets represent guards, controllersand invariants, respectively. . . . . . . . . . . . . . . . . . . . . 32

Figure 4.5 : Flowchart of the automata fragment no. 5 which is responsible forrecovering from a nose-low, small bank angle upset. Square brack-ets, parentheses and curly brackets represent guards, controllersand invariants, respectively. . . . . . . . . . . . . . . . . . . . . 35

Figure 4.6 : Flowchart of the automata fragment no. 6 which is responsible forrecovering from a nose-low, high bank angle upset. Square brack-ets, parentheses and curly brackets represent guards, controllersand invariants, respectively. . . . . . . . . . . . . . . . . . . . . 37

xiii

Page 14: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

Figure 4.7 : Flowchart of the automata fragment no. 7 which is responsible forfinalizing recovery procedures. Square brackets, parentheses andcurly brackets represent guards, controllers and invariants, respec-tively. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

Figure 4.8 : Flowchart of the complete automata described throughout this the-sis. All of the previous fragments have been combined by parallelcomposition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

Figure 6.1 : Angle of attack, sideslip and roll angle time histories of the simplestall recovery example. . . . . . . . . . . . . . . . . . . . . . . . 51

Figure 6.2 : Angular rate time histories of the simple stall recovery example. . 52Figure 6.3 : Pitch angle, true velocity, normal load factor time histories of the

simple stall recovery example. . . . . . . . . . . . . . . . . . . . 52Figure 6.4 : Flight path followed during the simple stall recovery example.

Discrete state activation instants are shown when they have beenreached. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

Figure 6.5 : Angle of attack, sideslip and roll angle time histories of the nose-high upset recovery example. . . . . . . . . . . . . . . . . . . . . 54

Figure 6.6 : Angular rate time histories of the nose-high upset recovery example. 54Figure 6.7 : Pitch angle, true velocity, normal load factor time histories of the

nose-high upset recovery example. . . . . . . . . . . . . . . . . . 55Figure 6.8 : Flight path followed during the nose-high upset recovery example.

Discrete state activation instants are shown when they have beenreached. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

Figure 6.9 : Flight path followed during the nose-high upset recovery example.Discrete state activation instants are shown when they have beenreached. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

xiv

Page 15: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

FINITE STATE AUTOMATA BASED APPROACH TO AUTONOMOUS STALLAND UPSET RECOVERY FOR AGILE AIRCRAFT

SUMMARY

Stall and upset situations occurring on airborne vehicles exhibit a substantiallydangerous behaviour in terms of safety. If the aircraft is not successfully recoveredfrom the upset condition, the consequences are often fatal; and in the recent years, therehave been a considerable effort for designing feedback control systems for autonomousrecovery from stall and upset conditions.

In this thesis, a novel finite state automaton structure is presented. The automatonis a control architecture that switches from certain controller input sequences as re-quired to recover the aircraft from a variety of different possible upset condition. FAAhas certain guidelines for how different upset and/or stall situations shall be recovered.There are classifications, such as, nose-high, nose-low, small bank angle, large bankangle, et cetera, all which having a unique methodology to recover from the upsetcondition. Normally, these recommendations of FAA are for piloted recoveries, andthe proceeding suggestions are handed out by keeping this in mind: reduce throttle,increase bank angle, establish attitudes, etc. However, these suggestions can be au-tomated if these regulations can be numerically described, as done in this thesis. Bydoing so, a switching automated system can recover the aircraft from a large envelopeof possible upset condition.

The structure is built and tested on a Hi-Fi 6DOF F-16 aircraft simulation model,that uses nonlinear controllers to automate the recovery procedures. The automataapproach is demonstrated on a large pitch/roll angle envelope for stall and deep-stallconditions. It is shown that the developed methodology successfully recovers the air-craft for a large portion of the considered scenarios.

That being said, the assembled hybrid automata system initially assumed constantparameters. These parameters are numerical statements that prescribe when a switch-ing should occur between different recovery strategies, and the controller inputs for theactive discrete mode. These numerical parameters can theoretically be optimized ona case-by-case basis, and by doing so, a suboptimal input and discrete state sequencecan be obtained which has a tuned recovery time and recovery success percentage rate.On the other hand, an aircraft can sway into and upset circumstance from an infinitepossible initial conditions, which may seem at first that a quest to finding suboptimalsolutions for different initial conditions may be pointless. Though, an adaptive gainscheduling of parameters between different initial conditions can counter this draw-back, which in return, defines a grounded set of parameters for any possible initialconditions that a running system can be fed online, as long as a database of subopti-mal solutions are physically recorded for some user defined amount of initial pointsscattered across the continuous state space. By doing so, the parameters, explicitly in-variant conditions between adjacent discrete modes and their controller inputs, can bescheduled using an interpolation among stored suboptimal solutions in the database.

The legitimacy and validity of these methods are proved by Monte-Carlo simula-tions in Section 6.

xv

Page 16: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

OZET

Havadaki ucaklarda stall ve upset durumlar bolca gorulmektedir, ve eger, bu tehlikearz eden durumlardan ucak kurtarılamaz ise, bu durumların bircogu olumcul sonuclan-maktadır. Pilot egitimleri stall ve upset kurtarımını kapsıyor olmasına ragmen, bazeninsan refleksleri yeterince cevik olamamaktadır, bu da ucagın kurtarımını saglayacakotomatik sistemlerin ihtiyacını ortaya cıkarmaktadır. Bu sebeplerden oturu, otoma-tize edilmis stall ve upset kurtarımına 2000’li yıllardan sonra epey agırlık verilmistir,fakat halen tam anlamıyla onune gecilmis degildir. Bu tezde de, otomatize edilmis birstall ve upset kurtarım sistemi sunulmaktadır. Diger tezlerden ayrılan iki onemli unsurvardır: 1) Literaturde yuksek manevralı (cevik savas jetleri gibi) ucaklar icin yapılmıscalısma bulunmamaktadır, calısmaların tumu NASA’nın GTM ve/veya TCM modeliuzerinde yapılmıstır. Buna gerekce olarak da bu modellerin yuksek guvenirlikli (Hi-Fi) ve topluma acık olması (yalnızca TCM) sunulmustur. Lakin, cevik jet ucaklarınındinamikleri, NASA jenerik tasıma ucak modellerinden son derece farklıdır, en temelsebep de yuksek manevrali ucakların kısmı stabil olmayan (partially unstable) yapılarıve farklı kontrol yuzeyi dinamikleridir. Dolayısıyla GTM ve TCM ile cevik ucakanalizi yapılamaz. 2) Onceki calısmalardan faklı olarak FAA kurumunun pilotlaricin yayımlamıs oldugu stall ve upset yonergeleri dikkate alınmıstır. Bu yonerglerdehicbir matematiksel ifade bulunmamaktadır ve kurtarım onerileri, “Eger burun yukarıdurumda yuksek yatıs acısı ile upset’e girdiysen, yalpa acını daha cok yukselt kiucagın yercekiminin ektisi ile burun asagı duruma gelsin ve kontrol yuzeylerine temizhava gelsin” sekilde pilotların kontrol yuzeyi saptırma miktarı konusunda tecrube veyeteneklerine fazlaca bagımlı ifadeler olarak sunulmaktadır. Eger ki, bu yonergeler,matematiksel olarak temellendirilirse, o vakit, pilot icgudu ve zekasından bagımsız,otomatiklestirilmis bir kurtarma sistemi elde edilebilir. Bu tezin yaptıgı da budur.

Yetkili otoriteler, temel olarak 4 farklı upset durumu tanımlamıslardır: 1) yuksekyatıs acılı burun yukarı upset, 2) dusuk yatıs acılı burun yukarı upset, 3) yuksek yatısacılı burun asagı upset, 4) dusuk yatıs acılı burun asagı upset. Bu dort faklı upsetdurumu icin, pilotlu kurtarım onerileri birbirinden faklıdır. Lakin, bu yonergeler bir-birini sekans seklinde takip eden ifadelerden olusmaktadır. Dolayısıyla, dort durum-dan her birinin yonergelerini, ayrı ayrı olarak, birbirinde bagımsız sureksiz ifadelerseklinde bolmek mumkundur. Her bir sureksiz ifade, onerilen sekans ile art arda uygu-lundıgında, Newton kanunları ile acıklanan ucagın 12 adet surekli durumunu gereklikontrolcu mimarileri vasıtasıyla yonetebilir hale gelecektir. Bu sisteme de “automata”(veya “otomat”) denilmistir.

Ucak, normal seyir halinde iken, automata sistemi acıktır fakat etkin degildir, bek-leme modundadır. Etkinlesmesi icin ucagın stall durumuna girmesi veyahut pilottarafından manuel olarak etkinlestirilmesi gerekmektedir. Etkin hale geldikten sonra,ilk olarak ucagın kontrol yuzeylerini tekrar islevsel hale getirebilmek adına, acısalhızlar gerekli kontrolculer vasıtasıyla regule edilmektedir. Daha sonra, daha once debahsedilen 4 temel upset durumdan ucagın hangisinde oldugu oldugu matematikselolarak saptanmaktadır. Hangi durumda ise, o duruma ait sureksizlestirilmis ifadelersekans sekilde dizil olarak takip edilmektedir. Bu ifadelere sureksiz denilmesinin se-

xvi

Page 17: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

bebi, her bir ifade icin arkada calısan kontrolcu mimarisi, o mimariye iletilen referanssinyaller ve o ifadeye girme ve cıkma kosulu birbirlerinden ve ucagın surekli dinamik-lerinden bagımsız olusundandır.

Ucagın kontrolu icin gerekli olan kontrolcu mimarileri, tezde 3 ceside ayrılmıstır.Bu kontrolculer NDI olarak adlandılan, “linear olmayan dinamik ters cevrim” meto-duyla insaa edilmistir. Bu metoda gore, herhangi bir referans sinyal setini takip etmekicin, oncelikle o sinyal setiyle iliskili surekli durumları, ve referans takibi icin kul-lanılacak olan kontrol yuzeyleri ile arasındaki baglantı matematiksel olarak cıkarılma-lıdır. Belirli surekli durumların sisteme beslenen bir referansı takip etmesi icin gerekliolan kontrol yuzeyleri sapma miktarı denklmin ters cevrilmesi ile bulunur. Lakin, bubulunan iliski lineer olmadıgından, calısan sistem uzerinde daimi olarak guncellen-melidir. Bu da referans takibi sırasında hedefi es gecme (overshoot) ve/veya istikrardurumu hatası (steady-state error) gibi istenmeyen durumlara neden olabilmektedir. Bugibi sorunların onune gecebilmek icin referans durumlar ile mevcut durumlar arasındafarkın arasına ekstradan bir PI (orantılı-integralli) kontrolcusu konulması uygun gorul-mustur. Bu tezde kullanılan kontorlculer 3 ceside ayrılmıstır.

Bunlardan ilki, acısal hızların regule edilmesi icin kullanılan NDI kontrolcusudur.Kaldırac (elevator), kanatcık (aileron) ve dumen (rudder) sapma miktarları, ucagın di-namik denklemlerinde acısal hızlara dogrudan etki edebildiginden oturu, tek cevrimlibir kontrolcu mimari yeterli olmustur. Referans acısal hızlar ile mevcut acısal hızlararasındaki hata, ilk once bir PI kontrolcusune beslendikten sonra, ters cevrim ile buhatayı sıfırlayacak kontrol yuzeyleri sapma miktarları saturasyondan ve yuzey dinamik-lerinden gecirildikten sonra ucak dinamiklerine beslenmektedir.

Ikinci kontrolcu cesidi ise, hucum acısı, sapma acısı ve yatıs acısını kontrol etmekicin kullanılan bir NDI kontrolcusudur. Ilkinden farklı olarak, kaldırac, kanatcık vedumen sapma miktarları, matematiksel olarak bu uc acıya dogrudan etki edememek-tedir. Dolayısıyla ile, bu kontrolcu cesidinin tek dongu ile olusturulması mumkundegildir. Bunun yerine, acısal hızlar ile hucum acısı, sapma acısı ve yatıs acısını kontroledecek olan tek dongulu bir kontrolcu yazılmıstır. Bu dongu, hucum acısı, sapma acısıve yatıs acısının acısal hızlar tarafından kontrolunu saglayacak ters cevrim denklemininmatematiksel olarak ifade edilmesiyle olusturulmustur. Ilaveten, mimaride iceriye birdongu daha eklenerek, acısal hızlarındaki hatanın kontrol yuzeyleri sapma miktarlarınile giderilmesi saglanmıstır (ilk kontrolcu cesidindeki gibi). Bu cift dongulu mimarisayesinde, kaldırac, kanatcık ve dumenin dolaylı olarak hucum acısı, sapma acısı veyatıs acısını kontrol etmesi saglanmıstır. Ilaveten, dıs dongude bu uc acının referansve mevcut sinyalleri arasındaki hata, ic dongude de acısal hızların referans ve mev-cut sinyalleri arasındaki hata birer PI kontrolcusunden gecirilmistir. Kontrol yuzeylerisapma miktarları saturasyondan ve yuzey dinamiklerinden gecirildikten sonra ucak di-namiklerine beslenmektedir.

Ucuncu kontrolcu cesidi ise, ustte bahsi gecen iki kontrolcu cesidinin tek seferlibir anahtar ile degisimiyle olusturulmus. Acısal hızların sıfıra olan Euler mesafesininbelirli bir esik degerinin altına inmesine kadar acısal hızların regule edildigi ilk kon-trolcunun, belirlenen esik degerinin altına inildikten sonra ise hucum acısı, sapma acısı

xvii

Page 18: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

ve yatıs acısının regule edildigi ikinci kontrolcu cesidinin kullanılması onerilmistir. Bumimariye de anahtarlamalı NDI kontrolcusu denmistir.

Automata yapısı, yukarıda anlatılan sureksizlestirilmis FAA yonergeleri ve bahsigecen NDI kontrolculerileri ile, ucagı 4 farklı upset cesidinden tekrar guvenli bir du-ruma kurtaran dizil butunudur. Automata yapısı da daha kolay anlısabilmek icin 7farklı fragmana ayrılmıstır. Bu fragmanların islevi sırasıyla: 1) acısal hızların reguleedilmesi, 2) stall durumuna ugramıs fakat upset altında olmayan ucagın kurtarılması,3) burun-yukarı dusuk-yatıs upset durumundaki ucagın kurtarılması, 4) burun-yukarıyuksek-yatıs upset durumundaki ucagın kurtarılması, 5) burun-asagı dusuk-yatıs up-set durumundaki ucagın kurtarılması, 6) burun-asagı yuksek-yatıs upset durumundakiucagın kurtarılması, 7) herhangi upset durumundaki kurtarımın sonlandılmasını sag-layan son hamlelerin uygulanmasıdır. Birbirinden bagımsız olarak islev gorebilenfragmanlar, birlestirildiklerin tek bir merkezi otomat (“automaton”) elde edilmis ol-unur. Her bir fragman, yine birbirinden bagımsız sureksiz durumlardan (modlardan)olusmaktadır, bu modlar dogrudan FAA yonergelerinin matematiklestirilmis halidir.Ucak, art arda uygulanan yonergeler ile genis bir upset zarfından kurtulabilmektedir.

Automata’nın sureksiz durumların kullandıgı kontrolculere iletilen referans de-gerleri ve sureksiz durumlar arasındaki gecisi tayin eden numerik degerlerin (paramet-reler) optimizasyona acık oldugu gorulmektedir. Eger ki, bu parametreler icin, tumupset durumlarınında kullanılacak sabit degerler yerine upset durumuna gore opti-mize edilmis degerler atanırsa, o zaman guvensiz bolge zarfındaki upset baslangıckosullarının kurtarılma yuzdeleri arttırılmıs, ortalama kurtarım sureleri ise azaltılmısolunur. Bunu basarmak icin tezde 4 adet optimizasyon algoritması onerilmistir. Bun-larda ikisi sadece cevrimdısı, birisi sadece cevrimici, digeri ise her iki optimizasyonicin de kullanılmaktadır. Kısaca ozetlendiginde, bu algoritmalar su sekilde islev gor-mektedirler: Cevrimdısı olarak calısan algoritma, sistemin yuksek guvenirlikli mod-eli hali hazırda bilindiginden oturu, rastegele veya esdagılım olarak dagıtılmıs upsetbaslangıc noktalarını simule eder. Boylelikle baslangıc surekli durumları uzayındapekcok noktanın optimize olmus parametreleri bulunur, ve numerik degerleri bir ver-itabanına fiziksel olarak kaydedilir. Daha once cevrimdısı simule edilen noktalarınsureksiz durum sekansı bilineceginden oturu, yakınlarındaki noktaların da benzer dav-ranıs gostermeleri beklenir. Bundan oturu, kosan bir sistem uzerinde cevrimici olarakson sureksiz durumdan ilk sureksiz duruma dogru bir arkaplanda bir optimizasyonislemi yer edebilir. Gercek zamanda kosan sistem ile arkaplanda optimize olan sis-tem sekasın ortasındaki sureksiz durumda bulusana dek bu optimizasyon islemi de-vam eder, bu sure zafından sonra optimizasyon arayısı sonra erir, sistem dizilin kalanyarısını optimize olmus parametreler ile surdurur.

Onerilen metotların islevselligini gosteren iki adet ornek kurtarma senaryonu de-taylıca verimistir. Bu ornek senaryolardaki sureksiz durumların zamana gore degisimi,ve ilaveten, ucagın kurtarım esnasında havada izledigi gezinge figur olarak gosterilmis-tir. Daha sonra, stall ve derin-stall durumlarını iceren yukselme-yatıs acısı zarflarındakikurtarım sureleri verilmistir. Son olarak, onerilen optimizasyon algoritmaları ile eldeedilen kazanc, grafiklerle ifade edilmistir, ve verilen tum sonuclar yorumlanmıstır.

xviii

Page 19: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

1 INTRODUCTION

Loss of control (LOC) is the reported to be the most frequent cause of aircraft ac-

cidents, both in terms of occurrence and fatality [2]. It is also reported that LOC is

the main cause of accidents for not only commercial transportation, but for general

aviation as well [3]. LOC is defined as “a categorization of an accident or incident

resulting from a deviation from the intended flightpath” [4]. The definition of LOC

can be generalized to exhibit five main characteristics, listed as follows [5]:

1. Flying outside the normal operating flight envelope,

2. Aircraft behaviour is not predictable by pilot control inputs,

3. Disproportionately large responses to small state variable changes,

4. High angular rates and displacements,

5. Inability to maintain heading, altitude, and wings-level flight.

The primary triggers of LOC are entry into a vehicle upset condition, loss of con-

trol effectiveness, and severe degradations of the aircraft’s handling/flying qualities

[6]. In this thesis, we focus on the recovery of the first condition, that is recovering

the aircraft from the vehicle upset condition. The main objective of this thesis is to de-

velop a control strategy for autonomous recovery of aircraft from LOC conditions and

verify the effectiveness of this strategy via extensive simulation results. Unlike a large

portion of the previous work in the area, this study does not limit the applications to

passenger aircraft, hence the objective also spans enabling recovery from very severe

LOC conditions that are likely to occur for fighter aircraft.

1.1 Purpose of This Thesis

The main contribution of this thesis is the design of an elaborate control architecture

for autonomous stall and upset recovery, and demonstration of the capability of the

developed control scheme over an extended flight envelope. The results are achieved

1

Page 20: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

by constructing a finite state automaton, where each discrete state in the automaton

represents a control mode and execution of the automaton refers to a switching control

strategy for recovering the aircraft from the upset state. The modes of the automaton

and the transition rules are designed based on the LOC recovery procedures outlined

by FAA, hence the resulting trajectories of the autonomous execution results in tra-

jectories similar to ones that would be observed from a piloted recovery. This study

also differs from the previous LOC research by the aircraft model used in simulations.

Unlike many previous studies, the GTM developed by NASA [7] was not examined;

instead a high-fidelity F-16 model was used in all simulations which cover an extended

flight envelope and investigate recovery performance under severe LOC conditions.

RegulateAnguler RatesIdle

IdentifyCondition

Proceed withRecovery

Regulations

RecoverySuccessful

Figure 1.1: Flowchart representation of the methodology used by the hybrid system.

The hybrid system described in this thesis follows the methodology described in

Fig. 1.1. From the idle position, either a stall incident or a manual turn on activates the

system. Next, to regain control over the control surfaces, angular rates are regulated

up to a certain threshold. Then, the condition that defines what sort of an upset the

aircraft had entered is identified. The recovery procedure/strategy crafted specifically

to the identified upset condition is then activated. After successful completion of the

recovery process, the hybrid system returns back to its idle state.

1.2 Literature Review

Extensive research has been conducted on upset. Dutoi et al. [8] have proposed a

hybrid robust control architecture that first regulates angular rates and then activates

an attitude recovery system. The attitude recovery system consists of a backstepping

inner-loop control and a reinforcement learning module that specifies objective func-

tions and constraints. The study focuses on upset recovery for unmanned aerial vehi-

cles (UAV). However, this study uses a transport aircraft model which is incapable of

2

Page 21: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

executing agile maneuvers that fighter jets are capable of executing. Raghavendra et

al. [9] investigate a spin recovery procedure with two different control strategies. In

the first strategy, a two-step recovery procedure is applied, and in the second strategy,

a thrust-vectoring is used in addition to the conventional aerodynamic control surfaces

of the aircraft. The study shows a successful recovery for one initial condition but does

not include an envelope where the suggested strategy successfully recovers for differ-

ent initial conditions. An alternative approach to out-of-envelope upset recovery is to

use the safe set theory proposed by Allen et al. [10] that defines a safe set as the largest

controlled invariant set within flight envelope. The study focusses on strategy devel-

opment that prevent the aircraft from departing the safe set, and restoring the aircraft

to a trim point within the safe set should it find itself outside the safe flight envelope.

However, this approach is infeasible for agile aircraft that have higher order dynamical

systems. A similar approach to the one presented in this thesis has been conducted by

Engelbrecht et al [11]. where a multi-mode recovery flight control system for a large

transport aircraft was studied. The flight control system uses a state machine to reduce

the angular rates and recover the aerodynamic envelope, then recover the attitude en-

velope, and finally recover from overspeed. The research heavily relies on bifurcation

analysis and the natural rate damping and the predictable forces/moments from con-

trol surfaces. However, the Engelbrecht et al.’s study is based on analysis of the natural

damping of the aircraft motion, hence it is not directly applicable to fighter aircraft that

exhibit partially unstable dynamics for improved maneuverability [12], such as the F-

16. It should also be noted that their approach has not been verified over a large set of

upset conditions. In a recent paper, Lombaerts et al. [13] presented an approach that

focuses on applying regulations advised by Federal Aviation Administration (FAA)

and utilizing the principle of conservation of energy. Nonetheless, the study only con-

sists of restoring from stall and not the general upset condition. Also, the simulation

results were based on a transport aircraft model and hence its applicability to severe

LOC conditions for agile fighter aircraft is not tested, unlike as conducted in this thesis.

3

Page 22: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

1.3 Hypothesis

This thesis predicts that for a large part of the stall-angle envelope, the agile F-16

aircraft model will be successfully recovered using the proposed approaches. However,

for deep-stall conditions where the aircraft’s control surfaces are almost completely

damped out and are nearly useless (as proven in Figs. 2.1 and 2.2), a substantial amount

of the deep-stall envelope will cannot be recovered.

These hypotheses are proven to be correct in Section 6.

2 BACKGROUND

This section briefly covers requisite background information before defining a recovery

strategy.

2.1 Recoverability Criteria

In this subsection, a set of rules conditioned on the aircraft state are presented to iden-

tify whether an aircraft is recovered or not. First we attempt to remove the ambiguity

in the present nomenclature by renewing and improving a few definitions. In aviation

literature, stall is usually defined as the state of having the angle of attack beyond

the defined stalling angle of the aircraft; whereas upset is defined as the unintentional

movement of the aircraft while airborne [1, 4]. The descriptions of upset proposed by

FAA are tabulated and presented in Table 2.1. Although these definitions are useful

for providing recovery guidelines for a piloted aircraft, they need to be defined more

precisely to build an autonomous control strategy.

The stall and upset definitions are extended as follows:

• Stall describes the situation where the angle of attack is higher than the stall

angle of attack (αstall). Hence, the stall condition does not depend on any other

aircraft parameters. This condition only describes a numerical range for the

angle of attack; whereas, the following two describe a circumstance.

4

Page 23: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

Table 2.1: Summary of procedures suggested by FAA [1] for recovery when under anupset condition. These procedures apply mostly to commercial passenger aircraft, notto agile fighter jets, but still give an insightful set of recommendations.

Name Situation Procedures

Nose-HighSmall Bank Angle

-Pitch attitudemore than 25.

-Airspeed rapidlydecreasing.

-Roll to obtainnose-down pitch rate.

-Reduce thrust.Approaching horizon,

roll to wings-level.-Establish attitudes.

Nose-LowSmall Bank Angle

-Pitch attitudeless than −10.

-Airspeed can behigh or low.

-Apply noseup.-Increase thrust ifairspeed is low.

-Decrease thrust ifairspeed is high.

-Approaching horizon,roll to wings-level.-Establish attitudes.

Nose-HighHigh Bank Angle

-Bank anglehigher than 45.-Pitch attitude

greater than 25.-Airspeed decreasing.

-Roll to obtainnose-down pitch rate.

-Do not exceedbank angle of 60.

-Reduce thrust.-Approaching horizon,

roll to wings-level.-Establish attitudes.

Nose-LowHigh Bank Angle

-Bank anglehigher than 45.-Pitch attitude

less than −10.-Airspeed increasing.

-If bank angle ishigher than 90, first unload.-Roll to decrease bank angle.

-Apply nose-up.-Approaching horizon,

roll to wings-level.-Establish attitudes.

• Upset indicates having passed the stall angle and having a pitch attitude either

more than 25, or less than −10. Stall is a prerequisite to upset. Hence, re-

gardless of other parameters (such as pitch angle), if the angle of attack hadn’t

passed αstall , the aircraft is not in upset circumstance.

• Simple stall indicates having passed the stall angle and but not being in upset

5

Page 24: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

condition. That is, the pitch angle is between −10 and 25 after the angle of

attack had passed the stall angle.

• High bank angle: For fighter aircraft, a bank angle of 45 does not indicate a

risky bank angle, since such maneuvers are very common in air combat. Hence,

the condition for accepting a high bank angle is upgraded to 60 and higher in

order to accept a bank angle as high.

• Small bank angle: Accordingly, a bank angle lower than 60 is accepted as

being small. Notice that these bank angle definitions also describe a numerical

range and not a circumstance, like the definition of stall.

The following three criteria are used for the definition of a successful recovery

throughout the thesis. All three requirements need to be satisfied simultaneously for

successful recovery:

1. Not being stalled: angle of attack is less than αstall .

2. The ability to ascend: pitch angle and flight path angle are both higher than zero.

3. Having all three body angular rates below a specified threshold.

These three requirements hold for both simple stall and upset circumstances.

2.2 F-16 Aircraft Model

A high-fidelity (Hi-Fi) non-linear F-16 model [14] has been employed, since the ability

to simulate post-stall characteristics is utmost important in this study. Herein, our

challenge is to reach the desired body angular velocity and the body orientation in

three dimensions with six degrees of freedom (6DOF) aircraft dynamics. The Hi-Fi

F-16 model includes a leading edge flap model, actuator models (i.e. elevator, aileron,

rudder, and engine) and an extensive aerodynamic data, which is also reported in the

literature [15]. In order to model the F-16 engine a first-order lag is considered while

incorporating various thrust lookup tables for the related power levels “idle”, “miltary”,

6

Page 25: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

and “maximum” [16]. The system does not include noise or disturbances as well as

uncertainties in the parameters. Standard atmosphere model has been considered for

the simulations.

The state vector of the aircraft is given as:

xT = [VT ,α,β ,qT ,ωT ,pT ] ∈ R13,

where VT is the relative air speed with respect to the aircraft body, α is the angle

of attack, β is the sideslip angle, qT = [q0,q1,q2,q3] ∈ R4 is the aircraft attitude

quaternion describing the aircraft body orientation with respect to the NED frame,

ωT = [P,Q,R] ∈R3 is the body angular velocity vector with respect to the body frame,

and p = [eN ,eE ,eD] ∈ R3 is the position of the fighter in the North-East-Down (NED)

frame, respectively.

The system input vector is given as:

uT = [δT ,δele,δail,δrud] ∈ R4,

0≤δT ≤ 1,

−25 ≤δe ≤ 25,

−21.5 ≤δa ≤ 21.5,

−30 ≤δr ≤ 30,

where δT , δe, δa, δr are the throttle position, elevator deflection, aileron deflection, and

rudder deflection, respectively. Then nonlinear aircraft dynamics are given as:

x = f (x,u).

The equations of motion, Eqs. (1) and (2), for the aircraft dynamics are derived

using Newton’s second law of motion as shown below. During the derivation of the

7

Page 26: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

equations, the flat-Earth equations assumptions are taken into account [17]:

∑F =d(mVM)

dt

]

I,

∑M =dHdt

]

I,

where m is the mass, VT = [U,V,W ] is the aircraft velocity according to the body axes

system, H is the angular momentum., and the symbol ]I denotes the time rate of change

of the vector with respect to inertial space.

∑∆Fx = m(U +WQ−V R),

∑∆Fy = m(V +UR−WP),

∑∆Fz = m(W +V P−UQ),

(1)

∑∆L = PIx +(Iz− Iy)QR− (R+PQ)Ixz,

∑∆M = QIy +(Ix− Iz)PR− (P2−R2)Ixz,

∑∆N = RIz +(Iy− Ix)PQ− (P+QR)Ixz,

(2)

where ∑∆Fx, ∑∆Fy, ∑∆Fz are the external forces along the aircraft body axes,

∑∆L, ∑∆M, ∑∆N are the roll, pitch, and yaw moments along the aircraft body axes,

U,V,W are the the linear velocity components along the aircraft body axes, P, Q, R are

the roll, pitch, and yaw rates along the aircraft body axes, Ixx, Iyy, Izz are the moments

of inertia along the aircraft body axes, and Ixz is the product of inertia on the aircraft

body axes system plane of Xb−Zb. Solving Eqs. (1) and (2) for time rates of the states

gives us the following equations:

8

Page 27: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

U =∑∆Fx

m−WQ+V R,

V =∑∆Fy

m−UR+WP,

W =∑∆Fz

m−V P+UQ,

(3)

P =Ixz(Ixx− Iyy + Izz)PQ− (Izz(Izz− Iyy)+ I2

xz)QR+ Izz∑∆L+ Ixz(∑∆N +Qhx)

IxxIzz− I2xz

,

Q =Izz− IxxPR− Ixz(P2−R2)+∑∆M−Rhx

Iyy,

R =(Ixx(Ixx− Iyy)+ I2

xz)PQ− Ixz(Ixx− Iyy + Izz)QR+ Ixz∑∆L+ Ixx(∑∆N +Qhx)

IxxIzz− I2xz

,

(4)

where hx is the engine angular momentum about the body axes Xb. We also have the

following expressions:

VT =UU +VV +WW

VT

α =UW −WUU2 +W 2

β =VTV −VTV

VT√

U2 +W 2

(5)

The equations for the quaternion state are given below:

q0

q1

q2

q3

=

12

0 −P −Q −R

P 0 R −Q

Q −R 0 P

R Q −P −0

q0

q1

q2

q3

. (6)

9

Page 28: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

The following equation is used in order to compute the entries of the direction cosine

matrix DCM:

DCM =

(q20 +q2

1−q22−q2

3) 2(q1q2 +q0q3) 2(q1q3−q0q2)

2(q1q2−q0q3) (q20−q2

1 +q22−q2

3) 2(q2q3 +q0q1)

2(q1q3 +q0q2) 2(q2q3−q0q1) (q20−q2

1−q22−q2

3)

.

The expressions below give the Euler angles:

φ =atan2(DCM2,3,DCM3,3),

θ =asin(DCM1,3),

ψ =atan2(DCM1,2,DCM1,1).

Eq. (7) is used to calculate the trajectory of the aircraft.

eN = (cosθ cosψ)U +(cosψ sinφ sinθ − sinψ cosφ)V +(cosψ cosφ sinθ + sinψ sinφ)W,

eE = (cosθ cosψ)U +(sinψ sinφ sinθ + cosψ cosφ)V +(sinψ cosφ sinθ − cosψ sinφ)W,

eD =−(sinθ)U +(sinφ cosθ)V +(cosθ cosφ)W,

(7)

Expanding ∑∆Fx, ∑∆Fy, ∑∆Fz, terms yield:

∑∆Fx = GXb +AXb +TXb,

∑∆Fy = GYb +AYb +TYb,

∑∆Fz = GZb +AZb +TZb,

where GXb, GYb , GZb are the gravitational forces, AXb, AYb, AZb are the aerodynamic

10

Page 29: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

forces TXb , TYb, TZb are the propulsive forces. Gravitational forces are given as:

GXb =−mgsinθ ,

GYb = mgsinφ cosθ ,

GZb = mgcosθ cosφ ,

where g is the gravitational acceleration. Following equations can be used in order to

calculate the aerodynamic forces

AXb = qSCXb,

AYb = qSCYb,

AZb = qSCZb,

where q is the free-stream dynamic pressure 12ρV 2, S is the reference area, V is the

free-stream velocity, ρ is the air density, CXb,CYb,CZb are the body Xb−Yb−Zb axes

aerodynamic coefficients, which are all obtained from lookup tables.

Expanding moment terms, ∑∆L, ∑∆M, ∑∆N, yields:

∑∆L = LA +LT ,

∑∆M = MA +MT ,

∑∆N = NA +NT ,

where the terms with A subscripts denote aerodynamic moments and the terms with

T subscripts denote moments caused by the thrust force not acting through the center.

The aerodynamic contributions can be calculated by the equations below.

LA =ClqSl,

MA =CmqSl,

NA =CnqSl,

11

Page 30: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

where Cl,Cm,Cn are the aerodynamic moment coefficients in roll, pitch, and yaw,

respectively. The characteristic length l is taken as the mean aerodynamic chord for

pitch moment and for the rest it is taken as the wing span. Wing area is considered as

the reference area. The model governed by six degrees of freedom (6DOF) differential

equations of motion can also be compactly found in existing literature [16, 17].

The model’s lift coefficient depends on angle of attack, sideslip angle, and elevator

deflection angle. The graphical variance can be found on Fig. 2.1; since the sideslip

angle has minor effect on lift coefficient variance, it was taken to be zero for this plot.

Though, the effect of the sideslip angle was included in the simulations for realistic

results.

Figure 2.1: Variance of the lift coefficient with respect to angle of attack and elevatordeflection. Decay in lift can be observed after 35 angle of attack.

The F-16 is known to be deep-stalling at angle of attack values between 50 and

60. [18, 19] The F-16 model used for this thesis also demonstrates this behavior

clearly. As visible on the upper-part of Fig. 2.2, except for a cusp around δele = 0,

the lift coefficient exhibits an almost fully constant behavior and seemingly cannot be

altered by changing the elevator deflection amount. This consistency is an indication

of the ineffectiveness of the control surface for an angle of attack of α = 60. It was

12

Page 31: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

-25 -20 -15 -10 -5 0 5 10 15 20 25Elevator Deflection [deg]

0

0.5

1

1.5

CL

Lift Coefficient vs. Elevator Deflection when , = 10°

-25 -20 -15 -10 -5 0 5 10 15 20 25Elevator Deflection [deg]

0

0.5

1

1.5

CL

Lift Coefficient vs. Elevator Deflection when , = 60°

Figure 2.2: Upper: The lift coefficient varies almost constantly for a large portion ofelevator deflection changes when α = 60, and is an indication of the ineffectiveness ofthe control surface. Lower: The lift coefficient holds an almost linear relation betweenlift coefficient and elevator deflection for α = 10. The control surface’s effectivenesscan be seen by observing that a change in elevator deflection can effectively alter thecoefficient of lift acting on the aircraft.

also observed that the cusp in the vicinity of δele = 0 majorly diminishes and the curve

becomes almost fully flat when α ≥ 70. As for demonstration, at a favorable angle of

attack value, such as α = 10, the lift coefficient variation with elevator deflection is

given on the lower-part of Fig. 2.2. A positive and distinct slope clearly demonstrates

the control surface’s effectiveness for this value of angle of attack.

2.3 Extended Definitions

In literature, a guard is a statement that must be satisfied for an event between discrete

states to occur; whereas, an invariant is a statement such that a transition (event) out

of the discrete state must occur as soon as this statement turns false [20]. Although

these definitions are quite precise in terms of numerical semantic, they give very little

insight on how and where these statements should be used. However, before attempting

to optimize any parameter, a proper and comprehensive definition should be given.

13

Page 32: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

Hence, without contradicting common knowledge in literature, the definitions of these

two nomenclatures are extended as follows.

Definition 1: Guards should be defined as parameters that only describe the per-

mission (but not prescription) of a transition from one discrete state to another. Hence,

guards are numerical statements that define the availability of a discrete state, which

do not need an optimization since these statements are fixed. Consider this very mun-

dane and non-technical example: the statements “red” and “green” for an apple can be

named as guards which are cannot be optimized since their definition is fixed. On the

other hand, consider the following definition:

Definition 2: Invariants should be defined as parameters that forcefully cause a

transition from one discrete state to another. Hence, invariants are numerical state-

ments that determine the how beneficial (in terms of a cost function or some other

metric) it is to translate to a different mode. It is obvious that, unlike guard statements,

there is room for invariants to be optimized. Returning to the same mundane exam-

ple: the statements defining how far seeds are planted from one another, how much

water is given to the seeds, environment temperature, total humidity, et cetera can be

named as invariants of which their numerical values directly influence some defined

cost function, which could be the amount of apples healthily grown for a finite time in

this example. Correspondingly, the following definition is made:

Definition 3: Procedural hybrid system is a switched system constructed in ac-

cordance to the definitions of guards and invariants defined above, that is, transition

rules between modes are properly separated as optimizable and non-optimizable. As

the rest of the thesis dives deeper into technical descriptions and pseudocodes, these

extended definitions are assumed to be adopted.

3 NONLINEAR CONTROLLERS IMPLEMENTED IN SIMULATIONS

It is assumed that the aircraft is equipped with following nonlinear control systems.

All controllers are based on the principles of nonlinear dynamic inversion (NDI) [12].

In the next section, these controllers are switched across the finite state automaton to

14

Page 33: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

compute a sequence of maneuvers that drives the aircraft from stall/upset condition to

recovered condition.

3.1 Single-Loop NDI Controller for P,Q and R (C1)

In this study a NDI controller is employed for angular rate control. As it is exhibited

in Fig. 3.1, NDI controller utilizes a proportional-integral (PI) controller and inverse

dynamics. PI generates the desired angular rate derivative signals. Then the desired

angular rates (Pdes, Qdes, Rdes) together with inverse dynamics are used to compute the

necessary control inputs (δacmd ,δecmd ,δrcmd ) in order to achieve the desired angular rates.

x = [Vt,↵,, P, Q, R, h]

x = [Vt,↵,,, , P, Q, R, h]

24a

e

r

35

24acmd

ecmd

rcmd

35

24

Pref

Qref

Rref

35

24

Pdes

Qdes

Rdes

35

24

PQR

352

4↵

35

24↵ref

ref

ref

35

A/C DynamicsActuators

Inner Loop

InversePI

+

-

xOuter Loop

InversePI

24↵des

des

des

35

+

-

x = [Vt,↵,, P, Q, R, h]

24a

e

r

35

24acmd

ecmd

rcmd

35

24

Pref

Qref

Rref

35

24

Pdes

Qdes

Rdes

35

24

PQR

35

A/C DynamicsActuatorsInverse

DynamicsPI+

-

x

Figure 3.1: Block diagram of NDI based angular rate controller.

In order to perform the dynamic inversion Eq. (4) is rearranged in the following

standard form [12]:

x = f (x)+g(x)u (8)

where x is the state vector and u is the control input vector. Expressing the roll, pitch,

and yaw moments in the following form yields:

15

Page 34: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

∑∆L = qSb[Cl(α,β ,δe)+∆Clle f δle f +∆Clβ β +Clδaδa +Clδr

δr +Rb2VT

Clr +Pb2VT

Cl p]

∑∆M = qSc[Cm(α,β ,δe)+Qc2VT

Cmq +∆Cm(α)+∆Cmle f δle f+

(Xcgre f −Xcg)(Cz +∆Czle f δle f +Qc

(2VT )Czq)]

∑∆N = qSb[Cn(α,β ,δe)+∆Cnle f δle f +∆Cnββ +Cnδa

δa +Cnδrδr +

Rb2VT

Cnr +Pb2VT

Cnp−

(Xcgre f −Xcg)(Cy +∆Cyle f δle f +Cyδrδr +Cyδa

δa +Rb

(2VT )Cyr +

Pb2VT

Cyp)cb]

(9)

while assuming Xcgre f −Xcg = 0. ∆C and C terms are the aerodynamic coefficients,

which are all thoroughly reported in Ref 20. Roll and yaw moment expressions in Eq.

(9) are appropriate for the standard form of Eq. (8). However, pitch moment expression

is not convenient for standard form, since δe appears as an independent lookup table

variable in Cm(α,β ,δe). Therefore the table inversion strategy is followed, which is

explained at the end of this section.

Reorganizing the roll and yaw expressions in Eq. (9) yields:

∑∆L = L f +Lg

∑∆N = N f +Ng

where,

L f = qSb[Cl(α,β ,δe)+∆Clle f δle f +∆Clβ β +Rb2VT

Clr +Pb2VT

Cl p]

N f = qSb[Cn(α,β ,δe)+∆Cnle f δle f +∆Cnββ +

Rb2VT

Cnr +Pb2VT

Cnp]

(10)

Note that δe appears also in Cl and Cn terms of Eq. (10) as an independent lookup

16

Page 35: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

table variable. Yet, the elevator is not the main control input for roll and yaw rates. In

this manner, during the simulations the δe value of the previous time step is used while

computing Eq. (10).

Considering f of Eq. (8) in the following form:

f (x) = [ fP(x) fR(x)]T (11)

where x = [VT ,α,β ,P,Q,R,h]T . Then, fP(x) and fP(x) in Eq. (11) can be defined as it

is given below.

fP(x) =Ixz(Ixx− Iyy + Izz)PQ− (Izz(Izz− Iyy)+ I2

xz)QR+ IzzL f + Ixz(N f +NT )

IxxIzz− I2xz

fR(x) =((Ixx− Iyy)Ixx + I2

xz)PQ− Ixz(Ixx− Iyy + Izz)QR+ IxzL f + Ixx(N f +NT )

IxxIzz− I2xz

In addition, Lg and Ng can be computed by the following equations:

Lg = qSb(Clδaδa +Clδr

δr),

Ng = qSb(Cnδaδa +Cnδr

δr),

here, the control surface deflections δa and δr compose the control vector.

u = [δa δr]T

Then, the g in Eq. (8) will be a 2×2 matrix.

g(x) =

gPa(x) gPr(x)

gRa(x) gRr(x)

where the elements of the matrix are given as follows:

17

Page 36: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

gPa(x) =IzzqSbClδa

+ IxzqSbCnδa

IxxIzz− I2xz

gPr(x) =IzzqSbClδr

+ IxzqSbCnδr

IxxIzz− I2xz

gRa(x) =IxzqSbClδa

+ IxxqSbCnδa

IxxIzz− I2xz

gRr(x) =IxzqSbClδr

+ IxxqSbCnδr

IxxIzz− I2xz

Finally, the standard form for the states P and R is constructed as

P

R

= f (x)+g(x)u

where f , g and u are defined above explicitly. In order to find the control surface

deflections, which would produce the desired rates, the equation is inverted, assuming

g is non-singular:

u = g(x)−1(

˙Pdes

˙Rdes

− f (x)),

The desired pitch rate is obtained similar to roll and yaw rates as explained above.

Using the desired rate, pitch rate equation is inverted to obtain desired pitch moment

given as

Mdesired = QdesIyy− (MT +(Izz− Ixx)PR+ Ixz(R2−P2)

Similarly, using the desired moment, moment equation is inverted to obtain the Cm

coefficient as follows

Cmdesired(α,β ,δe) =Mdesired

qSc− (

Qc2VT

Cmq +∆Cm(α)+∆Cmle f δle f )

18

Page 37: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

3.2 Double-Loop NDI Controller for α,β and φ (C2)

NDI controller for angle of attack, sideslip and bank angle is designed using the double

loop inversion technique [21]. The same double loop NDI controller is used for spin

recovery in literature [9]. As it is illustrated in Fig. 3.2, double loop NDI controller

consists of an inner loop PI, inner inverse laws, an outer loop PI, and outer inverse

laws. All of the reference angle values are zero. Inner loop PI provides the desired

angular speed rates. Then, the outer inverse laws, which is derived in this section is

used to obtain reference angular rate signals.

In the outer loop part, body axis bank angle φ is used instead of µ , the bank an-

gle around velocity vector, since the state variable for µ is not modeled for the A/C

model used in this thesis. Rather, a nonlinear conversion is applied, via Eq. (12), to a

reference µ angle to obtain a corresponding φ angle command for the controller.

φ = arccos(cos µ(tanθ tanα +1)− tanθ tanα) (12)

x = [Vt,↵,, P, Q, R, h]

x = [Vt,↵,,, , P, Q, R, h]

24a

e

r

35

24acmd

ecmd

rcmd

35

24

Pref

Qref

Rref

35

24

Pdes

Qdes

Rdes

35

24

PQR

352

4↵

35

24↵ref

ref

ref

35

A/C DynamicsActuators

Inner Loop

InversePI

+

-

xOuter Loop

InversePI

24↵des

des

des

35

+

-

Figure 3.2: Block diagram of the double loop NDI controller.

The outer loop inversion is carried out using the following equations for angle of

attack, sideslip and bank angle.

19

Page 38: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

α =Q− tanβ (cosαP+ sinαR)+g

VT cosβ(cosα cosθ cosφ + sinα sinθ)+

1mVT cosβ

(Az cosα− (Ax +T )sinα)

β = sinαP− cosαR+g

VT(cosβ cosθ sinφ + sinβ sinθ cosα− sinα sinβ cosθ cosφ)+

1mVT

(Ay cosβ − (Ax +T )sinβ cosα−Az sinα sinβ )

φ =P+ tanθ(sinφQ+ cosφR)

Although the forces Ax, Ay and Az contain the inputs for control surfaces directly,

their effect is negligible compare to the effects of body axis angular rates. Therefore,

the body axis angular rates are considered as control inputs for the outer loop. Above

equations can be partitioned to obtain the following form

˙x = f (x)+g(x)v (13)

where x= [Vt,α,β ,φ ,θ ,P,Q,R,h]T , f (x)= [ fα(x), fβ (x), fφ (x)]T , and v= [Pcmd,Qcmd,Rcmd]T

while:

fα = +g

Vt cosβ(cosα cosθ cosφ + sinα sinθ)+

1mVt cosβ

(Az cosα− (Ax +T )sinα)

fβ = +g

Vt(cosβ cosθ sinφ + sinβ sinθ cosα− sinα sinβ cosθ cosφ)+

1mVt

(Ay cosβ − (Ax +T )sinβ cosα−Az sinα sinβ )

fφ =0

Then, the g in (13) can be represented by a 3×3 matrix

20

Page 39: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

g(x) =

−cosα tanβ 1 −sinα tanβ

sinα 0 −cosα

1 sinφ tanθ cosφ tanθ

Finally, the v can be computed by inversion given as

v = g(x)−1([ ˙αdes˙βdes ˙φdes]

T − f (x)) (14)

3.3 Switching NDI Controller (C3)

A switching controller, illustrated in Fig. 3.3, is proposed to control the aerodynamic

angles in the presence of high angular rates. Switching controller is composed of

previously explained NDI based controllers. The principal founding the switching

controller is that to regulate, until a predetermined angular rate threshold is reached,

the angular rates by using the controller C1 (the NDI controller for angular rates) and

then switch to C2 (double loop NDI controller) to control the angles. Switching occurs

only once from C1 to C2. The angular velocity vector denoted as ω = [P,Q,R]T ∈ R3.

One time switch

||!|| 0.005

||!|| > 0.005C1

C2

Actuators

Figure 3.3: Block diagram of the switching mechanism.

4 FINITE STATE AUTOMATON

A deterministic hybrid automaton H, which is a nine-tuple collection, is defined as

follows:

H = (X ,Q, f , I,E,G,ρ,X0,q0) (15)

21

Page 40: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

where

X ⊂ R12 is the set of continuous states;

Q is the set of discrete and countable states;

f : Q×X → X is the vector field;

I ⊆ Q×X is the set defining the invariant conditions;

E ⊂ Q×Q is the set of events between discrete states;

G⊆ Q×Q×X is the set defining guard conditions;

ρ : Q×Q×X×E→ X is the set defining reset conditions;

X0 is the vector of initial continuous states;

q0 ∈ Q is the initial discrete state. For automaton H, it is also the marked state.

In order to obtain a better understanding of the hybrid automaton H, the entire au-

tomaton has been divided into a collection of smaller automata, named in this thesis

as fragments. Introducing these fragment automata before introducing the entire au-

tomaton H helps exhibit the overall process of recovery with higher clarity. Therefore,

given the fact that automaton H is simply a composition of smaller automata, H it-

self is called “automata” or “automaton” interchangeably. There are seven automata

fragments in total, and are enumerated from one to seven. However, this does not nec-

essarily indicate that, for instance, fragment no. 3 comes after the events of fragment

no. 2. In fact, most other fragments are blocked by guards when a fragment is allowed.

The nature of transactions between fragments is discussed in detail in the upcoming

subsections.

First, the common sets of these fragments are defined, and then sets specifically

defined for each fragment are introduced one by one. Finally, the complete automaton

H, comprising all of defined the fragments, is visualized as a whole to lay out the

complete picture.

Although the attitude of F-16 model is represented with Quaternions, the finite state

automaton is described in terms of Euler angles as to interpret the recovery procedures

22

Page 41: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

in a more intuitive and understandable fashion.

The Eulerian continuous states that the finite state automata H uses, are given in

Eq. 16.

X = [x1,x2,x3,x4,x5,x6,x7,x8,x9,x10,x11,x12]T (16)

Elements of X are individually described and tabulated in Table 4.1. The 6DOF

equations of motion of the F-16 model constitute the vector field f which governs

the continuous states. Reset conditions at each discrete state are defined such that the

continuous states leave each discrete state equivalent to their entry. That is,

ρ(qi,q j,x) = x for ∀qi,q j ∈ Q, (qi,q j) ∈ E

Hence, the continuous states are inherited from one discrete state to another. The static

vector X0 is a description of the aircraft when the automata is switched on. The discrete

state q0 is the idle state of automata H. The remaining sets are introduced as the thesis

progresses.

Table 4.1: Elements of X , the continuous states vector.

∈X x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12

Em

blem VT

truevel.

α

angle ofattack

β

sideslipangle

φ

rollangle

θ

pitchangle

ψ

yawangle

Prollrate

Qpitchrate

Ryawrate

NPNorthpos.

EPEastpos.

halti-tude

The following subsections define and describe each automata fragment individu-

ally. All angles are given in degrees whereas all angular rates are given in radians per

second.

4.1 Automata Fragment No. 1: Regulation of Angular Rates

Before attempting any other recovery procedure, it is vital to damp the angular rates of

the aircraft to regain controllability. The first fragment automaton H1 can be defined

as follows:

H1 = (X ,Q1, f , I1,E1,G1,ρ,X0,q0)

23

Page 42: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

where

Q1 = q0,q1,q2,q3,q9

I1 = i0, i1, i2, i3, i9

The discrete states of H1, their controller(s), the possible events between them

and their invariants are summarized in Tables 4.2, 4.3, 4.4 and 4.5, respectively. A

flowchart representation of the first fragment can be found in Fig. 4.1.

Table 4.2: Elements of Q1, which are the discrete states of H1 that is responsible forregulating angular rates.

State Characteristic Explanation/Purpose

q0checking

(idle)

Checks the continuous states at each time-step and awaits fora stall condition to occur. When at this state, the automaton

does not interfere with the ongoing flight envelope.

q1regulate

angular ratesSets the angular rates below the defined threshold. Checks x5

and activates the convenient successor discrete state.

q2simplestall

The aircraft is known to be under a simple stall,after the actions of q1.

q3nose-high

upsetThe aircraft is known to be under a nose-high upset,

after the actions of q1.

q9nose-low

upsetThe aircraft is known to be under a nose-low upset,

after the actions of q1.

Table 4.3: Controllers used and the given reference signals while at fragment H1.

State Controller Referencesq1 C1 x7 = 0∧ x8 = 0∧ x9 = 0

Table 4.4: Elements of E1 and G1 that define the events and guards of discrete statetransitions within H1, respectively.

Events Guards(q0,q1) x ∈ X : (x2 ≥ αstall)(q1,q2) x ∈ X : (25 ≥ x5 ≥−10)(q1,q3) x ∈ X : (x5 > 25)(q1,q9) x ∈ X : (x5 <−10)

24

Page 43: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

Table 4.5: Elements of I1 that define the invariants of each discrete state that preventthe transition to any other state within H1.

Name Invariancei0 i1 x ∈ X : (

√x2

7 + x28 + x2

9 > 2×10−2)i2 i3 i9

The first fragment H1 contains the initial discrete state q0 of H, which is responsi-

ble of checking whether the aircraft’s angle of attack has passed αstall or not at each

discrete time-step. The proceeding recovery procedures do not take action at suffi-

ciently low angle of attacks, which is ensured by the guard of the event (q0,q1). That

is, unless the aircraft is stalled or the automata system is turned on manually, the event

(q0,q1) shall not be permitted.

q0q1

q9

[α ≥ αstall

]

Idle

Regulate

rates

(C1 : P = Q = R = 0

)√

P2 + Q2 + R2 > 2 × 10−2

angular

[−10

>α]

Nose-LowUpset

q2

[θ>

25 ]

[25 ≥ θ ≥ −10]Simple

Stall

q3

Nose-HighUpset

d

Figure 4.1: Flowchart of the automata fragment no. 1 which is responsible for regu-lating angular rates. Square brackets, parentheses and curly brackets represent guards,controllers and invariants, respectively.

If the aircraft’s angle of attack exceeds αstall , then the event (q0,q1) occurs, and

procedures to recovery begin with the regulation of angular rates. Angular rates are

reduced at q1 by using the C1 controller, by regulating all of the angular rates to zero.

The threshold of how low the angular rates should be reduced before proceeding to

other q j ∈ Q1 is defined by the invariant i1. By the definition of invariance, as long as

25

Page 44: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

i1 is satisfied, despite any guards’ permission, none of the events (q1,q j), j = 2,3,9

can take action. Given this stage is successful within sufficient altitude, the recovery

procedures continue such that the subsequent actions are crafted specifically to whether

the aircraft has, at the time-step of q1’s exit, entered simple stall, nose-high upset

or nose-low upset as stated by the guards in Table 4.4. When the mission of one

fragment is complete, the successor fragment is initiated with the continuous states of

the precursor fragment, that is, the continuous states are inherited from one fragment

to another.

The events that take place if q2 is activated are the concern of fragment no. 2; where

in contrast, events after the transition to the discrete states q3 or q9 are the concern of

fragments no: 3, 4, 5, 6; all to be elaborated in the upcoming subsections.

4.2 Automata Fragment No. 2: Simple Stall

If the aircraft is in simple stall after the actions of H1, the fragment defined in this

section takes over charge to proceed with recovery procedures. The second fragment

automaton H2 is defined as follows:

H2 = (X ,Q2, f , I2,E2,G2,ρ,X0,2,q2)

where

Q2 = q0,q2

I2 = i0, i2

X0,2 are the continuous states inherited from the precursor fragment no. 1.

The discrete states of H2, their controller(s), the possible events between them

and their invariants are summarized in Tables 4.6, 4.7, 4.8 and 4.9, respectively. A

flowchart representation of the second fragment can be found in Fig. 4.2.

Simple stall is a condition that is easier to recover than both nose high and nose

low upsets, as to be seen by a demonstration in the Results section. Hence, the proce-

26

Page 45: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

Table 4.6: Elements of Q2, which are the discrete states of H2 that is responsiblerecovering a simple stall.

State Characteristic Explanation/Purpose

q2 simple stallThe aircraft is under simple stall. Angle of attack

is decreased while keeping angular rates regulated.q0 idle The aircraft returns back to its controllable region.

Table 4.7: Controllers used and the given reference signals while at fragment H2.

State Controller References

q2 C3x2 = 10∧ x3 = 0∧ x4 = 0∧ x7 = 0∧ x8 = 0∧ x9 = 0

q2

Simple

Stall

[θ > 0, αstall > α, θ − α > 0

]

C3 : α = 10, β = φ = 0,

√P2 + Q2 + R2 > 10−2 ∧

P = Q = R = 0

q0

Idle

0 ≥ θ ∧ α ≥ αstall ∧ 0 ≥ θ − α

( )

Figure 4.2: Flowchart of the automata fragment no. 2 which is responsible for recov-ering from a simple stall. Square brackets, parentheses and curly brackets representguards, controllers and invariants, respectively.

dures followed to recover from a simple stall are also simpler than recovering from an

upset. If the aircraft is exposed to a simple stall, discrete state q2 executes recovery by

regulating the angle of attack to 10 degrees by using controller C3, while the sideslip

and roll angles are regulated to zero with the same controller. Since the switching

controller C3 also accepts angular rates as reference, angular rates are also regulated to

zero.

In order to claim that the aircraft has successfully exited the simple stall condition,

Table 4.8: Elements of E2 and G2 that define the events and guards of discrete statetransitions within H2, respectively.

Events Guards

(q2,q0)x ∈ X : (x5 > 0 ∧

αstall > x2∧ x5− x2 > 0)

27

Page 46: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

Table 4.9: Elements of I2 that define the invariants of each discrete state that preventthe transition to any other state within H2.

Name Invariance

i2x ∈ X : (

√x2

7 + x28 + x2

9 > 10−2

∧ 0≥ x5∧ x2 ≥ αstall ∧0≥ x5− x2)i0

the norm of the angular rates must be diminished such that the invariant i2 of state q2 is

no longer valid. Additionally, the guard of the event (q2,q0) must be satisfied to return

the automata system back to the idle condition.

4.3 Automata Fragment No. 3: Nose-High, Small Bank Angle Upset

If the aircraft has a nose-high attitude with a small bank angle after the actions of

H1, the fragment defined in this section takes over charge to proceed with recovery

procedures. The third fragment automaton H3 can be defined as follows:

H3 = (X ,Q3, f , I3,E3,G3,ρ,X0,3,q3)

where

Q3 = q3,q5,q6

I3 = i3, i4, i6, i7, i8

X0,3 are the continuous states inherited from the precursor fragment no. 1.

The discrete states of H3, their controller(s), the possible events between them and

their invariants are summarized in Tables 4.10, 4.11, 4.12 and 4.13, respectively. A

flowchart representation of the third fragment can be found in Fig. 4.3.

When an aircraft enters a nose-high upset with a small bank angle, a roll maneu-

ver is suggested in order to swiftly achieve a nosedown attitude. Hence, when at q4,

controller C3 is referenced a bank angle of 60 degrees. Simultaneously, the angle of

attack is referenced to be 10 degrees while the sideslip angle and all angular rates are

28

Page 47: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

Table 4.10: Elements of Q3, which are the discrete states of H3 that is responsible forrecovering from a nose-high upset with small bank angle.

State Characteristic Explanation/Purpose

q3nose-high

upsetThe aircraft is known to be under a nose-high upset,

after the actions of q1.

q4

roll to obtainnosedown

motion

A roll motion is referenced in order to quickly obtaina nosedown attitude.

q6

re-regulateangular

rates

After achieving a bank angle, angular rates areregulated again as to sure stability.

q7roll back towings level

Upon reaching horizon, the bank angleis set to back to zero

q8

upsetrecovery

finalization

The final actions to complete the upsetrecovery take place.

Table 4.11: Controllers used and the given reference signals while at fragment H3.

State Controller References

q4 C3x2 = 10∧ x3 = 0∧ x4 = 60

∧ x7 = 0∧ x8 = 0∧ x9 = 0q6 C1 x7 = 0∧ x8 = 0∧ x9 = 0q7 C2 x2 = 10∧ x3 = 0∧ x4 = 0

referenced to zero. A bank angle of at least 35 degrees needs to be reached in order

to effectively pitch down the aircraft. There may be an overshoot and oscillations at

bank angle caused by the performance of the controller C3; hence, it is vital that these

detrimental aftermaths are damped by defining an invariance that restricts both the roll

rate and its derivative, as prescribed by i4. The remaining angular rates are diminished

once q6 is reached.

By the time q7 is active, the aircraft had already attained a nosedown attitude, and

can now begin to roll back to wings level using controller C2 with angle of attack

reference of 10 degrees and both sideslip and bank angle references to zero. A demon-

stration at Section 6 shows that it is crucial to obtain a non-oscillatory bank angle at

this stage before proceeding to other discrete states. Hence, the invariance i7 is depen-

29

Page 48: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

Table 4.12: Elements of E3 and G3 that define the events and guards of discrete statetransitions within H3, respectively.

Events Guards(q3,q4) x ∈ X : (x4 > 60)(q4,q6) x ∈ X : (x4 ≥ 35)(q6,q7) (q7,q8)

x ∈ X : (x5 > 0 ∧αstall > x2∧ x5− x2 > 0)

Table 4.13: Elements of I3 that define the invariants of each discrete state that preventthe transition to any other state within H3.

Name Invariancei3

i4x ∈ X : (

√x2

7 > 10−1∧√

x72 > 10−2

∧ 35 > x4)i6 x ∈ X : (

√x2

7 + x28 + x2

9 > 10−2)

i7x ∈ X : (

√x2

7 + x29 > 10−2∧

√x7

2 > 10−2)

∧ 0≥ x5∧ x2 ≥ αstall ∧0≥ x5− x2)i8

dent to both the roll rate and the derivative of the roll rate. If oscillations exist at roll

angle, it must taken care of before proceeding to the next discrete state, as not doing so,

would result in an uncontrollable spin towards the ground. The recovery finalization

procedures take place once the aircraft gains the ability to ascend, which is the concern

of fragment no. 7.

q8

recoveryfinalization

q7

Roll back towings level

(C2 : α = 10, β = φ = 0

)√

P2 + R2 > 10−2 ∧√

P2 > 10−2

[θ > 0

][

αstall > α

][

θ − α > 0]

q3

( )

Nose-HighUpset

q4

(C1 : P = Q = R = 0

)√

P2 + Q2 + R2 > 10−2

[ ][φ ≥ 35]Roll to obtain

nosedownmotion

C3 : α = 10, β = 0, φ = 60,

√P2 > 10−1 ∧

√P2 > 10−2

P = Q = R = 0

[60 ≥ φ]

q6

Re-regulateangularrates

Upset

∧ 35 > θ

( )

∧ 0 ≥ θ, α ≥ αstall, 0 ≥ θ − α

Figure 4.3: Flowchart of the automata fragment no. 3 which is responsible for re-covering from a nose-high, small bank angle upset. Square brackets, parentheses andcurly brackets represent guards, controllers and invariants, respectively.

30

Page 49: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

4.4 Automata Fragment No. 4: Nose-High, High Bank Angle Upset

If the aircraft has a nose-high attitude with a high bank angle after the actions of H1, the

fragment defined in this section takes over charge to proceed with recovery procedures.

The fourth fragment automaton H4 can be defined as follows:

H4 = (X ,Q4, f , I4,E4,G4,ρ,X0,2,q4)

where

Q4 = q6,q9,q10,q11,q12

I4 = i3, i5, i7, i8

X0,4 are the continuous states inherited from the precursor fragment no. 1.

Table 4.14: Elements of Q4, which are the discrete states of H4 that is responsible forrecovering from a nose-high upset with high bank angle.

State Characteristic Explanation/Purpose

q3nose-high

upsetThe aircraft is known to be under a nose-high upset,

after the actions of q1.

q5

perform anabrupt nosedown

motion

Both the angle of attack and the bankangle are quickly decreased.

q7roll back towings level

Upon reaching horizon, the bank angle is setto zero while the angle of attack is increased

in order to regain the ability to ascend.

q8

upsetrecovery

finalization

The final actions to complete the upsetrecovery take place.

The discrete states of H4, their controller(s), the possible events between them and

their invariants are summarized in Tables 4.14, 4.15, 4.16 and 4.17, respectively. A

flowchart representation of the fourth fragment can be found in Fig. 4.4.

High bank angles can be very dangerous above a certain threshold. Hence, for a

nose-high upset with high bank angle, focus should be on regaining control by decreas-

31

Page 50: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

Table 4.15: Controllers used and the given reference signals while at fragment H4.

State Controller Referencesq5 C2 x2 = 0∧ x3 = 0∧ x4 = 0q7 C2 x2 = 10∧ x3 = 0∧ x4 = 0

Table 4.16: Elements of E4 and G4 that define the events and guards of discrete statetransitions within H4, respectively.

Events Guards(q3,q5) x ∈ X : (60 ≥ x5)(q5,q7) x ∈ X : (35 ≥ x5)(q7,q8)

x ∈ X : (x5 > 0 ∧αstall > x2∧ x5− x2 > 0)

q8

recoveryfinalization

q7

Roll back towings level

(C2 : α = 10, β = φ = 0

)√

P2 + R2 > 10−2 ∧√

P2 > 10−2

[θ > 0

][

αstall > α

][

θ − α > 0]q3

( )

Nose-HighUpset

q5

Performan abrupt

motionnosedown

(C2 : α = β = φ = 0

)√

P2 > 10−1 ∧ θ > 35

[35 ≥ φ][φ > 60] Upset

∧ 0 ≥ θ, α ≥ αstall, 0 ≥ θ − α

Figure 4.4: Flowchart of the automata fragment no. 4 which is responsible for recov-ering from a nose-high, high bank angle upset. Square brackets, parentheses and curlybrackets represent guards, controllers and invariants, respectively.

ing angle of attack as much as possible. And so, at state q5 angle of attack, sideslip

angle and roll angle are all regulated to zero by using controller C2. A regulated roll

rate and and a bank angle below 35 degrees is sufficient for the event (q5,q7) to occur.

The logic and methodology is the same as fragment no. 3 from hereon after q7 and is

Table 4.17: Elements of I4 that define the invariants of each discrete state that preventthe transition to any other state within H4.

Name Invariancei3 i5 x ∈ X : (

√x2

7 > 10−1)∧ 35 > x4)

i7x ∈ X : (

√x2

7 + x29 > 10−2∧

√x7

2 > 10−2)

∧ 0≥ x5∧ x2 ≥ αstall ∧0≥ x5− x2)i8

32

Page 51: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

not be repeated here.

4.5 Automata Fragment No. 5: Nose-Low, Small Bank Angle Upset

If the aircraft has a nose-low attitude with a small bank angle after the actions of H1, the

fragment defined in this section takes over charge to proceed with recovery procedures.

The fifth fragment automaton H5 can be defined as follows:

H5 = (X ,Q5, f , I5,E5,G5,ρ,X0,5,q5)

where

Q5 = q9,q10,q12,q13,q14,q8

I5 = i9, i10, i12, i13, i14, i8

X0,5 are the continuous states inherited from the precursor fragment no. 1.

The discrete states of H5, their controller(s), the possible events between them and

their invariants are summarized in Tables 4.18, 4.19, 4.20 and 4.21, respectively. A

flowchart representation of the fifth fragment can be found in Fig. 4.5.

Table 4.18: Elements of Q5, which are the discrete states of H5 that is responsible forrecovering from a nose-low upset with small bank angle.

State Characteristic Explanation/Purpose

q9nose-low

upsetThe aircraft is known to be under a nose-low upset,

after the actions of q1.

q10velocitydefiner

Inspecting the velocity at the moment of state entry, it is definedwhether procedures should continue with q13 or q14.

q12 high velocityThe true velocity at state entry is more than 600 ft/sec.

The angle of attack is lowered.

q13 low velocityThe true velocity at state entry is equal or less than 600 ft-sec.

The angle of attack is lowered to value lower than at q12’s.

q14gain abilityto ascend

Angle of attack is decreased and kept constant.Pitch angle starts to increase naturally.

q8

upsetrecovery

finalizationThe final actions to complete the upset recovery take place.

33

Page 52: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

Table 4.19: Controllers used and the given reference signals while at fragment H5.

State Controller Referencesq12 C2 x2 = 15∧ x3 = 0∧ x4 = 0q13 C2 x2 = 10∧ x3 = 0∧ x4 = 0q14 C2 x2 = 10∧ x3 = 0∧ x4 = 0

When at a nose-low and small bank angle upset, slightly different approaches are

presented for low and high velocities. Hence, q10 first decides whether to activate

(q10,q12) or (q10,q13) depending on the true velocity of the aircraft. Decreasing the

angle of attack carries a higher importance when the velocity is low, as to regain speed

quicker. Hence, state q12 (high velocity) gives an angle of attack reference of 15 de-

grees whereas state q13 (low velocity) gives an angle of attack reference of 10 degrees

instead. For both of these states, sideslip and bank angle references are zero. In order

to regain the ability to ascend after the actions of either q12 or q13, state q14 is activated.

Since the purpose at this discrete state is to ascend, the invariant i14 is not constrained

by the norm of the pitch rate, only the rates that are constraints are the roll and yaw

rates. A controllable ascend also indicates a positive pitch and positive path angle

while not being stalled, and so these requirements are also constraints of i14. As same

with the previous fragments, actions after state q8 has been reached are the concern of

fragment no. 7. At fragment H5, all discrete states that have a controller use controller

C2 with the reference signals indicated at Table 4.19.

Table 4.20: Elements of E5 and G5 that define the events and guards of discrete statetransitions within H5, respectively.

Events Guards(q9,q10) x ∈ X : (60 ≥ x4)(q10,q12) x ∈ X : (x1 > 600 ft/sec)(q10,q13) x ∈ X : (600 ft/sec≥ x1)(q12,q14) (q13,q14) (q7,q8)

x ∈ X : (x5 > 0 ∧αstall > x2∧ x5− x2 > 0)

34

Page 53: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

Table 4.21: Elements of I5 that define the invariants of each discrete state that preventthe transition to any other state within H5.

Name Invariancei9 i10 i12 x ∈ X : (

√x2

7 + x29 > 10−2)

i13 x ∈ X : (√

x27 + x2

9 > 10−2)

i14x ∈ X : (

√x2

7 + x29 > 10−2)

∧ 0≥ x5∧ x2 ≥ αstall ∧0≥ x5− x2)i8

q9

q12

Nose-LowUpset

q8

recoveryfinalization

( )

[60 ≥ φ]

q10

( )

VelocityDefiner

q13

[V T>

600ft/s

ec]

[600ft/sec ≥

VT ]

[θ > 0

][

αstall > α

][

θ − α > 0]

(C2 : α = 10, β = φ = 0

)√

P2 + R2 > 10−2 ∧ 0 ≥ θ

(C2 : α = 10, β = φ = 0

)√

P2 + R2 > 10−2

(C2 : α = 15, β = φ = 0

)√

P2 + R2 > 10−2

velocity

velocityHigh

Low

q14

Gainability toascend

[ ]

[ ]

Upset

∧ α ≥ αstall ∧ 0 ≥ θ − α

Figure 4.5: Flowchart of the automata fragment no. 5 which is responsible for recov-ering from a nose-low, small bank angle upset. Square brackets, parentheses and curlybrackets represent guards, controllers and invariants, respectively.

4.6 Automata Fragment No. 6: Nose-Low, High Bank Angle Upset

If the aircraft has a nose-low attitude with a high bank angle after the actions of H1, the

fragment defined in this section takes over charge to proceed with recovery procedures.

The sixth fragment automaton H6 can be defined as follows:

H6 = (X ,Q6, f , I6,E6,G6,ρ,X0,6,q6)

35

Page 54: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

where

Q6 = q9,q11,q14,q8

I6 = i9, i11, i14, i8

X0,6 are the continuous states inherited from the precursor fragment no. 1.

The discrete states of H6, their controller(s), the possible events between them and

their invariants are summarized in Tables 4.22, 4.23, 4.24 and 4.25, respectively. A

flowchart representation of the sixth fragment can be found in Fig. 4.6.

Table 4.22: Elements of Q6, which are the discrete states of H6 that is responsible forrecovering from a nose-low upset with high bank angle.

State Characteristic Explanation/Purpose

q9nose-low

upsetThe aircraft is known to be under a nose-low upset,

after the actions of q1.

q11

roll to wingslevel whileunloading

Angle of attack is endeavored to diminish as to achieveunloading quickly.

q14gain abilityto ascend

Angle of attack is decreased and kept constant.Pitch angle starts to increase naturally.

q8

upsetrecovery

finalizationThe final actions to complete the upset recovery take place.

Table 4.23: Controllers used and the given reference signals while at fragment H6.

State Controller Referencesq11 C2 x2 = 0∧ x3 = 0∧ x4 = 0q14 C2 x2 = 10∧ x3 = 0∧ x4 = 0

A nose-low upset with high bank angle has a similar recovery procedure to a nose-

low upset with small bank angle. An important difference is that, similar to a nose-high

upset with high bank angle, it again becomes important to decrease the angle of attack

as quickly as possible. Thus, at q11 controller C2 is referenced all three motion angle

to be zero. The safe limit to the bank angle has been reduced from 35 to 5 degrees,

compared to fragment no. 4 (nose-high, high bank angle). The successive states are

36

Page 55: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

Table 4.24: Elements of E6 and G6 that define the events and guards of discrete statetransitions within H6, respectively.

Events Guards(q9,q11) x ∈ X : (x4 > 60)(q11,q14) x ∈ X : (x4 < 5)(q14,q8)

x ∈ X : (x5 > 0 ∧αstall > x2∧ x5− x2 > 0)

Table 4.25: Elements of I6 that define the invariants of each discrete state that preventthe transition to any other state within H6.

Name Invariancei9 i11 x ∈ X : (

√x2

7 + x29 > 10−2)∧ x4 ≥ 5

i14x ∈ X : (

√x2

7 + x29 > 10−2)

∧ 0≥ x5∧ x2 ≥ αstall ∧0≥ x5− x2)i8

q9 q11

Nose-LowUpset

( )

[φ > 60]

(C2 : α = β = φ = 0

)√

P2 + R2 > 10−2 ∧ φ ≥ 5

Roll to wingslevel whileunloading

q14

Gainability toascend

(C2 : α = 10, β = φ = 0

)

[φ < 5]

q8

recoveryfinalization

[θ > 0

][

αstall > α

][

θ − α > 0]

Upset

∧ α ≥ αstall ∧ 0 ≥ θ − α

√P2 + R2 > 10−2 ∧ 0 ≥ θ

Figure 4.6: Flowchart of the automata fragment no. 6 which is responsible for recov-ering from a nose-low, high bank angle upset. Square brackets, parentheses and curlybrackets represent guards, controllers and invariants, respectively.

the same as fragment no. 5 and share the same logic and methodology, and so the same

explanations not be repeated here.

4.7 Automata Fragment No. 7: Upset Recovery Finalization

The seventh and final fragment automaton H7 can be defined as follows:

H7 = (X ,Q7, f , I7,E7,G7,ρ,X0,7,q2)

37

Page 56: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

where

Q7 = q8,q0

I7 = i8, i0

X0,7 are the continuous states inherited from whichever of fragment no. 3, 4, 5, 6 is the precursor.

The discrete states of H7, their controller(s), the possible events between them and

their invariants are summarized in Tables 4.26, 4.27, 4.28 and 4.29, respectively. A

flowchart representation of the seventh fragment can be found in Fig. 4.7.

The recovery for upsets can now be finalized. As stated earlier, there are three

conditions that should be satisfied to claim recovery:

1. The ability to ascend.

2. Having angular rates near zero.

3. Not being stalled.

Table 4.26: Elements of Q7, which are the discrete states of H7 that is responsible forfinalizing the upset recovery procedures.

State Characteristic Explanation/Purpose

q8

upsetrecovery

finalization

The final actions to complete the upset recovery take place.The angular rates are further decreased if not small enough.The precursor fragments had already enabled the aircraft to

increase its pitch, this legacy is continued.q0 idle The aircraft returns back to its controllable region.

Table 4.27: Controllers used and the given reference signals while at fragment H7.

State Controller Referencesq8 C1 x7 = 0∧ x8 = 0∧ x9 = 0

These conditions are clearly stated at the invariant i8 of state q8. Since the precursor

fragments of had already achieved the first and the last conditions, the controller C1 is

used to satisfy the second condition in this fragment. As expected, reference signals

38

Page 57: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

Table 4.28: Elements of E7 and G7 that define the events and guards of discrete statetransitions within H7, respectively.

Events Guards

(q8,q0)x ∈ X : (x5 > 0 ∧

αstall > x2∧ x5− x2 > 0)

Table 4.29: Elements of I7 that define the invariants of each discrete state that preventthe transition to any other state within H7.

Name Invariance

i8x ∈ X : (

√x2

7 + x28 + x2

9 > 10−2)

∧ 0≥ x5∧ x2 ≥ αstall ∧0≥ x5− x2)i0

q0

Idle

[θ > 0

][

αstall > α

][

θ − α > 0]q8

recoveryfinalization

(C1 : P = Q = R = 0

)

Upset

0 ≥ θ ∧ α ≥ αstall ∧ 0 ≥ θ − α

√P2 + Q2 + R2 > 10−2 ∧

Figure 4.7: Flowchart of the automata fragment no. 7 which is responsible for final-izing recovery procedures. Square brackets, parentheses and curly brackets representguards, controllers and invariants, respectively.

are regulating angular rates to zero. Upon completion, the automata system switches

back to the idle state.

4.8 Composition of Fragments

As stated earlier, all of the fragments previously introduced are not independently op-

erational automata, but instead, they are a part of the larger automata H formed by the

parallel composition:

H = H1 ‖ H2 ‖ H3 ‖ H4 ‖ H5 ‖ H6 ‖ H7

39

Page 58: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

Therefore, re-examining the sets at Eqn. 15, they can be extended such that:

Q =7⋃

i=1

Qi, I =7⋃

i=1

Ii, E =7⋃

i=1

Ei, G =7⋃

i=1

Gi.

The flowchart of the complete automata can be seen in Fig.4.8. Notice that some

discrete states represented in Fig.4.8 can be aggregated for state-space minimization.

This can be achieved by eliminating states causing equivalence, and re-arranging their

representative guards and invariants accordingly. On the other hand, this representation

was overlooked to indicate the dictations of the recovery procedures in a more clear

fashion. Discrete states that have no invariant are fired in the same time-step as their

precursor state, that is, with compliance to their attached guards and invariants.

4.9 Discrete System Verification

In this subsection, the verification of the automata discussed throughout this thesis

presented briefly. Verification is considered in terms of two aspects [20, 22]:

4.9.1 Safety Properties

As for our concern for this thesis, safety properties pursuit whether specific discrete

state q j ∈ Q have reachability.

Since the accessible part of the discrete event system H is equal to itself that is,

Ac(H) = H, it can be said that without deletion of any discrete states, each q j ∈Q, j 6=0 can be reached from q0. Also, the discrete event system H is equivalent to its coac-

cessible parts, that is, H =CoAc(H), and so the marked state can be is reachable from

any discrete state q j ∈Q, j 6= 0 as long as the controllers are able to unlock the guards

and invariants over the vector field.

40

Page 59: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

q 0q 1

q 9[ α

≥α

sta

ll

]

Idle

Reg

ula

te

rate

s

( C1

:P

=Q

=R

=0

) √

P2

+Q

2+

R2

>2×

10−

2

angula

r

q 11

q 12

[−10

>α]

Nose

-Low

Upse

t

q 8

reco

ver

yfinaliza

tion

( C1

:P

=Q

=R

=0

)

q 7

Roll

back

tow

ings

level

( C2

=10

=0

)√

P2

+R

2>

10−

2∧√

P2

>10−

2

()

[φ>

60]

[60 ≥

φ]

q 10()

( C2

=0

)√

P2

+R

2>

10−

2

Roll

tow

ings

level

while

unlo

adin

g

Vel

oci

tyD

efiner

q 13

q 2

[θ>

25 ]

[25 ≥ θ ≥ −10]

Sim

ple

Sta

ll

C3

=10

=0

,

√P

2+

Q2

+R

2>

10−

2∧

P=

Q=

R=

0

q 3()

Nose

-Hig

hU

pse

t

[VT

>600ft/sec]

[600

ft/se

c≥ VT

]

q 5

q 4

q 6

Re-

regula

teangula

rra

tes

q 14

Gain

ability

toasc

end

( C2

=10

=0

)

√P

2+

R2

>10−

2∧

0

≥θ

( C1

:P

=Q

=R

=0

) √

P2

+Q

2+

R2

>10−

2

[]

[φ≥

35]

Roll

toobta

innose

dow

nm

otion

C3

=10

=0

=60

,

P=

Q=

R=

0

Per

form

an

abru

pt

motion

nose

dow

n

( C2

=0

) √

P2

>10−

1∧

θ>

35

[35

≥φ]

[φ > 60]

[60 ≥ φ]

( C2

=10

=0

)

√P

2+

R2

>10−

2

( C2

=15

=0

)

√P

2+

R2

>10−

2

[φ<

5 ] [

]

[]

vel

oci

tyvel

oci

tyH

igh

Low

∧φ

≥5

∧α

≥α

sta

ll∧

0

≥θ

−α

[θ > 0, αstall > α, θ − α > 0

] [θ > 0, αstall > α, θ − α > 0

]

>0 ,

α stall

>α, θ

− α>

0]

[θ > 0, αstall > α, θ − α > 0

]

∧0

≥θ

≥α

sta

ll,

0

≥θ

−α

Upse

t

√P

2+

Q2

+R

2>

10−

2∧

0

≥θ

∧α

≥α

sta

ll∧

0

≥θ

−α

0

≥θ

≥α

sta

ll,

0

≥θ

−α

()

√P

2>

10−

1∧√

P2

>10−

2

∧35

()

Figure 4.8: Flowchart of the complete automata described throughout this thesis. Allof the previous fragments have been combined by parallel composition.

41

Page 60: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

4.9.2 Blocking Properties

The case of being “stuck” in one or more discrete states such that none of them are

marked, is defined as being blocked. There are two ways for a discrete event system

to get blocked: deadlock or livelock. [20]

Looking at Fig. 4.8, it can be seen that prefix-closure of the marked language of

the discrete event system H is equivalent to its language, that is, Lm(H) = L (H).

Hence, theoretically speaking, the automata H does not have a deadlock condition. On

the other hand, failure of regulation of rates and/or angles at any discrete state would

cause the invariants at that discrete state to still hold. In such case, the procedures

would be unable to progress; and hence, the marked state q0 would not be reachable.

This can be described as a failure to recover the aircraft from a stall or upset condition.

Also, each and every discrete state transition from one qi ∈ Q to another q j ∈ Q, j 6= i

occurs in a manner such that ∀(qi,q j) ∈ E, (q j,qi) /∈ E. Hence, there is no possibility

of a livelock condition to occur in automata H.

5 OPTIMIZATION ALGORITHM

In this section, an offline algorithm to find and store these regions is presented first.

Then, an online algorithm to efficiently use these pre-stored parameters and improve

them on a running system is presented.

For the rest of the thesis, the original non-optimized hybrid system will be denoted

as H0 whereas the offline and online optimized hybrid systems will be denoted as H1

and H2, respectively. Also, as to simplify nomenclature, the notation will be abused as

follows: If a set A is written with parentheses of sets B,C next to it, this would mean

that set A has changed such that sets B and C have replaced the sets of A that fall into

the same category. For instance, the followings can be written:

H1 = H0(PI1,PC1) and H2 = H0(PI2 ,PC2)

where PI and PC denote the invariant parameters and controller inputs parameters,

42

Page 61: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

respectively. Subscripts ·1 and ·2 denote offline optimized and online optimized, re-

spectively. In contrast, D[i] | i ∈ N denotes the ith element of set D.

The system descriptions are defined as follows.

Definition 4: Switched hybrid system is defined as a nine-tuple collection: H =

(X,Q, f,I,C,E,G,X0,Q0) where its sets are:

• X ∈Rn is the continuous state space acting on the time set t ≡R+ where n is the

number of states.

• Q is the set of discrete states.

• f : Q×X→ X is the continuous dynamics.

• I⊆Q×X is the set of invariant conditions.

• C⊆Q×X is the set of controller inputs.

• E⊆Q×Q is the set of events between discrete states.

• G⊆Q×Q×X is the set of guard conditions.

• X0 is the set of possible initial continuous states.

• Q0 ⊆Q is the set of possible initial discrete states.

Definition 5: Time trajectory sequence τ := (τ0,τ1,τ2, ...) is defined such that

τi−1 ≤ τi (equal when Zeno behavior [20] occurs) for all i ∈ N : 1→ |κ| where τi ∈ t

is the occurrence time of the event E(κi,κi+1) for κi ∈Q.

Definition 6: Discrete state (mode) sequence κ := (κ1,κ2,κ3, ...) is defined such

that κ ⊆Q and κi is valid over f at time [τi−1, τi) for all i ∈ N : 1→ |κ|. It should be

noted that κ is a tuple, and thus; the order of its elements matter. Also, mode sequence

κ may have repeated modes and does not necessarily visit all modes contained in Q

for some X0 and Q0.

Definition 7: Invariant sequence σ := (σ1,σ2,σ3, ...) is defined such that σi ∈ I

is valid over f at time [τi−1, τi) for all i ∈ N : 1→ |κ|.Definition 8: Controller input sequence ϕ := (ϕ1,ϕ2,ϕ3, ...) is defined such that

ϕi ∈ C alters X over f at time [τi−1, τi) for all i ∈ N : 1→ |κ|.

43

Page 62: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

Definition 9: Hybrid input I := (τ,κ,σ ,ϕ) is a tuple which consists of a time

trajectory sequence τ , a mode sequence κ , an invariant sequence σ , and a controller

inputs sequence ϕ .

The optimal control problem can now be identified:

L : Q×X×C→R+ is the continuous cost function, L j : I×G×E→R+ is the discrete

jump cost function, L f : Q×X→ R+ is the final (marked) state cost function.

Thus, the hybrid cost function is defined as such:

J (H,x,I ) =|κ|∑i=1

(∫τi

τi−1

L(x(t),ϕ(t))dt +L j,i

)+L f (17)

And so, the hybrid optimization problem is:

minI

J (18)

subject to x ∈ X, κ ∈Q, σ ∈ I, ϕ ∈ C (19)

x(0) ∈ X0, κ(0) = κ1 ∈Q0 (20)

∀t, dx(t)dt

= f(κ(t),x(t)) (21)

τ ⊆ t, τi−1 ≤ τi for i = 1, ..., |κ| (22)

∀t, x(t) ∈Ωx∧ϕ(t) ∈Ωϕ (23)

where Ωx ⊂ Rn and Ωϕ ⊂ Rm denote the sets of constraints for each continuous state

and controller input, respectively. m is the number of control surfaces (or actuators) the

system H consists of. However, since σ and ϕ implicitly effect τ and κ , a simplified

hybrid input I ∗ := (σ , ϕ) is defined. Hence, the hybrid optimization problem is

converted into:

minI ∗

J (24)

subject to (19)− (23)

44

Page 63: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

5.1 Off-Line Optimization

Although in literature, optimal control is generally based on optimization of jump

time sequences and controller inputs, the algorithms suggested in this thesis take an

approach of optimizing invariant statements and controller inputs instead. Since in-

variant statements influence transitions between different discrete states, the approach

indirectly optimizes jump time sequences. For an hybrid system H0,

P = PI ∪PC

where P is the set of all parameters available for optimization. Here, PI alters σ of I ∗

and PC alters ϕ of I ∗ where a short example is given below. In fact,

|P|= |PI|+ |PC| since PI ∩PC = /0.

The main purpose of the offline optimization algorithm is to construct a database

which holds parameters that satisfy sub-optimality for multiple initial conditions scat-

tered across Rn where n is the number of continuous states in H0. The set of these

points is denoted as xM ⊂ Rn where the amount of these points is denoted by NM. The

selection of these points’ amount and distribution is up to the reader, where the au-

thors have given their choices for the automata approach in Section 6. The algorithm

searches for optimality by only considering one discrete state at a time and parame-

ters of that discrete state available for optimization (P[i]). For instance, the discrete

state q12 comprises the sets available for optimization: σ12 = √

x27 + x2

9 = 10−2 and

ϕ12 = x2 = 15, x3 = 0, x4 = 0. It is the numerical coefficients of these statements

that are optimized, which are PI[12]= 10−2 and PC[12]= 15,0,0. The mathematical

expression of the invariant is kept intact.

Assume a single initial condition xa. If the discrete state sequence κa is known for

xa, then its final discrete state can also be known. Let the discrete states visited that

do not show Zeno-behavior be collected in set Qza ⊆ κa. Then the final discrete state

45

Page 64: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

Algorithm 1 Offline Optimization Algorithm for Creating the Master ParameterDatabase (MPD) with Initial Conditions xT ∈M

Input: H0, xT , NM1: for j = 1 to NM do

# Runs algorithm for as many points as M will contain, numerically NM.2: Run H0 with initial conditions xT [ j] to find non-Zeno discrete states QzT [ j] and

mode sequence κT [ j]3: save QzT [ j], κT [ j]

# Saves non-optimized discrete states and mode sequence for xT [ j].4: Set QzM[ j]←QzT [ j]5: Set κM[ j]← κT [ j]6: Set H1←H0

# Initially sets offline optimized discrete states and mode sequence same as non-optimized.

7: for i = |QzT [ j]| to 1 do# Loop from last to first mode

8: if |P(QzT [ j][i])| 6= 0 then# If the ith discrete state of the jth point in MPD contains optimizable pa-rameters.

9: run Algorithm 210: if κM[ j] 6= κT [ j] then

# If optimizing the parameters had caused mode sequence to change.11: run Algorithm 312: end if13: end if14: Set P1← P1(P[ j][i])15: Set H1←H1(P1)

# Export new parameters to system.16: end for17: Define tM[ j] as total runtime on H0←H0(P1)18: save QzM[ j], κM[ j], P1[ j] tM[ j]

# Saves optimized discrete states and mode sequence for xT along with the op-timized parameters and total runtime.

19: Set H0←H0(P0)# Reset H0 back to its initial status by restoring parameters to P0.

20: end for21: return M

46

Page 65: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

κa[z] where z = |Qza| is optimized first with the parameters P[z] = PI[z] ∪PC[z]. Once

minI ∗J ≡minPI ,PC J is satisfied only by optimizing κa[z] with PI1[z] and PC1[z], these

parameters which denote parameters for sub-optimality in terms of the cost function

are saved for later use. The algorithm continues trying to minimize J further for the

second last mode κa[y] where y = |Qza| − 1 by parameters P[y] = PI[y] ∪PC[y] with the

same logic as κ[z]. If this action is repeated finite times for all the modes comprised

in Qza, starting from last to first, then convergence to optimality would be obtained as

J would decrease as each mode individually is optimized. Now, if all these actions

described above are repeated finite times for all different xa points scattered across Rn,

then a database containing these parameters can be constructed for future use, which is

the purpose of Algorithm 1. The algorithm assumes that the hybrid system has a single

initial discrete state for each individual initial continuous state.

Definition 10: Master Parameter Database (MPD) M :=(xM,τ,κ,P) is a database

where its constituent sets are stored physically for future algorithms. Since set xM ∈M

is finite, it can be said that M has finite amount of entry.

The set of initial points not stored in M are denoted as xN : xM ∪ xN = Rn. Initial

points that are a subset of xN but are to be translated to xM by Algorithm 1 are denoted

by xT . Correspondingly, QzM ⊆ Qz denotes non-Zeno states visited by xM and κM

denotes mode sequences of xM. A similar nomenclature hold when the subscript ·M is

replaced by ·N or ·T .

Algorithm 2 Search for Optimality by Altering Invariant and Input ParametersInput: i, j, xN ∨ xT

1: Find parameters P[ j][i] ∈ P[ j] that satisfy argminP[ j][i] J (H1,xN ∨ xT ,P)2: Run H1 with xT to find updated non-Zeno discrete states QzM[ j] and mode se-

quence κM[ j]3: return P[ j][i], QzM[ j], κM[ j]

To summarize the procedures of Algorithm 1: Before attempting to optimize the

parameter values, the non-optimized hybrid system H0 is run as to record the discrete

states visited and their sequence on some initial state xT ∈M (complement of M ).

These values are saved to the MPD. Then, since the discrete state trajectory is known

47

Page 66: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

Algorithm 3 Search for Optimality If Mode Sequence Changes While Running Algo-rithm 1Input: j, xN ∨ xT , QzM

1: for i = |QzM[ j]| to |QzM[ j]|− |QzT [ j]| do# Loop for discrete states which have caused mode sequence to change (fromlast to first).

2: if |P(QzM[ j][i])| 6= 0 then# If the ith discrete state contains optimizable parameters.

3: run Algorithm 24: end if5: end for6: return P, QzM[ j], κM[ j]

for xT , optimization takes place beginning from the final mode to the initial mode (line

7). This is done such that the invariant and controller input parameters are optimized

for one mode at a time (Algorithm 2). If there exists a mode that is within the discrete

state trajectory but does not have any parameters to be optimized, then that mode is

simply skipped (line 8). If, by chance, the optimized parameters had caused the dis-

crete state trajectory for xT to change (line 10), then re-optimization between the last

optimized mode (which had caused such change) and the new final mode takes place,

according to the same algorithm (Algorithm 3). The returned database M consists of

parameters marked as save. The search method used in Algorithm 2 is up to the reader.

The authors have used Nelder-Mead simplex [23] search with constraints.

5.2 On-Line Optimization

The main idea behind the online optimization algorithm is that, as the system pro-

gresses towards discrete states to reach the final mode for a specific initial condition,

there is still time before the final mode is reached. Hence, if this time is used wisely,

albeit small or large, there may still be an improvement towards optimality by chang-

ing the invariant and input parameters for modes that have still not been reached. The

reason there is a necessity to conduct an offline optimization and construct a parameter

database before Algorithm 4 runs is that because of the limited time to run an online

48

Page 67: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

optimization algorithm, the runtime of such algorithm to improve optimality should be

shortened as much as possible. And because the offline optimization algorithm started

optimizing from the final mode to the initial mode, there is a possibility that modes

in the vicinity of the final discrete state have room for parameter improvement. This

could not have been said so confidently if the offline optimization algorithm search

for optimality was in the reverse order, that is, from initial mode to final mode, as the

parameters in the vicinity of the final discrete state were the last to be optimized. Since

Algorithm 4 On-line Optimization Algorithm That Improve MPD Parameters for Ini-tial Condition xN ∈M .Input: xN , M

1: Find j← argmin j ω

2: Set P1 to the jth entry’s parameters in M3: Set H1←H0(P1)

4: Define µ ← |QzM[ j]|2

5: Define τavailable← Total runtime of jth entry in Mdµe

6: for i = |QzM[ j]| to bµc do# Loop for the second half of the discrete states, starting from last.

7: Set index k as the ith discrete state of κM[ j]8: while t < τavailable do9: run Algorithm 2

10: Export newly found parameters to running system11: end while12: end for13: Update P2 with P over P1 such that the new parameters are closer to optimality for

ith mode14: Set H2←H1(P2)15: Define tN as total runtime for xN on H2 with P216: return H2, P2, tN

it is practically impossible to conduct an offline optimization for every possible initial

state an hybrid system can accept, the online optimization algorithm relies on starting

optimality search from the parameters defined by the closest initial condition xM ∈M

to optimize for xN /∈M . The notion of closeness is defined in terms of an Euclidean

49

Page 68: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

norm as such: The distance of one initial condition to another on Rn is given by:

ω = ‖(xN− xM[ j]) · γ‖2

where γT ⊂ Rn is a user-defined weight vector appointed by the importance of each

singular continuous state, and j is the jth entry stored in M .

To summarize the procedures of Algorithm 4: The online optimization is mainly

restricted by actual time, t (line 8). To minimize the time loss, the closest (in terms

of the Euclidean norm ω) entry in M is loaded as the optimized parameters for initial

condition xN . Due to the limited time, the algorithm suggests optimizing parameters

of only the second half of visited discrete states (line 6) where the number of modes

whose parameters are optimized are given by µ (line 4) and the total time taken for

the system to actually visit the first half of the modes in trajectory is given by the sum

of discrete state times in the first half of the sequence (line 5). Algorithm 1 suggests

dividing this time into equal pieces over the to-be-optimized modes, namely τavailable.

This indicates that, a search for cost minimization will only take place for τavailable

second before terminated (line 8). The search initially starts from values stored in M

as PI1[ j] and PC1[ j] (line 2) which have probability of being in the region of optimality

for parameters of xN since j = argmin j ω .

6 SIMULATION RESULTS

As to demonstrate the competence of the hybrid system described, one elementary,

and one advanced recovery scenarios are elaborated. In addition to these two elab-

orate examples, an envelope of successful recovery over a variety of pitch and bank

angle with constant angle of attack is presented afterwards. In the last subsection, the

improvements achieved using the optimization strategies prescribed in Section 5 are

given.

50

Page 69: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

6.1 Elementary Recovery Example: From a Simple Stall

Assuming initial conditions of VT = 500 ft/sec, α = 40, θ = 10, φ = 60, P =

Q = R = 0.5 rad/sec, h = 15000 ft at the activation of the automata, the procedures

prescribed in Section 4 are applied. A constant 20% throttle is present as the hybrid

system tries to recover the aircraft back to safety.

0 5 10 15 20 25t [sec]

0

10

20

30

40

50

, [deg]

Angle of Attack vs. Time

ActualC

3 Reference

0 5 10 15 20 25t [sec]

-5

0

5

10

15

- [deg]

Sideslip Angle vs. Time

ActualC

3 Reference

0 5 10 15 20 25t [sec]

-20

0

20

40

60

80

? [deg]

Roll Angle vs. Time

ActualC

3 Reference

regulate angular rates recovery from simple stall

q0 ! q

1q

1 ! q

2q

2 ! q

0

q0 ! q

1q

1 ! q

2q

2 ! q

0

q0 ! q

1q

1 ! q

2q

2 ! q

0

Figure 6.1: Angle of attack, sideslip and roll angle time histories of the simple stallrecovery example.

The simulation time histories are shown in Figs. 6.1-6.3. The events from one

discrete state to another are indicated as vertical dashed lines on every graph, along

with statements of names and transitions. The first action the hybrid system attempts

to do is to regulate the angular rates, dictated by the discrete state q1, using controller

C1. Once the threshold specified by its invariant is breached, the guards of q1 check for

which case this aircraft’s condition (stall or one of the upsets) fits in. In this example,

since 25 ≥ θ ≥ −10 at the time instance denoted as (q1→ q2), the aircraft can be

described to be under a simple stall and the event (q1,q2) takes place instead of (q1,q3)

or (q1,q9).

51

Page 70: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

0 5 10 15 20 25t [sec]

-1.5

-1

-0.5

0

0.5

P [r

ad/s

ec]

Roll Rate vs. Time

ActualC

1 Reference

C3 Reference

0 5 10 15 20 25t [sec]

-0.1

0.1

0.3

0.5

Q [r

ad/s

ec]

Pitch Rate vs. Time

ActualC

1 Reference

C3 Reference

0 5 10 15 20 25t [sec]

-0.2

0

0.2

0.4

0.6

R [r

ad/s

ec]

Yaw Rate vs. Time

ActualC

1 Reference

C3 Reference

q0 ! q

1

q0 ! q

1

q0 ! q

1

q1 ! q

2

q1 ! q

2

q1 ! q

2q

2 ! q

0

q2 ! q

0

q2 ! q

0

regulate angular rates recovery from simple stall

Figure 6.2: Angular rate time histories of the simple stall recovery example.

0 5 10 15 20 25t [sec]

-10

0

10

20

30

3 [deg]

Pitch Angle vs. Time

Actual

0 5 10 15 20 25t [sec]

350

400

450

500

VT [f

t/sec

]

True Velocity vs. Time

Actual

0 5 10 15 20 25t [sec]

0

2

4

6

8

AN

[g]

Normal Load Factor vs. Time

Actual

q1 ! q

2

q1 ! q

2

q2 ! q

0

q2 ! q

0

q2 ! q

0

q1 ! q

2

q0 ! q

1

q0 ! q

1

q0 ! q

1

regulate angular rates

recovery from simple stall

Figure 6.3: Pitch angle, true velocity, normal load factor time histories of the simplestall recovery example.

At q2, controller C3 is activated to obtain a noseup attitude while keeping the an-

gular rates regulated. As can be seen in Fig. 6.3, for this example, it was the pitch

rate was the longest angular rate to regulate; and hence, the regulation of the pitch rate

had lengthened the recovery time. At the instance of (q2→ q0), it should be noticed

52

Page 71: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

Figure 6.4: Flight path followed during the simple stall recovery example. Discretestate activation instants are shown when they have been reached.

that the aircraft satisfies all three conditions to claim a recovery. Also, the normal load

factor was highest at the initial condition, as seen in Fig. 6.3, and the procedures fol-

lowed by the hybrid system managed lower that value and complete recovery within

the structural limits of the aircraft. The flight path of the aircraft is depicted in Fig. 6.4

where the transition instants from one discrete state to another are also indicated.

6.2 Advanced Recovery Example: From a Nose-High Upset

Assuming initial conditions of VT = 500 ft/sec, α = 40, θ = 60, φ = 15, P =

Q = R = 0.5 rad/sec, h = 15000 ft at the activation of the automata, the procedures

prescribed in Section 4 are applied. A constant 20% throttle is present as the hybrid

system tries to recover the aircraft back to safety.

The simulation time histories are shown in Figs. 6.5-6.7. The events from one

discrete state to another are indicated as vertical dashed lines on every graph, along

with statements of names and transitions. As same with the previous example, it is

first necessary to regulate the angular rates to regain authority over the control surfaces;

hence, the event (q0,q1) occurs. Then, the guards of q1 are reached once angular rate

53

Page 72: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

0 10 20 30 40 50 60 70 80t [sec]

-20

0

20

40

60

, [deg]

Angle of Attack vs. Time

ActualC

2 Reference

C3 Reference

0 10 20 30 40 50 60 70 80t [sec]

-20

0

20

- [deg]

Sideslip Angle vs. Time

ActualC

2 Reference

C3 Reference

0 10 20 30 40 50 60 70 80t [sec]

-50

0

50

100

150

? [deg]

Roll Angle vs. Time

ActualC

2 Reference

C3 Reference

q8! q

0q

7! q

8q

4! q

6q

1! q

3,q

4q

0! q

1

q8! q

0q

7! q

8q

4! q

6q

1! q

3,q

4q

0! q

1

q8! q

0q

7! q

8q

4! q

6q

1! q

3,q

4q

0! q

1

q6! q

7

q6! q

7

q6! q

7

recovery from nose-high upset

re-regulateangular

rates

upset recoveryfinalization

rollback towingslevel

regulateangular

rates

Figure 6.5: Angle of attack, sideslip and roll angle time histories of the nose-highupset recovery example.

0 10 20 30 40 50 60 70 80t [sec]

-2

-1

0

1

2

P [r

ad/s

ec]

Roll Rate vs. TimeActualC

1 Reference

C3 Reference

0 10 20 30 40 50 60 70 80t [sec]

-1

-0.5

0

0.5

1

Q [r

ad/s

ec]

Pitch Rate vs. TimeActualC

1 Reference

C3 Reference

0 10 20 30 40 50 60 70 80t [sec]

-0.6-0.4-0.2

00.20.40.6

R [r

ad/s

ec]

Yaw Rate vs. TimeActualC

1 Reference

C3 Reference

q0! q

1q

4! q

6q

6! q

7q

7! q

8q

8! q

0q

1! q

3,q

4

q0! q

1q

1! q

3,q

4

q1! q

3,q

4

q4! q

6

q4! q

6q

6! q

7q

8! q

0q

7! q

8

q6! q

7q

7! q

8q

8! q

0

q0! q

1

re-regulateangular

rates

upset recoveryfinalization

recovery from nose-high upset

regulateangular

rates

rollback towingslevel

Figure 6.6: Angular rate time histories of the nose-high upset recovery example.

regulations have been completed. At the time instant of (q1→ q3), θ > 25 is present;

thus, the aircraft is described to be in a nose-high upset and the event (q1→ q3) takes

place. Once q3 is reached, at the same time-step, the bank angle is checked and since

φ ≤ 60, (q3,q4) is fired. At this state, a roll angle reference of 60 is made. It should

54

Page 73: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

0 10 20 30 40 50 60 70 80t [sec]

-100

-50

0

50

100

3 [deg]

Pitch Angle vs. Time

Actual

0 10 20 30 40 50 60 70 80t [sec]

100200300400500600700

VT [f

t/sec

]

True Velocity vs. Time

Actual

0 10 20 30 40 50 60 70 80t [sec]

-2

0

2

4

6

8

AN

[g]

Normal Load Factor vs. Time

Actual

q0! q

1q

1! q

3,q

4q

4! q

6q

6! q

7q

7! q

8q

8! q

0

q0! q

1q

1! q

3,q

4

q1! q

3,q

4

q4! q

6q

6! q

7q

7! q

8q

8! q

0

q8! q

0q

7! q

8q

6! q

7q

4! q

6q

0! q

1

regulateangular

rates

recovery from nose-high upset

re-regulateangular

ratesroll

back towingslevel

upset recoveryfinalization

Figure 6.7: Pitch angle, true velocity, normal load factor time histories of the nose-high upset recovery example.

Figure 6.8: Flight path followed during the nose-high upset recovery example. Dis-crete state activation instants are shown when they have been reached.

55

Page 74: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

be noticed that the aircraft quickly reaches the reference bank angle but this is not

enough to unlock the event to the next discrete state. The bank angle starts to oscillate

due to controller overshoot. This must be taken under control before proceeding to

other discrete states because attempting to continue recovery while such incident is still

present often causes an uncontrollable spin. Hence, both the roll rate and its derivate

are constrained by the invariant of q4. It should also be emphasized that during the

activation of q4, despite the roll rate converging to zero, neither pitch rate nor yaw rate

converges to zero. Since the invariance of q4 is only constrained by the regulation of

roll rate, a large norm of both pitch and yaw rate does not prevent the event (q4,q6) to

occur. Once state q6 is reached, only then all three angular rates are re-regulated. After

control over the actuators has been regained by re-regulating the angular rates, it is now

time to roll back to wings level to complete the recovery. State q7 references controller

C3 with angle of attack, sideslip and roll angle of zero. Again, the only angular rate

constraining the invariance is the roll rate and its derivate as to assure roll stability.

Once the aircraft has lowered its bank angle to a safe value and has started to ascend,

(q7,q8) takes place to finalize the upset recovery by regulation of the angular rates.

Although the time history figures may seem to be products of simple maneuvers,

the actual trajectory of the aircraft is far more cumbersome, as can be seen in Fig. 6.8.

Note that at the time of automata’s turn off, there might still remain an amount

of sideslip angle and/or bank angle. On the other hand, since the angular rates are

diminished and the aircraft is able to gain altitude while not being near stalling, the

pilot may decrease the remaining angles manually.

6.3 Recoverability Envelope

To exhibit the recoverability envelope of the hybrid system, a large number of simu-

lations have been run over an envelope of pitch and bank angles in the objective of

determining the system’s fidelity region. The simulation results are run for two dif-

ferent values of initial angle of attack and are tabulated in Tables 6.2 and 6.3. The

tables consists of simulations of which the aircraft has an initial condition of α = 40

56

Page 75: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

Table 6.1: Legend for Tables 6.2 and 6.3, where colors indicate recovery time for aspecific scenario.

Recovery Time5−10 sec

10−15 sec15−20 sec20−25 sec25−30 sec30−35 sec35−50 sec50−75 sec

A : Altitude failG : G Force fail

Table 6.2: Stall Condition: Results of the simulations run over an envelope of θ andφ . Simulations only use the hybrid system H described throughout this thesis. Colorsindicate recovery time range, numbers indicate maximum G force (or minimum ifunder -1.5 G) acted on the aircraft during recovery. Angles and angular rates in thetitle and heading describe the initial conditions before exiting the idle state.

α = 40, β = ψ = 0, P = Q = R = 0.5 rad/sec

θ

φ0 ±15 ±30 ±45 ±60 ±75 ±90 ±105 ±120

−50 6.72 6.72 6.72 6.72 6.72 6.72 7.00 8.62 8.87

−40 6.72 6.72 6.72 6.72 6.72 6.72 6.72 7.83 8.02

−30 6.72 6.72 6.72 6.72 6.72 6.72 6.72 6.85 8.72

−20 6.72 6.72 6.72 6.72 6.72 6.72 6.72 6.72 8.71

−10 6.72 6.72 6.72 6.72 6.72 6.72 6.72 6.72 7.08

0 6.72 6.72 6.72 6.72 6.72 6.72 6.72 6.72 6.72

10 6.72 6.72 6.72 6.72 6.72 6.72 6.72 6.72 6.72

20 6.72 6.72 6.72 6.72 6.72 6.72 6.72 6.72 6.72

30 6.72 6.72 6.72 6.72 6.72 6.72 6.72 6.72 6.72

40 6.72 6.72 6.72 6.72 6.72 6.72 6.72 6.72 6.72

50 6.72 6.72 6.72 6.72 6.72 6.72 6.72 6.72 6.72

60 6.72 -1.91 A 6.72 6.72 8.22 -1.65 G -1.53

70 A -2.18 A 6.72 A G G G G

and α = 60 at the instant automata is activated, respectively. These angles have been

chosen such that they correspond to stall and deep-stall angles. Simulations start with

57

Page 76: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

the aircraft having a constant throttle of 20% and a starting altitude of 15000 ft with

VT = 500 ft/sec. In order to create more realistic and challenging results, all body

angular rates are set to 0.5 rad/sec initially. Other initial conditions are given at the

titles and headings of both Tables 6.2 and 6.3.

Table 6.3: Deep-Stall Condition: Results of the simulations run over an envelope ofθ and φ . Simulations only use the hybrid system H described throughout this thesis.Colors indicate recovery time range, numbers indicate maximum G force (or minimumif under -1.5 G) acted on the aircraft during recovery. Angles and angular rates in thetitle and heading describe the initial conditions before exiting the idle state.

α = 60, β = ψ = 0, P = Q = R = 0.5 rad/sec

θ

φ0 ±15 ±30 ±45 ±60 ±75 ±90 ±105 ±120

−50 6.43 6.43 6.43 6.43 6.43 6.43 6.43 6.43 6.43

−40 6.43 6.43 6.43 6.43 6.43 6.43 6.43 6.43 6.43

−30 6.43 6.43 6.43 6.43 6.43 6.43 6.43 6.43 6.43

−20 6.43 6.43 6.43 6.43 6.43 6.43 6.43 6.43 6.43

−10 6.43 6.43 6.43 6.43 6.43 6.43 A 6.43 6.43

0 6.43 6.43 6.43 6.43 6.43 6.43 A 6.43 6.43

10 6.43 6.43 6.43 6.43 8.89 8.79 G G G

20 A 6.43 6.43 6.43 6.43 A A A A

30 A A 6.43 6.43 A A A A A

40 A A A A A A A A A

50 A A A A A A A A A

60 A A A A A A A A A

70 A A A A A A A A A

The colors indicate at which time range the recovery had successfully completed.

The numbers inside each cell indicate either the maximum G force that acted on the

aircraft during recovery or the minimum G force that acted on the aircraft during re-

covery if the highest negative G force was under -1.5 G. If failed, the cells are dyed

red and the reason of failure is indicated by letters of either A (there was not enough

altitude to recover the vehicle) or G (too much positive or negative G force had acted

on the vehicle, more than structurally permitted). Type A failure is either due to pro-

cedure insufficiency or aerodynamically impossibleness of recovery; type G failure is

due to the harshness of the controllers used.

58

Page 77: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

It is substantial to point out that the load factors of 6.72 seen at Table 6.2 and 6.43

at Table 6.3 are due to the initial conditions specified at the instant of automata’s turn

on. These initial values of load factor for both angles of attack are often naturally

reduced by the procedures throughout the recovery.

6.4 Optimization Improvements

For the automata system,

|X|= 12, |Q|= 15, |P|= |PI|+ |PC|= 11+8 = 19 (taken only non-zero paramaters).

This example system consists of 500 randomly distributed initial points optimized

offline-only and stored in the system’s MPD. 1800 different random initial points were

simulated. Simulations in Fig. 6.9a directly use the non-optimized parameters given

in Section 4 and depict the amount of successful recoveries with the time taken. Fig.

6.9b plots the simulation results using the parameters of the closest entry stored in the

Figure 6.9: Flight path followed during the nose-high upset recovery example. Dis-crete state activation instants are shown when they have been reached.

59

Page 78: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

MPD. Fig. 6.9c plots the simulation results when closest parameters are optimized

online during system runtime.

The results in Fig. 6.9 indicate that although closest optimization has improved

time optimality, non-optimized parameters resulted in a higher success rate. Hence,

the following remark is made: For highly nonlinear systems, two different initial con-

ditions may lead to very different outcomes if parameters optimized for one initial con-

dition is used directly on the other. Thus, although the region of optimality is shrank

by constructing a MPD, closest optimizations alone may be insufficient, demonstrating

the need of an online algorithm in addition.

7 CONCLUSION

A new hybrid system has been presented to formalize procedures that should be fol-

lowed in the events that an agile aircraft enters the region of stall or upset. The basis of

the proposed procedures are the regulations suggested by the Federal Aviation Admin-

istration (FAA), but these recommendations were further expanded to accommodate

the agility of more capable aircraft. One elementary, and one advanced recovery ex-

amples have been elaborately presented to illustrate the discrete state transitions that

eventually lead to recovery, and to demonstrate the validity of the invariants assigned

before proceeding to subsequent discrete states. In addition, a large envelope of pitch

and bank angles for two different values of angle of attack have been tested to evaluate

the performance of the hybrid system. By inspecting the envelope tabulated at Tables

6.2 and 6.3, a display of a uniformly distributed region of colors, i.e. recovery time, is

seen. It can also be said that, a simple stall condition with a stall angle of attack with

low pitch and bank angles is the quickest to recover.

On contrary to stall, we come to the realization of how dangerous entering a deep-

stall region is and that a deep-stall is far more strenuous to recover than a stall region.

At nose-low attitudes for deep-stall, the hybrid system is capable of performing a suc-

cessful recovery; but as the pitch angle is increased, recovery chances are slimmed.

The reasoning for this might not only be a deficiency of the hybrid system presented

60

Page 79: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

or the controllers used, but also the aerodynamically impossibleness to recover the

aircraft from the severe conditions tested, albeit the vehicle’s agility.

In addition to defining a novel automata approach, a general optimization algorithm

for any hybrid system is given. This algorithm is tested on the regarded stall/upset

recovery automata architecture, and it is seen that applying the proposed methods sub-

stantially improves recovery percentage rate and reduces average recovery time.

8 PUBLICATIONS FROM THIS THESIS

The work appearing in this thesis has been accepted to two different conferences,

where the first author for both papers [24, 25] is the writer of this thesis.

61

Page 80: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

REFERENCES

[1] Carbaugh, D., Rockliff, L., and Vandel, B., “The Airplane Upset Recovery Train-ing Aid, Revision 2,” The Boeing Company/Airbus Technical Report, 2008.

[2] Boeing, “Statistical Summary of Commercial Jet Airplane Accidents, WorldwideOperations,” 2012.

[3] Lutze, F. and Lluch, D., “Simulation of stall, spin, and recovery of a generalaviation aircraft,” 21st Atmospheric Flight Mechanics Conference, 1996, p. 3409.

[4] US Department of Transportation, F. A. A., “Upset Prevention and RecoveryTraining, Advisory Circular 120-111, CNG 1,” 2015.

[5] Wilborn, J. and Foster, J., “Defining commercial transport loss-of-control: Aquantitative approach,” AIAA atmospheric flight mechanics conference and ex-hibit, 2004, p. 4811.

[6] Crespo, L., Kenny, S., Cox, D., and Murri, D., “Analysis of control strategies foraircraft flight upset recovery,” AIAA Guidance, Navigation, and Control Confer-ence, 2012, p. 5026.

[7] Hueschen, R. M., “Development of the Transport Class Model (TCM) aircraftsimulation from a sub-scale Generic Transport Model (GTM) simulation,” 2011.

[8] Dutoi, B., Richards, N., Gandhi, N., Ward, D., and Leonard, J., “Hybrid RobustControl and Reinforcement Learning for Optimal Upset Recovery,” AIAA Guid-ance, Navigation and Control Conference and Exhibit, 2008, p. 6502.

[9] Raghavendra, P., Sahai, T., Kumar, P. A., Chauhan, M., and Ananthkrishnan,N., “Aircraft spin recovery, with and without thrust vectoring, using nonlineardynamic inversion,” Journal of Aircraft, Vol. 42, No. 6, 2005, pp. 1492–1503.

[10] Allen, R., Kwatny, H., and Bajpai, G., “Safe Set Protection and Restoration forUnimpaired and Impaired Aircraft,” AIAA Guidance, Navigation, and ControlConference, 2012, p. 4822.

[11] Engelbrecht, J. A., Pauck, S. J., and Peddle, I. K., “A multi-mode upset recoveryflight control system for large transport aircraft,” AIAA Guidance, Navigation,and Control (GNC) Conference, 2013, p. 5172.

[12] Slotine, J.-J. E., Li, W., et al., Applied nonlinear control, Vol. 199, prentice-HallEnglewood Cliffs, NJ, 1991.

[13] Lombaerts, T., Schuet, S., Kaneshige, J., Shish, K. H., and Stepanyan, V., “StallRecovery Guidance Using an Energy Based Algorithm,” AIAA Guidance, Navi-gation, and Control Conference, 2017, p. 1021.

62

Page 81: FINITE STATE AUTOMATA BASED ... - siga.uubf.itu.edu.trsiga.uubf.itu.edu.tr/uubftez/upload/itu/uubf/ucak/Anil_Yildiz-ucak... · ii june 2018 istanbul technical university faculty of

[14] Russell, R. S., “Non-linear F-16 simulation using Simulink and Matlab,” Univer-sity of Minnesota, Tech. paper, 2003.

[15] Nguyen, L. T., Simulator study of stall/post-stall characteristics of a fighter air-plane with relaxed longitudinal static stability, Vol. 12854, National Aeronauticsand Space Administration, 1979.

[16] Stevens, B. L., Lewis, F. L., and Johnson, E. N., Aircraft control and simulation:dynamics, controls design, and autonomous systems, John Wiley & Sons, 2015.

[17] Napolitano, M. R., Aircraft dynamics: From modeling to simulation, J. Wiley,2012.

[18] Petrescu, R. V. and Petrescu, F. I., The Aviation History, BoD–Books on Demand,2013.

[19] Golan, J. W., Lavi: The United States, Israel, and a Controversial Fighter Jet, Uof Nebraska Press, 2016.

[20] Cassandras, C. G. and Lafortune, S., Introduction to discrete event systems,Springer Science & Business Media, 2009.

[21] Snell, S. A., Nns, D. F., and Arrard, W. L., “Nonlinear inversion flight controlfor a supermaneuverable aircraft,” Journal of guidance, control, and dynamics,Vol. 15, No. 4, 1992, pp. 976–984.

[22] Lygeros, J., Tomlin, C., and Sastry, S., “Hybrid systems: modeling, analysis andcontrol,” preprint, 1999.

[23] Nelder, J. A. and Mead, R., “A simplex method for function minimization,” Thecomputer journal, Vol. 7, No. 4, 1965, pp. 308–313.

[24] Yildiz, A., Akcal, U., Hostas, B., Ure, N. K., and Inalhan, G., “Finite State Au-tomata Based Approach to Autonomous Stall and Upset Recovery for Agile Air-craft,” 2018 AIAA Guidance, Navigation, and Control Conference, 2018, p. 1867.

[25] Yildiz, A., Ure, N. K., and Inalhan, G., “An Online Algorithm for Optimiz-ing Invariant Conditions for Procedural Nonlinear Constrained Hybrid Systems,”American Control Conference, IEEE, accepted, to be published in July 2018.

63