Integrated Fault-Tolerant Control System for Unmanned Aerial Systems Paulin Kantue (Student number: 0103702W) School of Mechanical, Industrial and Aeronautical Engineering University of the Witwatersrand Johannesburg, South Africa. Supervisor Prof. Jimoh O. Pedro A research thesis submitted to the Faculty of Engineering and the Built Environment, Uni- versity of the Witwatersrand, in fulfilment of the requirements for the degree of Doctor of Philosophy in Engineering. 22 August 2022 i Declaration I declare that this thesis is my own unaided work. It is being submitted for the degree of Doctor of Philosophy in Engineering at the University of the Witwatersrand, Johannesburg. It has not been submitted before for any degree or examination at any other University. SIGNED: . P. Kantue Date 22/08/2022 ii Acknowledgements First and foremost, I have to thank my research supervisor, Prof. Jimoh O. Pedro. Without your consistent support and dedicated involvement throughout these last few years of my research, this thesis would not have been possible. I would like to profoundly thank you for your encouraging words and your expectations for excellence for this research over the past five years. I have to thank all my former colleagues who were involved in the hardware development and methodology validation for this research: Coert Visser, Stephan Van Der Walt, Prevani Kirsten-Naidoo and Gerrit Viljoen. Most importantly, none of this would have been possible without my wife, Lerato Kantue, who was my voice of reason when I decided to pursue this degree while still having a full- time career. Throughout this period, which included the current Covid-19 pandemic, she has been patient and supportive even while we were thousands of kilometres apart. My son, Samson Kantue, even though you are too small to comprehend, you played a crucial role in pushing me to be a worthy role model. To my parents and my sister, thank you for your warm messages of encouragement. They were always well-received and made me feel supported. Lastly, I would like to thank God for being the source of my strength and joy during these last few years. It is through him that I can claim, for when I am weak, then I am strong. iii Abstract The susceptibility of unmanned aerial vehicles (UAVs) to faults and errors within critical functions such as flight control and navigation systems, combined with their inability in supporting mechanical redundancy due to their size and weight constraints, has led to the research and development of intelligent and fault accommodating control systems known as fault-tolerant control systems (FTCS). The main objective of this research is to design a fault- tolerant control (FTC) system which makes use of only flight data measurements available in most UAVs, to augment mission integrity against actuator faults. This thesis presents new research into the field of UAV fault-tolerant control. The above-stated data-driven approach in FTC design consisted of using radial basis functions neural networks (RBFNN), combined with a technique of time difference of arrival (TDOA) to detect and identify a particular type of actuator fault called an incipient fault. System identification of a propeller-motor slippage condition enabled the model estimation of such an incipient behaviour. FTC inte- gration issues such as: FTC reliability and implementation in a real-time operating system; fault detection and diagnosis (FDD), and controller reconfiguration delays, were investigated within a development framework which ensured online fault estimation. This was achieved by adopting a modified RBFNN training algorithm with fast convergence and low-memory capabilities. The framework also incorporated a controller reconfiguration mechanism using the extremum seeking control law combined with an optimisation function constructed by utilising a geometric representation for actuator allocation. The integrated FTC requirement to improve the real-time performance of an unmanned quadcopter under various levels of incipient fault was achieved by comparing with a nominal controller within real-time sim- ulation environment. The major contributions of this research can be summarised as fol- lows: (1) The development of a fault-emulation model based on the faulty behaviour of a propeller-motor slippage (incipient) condition validated using a software-in-the-loop (SITL) simulation environment; (2) The development of a TDOA framework and the real-time learn- ing of RBFNN through a meta-heuristic hybrid line search algorithm for real-time FDD. (3) The development and real-time testing of an extremum seeking reconfiguration control al- gorithm to improve the probability of mission success implemented within an integrated fault-tolerant framework. iv Preface The presented document is a PhD thesis prescribed by the postgraduate course and describes the research investigated. Integrated Fault-Tolerant Control System for Unmanned Aerial Systems is undertaken under the supervision of Professor Jimoh O. Pedro. Contents Declaration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . i Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ii Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iv Table of Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii List of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii List of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii Nomenclature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi Acronyms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii Publications Arising from this Research . . . . . . . . . . . . . . . . . . . . . . . . . xix 1 Introduction 1 1.1 Research Background and Motivation . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 Fault-Tolerant Control Systems (FTCS) . . . . . . . . . . . . . . . . . . . . . . . 2 1.3 Plant Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.4 Thesis Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.5 Delimitations of Scope and Key Assumptions . . . . . . . . . . . . . . . . . . . 9 v CONTENTS vi 2 Advances in UAV Fault-Tolerant Control 11 2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.2 Fault Detection and Diagnosis (FDD) . . . . . . . . . . . . . . . . . . . . . . . . 12 2.3 Restructurable/Reconfigurable Flight Control . . . . . . . . . . . . . . . . . . 17 2.4 Integrated Fault-Tolerant Control (FTC) . . . . . . . . . . . . . . . . . . . . . . 22 2.5 Identified Gaps in the Existing Literature . . . . . . . . . . . . . . . . . . . . . 26 2.6 Research Problem and Research Question . . . . . . . . . . . . . . . . . . . . . 27 2.7 Research Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 2.8 Research Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 2.9 Requirements for the Development and Implementation of the Reconfigurable Mechanism and Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 2.10 FTCS Hardware-in-Loop System . . . . . . . . . . . . . . . . . . . . . . . . . . 35 2.11 Criteria of Verification and Validation . . . . . . . . . . . . . . . . . . . . . . . 36 2.12 Envisaged Contributions to Knowledge . . . . . . . . . . . . . . . . . . . . . . 36 3 Development of an Unmanned Aerial Vehicle with Faulty Dynamics 37 3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 3.2 Platform Hardware Development . . . . . . . . . . . . . . . . . . . . . . . . . . 40 3.3 Platform Software Development . . . . . . . . . . . . . . . . . . . . . . . . . . 44 3.4 Identification of Rotor-Slip Incipient Fault Dynamics . . . . . . . . . . . . . . 60 4 Nonlinear Identification of Unmanned Rotorcraft Systems 77 4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 CONTENTS vii 4.2 Neural Network Modelling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 4.3 CFA Verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 4.4 CFA Real-Time Validation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 5 Integrated Fault-Tolerant Controller Synthesis 101 5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 5.2 Time-Difference-of-Arrival Fault Detection . . . . . . . . . . . . . . . . . . . . 105 5.3 Integrated Neural Network-Based Fault Detection and Diagnosis Technique . 109 5.4 Extremum Seeking Algorithm for Control Reconfiguration . . . . . . . . . . . 119 6 Conclusions and Recommendations for Future Work 134 6.1 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 6.2 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 6.3 Recommendations for Future Work . . . . . . . . . . . . . . . . . . . . . . . . . 137 References 151 List of Figures 1.1 Generalised structure of an active FTCS. . . . . . . . . . . . . . . . . . . . . . . 4 1.2 Uav4africa H1 drone with shock-absorbing landing gear. . . . . . . . . . . . . 7 2.1 Categorisation of FDD methods [18]. . . . . . . . . . . . . . . . . . . . . . . . . 13 2.2 Illustration of reconfigurable control [52]. . . . . . . . . . . . . . . . . . . . . . 17 2.3 Proposed structure of an integrated FTCS. . . . . . . . . . . . . . . . . . . . . . 34 3.1 System identification framework . . . . . . . . . . . . . . . . . . . . . . . . . . 39 3.2 Uav4africa research platform: H-1 quadrotor - without high-impact landing gear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 3.3 Pixhawk 2.4.8 flight controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 3.4 RCTimer brushless DC motor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 3.5 Propeller thrust/torque coefficients - wind tunnel data . . . . . . . . . . . . . 44 3.6 M8N GPS/Compass module with folding mount. . . . . . . . . . . . . . . . . 45 3.7 Ground control station running the mission planner software. . . . . . . . . . 46 3.8 Software routines of the test-bench platform developed for this research. . . . 47 3.9 Quadcopter rotor forces and moments . . . . . . . . . . . . . . . . . . . . . . . 48 viii LIST OF FIGURES ix 3.10 Rotor flapping approximation [89] . . . . . . . . . . . . . . . . . . . . . . . . . 50 3.11 Quadrotor airframe model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 3.12 Model verification - flapping angles linear response. . . . . . . . . . . . . . . . 52 3.13 MavProxy ground station console. . . . . . . . . . . . . . . . . . . . . . . . . . 53 3.14 Attitude PID controller with fault filter injection. . . . . . . . . . . . . . . . . . 54 3.15 Illustration of superimposed identification manoeuvres on commanded rotor signals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 3.16 Normalised power spectral function as function of forward speed . . . . . . . 56 3.17 Programmed waypoints trajectory in mission planner. . . . . . . . . . . . . . . 57 3.18 Mission flight path with no thrust loss. SITL simulation . . . . . . . . . . . . . 57 3.19 Mission flight path with 80% thrust loss on rotor #1. SITL simulation . . . . . 58 3.20 Pitch controller performance with healthy rotor during identification manoeu- vres. SITL simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 3.21 Pitch PID controller performance with faulty rotor during identification ma- noeuvres. SITL simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 3.22 Configuration of a quadcopter powertrain with an incipient fault condition. . 60 3.23 GoPro camera with WVGA setting and drone rotor setup . . . . . . . . . . . . 62 3.24 Rotor RPM experimental setup . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 3.25 Image capture at 0.5s (stationary) . . . . . . . . . . . . . . . . . . . . . . . . . . 64 3.26 Image capture at 3.5s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 3.27 Imaging algorithm flowchart . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 3.28 RGB threshold monitor for angular estimation and glare rejection . . . . . . . 67 3.29 RPM dynamics - healthy rotor . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 LIST OF FIGURES x 3.30 RPM dynamics - faulty rotor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 3.31 Estimated transfer functions bandwidth comparison . . . . . . . . . . . . . . . 75 3.32 Validation of the estimation models fit accuracy - healthy rotor . . . . . . . . . 75 3.33 Validation of the estimation models fit accuracy - faulty rotor . . . . . . . . . . 76 3.34 Comparison of PWM input commands that would result in the rotor speed response shown in 3.32 for healthy motor and 3.33 for faulty motor . . . . . . 76 4.1 OLS algorithm (1) network estimation/training output (2) network prediction output for 5m/s forward flight and no noise. . . . . . . . . . . . . . . . . . . . 90 4.2 CFA algorithm (1) network estimation/training output (2) network prediction output for 5m/s forward flight and no noise. . . . . . . . . . . . . . . . . . . . 90 4.3 OLS algorithm (1) network estimation/training output (2) network prediction output for 5m/s forward flight and low noise. . . . . . . . . . . . . . . . . . . 91 4.4 CFA algorithm (1) network estimation/training output (2) network prediction output for 5m/s forward flight and low noise. . . . . . . . . . . . . . . . . . . 91 4.5 Input/Output design for rotor dynamics identification . . . . . . . . . . . . . 95 4.6 Normalised power spectral function sensitivity with speed . . . . . . . . . . . 95 4.7 RBFNN prediction accuracy with various noise levels/forward speeds . . . . 97 4.8 Longitudinal rotor flapping dynamic coefficient with forward speed . . . . . 98 4.9 HILS framework for the real-time testing of FDD algorithms. . . . . . . . . . . 99 4.10 RBFNN - layer training performance in HILS. . . . . . . . . . . . . . . . . . . . 100 5.1 TDOA concept for a quadcopter configuration. . . . . . . . . . . . . . . . . . . 106 5.2 ModifiedCFA case study: Input (left) and output (right) mapping. . . . . . . . 111 5.3 ModifiedCFA case study: Meta-heuristic search of maxima of ∆Jk+1(λ) at k = 0.112 LIST OF FIGURES xi 5.4 ModifiedCFA case study: Meta-heuristic search of the maxima of ∆Jk+1(λ) at k = 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 5.5 ModifiedCFA case study: Meta-heuristic search of the maxima of ∆Jk+1(λ) at k = 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 5.6 FDD algorithm - motor identification manoeuvres. . . . . . . . . . . . . . . . . 114 5.7 FDD algorithm - RBFNN predicted output (a) variance. (b) bias. . . . . . . . . 116 5.8 FDD algorithm performance with the Q matrix α value. . . . . . . . . . . . . . 117 5.9 FDD algorithm - (a) fault uncertainty. (b) uncertainty sensitivity. . . . . . . . . 118 5.10 Extremum seeking control framework [127] . . . . . . . . . . . . . . . . . . . . 121 5.11 Geometric representation of normal and faulty dynamics: (a) normal case, (b) faulty case. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 5.12 ES controller within the ArduCopter software. . . . . . . . . . . . . . . . . . . 126 5.13 Angles tracking during fault-tolerant process. . . . . . . . . . . . . . . . . . . . 129 5.14 ES controller filters output. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 5.15 ES controller objective function. . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 5.16 (a) ES controller geometric offset. (b) ES controller motor allocation. . . . . . . 132 5.17 Trajectory tracking - no active FTCS. . . . . . . . . . . . . . . . . . . . . . . . . 133 5.18 Trajectory tracking - active FTCS. . . . . . . . . . . . . . . . . . . . . . . . . . . 133 List of Tables 1.1 UAV critical failure types vs mitigating technologies [6]. . . . . . . . . . . . . 3 3.1 H-1 quadcopter mass properties . . . . . . . . . . . . . . . . . . . . . . . . . . 40 3.2 Mapping of the PWM commands to step changes . . . . . . . . . . . . . . . . 72 3.3 Transfer function estimated models . . . . . . . . . . . . . . . . . . . . . . . . . 73 3.4 Fault injection filter estimated models . . . . . . . . . . . . . . . . . . . . . . . 74 4.1 RBFNN model structure selection . . . . . . . . . . . . . . . . . . . . . . . . . . 96 4.2 RBFNN training results - no. of neurons (SSE) . . . . . . . . . . . . . . . . . . 96 xii Nomenclature α Column Index of Q Variance β ES incircle radius for quadcopter actuator geometric representation ∆ωmi PWM excitation signal on the ith motor designated as an TDOA emitter ∆Jk+1 CFA cost function net contribution due to k + 1th hidden node δlat, δlon Lateral and longitudinal cyclic control inputs δmot, δrud Heave and yawing control inputs η NN learning threshold γ ES incircle offset for quadcopter actuator geometric representation ωH ES controller high-pass filter frequency vector ωL ES controller low-pass filter frequency vector σ RBFNN node spread θ∗ ES optimisation parameter minimising J(yθ) c RBFNN node centre output F FDD fault uncertainty gain Ka ES controller adaptation gain vector P RBFNN cross-correlation regression matrix ∇∆Jk+1 CFA cost function net contribution gradient due to k + 1th hidden node xiii NOMENCLATURE xiv ω (p) k+1 CFA k + 1th hidden node parameter set updated based on pth step of conjugate gra- dient method ωm Motor angular speed ωp Propeller angular speed Q Matrix of cross-correlated signals φ, θ, ψ Rolling, pitching and yawing Euler angles ΦΦΦk CFA regressor subset up to the kth hidden node σv Kalman filter measurement noise standard deviation σw Kalman filter process noise standard deviation w RBFNN weights vector A1i q Longitudinal flapping angle gain of the ith rotor due to pitching body-fixed angular rate A1i δlon Longitudinal flapping angle gain of the ith rotor due to longitudinal cyclic control input A1i a1i Longitudinal flapping angle gain of the ith rotor due to longitudinal flapping angle of the ith rotor a1, b1 longitudinal and lateral rotor flapping angles ax, ay, az axial acceleration along the body-fixed x, y, z axes B1i p Lateral flapping angle gain of the ith rotor due to rolling body-fixed angular rate B1i δlon Lateral flapping angle gain of the ith rotor due to longitudinal cyclic control input B1i b1i Lateral flapping angle gain of the ith rotor due to lateral flapping angle of the ith rotor CTi Thrust coefficient of the ith rotor Gf (s) Laplace transform of a fault injection filter H(θ,F) FDD control allocation scheme Ixx Mass moment of Inertia about the body-fixed x-axis NOMENCLATURE xv Iyy Mass moment of Inertia about the body-fixed y-axis Izz Mass moment of Inertia about the body-fixed z-axis J(yθ) ES controller objective function L,N,M Moments about the body-fixed x, y, z axes Lp L-moment stability derivative due to rolling body-fixed angular rate Lδlat L-moment control derivative due to lateral cyclic control input Lδrud L-moment control derivative due to yawing control input Lb1i L-moment stability derivative due to lateral flapping angle of the ith rotor Mq M-moment stability derivative due to pitching body-fixed angular rate Mδlon M-moment control derivative due to longitudinal cyclic control input Mδmot M-moment control derivative due to heave control input Ma1i M-moment stability derivative due to longitudinal flapping angle of the ith rotor Nr N-moment stability derivative due to yawing body-fixed angular rate Nδlat N-moment control derivative due to lateral cyclic control input Nδrud N-moment control derivative due to yawing control input p, q, r Rolling, pitching and yawing body-fixed angular rates Pf , Pi RBFNN model estimation and prediction accuracy metrics Smn Cross-correlation between m and n signals Spc GSS meta-heuristic algorithm search counter SpH GSS meta-heuristic algorithm search upper limit Spi GSS meta-heuristic algorithm max number of iterations SpL GSS meta-heuristic algorithm search lower limit Ti Thrust force of the ith Rotor u, v, w Body-fixed translational velocities NOMENCLATURE xvi X,Y, Z Forces along the body-fixed x, y, z axes Xθ X-force stability derivative due to pitching Euler angle Xq X-force stability derivative due to pitching body-fixed angular rate Xu X-force stability derivative due to translational velocity along body-fixed x-axis Xδlon X-force control derivative due to longitudinal cyclic control input Xa1i X-force stability derivative due to longitudinal flapping angle of the ith rotor Yθ Y-force stability derivative due to pitching Euler angle Yp Y-force stability derivative due to rolling body-fixed angular rate Yv X-force stability derivative due to translational velocity along body-fixed x-axis Yδlat Y-force control derivative due to lateral cyclic control input Yb1i Y-force stability derivative due to lateral flapping angle of the ith rotor Z(Pm, En) TDOA cross-correlation time delay based on the NN predicted output of the mth motor and NN estimated output nth motor Z(Pm, Pn) TDOA cross-correlation time delay based on the NN predicted output of the mth motor and NN predicted output nth motor Zθ Z-force stability derivative due to pitching Euler angle Zq Z-force stability derivative due to pitching body-fixed angular rate Zw z-force stability derivative due to translational velocity along body-fixed z-axis Zδmot X-force control derivative due to heave control input NOMENCLATURE xvii Acronyms AFTCS Active Fault-Tolerant Control System CFA Continuous Forward Algorithm ES Extremum Seeking ESC Electronic Speed Controller FDD Fault Detection and Diagnosis FTC Fault-Tolerant Control FTCS Fault-Tolerant Control System GPS Global Positioning System GSS Golden Section Search HILS Hardware-in-Loop System I/O Input/Output Device IDE Integrated Development Environment IMU Inertial Measurement Unit LCF Low Contact Friction MPC Model Predictive Control NN Neural Networks OLS Orthogonal Least Squares PFTCS Passive Fault-Tolerant Control System PID Proportional Integral Derivative PWM Pulse Width Modulation RBFNN Radial Basis Function Neural Networks RC Reconfigurable Controller NOMENCLATURE xviii RPA Remotely Piloted Aircraft SSE Steady-State Error SITL Software-in-the-Loop TDOA Time Difference of Arrival UAS Unmanned Aerial Systems UAV Unmanned Aerial Vehicle NOMENCLATURE xix Publications Arising from this Research Published Conference Papers • [1] Paulin Kantue and Jimoh O. Pedro. ”Real-Time Identification of Faulty Systems: Development of an Aerial Platform with Emulated Rotor Faults”. In: 2019 4th Confer- ence on Control and Fault Tolerant Systems (SysTol2019), Casablanca, Morocco, 2019, pp. 20–25. • [2] Paulin Kantue and Jimoh O. Pedro.”Grey-box modelling of an Unmanned Quad- copter during Aggressive Maneuvers”. In: International Conference on System Theory, Control and Computing (ICSTCC). Sinaia, Romania: IEEE, 2018, pp. 640–645. • [3] Paulin Kantue and Jimoh O. Pedro. ”Nonlinear Identification of an Unmanned Quadcopter Rotor Dynamics using RBF Neural Networks”. In: International Confer- ence on System Theory, Control and Computing (ICSTCC). Sinaia, Romania: IEEE, 2018, pp. 292– 298. • [4] Paulin Kantue and Jimoh O. Pedro. ’Integrated Fault Detection and Diagnosis of an Unmanned Aerial Vehicle using Time Difference of Arrival’. In: International Con- ference on System Theory, Control and Computing (ICSTCC). Sinaia, Romania: (pp. 336-342), IEEE, 2020. International Journal Papers Currently under Review • Paulin Kantue and Jimoh O. Pedro. ’Reconfigurable extremum seeking controller de- sign of a quadcopter with incipient actuator faults’. Submitted for review to Interna- tional Journal of Control, Automation, and Systems, Manuscript ID: JCAS-D-21-00741, August 2021. International Journal Papers Accepted for Publication • Paulin Kantue and Jimoh O. Pedro. ’Integrated Fault-Tolerant Control of a Quadcopter UAV with Incipient Actuator Faults’. Submitted for review to International Journal of Applied Mathematics and Computer Science (AMCS), October 2021. Chapter 1 Introduction 1.1 Research Background and Motivation Recent industrial activities such as: disaster management, agricultural/terrain mapping, mining exploration, law enforcement surveillance, film and photography, have made use of unmanned aerial vehicles (Unmanned Aerial Vehicle (UAV)s), generally known as drones or remotely piloted aircraft (RPA), as their main tool for sensory data acquisition and anal- ysis. Miniature rotorcraft, a subclass of such vehicles, are of particular interest given their compact size, ability to hover, forward/inverted flight, their suitability to operate in con- fined/urban environments and above all, their low cost of operation. Unlike their full-scale counterparts, miniature rotorcraft exhibit increased thrust-to-weight ratio enabling them to perform aggressive and aerobatic manoeuvres in confined spaces. The application of un- manned miniature aircraft, and UAVs in general, therefore demands an improvement in their reliability and software robustness to mitigate potential accidents [5]. Manned aircraft achieve airworthiness certification through hardware redundancy and pilot handling qualities assessment, which are unavailable for UAVs due to their size, power-plant and weight constraints. In 2019, a survey which was responded to by more than 150 com- mercial UAV companies in the United Kingdom confirmed that a critical failure is likely to occur within 100-500 hours of flight time [6]. This is equivalent to a possible fatal accident every 1-5 month(s), given continuous (5hr/day) operations. It has been expressed through numerous studies, that the current emphasis on the reliability and maintainability (compo- 1 CHAPTER 1. INTRODUCTION 2 nent complexity, component cost, long-lead items) of unmanned systems is insufficient and poses a major risk to the sustained success of UAVs [7]. Table 1.1 shows the likelihood of various types of failure, the impact on mission success and the associated technologies to prevent critical incidents/accidents. Likelihood of failure refers to the probability that a particualr failure is the primary cause of a critical accident. Impact on mission success refers to the severity of a particular failure on the completion of UAV mis- sion objectives. Combined weighting refers to a means to prioritise a mitigation for the risk associated with a particular fault. It can be seen that the highest combined weighting for mission success deals with preventing firmware (software) failures through the implemen- tation of fault-tolerant stability and control algorithms. The surveyed companies also noted that some mixture of on-board intelligent augmentation and operator training was required in order to improve UAV flight safety [6]. However, most hobby-grade to commercial-grade flight controllers still adopt the Proportional Integral Derivative (PID) controller structure due to its ease of implementation, quick parameter fine-tuning and pilot understanding and training [8]. But given the unstable nature of a rotorcraft such as the quadcopter, such simple controllers quickly degrade in performance outside their area of design [9] and their robust- ness is further impacted in the event of sensor or actuator faults [10]. Although there are numerous faults that can cause critical accidents, as seen in Table 1.1, this research involves augmenting the default PID controller with fault-tolerant control algorithms with specific focus on actuator faults. 1.2 Fault-Tolerant Control Systems (FTCS) The lack of self-repairing and smart flight control systems, also known as fault-tolerant control systems (Fault-Tolerant Control System (FTCS)), poses a major roadblock to UAV success in an urban environment. This problem is more pronounced for unmanned ro- torcraft given that they are highly unstable, susceptible to environmental conditions and lack aerodynamically-induced stability [6]. There are two types of FTCS namely: passive (Passive Fault-Tolerant Control System (PFTCS)) and active (Active Fault-Tolerant Control System (AFTCS)). Unlike AFTCS, PFTCS make use of fixed and robust controllers without the need for fault detection or control reconfiguration. Throughout this thesis, we will be referring to AFTCS as FTCS. CHAPTER 1. INTRODUCTION 3 Table 1.1: UAV critical failure types vs mitigating technologies [6]. Failure Type Likelihood of failure [1-6] Mitigating technology Impact on mission success [1-6] Combined weighting Navigation 5.77 Collision Avoidance 3.16 18.2 Firmware 5.6 Fault-tolerant stability & control 3.78 21.1 Battery 5.6 Intelligent power management 3.36 18.8 Rotor blade 3.96 Intelligent warning (mechanical) 4.1 16.2 Brushless motor 3.41 Intelligent warning (electrical) 4.1 13.9 The indisputable necessity for FTCS was driven partly by two commercial aircraft accidents in the late 1970s. On the 12th of April 1977, the Delta Flight 1080 elevator became stuck at 19 degrees without prior pilot warning indication. The experienced pilot was able to reconfigure the remaining actuators and safely land the aircraft. The second case occurred on the 25th of May 1979 when an American Airlines DC-10 pilot only had approximately 15 seconds before the plane crashed due to the left wing’s leading-edge slats locked in position. Post-crash investigations demonstrated that an automatic rerouting of hydraulic fluid could have prevented the 273 fatalities on that day [11]. The application of FTCS on miniature helicopters (main rotor diameter less than 1m) or even quadcopters in the same class, is a research area that has become more relevant in recent years [12]. This is mainly due to the increasing use of such systems in civilian airspace by hobbyists and commercial companies alike. Currently, systems such as DJI Phantom series unmanned systems make use of redundant sensors in order to introduce fault-tolerance ca- pabilities. Most platforms make use of a sensor voting mechanism whereby the faulty sensor is detected and isolated, to ensure data from the faulty sensor is ignored, negating the need for controller reconfiguration. CHAPTER 1. INTRODUCTION 4 1.2.1 FTCS architecture A FTCS consists of a fault detection and diagnosis (FDD) module whose main function is the detection, diagnosis and identification of sensor, actuator or system faults. Figure 1.1 shows a typical schematic of a FTCS. This process triggers the modification of a nominal controller via a reconfiguration control (Reconfigurable Controller (RC)) mechanism, which typically involves some form of control reallocation and sensor bypassing, such that the performance and/or stability degradation caused by such faults is mitigated or altogether eliminated. One of the primary goals of this research is the development of a FTCS architecture capable of restoring an acceptable level of system robustness after a particular fault has occurred. θ y uref ud u Fault Detection Diagnosis ε + plant + controller Reconfiguration mechanism Figure 1.1: Generalised structure of an active FTCS. The requirement to implement FTCSs exists based on two assumptions: (1) the nominal con- troller designed based on classical or modern control techniques is incapable of maintaining a satisfactory performance and robustness in the presence of actuator, sensor and system faults, (2) the system architecture has an inherited redundancy that allows the effects of a fault to be in some way circumvented or minimised [13]. These assumptions are found to be correct in Unmanned Aerial Systems (UAS) which require a high level of software and hardware reliability and fault-tolerance for the success of their critical missions. Consequently, there exists the need to apply analytical redundancy, i.e., to exploit mathe- matical relations between measured or estimated variables in order to detect possible mal- functions [14]. Combining such methods in the Fault Detection and Diagnosis (FDD) and a reconfigurable controller (RC) based on a black-box architecture such as neural networks, CHAPTER 1. INTRODUCTION 5 is the objective of this research. Moreover, it focuses on the real-time performance of such a framework with the potential impact in converting the existing market of low-cost un- manned aircraft into robust and fault-tolerant unmanned systems for commercial use. 1.2.2 Fault classification Within the context of FTCS for unmanned rotorcraft, three classes of faults are considered: (1) sensor, (2) actuator and (3) structural/components damage. All the above mode of failures are modelled as constant bias, drift or additive-type, multiplicative-type and outlier data failure. Consideration on the time-based transient dynamics in the above models, is the differentiation between abrupt and incipient faults. Most considerations during the synthesis of unmanned quadcopter FDD methods, are based on abrupt faults given their rapid loss of stability and/or performance caused by nonlinear/coupled dynamics [14]. The incipient fault type, often neglected, can cause complete system failure. On the 28th of January 1986, a fatal incident involving the Space Shuttle Challenger resulted from a failure in the O-rings sealing a joint on the right solid rocket booster, releasing pressurised hot gases. This resulted in the solid rocket booster separating from its joint attachment, structural fail- ure of the external tank and eventual mechanical overload due to abnormal aerodynamic forces. In the famous words of theoretical physicist Richard Feynman: ”Once a small hole burns through generates a large hole very fast! Few seconds catastrophic failure.” [15]. Given the increased complexity and payload value of unmanned systems in recent years, the detection and diagnosis of incipient faults have been investigated on such platforms [16]. Given that traditional FDD methods are better suited for systems with significant symptoms, the diagnosis of incipient faults can be problematic given small magnitude in relation to the measured/monitored signals [17]. Therefore, fundamental questions such as: (1) what are the main factors that impact the detection performance of incipient faults? (2) how can you integrate the detection of incipient faults within a closed-loop system? need to be answered. This research is aimed at answering the above questions with specific focus on the devel- opment and real-time implementation of an actuator-class incipient fault in Chapter 3 and detection and diagnosis in Chapter 5. CHAPTER 1. INTRODUCTION 6 1.2.3 Integrated FTCS The successful verification and validation of a FTCS can only be achieved by taking into consideration the software and hardware environments in which its algorithms will be exe- cuting. The requirements for system safety, reliability, maintainability, and survivability are also imposed on one of its most critical sub-systems, the FTCS. Additional requirements must include the transient and steady-state performance for not only normal operations, but also faulty conditions. An integrated approach to development of a FTCS is therefore crucial to ensure utmost compliance. In their bibliographical review, Zhang and Jiang stated that one aspect for future FTCS re- search was to investigate the development of an integrated design methodology for the on- line and real-time application of FDD and RC algorithms [18]. Challenges in this area in- cluded: (1) how to deal with the collinearity in identification algorithms; (2) how to obtain accurate parameter estimates on-line and real-time, in the presence of poor input excitation; (3) how to deal with adverse interactions between the identification and the control schemes in a closed-loop setting and (4) how to ensure that the fault detection and controller recon- figuration time delays are minimised given the software and hardware constraints. Recent research proves that the above concerns still require further investigations [19, 20]. Consequently, the above questions have been incorporated as research objectives in this the- sis and act as guidelines throughout the development of a design methodology in order to arrive at an integrated FTCS with real-time capability. 1.3 Plant Description The FTC architecture developed in this research was implemented on H1 unmanned quad- copter owned by the company Uav4frica (Pty) Ltd shown in Figure 1.2. Due to the criti- cal nature of the actuator-induced faults, initial flight tests were performed and thereafter a pseudo real-time simulation model was developed using the same source code baseline flown by the H1 quadcopter. CHAPTER 1. INTRODUCTION 7 1.3.1 Uav4africa H1 quadcopter The H1 system, shown in Figure 1.2 is an unmanned quadrotor weighing 1.75 kg with four 10 inch (25.4 cm) APC propellers. The Pixhawk flight controller hardware integrates a 10- channel Global Positioning System (GPS) with the ArduCopter software baseline developed by ArduPilot. A shock-absorbing landing gear was designed in anticipation of the testing phase of the FTCS. The H1 actuator system which comprises of the propeller, the speed controller and motor was used to estimate the incipient fault condition. This process and a detailed description of the H1 system and its development is given in Chapter 3. Due to lack of approved destructive test sites and capital for multiple prototypes, flight-test validation process was not completed at the time of writing this thesis. Figure 1.2: Uav4africa H1 drone with shock-absorbing landing gear. 1.4 Thesis Overview The thesis is divided into six chapters. Each chapter begins with an introduction giving context on the chapter followed by a brief outline where applicable. Chapter 1 - Introduction Chapter 1 introduces the FTCS research field and discusses the factors that enable its success- ful implementation in real-world applications, especially in UAS. A brief introduction into CHAPTER 1. INTRODUCTION 8 the research aerial platform is given and a brief outline to the rest of the thesis is provided. Chapter 2 - Advances in UAV Fault-Tolerant Control The state-of-the-art information is discussed in detail in chapter 2. It provides a description of the problem addressed in this thesis and aims to establish the research motivation. This chapter takes an in-depth look at what has been achieved in the area of FTCS of UAS thus far and where the research gaps exist. Chapter 3 - Development of an Unmanned Aerial Vehicle Chapter 3 presents the development of an aerial quadrotor platform used for the system identification of a common incipient fault-type among multi-rotors: propeller-motor slip- page failure or known throughout this thesis as low-contact friction (Low Contact Fric- tion (LCF)) failure. Fault models based on experimental data are developed and imple- mented in a modified ArduCopter software suite for the development of a pseudo real-time simulation environment. This is then used as a development and verification tool in the subsequent chapters. Chapter 4 - Nonlinear System Identification of Unmanned Rotorcraft Systems Chapter 4 presents the concept of grey-box modelling, based on the results from the previ- ous chapter, for the nonlinear system identification of an unmanned quadcopter faulty rotor dynamics. A black-box nonlinear system identification method to estimate rotor dynamics, while addressing the issue of data collinearity, is developed and implemented in real-time simulation system for performance evaluation. Chapter 5 - Integrated Fault-Tolerant Controller Synthesis Chapter 5 describes the development of FDD and RC mechanisms through the considera- tion of various integration factors. The integrated FTCS solution was implemented in real- time simulation environment to evaluate the system closed-loop response during a waypoint CHAPTER 1. INTRODUCTION 9 tracking mission. Results based on the real-time desktop simulation has been discussed. Chapter 6 - Conclusions and Recommendations for Further Work Chapter 6 summarises the main findings and contributions of this research. The chapter also states some recommendations for further work. 1.5 Delimitations of Scope and Key Assumptions 1.5.1 Delimitations The following delimitations can be stated as part of this research scope: • The neural network approach is only based on a Radial Basis Function Neural Net- works (RBFNN)-type architecture. Various learning algorithms are investigated with- out considering their suitability in other types of neural network-based FTCS. • Only single events of actuator faults are to be considered. Double actuator failures are considered unrecoverable. • The modification of the baseline controller does not include its architecture. • Validation of the FTCS with flight test data is not considered. • No sensor faults are considered. 1.5.2 Assumptions The following key assumptions are considered within this research: • The post-fault dynamic model is observable and identifiable. • The sensors faults that would impact FTCS performance due to degraded post-fault model controllability, were assumed negligible. CHAPTER 1. INTRODUCTION 10 • The magnitude of an incipient actuator fault is not time-varying from the moment the FDD module detects a fault. • The pre-fault dynamic model is closed-loop stable using a PID controller architecture. • The post-fault dynamic model is closed-loop stable during the synthesis of the FTCS. Chapter 2 Advances in UAV Fault-Tolerant Control 2.1 Introduction Fault-Tolerant control systems (FTCS) can be defined as a type of control system with the capability to tolerate faults and malfunctions and the capacity to maintain a desirable level of system stability, robustness and performance. These types of control systems exist based on the premise that classical and modern control system designs may not be able to maintain a satisfactory performance in the presence of actuator, sensor and system faults [21]. This premise is all the more relevant in UAVs which require a high level of software and hardware reliability and fault-tolerance. Initial research in Fault-Tolerant Control (FTC) (better known then as self-repairing flight control systems) focused on establishing techniques which can be used to either (1) tolerate or (2) detect and compensate for component failures using linear models [11]. In the 1990s, a clear distinction was made between fail-safe systems and fault-tolerant systems. The follow- ing properties were proposed for FTCS: (1) prevent any simple fault from developing into system level failure; (2) make use of information (analytical) redundancy to detect faults; (3) make use of reconfiguration in programmable system components to accommodate faults; (4) accept degraded performance due to fault but keep plant availability; (5) low-cost by design given no new hardware is required. Subsequently, several other authors published 11 CHAPTER 2. ADVANCES IN UAV FAULT-TOLERANT CONTROL 12 papers discussing FTCS robustness/safety issues and learning approaches [22]. Since then, a significant amount of research on FTC has been established. In the last few years, application of FTCS for unmanned systems has also increased. Gain-scheduling tech- niques on a quadrotor UAV simulator [23], application of Model Predictive Control (MPC) methods on unmanned aircraft [24], construction of a multiple model scheme-based fault detection and identification for an unmanned aircraft and development of neural network- based fault identification method for unmanned helicopter [25] are some of the few publica- tions that have surfaced. FTCS can be classified in two categories: Passive FTCS and Active FTCS. The main distinc- tion in passive FTCS is the exclusion of a fault detection and identification mechanism and reconfigurable/restructurable control system. On the other hand, passive FTCS have more emphasis on hardware redundancies and establishing a robust control design process upon which various combinations of faults can be tolerated. This is based on a certain pre-defined number of component faults which formed part of the controller design process. The use of actuator pre-compensator design technique combined with state feedback gain matrix was proposed in [26]. Simulated results were demonstrated based on aircraft linear dynamics. 2.2 Fault Detection and Diagnosis (FDD) Fault detection and diagnosis (FDD) has been described as a crucial aspect to complex and safety-critical systems such as nuclear powerplants, transport and more especially unmanned systems. Important aspects of FDD include: (1) high sensitivity to faults; (2) robustness to model uncertainties; (3) computational complexity; (4) ability to provide quick detection and (5) suitability to FTC [27, 28]. FDD methods can be categorised into model-based and data-based methods which are shown in Figure 2.1. It has been shown that state estimation methods are most suited for fault detection, although they are inefficient in identification of faults without a-priori information. Various survey papers on FDD methods have been published in the last 20 years. [29, 30]. Sensor and actuator faults in unmanned helicopters have been investigated in [31]. Actua- tor fault detection has been implemented for a stuck actuator type failure. In particular, the collective actuator was simulated to get stuck near the trim hover. An auto regressive exoge- CHAPTER 2. ADVANCES IN UAV FAULT-TOLERANT CONTROL 13 Figure 2.1: Categorisation of FDD methods [18]. nous (ARX) model was chosen to extract localised input-output observer models in a system identification sense upon which the output error would constitute a fault in the system. FDD methods specific for manned and unmanned helicopters were also investigated in [32]. One major drawback of such methods is the requirement of an accurate analytical model, which is not always feasible for small unmanned helicopters. In the same year, an adaptive recur- sive orthogonal least squares algorithm was presented in [33]. The regression problem was set up through categorising regressor candidates such that parameter (in this case aerody- namic) coupling effects are not lost after a control surface failure. It was demonstrated that the recursive nature with the combination of the model restructure algorithm, could identify the instant upon which the failure occurred even if the fault built up gradually and was only detected afterwards. Using an unknown input observer to track actuator fault parameters and decouple the ef- fect of faults and unknown inputs was proposed in [34]. It was demonstrated that actuator loss of effectiveness at unknown values and unknown time instants could be described as an unknown vector of parameters belonging to a convex set of values. An observer equation was deduced such that actuator faults and disturbance could be decoupled. The design of the adaptive controller in an H∞ sense incorporates the convex set of possible faults without much fault information. In order to apply this scheme into real systems, the set of linear ma- trix inequalities (LMI) were translated into solvable LMIs by using the symmetric properties of semi-definite inequalities and the guaranteed Lyapunov stability. This strategy was ap- plied to form an integrated solution of an H∞ output feedback controller gain. A switching CHAPTER 2. ADVANCES IN UAV FAULT-TOLERANT CONTROL 14 scheme allowed the worst-case controller to be used based on the a-priori upper bound of the faults to be accommodated. Observer type fault detection was also used in [35]. Using sliding mode observers based on a linear parameter varying system for the development of the fault detection and isolation scheme [36]. Issues on how to deal with model and fault uncertainties and their application to passive and active FTCSs have been researched. It investigates the use of a probabilistic approach in the development of the fault detection mechanism such that boundedness is maintained for all possible faults and model uncertainties. Demonstration of concepts was done using simplistic brushless DC motor. Attitude control of a quadrotor UAV was studied in [37]. Three altitude sensors were used to establish hardware redundancy. Standard deviation of the residuals between the various sensors was used as a quantitative indication that a fault had occurred. An adaptive neural network-based scheme for sensor failure diagnosis of an unmanned rotorcraft was discussed in [29]. The concept was to use a set of online learning neural networks to identify the type of sensors and another set of neural networks to classify the specific sensor output. Output measurements from gyroscopes and accelerometers were considered. Error norms from each NN output are used to detect and identify the sensor faults. In addition, an adaptive threshold was conceived based on the standard deviation and rate of change of the threshold values recorded after each flight. This required an extensive flight test campaign and is applicable to that unmanned helicopter configuration, which in this case is the SIA-Heli-90 aircraft. An improvement on the multiple model adaptive estimation (MMAE) with extended Kalman filter (EKF) has been proposed in [38] for the fault diagnosis of an unmanned aircraft. This improvement comes with the use of the Euclidean norm to guarantee the filter stability and improve its estimation accuracy. This was achieved through the introduction of multiple fad- ing factors which affected the forward propagation of the state-error covariance matrix. The simulation results were performed where each filter corresponded to a fault condition which was comprised of the elevator and flap actuators. Given lack of the real-time data for val- idation, the sensor measurements were corrupted by zero-mean white Gaussian noise and injected into the aircraft model. This method is very attractive provided there is enough a- priori knowledge of the post-fault dynamics for the effective design of the estimation filters. A similar method was applied to an unmanned aircraft longitudinal dynamics modelled as linear-parameter varying (LPV) multiple model [39]. The aerodynamic coefficients were CHAPTER 2. ADVANCES IN UAV FAULT-TOLERANT CONTROL 15 augmented with fault models of ice forming on aircraft aerodynamic surfaces. A collection of observers was used to estimate the icing state while considering the various aircraft icing configurations. The use of an adaptive two-stage extended Kalman filter (EKF) for fault detection and diag- nosis (FDD) of an unmanned quadrotor helicopter was investigated in [40]. Given that most commercially available systems make use of low-price and low-precision sensors that suf- fer from signal bias and drift faults, this was the focus of this paper. A simplistic kinematic model (ignoring actuator dynamics) of a quadcopter model, based on the Quanser Qball-X4, was modified by adding Inertial Measurement Unit (IMU) (Inertial Measurement Unit) fault dynamics into the system state matrix. In order for the EKF to be sensitive to abrupt sen- sor faults, a dynamic forgetting factor informed by the eigenvectors of the state covariance matrix was introduced. This enables the EKF to estimate the system states and the faults si- multaneously. Even though the EKF initialisation process is not defined, a simulation model with normal and faulty conditions (sensor bias and drift) was evaluated, resulting in no false alarm under both scenarios and with the fault estimation error close to zero-mean. This model-based FDD approach is strongly dependent on a-priori knowledge of the sensor fault dynamics to prevent the incorrect estimation of faults. The detection and diagnosis of incipient faults in unmanned quadrotor systems was studied in [16] and method in detail in [17]. The occurrence of this incipient fault was assumed to be of an abrupt nature but small in magnitude compared to the background noise and signal trend. A four-stage approach was used to develop an FDD algorithm for the detection of the abnormal voltage sensor data. A fault-signal-ratio (FSR) was assumed to be a combi- nation of the fault–noise ratio (FNR) and fault–trend ratio (FTR) with the assumption that the measured signal is oscillatory in nature and its trend and the noise are statistically inde- pendent. The limitations of a traditional Hotelling method, where the computation of the Mahalanobis distance between the dataset and its past mean value requires a large number of data points and it is susceptible to bad conditioning, was improved through a detrend- ing and denoising algorithm. The monitored signal is assumed that it can be constructed by a least-square-computed polynomial function, where its order is user-defined offline and based on a-priori knowledge of the monitored signal. The fault detection algorithm was able to improve the false-alarm rate and act as an early warning system for incipient faults with recovery features. CHAPTER 2. ADVANCES IN UAV FAULT-TOLERANT CONTROL 16 A relevant and recent concern of unmanned quadcopter propulsion reliability was investi- gated by Iannace et al., [25]. An acoustics classification model based on experimental mea- surements was developed to detect unbalanced blades in a UAV propeller. The faulty con- dition was induced during ground testing (attached to a tripod), by sticking paper tape on the upper surface of the designated faulty propeller blade. This results in a significant im- pact on the aerodynamics of the propeller and consequently the noise characteristics of the affected blade will be different from the normal conditions. Although the authors did not explicitly state it, but this type of fault condition is of the incipient-type as its magnitude is directly proportional to the rotational speed of the propeller. The resilient backpropagation algorithm was implemented in the training of a feedforward neural network fault classifier. This algorithm determines iteratively the weights of a neural network to minimise the error function finding the local minimum. Integration of this method for real-time fault diagnosis was not considered and as such the successful implementation of this neural network-based fault detection approach is unclear. The robustness of vertical take-off and landing (VTOL) unmanned systems was investigated from an FDD perspective [41]. A two-stage algorithm based on time-domain and frequency- domain analyses of IMU accelerometer data was developed. A moving window filter, based on the bootstrap method, enabled the extraction and selection of features which were pro- cessed by a regularised linear discriminant analysis (LDA) method for fault detection. Val- idating such a method was achieved by analysing the effects of propeller damage (actuator fault) during the take-off and landing phases of flight. Similarly, the fault detection and dy- namics based on small Permanent Magnet Synchronous Motor (PMSM) was investigated in [42]. Given the large number of the mechanical and electrical parameters, experimental data based on step inputs was used to develop transfer function blocks. A high friction and a detached propeller failure were some of the faulty conditions simulated on an experimental bed. Although the fault types are relevant to most available unmanned systems, the user- defined threshold fault detection method was not described and its implementation for FTC is unclear. CHAPTER 2. ADVANCES IN UAV FAULT-TOLERANT CONTROL 17 2.3 Restructurable/Reconfigurable Flight Control Most of the reconfigurable controllers for UAS have their design methods stemming from well-established control theory concepts which have been applied in various industrial ap- plications. However, new challenges appear when reconfiguration or control adaptation must be performed in an active fault-tolerant system for UAVs namely: (1) nonlinear dy- namics under real-time constraints; (2) automated reconfiguration controller synthesis with little trial-and-error and human interventions; (3) all levels of reconfiguration to prevent further degradation of the system stability while striving for pre-fault level of performance [18]. Various control methods in a reconfigurable sense have been used across many appli- cations, such as: adaptive control [34], feedback linearisation [43], linear quadratic [44, 5], gain-scheduling [23], model predictive control [45], H∞ robust control [46, 47], linear matrix inequalities (LMI) [48], sliding mode control [49], Youla parametrization [50] and quantita- tive feedback theory (QFT) [51]. Figure 2.2 illustrates the idea behind controller reconfigu- ration [52]. d and r are the inputs to the plant and controller respectively, y and yf are the outputs before and after a fault has occurred respectively. uc and uf is the actuator input before and after a fault has occurred respectively. Figure 2.2: Illustration of reconfigurable control [52]. The on-line determination of a control law using neural networks to achieve reconfiguration after control surface damage was investigated in [53]. A distinction between restructurable and reconfigurable controllers was made with the underpinning difference being that the for- mer involves the online restructuring of the control law rather than control gains reconfigu- ration. The use of an extended back-propagation algorithm (EBPA) for the on-line training of CHAPTER 2. ADVANCES IN UAV FAULT-TOLERANT CONTROL 18 NN-based controller has been studied. This resulted in the mapping of nonlinear dynamics with method that can be easily implemented in a real-time system given low-memory re- quirements. A few years later, Lee and Kim [54] investigated a similar approach of using an adaptive neural network controller to compensate for the effect of aerodynamic modelling errors. The control law was synthesised using a three-layer feedforward architecture with sigmoid activation functions. The tracking accuracy of aerodynamic angles was used for controller evaluation and it was found that it resulted in less overshoot and smaller steady- state errors as compared to a traditional backstepping controller. Flight testing of a reconfigurable control system with the estimated model based on recursive least squares (RLS) algorithm with a forgetting factor was presented in [55]. The controller was based on model reference adaptive control. Given the case of a fixed-wing platform, the reference model mapping of the control variables to output variables were reduced to simple gains with biases. This is deemed applicable to only stable airframe with slow dynamics. The identification of gains was only achieved off-line in a batch process which limits its application on a real-time low-cost microprocessor. The proportional nature of the control law suggests that the elimination of the steady-state error in estimated control gains could be problematic. Linear quadratic (LQ) technique was also chosen to be used for the FTC design with the reformulated algebraic Riccati equation in [44]. The loss of control effectiveness for the rudder and one of the ailerons for an unmanned fixed-wing aircraft is compensated through the controller synthesis taking into account the a-priori knowledge of the system linear model which will not always be available in real-time conditions. A neural network-based adaptive dynamic programming (NN-ADP) controller was investi- gated for the purpose of reconfigurable control in [56]. The NN-ADP is a cascade of neural networks that provides inner-loop body rate control, attitude control, and outer-loop ve- locity control. In the case of helicopters, the relationship between the main rotor actuator positions and the swashplate parameters is derived such that an actuator failure accommo- dation scheme can be established through swashplate reconfiguration. Based on any of the three main rotor actuators failing, the mechanism provides control for the aircraft attitude (pitch and roll) while sacrificing the vertical control [14]. Compensation for loss of vertical control is achieved through the fly-to-trim velocity (FTTV) and rotor speed control (RSC) schemes. The FTTV works with the assumption that there is a longitudinal velocity that the helicopter can reach that will negate the loss in vertical velocity. This is not always practical CHAPTER 2. ADVANCES IN UAV FAULT-TOLERANT CONTROL 19 in confined spaces especially for unmanned helicopters [57]. The use of an optimal Kalman filter approach for the sensor and actuator fault accommoda- tion of unmanned systems is presented in [58]. The state covariance matrix is reconfigured through the removal of a detected faulty signal, although the authors admit that the compu- tational load of such a technique will increase while improving the state estimation accuracy. A traditional Proportional-Integral (PI) controller is updated by including a feedforward fil- ter to improve reference tracking response while minimising high-frequency dynamics. This method was tested on a time-invariant simulation model with a stuck actuator fault and demonstrated an increase in system stability. The above approach does not explicitly ad- dress the successful implementation of online parameter estimation for control reconfigura- tion under low excitation or the switching mechanism for controller gain tuning. The survey paper presented by Yu and Jiang [22] gives context to such issues as they play a part in the use of flight control reconfiguration in the various aerospace platforms. Nonlinear model predictive control (NMPC) has also been applied on unmanned fixed-wing aircraft for controller reconfiguration [59, 24]. The NMPC requires the solution of an opti- mal control problem which was achieved through a pseudo-spectral discretisation method. Thrust and elevator upper and lower constraints were specified and used as inputs in the controller design process with the engine loss as the induced fault. One major drawback of NMPC is that it requires repeated computation to find the solution to the finite predic- tion horizon optimisation problem in order to generate feedback inputs. This can become computationally expensive and impractical for online implementation. The issue of high computational cost incurred in the general NMPC problem is addressed for the real-time implementation of a MPC controller for the trajectory tracking of an unmanned quadrotor [45]. The full nonlinear dynamics were simplified by exploiting the natural high-gain of the propeller dynamics and the passive characteristics of the attitude dynamics resulting in a linear MPC problem through feedback linearisation. The controller was implemented and evaluated on a Pixhawk autopilot with commanded values transmitted from a ground sta- tion using radio waves. The mitigation of unfavourable switching transients during control reconfiguration and the prevention of healthy actuators from saturation was investigated in [60]. This was achieved through the adjustment of the control input by using the µ-modification technique. The latter implements a virtual safety bound around each remaining actuators by using a weight CHAPTER 2. ADVANCES IN UAV FAULT-TOLERANT CONTROL 20 factor combined with a saturation duration parameter (which is inversely proportional to the amplitude of the virtual bound). A finite-time control law was used to compensate the error between the faulty aircraft dynamics and the reference model. The state-space matrices were converted to filter states which were solved by computing an auxiliary integrated regressor matrix combined with a forgetting factor. The stability analysis of the closed-loop dynamics was performed and demonstrated that the error dynamics converge to zero while the system states are conserved in a convex set. Although this approach provides an improvement in controller performance while ensuring the safe operation of the remaining actuators, the issue of a-priori knowledge for the post-fault reference model was not addressed. Due to the persistent concern of the UAV safety and reliability for commercial operations, the development of a reconfigurable control system for unmanned aircraft based on a neural network direct adaptive controller was investigated in [61]. The methodology makes use of the NN architecture to provide online adaptation for the dynamic inversion problem. This is achieved through the neural network approximating the inversion error provided that the system matrix can be made into a Hurwitz matrix through the proper choice of posi- tive diagonal matrices by solving a Lyapunov function. The network structure made use of a single-layer of hidden neurons with a sigmoid activation function. Reconfigurable con- trol is achieved through the control allocation of the computed deflection commands. The combination of the genetic algorithms with the neural network structure, has been shown to optimise the gains of the quadcopter PID controller. This enabled the authors to address the issue of implementing non-deterministic methods in the context of UAV flight control certification by keeping the baseline controller architecture deterministic. The gain-scheduling control approach within the framework of H∞ synthesis was investi- gated in [62]. The issue of compensating for post-fault controller errors has been addressed by using a two-stage Kalman filter for simultaneous state and parameter estimation of a quadrotor UAV affected by actuator loss of effectiveness. The common gain-scheduling problem of storing numerous sets of lookup tables was mitigated by replacing them with parametrised polynomial functions. The tuning of controller gains, for a reduced schedul- ing scheme, was achieved through multi-objective offline H∞ optimisation routine which considered both time-domain and frequency-domain requirements. The reduction of tuning space was achieved through parametrisation of the gain surfaces. This reconfigurable con- trol method was tested against single and multiple abrupt actuator faults including single CHAPTER 2. ADVANCES IN UAV FAULT-TOLERANT CONTROL 21 incipient actuator fault. This method relies on the assumption that the post-fault model can be linearised given the nonlinear coupling effects are negligible and the real-time constraints of hardware memory are not violated. The combination of control allocation approach and weighted pseudo-inverse technique for UAV control reconfiguration has been presented in [63]. A simulation model with linear dy- namics for the blended wing UAV was developed which included various abrupt actuator faults such as floating deflector, loss of effectiveness and lock-in-place. The pseudo-inverse method makes use of the estimated control distribution matrix and a virtual control input vector. A weight factor was added in the minimisation of the cost function to improve the efficiency of the remaining control surfaces by preventing early saturation. The concept of attainable moment subset (AMS), which represents all the moments (roll, pitch and yaw) achievable using all the constrained controls, was used to evaluate the various control allo- cation techniques. Although this technique has a direct impact on the post-fault model con- trol effectiveness, it is unclear on the real-time performance of the reconfiguration scheme once nonlinear coupling effects have been taken into consideration and multiple optimisa- tion channels have to be considered. Although a reconfiguration scheme was not activated due to the occurrence of a fault, the de- velopment of a control allocation strategy for a tilt tri-rotor vertical take-off and landing UAV is relevant due to the robustness requirements with changing dynamics [64]. The autopilot architecture is developed through adopting a multi-loop structure. The faster inner-loop sta- bilises and controls the attitude dynamics while the slower outer-loop controls the position dynamics. A dynamic inversion-based control allocation is computed by synthesising the virtual control input through a sliding mode approach. To alleviate the chattering problem often found in sliding mode control, an exponential approach law with a saturation function was defined for both inner and outer loops. Performance analysis was achieved by examin- ing controller rejection to low-frequency disturbance which can be classified as a recoverable time-based incipient fault. Robustness against model parameter variations was also evalu- ated with the system remaining stable. Real-time constraints and the large number of tuning parameters, are some of the issues that will have to be addressed with this approach. Recently, an integral terminal sliding mode controller (ITSMC) that guarantees finite-time convergence for a quadrotor UAV suffering simultaneous actuator faults, exogenous distur- bances and actuator saturation was investigated in [12]. The control law was constructed CHAPTER 2. ADVANCES IN UAV FAULT-TOLERANT CONTROL 22 using parameters of the sliding surface such that the asymptotic stability could be proved by Lyapunov stability criteria. Given that not all system states are measured in practice, the ITSMC design makes use of a fuzzy state observer to estimate the unmeasured states. The fuzzy logic system output consists of a singleton fuzzifier, product inference engine and centre average defuzzifier which are used to compute an optimal parameter vector for non- linear dynamics approximation. Closed-loop asymptotic tracking of the desired trajectory in the presence of loss of effectiveness faults and saturation limits was proven by Lyapunov sta- bility criteria by augmenting the ITSMC control law. This design method was implemented in the inner-loop for attitude and altitude stabilisation while the outer-loop was based on a PID design for position control. 2.4 Integrated Fault-Tolerant Control (FTC) Over two decades ago, the issue of system safety and reliability was discussed in the con- text of a single module which contained the design methodology for the fault detection and robust control [65, 66]. It was concluded that the robustness of an FDD process can only be improved if the chosen method takes into consideration the complexity of the system being monitored and the stability margin of the closed-loop system. Due to hardware con- straints, the online controller reconfiguration mechanism required to define the approach as an active FTC was not considered which limited the application to industrial plants. A two-stage Kalman filter was proposed as a solution for estimating simultaneously the model faulty states and control effectiveness factors [67]. But this method still did not consider highly-coupled nonlinear dynamics and the complexity of implementing in a real-time envi- ronment. Zhang and Jiang investigated an integrated FDD and reconfigurable control system design approach [68]. A two-stage adaptive Kalman filter was used to perform fault identification and estimation of the state and control matrix for the reconfiguration of an eigenstructure as- signment controller. Control effectiveness factors were used as a measure to quantify faults entering control systems through actuators. It was found that the reconfiguration mecha- nism was activated when the average control effectiveness errors were below a threshold value. Reconfigurable proportional-integral (PI) controller is used to recover steady-state performance and reject unknown disturbances. The above approach was evaluated using a CHAPTER 2. ADVANCES IN UAV FAULT-TOLERANT CONTROL 23 linearised longitudinal vertical takeoff and landing (VTOL) aircraft model. A short transient response and small steady-state error were used as performance evaluation criteria although coupling effects present in a post-fault model were not considered. The implementation of a RC as part of a FTCS has mainly been done in isolation from the FDD scheme. Moreover the reconfiguration scheme once a fault has been diagnosed, is mod- ified with the assumption that the post-fault system is actually degraded hence the recon- figuration process assumes a more conservative route over-penalising system performance. An integrated design between the various subsystems is required for FTCS to operate in harmony and to recover the pre-fault system performance as much as possible. A robust integrated controller approach which makes use of the H∞ optimisation technique is shown in [69]. The four-parameter problem solution was achieved by specifying weight functions for the feedback control and diagnosis residual signals for actuators and sensors. This was applied to LTI models and validated through time simulations of a nonlinear model of the aircraft. No consideration of the reconfigurable nature of this approach was discussed. An H∞ output feedback control combined with an improved unknown input observer is proposed to address the issues concerning the integrated design of an active FTCS [34]. An adaptive fault identification scheme is implemented through an adaptive law with projec- tion mapping of the estimation parameter. The output control law in the H∞ sense does not require the convergence of the fault parameters given the adaptive fault parameters are up- dated based on the projection matrix. Simultaneous RC performance and accommodation of actuator faults was achieved by solving nonlinear matrix inequalities in a linear sense. The switching of controllers will only occur once the LMIs have been solved, which in the event the fault parameters do not converge or change suddenly could be catastrophic. This con- cept is tested in a simulation with a helicopter which suffers loss of actuator effectiveness at random values and time events. A neural network-based fault-tolerant scheme which made use of the implicit function the- orem is proposed in [70]. This made use of RBFNNs for the design of an adaptive RC. An integrated approach which combined a passive (robust) FTCS scheme and a threshold value switching logic to activate a simple active FTC scheme without an FDD component. The con- cept of a fault alarm threshold value was used to determine which controller should be used based on whether a fault was detected or not. The time delay due to fault location and clas- sification was not investigated and the system under test had a simple sinusoidal behaviour CHAPTER 2. ADVANCES IN UAV FAULT-TOLERANT CONTROL 24 with minimal cross-coupling effects after fault had occurred. It was conceded by the authors that such a method was applicable to a small subset low-order nonlinear systems. A few years later, the authors investigated the impact of fault detection time delays by adopting a controller switching mechanism once a fault is detected but not diagnosed [71]. Integration issues are identified and discussed in [22]. A problem that has been highlighted is that the various subsystems, in a typical active FTCS, are activated in a sequential manner thereby extending the time between when a fault has occurred and the RC issuing a com- mand to the actuators. One concept of an integrated FTCS design is to perform controller reconfiguration even with an imprecise post-fault model provided by the FDD scheme. But this is based on the online synthesis of the robust controller which is traditionally very slow and computationally expensive. It has been suggested that implementing an integrated de- sign also requires a trade-off between fault diagnosis accuracy and reconfigurable control performance. The use of a forgetting factor has been suggested to increase the speed of the FDD scheme with regards to a fault parameter estimation which in turn reduces the transient behaviour during the reconfiguration process. An integrated design fault detection and estimation and control system reconfiguration us- ing a robust control problem approach based on H∞ optimisation is proposed in [72]. The direct use of a fault estimation function without the need for a reconfiguration mechanism, results in an inclusive design of an observer for fault estimation and a sliding mode con- troller state/output feedback control. The authors suggested that there exists bi-directional uncertainties generated by (1) the model mismatch between the observer and the control sys- tem and (2) fault and state estimation errors, which substantiates the need for an integrated FTCS design process. This was based on a subset of systems with additive and multiplica- tive faults. Simulated results based on the stabilisation control of a DC motor was demon- strated. Although the above observations were not validated on UASs, the management of bi-directional uncertainties within an integrated FTC is worth noting. Adaptive sliding mode control (ASMC) is used in the design of a FTCS which could tolerate actuator failures by limiting the amplitudes and rates of the healthy actuators. This approach made the assumption that the remaining actuators could perform the same function as the failed ones which lends this method towards more passive FTC [60]. The use of H∞ and µ− synthesis controller without the need for reconfiguration or adaption was investigated. An integrated approach was introduced by adding a control redistribution algorithm using CHAPTER 2. ADVANCES IN UAV FAULT-TOLERANT CONTROL 25 fuzzy logic technique. This was heavily based on the assumption that a zero-delay fault detection system was already implemented. A similar approach was taken in Almutairi’s thesis where a fault compensation approach was added to the nominal LQR controller [73]. An H∞/µ synthesis approach combined with fuzzy logic was able to achieve reconfigurable control without a-priori knowledge of the post-fault model dynamics. The issue of bi-directional interactions between the fault estimator and the fault-tolerant controller was investigated by taking into consideration implementation factors for a real- time system [74]. The traditional separated approach in FTC synthesis is presented and compared with an integrated FTC design. The dynamic model of an uncertain nonlinear 3- DOF helicopter system with both actuator faults and saturation was used to demonstrate the degradation of closed-loop stability when an integrated FTC design is ignored. Simulated results show that a separated FTC design will exhibit slow transient response with large overshoot and long settling time driven by poor estimation performance. This can result in overall FTCS instability if the ignored system uncertainty caused saturation in the remaining healthy actuators. Although the above observations motivate for the use of an integrated approach, model-based fault observer will inherently increase the level of uncertainty given the unknown dynamics of a post-fault nonlinear system. Multiple identification model were developed to formulate an integrated framework for the fault-tolerant of unmanned systems in a formation flight geometry [75]. The nominal con- troller was designed using robust state feedback H∞ synthesis which incorporated aerody- namic uncertainties induced by close formation flight vortex effects. A set of RCs were de- signed for each type of actuator fault and a switching mechanism based on the minimisation of each controller cost function was adopted. Adaptive element was added to the reconfigu- ration mechanism such that inner (stabilisation) closed-loop system is asymptotically stable provided well-bounded error signal. The above approach assumes linear aircraft dynamics in the estimation of external disturbances and control inputs without making reference to the FDD mechanism and reconfiguration delays due to uncertain estimation errors below defined trigger threshold. In recent studies on FTCS, more focus has been placed on actuator faults rather than sensor faults given the latter will not modify the system’s dynamic response due to the latest flight controllers carrying redundant sensors at negligible cost and weight. The use of an optimisa- tion routine combined with the control allocation technique for an over-actuated aircraft with CHAPTER 2. ADVANCES IN UAV FAULT-TOLERANT CONTROL 26 actuator faults have been proposed in [76]. An optimisation in quadratic form was imple- mented to minimise the control effort of the remaining actuators and it is a flexible approach in system with a large number of effectors. A nonlinear dynamic inversion-based control law and a sliding mode observer were combined to compensate for the system nonlinearities and effective fault reconstruction. It was obvious from the results that fault reconstruction pro- cess introduced system noise which needed to be filtered in order for fault observer to trigger the control allocation mechanism. This issue of detection delays combined with systems with small time constants (such as under-actuated quadcopters), limits its application. An insightful study into the effect of FDD uncertainties on the robustness requirements for a RC has been presented in [77]. Such uncertainties will appear in the form of (1) false alarms (erroneous detection), (2) missed detection (positive fault occurrence) and (3) detection de- lays (time between fault occurrence and detection). Another source of disturbance is the reconfiguration mechanism (especially in switching techniques) inducing unrecoverable in- stability. An H∞/µ synthesis approach combined with an adapted DK-iteration is used to design a bank of robust controllers with the ability to compensate a subset of bounded ac- tuator faults which might be undetected. To minimise undesirable transient response of the closed-loop system during reconfiguration, an objective function which is minimised for the closed-loop is used to initialise system with an optimal initial state. Experimental validation achieved good results although a-priori knowledge of the post-fault model does not incorpo- rate coupling dynamics. 2.5 Identified Gaps in the Existing Literature • As stated by [28], the lack of a real-time application of knowledge-based FDD methods, specifically using artificial neural networks in unmanned aerial rotorcraft, is clearly ev- ident in the literature. Moreover, the function approximation capabilities of nonlinear systems, which embodies the behavioural pattern of a system at fault, is at the centre of neural networks’ capabilities. The main drawback in their application is the speed of adaptation, convergence and computational throughput especially in low-cost elec- tronics. • The development and real-time implementation of a learning alogrithm and simpler network architecture, such as the extended backpropagation algorithm and a RBFNN CHAPTER 2. ADVANCES IN UAV FAULT-TOLERANT CONTROL 27 respectively for FDD of a miniature unmanned rotorcraft has not been investigated and is a focal point in this research. • The investigation of various actuation and sensor faults for unmanned rotorcraft have been investigated in various forms [28] for the purpose of reconfigurable control. How- ever, an integrated approach which takes into account the use of fault accommodation controllers and RCs has yet to be investigated for unmanned rotorcraft without a-priori knowledge or assumption of the post-model dynamics. • The use of a neural-network parameter estimation approach based on system identifi- cation manoeuvres, which has been shown to be successful in the online estimation of aerodynamic parameters [78], to detect actuator fault information necessary for online controller reconfiguration, has not been investigated and is another focal point in this research. 2.6 Research Problem and Research Question The application of FTCSs on miniature unmanned rotorcraft has far reaching implications on their safety and reliability given their increasing operation in populated areas and the scalability of their technologies on manned rotorcraft. Currently, this area of research still requires further exploration. Unlike fixed-wing aircraft and large-scale helicopters, minia- ture rotorcraft exhibit higher thrust-to-inertia ratios making them more agile and requiring high-bandwidth control effort [14]. And yet, successful control techniques can be easily ap- plied to their manned counterparts. A combination of theoretical and experimental research is deemed essential to demonstrate the potential of such systems. 2.6.1 Problem statement Unmanned rotorcraft (specifically quadcopters) are inherently unstable and have a complex electrical/electronic architecture. This makes their applicability in an urban environment almost impossible without some form of intelligent control. There has been efforts to apply fault-tolerant control methodologies to address this problem but the focus has been either on controller reconfiguration or FDD. Investigation into an integrated fault-tolerant approach has been limited in the literature. The task is to develop a neural network-based integrated CHAPTER 2. ADVANCES IN UAV FAULT-TOLERANT CONTROL 28 FTCS that will improve the stability and mission success of an unmanned rotorcraft in the presence of actuator faults. 2.6.2 Research questions Does the development of an integrated FTCS neural network-based approach have the po- tential to be easily implementable on different configurations without the need for excessive fault controller redesign and for accurate mathematical models? Can such a system prove to enhance robustness and minimise performance degradation while being more forgiving in the identification of specific faults given its ability to approxi- mate the faulty nonlinear behaviour of system in question? Will the adoption of such a system be able to increase the capability and reliability of un- manned rotorcraft systems in various tasks such as: border patrol, traffic monitoring, search and rescue, power line inspection and broadcasting of mobile telecommunication within a dynamic environment? 2.7 Research Objectives The main objective of this research is to investigate the use of a neural network-based inte- grated FTCS to improve the resilience of an unmanned miniature rotorcraft in the presence of faults, with specific focus on incipient actuator faults. The following sub-objectives are applicable: • To develop the dynamics of a miniature unmanned quadrotor in the presence of incip- ient actuator faults. • To develop and test a quadrotor hardware and software system with the capability of evaluating incipient actuator faults models and FTC algorithms. • To synthesise a neural network-based integrated FTC architecture for an unmanned aerial rotorcraft. CHAPTER 2. ADVANCES IN UAV FAULT-TOLERANT CONTROL 29 • To quantify the robustness and performance of such an integrated neural network- based FTCS within real-time constraints. CHAPTER 2. ADVANCES IN UAV FAULT-TOLERANT CONTROL 30 2.8 Research Methodology The methodology followed in this thesis is derived as means to achieve the research objec- tives described in Section 2.7. Given that the identification of incipient actuator fault models is required for the simulation of a high-fidelity quadrotor model, the acquisition or devel- opment of a quadcopter hardware platform with adaptable flight controller software is a requisite. Moreover, such a flight controller software should be able to evaluate the effectiveness and suitability of the developed FTC algorithms both within a real-time environment and through offline analysis. The software tools should also be flexible enough to assess the individual parts of a FTCS and the integrated FTC architecture. 2.8.1 Research platform In order to study the underlying dynamics of quadcopter post actuator fault, the physical model will have to be studied including the impact of each part on the overall behaviour. The acquisition of a flight test vehicle could ensure this is possible. Given the objective for a demonstration flight test vehicle (FTV), the following requirements have been identified: • The generation of flight data from the FTV shall be largely automated as far as possible with minimal human interaction (apart from take-off and landing). • The FTV shall incorporate (analytical or hardware) redundancy systems on both critical sensors and actuators to ensure the safety during the flight testing campaign. • The FTV shall be in the case of a rotorcraft. • The FTV shall have a take-off weight of 900 grams to 2 kg. • The FTV shall have a maximum main rotor diameter of 1 metre (in the case of a rotor- craft). • The FTV shall make use of ground control station if necessary. • The FTV shall have transmitter manual override capability. • The complete FTV system shall cost not more than R10000. CHAPTER 2. ADVANCES IN UAV FAULT-TOLERANT CONTROL 31 An unmanned rotorcraft with an off-the-shelf flight control software (such as ArduCopter) shall be used as a risk-reducing platform for all new-algorithms after code verification and validation in desktop simulation and hardware-in-the-loop simulation has been performed. 2.8.2 Flight test instrumentation The collection of data to perform various data-driven development activities will enable a better understanding of the underlying system dynamics. A flight instrumentation system could be used to ensure the data collection is repetitive and free from measurement glitches. The following design requirements specifications for a flight test instrumentation system is recommended: 1. The instrumentation system shall be able to capture complete flight vehicle state infor- mation as specified. 2. The instrumentation system shall be effective in the isolation of flight-induced vibra- tions. 3. The instrumentation system shall accommodate both automatic and manual control of the flight vehicle. 4. The vehicle shall be able to transport the full-suite of instrumentation and have enough power capacity to perform aggressive manoeuvres such as circuits and pirouettes. 5. The instrumented vehicle shall be able to obtain uninterrupted data for minimum pe- riod of 120 seconds. 6. The instrumented vehicle shall have a maximum Take-Off Weight (TOW) of 2kg in any configuration. 7. The instrumented vehicle shall have minimum electronics noise and interference caused by poor grounding and electromagnetic interference. The Pixhawk PX4 2.4.8 32-Bit ARM Flight Controller is potentially the most suitable can- didate to be integrated while meeting most of the requirements. The APM 2.6 Mega flight controller could also be considered because of its smaller size, weight and cost. CHAPTER 2. ADVANCES IN UAV FAULT-TOLERANT CONTROL 32 2.8.3 Flight test campaign design The identification of the underlying dynamics of a highly-nonlinear system such as quadro- tor requires exposing such a model to various conditions that will enable a better assessment of the chosen fault-tolerant methods. Such conditions can be compiled into flight testing or simulation plan that will be ensure adequate exposure of the underlying dynamics of phys- ical model. The requirements to meet the objectives of a flight test/simulated FTCS concept is given below: • The following flight conditions shall be attained during the triggering of the FTCS: – Hover 20m above ground. – Forward speed (GPS measured) of 10 m/s – Forward speed (GPS measured) of 20 m/s • Pre-flight and post-flight checks shall be developed and implemented for each flight. • The video recording shall be used either on-board the FTV or on the ground. If on- board, it should be of minimal weight and size. • The flight test campaign shall be done outdoors and within the confines of a 100m x 100m flight testing field. This is to illustrate confined urban spaces. • Post data filtering shall be performed if necessary. • All data analysis shall be done using an industry-standard software (MATLAB). • A constrained environment which will minimise the number of crashes without com- promising the flight test objectives should be investigated. • Investigation into using flight data to perform online system identification for the pur- pose of verifying the mathematical model, will be performed. 2.8.4 Development and implementation of an integrated fault-detection and di- agnosis scheme A critical component to a FTCS is its ability to detect, isolate and identify a set number of faults. An integrated FTCS design can be achieved provided such a routine exist and CHAPTER 2. ADVANCES IN UAV FAULT-TOLERANT CONTROL 33 operates within a real environment. The following requirements for such a routine can be specified: • The fault detection algorithm shall be implemented into a microprocessor and executed in real-time without data overload. • The fault detection algorithm shall be able to detect, identify and time-stamp the fault that occurred. • The following faults shall be investigated: rotor speed failure, propeller slippage fail- ure, broken propeller failure. • The following sensor faults shall be investigated: sensor bias and multiplicative faults (both accelerometer and gyroscope). • The following types of fault detection schemes shall be tested: two-stage adaptive Kalman filter, a novel RBFNN-based parameter estimation scheme. • The following neural network architectures shall be investigated: RBFNN and MLPNN. Note: The implementation of the FDD scheme will largely depend on the real-time perfor- mance requirements of the developed algorithms. Proposed integrated FTCS architecture Figure 2.3 shows a possible concept for a neural network-based integrated approach to fault- tolerant control. The premise behind the design is that online learning happens simultane- ously for the neural network-based controller and fault estimator. The outputs from the fault estimator, in the form of weight and biases, are used in a reconfiguration mechanism to de- termine the augmentation factors required for the controller to reconfigure for augmented control inputs in the event a fault has occurred. CHAPTER 2. ADVANCES IN UAV FAULT-TOLERANT CONTROL 34 Figure 2.3: Proposed structure of an integrated FTCS. 2.9 Requirements for the Development and Implementation of the Reconfigurable Mechanism and Controller The successful reconfiguration of a controller is an important aspect of system stability and performance. Given that it will form part of an integrated FTCS architecture, the following requirements can be specified: • The controller reconfiguration algorithm shall be implemented on a microprocessor and executed in real-time without data overload. • Actuator control signal reallocation shall be investigated. • The reconfiguration and switching logic of the nominal controller shall be investigated only based on the design outcome of the fault detection algorithm. • The following types of controller reconfiguration schemes shall be tested: reconfig- urable PID controller, a novel neural network-based adaptive controller. • The following neural network architectures shall be investigated: RBFNN. CHAPTER 2. ADVANCES IN UAV FAULT-TOLERANT CONTROL 35 2.10 FTCS Hardware-in-Loop System Hardware-in-the-loop-simulation (HILS) is a well known process applied during the test and evaluation of complex systems [79]. The main reason for requiring a Hardware-in-Loop System (HILS) system is to test and evaluate the performance of the FTCS given that real- time simulation introduces computational delays and signal discretisation which negatively affect the robustness and performance of the controller. HILS can also act as a cost-effective verification gate prior to commencing flight testing. The implementation requirements for a HILS system are as follows: 1. A microprocessor card(s) with floating-point capability shall be used. This will host the fault-tolerant control embedded algorithms and state logic. 2. A sampling time (for the controller and plant dynamics) from an Input/Output card shall be at least 50 Hz. 3. A transmitter shall be incorporated into the HILS environment and its Pulse Width Modulation (PWM) signals captured with a sampling rate of 50 Hz. This is required to evaluate the design of a flight plan procedure required to perform an autonomous mission. 4. The emulation of GPS and IMU sensors shall be performed on a HILS interface board. It will be investigated at what level of complexity this emulation will need to be per- formed. 5. The transmission data to the on-board computer shall be in the native format of the respective microprocessor hardware. This is vital to ensure the embedded software in the microprocessor is compatible with flight test data. 6. The communication protocol shall be synchronous serial communication, such as AR- CNET/CAN, or asynchronous serial with a baud rate of at least 9600 bits/per second. This is required to prevent additional delays. 7. A UART/serial link shall be used for the GPS transmission/emulation. CHAPTER 2. ADVANCES IN UAV FAULT-TOLERANT CONTROL 36 2.11 Criteria of Verification and Validation The following verification and validation (V & V) criteria will be used for the FTCS algo- rithms developed: • Demonstrate FTCS robustness and performance (in classical control theory terms: at least 3dB gain margin and 35 deg phase margin throughout the reconfiguration transi- tion period). • Demonstrate overall FTCS stability. • Demonstrate command tracking (trajectory or acceleration tracking). • Demonstrate recovery of attitude control (regulation control). • Assess the effectiveness of measurements to quantify the occurrence of actuator, sensor or systems faults within the hardware-in-loop simulation environment. • All the above metrics shall be implemented in a nonlinear 6DOF desktop and HILS simulation model. 2.12 Envisaged Contributions to Knowledge The following contributions are envisaged as a result of undertaking this research: • A better understanding of the dynamic behaviour of a highly manoeuvrable and un- stable nonlinear system, such as a miniature rotorcraft in the presence of faults during an autonomous mission. • The design and implementation of a learning algorithm, applied to both fault detection and control recon