Quadrotor Flight in Constrained Indoor Environments

by

Antonio Matus-Vargas

Dissertation submitted in partial fulfillment of the requirements for the degree of Doctor of Science in Computational Science at the Instituto Nacional de Astrof´ısica, Optica´ y Electr´onica Tonantzintla, Puebla, M´exico November, 2020

Supervisors:

Dr. Gustavo Rodr´ıguez G´omez Dr. Jos´eMart´ınez Carranza Coordination of Computational Science INAOE

c INAOE 2020 All rights reserved

The author hereby grants to INAOE permission to reproduce and to distribute copies of this thesis document in whole or in part. 2 Quadrotor Flight in Constrained Indoor Environments by Antonio Matus-Vargas

Submitted to the Coordination of Computational Science on November 26, 2020, in partial fulfillment of the requirements for the degree of Doctor of Science in Computational Science

Abstract

Nowadays, advances in sensor, actuator, and processing technologies have permitted to shrink rotorcraft down to a micro-scale. Thanks to their hovering capability and high maneuverability, micro rotorcraft, classified as micro aerial vehicles (MAVs), are well suited for operating within constrained indoor environments. The autonomous navigation of these vehicles in such environments is a challenge for two main reasons. First, due to payload and energy restrictions, a MAV is equipped with the least quantity of sensors. Second, operation within a constrained environment will place a MAV close to objects, which will induce aerodynamic interactions. The most studied aerodynamic interaction is the ground effect, which can be explained as the cushion of air under the vehicle when it flies closely over a rigid surface. In this thesis, we propose a novel approach for rejecting disturbances induced by the ground effect. To retrieve the position of the vehicle, we employ a monocular camera, which is a lightweight and energy-efficient sensor. Also, we provide experimental evidence that theground effect induces sensor faults. For that reason, we develop the approach asafault- tolerant control scheme, which consists of a detection strategy and mitigation strategy. We assume a hierarchical control structure for trajectory tracking. Specifically, we assume that the nominal control structure consists of an external PD controller and an internal PI controller. In experimental tests, we found that the sensor faults occur on the inner loop, which we counteract in the outer loop by switching between control actions. In a novel approach, we use a metric monocular SLAM algorithm for detecting internal faults. We design the fault detection scheme as a logical process that depends on the weighted residual between inner and outer estimations. Furthermore, we propose two control strategies for fault mitigation. The first combines the external PD controller and a function of the residual (FTC 1). The second treats the sensor fault as an actuator fault and compensates with a sliding mode action (FTC 2). In either case, we utilize onboard sensors only. We evaluate the effectiveness of the strategies in simulations and experiments. The experimental results show that FTC 1 surpasses FTC 2. Finally, we explore the usage of optical flow estimations for the detection and mitigation of the ground effect.

3 Thesis Supervisor: Dr. Gustavo Rodríguez Gómez Title: Full Researcher and Associate Professor

Thesis Supervisor: Dr. José Martínez Carranza Title: Full Researcher and Associate Professor

4 Acknowledgments

The completion of this thesis would not have been possible without the help of a large group of people. First, I would like to extend my deepest gratitude to my supervisors, Gustavo Rodríguez Gómez and José Martínez Carranza. I am grateful to Gustavo for bringing order out of the chaos of my research ideas and for all the superb advice. I thank José for the great discussions, which helped me to develop and explain my research both in spoken and written form. Also, I would like to express my appreciation to all members of my committee for their valuable comments that enhanced this thesis. In my work, I have received invaluable support from Oyuki Rojas Perez, Aldrich Cabrera Ponce, Arturo Cocoma Ortega, David Carrillo López, and Roberto Munguía Silva. Furthermore, I am deeply indebted to my parents, aunt, brother, and sister for always being there for me; and to my friends for the good times over the years. Finally, I have to admit that I lack the poetic skills to express, in a suitable way, my gratitude to Kristel, my fiancée. She always brightens up my day and hopefully will do so for years to come. This research has been funded by the Consejo Nacional de Ciencia y Tecnología (Conacyt), in the framework of the Programa Nacional de Posgrados de Calidad (PNPC) as a scholarship registered to the CVU number 540945. Also, I gratefully acknowledge financial support over the final months by the Instituto Nacional de Astrofísica, Óptica y Electrónica (INAOE).

5 6 Contents

1 Introduction 19 1.1 Justification and Motivation ...... 21 1.2 Problem Statement ...... 23 1.2.1 Research Questions ...... 23 1.2.2 Hypothesis ...... 23 1.3 Objectives ...... 24 1.4 Research Methodology ...... 24 1.5 Contributions ...... 25 1.5.1 Publications ...... 27 1.6 Thesis Outline ...... 28

2 Theoretical Framework 29 2.1 Multirotor UAVs ...... 29 2.2 Hardware ...... 30 2.3 Quadrotor Concepts ...... 34 2.4 Attitude Representations ...... 35 2.4.1 Rotation Matrix ...... 36 2.4.2 Euler Angles ...... 39 2.4.3 Quaternions ...... 41 2.4.4 Rotation Vector ...... 44 2.5 Control Systems ...... 45 2.6 SLAM ...... 47 2.6.1 Metric Monocular SLAM ...... 49

7 2.7 Optical Flow ...... 50 2.8 Deep Learning ...... 53 2.8.1 Convolutional Neural Networks ...... 55

3 Literature Review 59 3.1 Full-scale Helicopter ...... 59 3.1.1 Hovering Flight ...... 59 3.1.2 Forward Flight ...... 62 3.2 Model Helicopter ...... 65 3.2.1 Control ...... 65 3.2.2 Flow Studies ...... 66 3.2.3 Modeling ...... 67 3.3 Multirotor ...... 68 3.3.1 Control ...... 69 3.3.2 Modeling ...... 75 3.3.3 Applications ...... 85 3.4 Other Proximity Effects ...... 86 3.5 Discussion ...... 88 3.6 Chapter Conclusion ...... 90

4 Control Optimization 93 4.1 Deterministic Procedures ...... 94 4.1.1 Related Work ...... 95 4.1.2 Quadrotor Model ...... 96 4.1.3 Mathematical Problem ...... 97 4.1.4 Conjugate Gradient Methods ...... 99 4.1.5 Optimal Control ...... 101 4.1.6 Controllers Implementation ...... 102 4.1.7 Results and Analysis ...... 105 4.1.8 Summary ...... 107 4.2 Stochastic Procedure ...... 108

8 4.2.1 Background on Multirotor Control ...... 109 4.2.2 Multirotor Model ...... 110 4.2.3 Position Control Algorithm ...... 112 4.2.4 Attitude Control Algorithm ...... 113 4.2.5 Cost Function ...... 114 4.2.6 Stochastic Test Signals ...... 116 4.2.7 Results and Analysis ...... 118 4.2.8 Summary ...... 122 4.3 Ground Effect Simulation ...... 123 4.3.1 Optimization with Reduced Vehicle Model ...... 123 4.3.2 Optimization with Full Vehicle Model ...... 125 4.4 Chapter Conclusion ...... 127

5 Discontinuous Control 129 5.1 Multi-controller Structure ...... 129 5.1.1 Drone Overview ...... 131 5.1.2 Proposed Control Structure ...... 132 5.1.3 Experiments ...... 136 5.1.4 Summary ...... 140 5.2 Fault-Tolerant Control ...... 141 5.2.1 Related Work ...... 142 5.2.2 Methods and Materials ...... 144 5.2.3 Results and Discussion ...... 154 5.2.4 Summary ...... 162 5.3 Optical Flow and GE ...... 163 5.3.1 Dataset ...... 164 5.3.2 Training ...... 165 5.3.3 Detection Results ...... 167 5.3.4 Focus of Expansion ...... 168 5.4 Chapter Conclusion ...... 170

9 6 Conclusion 173 6.1 Answers to the Research Questions ...... 174 6.2 Hypothesis and Objectives Assessment ...... 175 6.3 Limitations and Future Research ...... 176

10 List of Figures

1-1 Qualitative schematic view of flow vectors. The pressure above the

vehicle is indicated as 푃푎, the pressure below as 푃푔, and the net force

due to the ground effect as 푓푒...... 22 1-2 Outline of the research methodology...... 25

2-1 UAV classification, based on [56]...... 30

2-2 Main components of a quadcopter...... 31

2-3 Common quadrotor configurations ( view), a) “x” style, b) “+” style. 34

2-4 Degrees of freedom of a quadrotor...... 35

2-5 Block diagrams of a) the open-loop and b) the closed-loop control sys- tems...... 46

2-6 Architecture of a typical SLAM system. The back end can provide feedback to the front end for loop closure detection and verification. . 48

2-7 Geometric configuration to generate the synthetic depth image. . 49

2-8 Snapshots that illustrate the functioning of the metric monocular SLAM; the top row provides samples from camera frames with the tracked fea- tures (green markers); the bottom row displays three views of the map with keyframes (blue pyramids, the first one is green), and map points (red ones are being used for tracking, while black ones are ignored). . 50

2-9 Two visualization techniques of the motion field transforming 퐼1 in 퐼2 [49]...... 52

2-10 A simple CNN architecture, comprised of four layers...... 56

11 3-1 Increase in rotor thrust versus distance from the ground for a variety of helicopters [109]. The legends OH-6A, OH-58A, UH-1H, and UH-1C are codenames for full-scale helicopters...... 60 3-2 Measurements and predictions of rotor power versus forward speed when operating near the ground [109]...... 63 3-3 The flow patterns for a fan in GE represented as a source (a)anda dipole (b) [82]...... 68 3-4 Modeling and mapping of aerodynamic effects acting on a single rotor [172]...... 77 3-5 Two flight cases for testing the influence of the ground in multirotors, (a) flying over an obstacle under the influence of the ground, and(b) hovering at a point with only one rotor under the influence of the ground (partial GE) [168]...... 81 3-6 Problems, trends, and challenges...... 88

4-1 Performance of the tuned PD controller: (a) approximated gradient, (b) analytic gradient...... 106 4-2 States behavior when subjected to the optimal control functions. The inner figure shows the same function performance zoomed in between the time interval 0 s to 0.6 s...... 106 4-3 Cascade control scheme for multirotors...... 110 4-4 Simulation diagram for a quadcopter with torque disturbance. . . . . 118 4-5 Performance of the controllers tuned with deterministic signals: (a) PID, (b) backstepping...... 119 4-6 Performance of the backstepping controller tuned with stochastic test signals...... 120 4-7 Communication/computation structure for flight tests...... 122 4-8 Experimental performance of the tuned backstepping controller: (a)

position, and (b) Euler angles. The set-points were set to (푥ref , 푦ref ,

푧ref , 휓ref ) = (0 m, 0 m, 0.4 m, 0 rad)...... 123

12 4-9 Simulation results of the optimized backstepping controller with similar initial conditions and same set-points as in Fig. 4-8: (a) position, and (b) Euler angles...... 123 4-10 Performance of the PD controller tuned with stochastic ground effect simulation: filtered stochastic signals (a), states behavior (b). For(b),

the references are (푧ref , 휑ref , 휃ref , 휓ref ) = (1 m, 0 rad, 0 rad, 휋/6 rad). 125 4-11 Performance of the backstepping controller tuned with the ground ef-

fect model (3.13). The references are (푥ref , 푦ref , 푧ref ) = (1, 1, 0.35) m...... 126 4-12 Performance of the backstepping controller tuned with the wall effect

model in [158]. The references are (푥ref , 푦ref , 푧ref ) = (1, 1, 1) m. . . . 127

5-1 Quadrotor and reference frame...... 131 5-2 Quadrotor with inner stabilization system...... 132 5-3 Multi-controller switching structure...... 134

5-4 Entrance and departure conditions for 푢2...... 134 5-5 Structure of the integration constants...... 136 5-6 Bebop 2 drone during a test...... 138 5-7 Response of the multi-controller structure...... 139 5-8 Response position for five runs where the quadrotor is tracking acon- stant reference that is close to the ground: multi-controller structure (top) vs classical controller (bottom)...... 140 5-9 Fault-tolerant control schematic...... 149 5-10 Position response while hovering close to the ground...... 156 5-11 Photographs showing the quadrotor in three conditions: a) faultless, b) descending due to an upward sensor fault, and c) ascending due to a downward sensor fault; we indicate the reference with a green line; for supplementary video check https://youtu.be/uszilXBFKP4... 157 5-12 Simulation response of three control strategies...... 158 5-13 Control actions of three control strategies in simulation...... 159

13 5-14 Error response of the control strategies for five tests with the real drone.160 5-15 Sensor, reference, and fault detection signals for individual tests. . . . 161 5-16 Control signals for individual tests...... 162 5-17 Side view of the conditions of the flight tests in which the quadrotor passes over a table, the GE causes an upward disturbance...... 165 5-18 Training and validation results of the top three neural network archi- tectures: (orange) 1-conv-32-nodes-0-dense, (green) 2-conv-32-nodes- 0-dense, and (magenta) 2-conv-32-nodes-1-dense...... 166 5-19 Architecture of the convolutional neural network for detecting the ground effect...... 167 5-20 Qualitative results of the detection scheme. Eight forward-in-time frames ordered from left to right and up to down...... 168 5-21 Qualitative results of the algorithm to estimate the FoE using trajec- tories of interest points [59]. Twelve forward-in-time frames ordered from left to right and up to down, in which the intersection of the lines represent the FoE location...... 169 5-22 Quantitative results of the estimations of the FoE’s vertical location. 170 5-23 Envisaged control scheme based on optical flow...... 170

14 List of Tables

3.1 Control strategies presented in the literature...... 76 3.2 Classification of the ground effect models...... 85

4.1 Variable description...... 98 4.2 Parameter description...... 98 4.3 Optimal control parameters and cost function values...... 105 4.4 Summary of typical control problems and cost functions [128, 98]. . . 115 4.5 Simulation parameters...... 119 4.6 Optimization results with deterministic and stochastic test signals. . . 120

5.1 API inputs of the Bebop 2 quadcopter...... 132 5.2 Parameter values for the switching algorithm...... 138 5.3 Height error statistics comparison between a classical controller and the proposed multi-controller structure...... 139 5.4 Root mean square error of the control strategies in simulation. . . . . 159 5.5 Root mean square error of the strategies with the real drone...... 161

15 16 Acronyms

ANN Artificial Neural Network.

API Application Programming Interface.

BET Blade Element Theory.

CFD Computational Fluid Dynamics.

CG Conjugate Gradient.

CM Center of Mass.

CNN Convolutional Neural Network.

ESC Electronic Speed Controller.

FoE Focus of Expansion.

GE Ground Effect.

IESO Integral Extended State Observer.

IMU Inertial Measurement Unit.

IVP Initial Value Problem.

LQR Linear Quadratic Regulator.

MAV Micro Air Vehicle.

17 MoCap Motion Capture.

MRAC Model Reference Adaptive Control.

NDO Nonlinear Disturbance Observer.

PID Proportional-Integral-Derivative.

QTR Quad TiltRotor.

ReLU Rectified Linear Unit.

RGB Red-Blue-Green.

RISE Robust Integral of the Sign of Error.

RMSE Root Mean Square Error.

RQ Research Question.

SDK Software Development Kit.

SLAM Simultaneous Localization and Mapping.

SMC Sliding Mode Control.

UAV Unmanned Aerial Vehicle.

VTOL Vertical Take-Off and Landing.

18 Chapter 1

Introduction

Humankind has been fascinated by flight since it first observed animals sailing through the air and wondered how they do it. Ancient peoples had a passionate interest in flight, which led them to create stories about gods, demigods, creatures, andobjects endowed with this gift. In particular, the concept of taking off vertically, moving to the destination, and landing vertically has been for centuries the dream of inventors. It is the most logical form of flight because it dispenses with large landing fields located far from city centers [20]. The history of vertical flight can be traced back to about 400 BC with flying toys [86]. The earliest version of the bamboo-copter or Chinese top consisted of a stick with feathers on top, which was spun with the hands and then released into flight. It was not until 1483, when Leonardo da Vinci conceived his design ofthe aerial screw, that any record was made concerning vertical flight. From the 1700s to the 1800s, inventors developed several helicopter models using either elastic energy or steam power. Around 1900, the internal combustion engine became available and made possible human-carrying flight [109]. By 1950, the production of the Sikorsky R-4 helicopter had already finished and the Bell 47 was being mass-produced. Today, the use of rotorcraft has grown widespread in applications such as transportation, search and rescue, disaster relief, construction, and law enforcement. There is a clear connection between the development of flying machines and Un- manned (unhabitated or uncrewed) Aerial Vehicles (UAVs), commonly known as

19 drones. Nikola Tesla deserves credit for having fathered the concept of controlling vehicles without wires [136]. In 1898, Tesla filed his patent US613809A, which he publicly demonstrated with his teleautomaton, a remote controlled one-meter-long boat. Because of the possible military applications, a growing interest in remote controlled vehicles emerged in various countries. The first successful flight by a pow- ered uncrewed airplane occurred in 1918, when a Curtiss-Sperry Aerial Torpedo flew 900 m and then dived at its preset distance into the water [32]. It was recovered and later re-flown. During the 1930s, similar efforts took place to achieve thefirst radio-controlled model airplane. In contrast, the world’s first unmanned helicopter, the Gyrodyne QH-50 DASH (Drone Anti-Submarine Helicopter), appeared until 1960 [92].

Since the 1990s, the development of sophisticated rotorcraft UAVs has rapidly become an attractive research topic in the academy worldwide. In 1991, the first international aerial robotics competition was held at Georgia Institute of Technology. The military also manifested interest in the topic. A multi-year, 35-million-US-dollar program was launched by DARPA (Defense Advanced Research Projects Agency) in 1997, directly aiming to develop Micro Air Vehicles (MAVs) whose largest dimension was set to be at most 15 cm. This initial effort ended in 2001, demonstrating that, over the short run, a 15 cm UAV was simply too small to be workable. Attention was then shifted to larger miniature UAVs, and the MAV nomenclature was redefined for UAVs weighing less than 1 kg and operating at Reynolds numbers1 in the range between 102 and 104 [120].

Nowadays, advances in sensor, actuator, and processing technologies have permit- ted to shrink rotorcraft down to a micro-scale. Thanks to their hovering capability and high maneuverability, rotorcraft MAVs are well suited for search and rescue, re- mote inspection, and aerial photography and videography. Further to this, their small size allows them to operate within confined or cluttered indoor environments that are otherwise inaccessible to larger aircraft. A micro rotorcraft operating in a confined en-

1The Reynolds number (Re) helps foresee the patterns in fluid’s behavior; at low Reynolds num- bers, flows tend to be laminar, while at high Reynolds numbers flows tend to be turbulent.

20 vironment will be subject to disturbances induced by aerodynamic proximity effects. Such disturbances are likely to affect the stability and performance.

1.1 Justification and Motivation

Research on MAVs is a growing area of interest that is being conducted by industries, governments, and universities around the world. MAVs are of interest due to their potential of performing a wide range of civilian and military missions. Specifically, the main advantage of micro and small rotorcrafts over larger aircraft and ground robots is that they can access confined environments such as corridors, air ducts, collapsed spaces, and between buildings. Operation within such environments will require the drone to fly close to objects. The autonomous flight of MAVs indoors is still a challenge in the robotics com- munity for several reasons. First, due to payload and energy restrictions, a MAV is equipped with the least quantity of sensors. The minimal sensor suite for autonomous navigation has been reported to be a monocular camera and an Inertial Measurement Unit (IMU) [74, 113]. However, it is common that a MAV is also equipped with sen- sors for measuring altitude. Second, most research on MAV control has concentrated on handling dynamics when operating in free space, where aerodynamic interactions with nearby surfaces can be neglected [21, 146]. Although aerodynamic effects are mentioned in some works, most of them treat these interactions as random distur- bances, which the control must compensate using feedback. One of the most studied aerodynamic interactions is the Ground Effect (GE), which is the upward lift caused by compressed air beneath the vehicle, as shown in Fig. 1-1. Such effect induces disturbances that are difficult to handle even for tele-operated drones that are inline of sight. The GE has been well researched for helicopters [26, 68, 108]. For multirotors, em- pirical models have been developed [141, 167]. Furthermore, several control schemes have been proposed for compensating the GE in multirotors such as adaptive [106], fuzzy [122], and sliding mode [141]. Many of these techniques yield controllers with

21 (a) Normal (b) Ground effect

Figure 1-1: Qualitative schematic view of flow vectors. The pressure above the vehicle is indicated as 푃푎, the pressure below as 푃푔, and the net force due to the ground effect as 푓푒. open parameters that need to be tuned so that the closed-loop system describes the desired behavior. As a promising solution, optimization methods have been applied for controller tuning. However, optimization methods have not been explored in the control of the GE. Besides the increment in thrust efficiency, the GE causes variations in the pressure altitude measured by barometers [130] and in the distance measurements from range sensors [64]. The first type of sensor is affected by the air pressure around the vehicle. In general, the second type of sensor is affected by abrupt changes on the measurement surface, and some of them by turbulence. Even though several control schemes have been proposed for compensating the GE, most of them have only considered the case in which there are no faults in the rotorcraft. Taking into account faults could be fundamental to explain and control GE disturbances. By multirotors, we refer to rotorcraft with two or more lift-generating rotors. Within this classification, one of the most popular platforms is the quadrotor or quadcopter, a four-rotor helicopter. It is constructed with fixed-pitch propellers and motors mounted over a symmetrical cross-like frame. The movement of the quadrotor is controlled by the throttle in each motor. They possess the ability of omnidirectional movement and a mechanically simple structure, which in turn makes them low-cost. There has been extensive research about the quadrotor, making it an excellent test- bed for novel control techniques. Being able to control a quadrotor MAV near the

22 ground will improve well-known flight missions like hovering, picking-up and releasing objects, taking-off and landing in hard conditions, and operating near the groundin general.

1.2 Problem Statement

In this thesis, we formulate the following problem statement: The quadrotor MAV is disturbed when flying close to the ground within a constrained indoor environment. Here, the adjective “indoor” has two connotations: no GPS signal, and negligible environmental wind. In addition, the environment is constrained, which implies a high risk of collision with adjacent objects. We assume that the vehicle is equipped with an onboard monocular camera, an IMU, and an altimeter.

1.2.1 Research Questions

To gain good insight into the problem statement, we focus on three main Research Questions (RQs):

RQ 1: How can the ground effect be detected autonomously using the least quantity of onboard sensors?

RQ 2: How can unreliable sensors be compensated when the vehicle is flying subject to ground effect?

RQ 3: How can the ground effect be interpreted such that this interpretation canbe exploited to mitigate the ground effect?

1.2.2 Hypothesis

We hypothesize that an onboard monocular camera could provide enough information for detecting and mitigating disturbances induced by the ground effect in confined spaces.

23 1.3 Objectives

The general aim of the research is to design and implement a novel algorithm for reducing the control error of a quadrotor flying subject to ground effect. Particular objectives are:

To design a strategy to detect the GE using the minimum set of sensors on ∙ board the drone.

To carry out an analysis to characterize sensor faults occurring in GE and a ∙ strategy to mitigate such faults.

To propose a method to translate or map the detection of the GE into rules of ∙ compensation, aiming at achieving stable flight.

1.4 Research Methodology

We address the problem statement and the three research questions by employing the following research methodology. We first perform literature research to identify existing models and control meth- ods concerning the GE. Furthermore, we classify both the models and control methods in order to gain insight into their differences on the basis of their theoretical prop- erties (RQ 1, RQ 3). This classification motivates us to explore the application of optimization methods in the control of the GE. Subsequently, we develop an optimization procedure for tuning controllers under the assumption of ideal feedback (RQ 3). We first validate the optimization procedure using a classical controller in simulations. Then, we extend the procedure by intro- ducing stochastic test signals (RQ 3), which is validated with a nonlinear controller in simulations and experiments. Finally, we explore the inclusion of a GE model in the controller tuning procedure in simulation (RQ 3). To complement the previous simulation result, we develop a multi-controller strat- egy for a real quadrotor platform (RQ 3). For this strategy, we assume feedback from

24 a motion capture system. The strategy is validated by comparing its error statistics against a classical controller in real-world experiments. Motivated by the analysis of these experimental results, we relax the assumption of ideal feedback to develop a fault-tolerant control scheme based on monocular Simultaneous Localization and Mapping (SLAM) (RQ 1, RQ 2, RQ 3). We search for a detection strategy and mitigation strategy and evaluate the overall scheme in simulations and experiments. Error statistics of the fault-tolerant scheme are compared against a classical controller and a nonlinear controller. Finally, we explore how to use optical flow for detecting and mitigating the GE in forward flight. The research methodology is outlined in Fig. 1-2.

Figure 1-2: Outline of the research methodology.

1.5 Contributions

In this section, we provide a summary of the contributions that will be presented throughout this thesis.

We perform a thorough literature review by analyzing relevant material con- ∙ cerning the GE on multirotor MAVs. We disclose control methods, modeling approaches, and applications. Specifically, a gap in current knowledge is iden-

25 tified when it comes to acknowledging and addressing GE-related faults inthe control of multirotors.

As a starting point, we analyze two optimization procedures based on conjugate ∙ gradient for model-based quadrotor control tuning, experimentally demonstrat- ing that approximating the gradient by a first-order finite difference formula yields better results than using the analytic Jacobian gradient; this is a coun- terintuitive finding. Moreover, we study the behavior of the approximated gra- dient optimization procedure when stochastic test signals are introduced. It is found that considering stochastic test signals enhances the control optimization output.

We design and implement a novel multi-controller approach for reducing the ∙ control error of a hovering quadrotor under GE. Experimental validation of this approach is provided.

We found experimental evidence of sensor faults occurring in the quadrotor ∙ while in GE. It is important to remark that such evidence was missing in the literature. In particular, we provide evidence that barometric and range (al- timeter) sensors are prone to fail when the vehicle is in GE or transitions to GE.

We design and implement a novel fault-tolerant control scheme for quadrotors ∙ with sensors faults under GE. This scheme consists of a fault detection strategy and a mitigation strategy. We perform validation of the scheme in simulations and experiments, demonstrating that our scheme significantly reduces the con- trol error for a quadrotor hovering in GE.

Finally, we propose a novel application of convolutional neural networks for ∙ detecting the GE in forward flight. We provide evidence that a convolutional neural network can be used to effectively detect the GE from optical flow esti- mations.

26 1.5.1 Publications

The investigations performed during the development of this thesis resulted in the following publications (involved RQs in curly brackets):

1. Conference: A. Matus-Vargas, G. Rodriguez-Gomez, J. Martinez-Carranza, and A. Muñoz-Silva (2017). Numerical optimization techniques for nonlinear quadrotor control. In 2017 International Conference on Unmanned Aircraft Systems (ICUAS), Miami, FL, USA. {RQ 3}

2. Book chapter: A. Matus-Vargas, G. Rodriguez-Gomez, J. Martinez-Carranza (2019). Parametric Optimization for Nonlinear Quadcopter Control using Stochas- tic Test Signals. In: Koubaa A. (eds), Robot Operating System (ROS), Studies in Computational Intelligence, vol. 831, Springer, Cham. {RQ 3}

3. Conference: A. Matus-Vargas, G. Rodriguez-Gomez, J. Martinez-Carranza (2019). Aerodynamic disturbance rejection acting on a quadcopter near ground. In 2019 6th International Conference on Control, Decision and Information Technolo- gies (CoDIT), Paris, France. {RQ 3}

4. Conference: A. Matus-Vargas, G. Rodriguez-Gomez, J. Martinez-Carranza (2019). Quadrotor Control Simulation with Multirate Integration Methods. In Memo- rias del Congreso Nacional de Control Automático, Puebla, Mexico. {RQ 3}

5. Conference: A. Matus-Vargas, G. Rodriguez-Gomez, J. Martinez-Carranza (2019). Sensor Fault Mitigation for MAVs under Ground Effect. In IEEE 5th Work- shop on Research, Education and Development of Unmanned Aerial Systems (RED-UAS), Cranfield, UK. {RQ 1, RQ 2, RQ 3}

6. Journal (JCR Q1): A. Matus-Vargas, G. Rodriguez-Gomez, J. Martinez-Carranza (2019). A Monocular SLAM-based Controller for Multirotors with Sensor Faults under Ground Effect. Sensors, vol. 19(22), 4848. {RQ 1, RQ 2, RQ 3}

7. Journal (JCR Q3): A. Matus-Vargas, G. Rodriguez-Gomez, J. Martinez-Carranza

27 (in submission). Ground effect on rotorcraft unmanned aerial vehicles: Are- view. Submitted to Intelligent Service Robotics. {RQ 1, RQ 3}

We remark that item 6 was published in a journal belonging to the first quar- tile (Q1) according to the Journal Citation Reports (JCR) index. Also, we mostly targeted conferences having significant international recognition.

1.6 Thesis Outline

In this thesis, we study the problem statement and research questions introduced above. The remainder of the thesis outlined as follows. In Chapter 2, we provide definitions of critical concepts. Then, in Chapter 3, we provide an overview ofthe existing literature of the GE on miniature rotorcraft UAVs. As the basis for addressing the research questions, we explore mathematical optimization for tuning controllers in Chapter 4. Subsequently, we directly address the research questions in Chapter 5. In Chapter 6, we provide our conclusions and give recommendations for further research.

28 Chapter 2

Theoretical Framework

This segment provides a general overview of the concepts needed to understand the following chapters of this thesis.

2.1 Multirotor UAVs

There exist a wide variety of UAV sizes, shapes, and configurations. They have been classified using different nomenclatures, but they can be intuitively classified into fixed-, rotary-, flapping-wing, and hybrid (which can transition between classes midflight, e.g., rotary-wing to fixed-wing). The last three classes are well suitedto carry out missions in confined spaces; however, the simpler mechanical design and the well established free-space models of rotary-wing UAVs are the main reasons to choose this class. Initially, rotorcrafts can be sub-classified according to the number of rotors [56]. Furthermore, other configurations have been formed by stacking, fixing at some tilt angle, and dynamically tilting the rotors. An UAV classification diagram is shown in Fig. 2-1. The coplanar quadcopter possesses features that favor flight in confined spaces. For indoor flight, the size, flight time, and costs are the main points to takeinto account. Helicopters are energy efficient because their design allows the use of large propellers; however, their tilting mechanisms make them pricey to maintain. More than two coplanar rotors can increase safety owing to the fact that the vehicle may

29 Figure 2-1: UAV classification, based on [56]. be able to maintain or recover flight if one propeller is lost. On the other hand, rotor redundancy implies an increase of the overall vehicle size, more energy consumption, and more maintenance costs. With respect to tilted configurations, they have been used to passively move in canted channels or to resist any wrench for aerial manipula- tion. The ability to exert horizontal forces for these canted configurations comes with a decrease in total thrust. Dynamical rotor tilting mechanism has been proposed to enhance the controllability properties of quadrotors; sadly, tilting mechanisms com- plicates the mechanical design and construction. In summary, the quadrotor is not the most efficient platform, but it provides a compact footprint with a low overall cost.

2.2 Hardware

The major components of a multirotor are described in the following paragraphs. In Fig. 2-2 the main components of a quadcopter are indicated. The flight control board or flight controller is the brain of the vehicle. Itmayhave integrated sensors and/or have connections for extra measuring devices. It keeps the multirotor aloft by processing the sensing data and precisely controlling the motors. The flight controller tracks the orientation and, possibly, position of the vehicle by

30 Figure 2-2: Main components of a quadcopter. monitoring how it flies. Transmitters and receivers are connected to the flight control board to enable the communication between the aircraft and the ground station. There is a wide range of receiver and transmitter combinations, however, the most widely used technology is radio-frequency. The frame is a cross-like structure to which all the other essential components are attached, it is lightweight, rigid, and can be bought off-the-shelf or it could be designed to any specification. Motor mounts are located at the end of each armand the electronics are housed in a flat area at the center of the cross. Either brushed or brushless motors are used to power the propellers of multirotors. Each motor is independently controlled by an Electronic Speed Controller (ESC), which takes input from the flight controller and sends varying pulses to a motorto make it spin at different rates. The propellers are mechanically attached to the motors and are used to provide lift and thrust for maneuvering. Motors and propellers are configured in such a way that half of them spin clockwise and the other halfspin counter-clockwise. This arrangement attempts to produce a of forces and moments, giving some stability to the multirotor. Multirotors are equipped with flight sensors, including accelerometers, gyroscopes, magnetometers, barometers, ultrasonic transducers, GPS receivers, cameras, etc. Sen- sors continually send information to the flight controller, which, as previously men-

31 tioned, processes the data to keep the vehicle aloft.

In the context of UAVs, one of the most important sensing modules is the IMU, which is an electronic device that measures and reports proper acceleration, rotation rate, and sometimes orientation of the vehicle, using a combination of accelerometers, gyroscopes, and sometimes magnetometers. It is common that an IMU contains tri- axis versions of the three aforementioned sensors. When onboard processing is added to the IMU to provide attitude and heading information, it is referred to as an Attitude and Heading Reference System (AHRS). In practice, the AHRS can be programmed inside the flight control board or can be integrated as an external module ofthis board.

Accelerometers, gyroscopes, and magnetometers of an IMU are implemented as MicroelEctroMechanical Systems (MEMS). In particular, an accelerometer is a de- vice that measures the physical acceleration experienced by the object to which it is attached (proper acceleration). Single- and multiple-axis accelerometers can detect both the magnitude and direction of the acceleration as a vector quantity, and can be used to determine orientation by measuring the amount of static pull due to grav- ity. Furthermore, analysis of the movement of the object can be done by monitoring the amount of dynamic acceleration. On the other hand, a gyroscope is a device for measuring the rate of orientation about an axis. These gyroscopes are packaged simi- larly to other integrated circuits and, in many cases, a single part includes gyroscopic sensors for multiple axes. Moreover, some parts incorporate multiple-axis gyroscopes and accelerometers to achieve output that has the full six degrees of freedom. Finally, a magnetometer senses the direction and strength of a magnetic field at a particular location and is used as a compass.

Another important sensing module is the altimeter, which estimates the above the ground altitude of the vehicle. For operation above 20 m from the ground, the altitude is commonly determined with a barometric sensor, based on the measurement of atmospheric pressure. Below 20 m, the altitude is measured with a range sensor, which is based on the transmission either of sound or light. Also, it is common to fuse measurements of the available sensors on board to estimate the altitude. This

32 array of sensors is then referred to as the altimeter.

The inclusion of cameras on board multirotors is now widely adopted for two main purposes: translational stabilization and videography. The first make use ofa low resolution camera pointing below the drone to estimate the lateral and frontal velocities. This is done by combining optical flow estimations from the camera with altitude measurements. On the other hand, a high resolution camera is used for general photography or videography. This camera is mounted over the drone with a tilting and/or panning mechanism that allows filming (and transmitting to the ground station) what is in front of the vehicle. Apart from videography, such a camera can be used to achieve vision-related tasks, such as object recognition, collision avoidance, localization and mapping, etc.

IMU implementations that utilize MEMS fulfill the weight and power requirements of MAVs, however, they typically provide poor accuracy because they are susceptible to time-varying biases and drifts as well as noise generated by the motors. Numerous researchers have sought to improve measurement accuracy by using additional sen- sors, including ultrasonic sensors, pressure sensors, and GPS. While GPS is able to provide more accurate estimates of vehicle states, it is not likely to be feasible when operating within a confined environment due to obstacles denying GPS signals. An- other approach is to use an external Motion Capture (MoCap) system to augment or replace onboard sensors. MoCap is especially useful for collecting high-fidelity flight data, however, it has limited applicability as it cannot be implemented outside of a laboratory environment.

A major drawback of multirotors is their high energy consumption. They are normally fitted with lightweight rechargeable batteries that have the capacity to power all the components during the desired flight endurance period. Most manufacturers and hobbyists use Lithium-ion Polymer (LiPo/LiPoly) batteries.

33 2.3 Quadrotor Concepts

Quadcopters are commonly flown and modeled in two configurations: the “x” (cross, square) configuration and the “+” (plus, diamond) configuration, which are shownin Fig. 2-3. Either way, two of the motors rotate counter-clockwise, while the other two rotate clockwise. This arrangement helps the vehicle to not spin on its vertical axis since the rotational inertia is canceled out, eliminating the need for a tail rotor which is used to stabilize the conventional helicopter.

(a) (b)

Figure 2-3: Common quadrotor configurations (top view), a) “x” style, b) “+” style.

The following lines make sense considering a coordinate system aligned with the positive 푥-axis aligned with the heading direction, the 푧-axis pointing against grav- ity, and the 푦-axis following the right-hand rule. Now, observing how the rotors are distributed, it is easy to note that when the pair of rotors that are spinning in one direction is faster than the other pair, the vehicle will spin on its vertical axis, subsequently leading to a change of heading of the aircraft’s direction of movement. Angular acceleration about the 푥-axis and 푦-axis can be caused without affecting the rotation with respect to the 푧-axis. Increasing thrust for some rotors and decreasing it for others will maintain the vertical axis stability and induce a net torque about the other two. Translational acceleration is achieved by maintaining an inclination angle at the front and/or side of the structure. This way, fixed-pitched rotor blades can be used to maneuver the quadcopter in all dimensions.

34 Hovering is the term used to describe when the rotorcraft maintains a constant position at a selected point in the air. At this point, the forces of lift and weight reach a state of equilibrium. To reach the hovering state, all the propellers must rotate at approximately the same speed to generate collective lift force that offsets the weight of the quadcopter. In general, rotorcraft can climb or descend by altering the vertical balance of forces acting on them. This alteration can be performed by applying throttle, which is the action of increasing (or decreasing) all the propeller speeds by identical amounts. If the quadcopter is tilted then the provided thrust generates accelerations in both vertical and horizontal directions. The quadrotor has six degrees of freedom, three translational and three rotational, represented in Fig. 2-4. Here, the term pose refers to the position and orientation of the quadcopter in a three-dimensional space. The position on the 푥 and 푦 axes shall be named as such, while the position on the 푧 axis may be referred to as altitude. The orientation angles measured shall be named roll (휑), pitch (휃), and yaw (휓), being the rotation angles about the 푥, 푦, and 푧 axis, respectively. The yaw angle may also be referred to as heading.

Figure 2-4: Degrees of freedom of a quadrotor.

2.4 Attitude Representations

The focus on this section is to give a summary of the different formalisms used to represent the attitude of a rigid body. A more detailed explanation is given in [39].

35 The pose of a rigid body is the position and attitude (orientation) of that body. The data for this case is expressed in two different coordinate systems:

The world coordinate system is fixed to the earth; it is also common to said ∙ that is fixed to inertial space. The origin of this coordinate system is denoted

by 푥푤.

The body-fixed coordinate system is rigidly attached to the object of interest. ∙ The origin of this coordinate system is denoted by 푥푏.

Points and vectors are expressed in the body-fixed coordinates and distinguished from those expressed in the world coordinates by a prime symbol.

2.4.1 Rotation Matrix

A rotation matrix is a matrix whose multiplication with a vector rotates the latter while preserving its length. The special orthogonal group of all 3 3 rotation matrices × is denoted by 푆푂(3). Thus, if 푅 = 푆푂(3), then:

det 푅 = 1 and 푅−1 = 푅푇 . ± Two possible conventions exist for defining the rotation matrix that encodes the attitude of a rigid body: a) the matrix that maps from the body-fixed to coordinates to the world coordinates, b) the matrix that maps from the world coordinates to the body-fixed coordinates. Though converting between the two conventions is as trivial as performing the transpose matrix, it is necessary to check that two different sources are using the same convention prior to use results from both sources together. Here, the rotation matrix that encodes the attitude of a rigid body is defined to be the matrix that when pre-multiplied by a vector expressed in the world coordinates

yields the same vector expressed in the body-fixed coordinates. Let 푧 R3 be a vector ∈ in the world coordinates and 푧′ R be the same vector expressed in the body-fixed ∈ coordinates, then the following relations hold:

36 푧′ = 푅푧, 푧 = 푅푇 푧′.

To transform a point from one coordinate system to the other one must subtract the offset to the origin of the target coordinate system before applying the rotation

matrix. Thus, if 푥 R3 is a point in the world coordinates and 푥′ R3 is the same ∈ ∈ point expressed in the body-fixed coordinates, then:

′ ′ 푥 = 푅(푥 푥푏) = 푅푥 + 푥 (2.1) − 푤 푇 ′ ′ 푇 ′ 푥 = 푅 (푥 푥 ) = 푅 푥 + 푥푏. (2.2) − 푤

Substituting 푥 = 0 into Eq. 2.1 and 푥′ = 0 into Eq. 2.2 yields

′ 푇 ′ 푥 = 푅푥푏, 푥푏 = 푅 푥 . 푤 − − 푤

In the computer graphics community, it is quite common to write Eqs. 2.1 and 2.2 as matrix-vector products:

⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ′ ′ 푥 푅 푥푤 푥 푅 푅푥푏 푥 ⎣ ⎦ = ⎣ ⎦ ⎣ ⎦ = ⎣ − ⎦ ⎣ ⎦ , 1 0푇 1 1 0푇 1 1

⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ 푇 ′ 푇 ′ ′ 푥 푅 푥푏 푥 푅 푅푥푤 푥 ⎣ ⎦ = ⎣ ⎦ ⎣ ⎦ = ⎣ − ⎦ ⎣ ⎦ . 1 0푇 1 1 0푇 1 1

A coordinate rotation is a rotation about a single coordinate axis. Enumerating the 푥-, 푦-, and 푧-axes with 1, 2, and 3, the coordinate rotations, 푅푖 : R 푆푂(3), → for 푖 1, 2, 3 , are ∈ { } ⎡ ⎤ ⎡ ⎤ 1 0 0 cos 훼 0 sin 훼 ⎢ ⎥ ⎢ − ⎥ ⎢ ⎥ ⎢ ⎥ 푅1(훼) = ⎢0 cos 훼 sin 훼⎥ , 푅2(훼) = ⎢ 0 1 0 ⎥ , ⎣ ⎦ ⎣ ⎦ 0 sin 훼 cos 훼 sin 훼 0 cos 훼 − 37 ⎡ ⎤ cos 훼 sin 훼 0 ⎢ ⎥ ⎢ ⎥ 푅3(훼) = ⎢ sin 훼 cos 훼 0⎥ . ⎣− ⎦ 0 0 1

A rotation matrix may also be referred to as direction cosine matrix because its elements are the cosines of the unsigned angles between the body-fixed axes and the world axes. Denoting the world axes by (푥, 푦, 푧) and the body-fixed axes (푥′, 푦′, 푧′), ′ let 휃푥′,푦 be, for example the unsigned angle between the 푥 -axis and the 푦-axis. In terms of these angles, the rotation matrix may be written

⎡ ⎤ cos(휃푥′,푥) cos(휃푥′,푦) cos(휃푥′,푧) ⎢ ⎥ ⎢ ⎥ 푅 = ⎢cos(휃푦′,푥) cos(휃푦′,푦) cos(휃푦′,푧)⎥ . ⎣ ⎦ cos(휃푧′,푥) cos(휃푧′,푦) cos(휃푧′,푧)

The rotation matrix may also be thought of as the matrix of basis vectors that define the world and body-fixed coordinate systems. The rows of the rotation matrix are the basis vectors of the body-fixed coordinates expressed in world coordinate, and the are the basis vectors of the world coordinates expressed in the body-fixed coordinates.

The multiplication of two rotation matrices yields another rotation matrix whose application to a point effects the same rotation as the sequential application ofthe two original rotation matrices. For example, let

′ ′′ ′ 푧 = 푅푎푧, 푧 = 푅푏/푎푧 = 푅푏/푎푅푎푧 = 푅푏푧,

where

푅푏 = 푅푏/푎푅푎.

Note that the rotations are applied in the reverse order.

38 2.4.2 Euler Angles

Leonhard Euler introduced that three coordinate rotations in sequence can describe any rotation. Consider triple rotations in which the first rotation is an angle 휓 about the 푘-axis, the second rotation is an angle 휃 about the 푗-axis, and the third rotation is an angle 휑 about the 푖-axis. For notational brevity, let arrange these angles in a three-dimensional vector called the Euler angle vector, defined by

푢 := [휑, 휃, 휓]푇 .

The function that maps an Euler vector to its corresponding rotation matrix

3 푅푖푗푘 : R 푆푂(3), is →

푅푖푗푘(휑, 휃, 휓) := 푅푖(휑)푅푗(휃)푅푘(휓). (2.3)

The time derivative of the Euler angle vector is the vector of Euler angle rates. The relationship of the Euler angle rates and the angular velocity of the body is encoded in the Euler angle rates matrix. Multiplying this matrix by the vector of

Euler angle rates gives the angular velocity in the global coordinates. Letting 푒ˆ푖 be the 푖푡ℎ unit vector, the function that maps an Euler angle vector to its corresponding

Euler angle rates matrix, 퐸 : R3 R3×3, is →

푇 푇 푇 퐸푖푗푘(휑, 휃, 휓) := [푅푘(휓) 푅푗(휃) 푒ˆ푖, 푅푘(휓) 푒ˆ푗, 푒ˆ푘], (2.4)

and the related conjugate Euler angle rates matrix function, 퐸′ : R3 R3×3, whose → multiplication with the vector of Euler angle rates yields the body-fixed angular ve- locity is

′ 퐸푖푗푘(휑, 휃, 휓) := [ˆ푒푖, 푅푖(휑)ˆ푒푗, 푅푖(휑)푅푗(휃)ˆ푒푘]. (2.5)

Hence,

′ ′ 휔 = 퐸푖푗푘(푢)푢, ˙ 휔 = 퐸푖푗푘(푢)푢. ˙

39 Noting also that the angular velocity in the body-fixed coordinates may be related to the angular velocity in the global coordinates by

′ 푇 ′ 휔 = 푅푖푗푘(푢)휔, 휔 = 푅푖푗푘(푢) 휔 .

Angular velocities, 휔 and 휔′, and 푢˙ can be eliminated to yield

′ −1 푇 ′ −1 푅푖푗푘(푢) = 퐸푖푗푘(푢)[퐸푖푗푘(푢)] , 푅푖푗푘(푢) = 퐸푖푗푘(푢)[퐸푖푗푘(푢)] .

Thus far, the sequences of coordinate rotations that are able to span all dimen- sional rotations have not been specified. In fact, only 12 of the 27 possible sequences of three integers in 1, 2, 3 satisfy the constraint that no two consecutive numbers { } in a valid sequence may be equal. These are

(푖, 푗, 푘) (1, 2, 1), (1, 2, 3), (1, 3, 1), (1, 3, 2), ∈ { (2, 1, 2), (2, 1, 3), (2, 3, 1), (2, 3, 2),

(3, 1, 2), (3, 1, 3), (3, 2, 1), (3, 2, 3) . }

Euler angle representations have singularities that are said to arise from gimbal lock. Gimbal lock may be understood in different ways. Intuitively, it arises from the indistinguishability of changes in the first and third Euler angles when the second Euler angle is at some critical value. The phenomenon may also be seen in the mathematics, where it manifests itself as singularities. For all parametrizations of the form (푖, 푗, 푖) there exist a singularity at the home position, [휑, 휃, 휓] = [0, 0, 0]. On the other hand, all the Euler angle sequences that do not have a repeated axis have singularities at pitch values of 휃 = 휋/2 + 푛휋, for 푛 Z. A common strategy ∈ for dealing with singularities is to change representations whenever an object nears a singularity. Even more popular is the use of unit quaternions to represent an object’s attitude.

40 2.4.3 Quaternions

William Rowan Hamilton first devised quaternions in the 19th-century. A quaternion,

푞 H, may be represented as a vector, ∈

⎡ ⎤ 푇 푞0 푞 = [푞0, 푞1, 푞2, 푞3] = ⎣ ⎦ . 푞1:3

The adjoint, norm, and inverse of the quaternion, 푞, are

⎡ ⎤ 푞 √︁ 0 2 2 2 2 −1 푞¯ 푞¯ = ⎣ ⎦ , 푞 = 푞0 + 푞1 + 푞2 + 푞3, 푞 = . ‖ ‖ 푞 푞1:3 − ‖ ‖ Quaternion multiplication is not commutative. Multiplication between quaternion 푞 and 푝 is defined by

⎡ ⎤ 푇 푞0푝0 푞1:3푝1:3 푞 푝 = 푞푚(푞, 푝) = ⎣ − ⎦ · 푞0푝1:3 + 푝0푞1:3 푞1:3 푝1:3 − × ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ 푇 푇 푞0 푞1:3 푝0 푝0 푝1:3 푞0 = ⎣ − ⎦ ⎣ ⎦ = ⎣ − ⎦ ⎣ ⎦ , 푞1:3 푞0퐼3 퐶(푞1:3) 푝1:3 푝1:3 푝0퐼3 + 퐶(푝1:3) 푞1:3 −

where the skew-symmetric cross product matrix function 퐶 : R3 R3×3 is defined → by

⎡ ⎤ 0 푥3 푥2 ⎢ − ⎥ ⎢ ⎥ 퐶(푥) = ⎢푥3 0 푥1⎥ . ⎣ − ⎦ 푥2 푥1 0

More compactly, quaternion multiplication may be written as the second quater- nion pre-multiplied by a matrix-valued function of the first quaternion. That is,

41 푞 푝 = 푞푚(푞, 푝) = 푄(푞)푝 = 푄¯(푝)푞 ·

푝 푞 = 푞푚(푝, 푞) = 푄(푝)푞 = 푄¯(푞)푝, ·

where the quaternion matrix function, 푄 : H R4×4 is defined by → ⎡ ⎤ 푞0 푞1 푞2 푞3 ⎡ ⎤ ⎢ − − ⎥ 푇 ⎢ ⎥ 푞0 푞1:3 ⎢푞1 푞0 푞3 푞2⎥ 푄(푞) = ⎣ − ⎦ = ⎢ − ⎥ , ⎢ ⎥ 푞1:3 푞0퐼3 + 퐶(푞1:3) ⎢푞2 푞3 푞0 푞1 ⎥ ⎣ − ⎦ 푞3 푞2 푞1 푞0

and the related conjugate quaternion matrix function, 푄¯ : H R4×4 is defined by → ⎡ ⎤ 푞0 푞1 푞2 푞3 ⎡ ⎤ ⎢ − − − ⎥ 푇 ⎢ ⎥ 푞0 푞1:3 ⎢푞1 푞0 푞3 푞2 ⎥ 푄¯(푞) = ⎣ − ⎦ = ⎢ − ⎥ . ⎢ ⎥ 푞1:3 푞0퐼3 퐶(푞1:3) ⎢푞2 푞3 푞0 푞1⎥ − ⎣ − ⎦ 푞3 푞2 푞1 푞0 − Unit quaternions are quaternions with unity norm, which means that

푞 = 1. ‖ ‖

A unit quaternion can be used to represent the attitude of a rigid body. Recalling the vector 푧 R3 in the global coordinates, and 푧′ R3 the same vector in the ∈ ∈ body-fixed coordinates, then the following relations hold:

⎡ ⎤ ⎡ ⎤ ⎡ ⎤ 0 0 −1 0 ⎣ ⎦ = 푞 ⎣ ⎦ 푞 = 푞 ⎣ ⎦ 푞¯ 푧′ · 푧 · · 푧 · ⎡ ⎤ ⎡ ⎤ ⎡ ⎤ 푇 푇 0 1 0 0 = 푄¯(푞) 푄(푞) ⎣ ⎦ = ⎣ ⎦ ⎣ ⎦ , 푧 0 푅푞(푞) 푧

42 where

⎡ ⎤ 2 2 2 2 푞0 + 푞1 푞2 푞3 2푞1푞2 + 2푞0푞3 2푞1푞3 2푞0푞2 ⎢ − − − ⎥ 푅 푞 ⎢ 2 2 2 2 ⎥ . (2.6) 푞( ) = ⎢ 2푞1푞2 2푞0푞3 푞0 푞1 + 푞2 푞3 2푞2푞3 + 2푞0푞1 ⎥ ⎣ − − − ⎦ 2 2 2 2 2푞1푞3 + 2푞0푞2 2푞2푞3 2푞0푞1 푞 푞 푞 + 푞 − 0 − 1 − 2 3

푖 Inverse mappings 푞푅 : 푆푂(3) H for 푖 0, 1, 2, 3 , can be retrieved by inspec- → ∈ { } tion of Eqn. (2.6), however, they are not displayed here for the sake of brevity.

Just as with rotation matrices, sequences of rotations are represented by products of quaternions. That is, for unit quaternions 푞 and 푝, it holds that

푅푞(푞 푝) = 푅푞(푞)푅푞(푝). ·

The main disadvantage of unit quaternions is that they are constrained to have unit length. Furthermore, the unity norm constraint is quadratic in form and thus can lead to complications when attempting to optimize over the quaternion parameters.

Alternatively, it is possible to parameterize the attitude of a rigid body with an angle 훼 R and a unit vector 푛 S2, where S2 := 푣 R3 푣 = 1 . The ∈ ∈ { ∈ | ‖ ‖ } quaternion that arises from a rotation 훼 about an axis 푛 is given by the axis-angle

2 quaternion function, 푞푎 : R S H, defined by × → ⎡ ⎤ cos(1/2훼) 푞푎(훼, 푛) := ⎣ ⎦ . 푛 sin(1/2훼)

This representation, while perhaps more intuitive than quaternion, is functionally equivalent to it: both require four parameters and a single quadratic constraint.

The inverse mappings, from unit quaternion to the corresponding axis and angle

2 of rotation, are 훼푞 : H R and 푛푞 : H S , defined by → →

푞1:3 푞1:3 훼푞(푞) := 2 arccos(푞0), 푛푞(푞) := = . √︀ 2 푞1:3 1 푞 ‖ ‖ − 0 43 2.4.4 Rotation Vector

One of the major drawbacks of quaternions is that they require a quadratic norm constraint in order to be valid rotations. This problem can be overcome by folding the unity norm constraint into the parametrization. The rotation vector appears to be the most natural three-dimensional parametrization of the quaternion representation of an object’s attitude.

2 The rotation vector is a function of the axis and angle of a rotation, v푎 : R S × → R3, given by

v푎(훼, 푛) := 훼푛.

Noting that 푛 = 1, the previous definition may be inverted to yield the functions, ‖ ‖ 3 3 2 훼푣 : R R and 푛푣 : R S , defined by → →

v 훼푣(v) := v , 푛푣(v) := . ‖ ‖ v ‖ ‖ 3 The function that maps a rotation vector to a unit quaternion, 푞푣 : R H, is → defined by

⎡ ⎤ cos( v /2) 푞푣(v) := 푞푎(훼푣(v), 푛푣(v)) = ⎣ ‖ ‖ ⎦ . v sin( v /2) ‖v‖ ‖ ‖ 3 The inverse mapping, v푞 : H R , which maps a unit quaternion to a rotation → vector, is given by

푞1:3 2 arccos(푞0) v푞(푞) := 훼푞(푞)푛푞(푞) = 2 arccos(푞0) = 2 1/2 푞1:3 푞1:3 (1 푞 ) ‖ ‖ − 0 The multiplication of two rotation vectors 푢 and 푣 R3 is defined in terms of the ∈ product of quaternions:

푣 푢 = v푚(푣, 푢) = v푞(푞푚(푞푣(푣), 푞푣(푢))). * Basically, the expression above indicates that the product computed by converting

44 each rotation vector to a unit quaternion, performing the quaternion product, and then converting back to a rotation vector. Now, consider an object with a body-fixed angular velocity of 휔′(푡) and the change in attitude from time 푡0 to time 푡1. The rotation vector over this interval is defined to be

∫︁ 푡1 ′ v휔′ (푡0, 푡1) := 휔 (푡)푑휏. 푡0 If the body-fixed angular velocity is provided as discrete samples (from asetof gyros for example) the integration will have to be carried numerically. If at time 푡0 the body has a quaternion attitude of 푞0, then the attitude at time 푡1 is

푞1 = 푞푣(v휔′ (푡0, 푡1)) 푞0. · This equation may be generalized to read

푞푖+1 = 푞푣(v휔′ (푡푖, 푡푖+1)) 푞푖, · which gives a simple update rule for tracking the attitude of an object over time. This method is more accurate than integrating the Euler angles rates.

2.5 Control Systems

The autonomous flight of a quadrotor requires the implementation of a controller. This subsection shall present concepts in order to provide a better understanding of a control system implementation. In modern control theory, the physical object to be controlled is commonly referred to as the plant. A set of variables from the plant is measured and controlled, which is also referred to as the output of the system. The user feeds the system with a set of desired values, also called the reference or setpoint. The task of the controller is to issue a control signal to compensate for the difference between the output and the reference. In other words, the action of control means measuring the value of the

45 (a)

(b)

Figure 2-5: Block diagrams of a) the open-loop and b) the closed-loop control systems. controlled variables to correct or limit the deviation of the measured value from the desired value [144]. On the contrary, a disturbance is a signal that tends to adversely affect the value of the system output. If a disturbance is generated within thesystem it is called internal, while an external disturbance is caused outside the system and is an input. Control systems can be classified in open-loop and closed-loop systems. The for- mer only uses the user input to obtain the desired output, however, it cannot com- pensate for external disturbances. Closed-loop control systems operate with output feedback. A sensor provides the output measurement which is compared with the reference value in order to produce the desired value at the output. Therefore, the closed-loop system is able to compensate for external disturbances. General block diagrams for both aforementioned control systems are displayed in Fig. 2-5. Consider a dynamical system, where:

푦 is the output–represents what is “visible” from outside the system. ∙

푥 is the state of the system–characterizes the state of the system. ∙

푢 is the control input–makes the system move. ∙ 46 The system can be represented either by differential equations or difference equa- tions. In this thesis, it is assumed that the system can be represented by the following form:

푥˙ = 푓(푥(푡), 푢(푡)) (2.7) 푦 = ℎ(푥(푡), 푢(푡)).

With the previous definitions, the general control problems are:

1. Open-loop control–find 푢(푡) such that lim푡→∞ 푦(푡) 푦푑(푡) = 0. ‖ − ‖

2. Closed-loop control–find 푢(푥(푡)) such that lim푡→∞ 푦(푡) 푦푑(푡) = 0. ‖ − ‖ In particular, there exist three subproblems of the general closed-loop control problem:

a) Tracking problem–find 푢(푥) such that lim푡→∞ 푥(푡) 푥푑(푡) = 0. ‖ − ‖

b) Stabilization problem–find 푢(푥) such that lim푡→∞ 푥(푡) 푥푑 = 0 for 푥푑 = ‖ − ‖ constant.

c) Null stabilization problem–find 푢(푥) such that lim푡→∞ 푥(푡) 푥푑 = 0 for 푥푑 = ‖ − ‖ 0.

In any case, a null stabilization problem of 푧(푡) = 푦(푡) 푦푑(푡) can be posed. −

2.6 SLAM

The term SLAM was originally developed by John J. Leonard and Hugh Durrant- Whyte [110] based on earlier work by Smith, Self, and Cheeseman [179]. It is con- cerned with the problem of building or updating a map of an unknown environment while at the same time keeping track of an agent’s location within it. The goal of the SLAM process is to use the environment to update the position of the agent. Since the odometry of the agent is often erroneous, we cannot rely directly on it. We can use sensor data to correct the position of the agent. This is accomplished

47 by extracting features from the environment and re-observing when the robot moves around. These features are commonly called landmarks and are used for updating the estimation of the agent’s position. An estimation algorithm keeps track of the uncertainty in the agent’s position and also the uncertainty of the landmarks the agent has seen in the environment. When the odometry changes, because the agent moves, the uncertainty of the agent’s new position is updated by the estimation algorithm. Landmarks are then extracted from the environment in the agent’s new position. Subsequently, these landmarks are associated with observations of landmarks the agent has previously seen. Re-observed landmarks are used to update the agent’s position with the estimation algorithm. Landmarks that have not been previously seen are consumed by the estimation algorithm as new observations so they can be re-observed later. The architecture of a SLAM system can be summarized in two main components: the front end and the back end [24]. This architecture is depicted in Fig 2-6. The front end abstracts sensor data into models amenable for estimation. It handles the feature extraction and tracking in the sensor data stream. Also, it creates long-term associations that reduce drift by recognizing places that have been encountered before. On the other hand, the back end performs inference on the abstract data produced by the front end. It takes care of localizing the agent as well as handling the overall geometrical reconstruction. The SLAM estimate contains the tracked features, their locations and relations, as well as the agent position within the environment.

Figure 2-6: Architecture of a typical SLAM system. The back end can provide feedback to the front end for loop closure detection and verification.

48 2.6.1 Metric Monocular SLAM

Sensors have a big impact on the SLAM process. Early SLAM approaches focused on the use of range sensors, such as sonar and laser. Nevertheless, there are two main disadvantages with the use of range sensors in SLAM: data association becomes difficult, and some of them are limited to 2D maps [126]. For that reason, recent works have moved towards the use of cameras as the primary sensing mode. Cameras provide valuable information for data association in 3D, they are lightweight, cheap, and low-power. Given a monocular onboard camera, ORB-SLAM2 can be employed to obtain the camera pose and 3D point estimates without metric [127]. To address the scale problem, assuming planar ground and knowing the camera angle and distance to the ground, we can obtain a synthetic depth image by resolving the ray-ground inter- section geometry. This synthetic image can be coupled with incoming RGB images and then fed to the RGB-D version of ORB-SLAM2, which generates metric pose estimates [162, 125].

(, )

Figure 2-7: Geometric configuration to generate the synthetic depth image.

Figure 2-7 illustrates the side view of the ray-ground geometric configuration. Knowing the height above ground of the camera ℎ and the camera angle 훼, we can define a vector 푛 perpendicular to the ground. Therefore, a vector 푙 departing from the camera’s optical center (푥0, 푦0) and through a pixel (푥, 푦) will intersect the planar ground for some scalar 푑. The value of 푑 is obtained with the ray-plane intersection equations:

49 푇 푙 =[(푥0 푥)/푓, (푦0 푦)/푓, 1] − − 푛 =[0, ℎ sin 훼, ℎ cos 훼]푇 , (2.8) − 푛푇 푛 푑 = · 푙푇 푛 · where 푓 is the focal length. This approach has been evaluated using the Vicon MoCap system in indoor environments. It was found that the pose error is 2% on average [125]. Figure 2-8 shows examples of the system carrying out the metric mapping. In this figure, it is noticed that all map points (red and black, obtained fromthe synthetic depth map) are on a three dimensional plane, which corresponds to the ground.

(a) Top view (b) Back view (c) Side view

Figure 2-8: Snapshots that illustrate the functioning of the metric monocular SLAM; the top row provides samples from camera frames with the tracked features (green markers); the bottom row displays three views of the map with keyframes (blue pyramids, the first one is green), and map points (red ones are being used for tracking, while black ones are ignored).

2.7 Optical Flow

We live in a moving world. That is why perceiving, understanding, and predicting motion is important for autonomous agents. In particular, the motion of image data belongs to the crucial features that enable the interpretation of observed phenomena in natural and machine vision systems. The motion characterizations can be extremely

50 variable across the various application domains. The most low-level characterization is the estimate of a dense motion field, which is called optical flow. High-level motion analysis tasks employ optical flow as a fundamental basis to build a more semantic interpretation.

The notion of optical flow refers to the displacements of intensity patterns ina sequence of images [49]. Optical flow can arise from the relative motion between the observer and objects of the observed scene [57]. It can also be due to lighting changes and reflection effects. Hence, the optical flow does not necessarily account for the actual 3D motion in the physical scene. However, in computer vision, the main interest lies in retrieving the projection on the image plane of the 3D motion in the scene, usually called the motion field. For that reason, the terms optical flow and motion field are commonly used to both designate the previous definition ofthe motion field.

For qualitative evaluation, motion fields are visualized using two main techniques presented in Fig. 2-9 [49]. The arrow visualization provides an intuitive representation of the motion vectors. On the downside, a clear depiction employing this technique requires to under-sample the motion field to prevent overlapping arrows. This is not the case for the color code visualization, which associates a color hue to a direction and a saturation to the magnitude of the vector. It allows for a dense visualization of the flow field and to better distinguish subtle differences between neighbor vectors.

To discuss the estimation principle, we first introduce some notation. Let 퐼 : Ω 푇 R denote an image sequence, where Ω R is the image domain and 푇 is × → ⊂ the sampled time interval of the sequence. In the words of Fortun et al. [49], “every optical flow estimation method is based on an assumption on the relationship between the searched motion field 푤 :Ω R2 at time 푡 and the image 퐼( , 푡).” The most → · widely used assumption is that the pixel intensity remains constant during movement. This assumption inspired the brightness constancy constraint equation (BCCE):

퐼 (푥(푡), 푡) = 0, (2.9) 푑푡 51 (a) 퐼1 (b) 퐼2

(c) Arrow visualization (d) Color visualization

Figure 2-9: Two visualization techniques of the motion field transforming 퐼1 in 퐼2 [49].

where 푥 Ω is the coordinate of a pixel. The discrete approximation of (2.9) at a ∈ given pixel and time yields:

퐼(푥 + 푤(푥), 푡 + 1) 퐼(푥, 푡) = 0. (2.10) − Nevertheless, the previous constraint (2.10) usually leads to particularly difficult optimization problems. It can be more tractable to consider the expanded version of (2.9) with partial derivatives, which results in a linear version of (2.10):

휕퐼 휕퐼 휕퐼 (푥)푢(푥) + (푥)푣(푥) + (푥) = 0, (2.11) 휕푥1 휕푥2 휕푡

푇 푇 where 푤(푥) = (푢(푥), 푣(푥)) and 푥 = (푥1, 푥2) . The linearized constraint (2.11) is an equation with two unknowns that correspond to the components of 푤(푥) and cannot be solved as such. This is known as the aperture problem, pointing to the conclusion that the motion of linear structures is ambiguous if the neighboring context is not taken into account. To overcome this problem, it is necessary to introduce another constraint encoding a priori information

52 on 푤, which can take the form of spatial coherency imposed by either local or global constraints [49]. Also, the validity of (2.11) is restricted to the linear region of 퐼, which corresponds to small displacements or smooth images. To cope with large displacements, the estimation can be embedded in a coarse-to-fine approach [43, 14], in which a pyramid of down-sampled versions of the original sequence is created. The motivation is that the linear domain of the coarsest level encompasses large displacements. Hence, estimations at coarser levels serve to wrap the sequence at subsequent finer levels.

2.8 Deep Learning

One of the key tools that are going to be used in the development of this thesis is deep learning. It has been proven effective in encoding knowledge from multidimensional data, such as a sequence of estimations of optical flow. Deep learning is a subset of machine learning, which is, in turn, is a subset of artificial intelligence (AI). The latter is the field of science concerned with thecom- putational understanding of intelligent behavior [175]. Also, the term is used to refer to the intelligence demonstrated by machines, in contrast to the natural intelligence displayed by humans and animals. Machine learning is the field that studies computer algorithms that improve automatically through experience. Finally, deep learning is a type of machine learning based on Artificial Neural Networks (ANNs), which are vaguely inspired by biological neural networks that constitute animal brains. The field of AI began to flourish by tackling and solving problems that areintel- lectually difficult for humans but relatively straightforward for computers–problems that can be described by a list of formal (mathematical) rules. However, the true challenge to AI proved to be solving tasks that are easy for people to perform but hard to describe formally–problems that humans solve intuitively, that feel automatic, like recognizing spoken words or faces in images [61]. One way to tackle these intuitive problems is to allow computers to learn from experience and understand the world with a hierarchy of concepts, in which each

53 concept is defined through its relation to simpler concepts. This approach avoids the need for human operators to formally specify all the knowledge that the computer re- quires. The hierarchy of concepts enables the computer to learn complicated concepts by building on simpler ones. The deep learning term becomes evident if we draw a graph showing how these concepts are built on top of each other; such a graph would be deep, with many layers.

The foundational unit of ANNs is the neuron, which is represented by a simple nonlinear function. The neuron mimics the behavior of a neuron–firing if the input is large enough–and remaining inactive otherwise. It takes in some number of inputs, each of which is multiplied by a specific weight. These weighted inputs are summed together to produce the logit of the neuron. In many cases, the logit also includes a bias, which is a constant. The logit is then passed through a function 휎, the activation function, to produce the output.

Neurons can act as layers of the neural network. At a general layer, each neuron receives the same input–one real value from every neuron at the previous layer–and produces one real value, which is passed to every neuron at the next layer. The input and output layers are the exceptions to this rule. At the input layer, there is no previous layer, and each neuron receives the input vector. At the output layer, there is no next layer, and these neurons produce the overall output.

Suppose that the network has 퐿 layers, with layers 1 and 퐿 being the input and output layers, respectively. Suppose that layer 푙, for 푙 = 1, 2, 3, ..., 퐿, contains 푛푙 neurons. Overall, the network maps from R푛1 to R푛퐿 . The matrix of weights at layer

[푙] 푛푙×푛푙−1 [푙] 푙 is denoted as 푊 R . More precisely, 푤푗푘 is the weight that neuron 푗 at ∈ layer 푙 applies to the output from neuron 푘 at layer 푙 1. Similarly, 푏[푙] R푛푙 is the − ∈ [푙] vector of biases for layer 푙, so neuron 푗 at layer 푙 uses the bias 푏푗 .

Given an input 푥 R푛1 , the action of the network is neatly summarized by letting ∈ [푙] 푎푗 denote the output, or activation, from neuron 푗 at layer 푙. In essence [77]

54 [1] 푛 푎 = 푥 R 1 , (2.12) ∈ 푎[푙] = 휎 (︀푊 [푙]푎[푙−1] + 푏[푙])︀ for 푙 = 2, 3, ..., 퐿. (2.13)

{푖} 푁 푛1 Now, suppose there exist 푁 pieces of data, or training points, 푥 푖=1 in R { } {푖} 푁 푛퐿 for which there are given target outputs 푦(푥 ) 푖=1 in R . The objective is to find { } the weights and biases that optimize a cost function. In general, the cost function performs a comparison between the network’s output–produced when is fed with the training points–and the target outputs. Specifically, the cost function is of the form [138]

푁 1 ∑︁ 퐶(푊, 푏) = 퐶 (︀푦(푥{푖}), 푎[퐿](푥{푖}))︀ (2.14) 푁 푥 푖=1 The optimization (training) algorithm is mostly based on gradient descent. Spe- cific algorithms are improvements and refinements on the ideas of gradient descent, and more specifically are improvements of the stochastic gradient descent algorithm.

2.8.1 Convolutional Neural Networks

A Convolutional Neural Network (CNN, ConvNet) is a class of deep ANN that is commonly applied to analyzing visual imagery. CNNs are analogous to traditional ANNs in that they are comprised of neurons that are optimized through learning. On the other hand, the CNN architecture is set up in a way to best fit the need for dealing with data that has a known grid-like topology, such as image data [61]. One of the key differences is that the layers within a CNN are comprised of neurons organized into three dimensions, the spatial dimensionality of the input (height and width) and the depth. The depth does not refer to the total number of layers within the CNN, but the third dimension of an activation volume. Unlike traditional ANNs, the neurons within any given layer will only connect to a small region of the preceding layer.

55 CNNs are comprised of three types of layers: convolutional layers, pooling layers, and fully-connected (dense) layers. Stacking a combination of these layers forms a CNN architecture. A simplified CNN architecture for character classification is illustrated in Fig. 2-10.

Figure 2-10: A simple CNN architecture, comprised of four layers.

The basic functionality of the example CNN can be broken down into three key areas.

The convolutional layer will determine the output of neurons that are connected ∙ to local regions of the input through the calculation of the scalar product be- tween their weights and the input volume. A Rectified Linear Unit (ReLU) is used to apply an element-wise activation function to the output of the layer.

The pooling layer will then simply perform down-sampling of the spatial dimen- ∙ sionality of the given input.

The fully-connected or dense layers will then perform the same duties found ∙ in traditional ANNs and attempt to produce class scores from the activation functions. It is also suggested that ReLU may be used between these layers to improve performance [85, 129, 60].

Through this simple method, CNNs can transform the original input using convo- lutional and down-sampling techniques to produce class scores for classification and regression purposes. Even though there is no set way of formulating a CNN, in the literature, it is obvious that CNNs tend to follow a common architecture. This common architecture,

56 illustrated in Fig. 2-10, consists of stacked convolutional layers, followed by pooling layers in a repeated manner before feeding forward to dense layers. Another common CNN architecture is to stack two convolutional layers before each pooling layer. This is strongly recommended since stacking multiple convolutional layers allows for more complex features of the input vector to be detected.

57 58 Chapter 3

Literature Review

This chapter provides an overview of the existing literature relating to the study of the GE on small-scale rotorcraft UAVs. A summary of the origins of the topic is given in Section 3.1. The studies related to small-scale helicopters and multirotors are reviewed in Sections 3.2 and 3.3, respectively. Section 3.4 briefly describes other aerodynamic proximity effects. Trends and challenges are discussed in Section 3.5 before the conclusion.

3.1 Full-scale Helicopter

The effect of the ground on helicopters has long been recognized and studied. Similar effects are obtained in hover and forward flight but are strongest in theformer.

3.1.1 Hovering Flight

When a rotor is hovering in close proximity to the ground, the rotor slipstream is forced to spread radially as it approaches the surface. This alters the slipstream velocity, the induced velocity in the rotor, and, consequently, the rotor thrust and power [109]. The thrust of a hovering rotor in GE is found to be increased for a given power (or the required power is decreased for maintaining a given thrust). A representative plot of the thrust ratio in hover versus normalized altitude is shown in

59 Fig. 3-1.

1.6 OH-6A 1.5 OH-58A UH-1H UH-1C ∞ Fradenburgh (θ = -16°) 1.4 tw Fradenburgh (θ = -8°) tw 1.3 Cheeseman-Bennet Hayden

1.2 Thrust ratio, T/T ratio, Thrust

1.1 Few measurements available measurements Few

1 0.5 1 1.5 2 2.5 3 Normalized height above ground, z/R Figure 3-1: Increase in rotor thrust versus distance from the ground for a variety of helicopters [109]. The legends OH-6A, OH-58A, UH-1H, and UH-1C are codenames for full-scale helicopters.

The influence of the ground can be viewed as a reduction of the rotor induced

velocity, 푣푖, by a factor 푘퐺 [86, 150], so that at constant thrust, the ratio of the induced power (or power coefficient) required to that out of GEis 퐶푃 /퐶푃 ∞ = 푘퐺. Alternatively, the GE can be expressed in terms of the increase in thrust (or thrust

coefficient) at constant power, which implies that 휆퐶푇 = 휆∞퐶푇 ∞ or 푇/푇∞ = 푣푖∞/푣푖 =

1/푘퐺, where 휆 is the inflow ratio, and the infinity ( ) subscript indicates baseline ∞ values (far from the ground). Therefore, the thrust results can also be interpreted as a change in 푣푖. Research about the GE on helicopters can be traced back to 1937. In that year, Betz [13] provided a theoretical estimate of the effect of the ground on the power of a propeller operating at constant thrust. In particular, he proposed that

[︂ 푃 ]︂ 2푧 = = 푘퐺 푧 푅, (3.1) 푃∞ 푇 =const 푅 ≪ where 푧 is the height off the ground, and 푅 is the radius of the rotor. In 1941, Knight and Hefner [99] conducted a theoretical and experimental investigation of the GE.

60 They modified vortex theory to account for the ground by including image vortices below the ground plane. They obtained a good correlation with measurements of the effect on three replica rotors. In 1947, assuming constant power, Zbrozek [191]used flight test data and experimental data of isolated rotor models to express the influence of the ground in terms of the thrust increase as a function of rotor height and blade loading. Cheeseman and Bennet [26], in 1955, sought to simplify the complex vortex interaction with a ground plane using momentum theory and the method of images, showing that the rotor thrust could be approximated by

[︂ 푇 ]︂ 1 = 2 . (3.2) 푇∞ 1 (푅/4푧) 푃 =const − Equation (3.2) is limited because it does not consider viscosity or boundary layer effects and is only valid for 푧/푅 > 0.5. Despite this, it still fits well to helicopter flight test data. In 1960, Fradenburgh [50] conducted smoke flow experiments that showed the wake expansion in GE instead of the notional contraction observed out of GE. In 1976, Hayden [68] correlated flight test data to obtain the influence ofthe ground in hover. The profile part of the total power was assumed to be isolated from the induced effect, such that only the latter is influenced by the ground, thatis

퐶푃 = 퐶푃 0 + 푘퐺(퐶푃 푖)∞, where

1 푘 = , (3.3) 퐺 퐴 + 퐵(2푅/푧)2

with 퐴 = 0.9926 and 퐵 = 0.0379. As shown in Fig. 3-1, Hayden’s result slightly over- predicts the rotor thrust. In all cases, it is apparent that the GE becomes negligible for rotors hovering greater than two rotor radii (one diameter) above the ground. Other studies have focused on the flows with vortex methods [112, 62, 151], grid- based Computational Fluid Dynamics (CFD) [48, 104, 87], and vorticity transport models [23]. To circumvent the difficulties of numerical methods in preserving the vorticity in older ages1, Lee et al. [108] conducted experiments to examine the interactions of

1The term age refers to the wake age, which is the angular displacement (incremental) of the

61 tip vortices with a horizontal ground plane. The tip vortices were found to induce significantly unsteady flow if they reached the ground without undergoing substantial diffusion. At the higher rotor heights, the tip vortices diffused more before theycould reach the ground, and the flow was fairly benign. At the lower rotor heights, the vortices were subjected to axial stretching as they approached the ground, which countered the natural process of diffusion. However, the turbulence and velocity gradients in the developing flow accelerated their diffusion. Apart from helicopters, the effect of the ground has been investigated for other Vertical Take-Off and Landing (VTOL) aircraft, such as tiltrotors (as the V-22Os- prey) and quad tilt rotors (as the V-44). Studies of the tiltrotor have shown that the vertical drag or download on the fuselage decreases as the height above ground de- creases [115, 38]. Moreover, it has been hypothesized that when the airflow from the rotors impacts the ground, it forms a flow below the center of the fuselage, resulting in a net upload [47]. This fountain flow also creates a net upload onthe Quad TiltRotor (QTR) fuselage [111]. It has been measured that the QTR thrust ratio reaches the out of GE value only after a height-to-radius ratio of 5 [153]. This is in contrast to tilt rotors where the thrust ratio reaches the out of GE value after a height-to-radius ratio of 3. For both the tilt rotor and the QTR, the effect of the ground fades away with the increase in height and forward velocity [65].

3.1.2 Forward Flight

The effects of the ground on rotor performance in forward flight are also significant, but here the flow state tends to be more complicated. In forward flight, wherethe airflow is swept behind the rotor, the effect of the ground decreases quickly with forward speed. The GE is usually considered negligible for 푉 > 2푣ℎ or for advance ratios greater than 0.10, where 푣ℎ is the ideal hover induced velocity. A representative plot of the power ratio versus forward speed is shown in Fig. 3-2. In the same report containing Eqn. (3.2), Cheeseman and Bennet [26] presented a mathematical expression for the thrust ratio in forward flight reference blade with respect to its initial position.

62 1 Measurements, OGE Measurements, IGE 0.9 Predictions, OGE Predictions, IGE ∞ h 0.8

0.7 Power ratio, P/P 0.6

0.5 0 10 20 30 40 50 60 Forward speed [kt] Figure 3-2: Measurements and predictions of rotor power versus forward speed when operating near the ground [109].

[︂ 푇 ]︂ [︂ (푅/4푧)2 ]︂−1 = 1 2 , (3.4) 푇∞ 푃 =const − 1 + (휇/휆)

where 휇 is the advance ratio, and 휆 is the inflow ratio. This formula displays the correct behavior as long as 푧/푅 is above 0.5. It should be observed that Eqn. (3.2) is a particular case of Eqn. (3.4), when 휇 = 0. In addition, the effect of blade loading was incorporated into this model, but it will not be discussed here for the sake of brevity.

In 1960, Heyson [75] also analyzed helicopter GE in forward flight, using an actu- ator disk model and an image vortex system below the ground plane. Later, in 1977, the same author obtained the effect of the ground in terms of the horizontal andver- tical components of the induced velocity [76]. He found that the ground reduces the power required, but in forward flight, the effect diminishes with height more rapidly than in hover. It was also observed that for small heights and speed near hover, the net power required in GE can actually increase. This is because of the formation and influence of flow recirculation at the leading edge of the rotor. At higher speeds, a well-defined horseshoe vortex is formed under the propeller. The vortex becomes

63 smaller and eventually vanishes as the advance ratio is increased. The evolution of the ground vortex has been studied and visualized in experiments [31, 54].

Experimental and numerical techniques have been used to analyze the flow field and its impact on the performance of helicopter rotors in close proximity to a ground plane. Griffiths et al. [62] developed a free-vortex wake to examine the performance, both in hover and in forward flight. They obtained generally good agreement with experimental measurements. Nathan and Green [133, 132] performed experiments in a wind tunnel with a rolling band as a road to investigate the structure of the wake. It was observed that the moving road had a remarkable effect on the flow. Filippone et al. [48] used several computational methods, ranging from lifting surface line to unsteady Reynolds-averaged Navier-Stokes equations, to address the nature of helicopter wakes in presence of a flat surface. These methods were validated for hover (Light’s experiment) and novel experiments on a scaled rotor in advancing flight.

To achieve real-time GE simulation, Khromov and Rand [95] presented a rotor wake model for computing the rotor inflow in combined forward and axial flight. Under the assumption of flat ground, they approximated the thrust ratio bythe following expression

푇 = 푒−퐺푧/푅(1 +휇 ¯2)−3/2 + 1, (3.5) 푇∞

where 휇¯ is the advance ratio normalized by 푣ℎ/Ω푅, Ω is the rotor angular velocity, and 퐺 is a parameter related to blade loading and rotor inflow ratio, which is the ratio

of 푣푖 to rotor tip speed. Then, the authors expressed 푣푖 by piecewise functions for all flight regimes, taking the axial velocity as input. This model was shown tohave a reasonable correlation with hovering experimental data and forward flight results from the Cheeseman-Bennet model.

Acknowledging the influence of arbitrary surroundings, Bludau et al. [15] pre- sented a real-time model to predict the rotorcraft motion in the vicinity of objects. They coupled a low-resolution fluid dynamics solver with a flight dynamics code. The former is based on the Lattice-Boltzmann method, in which the influence of arbitrary

64 objects on the rotor was modeled by boundary conditions. The latter is based on blade element momentum theory and was used to capture the motion of the rotor- craft. Results from the coupled model were found to agree well with reference models (Cheeseman-Bennet, Khromov) but guarantees were not given on its numerical con- vergence.

3.2 Model Helicopter

In the study of the effect of the ground on full-scale helicopters, the use of scaled rotors is common. While the main focus in these studies is to generalize the results for full- size rotors, others have noted that small propellers behave fundamentally differently. This section discusses the research related to small rotors and model helicopters.

3.2.1 Control

Several control techniques have been proposed for small helicopters operating near the ground. Mahony and Hamel [114] designed an adaptive backstepping controller using a helicopter mathematical representation with an unknown and varying lift co- efficient. They assumed that this coefficient varies due to the presence of theground, which is estimated and compensated online. The robustness of the controller was ver- ified in simulations considering a piecewise linear function to alter the lift coefficient and sinusoidal noise. Yu et al. [190] opted for identifying, from experimental data, two transfer functions for the vertical displacement: one for far from the ground op- eration, and the other for close to the ground operation. Then, two linear-quadratic with integral controllers were designed using the identified models. They success- fully landed a real small helicopter employing feedback from onboard sensors (stereo camera and IMU). Cesetti et al. [25] used gain scheduling to improve the altitude controller for low height flights. In a simulation, the gain of a Proportional-Integral- Derivative (PID) controller was changed as a function of Eqn. (3.3) to compensate for the GE. Nonaka and Sugizaki [141] proposed an integral sliding mode control for altitude tracking of a helicopter near the ground. The GE was compensated with an

65 experimental model of the lift force represented as a second-order polynomial function of altitude. The sliding mode control is used to cope with modeling error. In experi- ments with an external vision system, they showed that the tracking performance is improved by the compensation. Three variants of the backstepping design procedure have been presented for alti- tude control for helicopters, including robust [164], adaptive [165], and robust adap- tive [163]. In these articles, a particular model of the rotor thrust is used, in which the thrust depends on the reduction of the induced velocity due to the GE. The adaptive component of the controller estimates and compensates a parameter that is related to 푣푖. Simulation results demonstrated that the tracking performance is improved by the compensation. In another series of publications, a ring-source flow model for helicopters was developed [78, 79, 80, 81]. In addition, a nonlinear model of the altitude of a heave test stand was derived, which facilitated the design of a Linear Quadratic Regulator (LQR). The height was estimated from differential pressure measurements using a Bayesian filter along with the flow model. Results from simulations and experiments indicated that height estimation and control is possible with only flow sensing and modeling.

3.2.2 Flow Studies

Research has been carried out about proximity flow effects on small rotors. Such ro- tors operate at significantly lower Reynolds numbers [109], which means that full-scale rotor studies might have limited applicability to small rotors. This claim motivated a work that used CFD to investigate the fluid interactions between a hovering small rotor and planar surfaces [158]. The computational method was validated by com- parison against experimental results, a two-dimensional free vortex model and results from the existing literature. This study supposed that the variation in thrust gener- ates a vertical force disturbance, 푍¯, acting on the helicopter. Then, the relationship between 푍¯ and ground proximity was characterized as

66 (︁ 푧 )︁푏 푍¯ = 푚푔 푎 , (3.6) · 푅 with 푎 and 푏 fitted to the CFD results using least squares regression. Also, alinear simultaneous state and disturbance estimator was postulated. Flight tests showed that the scheme can provide fair in-flight estimates of disturbances that are induced by the ground plane using only an onboard IMU. Furthermore, given that the relationship between proximity and disturbance magnitude is known a priori, it was possible to use the disturbance estimate to passively estimate proximity. Prothin et al. [84, 149, 148] studied the interactions of a small hovering rotor with its surroundings (ground and wall). The influence of the environment on the rotor’s aerodynamic performance and the flow field is studied. The results are analyzed and compared to the free flight case. The analysis was carried out by both numerical and experimental approaches, validating the first with results from the second. They disclosed that while the study revealed interesting features, further experiments and simulations are required.

3.2.3 Modeling

The modeling of the GE for small rotors has attracted the attention in the UAV com- munity. Hosseini et al. [82] performed a study on a tilted ducted fan to characterize the GE while hovering and develop a practical model for real-time predictions. They performed CFD simulations, which were validated by experimental and theoretical information. The practical model was proposed as a dipole flow model (see Fig. 3-3) and was compared with the CFD results. It was shown that the dipole model, whose parameters were defined empirically, is able to predict the fan performance accurately. Singularities exist in widely-used empirical models (Cheeseman-Bennet and Hay- den). Furthermore, blade geometry parameters are generally neglected. To overcome these drawbacks, a new GE model, inspired from Eqn. (3.5), was proposed that pre- dicts a finite maximum thrust ratio based on Blade Element Theory (BET), which was used to describe the model parameters in terms of the rotor pitch angle and

67 (a) (b)

Figure 3-3: The flow patterns for a fan in GE represented as a source (a) andadipole (b) [82]. solidity [71]. Specifically, the model is expressed as

푇 −퐶푏푧/푅 = 퐶푎푒 + 1, (3.7) 푇∞ where 퐶푎 and 퐶푏 are two coefficients that depend on the blade geometry. This model is valid for the hovering case only. Experiments were carried out to validate the model. These results showed that the theoretical prediction provides a statistically significant relation to the actual data.

3.3 Multirotor

Even though akin, helicopters and multirotors differ greatly on their mechanical struc- ture and operation. In short, a helicopter is operated by varying the pitch angle of the main rotor blades and of the tail rotor blades. On the other hand, multirotors are equipped with fixed pitch propellers whose only operational variable is rotational speed. Moreover, the airflow around multiple lifting rotors is not the same asaround a single lifting rotor. These differences have been the motivation of a research niche considering all aspects of small multirotors, including the GE.

68 3.3.1 Control

As with model helicopters, various control approaches have been presented for mul- tirotors operating in close proximity to the ground. For the problems that arise in this condition, the most widely used control method is adaptive control. Guenard et al. [64] proposed an adaptive altitude controller that estimates online the global thrust coefficient of a quadcopter (assuming that the thrust coefficient isthesame for all the rotors). To deal with the noised value of the ultrasonic sensor used in the onboard altitude loop, they designed an estimator of the vertical position and velocity. It was noted that using the adaptive controller and the estimator worked well in experiments with a quadrotor prototype (only results for heights above 0.5 m were reported, situation in which the GE might not be significant given the size of the prototype), although bad measurements from the ultrasonic sensor can destabilize the system.

Lee et al. [106] compared in simulations two nonlinear control methods for quad- copters: feedback linearization and adaptive sliding mode. The first was designed as an 푥-푦-푧 control, and the second as a trajectory tracking control. They considered an unknown acceleration term, representing the GE, while designing of the adaptive controller. In the tests, the GE term was assumed to be given by

⎧ 퐴 퐴 ⎪ 2 2 0 < 푧 < 푧0 ⎨ (푧+푧푐푔) (푧0+푧푐푔) 푔푟(푧) = − , (3.8) ⎩⎪0 otherwise where 퐴 is a constant, 푧푐푔 is the 푧-component of the center of gravity, and 푧0 is the altitude under which the ground affects the vehicle. It was found that the conventional feedback linearization controller is not robust to uncertainty and sensor noise. Also, it was noted that the adaptive sliding mode controller performs well under sensor noise and that it is able to compensate the uncertainty caused by the GE. In another paper by the same lead author, the adaptive part of a sliding mode controller was represented as a neural network whose weights were adjusted to approximate the values of additive unknown disturbances acting on the accelerations of the inertial

69 푧-axis (due to GE), and of the body roll, pitch, and yaw angles. This adaptation algorithm was tested with a 0.8 kg quadcopter. The state of the vehicle was obtained from a MoCap system and an IMU. After control calculation in an offboard PC, the reference commands were sent to the quadrotor by a RC transmitter. Experimental results showed that, with the adaptation rule, the tracking performance was improved, especially along the 푧-axis.

Mirzaei et al. [122] applied adaptive fuzzy sliding mode control to a quad- copter. They took the quadrotor mathematical model of [106] and considered an extra bounded external disturbance. The authors designed the sliding mode part as a trajectory tracking controller that copes with the external disturbance. On the other hand, two fuzzy systems were proposed to estimate uncertainties and the GE. The complete system was evaluated in a simulation with Gaussian noise and the model of the GE in Eq. (3.8), showing good results for a landing maneuver.

Hu et al. [83] proposed a control structure to achieve the landing of a quadrotor onto a vertically oscillating platform. The structure consisted of three modules: a motion estimation module, a trajectory generation module, and an adaptive robust tracking controller. This last module was conceived with a simplified dynamics of the vertical direction. It estimates an uncertain equivalent inertia online, 푚/푘퐺, which is altered by the GE. A theorem was provided on the boundness of the tracking error. Experiments with a Nano Plus quadrotor showcased that landing with adaptation reduces the tracking error when the quadrotor approaches the ground. The controller was executed in an offboard computer using measurements of vertical position from a MoCap system, and vertical acceleration from an IMU.

A pair of authors have explored Model Reference Adaptive Control (MRAC) for quadrotors operating close to the ground. In the thesis of Ashrad [4], a numerical formulation of MRAC was studied to compensate the GE. Simulations depicted that the addition of the adaptive controller improved the system response at the time of launch, provided that a PID controller was also present. However, the system response with adaptation is similar without adaptation when tracking a trajectory. It even induces more error when the vehicle approaches the ground. Wei et al. [187] presented

70 a more effective MRAC scheme for mitigating the GE on mini quadcopters. First,a mathematical model was established through a set of experiments and validated by a flight test. It was found that the total thrust generated by the four rotors increases linearly as the multirotor approaches the ground when the rotor-to-rotor distance is small, and behaves as a quadratic function (similar to the Cheeseman-Bennet model) when the rotor to rotor distance is increased. The linear model has the form

⎧ ⎪ 푧 푧 푇 ⎨푎 푅 + 푏 if 푅 < 푐 = , (3.9) 푇 ∞ ⎩⎪1 otherwise where the values of 푎, 푏, and 푐 are retrieved from experimental data. Then, the (linear-quadratic) attitude and position controllers were introduced. It was in the position loop that the MRAC was added to a traditional PID controller. The PID was designed as a 3D position tracker, and the MRAC was added to the 푧 direction to counteract the GE. The idea is to consider a matched uncertainty (an uncertainty that enters the system through the same channel as the control input) in the original system, which can be written as a basis function with unknown coefficients. Two basis functions were considered in the study, a linear function, and a series of Radial Basis Functions (RBFs). Using the error between the real states and the reference model states, an additive control term is calculated to cancel out the said uncertainty. Experiments were performed with a ground station and a Crazyflie 2.0. The attitude loop was run onboard at 500 Hz and the position loop on the ground station at 200 Hz. In detail, the position and yaw angle of the Crazyflie was measured by a MoCap system. The results showed that the traditional PID is outperformed by the inclusion of the MRAC. Additionally, it was shown that the MRAC with RBFs has better performance than the MRAC with a linear model at the expense of extra computational load. Control schemes based on estimators or observers are also common in the litera- ture about multirotors in GE. Nobahari and Sharifi [139] implemented a continuous ant colony filter for the estimation of states and parameters. The filter requiresa mathematical model of the process, which was developed for quadrotors. This model

71 considers a GE coefficient inspired on the one proposed by Hayden. Instead ofusing the radius of one rotor, they used a greater equivalent radius to compute the coeffi- cient. In essence, this equivalent radius was introduced to magnify the effect of the ground for the quadcopter, an observation that has been noted in previous works. To deal with an inaccurate model of the GE, the filter was used to estimate and correct the errors online. However, the algorithm could not operate with a direct landing trajectory because, close to the end, it involves a near to hover condition, which is not observable in theory. For that reason, a special landing procedure was proposed containing a sinusoidal motion in the middle. This motion allows the algorithm to correctly estimate the modeling errors, which are consumed in the final phase. Simula- tion results are provided, showing that the automatic landing is accurately performed with the proposed procedure.

Du et al. [40] decoupled the quadrotor control system into three loops: position, angle, and inner loops. Dynamic inversion was applied to both the position and angle loops, while incremental nonlinear dynamic inversion was applied to the inner loop. To achieve GE rejection, Integral Extended State Observer (IESO) was combined with the inner loop. Besides, the arranged transient process technique is utilized to smooth out jumps in the reference. The ability of IESO to observe and compensate the GE was proved in simulations.

Similar to the previous work, He et al. [69] proposed to enhance the inner (atti- tude) loop with a Nonlinear Disturbance Observer (NDO). The nominal controller of the inner loop consisted of a commonly used proportional-integral-velocity controller. For its part, the NDO was in charge of observing and estimating the disturbance (force and torque) generated by the GE. To simplify the modeling process, an adap- tive law was designed for a combined motors thrust parameter. The proposed control scheme was evaluated in simulations with the full quadcopter dynamics and the GE model in Eqn. (3.7). In fact, the reduced version of this model was first described in

this work. Using BET, the maximum GE ratio was found to be max(푇/푇∞) 1.7. ≈ Simulation results showed that the NDO can effectively compensate for the GE. In a subsequent publication [70], this control scheme, without the adaptation law, was

72 validated in experiments. The NDO was implemented onboard a quadcopter and a MoCap system provided the position feedback. As a side note, the height velocity, consumed by the inner loop, was estimated by fusing the pressure measurement from a barometer and the vertical acceleration from an IMU.

Robust controllers can be used to compensate for bounded disturbances and para- metric uncertainties in nonlinear systems, such as multirotors. Waheed et al. [185] performed a numerical simulation of a robust controller applied to a quadrotor. In particular, they developed a position tracking controller using the saturated Robust Integral of the Sign of Error (RISE). The GE was simulated in the same manner as in Eqn. (3.8). The numerical outcomes showcased that the saturated RISE is able to utilize the benefits of high-gain control while assuring that the saturation limits are not exceeded. Danjun et al. [33] opted for designing a robust altitude controller by combining a PID controller with a robust compensator. Moreover, they presented the following GE model for quadrotors based on Eqn. (3.2)

푇 (︂ 푅 )︂2 푖푛푝푢푡 = 1 휌 , (3.10) 푇표푢푡푝푢푡 − 4푧 where 푇푖푛푝푢푡 is the given thrust command, 푇표푢푡푝푢푡 is the actual thrust generated by the quadrotor, and 휌 is an empirical coefficient that needs to be determined with hover tests at different altitudes. This model was used to implement a GEcompen- sator. In outdoor experiments, they showed that the inclusion of a well-adjusted GE compensator to the PID controller improves the tracking performance. On the other hand, the robust compensator provided little enhancements to the tracking perfor- mance. Also, the results indicated that the unmodified Cheeseman-Bennet model is not suitable for quadrotors. In the control loop, the altitude was measured with a camera and an ultrasonic sensor.

Keeping robustness in mind, Shi et al. [177] presented a deep-learning-based nonlinear controller (dubbed as neural lander) that improves the performance of a quadrotor during landing. Their approach combines a nominal dynamics model with an ANN that learns high-order interactions offline. Spectral normalization is applied

73 to the ANN to bound its output. This bound is exploited to design a feedback lin- earization controller, which uses the learned model online and prove system stability. The overall control performance was evaluated in experiments with a MoCap system (for accurate position, attitude and velocity estimation at 100 Hz), a WiFi router for communication, and an Intel Aero drone. It was demonstrated that the proposed con- troller significantly outperforms a baseline nonlinear tracking controller in thecases of landing and cross-table trajectory tracking. Motivated by these results, From’s thesis [53] reported the implementation of an ANN to predict the GE from the state and control input of a drone. As an extension, online learning was added to the ANN, with the final objective of adapting to new situations that are not known in advance. As in the neural lander, the ANN approximation of the GE was integrated into a non- linear feedback-linearizing controller. The overall system was tested in simulations, in which the GE was represented with Eqn. (3.10). It was found that the online network was able to slowly adapt to new situations of GE and showed in general as good results as the offline-trained network, on occasions even better. However, no stability guarantees were given for the closed-loop system.

Some studies have innovated in the sensing process of VTOL vehicles for landing in moving platforms while considering the GE. This is the case of a paper by Herissé et al. [73], in which a nonlinear (outer loop) controller that exploits optical flow is described. They consider that the vertical dynamics has a slowly varying parameter

that models the GE, 푏 1 and max(푏) = 푏푚푎푥 when 푧 = 0. Next, the stability ≥ analysis of the landing controller, which regulates the flow divergence around zero, led to an inequality relating the gain of the controller and 푏푚푎푥. This means, in essence, that the bound of the GE is taken into account in the design the controller gain. In experiments, video and inertial measurements from onboard sensors of an X4 flyer (quadrotor) are transmitted to a ground station, which computes the desired orientation and thrust that are sent to the drone’s autopilot. It was shown that the stability condition is not always verified, which caused unwanted oscillations during the landing phase. This problem is mainly because of experimental constraints (large latency and sampling time). However, the UAV was able to land with satisfactory

74 behavior. For the same problem, Lee et al. [107] used image-based visual servoing to track the platform (with fiducial markers) and generate a velocity reference com- mand. This reference is used as the input of an adaptive sliding mode controller that compensates the GE. Measurements from a MoCap system, an onboard camera, and onboard IMU are sent to an offboard PC, which computes the commands that are sent to the vehicle’s autopilot. Experimental evidence showed satisfactory landing behavior, in which the GE is estimated and compensated. Besides the increment in thrust efficiency, the GE causes variations in the pressure altitude measured by barometers [130] and distance measurements of ultrasonic sen- sors [64]. Even though several control schemes have been proposed for compensating the GE, most of them have only considered the case in which there are no faults in the rotorcraft. Taking into account faults could be fundamental to explain and control GE disturbances, which, in general, are assumed to be random. In the case that the GE is causing faults, the fault-tolerant control approach could be applied to the problem. For the benefit of the reader, the control strategies applied to the problem ofthe GE are summarized in Table 3.1.

3.3.2 Modeling

A number of models of the GE for multirotors have been presented already in the previous subsection. However, the conception of those models has not been the pri- mary concern and little or no details have been given about their validity. In this subsection, we will discuss the research that revolves around the modeling of the effect of the ground on multirotors. The earliest studies on GE modeling for multirotors were focused on applying or evaluating the classical models of thrust change obtained for helicopters. Bangura and Mahony [7] proposed a hybrid dynamic model to account for different flight states of the vehicle, including GE. The idea is to switch between states (normal, vortex ring, turbulent wake state, windmill brake state, and GE) given some predefined conditions. Equation (3.4) (Cheeseman-Bennet model for forward flight) was used to represent

75 Table 3.1: Control strategies presented in the literature.

Control strategy Sub-strategy Remarks Adaptive Backstepping [114], mea- The objective of this strategy is surement estimation [64], to adapt the controller to the lift sliding mode [106], back- coefficient parameter that changes stepping [165], robust owing to the presence of the [163, 83], MRAC [4, 187], ground. ANN [53] LQR Integral term [190] Here, the state feedback gains are optimized using a pre-defined ve- hicle dynamic model, which is lin- earized and takes into account the ground effect. Gain scheduling PID [25] The gains are scheduled as a func- tion of Eqn. (3.2). Sliding mode Integral term [141] An empirical model is used to compensate for the GE and the sliding mode control to cope with the modeling error. Observer- or Probabilistic filter [139], This strategy uses either an ob- estimator-based IESO [40], NDO [69] server or an estimator for ob- serving or estimating disturbances caused by the ground effect. Robust Backstepping [164], RISE The ground effect is compensated [185], PID + compen- with theoretical guarantees about sator [33], ANN [177] the stability of the system. Non- Optical flow [73], visual The height above ground, which conventional servoing [107], depth map is the conventional feedback, is re- feedback [9], differential pressure placed with another measurement. [79] Any of the above control strategies might be used.

76 the GE. In a different report [10], the 4 in Eqn. (3.2) (Cheeseman-Bennet model for hovering), was replaced with a constant that was later identified with experimental data collected for the kQuadNano. A similar procedure with the same quadrotor was reported by Powers et al. [147]. In their data, the GE can be observed up to 푧/푅 = 5, which is significantly higher than predicted by Eqn. (3.2). Sharf et al. [176] assessed the applicability of this model for the Draganflyer X8, which is a small rotary-wing UAV with eight propellers arranged in four coaxial pairs. Again, it was found that the GE was apparent at higher altitudes than predicted by the model.

Transition area GE Symmetry plane GE transition R 2 area

3R 3R z

x z x Obstacle

Negligible Obstacle x

WE ∞ T /

x z z T z 3R 2R

CE transition area x Transition area CE Symmetry plane Unflyable area (a) Test configuration and nomenclature (b) Aerodynamic effect map

Figure 3-4: Modeling and mapping of aerodynamic effects acting on a single rotor [172].

The rotors that are used in model helicopters are different from the ones used in small multirotors. This has motivated the study of the GE in the hovering per- formance of the latter. The work presented in [42] focused on developing a numer- ical method for predicting the thrust and power consumption in GE. The authors developed a model with blade element momentum theory which is combined with Cheeseman-Bennet predictions. The resulting model provides a purely analytical method for modeling the GE performance of a specific propeller geometry. However,

77 the authors do not explore potential interactions between multiple adjacent rotors. An experimental study [169] assessed the applicability of Eqn. (3.2) for a small hov- ering rotor (between 6 and 20 in). The results showed that this expression is a good approximation for small isolated propellers too. In a follow-up publication [172], a method was developed which allows the generation of a map of aerodynamic effects in an environment with multiple objects. First, the aerodynamic effects close to sur- faces were experimentally tested along a two-dimensional grid (Fig. 3-4a). Then, the data is combined to account for different objects in the aerodynamic map (Fig. 3-4b). On the same line, Bernard et al. [36] performed an extensive experimental campaign aimed at characterizing the GE for a small quadcopter. In particular, both an isolated rotor and the complete platform were studied. The collected results were compared against the Cheeseman-Bennet model and the model of Hayden, showing that the ef- fect of the ground is extended up to almost 푧/푅 = 4. Conyers et al. [29] went a step

further by reporting experimental data for 푇/푇∞ from two different spacings between propellers on a typical x-shaped quadrotor frame. The results suggest that Eqn. (3.2) cannot accurately predict GE performance for quadrotors. In his thesis, Conyers [28] presented more experimental data for different propeller sizes and propeller spacings.

This data was used to fit a rational polynomial for 푇/푇∞ as a function of normalized height 푥 = 푧/푅, propeller spacing 퐿, and propeller radius. A compromise was made to use an equation with the lowest order while still producing a quality fit. The final equation form is defined by

4 3 2 푇 푝1푥 + 푝2푥 + 푝3푥 + 푝4푥 + 푝5 = 3 2 , (3.11) 푇∞ 푥 + 푞1푥 + 푞2푥 + 푞3

where 푝푖 푖 = 1, 2, ..., 5 and 푞푗 푗 = 1, 2, 3 are defined as follows

2 2 푝푖(퐿, 푅) = 푎푖,1퐿 + 푎푖,2퐿 + 푎푖,3푅 + 푎푖,4푅 + 푎푖,5 , (3.12) 2 2 푞푗(퐿, 푅) = 푏푗,1퐿 + 푏푗,2퐿 + 푏푗,3푅 + 푏푗,4푅 + 푏푗,5

with constant coefficients 푎푖,푖 and 푏푗,푖 that are obtained from the fitting process.

To prevent potential issues such as selection bias or overfitting, all coefficients in

78 Eqn. (3.12) were obtained from a cross-validation procedure, from which the mean accuracy of the model was found to be within the generally adequate level of 5%. ± However, the author did not provide comparisons between the model output and measurements obtained under different conditions (radius and spacing) from the ones used in the cross-validation procedure.

Experience-based models have been developed for capturing the GE. Ryan and Kim [167] demonstrated how a vision system can be used to provide information about the GE using environmental cues. The main idea is that streamers attached to the ground will move around faster due to the pressurized airflow causing the GE. Then, the ground cushion force was learned with an 휖-support vector regression model using experimental data. Another study demonstrated that the modular recurrent neural network framework is capable of modeling a multi-input-multi-output model of a quadrotor in presence of GE [123]. The GE can also be acquired through data- driven or low-dimensional stochastic models [90]. Karydis and Hsieh [89] derived a data-driven model based on principal orthogonal decomposition to capture the GE for a hovering quadcopter. This model closely predicts the sample mean of the testing dataset. Karydis et al. [91] proposed a systematic approach that extends a determin- istic model to a stochastic regime. With this, they developed a reduced stochastic model for a quadrotor which captures the mean and variance of the experimental data at all setpoints in steady state.

In the classical rotorcraft literature, the GE is studied in static conditions, in essence, for a fixed rotor. Even when a non-fixed rotorcraft is analyzed, thedata is collected once the vehicle is at a stable hovering state. The effect of distance from the ground on the dynamics of the attitude motion is ignored. This was the main concern of Aich et al. [1] who reported a frequency-domain analysis of the roll dynamics as a function of height for a non-fixed quadcopter. A slow-down of attitude dynamics as the distance from the ground decreases is registered. Closely related, Del Cont Bernard et al. [37] identified second-order models of the pitch dynamics of a quadrotor (operated on a single degree of freedom testbed, representative of actual near hovering condition). These models show a dependence with respect to the height

79 from the ground, justifying the degradation of the attitude control effectiveness in near-ground flight.

When a rotorcraft flies past over an object, it is disturbed by the GE. Bartholomew et al. [8] proposed a system for predicting the acceleration expected when a quad- copter flies over an object. They use Gaussian process regression to learn a function that receives a depth image and yields a vertical acceleration. The qualitative results show that the predictor output is similar to the ground truth for several seen objects and just one unseen object. Also, the authors present quantitative results (average error), which they used only to compare the error for the same obstacle in different data-sets. The quantitative results provide the error mean for four unseen objects. Since the approach does not consider the velocity of the drone, it is limited to predict accelerations which are valid for a small vicinity around the training flight velocity. In a later publication [9], the same authors incorporated the prediction system into the flight control loop. To target the undisrupted level (forward) flight, they usethe predictions to adjust the throttle command when the drone passes over an object. The results display significant improvements for the and step objects. On the other hand, the system was not able to compensate for the disturbance resulting from one already seen object and overcompensated for two unseen objects, even though they were similar to the box obstacle.

As discussed before, experimental results with small quadcopters suggest that the GE may be larger than predicted by Eqn. (3.2). However, the issue had not been further analyzed. Sanchez-Cuevas et al. [168] provided an expression of the thrust increment due to the GE for coplanar quadrotors, which has been modeled similar to full-scale helicopters (Cheeseman and Bennet). To derive this expression, they use potential flow and the method of images, so that the model considers onesource located at the geometric center of each rotor and its corresponding image source.

Also, they include an additional term with an empirical coefficient, 푘푏, to account for flow re-circulation and the central body lift it generates. The expression hasthe following form

80 (a) (b)

Figure 3-5: Two flight cases for testing the influence of the ground in multirotors, (a) flying over an obstacle under the influence of the ground, and (b) hovering atapoint with only one rotor under the influence of the ground (partial GE) [168].

푇 [︁ (︁ √︀ )︁ = 1 (푅/4푧)2 푅2 푧/ (푑2 + 4푧2)3 푇∞ − − (︁ √︀ )︁ (푅2/2) 푧/ (2푑2 + 4푧2)3 (3.13) − (︁ )︁ ]︁−1 2 √︀ 2 2 3 2푅 푧/ (푏 + 4푧 ) 푘푏 , − where 푑 is the separation from each rotor axis to its adjacent rotor axes, and 푏 is the distance between two opposite rotor axes (diagonal). The authors simulated two flight situations involving an object with a flat upmost surface, refer to Fig. 3-5.In both cases, the lateral axis (푦-coordinate) of the drone remained constant, and the setpoint changed along the frontal axis (푥-coordinate). Furthermore, they compared the response of three control alternatives: a conventional scheme with cascaded PID controllers, a scheme with a torque disturbance observer in the attitude loop, and a scheme that uses a measurement of the relative distance from each rotor to the planar surface for implementing a feedforward control term in the attitude loop. Little details are provided about the simulation of the GE, but it seems that the effect is accounted for each rotor as a discontinuous event that is triggered whena

81 rotor’s center lies over the planar object. By examining the 푥-coordinate and pitch angle of the drone, the authors found the best response for the feedforward scheme, followed by the one with the disturbance observer. Then, all control alternatives were assessed in a test bench, in which a quadrotor was restricted to only rotate around the lateral axis (pitch angle). In this setup, the partial GE was introduced by placing a large plate under one of the rotors. Again, the results showcased the superior performance of the feedforward scheme over the one with the disturbance observer, and of the latter over the conventional one. Lastly, the same (partial GE) test was reproduced during normal flight only with the standard PID control scheme, showing that the disturbance in the pitch angle was similar to the one observed in the test bench. Nevertheless, the magnitude of the disturbance was greater in normal flight than in the test bench when the plate is retired. Equation (3.13) was acknowledged in a book chapter about aerodynamic effects in aerial manipulation [171].

A better understanding of GE both at hover and in forward flight can provide useful information for control and motion planning. Keshavarzian and Danesjou [93] presented a modified model of the GE for all flight types near the ground that considers a surface quality coefficient. The authors claimed that the ground surface plays a significant role in the GE. The maximum value of GE occurs at flat andhard surfaces. On the other hand, it is less over uneven surfaces. The previous claim was confirmed for two cases: flat concrete, and grass. They took measurements of differential pressure below a hovering quadrotor, over each surface and at different heights. It was observed that the values measured over flat concrete were higher than the ones over grass. More pressure means less induced velocity, which translates to a greater thrust ratio in GE. Therefore, the GE is greater over flat concrete than over grass. Then, by simplifying the relationship between induced velocity and aircraft

82 speed, and considering Eqn. (3.4), the proposed model is

⎧ [︃ ]︃−1⎫−1 푇 ⎨ (︂ 푅 )︂2 (︂ 1 )︂2 ⎬ = 1 1 + 푣푎 , (3.14a) 푇∞ ⎩ − 4푧 푘푠 ⎭ √︀ 푥˙ 2 +푦 ˙2 +푧 ˙2 푣 = , (3.14b) 푎 √︃ √︂ 2 2 2 (︁ 2 2 2 )︁2 푥˙ +푦 ˙ +푧 ˙ + 푥˙ +푦 ˙ +푧 ˙ + 푣4 − 2 2 ℎ

where 푘푠, 푥, and 푦 are the surface quality coefficient, position of the drone along the inertial 푥-axis, and position along the inertial 푦-axis, respectively. Relying on this model, the authors designed a backstepping control scheme for trajectory track- ing that considers Eqn. (3.14) in the computations of the control inputs. The con- trol scheme was evaluated in simulations with noise, but no further validation of Eqn. (3.14) was presented.

Shortly after, Kan et al. [88] investigated the behavior of small-scale rotorcrafts in close proximity to the ground both at hover and in forward flight. Performing an extensive experimental study, the authors found that existing models for helicopters cannot fully describe the forward motion of a quadcopter when it operates close to the ground. Consequently, they introduced two new data-driven models for quadrotors operating in GE, both at hover and in forward flight. Two variants were provided for each model: low/medium-speed, and high-speed. The two models are described in Eqn. (3.15)-(3.16), in which the low/medium-speed variants are denoted as “a”, and the high-speed variants as “b”. The required thrust to hover is denoted as 푇ℎ (under

83 ideal conditions it is equal to 푚푔/4 for a quadrotor), and the aircraft speed as 푉 .

푇 1 3푅 = − 25푧 , (3.15a) 푇 (︁ )︁3 ℎ 1 + 3 푉 50 푣ℎ 푇 1 3푅 29 (︂ 푉 )︂3 = − 25푧 . (3.15b) 푇 (︁ )︁3 250 푣 ℎ 1 + 3 푉 − ℎ 50 푣ℎ

푇 (︂ 푅 )︂ (︂ 푉 )︂2 푅 = 0.104 0.0952 0.171 + 1.02, (3.16a) 푇ℎ 푧 − 푣ℎ − 푧 푇 (︂ 푉 )︂3 (︂ 푉 )︂2 푉 = 푝1 + 푝2 + 푝3 + 푝4. (3.16b) 푇ℎ 푣ℎ 푣ℎ 푣ℎ

Terms 푝1, 푝2, 푝3, and 푝4 are linear functions of 푅/푧, where

푅 푝1 = 0.337 + 0.161 − 푧 푅 푝2 = 0.773 0.428 푧 − . (3.17) 푅 푝3 = 0.350 + 0.182 − 푧 푅 푝4 = 0.135 + 1 − 푧

It should be mentioned that the models above, which were obtained by fitting data from an AscTec Hummingbird quadrotor (54 cm motor-to-motor), were validated with data collected from a Bitcraze Crazyflie 2.0 (9.2 cm motor-to-motor). The results show that the proposed models are able to predict 푇/푇∞ for another quadrotor of different size, mass, controller, and trajectories.

Considering the models discussed throughout the paper, we classified the GE models as shown in Table 3.2.

84 Table 3.2: Classification of the ground effect models.

Model type Reference Remarks Traditional [26, 68, 95, 7] Models assuming a single rotor over flat ground. Empirical [158, 187, 168] These models were formulated using em- pirical data collected with small rotorcraft, either for a single rotor or multiple rotors. Inspired [106, 33, 71, 147, 172] Models inspired by the ones above consid- ering minor modifications. Parametric [82, 42, 29, 93, 88] Models considering major modifications to the traditional ones, such as extra parame- ters related to the surface, rotor geometry, number of rotors, or rotor separation. Learned [167, 123, 91, 8] These are machine learning models trained with experimental data collected with small multirotors Dynamic [1, 37] Such models attempt capturing transient or steady-state dynamics that arise when flying near the ground.

3.3.3 Applications

Acknowledging that the GE will influence a multirotor in certain situations can be used to improve the control performance in such situations. Alternatively, this knowl- edge can be exploited in more specific applications. The authors in [147] took advan- tage of the GE to perform a blind terrain mapping. The idea is to fly a quadrotor at a constant height and slow forward velocity over the terrain to be mapped while record- ing the average rotors speed and 푥-푦 position. Due to the GE, a relation between this speed and the quadrotor-terrain distance can be determined experimentally. Also, it is assumed that at slow forward velocities, the thrust produced is approximately the thrust required to hover. Therefore, with the recorded data, the height of the terrain underneath the rotorcraft can be estimated along the traveled path. It is important to mention that this approach is limited to estimate distances in which the GE is affecting the rotorcraft. Using an equivalent approach, a sensorless surface detection and estimation procedure is proposed in [55]. Here, the estimated height from the ground is computed as a function of the throttle command of a quadcopter (previously

85 obtained from experimental data). This estimation is used first to detect the ground, and later to land the drone. Two experiments were reported in which a quadcopter is able to land autonomously using this strategy. Nevertheless, the estimation is shown to be reliable only when the height from the ground is below 10 cm, which could lead to a crash. In the same work, ground and ceiling surfaces are considered to achieve energy-efficient path planning. From a heuristic energy relation, the authors demon- strated that it is possible to save about 10% when flying in proximity to horizontal surfaces. In [119], the author presented a validation procedure, in which the GE was in- volved, for a stochastic external wrench estimator designed for quadrotors. Basically, the output of the estimator for a quadrotor in GE at different heights was compared to an established model of the GE. It was revealed that the force estimator provides comparable results to Eqn. (3.2). Another application consisted of using the GE to provide passive lateral position stability for a quadrotor with canted rotors flying in a sloped ground channel [35]. By testing a variety of rotor cants and channel slope angles, a combination was found that gave the best balance between settling time and overshoot for the passive lateral position control task.

3.4 Other Proximity Effects

Small rotorcrafts are well suited to carrying out missions within confined environ- ments. Operation in such environments will place a small rotorcraft in close prox- imity to surfaces, not only to the ground. The second most mentioned proximity interaction is the Ceiling Effect (CE) [10, 158, 28, 171, 172], which emerges whena rotorcraft is approaching from below to a horizontal surface. Sanchez-Cuevas et al. [170] proposed a solution for bridge inspection that uses the CE to maintain contact with a specially designed quadcopter. Wang et al. [186] investigated the aerodynamic performance of a quadrotor hovering under the ceiling. They formulated a model of the CE by introducing a correction coefficient into Eqn. (3.2) to replace the 4.After that, they performed a series of CFD simulations to get the data to estimate the

86 coefficient. The fitted model indicates that the CE still existsat 푧/푅 = 2. Kocer et al. [100] presented a cascaded control structure for quadrotors subjected to the CE. The control structure consists of an attitude controller (PID) and a position controller (nonlinear model predictive). Experimental results demonstrated the effectiveness of the position controller.

Besides horizontal surfaces, vertical surfaces or walls also alter the flow through a rotorcraft. For a small hovering rotor, the authors in [160] addressed the (single) Wall Effect (WE) with CFD simulations. The results showed that the wall induces an important wake asymmetry, which produces disturbance forces and moments acting on the rotor disk. As an extension [159], the authors considered the impact of small variations in rotor attitude on airflow-wall interactions. It was found that, for ablade near a wall, the lift force fluctuates periodically as a function of the blade azimuth angle. These fluctuating lift forces generate moments at the rotor disk that varyas a function of rotor-wall separation and attitude. The WE is also contemplated in [119, 158, 28, 171].

The introduction of the ground, ceiling, and wall effects to the literature has incentivized the emergence of combinations. For example, the authors in [105], whose work has been already described in Section 3.3.1, evaluated their adaptive control proposal with a quadrotor that was required to hover near the ground and two walls. On the other hand, the authors in [149, 148] displayed three extra configurations: channel (ground and ceiling), low corner (ground and wall), and upper corner (ceiling and wall). They studied the lower corner effect numerically and experimentally for a hovering rotor. A different situation was first depicted in [171], which the authors called the pipe effect. This effect does not only depend on the distance to the obstacle, but also the size of the rotor and the tube. The pipe ground and ceiling effects were experimentally explored in [172].

87 Figure 3-6: Problems, trends, and challenges.

3.5 Discussion

With the study of aerodynamic proximity effects on rotorcrafts, many types of prob- lems appear when simulations and experiments are carried out. To solve them, re- searchers around the globe have presented new and exciting ideas. With the ongoing development of research, various trends have been formed. However, there remain many challenges on how to deal with aerodynamic proximity effects. Some of these have been addressed whereas others remain open, refer to Fig. 3-6. The autonomous navigation of rotorcraft in near-surface conditions demands bet- ter sensing and algorithms. Even though it is important to accomplish onboard perception and data processing, UAVs impose restrictions on the weight of the hard- ware, and therefore, the processing speed on board the vehicle. The use of MoCap systems limits the application scene, and it is slowly being replaced by onboard vision cameras [125]. As processing technology advances, onboard data processing will be enabled, allowing to dispense with the wireless data transmission segment. With- out this segment, the real-time computing capabilities of a UAV increase. Summing up, two major challenges remain to be solved for the perception, localization, and processing problem: fusion and filtering of diversified sensors, and real-time onboard data processing.

88 Researchers are beginning to adopt the parametric modeling approach [28, 88]. Different from classical [26, 68] and empirical approaches [168, 187], the parametric approach attempts to provide models that consist of parametrized equations that can be applied to a variety of multirotor designs. These parameters can include variables such as rotor diameter, rotor spacing, and number of rotors, just to mention a few. On the other hand, the dynamic approach tries to model the transients that occur when a rotorcraft flies close to a surface [1, 37]. The empirical approach faces the challenge of experimentally identifying any coefficient, which will be valid only for a single rotorcraft. For its part, the dynamic approach should solve the decoupling between proximity effects and control action. Moreover, all new models should endure further validation.

Meanwhile, controllers have been developed from the early PID to the present situation, in which adaptive [187], robust [93], backstepping [165], and feedback plus feedforward [9, 168] are used. A controller should address the following challenges: handle sensor faults that are common for current sensors, and exploit new models of aerodynamic interactions, such as those in [28, 88]. In terms of applications, the literature has moved from merely improving the control performance to high-level tasks, such as passive proximity estimation [158], and energy-efficient navigation [55]. In this sense, a major challenge is posed: autonomous navigation in unknown confined environments. We argue that the latter should not be studied from the point of view of control theory only, but it also has to involve other approaches whose basis are found in modern artificial intelligence techniques such as those based on computer vision and robotics. For instance, nowadays robotic systems rely on well-known techniques such as visual SLAM for localization and representation of the environment, with the caveat that their operation frequency runs much slower than MoCap systems (< 60 Hz). However, even this limitation is an opportunity to develop mechanisms to mitigate or compensate for the GE under low-frequency observations.

89 3.6 Chapter Conclusion

In this chapter, we focused on the following question: How the ground effect on rotorcraft UAVs has been attacked in the literature? To answer the question, we performed a literature review of the topic. First, we provided a summary of its origins in the study of full-scale helicopters. We proceeded to discuss the works that naturally extended the topic to model helicopters. After that, we reviewed the body of research that investigates the influence of the ground on small multirotor vehicles. We also provided a brief section describing other aerodynamic proximity effects, such as the ceiling and wall effects. Finally, we included a discussion section where problems, trends, and challenges were disclosed.

In general, the subjects of study in this review were three-fold: control, modeling, and applications. Three main control strategies were identified: adaptive, observer- or estimator-based, and robust. On the other hand, modeling studies can be classified into three groups: classical or empirical, parametric, and dynamic. Also, it was noticed that acknowledging proximity effects has the following general applications: control improvement, passive proximity estimation, and energy-efficient navigation.

This review shows that research on aerodynamic proximity effects is rapidly ex- panding and growing. It is also evident that a lot of work remains to be undertaken in the future. This includes extensive validation of new models, application of new models in control architectures, and autonomous navigation in unknown confined en- vironments, where we argue that artificial intelligence techniques based on computer vision and robotics may leverage the emergence of novel solutions. Also, we identified a knowledge gap in acknowledging and addressing GE-related faults in the control of multirotors. With the advance of simulation software, we envisage that computa- tional fluid dynamics will be used to identify empirical models of proximity effects offline while assuring a high level of accuracy. From the point of view of biomimetics, we envisage that onboard multicamera systems in tandem with artificial intelligence will be adopted for sensing and controlling aerodynamic proximity effects. Regarding the multicamera systems, we foresee that high-speed and event cameras may prove

90 useful [156].

91 92 Chapter 4

Control Optimization

In this chapter, we focus on the following question: How can mathematical optimiza- tion be applied to mitigate the ground effect on rotorcraft MAVs? To answer this question, we explore gradient optimization and optimal control. This answer will provide us with information for answering the RQ 3 in the next chapter. In the literature, a myriad of control techniques has been proposed to counteract the GE on rotorcraft MAVs. Many of these techniques yield controllers with open parameters that need to be tuned so that the closed-loop system describes the de- sired behavior. As a promising solution, optimization methods have been applied for controller tuning. The optimization process requires a mathematical model of the process and a parametric control law. These requirements pose complications for standard optimization methods since they often require both linear process models and control algorithms. In this chapter, we aim to overcome this issue by researching methods that can be used alongside nonlinear models and control laws. Moreover, we are motivated to explore this path to incorporate GE models into the optimization procedure. In Section 4.1, we explore the conjugate gradient optimization method, as well as the optimal control technique, both for nonlinear processes. Then, in Section 4.2, we extend the conjugate gradient method to consider a nonlinear control algorithm and stochastic test signals. In Section 4.3, we apply this procedure for control tuning in the presence of the GE. Finally, we provide the chapter conclusion in Section 4.4.

93 4.1 Deterministic Procedures

The quadrotor or quadcopter is now a popular type of UAV. It has a simple mechanical structure with the ability to move omni-directionally by changing the rotation speeds of its propellers. In this context, controlling a quadrotor is a difficult but interesting problem. With six degrees of freedom and only four inputs, the quadrotor is classified as under-actuated. Also, their rotational and translational motion are coupled, and the resulting mathematical model is highly nonlinear. There has been extensive research about the quadcopter making it an excellent testbed for control techniques. For the latter, optimization methods have been ap- plied to reduced mathematical models, typically linear. In contrast, in this section we explore and compare three optimization techniques to control a more elaborated quadcopter model based on a non-linear model: the first two optimization techniques focus on coefficient tuning of a PD controller; the third optimization technique deals with the optimal flight control of a quadcopter. Thus, the contributions are:

Parameter tuning of a PD control for a quadrotor by means of the conjugate ∙ gradient algorithm with two cost function gradient computation strategies: ap- proximated gradient by first-order difference formulas, and analytic Jacobian gradient.

Optimal control law computation for a quadrotor applying optimal control the- ∙ ory alongside a numeric collocation technique.

The quadrotor model to be controlled is nonlinear and coupled. ∙

The rest of this section is organized as follows: Section 4.1.1 provides a summary of the related work; Section 4.1.2 introduces the quadrotor model; in Section 4.1.3, the mathematical problem is presented; Sections 4.1.4 and 4.1.5 describe technically the gradient conjugate algorithm and the optimal control fundamentals, respectively; the details of the controllers implementation are given in Section 4.1.6; in Section 4.1.7,

94 we present the analysis of simulation results; finally, in Section 4.1.8 we summarize the findings.

4.1.1 Related Work

Several control techniques have been applied to quadcopters [195], they can be clas- sified as follows: linear, non-linear, and learning based [2]. One of the most popular for industrial process and even for quadrotors is the PID control, a popular technique because it can be easily applied to a plant without knowing the dynamical model by adjusting its gains heuristically. Some authors have controlled a linearized model of a quadrotor using PID [18, 178]. The linearized system, however, cannot be used for rapid maneuvering. To overcome this issue, more complete models have been used applying cascaded PID controllers [181]. Within this context, cascaded means that there are an inner loop and an outer one, the former stabilizes the angular rates, and the latter takes care of Euler angles stabilization. PID controllers have, in general, the potential to perform very well but their quality is, obviously, highly dependent on the gains parameters. The problem of how to tune the PID gains so it behaves opti- mally has been tackled using two main approaches: relying on the properties of the system, such as stability or linearity [16]; using extremum searching or mathematical optimization. Researchers have been using optimization to tune PID controllers for quadrotors. Kim et al. [96] compared the steepest descent and Newton’s method for tuning gain of a position-yaw PD control. Both methods converged to the same point, and authors noted that the computational load of the first algorithm was not significant but it required a large number of iterations to meet the halt condition, the other one converged in fewer iterations demanding higher computational load. A group at the University of Hangzhou proposed a PD and PID tuning approach for Euler angles and height control [194]. Their method was based on gradient optimization through a variational system. They provide comparative results for manually tuned and optimized PD and PID controllers. Heuristic, stochastic and combinations of these forms of optimization have also been applied to this problem [124, 12, 44].

95 Variational calculus, a small area of the optimization field, has allowed the develop- ment of the optimal control theory. This theory provides a framework for determining control signals that will cause a process to maximize or minimize a performance crite- rion [128]. The LQR is one kind of optimal control technique, in which the controller is given by a negative feedback of the system’s states. This approach was used to obtain vertical position controllers [3]. Three techniques were compared, a PID tuned by Integral Time-weighted Absolute Error (ITAE), a classic LQR controllers, and a PID tuned by an LQR loop. It was shown that the ITAE-tuned PID gave the faster results but not with robust gains as the LQR-based ones. The LQR technique has been widely applied to different quadrotor dynamic models and to real-world exper- iments [22, 143, 166, 45]. However, this approach works with the assumption of a linear system to be controlled, which may impose certain limitations. Some research has been carried out in which nonlinear models of quadcopters were adopted to obtain optimal transitions between states. In [103] a twelve-state model was used to generate a time-optimal trajectory between two states. Authors proposed a method combining genetic algorithms and nonlinear programming. It numerically minimizes the terminal transition time assuming piecewise constant control inputs. A group from the ETH Zürich proposed an algorithm that calculates the control inputs necessary to make the transition between a pair of known states in optimal time using the minimum principle [157, 72]. Though the method was applied to a simplified five- state quadrotor model it still remained nonlinear. In [63], a nonlinear model with six states was considered in order to compare direct and indirect methods for dynamic optimization. The Legendre Pseudospectral (direct) method was compared against the Pontryagin’s maximum (indirect) method. Both solutions were assumed to be optimal.

4.1.2 Quadrotor Model

The mathematical model of a quadrotor is derived introducing two coordinate frames: the inertial frame and the body frame. The first is fixed to the Earth, with gravity pointing in the negative 푧 direction. The second frame is attached to the drone

96 Center of Mass (CM) and describes its orientation. Here, we assume an “X” (cross) configuration, which means that the 푥-axis is oriented between the front (two) pro- pellers. The position and velocity of the quadrotor in the inertial frame is defined as (푥, 푦, 푧) and (푢, 푣, 푤), the body-frame Euler angles as (휑, 휃, 휓), and the angular rate towards body axis as (푝, 푞, 푟). It is important to note that (푝, 푞, 푟) = (휑,˙ 휃,˙ 휓˙). The ̸ body angular rate is a vector pointing along the axis of rotation and the other quan- tities are just the time derivatives of the roll, pitch, and yaw. The relation between those variables and between the frames are expressed as transformation matrices, for which details are not going to be discussed here for the sake of brevity. The state space equations, the same as in [194], are the following:

푧˙ = 푤

푤˙ = 푈1 cos 휑 cos 휃/푚 푔 − 휑˙ = (푝 cos 휃 + 푞 sin 휑 sin 휃 + 푟 cos 휑 sin 휃)/ cos 휃

휃˙ = 푞 cos 휑 + 푟 sin 휑 , (4.1) 휓˙ = (푞 sin 휑 + 푟 cos 휑)/ cos 휃

푝˙ =√ [ 2푙푈2 + 푞푟(퐼푦 퐼푧)]/퐼푥 −

푞˙ =√ [ 2푙푈3 + 푝푟(퐼푧 퐼푥)]/퐼푦 −

푟˙ =√ [ 2푈4 + 푞푝(퐼푥 퐼푦)]/퐼푧 −

where 푈1, 푈2, 푈3, 푈4, are the controller outputs, or the plant control inputs. A summary of the model variables is given in Table 4.1, and the parameters values are shown in Table 4.2.

4.1.3 Mathematical Problem

The structure of the dynamic system (4.1) is given by an Initial Value Problem (IVP) of the form

푥˙(푡) = 푓(푥(푡), 푢(푡), 푡) 푥(푡0) = 푥0, (4.2)

97 Table 4.1: Variable description.

Variable Unit Description 푧 푚 Height 푤 m/s Velocity along the 푧-axis 휑 rad Roll angle 휃 rad Pitch angle 휓 rad Yaw angle 푝 rad/s Angular rate on 푥-axis 푞 rad/s Angular rate on 푦-axis 푟 rad/s Angular rate on 푧-axis 푈1 N Control input on height 푈2 N Control input on roll 푈3 N Control input on pitch 푈4 N m Control input on yaw ·

Table 4.2: Parameter description.

Parameter Value Description 푔 9.81 m/s2 Gravity acceleration 푚 1 kg Vehicle mass 푙 0.24 m Motor-CM distance 2 퐼푥, 퐼푦, 퐼푧 0.08 kg m Moment of inertia ·

푛 where 푥˙ = 푑푥/푑푡, 푥 R an Euclidean space, 푥0 is the initial condition and 푢 is ∈ the control input that belongs to the vector space , 푓 is a vector value–function on 풰 푛 R linear or nonlinear. It is assumed that the initial time 푡0 and the final time × 풰 푡푓 are given. The performance index of this system over the time interval [푡0, 푡푓 ] is assumed to be given by the cost function:

푡 ∫︁ 푓 퐽(푢) = ℎ(푥(푡푓 ), 푡푓 ) + 푔(푥(푡), 푢(푡), 푡) = 휑(푥(푡푓 , 푢)), (4.3)

푡0 where 푥(푡푓 , 푢) is the state 푥 at time 푡푓 . We can observe that the cost function is a function of the final state reached and measures the penalty that must be paid because of the dynamic system’s trajectory (4.2). The problem is to find 푢* that ∈ 풰 98 causes the system (4.2) follow a trajectory 푥* that minimizes the cost function (4.3); that is

푢* = arg min퐽(푢), (4.4) 푢∈풰 where the function 퐽 is given by (4.3) and the state variable 푥 satisfies the IVP (4.2). To resolve the optimization problem, we use the simulation-based optimization methodology: a) given a control input 푢 we simulate the physical process given by

(4.2) over [푡0, 푡푓 ], b) we evaluate the functional 퐽 in the final state reached, c) we use an algorithm to find the optimal 푢. This process is iterative and can be time- consuming.

4.1.4 Conjugate Gradient Methods

The basic idea behind the Conjugate Gradient (CG), is geometrically clear: to take

푇 푛 steps that lead “downhill” to the function 푧(푥), 푥 = (푥1, 푥2, . . . , 푥푛) R . More ∈ precisely, the CG method has the following steps: to give an initial guess 푥0 and to construct a sequence 푥0, 푥1,..., such that 푧(푥푖+1) < 푧(푥푖). The sequence is generated until some convergence criterion is met. It does not guarantee to find the global minimum. The CG algorithm requires the gradient of the function to be optimized. We have two possibilities: to provide the analytic gradient or to provide the gradient approx- imated by differences formulas. In general, it is recommended to give the analytic gradient to reduce the numerical errors and to avoid difficulties to the unconstrained optimization problem. However, in our case we have already pointed out in the pre- vious subsection that the cost function is the result of a computational simulation, and can be impractical or expensive to compute the analytic gradient. The CG methods are simple and easy to implement. The complexity computa- tional of these types of algorithms is linear, 푂(푛), in comparison of the cubic compu- tational complexity, 푂(푛3), per iteration step of Newton’s methods or the quadratic computational complexity, 푂(푛2), for the Quasi-Newton methods. Likewise, with

99 respect to the memory requirements, Newton-type methods and Quasi-Newton type methods require quadratic memory requirement complexity in comparison of the lin- ear memory requirement complexity of the Conjugate Gradient type methods. Owing to the linear computational complexity and the linear memory requirement the CG- type methods are suited best for large problems 푛 1000, and they may outperform ≥ Newton-type methods or Quasi-Newton type methods [52, 135].

Among the CG-type methods more popular are the Fletcher-Reeves method (FR- CG), the Polak-Ribière method (PR-CG) and the Polak-Ribière positive method (PR+). In practice, the PR-CG method performs better than FR-CG [140].

In our case, the analytic gradient of the cost function (4.3) is given by [66]:

퐽(푢(푡)) = 푓 푇 휆(푡), (4.5) ∇ 푢

where 푢 = 푢(푘1, 푘2, . . . , 푘푚), the mathematical model is given by the system of ordi-

nary differential equations (4.2), 푓푢 is an 푛 푚 matrix (푓푢(푥, 푢)) = 휕푓푖(푥, 푢)/휕푘푗 × 푖푗 푖 = 1, 2, . . . 푛, 푗 = 1, 2, . . . , 푚 and 휆(푡) satisfies the final–value problem on [푡0, 푡푓 ]

푇 휆˙ = 푓 휆(푡) 휆(푡푓 ) = 푥휑(푥(푡푓 , 푢)), (4.6) − 푥 ∇ and (푓푥(푥, 푢))푖푗 = 휕푓푖(푥, 푢)/휕푥푗, 푖, 푗 = 1, 2, . . . 푛. Hence, computing the gradient requires the state variable 푥(푡푓 ) and the control variable 푢, which implies that it is necessary to find the solution of (4.2) and (4.6). Likewise, we need to approximate numerically the integral given by (4.5).

When using the gradient of the cost function approximated by difference formulas of first order, we take 퐽 = 퐽(푘1, . . . , 푘푚) and calculate 휕퐽/휕푘푗, 푗 = 1, 2, . . . , 푚 as:

휕퐽(푘) 퐽(푘 + ℎ푒푗) 퐽(푘) − , (4.7) 휕푘푗 ≈ ℎ

where 푘 = (푘1, 푘2, . . . , 푘푚), 푒푗 = (0, 0,..., 1, 0,..., 0) with 1 in the place 푗-th and ℎ is a constant greater than zero.

100 4.1.5 Optimal Control

To find the optimal control that causes the system (4.2) to follow a trajectory 푥* that minimize the cost function (4.3), we need to apply variational methods to optimal control problems. In our case, by the Pontryagin’s Maximum Principle (PMP) we need to solve the following equations:

퐻 = 푔(푥(푡), 푢(푡), 푡) + 휆푇 푓(푥(푡), 푢(푡), 푡) (4.8) 휕퐻 푥˙(푡) = (푥(푡), 푢(푡), 휆(푡), 푡) (4.9) 휕휆 휕퐻 휆˙ (푡) = (푥(푡), 푢(푡), 휆(푡), 푡) (4.10) − 휕푥 휕퐻 0 = (푥(푡), 푢(푡), 휆(푡), 푡), (4.11) 휕푢

where 푡 [푡0, 푡푓 ], 퐻(푥(푡), 푢(푡), 휆(푡), 푡) is the Halmitonian of the system, 휆’s are called ∈ the co-state equations, 푓(푥(푡), 푢(푡), 푡) is given by (4.2), 푔(푥(푡), 푢(푡), 푡) is the integrand of (4.3), and 휆˙ (푡) is subject to the terminal condition

휕ℎ 휆(푡 ) = (푥(푡 ), 푡 ). (4.12) 푓 휕푥 푓 푓

It should be observed that with the Eqn (4.11) we can obtain the control law of the model. Besides, Eqn. (4.9) is the same that (4.2).

Boundary Value Problem

To find the numerical solution of (4.8), (4.9), (4.10) and (4.11) subject to (4.12),we reformulate it as a Boundary Value Problem (BVP) and use a collocation method for the solution of BVPs with the following structure:

푦′ = 푓(푥, 푦, 푝), 푎 푥 푏 (4.13) ≤ ≤ subject to general nonlinear two-point boundary conditions:

101 푔(푦(푎), 푦(푏), 푝) = 0, (4.14)

where 푝 is a vector of unknown parameters. For the above, we used the function bvp4c of MATLAB. This function implements a collocation method for the solution of BVPs [174]. The idea of a collocation method is to choose a number of points in the domain function, which are called collocation points, and choose a vector space 푉 whose dimension is finite. In this space 푉 the candidate solutions are found, for example polynomials, then a solution is selected which satisfies (4.13) with (4.14) at the collocation points. The function bvp4c use cubic polynomials.

4.1.6 Controllers Implementation

Optimal PD Controller

The PD controller feeds the plant with some weight of the error and other weight of its derivative. These weights are the parameters to be optimized by the algorithm.

푇 The entire set of parameters is 푢 = (푘푝1, 푘푝2, 푘푝3, 푘푝4, 푘푑1, 푘푑2, 푘푑3, 푘푑4) , where 푘푝푖 and

푘푑푖 are the so-called proportional and derivative parts, respectively. We want to drive

the plant to the set-points or desired values (푧ref , 휑ref , 휃ref , 휓ref ). The form of the quadrotor inputs in the case of a PD controller is given below:

푈1 = 푘푝1(푧ref 푧(푡)) 푘푑1푧˙(푡) − −

푈2 = 푘푝2(휑ref 휑(푡)) 푘푑2휑˙(푡) − − . (4.15) 푈3 = 푘푝3(휃ref 휃(푡)) 푘푑3휃˙(푡) − −

푈4 = 푘푝4(휓ref 휓(푡)) 푘푑4휓˙(푡) − − A cost function is formulated to maintain the system state as close as possible to the desired state and to minimize all the coefficients. The second objective is attainable by introducing a weighting factor 푅. Therefore, the cost function is written as:

102 ∫︁ 푡푓 2 2 2 퐽(푢) = [(푧ref 푧) + (휑ref 휑) + (휃ref 휃) 푡0 − − − 2 2 2 2 2 + (휓ref 휓) + 푅(푘 + 푘 + 푘 + 푘 − 푝1 푝2 푝3 푝4 2 2 2 2 + 푘푑1 + 푘푑2 + 푘푑3 + 푘푑4)]푑휏. (4.16)

The cost function will be treated as a state of the system, which can be done differentiating with respect to time the left-hand side and the right-hand sideof (4.16) to yield:

2 2 2 퐽˙(푢) = (푧ref 푧) + (휑ref 휑) + (휃ref 휃) − − − 2 2 2 2 2 + (휓ref 휓) + 푅(푘 + 푘 + 푘 + 푘 − 푝1 푝2 푝3 푝4 2 2 2 2 + 푘푑1 + 푘푑2 + 푘푑3 + 푘푑4). (4.17)

Substituting (4.15) into (4.1) and then concatenating (4.17) a new state space system 푥˙ = 푓(푡, 푥(푡), 푢) can be formed with 푥 = [푧, 푤, 휑, 휃, 휓, 푝, 푞, 푟, 퐽(푢)]푇 . Once this system is solved forwards in time using a fixed 푢, we can retrieve the criterion as 퐽 ← 푥9(푡푓 ). Those would be all the requirements to apply CG if we adopt approximated Jacobian gradient. On the other hand, an extra effort is needed to utilize the analytic version of the gradient in the optimization process.

The analytic Jacobian gradient is calculated as follows. The adjoint (co-state)

9×9 system, which is analytically formed with 푓푥 R as declared by (4.6), is integrated ∈ 푇 backwards in time with terminal condition 푝(푡푓 ) = 푥휑(푥(푡푓 , 푢)) = [01×8, 1] . This ∇ integration delivers the solution 푝(푡) R9 that is used to calculate our particular ∈ 9×8 eight gradient directions as stated by (4.5), where 푓푢 is in R With respect to the numerical design, a fourth order fixed step solver based on Runge-Kutta algorithm is used to solve the dynamic model and the co-state system for the analytic gradient case. The optimization problem is solved using a Polak-

103 Ribière conjugate gradient method which in turn uses a soft line search strategy. The initial conditions of the state vector are 푥(푡0) = [0, 0, 휋/4, 휋/4, 휋/4, 0, 0, 0], the set- −5 points are (푧ref , 휑ref , 휃ref , 휓ref ) = (1, 0, 0, 휋/6), the weighting factor 푅 is set to 10 , the initial guess of parameters is 푘푝푖 = 푘푑푖 = 1.5, and the system is run from 푡0 = 0 s to 푡푓 = 5 s using a step of 0.01 s.

Optimal Controller

In a similar way to the previous controller, we want to drive the plant to the set-points or desired values (푧ref , 휑ref , 휃ref , 휓ref ). In this case, we have 16 ordinary differential equations, eight correspond to the states (푥) and eight to the co-states (휆). The initial

푇 conditions of the state vector are 푥(푡0) = (0, 0, 휋/4, 휋/4, 휋/4, 0, 0, 0) , the boundary 푇 condition of co-state vector 휆(푡푓 ) = 01×8, the set-points are (푧ref , 휑ref , 휃ref , 휓ref ) = (1, 0, 0, 휋/6), the weighting factor 푅 is set to 10−5. Finally, the system is solved from

푡0 = 0 s to 푡푓 = 5 s. 푇 The optimal control 푢(푡) = (푢1(푡), 푢2(푡), 푢3(푡), 푢4(푡)) is obtained from (4.11), where:

푐표푠(푥3(푡)푐표푠(푥4(푡))휆2(푡) 푢1(푡) = − 푚푅 √2 푙휆6(푡) 푢2(푡) = − 퐼푥푅 . (4.18) √2 푙휆7(푡) 푢3(푡) = − 퐼푦푅

√2휆8(푡) 푢4(푡) = − 퐼푧푅

The cost function, in this case, is given by:

∫︁ 푡푓 2 2 2 퐽(푢) = [(푧ref 푧) + (휑ref 휑) + (휃ref 휃) 푡0 − − − 4 2 ∑︁ 2 + (휓ref 휓) + 푅 (푢푖(푡) )]푑휏. (4.19) − 푖=1

104 Substituting (4.18) into (4.1) we obtain the complete system of ordinary differen- tial equation (푥 ˙(푡), 휆˙ (푡))푇 and we have setup the Two-Point Boundary Problem that can be solved with the function bvp4c of MATLAB.

4.1.7 Results and Analysis

The nonlinear quadrotor model (4.1) and the exposed algorithms were coded in MAT- LAB. All the values of model parameters are provided in Table 4.2.

Table 4.3: Optimal control parameters and cost function values.

Symbol Approximated gradient Analytic gradient

푘푝1 50.0314 37.6668 푘푝2 16.4364 12.9335 푘푝3 14.9931 9.4117 푘푝4 6.4145 4.7500 푘푑1 14.6970 3.8609 푘푑2 1.9649 1.2023 푘푑3 5.3477 1.2232 푘푑4 4.7844 0.2196 퐽(푢*) 0.8450 0.7904

Numeric results of 푢* for the same PD structure using approximated and analytic gradients are shown in Table 4.3. The cost of the approximated gradient method represents a 6.9% increment with respect to the analytic gradient cost. Figure 4-1 shows the performance of the optimized PD controller with both ap- proximated and analytic gradient. As expected, the two methods have a nonzero steady state error vector, and the approximate version and the analytic one transfer system variables (푧, 휑, 휃, 휓) to (0.80, 0, 0, 휋/6) and (0.74, 0, 0, 휋/6), respectively. The approximated approach stabilizes height close to the mark of 1 s, without overshoot nor oscillations. The roll angle is taken to the reference in around 1 s with brief oscillations. The remaining angles, pitch and yaw, reach smoothly their set-points in about 2 s. On the other hand, the analytic version displays an aggressive response. All the plotted states exhibit overshoot and oscillations with a settling time of around

105 2 s.

(a) (b)

Figure 4-1: Performance of the tuned PD controller: (a) approximated gradient, (b) analytic gradient.

For the case of the optimal controller, simulation results are presented in Fig. 4- 2. From the figure, it can be seen that the quadrotor is transferred to the desired state values, i.e., the steady-state error is zero. Brief overshoots are observed in each plotted state, in particular, the 푧-variable exceeds its reference for 4 cm. From all the traces in the plot, height is the one with the maximum settling time of 0.5 s.

Figure 4-2: States behavior when subjected to the optimal control functions. The inner figure shows the same function performance zoomed in between the time interval 0 s to 0.6 s.

The best performance of the three exposed methods goes to the optimal controller, followed by the approximated Jacobian gradient. The 4% overshoot in height of the last approach is compensated with a nil steady state and overall faster response. The

106 next position was given to the PD tuned by the approximated Jacobian gradient due to its smoothness and reduced settling time compared to the analytic version. It is important to note that these last two approaches yielded optimal results, each for a different numerical strategy, which is why here the performance is judged bythe behavior quality instead of by the numerical value of the cost function 퐽(푢*). The comparison above can be meaningful to a user of the so far discussed opti- mization methods. Arguably, the "easiest" approach to be implemented is that of the optimal control when considering the use of an existing boundary value problem solver. The main effort is put into the coding ofa 2푛 Ordinary Differential Equa- tions (ODEs) system. The following in order is the parametric optimization with approximated Jacobian gradient. This method requires the use of a gradient conju- gate algorithm and a numerical integration method. Having met those requirements, the only thing left to do is to implement an extended 푛 + 1 model. The most intri- cate method was the analytic Jacobian gradient. It is an extension of the previous approach, which involves the elaboration of the 푛 + 1 co-state. In sum, the last opti- mization mechanism demands 2(푛 + 1) coded ODEs, plus the numerical integration of 푚 expressions. With respect to the implementation, the following considerations can be taken: the optimal control algorithm could be coded using a compiled programming language to increase efficiency; the state of the vehicle could be measured by a motion capture system, then, the instantaneous vehicle state could be fed as soon as the computation process finishes. This process could be repeated until the drone reaches the setpoint, thus providing control signals for the whole trajectory.

4.1.8 Summary

In this section, we presented an analysis for three optimization techniques to control a quadcopter whose dynamic model is highly non-linear. For this, we presented two approaches for PD control tuning based on conjugate gradient. A first approach uses an approximation of the gradient by first-order differences formulas, and the second relies on the analytic Jacobian gradient. From the simulation results, it can be seen

107 that the former demonstrates greater performance compared with the latter, with an arguably simpler implementation, which could be useful for rapid implementation of quadcopter-based applications. It is known that PD control fails to eliminate the steady-state error when the set-point is nonzero. To overcome this issue, the parametric optimization could be extended to consider the whole PID structure. Nevertheless, we took the opportunity to explore a third method implemented as an optimal controller for the nonlinear quadrotor dynamic model by applying the Pontryagin’s Maximum Principle. The proposed method treats the optimization as a boundary value problem. In addition, we used a numerical collocation method for the solution of BVPs to retrieve the optimal trajectories. This control strategy achieved a null steady-state error and fast response, thus outperforming the PD controllers whose tuning was performed via CG methods. Even though the vehicle model used in this section is nonlinear, it is still a reduced version that considers movement only along the vertical axis. This issue is addressed in the next section, in which a full nonlinear model is considered for control optimization.

4.2 Stochastic Procedure

In this section, we focus on extending the control optimization procedure discussed in the previous section. Three main extensions are considered: 1) full 6-DOF vehicle model, 2) nonlinear control algorithm, and 3) stochastic test signals. As stated before, the quadrotor is an excellent testbed for control techniques. The outcome of most control techniques is a controller with a set of customizable param- eters. Those parameters need to be tuned so that the closed-loop system follows the desired behavior. For the tuning, optimization methods have been applied to re- duced models of the process to be controlled, typically linear. In contrast, this section will explore a procedure for the optimization of a nonlinear controller considering a complete nonlinear quadcopter model and stochastic test signals. In general, the problem of how to tune a controller so it behaves optimally has

108 been tackled two main approaches: relying on the properties of the system, such as stability or linearity [16], or using mathematical optimization. Most of the work concerned with optimization of controllers for UAVs and MAVs has concentrated on the tuning of linear controllers. Even though a properly tuned linear controller like the PID is able to stabilize a MAV, its performance can be surpassed by a nonlinear controller. Moreover, the literature is lacking in optimization procedures that use of stochastic test signals, which are generally more realistic. As far as we are aware, we were the first to both treat the optimization of a nonlinear controller foraMAV,as well as considering stochastic test signals. The optimization results are tested using a bipartite system. The first part cor- responds to the orientation controller of the quadcopter which runs on the onboard computer, an ARM-based Odroid XU4 board.1 The second part carries out the posi- tion controller and runs on an off-board computer. In terms of control, the first part is equivalent to the inner loop which is assumed to be sufficiently fast to follow the required Euler angles and thrust. The second part is referred to as the outer loop which runs at a lower rate than the inner loop and is in charge of taking the drone to the desired position. This section is organized as follows: Section 4.2.1 provides background on full multirotor control; Section 4.2.2 introduces the full multirotor mathematical model; Sections 4.2.3 and 4.2.4 describe the position and attitude control algorithm, respec- tively; the details of the cost function are given in Section 4.2.5; in Section 4.2.6, we justify the use of stochastic test signals in the design of controllers; in Section 4.2.7, we present and analyze the results; finally, we summarize the findings in Section 4.2.8.

4.2.1 Background on Multirotor Control

The general elements of a control loop are the reference (푝ref , 휓ref ), the controller, the plant, and the feedback loop. Here, the main objective is to correct the behavior of some desired outputs of the plant (푝, 휂). Sensors provide measurements of the output

values, forming the feedback loop. Then, the controller computes a command (푢푑,

1https://magazine.odroid.com/odroid-xu4/

109 푓, 휏 ) based on the comparison of the feedback value and the user-defined reference. { } Finally, the loop closes when the commands are executed by the actuators of the plant. As a means to control the drone’s position in space, the attitude/inner loop is enclosed with the position/outer control loop, see Fig. 4-3. In control engineering, the scheme with two or more nested control loops is called cascade or hierarchical control. The reference of the attitude loop is now given by the output of the position loop, and the user-defined reference enters the position loop. The inner loop canbe thought as the actuator of the outer loop. Several types of sensors have been used for measuring position, being the MoCap and the GPS among the most widely used.

Figure 4-3: Cascade control scheme for multirotors.

4.2.2 Multirotor Model

The position and orientation (pose) of the UAV can be defined by assigning a world- fixed coordinate system and a body-fixed coordinate system. We denoteby 푝 R3 ∈ the origin of the body-fixed coordinates expressed in the world coordinates. We also denote by 푅 푆푂(3) the matrix that when pre-multiplied by a vector in the body- ∈ fixed coordinates yields the same vector expressed in the world coordinates. Moreover, we denote by 휂 = (휑, 휃, 휓)푇 the vector of Euler angles (roll, pitch, and yaw). The angular velocity in the body frame is denoted by 휔 R3, and the relationship between ∈ the angular velocity and the vector of Euler angles rates is encoded by 퐵 R3×3. The ∈ nonlinear model of the quadcopter can be derived using the Newton-Euler equations or the Euler-Lagrange formalism [30, 19, 21, 146]. The resulting model is:

110 푚 푝¨ = 푅 퐹 푊 + 푘¯푢 − 휂˙ = 퐵 휔 , (4.20)

퐼 휔˙ = 휏 휔 퐼휔 + 푘¯휏 − ×

where 푚 R and 퐼 R3×3 specify the mass and the inertia matrix of the drone, 푊 ∈ ∈ is the weight vector, 퐹 and 휏 define the thrust and torque vectors generated bythe ¯ ¯ 3 rotors, and the variables 푘푢 and 푘휏 elements of R are constant disturbances in the translational and orientation parts of the model. The explicit forms of the thrust, torque, and weight vectors are given as follows:

⎛ ⎞ ⎛ ⎞ ⎛ ⎞ 0 휏휑 0 ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ 퐹 = ⎜0⎟ , 휏 = ⎜휏휃 ⎟ , 푊 = ⎜ 0 ⎟ . (4.21) ⎝ ⎠ ⎝ ⎠ ⎝ ⎠ 푓 휏휓 푚푔

The rotation matrix 푅 is obtained from the fact that three coordinate rotations in sequence can describe any rotation. Selecting the order yaw-pitch-roll, the rotation matrix has the following expression:

⎛ ⎞ 푐휓푐휃 푐휓푠휃푠휑 푠휓푐휑 푠휓푠휑 + 푐휓푠휃푐휑 ⎜ − ⎟ ⎜ ⎟ 푅(휑, 휃, 휓) = ⎜푠휓푐휃 푐휓푐휑 + 푠휓푠휃푠휑 푠휓푠휃푐휑 푐휓푠휑⎟ , (4.22) ⎝ − ⎠ 푠휃 푐휃푠휑 푐휃푐휑 −

where 푠∙ and 푐∙ indicate cos( ) and sin( ) respectively. Consequently, the matrix 퐵 · · has the following form [39]:

⎛ ⎞ 1 푠휑 tan 휃 푐휑 tan 휃 ⎜ ⎟ ⎜ ⎟ 퐵(휑, 휃, 휓) = ⎜0 푐휑 푠휑 ⎟ . ⎝ − ⎠ 0 푠휑/푐휃 푐휑/푐휃

The nonlinear model (4.20) along with the backstepping technique [101] are used to design a control algorithm [27]. The control algorithm is divided in two stages, the first one handles the position and the second one handles the orientation.

111 4.2.3 Position Control Algorithm

To design the position algorithm, we assume that the orientation algorithm is fast enough so that the position of the UAV converges to the reference. The position error is defined as:

푒푝 = 푝 푝ref = 푒˙푝 =푝 ˙ 푝˙ref , (4.23) − ⇒ − with 푝ref as the desired position (reference). Then, the position control action is designed to be:

푢푑 = 푘ˆ푢 + 푚 [¨푝ref (퐾푝 + 퐾푣)푒 ˙푝 (1 + 퐾푣퐾푝)푒푝] , (4.24) − − − where 푘ˆ푢 is the estimate of 푘¯푢. As a part of the design process, we can define the velocity error as:

푒푣 =푒 ˙푝 + 퐾푝푒푝.

Therefore, the dynamics of the disturbance’s estimation is given by the following expression:

˙ 훾푢 푘ˆ = 푒 . 푢 푚 푣

The matrices 퐾푝, 퐾푣, and 훾푢 are positive diagonal and are used for tuning the position control algorithm. With this form, it can be shown that

푉˙퐿푝 = 퐾푝 < 푒푝, 푒푝 > 퐾푣 < 푒푣, 푒푣 > 0, 푡 0, − − ≤ ∀ ≥

where 푉퐿푝 is a Lyapunov function and < , > stands for the inner vectorial product. · · That is, the origin system (4.23) (in essence, 푒푝 =푒 ˙푝 = 0) is stabilized by the virtual control in (4.24).

112 4.2.4 Attitude Control Algorithm

In the case of no external disturbance, the global force moving the vehicle is 푢 = 푇 (푢푥, 푢푦, 푢푧) = 푅(휑ref , 휃ref , 휓)퐹ref 푊 . Then, it is possible to obtain the reference − values 휃ref , 휑ref , and 푓ref :

(︂ )︂ 푢푦푠휓 + 푢푥푐휓 휃ref = arctan , (4.25) 푢푧 + 푚푔 (︂ )︂ 푢푥푠휓 푢푦푐휓 휑ref = arctan 푐휃ref − , (4.26) 푢푧 + 푚푔 푢푧 + 푚푔 푓ref = . (4.27) 푐휃ref 푐휑ref

When 푢 = 푢푑, the reference values obtained from (4.25)-(4.27) are the ones needed to generate the virtual control (4.24). The remaining reference, 휓ref , can be chosen arbitrarily or conveniently. Now, the Euler angles error is defined as:

푒휂 = 휂 휂ref = 푒˙휂 =휂 ˙ 휂˙ref = 퐵 휔 휂˙ref . (4.28) − ⇒ − − Using this definition, the attitude control action is designed tobe:

[︀ −1 −1 휏 = 푘ˆ휏 + 휔 퐼휔+퐼 퐵 휂¨푑 퐵 퐵휔˙ − × − (4.29) −1 −1 −1 −1 ]︀ (퐵 퐾휂 + 퐾휔퐵 )푒 ˙휂 (퐵 + 퐾휔퐵 퐾휂)푒휂 , − −

with 푘ˆ휏 as the estimate of the constant disturbance in the attitude model. Let us define the angular velocity error as follows:

−1 푒휔 = 퐵 (푒 ˙휂 + 퐾휂푒휂).

Thus, the dynamics of the disturbance estimate is chosen to be as the expression herein:

˙ −1 푘ˆ휏 = 훾휏 퐼 푒휔.

113 The variables 퐾휂, 퐾휔, and 훾휏 are positive diagonal matrices which are used for tuning the attitude control algorithm. With this form, it can be demonstrated that:

푉˙퐿휂 = 퐾휂 < 푒휂, 푒휂 > 퐾휔 < 푒휔, 푒휔 > 0, 푡 0, − − ≤ ∀ ≥ where 푉퐿휂 is a Lyapunov function. This means that the origin of the system (4.28)

(basically, 푒휂 =푒 ˙휂 = 0) is stabilized by the control in (4.29).

4.2.5 Cost Function

The general form of the cost function, also referred to as the performance measure, was described in (4.3). In order to evaluate the performance of a system quantitatively, the designer must select a particular form of the performance measure. In classical control design techniques, typical performance criteria are system time response to step input characterized by rise time, settling time, overshoot, and steady-state ac- curacy; and the frequency response of the system characterized by gain and phase margins, and bandwidth. In optimal control, the performance measure is a mathe- matical expression that is wanted to be extremized by the control. In certain cases, the problem statement clearly indicates what to select for a performance measure, whereas in others the selection is subjective. Table 4.4 provides a summary of some typical control problems along with the mathematical expressions for the cost function associated with those problems. To clarify the notation of the table, the function 2 is the squared norm weighted with ‖·‖퐻 a matrix 퐻, that is:

푥 푟 2 = (푥 푟)푇 퐻(푥 푟) ‖ − ‖퐻 − −

Recalling the optimization problem in Section 4.1.3, the main objective is to op- timize the parameters of the position and attitude control algorithms. Inspired by the information in this section, the custom cost function chosen to achieve the main objective is given below:

114 Table 4.4: Summary of typical control problems and cost functions [128, 98].

Problem Cost Function Minimum-time: To transfer a sys- tem from an arbitrary initial state ∫︁ 푡푓 퐽 = 푑푡 = 푡 푡 . to a specified final state in mini- 푓 0 푡0 − mum time. Terminal control: To minimize the deviation of the final state of 2 퐽 = 푥(푡푓 ) 푟(푡푓 ) 퐻 . a system , 푥(푡푓 ), from its desired ‖ − ‖ value, 푟(푡푓 ). Minimum-control-effort: To 푡 푚 ∫︁ 푓 ∑︁ transfer a system from an 퐽 = 훽푖 푢푖(푡) 푑푡, or | | arbitrary initial state to a spec- 푡0 푖=1 ∫︁ 푡푓 ified final state with minimum 2 퐽 = 푢(푡) 푅 푑푡. expenditure of control effort. 푡0 ‖ ‖ 2 Tracking: To maintain the system 퐽 = 푥(푡푓 ) 푟(푡푓 ) 퐻 ‖ 푡 − ‖ state, 푥(푡), as close to the desired ∫︁ 푓 (︁ )︁ + 푥(푡) 푟(푡) 2 + 푢(푡) 2 푑푡. state, 푟(푡), in the interval [푡 , 푡 ]. 푄(푡) 푅(푡) 0 푓 푡0 ‖ − ‖ ‖ ‖

∫︁ 푡푓 {︁ 2 2 퐽 = 푝(푡) 푝ref 퐸 + 휂(푡) 휂ref 퐸 푡0 ‖ − ‖ ‖ − ‖ [︀ 푇 푇 푇 + 푟 Tr(퐾푝 퐾푝 + 퐾푣 퐾푣 + 훾푢 훾푢 푇 푇 푇 ]︀}︁ + 퐾휂 퐾휂 + 퐾휔 퐾휔 + 훾휏 훾휏 ) 푑푡, (4.30)

with 퐸 as the (3 3) identity matrix, 푟 as a scalar, and Tr( ) as the trace of a matrix. × · When minimizing (4.30), the weight 푟 expresses a preference for the parameters to have smaller squared 퐿2 norm. The value of 푟 is chosen ahead of time and controls the strength of our preference for smaller parameters. When 푟 = 0, we impose no preference, and larger 푟 forces the parameters to become smaller.

The terminal cost part of the performance measure, ℎ(푥(푡푓 ), 푡푓 ), was deemed not necessary since the control algorithm described in Sections 4.2.3-4.2.4 guarantee that the errors eventually converge to zero.

115 4.2.6 Stochastic Test Signals

Common performance specifications, such as overshoot, settling time and rise time, are given in terms of step response characteristics. Though step inputs are quite useful as test signals, stochastic test signals offer some advantages over the step. They allow the consideration of multi-input systems and are generally more realistic since few systems operate with strictly deterministic signals. The model for generating stochastic test signals consists of a random number generator followed by a hold whose output is fed to a linear filter. This consideration ensures that the majority of the test signal power lies within the pass-band of the system under consideration. Limiting the bandwidth of the stochastic signals applied to a system also helps to not upset the integration method used to calculate the system response [66]. For simplicity, first- and second-order filters were chosen of the form

푎0 푊1(푠) = 푠 + 푎0 2 , (4.31) 휔푛 푊2(푠) = 2 2 푠 + 2휉휔푛푠 + 휔푛 where 푊1(푠) has a cutoff frequency of 푎0, and 푊2(푠) has a cutoff frequency of 휔푛 with a damping factor 휉. Additionally, the variance of the test signal using these two filters is given by

푎 휎 = 0 휎2 ℎ 1 2 푅푁 휔 , (4.32) 휎 = 푛 휎2 ℎ 2 2휉 푅푁 where 휎푅푁 is the variance of the numbers produced by the random generator, and ℎ is the period of the generator. Please note that the amplitude characteristic and the frequency bandwidth of the stochastic test signal can be selected as desired by controlling the probability distribution of the generator and the transfer function. We want to use a second-order flat filter for signals exciting the plant, which means that the damping factor must be fixed to 휉 = 1/√2; the corner frequency 휔푛 must fall within the pass-band of the plant. We use the first-order filter for disturbances in

116 variables that are perturbed in real life, with a flat spectrum in the pass-band of the signal exciting the plant, that is, 푎0 > 휔푛.

In general, the form of the performance measure when a stochastic test input is the same as the one where a deterministic input is used. However, the time interval must be selected adequately. Consider that the performance measure has the general reduced form below:

∫︁ 푡푓 ∫︁ 푡푓 퐽 = [푦(푡) 푟(푡)]2 푑푡 = 푒(푡)2푑푡. (4.33) 푡0 − 푡0

Minimizing (4.33) is equivalent to minimize the following:

1 ∫︁ 푡푓 퐽 = 푒(푡)2푑푡, 푡푓 푡0 − 푡0 which is the mean square value of error. Moreover, when dealing with a stationary ergodic process we have

2 2 lim 퐽 = E[푒 ] = expected value of 푒 . (4.34) (푡푓 −푡0)→∞

From (4.34) we have that minimizing criterion (4.33) is equivalent to minimize the ensemble average of squared error when the simulation interval [푡0, 푡푓 ] is large enough. This means that (푡푓 푡0) must be chosen long enough so that the solution − of the optimization problem with one stochastic test signal from the generator, previ- ously described, is sufficient to optimize the system response for all signals fromthe generator.

In particular, one vector of stochastic test signals 푟(푡) R3 is introduced in the ∈ optimization process. Also, a vector of torque disturbances 푑(푡) R3 is added to the ∈ vehicle dynamics, see Fig. 4-4.

117 Figure 4-4: Simulation diagram for a quadcopter with torque disturbance.

4.2.7 Results and Analysis

Simulations

Testing control algorithms in computer simulations before being implemented in ex- perimental platforms is always a good practice. This section will provide simulation results in order to make relevant comparisons. First, a qualitative comparison is made between the behavior of an optimized PID and the behavior of an optimized back- stepping controller. Then, the results of the optimization process with and without stochastic test signals are compared. Concluding remarks are given at the end. The PID is a linear controller that has been applied to nonlinear systems, such as rotor-crafts. The PID controller is easy to implement and its gains can be adjusted heuristically. However, the fine tuning of this controller is not an easy task when the plant is nonlinear. There are several methods for selecting the gains of the PID for nonlinear systems. For instance, an optimization procedure with deterministic signals was applied in [117]. Given the benefits of the PID, why would anyone bother to implement a more complicated controller? The answer to this question is given here. The optimization procedure without using stochastic signals was applied to the PID controller and to the backstepping controller. The same position-attitude tran- sitioning (4.27) was used for a cascade PID control scheme. Initial conditions and references were the same for both controllers. The UAV parameters are given in Table 4.5. Figure 4-5 show the simulation results. Qualitatively, the optimization

118 Table 4.5: Simulation parameters.

Symbol Value Description 푚 0.9 kg Vehicle mass 2 퐼푥 0.1167 kg m Moment of inertia about the 푥-axis · 2 퐼푦 0.1105 kg m Moment of inertia about the 푦-axis · 2 퐼푧 0.2218 kg m Moment of inertia about the 푧-axis ℓ 0.2275 m· Arm length of the vehicle 푔 9.81 m/s2 Gravity acceleration

procedure yielded better results with the backstepping technique. This outcome can be explained as follows. The backstepping controller linearizes the closed-loop system which in turns makes the cost function hyper-surface simpler compared to the PID hyper-surface. For this reason, the remainder of this section is carried out with the nonlinear controller.

(a) (b)

Figure 4-5: Performance of the controllers tuned with deterministic signals: (a) PID, (b) backstepping.

As for the inclusion of the stochastic signals, Fig. 4-6 displays the step response of the backstepping controller optimized with stochastic signals. The stochastic test vector is obtained by filtering the signal of three normally distributed number gener-

2 ators of zero mean and 휎푅푁 = 3, with a second-order filter, 휉 = 1/√2 and 휔푛 = 0.2. In the same manner, the disturbance vector is obtained by filtering the signal of three

2 normally distributed generators of zero mean and 휎푅푁 = 0.1, with a first-order fil-

119 Table 4.6: Optimization results with deterministic and stochastic test signals.

Symbol Deterministic Stochastic

푘푝1 1.6197 1.6532 푘푝2 1.6398 1.5982 푘푝3 2.5627 2.5763 푘푣1 1.6044 1.6532 푘푣2 1.6385 1.5982 푘푣3 2.5643 2.5763 푘휂1 5.3887 5.3904 푘휂2 5.3491 5.4973 푘휂3 0.5017 1.0129 푘휔1 5.3834 5.3838 푘휔2 5.3960 5.4920 푘휔3 0.3977 0.7826

ter, 푎0 = 1. The simulation step was set to ℎ = 0.02 and the simulation interval to (푡푓 푡0) = 10. Qualitatively, the response is enhanced since the oscillations and − the overshoot are reduced. The gains found for this system are different from the ones found without stochastic signals; the gains obtained using stochastic signals are, on average, higher than the ones obtained with deterministic inputs, as shown in Table 4.6.

Figure 4-6: Performance of the backstepping controller tuned with stochastic test signals.

To conclude this section, we remark two main observations. First, we have ob- served that the proposed optimization algorithm works better with the backstepping

120 controller since it simplifies the closed-loop system. Finally, we have provided evidence that the usage of stochastic test signals offers an improvement in the optimization process.

Experiments

To validate the controller performance, we track a step function in the position set- points. The ground station side is running on a laptop with an Intel Core i7-4710HQ processor and 8 GB of RAM. An external MoCap system Vicon Vantage2 is used as the position sensor; the MoCap system frequency was configured to 100 Hz, and the frequency of the position node to 20 Hz. The onboard side is running on an Odroid XU4 (Ubuntu 16.04 without preemption and ROS Kinetic Kame) mounted over an F450 frame. An LPMS-B2 IMU is used as the orientation sensor running at 200 Hz. The Odroid is connected to a 4-channel bidirectional logic level converter (to step-up the 1.8V Odroid bus reference to 5V), then to an 8-channel PWM controller (to allow the control of the four motors through only two cables), and finally to the SimonK ESCs. To supply the power, we tethered the quadcopter with two cables: the cable of the Odroid AC adapter and the cable of a DC power supply for the motors. Figure 4-7 we provide a representation of the communication structure. Figure 4-8 shows the controller performance. Multimedia material is available at https://youtu.be/0TJL2RcKGfI. We first tested the optimization results in a test stand. Then, we fine-tuned the control parameters. Though the mathematical model used in the optimization procedure is nonlinear, it still a simplified description of the real system. Nevertheless, the optimization results do accelerate the fine-tuning process. In the tests, we noted that applying the same gains as the simulation caused the real platform to oscillate rapidly. This behavior is expected since the mathematical model does not take into account the actuator dynamics. By knowing this detail, we found that by lowering only the angular-velocity-related parameters a satisfactory control can be achieved. For comparison purposes, we plotted in Fig. 4-9 the simulation results of the optimized

2https://www.vicon.com/products/camera-systems/vantage

121 Figure 4-7: Communication/computation structure for flight tests. controller with similar initial conditions and identical set-points of the experiment. The experimental results follow the tendency of the simulation results with major differences in the behavior of the 푧-position and the yaw angle. These discrepancies can be further explained by the presence of power cables (as seen in the video) and actuator saturation.

4.2.8 Summary

In this section, we described a procedure for the optimization of controllers using stochastic test signals. We used a conjugate gradient-based algorithm in order to numerically estimate gradients of a cost function in the controller parameter space and iteratively choose a set of parameters to minimize the cost function. Additionally, the introduction of stochastic test signals allowed enhancing of the optimization results. A controller derived with the backstepping technique is used as a case study. Finally, the optimized controller was evaluated in simulations and experimentally on a custom- made quadcopter platform.

So far, we have not considered the GE in the optimization process. This will be the target in the next section.

122 (a) (b)

Figure 4-8: Experimental performance of the tuned backstepping controller: (a) po- sition, and (b) Euler angles. The set-points were set to (푥ref , 푦ref , 푧ref , 휓ref ) = (0 m, 0 m, 0.4 m, 0 rad).

(a) (b)

Figure 4-9: Simulation results of the optimized backstepping controller with similar initial conditions and same set-points as in Fig. 4-8: (a) position, and (b) Euler angles.

4.3 Ground Effect Simulation

4.3.1 Optimization with Reduced Vehicle Model

The method exposed in Section 4.2 for obtaining the optimized controller can be directly used to take into account disturbances in the quadcopter model. To include the disturbances, four stochastic signals were added to the model (4.1), namely 훿푝, 훿푞,

123 and 훿푟, the disturbance along the body 푥-axis, 푦-axis, and 푧-axis, respectively. With these signals, we simulated the disturbances caused by the GE. Also, the vertical reference, 푧ref is excited by a stochastic test signal 훿푧. Stochastic signals were generated in the following manner. First, there is an available random number generator followed by a hold. The output of the hold then feeds directly into the input of a linear filter with a transfer function 푊 (푠). By controlling the probability distribution of the random number generator and the transfer function of the linear filter, the amplitude characteristics and the frequency bandwidth characteristics of the resulting signal may be selected as desired. These considerations are taken to not upset the numerical integration used to calculate the system response. The generated random numbers were chosen to have Gaussian distribution with mean zero; the variance varies depending on the disturbed axis. The variances for 훿푧,

훿휑, 훿휃, and 훿휓 were set to 5, 5, 5, and 1, respectively. For the generation of 훿푧, the linear shaping filter was chosen as a second order filter with damping factor 휉 = 1/√2 and cutoff frequency 휔푛 = 5.5 rad/s, values which were obtained from the Jacobian in a simulation of the model with deterministic signals. The remaining stochastic signals were filtered by a first order transfer function with cutoff frequency 휔 = 1 rad/s. These values were chosen according to experimental results for the GE [1]. After applying the optimization process, we change the injection of the stochastic signals in the following manner: 훿푓 , 훿휑, 훿휃, and 훿휓 are now added to 푈1, 푈2, 푈3, and 푈4, respectively in the reduced model. With this setup, we performed a final simulation from which the results in Fig. 4-10 were retrieved. As can be seen from the behavior of the states, the controller is able to drive the system around the reference values, excepting the state 푧, which was taken to an average value below its reference. The steady-state error observed in the state 푧 is explained given that the opti- mization procedure yielded low-magnitude gains. These low gains are attributed to the low amplitude of the excitation signal 훿푧 (during the optimization) compared to the reference of the final simulation 푧ref = 1 m, and to the lack of an integral term in the controller.

124 (a) (b)

Figure 4-10: Performance of the PD controller tuned with stochastic ground effect simulation: filtered stochastic signals (a), states behavior (b). For (b), the references are (푧ref , 휑ref , 휃ref , 휓ref ) = (1 m, 0 rad, 0 rad, 휋/6 rad).

4.3.2 Optimization with Full Vehicle Model

In the previous sub-subsection, the controller was optimized for a reduced quadrotor model, which was injected with stochastic signals only. On the other hand, in this sub-subsection, we will consider the full quadrotor model and simulate the GE with the Sanchez-Cuevas model (3.13). In addition, the optimization with stochastic test signals will be applied for the nonlinear backstepping controller. Here, the stochastic test signals were injected as additive terms on the inputs of the full quadrotor model (4.20), in essence, 푓 and 휏. Specifically, the stochastic signals 훿푓 , 훿휑, 훿휃, and 훿휓 affect 푓, 휏휑, 휏휃, 휏휓, respectively. In addition, the vertical reference, 푧ref is excited by a stochastic test signal 훿푧.

The variances for 훿푧, 훿푓 , 훿휑, 훿휃, and 훿휓 were set to 10, 5, 0.5, 0.5, and 0.1, re- spectively. For the generation of 훿푧, the linear shaping filter was chosen as a second order filter with damping factor 휉 = 1/√2 and cutoff frequency 휔푛 = 5 rad/s. The remaining stochastic signals were filtered by first order filters with the following cut- off frequencies: 휔푛,1 = √10 rad/s, 휔푛,2 = √25 rad/s, and 휔푛,1 = √7 rad/s, chosen empirically. After applying the optimization process, we performed a final simulation from which the results in Fig 4-11 were obtained. As can be seen from the behavior of the

125 states, the controller is able to drive the system around the reference values. At the beginning, the state 푧 is driven quickly to the reference. However, the GE causes the state 푧 to slowly end in a value that surpass its reference. Such behavior is expected since the GE manifests as an upwards force at low altitudes. Also, the backstepping controller lacks of an integral action that can offset the GE to restore the state to its reference.

Figure 4-11: Performance of the backstepping controller tuned with the ground effect model (3.13). The references are (푥ref , 푦ref , 푧ref ) = (1, 1, 0.35) m.

Using a similar optimization procedure, we then simulate the response of the vehicle when in presence of the wall effect model described in [158], which represents a torque disturbance (as a function of wall-vehicle distance) that causes the vehicle to move towards the wall. In the simulation, the wall is situated perpendicular to the

푥-axis at 0.3 m away from the 푥-axis reference, 푥ref . The simulation results are shown in Fig. 4-12. In the figure, it can be seen that the tuned backstepping controller can drive the states around their references. However, the lack of integral action in the controller causes an steady-state error on the 푥-axis.

126 Figure 4-12: Performance of the backstepping controller tuned with the wall effect model in [158]. The references are (푥ref , 푦ref , 푧ref ) = (1, 1, 1) m.

4.4 Chapter Conclusion

In this chapter, we focused on the following question: How can mathematical opti- mization be applied to mitigate the ground effect on rotorcraft MAVs? To answer the question, we studied gradient optimization for nonlinear control. From the empirical results, we may conclude that gradient optimization can be used to tune controllers for rotorcraft MAVs subjected to the GE. Also, our results point to the conjecture that an integral action is required in the controller to overcome the steady-state error induced by the GE. Now, if the GE can be compensated with integral action, why is it still a problem? The persistence of the GE in the literature might be an indication of problems related to real-world rotorcraft platforms. These observations will guide the search for the answer to the RQ 3. Throughout this chapter, we assumed perfect feedback, that is, the state of the vehicle is available continually without glitches, such as noise or faults. Although we adapted the optimization procedure to consider stochastic signals, we did not examine the performance of the control laws in the presence of faults, which are common in real-world systems. Therefore, the question arises whether continuous nonlinear control is a viable alternative for systems with recurring faults. We will

127 focus on this issue in the next chapter.

128 Chapter 5

Discontinuous Control

In this chapter, we shift our focus from ideal to real-world conditions based on the evidence collected in the literature review and the previous chapter. To this end, we continue to tackle RQ 3. We first apply a multi-controller structure, including an integral control action, to counteract disturbances, which we first assume to be random and caused by the GE. Then, we tackle RQ 1 and RQ 2. After ascertaining the occurrence of sensor faults induced by the GE, we turn to a fault-tolerant control approach, whose building blocks are designed from scratch. Results from this ap- proach allow us to answer RQ 1, RQ 2, and RQ 3 in conjunction. As an extension, we explore how to exploit the optical flow computed from the vehicle’s onboard camera to detect and control the GE. In Section 5.1, we explain and evaluate the multi-controller structure. Subse- quently, in Section 5.2, the fault-tolerant control scheme is presented and also eval- uated. Then, we present results from the work with the optical flow in Section 5.3. Lastly, we draw our chapter conclusion in Section 5.4.

5.1 Multi-controller Structure

Small rotor-crafts, also classified MAVs, are able to operate within cluttered, confined, or indoor environments that are otherwise inaccessible to larger drones. Operation within such environments will require the rotor-craft to fly close to obstacles. This

129 will result in aerodynamic disturbances due to fluid interactions between the pro- pellers and nearby obstacles. Because micro copters have small inertia, disturbances induced by aerodynamic disturbances are likely to have a significant effect on vehicle performance. Detecting disturbances and reacting to them is essential for completing tasks safely and effectively.

When dealing with certain classical control system configurations, very large dis- turbances cannot be rejected in short times. A large part of the solutions is based on robustifying the control algorithms. The caveat of these approaches is that the computational burden is high and sometimes extremely complicated for real-time implementation.

The goal of this section is to present a control scheme for rejecting disturbances that are induced on the quadrotor by the presence of a ground plane. In the literature, a popular approach that attempts to solve this problem is observer-based control ap- proach [184, 40, 158, 188]. An observer can be applied with a feedback controller to improve flight performance in presence of external disturbances. Observers perform well if the disturbance is large and the sensor noise is small. Otherwise, inputs and outputs of the observer must be filtered, which is an intricate process. The aerody- namic effect acting on MAV that is induced by an obstacle can be predicted usinga depth image of the obstacle [8]. The authors based the predictions on learning from prior experience. Later, the prediction system was incorporated into the flight control loop as a feed-forward term on the throttle command [9]. They reported a significant improvement for some common obstacles. However, the prediction system is prone to either underestimate or overestimate the disturbance produced by dissimilar or unseen obstacles.

The general control approach followed by this section is the cascade one, where a reliable low-level controller is present as the inner loop, and the proposed control scheme is running as an outer loop. The proposal for disturbance rejection is based on a multi-controller structure that allows switching between control algorithms. For normal operation, a classical controller is used, specifically designed for reference tracking. When the output of the classical controller is below a certain threshold

130 value and the plant does not respond to this action, the algorithm switches to a specially designed controller that has a firm, fast (integral) action. The switching method uses a minimum of hardware-software resources. We prove empirically that under our approach, it is possible to improve the flight performance near ground compared to standard methods that use conventional position feedback. The section is organized as follows. In Section 5.1.1, definitions are provided for quadrotors with inner loop stabilization system. Section 5.1.2 describes the proposed control scheme. In Section 5.1.3 we discuss and analyze the effectiveness of our approach. Finally, we provide a summary in Section 5.1.4.

5.1.1 Drone Overview

We consider a quadrotor that is assumed to be symmetrical and the center of mass lies in its geometric center. The body frame (푥푏, 푦푏, 푧푏) is defined in Fig. 5-1, and the origin of this frame is expressed in a world frame (푥푤, 푦푤, 푧푤) fixed in inertial space. Since there are no large deviations from hovering in attitude, the ZYX Euler angles are used to define the roll, pitch and yaw angles휑 ( , 휃, 휓).

Figure 5-1: Quadrotor and reference frame.

In order to build the dynamic model, we should obtain physical properties like the mass, the moment of inertia matrix and motor specifications. However, for simplicity and safety, off-the-shelf quadcopters are usually sold with inner stabilization system (Fig. 5-2), which means that there is no way to control the angular speed of motor directly.

131 Figure 5-2: Quadrotor with inner stabilization system.

Table 5.1: API inputs of the Bebop 2 quadcopter.

Functions and inputs Type and range of 푥푖 Description 푏 푓1(푥1) float [-1, 1] Control of vertical speed (푣푧) 푓2(푥2) float [-1, 1] Control of roll angle (휑) 푓3(푥3) float [-1, 1] Control of pitch angle (휃) 푓4(푥4) float [-1, 1] Control of heading rate (푟)

Take the Bebop 2 drone as an example, the Software Development Kit (SDK) supports four main Application Programming Interface (API) functions as well as four input parameters to control the drone, see Table 5.1. Each API function helps to control an independent output like the vertical speed, roll angle, pitch angle, and heading rate.

5.1.2 Proposed Control Structure

The use of multi-model or multi-controller structures has provided outstanding results for non-linear systems with different operating regimes [5]. The form of the switching procedure in these structures is a specific problem for which various solutions have been proposed. The most widely used switching procedure relies on monitoring the “hot” state. The procedure deals with operating all the controllers as though they were connected to the real process, but actually applying the most adequate one [131]. Nevertheless, the overall computation complexity grows together with the number of necessary models or controllers. The proposed structure is based on two algorithms that will be switched according

132 to the situation of the controlled process. A classical controller 푢1 (PD), ensures the reference tracking and rejection of normal disturbances. The extra controller 푢2 is in charge of rejecting disturbances that may occur when the output of the first controller is small, in essence, when the output of the process is close to the reference. Indeed, we are interested in rejecting disturbances that occur when a MAV is reaching a position near a surface, we also know from experience that aerodynamic effects become more prominent as the MAV gets closer the surface, and therefore to the reference.

In more detail, 푢1 is active when the absolute value of its output is greater to a fixed threshold 푢푙1. Below this threshold, the activation of 푢2 is considered. The switching method activates 푢2 if the MAV begins to move on the contrary direction of the command of 푢1 when the absolute value of 푢1 is greater than a threshold 푢푙2 and the absolute value of the velocity is greater than 푣푙. Basically, the switch between controllers is based on the output of the traditional controller and the velocity of the vehicle. The initial value of 푢2 is set to the current error derivative. Then, the second controller changes its value depending on the change of velocity. The output of this controller is updated as in (5.1).

푢2(푘) = 푢2(푘 1) + 푘푖푒˙(푘), (5.1) − where 푒˙ =푟 ˙ 푦˙ is the error derivative, and 푖 = 1, 2, 3 is selected according to the value − of velocity change. The values of these constants are selected to match the conditions

푘1 > 푘2 > 0 and 푘3 < 0. Essentially, when the classical controller commands the vehicle to move in one direction and the vehicle moves in the opposite direction instead, the second controller will be activated and will begin to rapidly increase its output (with 푘1) as long as the vehicle still moves in the opposite direction. The vehicle is expected to stop and then start to move in the commanded direction. In this situation, the value of 푘2 will be used to slightly increase the output. On the other hand, if the vehicle responds abruptly to the command, then the constant 푘3 is enabled to decrease the output and alleviate this effect. Then, the output is held constant once the velocity of the vehicle changes sign until the classical controller outputs a

133 value below 푢푙2. After rejecting the disturbances, the second controller is deactivated and the classical controller is applied to the process. It is worth mentioning that the

entrance and departure conditions of 푢2 are not the same. For safety and to mitigate the integral windup, a saturation limit is placed on 푢2. The whole switching strategy is summarized in Algorithm 1.

Figure 5-3: Multi-controller switching structure.

Figure 5-3 shows the general structure. The symbols represent the following: 푟 –system reference, 푢 –calculated command of the whole system, 푦 –output of the

system, 푢1, 푢2 –calculated commands by the two algorithms. A diagram for the

entrance and departure conditions of 푢2 is shown in Fig. 5-4, in which 푢2푎, 푢2푏 푢2. { } ∈ Also, the behaviors of the integration constants are depicted in Fig. 5-5.

Figure 5-4: Entrance and departure conditions for 푢2.

134 Algorithm 1 Switching strategy.

function Update(푢1(푘), 푣(푘), 푣(푘 1)) − zeroCond 푢1(푘) 푢푙2 and 푣(푘) 푣푙 ← ≤ || || ≤ reachCond 푢1(푘) < 푢푙1 if zeroCond←or || !reachCond|| then 푢(푘) 푢1(푘) return← 푢(푘) end if Δ푣 푣(푘) 푣(푘 1) ← − − if 푢1(푘) > 푢푙2 and 푣(푘) < 푣푙 then if !flagP then 푢2(푘) 푒˙ flagP← true else if Δ푣← < 0 then 푢2(푘) 푢2(푘 1) + 푘1푒˙ ← − else if Δ푣 > Δ푣푙 then 푢2(푘) 푢2(푘 1) + 푘2푒˙ else ← − 푢2(푘) 푢2(푘 1) + 푘3푒˙ end if ← − Apply saturation limit to 푢2 푢(푘) 푢2(푘) ← else if 푢1(푘) < 푢푙2 and 푣(푘) > 푣푙 then if !flagN then 푢2(푘) 푒˙ flagN← true else if Δ푣← > 0 then 푢2(푘) 푢2(푘 1) + 푘1푒˙ ← − else if Δ푣 < Δ푣푙 then 푢2(푘) 푢2(푘 1) + 푘2푒˙ else ← − 푢2(푘) 푢2(푘 1) + 푘3푒˙ end if ← − Apply saturation limit to 푢2 푢(푘) 푢2(푘) else ← if flagP then if 푢1(푘) 푢푙2 then ≤ 푢(푘) 푢1(푘) flagP← false end if ← else if flagN then if 푢1(푘) 푢푙2 then ≤ 푢(푘) 푢1(푘) flagN← false end if ← else 푢(푘) 푢1(푘) end if ← end if return 푢(푘) end function

135 Figure 5-5: Structure of the integration constants.

5.1.3 Experiments

Experimental Setup

The experiments were conducted in a flight space which is instrumented with a Vicon MoCap system. We use this system to track the vehicle’s location and orientation, both to provide the feedback signal for the control loop in the baseline cases and for subsequent analysis of the vehicle’s behavior when using our approach. The pose of the vehicle is measured at 100 Hz. Our MAV is a Bebop 2 weighing 0.475 kg. It is equipped with 6” three-blade propellers. For this MAV, a ROS driver is available which allows the use of simple commands for takeoff, landing, and piloting. The MAV receives control commands via WiFi. The inner stabilization system of the MAV is run with default settings. The outer loop is run off-board on a laptop and is implemented as a ROS nodethat communicates over the network with the MoCap system (to receive the position and attitude feedback) and with the MAV (to send control commands). This outer loop is run at 30 Hz. For state estimation, we implemented an Unscented Kalman filter [118] as a ROS node that runs at the same frequency of the Vicon program. Parameters of the filter related to the Vicon system were selected according to studies of that particular system [6, 121]. In order to tune the remaining parameters of the filter, we captured measurements from a test flight in a controlled environment far from surfaces, and then compute the second derivative of the position signal. For optimizing the signal- to-noise ratio, it is essential to use differentiation with smoothing [145]. In particular,

136 we computed the second derivative with a Savitzky-Golay smooth. Therefore, we tuned the filter parameters by comparing off-line estimations of the acceleration (force over mass) with the acceleration obtained with differentiation. The reference position is tracked with a PD controller for each axis. Given a reference signal 푟(푡) and the measurement of the vehicle 푦(푡), the general form of the PD controller used is:

푒(푡) = 푟(푡) 푦(푡) − 푑 . (5.2) PD (푐; 푡) = 퐾 푒 (푡) + 퐾 푒 (푡) 퐾푝,퐾푑 푝 푐 푑 푑푡 푐

The position controller for the quadrotor uses three such PD controllers:

푢푥(푡) =PD0.5, 0.1(푥; 푡)

푢푦(푡) =PD0.5, 0.1(푦; 푡) . (5.3)

푢푧(푡) =PD0.5, 0.02(푧; 푡)

An extra PD controller maintains a desired quadrotor yaw angle:

푢휓(푡) = PD0.15, 0.01(휓; 푡). (5.4)

The gains of the PD controllers where tuned heuristically over the real quadcopter. In order to preserve the direction in global coordinates of the 푥-푦 projection of the vector generated by the position PDs, the transformation in (5.5) must be applied and then the result be sent to the vehicle.

√︁ 2 2 퐹 = 푢푥 + 푢푦 [︂ (︂ )︂ ]︂ 푢푦 푢푥,푏 = 퐹 cos arctan 휓 . (5.5) 푢푥 − [︂ (︂ )︂ ]︂ 푢푦 푢푦,푏 = 퐹 sin arctan 휓 푢푥 −

137 As reported by the literature, the most prominent effect produced by the presence of the ground plane is the increase of the thrust, which is reflected as an upwards force. For that reason, we restrict the correction scheme to consider vertical disturbances only. In this case, 푢1 푢푧 and the output of the multi-controller structure 푢 will be ≡ passed to 푓1 (see Table 5.1). Table 5.2 provides the parameters for Algorithm 1. In addition, the windup limits for the extra controller are set to 0.5. ± Table 5.2: Parameter values for the switching algorithm.

Symbol Value Symbol Value

푢푙1 0.1 푘1 0.5 푢푙2 0 푘2 0.12 푣푙 0 푘3 -0.12 ∆푣푙 0.06

For each test, the quadcopter is commanded to move from an upper vertical posi- tion to a lower vertical position that is close to the ground. For all the experiments, the vertical position reference is 0.4 m, and the lateral references are 0 m. The verti- cal reference value was chosen arbitrarily between 0.2 m and 1 m, a range that takes into account the Bebop’s factory minimum flying height and the vanishing of the GE. Figure 5-6 shows the real drone and its evolution over a test.

Figure 5-6: Bebop 2 drone during a test.

Results

Results from a test of the multi-controller are shown in Fig. 5-7. The transitions between 푢1 and 푢2 can be appreciated in this plot. There is a tendency of the positive pulses to be short in time, whereas the negative pulses tend to be wide in time.

138 This behavior can be explained by considering the GE. The presence of the ground below the rotor-craft produces a cushion of air that makes easier to move away from the ground, so positive command pulses are likely to generate more movement than negative command pulses in GE. However, this tendency is blurred sometimes because the inner stabilization of the drone is also affecting the overall behavior. This result demonstrates the ability of the multi-controller structure to adapt to the situation.

Figure 5-7: Response of the multi-controller structure.

The performance of the multi-controller structure compared the classical controller is shown in Fig. 5-8. We have plotted the response of the vertical position of five runs. For every test, the quadrotor is commanded to take off and then the outer loop control is activated. It can be seen that with the multi-controller structure, the 푧 position stays close to its constant desired value, whereas it deflects a lot from the desired value in the case of the classic controller. The corresponding statistics in Table 5.3 show that the multi-controller structure reduces the maximum, mean, standard deviation, and root mean squared error of the height by 24%, 42%, 37%, and 39%, respectively.

Table 5.3: Height error statistics comparison between a classical controller and the proposed multi-controller structure.

Statistic Classical Multi Max height error [m] 0.2979 0.2248 Mean height error [m] -0.0619 -0.0354 Height error std. deviation [m] 0.0888 0.0555 Root mean squared error [m] 0.1082 0.0659

139 Figure 5-8: Response position for five runs where the quadrotor is tracking a constant reference that is close to the ground: multi-controller structure (top) vs classical controller (bottom).

5.1.4 Summary

In this section, we presented a novel solution for the rejection of aerodynamic distur- bances that occur when a quadrotor is moving near a ground surface. We showed that using the multi-controller structure, rejection of disturbances caused by the presence of the ground can be achieved for a quadcopter. Our approach improved the accuracy of the end-point control compared to the single continuous control approach. The control strategy can be summarized along these lines: the corrective command of the extra controller is applied for a certain amount of time (related to error), after which the value of the classical controller continues to operate. The advantage of the solution includes simplicity and rapid execution; as disadvantages, we can notice the lack of an elaborate theoretical foundation. Since the extra controller is based on an integral action, we have confirmed our supposition of the previous chapter that the integral action is needed to counteract the GE. Nevertheless, keep in mind that the multi-controller structure provides a discontinuous action, which is different from

140 the continuous action of the linear PID, but is similar to the action of the control reconfiguration approach. So far, we have only examined the effects on a single axis (vertical force), butthe scheme could be easily extended to all three translation axes. On the other hand, we have used a MoCap system for retrieving the feedback for the controller proposed in this section, which is infeasible for constrained indoor environments. Furthermore, we have noted a peculiar behavior that is not in line with the literature of the GE on rotorcrafts: sudden downward movement of the vehicle. These two issues will be treated in the next section.

5.2 Fault-Tolerant Control

MAVs equipped with onboard sensors are ideal platforms for autonomous navigation. Due to payload and energy restrictions, a MAV is equipped with the least quantity of sensors. Besides the monocular camera and the IMU, it is common that a MAV is also equipped with sensors to measure the altitude, which alone or combined are referred to as altimeters. For low-level flights, the altitude is obtained from a combination ofa range sensor and a barometer. With a monocular camera, an altimeter, and an IMU the autonomous flight of a quadrotor has been achieved for indoor scenarios [125]. Multirotor MAVs can operate in complex and confined environments that are not accessible to larger drones. Within such environments, a multirotor is likely to move close to horizontal and vertical surfaces. These situations lead to the GE occurring, which is more pronounced in rotorcraft operating in hover and at low speeds. In addition to the increment of thrust efficiency, it has been reported that the GE causes variations in the pressure altitude reported by barometers [130]. The GE has been well researched for helicopters. For multirotors, several control schemes have been developed for compensating the GE, such as adaptive [106], fuzzy [122], sliding mode [141], and multi-controller [116]. However, the studies above have only considered the case in which there are no faults in the multirotor. Those controllers are not suitable for operating the vehicle in the case of actuator or sensor

141 faults. When there is no fault, a hierarchical control structure, composed by an external PD controller and an internal PI controller, is developed for trajectory tracking. In contrast to previous works, we do not use external sensors to observe the system states such as the vehicle’s pose. Instead, we employ SLAM to observe the position and orientation of the multirotor. The measurements of these states are estimated with metric, thus enabling us to implement position feedback for the external PD controller; the internal PI controller receives measurements from the altimeter. Sensor faults occur on the inner loop, and we counteract them in the outer loop. We design the fault detection unit as a logical process that depends on the weighted residual. The residual compares estimations from the SLAM system with faulty internal readings. When a sensor fault is identified, the system switches to a control sub-law. Wederive two control sub-laws: the first combines the external PD controller and a function of the residual; the second treats the sensor fault as an actuator fault and compensates with a sliding mode action. To the authors’ knowledge, this is the first time that sensor faults caused by the GE are tackled utilizing a state estimator based on monocular SLAM. The latter is a well-known technique in robotics, typically used to estimate a robot’s pose, but it had never been used to address any issues related to GE in multirotors. The remainder of this section is organized as follows. In Section 5.2.1, we briefly discuss the related work. In Section 5.2.2, we propose the fault detection unit and the control sub-laws. We present and analyze both simulation and experimental results in Section 5.2.3. Finally, we provide a summary of the findings in Section 5.2.4.

5.2.1 Related Work

A state observer incorporates a mathematical model of the quadrotor and can be used to estimate external disturbances. The estimation can be combined with a feedback controller. This combination has been reported to improve the control performance when external disturbances exist [184, 41, 161, 188]. However, the observer’s estima- tion deteriorates for small disturbances and large sensor noise. Filtering the inputs

142 and outputs of the observer can help in this case. The tuning of the filters is intri- cate, and the filters introduce delays in the estimation, which deteriorates the overall control performance. Au contraire, stochastic estimation algorithms are designed to handle process and sensor noise at the cost of increasing the computational burden. An unscented Kalman filter has been presented to estimate external force and torque for quadrotors [118]. Nevertheless, it is not clear if this approach can be applied to disturbance rejection.

In Section 5.1 [116], we have shown that the position control performance under the GE can be enhanced with a rapid switching control algorithm. The position feedback was provided by an external MoCap system at a high frequency. We pro- posed a multi-controller structure where a classical controller and an extra one with a firm variable action were combined. The latter was designed to take action when the vehicle was not responding to the former. We treated these situations as mere disturbances caused by the increment of thrust in GE. However, we noticed that sometimes, the vehicle was suddenly starting to descend without being commanded to do so. This observation has motivated us to check for possible faults in the drone. Indeed, we found spurious altimeter faults in GE. Even though our previous approach did improve the control performance, there was still room for improvement, especially in avoiding to rely on external sensors.

The literature mentioned above has only considered the case in which faults do not occur in the multirotor. In the case of actuator or sensor faults, conventional controllers are not suitable for operating the vehicle due to significant control errors. In [193], the research on fault diagnosis and fault-tolerant control for quadrotors was reviewed. Little research has examined the fault diagnosis and control for multirotors with sensor faults. In particular, the literature comprises faults in sensors like ac- celerometers, magnetometers, and rate gyros [11, 154, 137]. More recently, the work in [152] has considered faults in the velocity measurement obtained from the GPS and the Inertial Navigation System (INS). One observer was designed for detection and another to estimate the sensor fault. Under several constraints, the estimation error

143 was proved to be uniformly ultimately bounded.1 The bound is directly proportional to the magnitude of the derivative of the sensor fault. This fact might limit the effec- tiveness of such an observer since the sensor faults under the GE tend to have rapid changes. Furthermore, this approach considered faults occurring in the same loop.

In summary, the literature is lacking about the diagnosis and control of sensor faults for multirotors. Furthermore, this is the first time that sensor faults induced by the GE are reported. Consequently, the first attempts at mitigating these faults are going to be presented in this section.

5.2.2 Methods and Materials

This subsection starts with a summary of the multirotor dynamics model. Subse- quently, a specific control scheme is assumed and the stability conditions for the fault-free system are shown analytically. Finally, the fault diagnosis scheme and two control sub-laws are proposed.

Multirotor Dynamics

The mathematical model of the multirotor is deduced by introducing a world-fixed coordinate system 푊 and a body-fixed coordinate system 퐵 . By using either { } { } the Newton-Euler equations or the Euler-Lagrange formalism, the model of the mul- tirotor can be obtained [30, 19, 21]. We selected the following model to describe the multirotor unmanned helicopter:

1A dynamical system is uniformly ultimately bounded with ultimate bound 푏 if there exist positive constants 푏 and 푐, independent of 푡0 0, and for every 푎 (0, 푐), there is 푇 = 푇 (푎, 푏), independent ≥ ∈ of 푡0, such that 푥(푡0) 푎 푥(푡) 푏, 푡 푡0. ‖ ‖ ≤ → ‖ ‖ ≤ ∀ ≥ 144 푥¨(푡) = 푢푧(푡)(sin 휓 sin 휑 + cos 휓 sin 휃 cos 휑)/푚

푦¨(푡) = 푢푧(푡)(sin 휓 sin 휃 cos 휑 cos 휓 sin 휑)/푚 −

푧¨(푡) = 푢푧(푡) cos 휃 cos 휑/푚 푔 − , (5.6) 휑¨(푡) = 푢휑(푡)/퐽푥

휃¨(푡) = 푢휃(푡)/퐽푦

휓¨(푡) = 푢휓(푡)/퐽푧

where [푥, 푦, 푧]푇 R3 is the position vector from the origin of the body frame to the ∈ origin of the world frame, [휑, 휃, 휓]푇 R3 is the vector of Euler angles (roll, pitch, and ∈ 3×3 yaw), 푚 R is the mass of the vehicle, diag(퐽푥, 퐽푦, 퐽푧) R is the inertia matrix, ∈ ∈ 푇 4 푔 R is the acceleration of gravity, and [푢푧, 푢휑, 푢휃, 푢휓] R is the vector of control ∈ ∈ inputs. Assuming that the rotorcraft moves around the hovering state, the model (5.6) reduces to:

푥¨(푡) = 휃(푡)푔

푦¨(푡) = 휑(푡)푔 −

푧¨(푡) = 푢푧(푡)/푚 푔 − . (5.7) 휑¨(푡) = 푢휑(푡)/퐽푥

휃¨(푡) = 푢휃(푡)/퐽푦

휓¨(푡) = 푢휓(푡)/퐽푧

From (5.7), it is clear that the translational axes are decoupled. Thus, the 푧-axis dynamic model of the multirotor can be separated as follows:

푧¨(푡) = 푢푣(푡). (5.8)

This model implies that any possible gravity is subsumed under the 푢푣 term:

푢푧(푡) 푧¨(푡) = 푔 = 푢푣(푡), (5.9) 푚 − 145 where 푢푧(푡) = 푚[¨푧(푡) + 푔] is the actual upward thrust generated by the rotorcraft in Newtons. In control system theory, it is common to compensate factors such as

gravity and the mass into 푢푣, as the calculation of 푢푧 is straightforward and does not depend on any state variables.

Altitude Control

Before developing the fault-free control scheme, the following assumption is required.

Define 푧푟푒푓 (푡) R as the trajectory of reference. This trajectory satisfies that 푧˙푟푒푓 (푡) ∈ ∈ R, and 푧¨푟푒푓 (푡) R exist for all 푡 0. This assumption is reasonable since, in practice, ∈ ≥ the trajectory that a multirotor can track is limited by the physical attributes of the multirotor. We follow a cascade control scheme, where a low-level controller is present as the internal loop, and a trajectory tracking controller is running as the external loop [189]. The inner loop controls the velocity at a high frequency, and the outer loop controls the position at a low frequency. When there are no sensor faults, the formulation of the latter is:

푑 푢푝(푡) = 푘푝,1[푧푟푒푓 (푡) 푧(푡)] + 푘푑,1 [푧푟푒푓 (푡) 푧(푡)] +푧 ˙푟푒푓 (푡), (5.10) − 푑푡 −

where 푘푝,1 R and 푘푑,1 R are controller parameters to be designed. The reference ∈ ∈ velocity for the inner loop controller is obtained simply as 푣푟푒푓 = 푢푝. Then, the formulation of this loop’s controller is:

∫︁ 푡 푑 푢푣(푡) = 푘푝,2[푣푟푒푓 (푡) 푣푧(푡)] + 푘푖,2 [푣푟푒푓 (푡) 푣푧(푡)]푑휏 + 푘푑,2 [푣푟푒푓 (푡) 푣푧(푡)] (5.11) − 0 − 푑푡 −

where 푘푝,2 R, 푘푖,2 R, and 푘푑,2 R are controller parameters, and 푣푧(푡) R is the ∈ ∈ ∈ ∈ 푧-axis velocity of the robot.

Define the position and velocity errors as 푒푧 = 푧푟푒푓 푧 and 푒푣 = 푣푟푒푓 푣푧, − − respectively. The following two propositions provide the stability conditions for the outer and inner controllers.

146 Proposition 1. The position error 푒푧, resulting from the application of the external controller (5.10) to the model (5.8), converges asymptotically to zero if 푘푝,1/(1+푘푑,1) > 0.

Proof. Given that the internal loop is faster than the external one, we can regard the model from 푢푝 to 푧˙ as a proportion. Therefore, recalling the form of 푒푧, we have that:

푘푝,1 푒˙푧(푡) =푧 ˙푟푒푓 (푡) 푢푝 = 푘푝,1푒푧 푘푑,1푒˙푧 = 푒푧. (5.12) − − − −1 + 푘푑,1 The characteristic equation of (5.12) is:

푘 휆 + 푝,1 = 0. (5.13) 1 + 푘푑,1

Since 푘푝,1/(1 + 푘푑,1) > 0., the only root of (5.13) is negative, which implies that

(5.12) is stable and 푒푧(푡) reaches to zero asymptotically.

Proposition 2. The velocity error 푒푣, resulting from the application of the internal controller (5.11) to the model (5.8), converges asymptotically to zero if 푘푝,2/(1+푘푑,2) >

0 and 푘푖,2/(1 + 푘푑,2) > 0.

Proof. For small time steps, it is reasonable to assume constant acceleration between time steps, which means that 푣¨푟푒푓 (푡) = 0. Then, recalling the form of 푒푣, we have that:

푒˙푣(푡) =푣 ˙푟푒푓 (푡) 푣˙푧(푡) − . (5.14) 푒¨푣(푡) =푣 ¨푟푒푓 (푡) 푢˙ 푣(푡) = 푘푝,2푒˙푣(푡) 푘푖,2푒푣(푡) 푘푑,2푒¨푣(푡) − − − − Then, the system can be rewritten as:

⎡ ⎤ ⎡ ⎤ ⎡ ⎤ 푒˙푣(푡) 0 1 푒푣(푡) ⎣ ⎦ = ⎣ ⎦ ⎣ ⎦ . (5.15) 푘푖,2 푘푝,2 푒¨푣(푡) 푒˙푣(푡) − 1+푘푑,2 − 1+푘푑,2 The characteristic equation of (5.15) is:

푘 푘 휆2 + 푝,2 휆 + 푖,2 = 0. (5.16) 1 + 푘푑,2 1 + 푘푑,2

147 Since 푘푝,2/(1+푘푑,2) > 0 and 푘푖,2/(1+푘푑,2) > 0, the real parts of the roots of (5.16) are negative, which implies that the system (5.15) is stable and 푒푣(푡) reaches to zero asymptotically.

In addition to the conditions in Propositions 1 and 2, the parameters of the exter- nal and internal controllers should be determined according to the real circumstances of the multirotor under consideration. Particularly, it is common to use only PI control in the inner loop of multirotors [94]. This choice is justified in the stability analysis, where the derivative gain appears dividing the others, meaning that it slows down the internal closed-loop dynamics.

Vehicle Localization

External sensors for localization of the drone are not adequate for complex environ- ments. To overcome this restriction, we can use a visual SLAM system. We propose to use the metric monocular SLAM system presented in Section 2.6.1, which constructs synthetic depth images using measurements of the camera’s height above the ground and angle. In particular, the height above ground of the camera can be obtained from the altimeter of the drone. The camera angle can be set a priori either via hardware or via software if its field of view can be foveated. We propose to use the metric monocular SLAM system because it offers the follow- ing advantages. First, the metric monocular SLAM system is suitable for autonomous navigation, which means that such a system is likely to be already present in the control architecture. Second, if correctly initialized, it is robust against erroneous measurements of altitude. This property holds since the original SLAM algorithm, at startup, creates a keyframe with the first frame, set its pose as the origin, and create an initial map from all keypoints with depth information [127]. The system optimizes the camera pose by finding features matches to the local map. It also optimizes the entire map by keeping the origin keyframe fixed. Therefore, the initial synthetic depth image should be generated with faultless altitude readings, which are easily obtained while hovering far from horizontal and vertical surfaces.

148 Control Algorithm

External loop Internal loop Model of the z axis

¨ ˙ Fault-tolerant PI controller ( + ) − controller ∫ ∫

+

Fault detection

Figure 5-9: Fault-tolerant control schematic.

We utilize a fault-tolerant control architecture. Figure 5-9 illustrates this architec- ture applied to our problem. First, we will describe the interior of the fault detection unit. We assume that there are available three measurements related to the altitude of the drone: range-based (푦푟), inertial-based (푦푖), and vision-based (푦푣). The first measurement can be obtained from a combination of a range sensor (ultrasonic, in- frared, laser) and a barometer. The second is commonly obtained from the IMU. The last one from vision algorithms which use an onboard camera. These measurements relate to the state as:

푦푟(푡) = 푧(푡) + 훿(푡)

푦푖(푡) =푧 ˙(푡) , (5.17)

푦푣(푡) = 푧(푡) in which 훿(푡) R is the sensor fault. Let us consider 푟(푡) R2 as the residual vector ∈ ∈ defined as follows:

⎡ ⎤ ⎡ ⎤ 푟1(푡) 푦푟(푡) 푦푣(푡) 푟(푡) = ⎣ ⎦ = ⎣ − ⎦ . (5.18) 푟2(푡) 푦˙푟(푡) 푦푖(푡) −

Next, we define the residual evaluation function 퐽푒푣푎푙(푡) R with the formulation ∈ below:

149 푇 1/2 퐽푒푣푎푙(푡) = [푟 (푡)푊 푟(푡)] = 푟(푡) 푊 , (5.19) || ||

where 푊 R2×2 is a real symmetric positive definite weighting matrix. In the ∈ literature, the fault diagnosis relies only on the norm of the residual [142]. We propose the weighting matrix to select the relative importance of the different components of the residual vector. Thus, the fault detection unit is operated by a logical process:

⎧ ⎨⎪퐽푒푣푎푙(푡) 퐽푡ℎ normal case 푑푙푝 = ≤ , (5.20) ⎩⎪퐽푒푣푎푙(푡) > 퐽푡ℎ fault case

where 퐽푡ℎ R is the threshold of the fault detection unit and its value can be designed ∈ according to the experience of experts, considering uncertainties and disturbances present on the system. So far, the detection or diagnosis scheme has been presented. In what follows, we will describe the general form of the fault-tolerant control law. Then, we will derive two control sub-laws that will be activated when a sensor fault is identified; the first deals with the sensor fault directly, and the second deals with it as an actuator fault. In general, the objective is to find a fault-tolerant control law for the external loop like the following equation:

⎧ 푛 ⎨⎪푢푝 (푡) normal case 푢푝(푡) = . (5.21) ⎪ 푓 ⎩푢푝 (푡) fault case

푛 Inserting the measurement, 푢푝 will always remain as:

푛 푑 푢 (푡) = 푘푝,1[푧푟푒푓 (푡) 푦푣(푡)] + 푘푑,1 [푧푟푒푓 (푡) 푦푣(푡)] +푧 ˙푟푒푓 (푡). (5.22) 푝 − 푑푡 −

푓 The idea is to design 푢푝 such that the multirotor stays close to the trajectory of reference whenever a sensor fault is identified. If the magnitude of the sensor fault is small, the fault will not be detected by our fault detection unit. In this case, the control law (5.22) still guarantee the stability of the multirotor though the tracking

150 error will not stay close to zero. For the first control sub-law, suppose the inner loop uses a measurement withthe form of the range sensor measurement in (5.17):

∫︁ 푡 푢푣(푡) = 푘푝,2[푣푟푒푓 (푡) 푦˙푟(푡)] + 푘푖,2 [푣푟푒푓 (푡) 푦˙푟]푑휏. (5.23) − 0 − For compensating disturbances produced by sensor faults of the inner loop, we will design an additive term 푢푎 R for the outer loop. Taking into account the sensor ∈ fault and the additive term, 푢푣 becomes:

∫︁ 푡 ∫︁ 푡 푢푣(푡) = 푘푝,2푒푣(푡) + 푘푖,2 푒푣(푡)푑휏 + 푘푝,2[푢푎 훿˙(푡)] + 푘푖,2 [푢푎 훿˙(푡)]푑휏. (5.24) 0 − 0 −

From the previous equation, it is clear that 푢푎 should be designed to be equal to 훿˙. However, the time derivative of 훿 can be computed either with respect to the external loop or to the internal loop. To justify the selection, we will analyze the perturbation term 푝 = 푢푎 훿˙. Let 푇푝 and 푇푣 be the sampling periods of the external and internal − + loops, respectively. We assume that 휇 = 푇푝/푇푣 Z . In discrete form, after one step ∈ of 푇푝, it yields:

푘 (︂ )︂ ∑︁ 훿푗 훿푗−1 푝 = 푢푎 − , (5.25) − 푇푣 푗=푘−휇+1 where the subscript of 훿 denote the discrete-time index, in essence, 훿푘 = 훿(푘푇푣). The expansion of the summation results in:

(︂ )︂ (︂ )︂ 훿푘 훿푘−1 훿푘−1 훿푘−2 푝 = 푢푎 − + 푢푎 − + − 푇푣 − 푇푣 ··· (︂ )︂ (︂ )︂ 훿푘−휇+2 훿푘−휇+1 훿푘−휇+1 훿푘−휇 푇푝푢푎 (훿푘 훿푘−휇) + 푢푎 − + 푢푎 − = − − . − 푇푣 − 푇푣 푇푣 (5.26)

The last form of 푝 implies that the additive term should be 푢푎 = (훿푘 훿푘−휇)/푇푝. − This means that internal sensor faults can be countered with information available at

151 the time-steps of the external loop, no matter the values in between (at the cost of an approximation error). This is useful if the external loop receives little information about the internal one, which is likely the case when working with off-the-shelf drones. In reality, 훿 cannot be measured directly. For this reason, we propose the following expression:

푢푎(푡) = 푘푎푟2(푡). (5.27)

If both loops were to run at the same frequency, we would have nearly total fault cancellation with 푘푎 = 1 since 푟2 훿˙. However, it is important to remember that ≈ the inner loop executes faster than the outer loop, so 푢푎 remains constant until a new outer loop command is computed. In this case, choosing unitary 푘푎 will result in an overcompensation of the fault. Moreover, the value of 푟2 could be contaminated with noise. Therefore, we propose the range of this parameter to be 0 < 푘푎 < 1. Furthermore, this parameter could take different values for positive and negative

+ − disturbances, 푘푎 = 푘 , 푘 . In the end, the first control sub-law is given by following { 푎 푎 } equation:

푓 푑 푢 (푡) = 푘푝,1[푧푟푒푓 (푡) 푦푣(푡)] + 푘푑,1 [푧푟푒푓 푦푣(푡)] +푧 ˙푟푒푓 (푡) + 푢푎(푡). (5.28) 푝 − 푑푡 −

Some literature has examined converting sensors faults into actuator faults through a transformation [182, 192]. For comparison purposes, we consider sensor faults as actuator faults or disturbances and propose a second control sub-law based on Sliding Mode Control (SMC). Before going into details, some remarks are in order. The time response of the internal loop is much smaller than that of the external loop, which means that the control of velocity is faster than the one of the position. Therefore, we can neglect the response time of the velocity control and consider the model from

푢푣 to 푧¨ as a proportion. Thence, the model from 푢푝 to 푧¨ can be regarded as a double integrator. Also, we propose to activate the SMC only when a fault is detected, so

푓 푢푝 푢 . Considering disturbances or the actuator fault, the model of the 푧 axis → 푝 152 results in:

푓 푧¨(푡) = 푢푝 (푡) + 푐(푡), (5.29) where 푐(푡) is a composite disturbance term. We assume that 푐(푡) 퐶 for some | | ≤ known 퐶 > 0. Define the sliding surface 푠 with:

푠(푡) =푒 ˙푧(푡) + 푘푒푒푧(푡), 푘푒 > 0. (5.30)

The second control sub-law becomes:

푓 푢푝 (푡) =푧 ¨푟푒푓 (푡) + 푘푒푒˙푧(푡) + 푘푠 sign[푠(푡)], 푘푠 > 0. (5.31)

Proposition 3. The control (5.31) drives the position error to the sliding surface (5.30) and keeps the error on the surface thereafter in the presence of the bounded disturbance 푐(푡).

Proof. Recalling the position error 푒푧, it follows that:

푓 푒¨푧 =푧 ¨푟푒푓 푧¨ =푧 ¨푟푒푓 푢 푐. (5.32) − − 푝 − Let us select a candidate Lyapunov function as:

1 푉 = 푠2. (5.33) 2 Now, let us take the derivative of 푉 as in the usual Lyapunov method:

푓 푉˙ = 푠푠˙ = 푠(¨푧푟푒푓 푢 푐 + 푘푒푒˙푧) = 푠[푘푠 sign(푠) + 푐] = 푘푠 푠 푠푐. (5.34) − 푝 − − − | | −

Taking the absolute value of the second term and considering the disturbance bound, it results in:

푉˙ 푘푠 푠 + 푠 퐶 푠 (푘푠 퐶). (5.35) ≤ − | | | | ≤ −| | − 153 Suppose 푘푠 is chosen appropriately (푘푠 > 퐶), it yields that 푉˙ < 0 for 푠 = 0. ̸ Therefore, the region 푠 = 0 must be invariant.

Throughout the next section, we will refer as (Fault-Tolerant Controller) FTC 1 to the strategy that adopts (5.28), and as FTC 2 to the one that uses (5.31).

Equipment

For safety, we first tested the proposed control laws in simulation. The whole system was implemented in Simulink. The block diagram approach makes easy to combine continuous models with discrete systems, such as control loops running on computers. In this way, we can select the sampling period of the external and internal loops individually. Sensor measurements are obtained by simply passing the signals of the plant through zero-order-hold blocks. Also, we emulate the range sensor faults by adding the output of the uniform random number block to the position variable at specified times and intervals. In the real-world experiments, we used a Parrot Bebop 2 quadcopter for which a software driver is available allowing the usage of simple commands for takeoff, landing, and piloting. The Parrot Bebop 2 weighs 0.5 kg and has 29 cm frame. It has three- blade propellers measuring 6 inches. This drone sends and receives data via WiFi. Among the data that the drone sends, we can find the video stream from its monocular frontal camera and the altitude gained by fusing data from its ultrasonic sensor and barometer. Also, the camera angle can be controlled via the SDK.2 Lastly, we obtain the ground truth of the position with a Vicon MoCap system. We placed reflective markers on the drone and configured the capture system to deliver measurements at 100 Hz. This system provides measurements with millimeter accuracy.

5.2.3 Results and Discussion

This subsection presents results comparing the two control sub-laws described in the previous subsection. We begin by describing the general behavior of sensor faults

2https://developer.parrot.com/docs/SDK3/

154 induced by the GE. Then, the proposed strategies will be evaluated in simulation. The strategies will also be evaluated in real-world experiments. For supplementary video see: https://youtu.be/uszilXBFKP4. The project’s code is available at: https: //github.com/AMatusV/mrotor-sfaults-control.

Altitude Sensor Faults

For low-level flights, the altitude of UAVs is measured with a combination ofbarom- eters and range sensors. The first type of sensor is affected by the GE because ofthe increment in the air pressure around the vehicle [130]. In general, the second type of sensor has limitations when there are abrupt changes in the measurement surface. Particularly, ultrasonic sensors, which are perhaps the most widely used for multiro- tors, are subjected to other problems such as acoustic noise and air turbulence.3 For the latter, the best results are obtained by mounting the sensor as far away from the propellers as possible. Nevertheless, the presence of the ground induces an upwash encountering the central part of the rotorcraft body [62, 176]. Thus, flying close to the ground may cause sensor faults. Technical manuals have reported the tendency of rotorcrafts to climb back into the air when close to the ground.4,5 This is caused when the high-pressure zone below the drone affects the barometer. The result is a lower reading or sensor fault in pressure altitude, leading to the inner loop commanding an unwanted climb. Applying ultrasonic wave propagation as an airflow velocity sensor is not a new concept. Ultrasonic sensors are used in several applications such as in gas, hydraulic, and airflow meters [155, 34]. This reinforces the idea that the GE could cause ultra- sonic range sensor faults. Moreover, the authors’ experience has shown the following strange behavior when flying quadrotors close to the ground: the rotorcraft suddenly descends without being commanded to do so. This behavior is not in line with the literature about the GE. To demonstrate the general behavior of the altitude faults induced by the GE,

3https://www.maxbotix.com/ultrasonic-sensor-operation-uav.htm 4https://docs.px4.io/v1.9.0/en/advanced_config/tuning_the_ecl_ekf.html 5http://ardupilot.org/copter/docs/ground-effect-compensation.html

155 we collected data from the quadcopter described in Subsection 5.2.2. With a propor- tional outer loop controller, we commanded the drone to hover close to the ground. The feedback for this controller is obtained from the vision algorithm described in Subsection 5.2.2. Figure 5-10 presents the results of three tests in which sensor faults

actually occur. A sensor fault occurs when the altitude reported by the drone, 푦푟, deviates from the ground truth (Vicon). For example, a sensor fault appeared in Test 1 around the 40 s mark which last 3 s approximately. In Test 2, a sensor fault appeared between 27 s and 30 s. Remaining deviations in this test did not affect the vehicle significantly and could be ignored by a suitable detection threshold. Test 3 shows a fault between 25 s and 30 s, the deviation was in the opposite direction than the faults in the other tests. Another fault happened around 42 s which can be detected by an appropriate weighting of the residual. Deviations detected as sensor faults cause the inner loop to react, producing a disturbance for the outer controller, see Fig. 5-11. As expected, the position disturbance is in the opposite direction of the sensor fault.

1 1 1 Vicon Vicon Vicon y y y v v v 0.8 y 0.8 y 0.8 y r r r z z z ref ref ref 0.6 0.6 0.6

0.4 0.4 0.4 Magnitude [m] Magnitude [m] Magnitude [m] 0.2 0.2 0.2

0 0 0 20 30 40 50 20 30 40 50 20 30 40 50 Time [s] Time [s] Time [s] (a) Test 1 (b) Test 2 (c) Test 3

Figure 5-10: Position response while hovering close to the ground.

It is important to note that the vision-based measurement agrees well with the ground truth, even though it relies on the range sensor to estimate the metric pose. The vision algorithm, assuming planar ground and knowing the camera angle and distance to the ground, constructs a synthetic depth image, which is coupled to an Red-Blue-Green (RGB) frame. Then, the RGB-Depth (RGB-D) version of ORB- SLAM2 consumes this data to generate a pose estimate. Our results show that the SLAM system is robust against range sensor faults when the camera moves mainly

156 along the principal axis. In this situation, the ability to perform relocalization and reuse the map yield robustness to the system. For this to happen, the initial synthetic depth image should be generated with faultless altitude readings, which can be easily obtained while hovering far from horizontal and vertical surfaces.

(a) (b) (c)

Figure 5-11: Photographs showing the quadrotor in three conditions: a) faultless, b) descending due to an upward sensor fault, and c) ascending due to a downward sensor fault; we indicate the reference with a green line; for supplementary video check https://youtu.be/uszilXBFKP4.

Similar to this subsection, in the next ones, we will restrict to examine tests in hover conditions. This restriction is reasonable since it represents the situation in which the vehicle is most vulnerable to disturbances. Moreover, this situation extends to missions where the drone is tracking a trajectory in the 푥-푦 plane while maintaining a constant altitude.

Simulation

In the simulation, besides the double integrator model (5.9), we considered the fol- lowing expression for the rotor thrust increment due to the GE:

푇 1 퐼퐺퐸 , (5.36) = 푅2 푇푂퐺퐸 1 − 16푧2 where 푇푂퐺퐸 is the thrust generated by the rotorcraft flying out of GE, 푇퐼퐺퐸 is the thrust when the rotorcraft is in GE, 푅 is the radius of the rotor, and 푧 is the vertical distance of the rotor to the ground. Specifically, we set 푅 = 4푟, where 푟 = 0.0762 m is the radius of one propeller of the Bebop 2.

157 The control objective is to track a reference of 0.5 m from initial conditions of 1 m and 0 m/s. The mass of the vehicle is 0.5 kg and the gravity acceleration is

2 9.81 m/s . The values of fault-free control parameters are 푘푝,1 = 1, 푘푑,1 = 0.1, and 푘푝,2 = 푘푖,2 = 10. The residual weighting matrix is 푊 = diag(2, 0.5) and the fault + detection threshold is 퐽푡ℎ = 0.2. For the FTC strategies, the parameters are 푘푎 = 0.3, − 푘푎 = 0.1, 푘푒 = 1.7, and 푘푠 = 0.01. The total simulation time is 30 s. To simulate sensor faults, we considered a uniform random generator with range [0.01, 0.2], which is added to the internal loop measurement at times 5 s to 6 s, 15 s to 17, and 25 s to 28 s. We set the sampling times of the external and internal loops to 0.05 s and 0.01 s, respectively. Also, we assume that the internal loop shares its measurement with the external loop every 0.2 s. Figure 5-12 shows the outputs of the sensors, the reference, and the fault detec- tion scheme. It can be seen that the sensor faults were properly detected at the time intervals at which the output of the random generator was added to the internal loop measurement. These graphical results demonstrate that the fault detector indirectly depends on the control strategy. Nevertheless, all significant sensor faults were recog- nized for each control strategy. Also, it can be noted that the fault can be tolerated after the control sub-laws are adopted.

1 y [m] 1 y [m] 1 y [m] v v v y [m] y [m] y [m] r r r z [m] z [m] z [m] 0.8 ref 0.8 ref 0.8 ref d d d lp lp lp 0.6 0.6 0.6

0.4 0.4 0.4 Magnitude Magnitude Magnitude

0.2 0.2 0.2

0 0 0 0 10 20 30 0 10 20 30 0 10 20 30 Time [s] Time [s] Time [s] (a) PD (b) FTC 1 (c) FTC 2

Figure 5-12: Simulation response of three control strategies.

Figure 5-13 illustrates the control actions of each strategy. As anticipated, the PD output reached lower magnitudes than the FTC strategies. On the other hand, the FTC 2 scheme attained higher command magnitudes. This might indicate problems in real implementation. The rapid changes in commands could cause fast battery

158 depletion. Also, the vision algorithm that estimates the position could fail due to the fast movements of the camera.

u u p 0.6 0.6 p 0.6

0.4 0.4 0.4 u p 0.2 0.2 0.2

0 0 0

-0.2 -0.2 -0.2 Magnitude Magnitude Magnitude

-0.4 -0.4 -0.4

-0.6 -0.6 -0.6

-0.8 -0.8 -0.8 0 10 20 30 0 10 20 30 0 10 20 30 Time [s] Time [s] Time [s] (a) PD (b) FTC 1 (c) FTC 2

Figure 5-13: Control actions of three control strategies in simulation.

Qualitatively, the FTC 2 scheme yielded the best response. For a quantitative comparison, we computed the Root Mean Square Error (RMSE) and summarized the results in Table 5.4. Compared to the PD controller, the proposed strategies improved the error measure in 24.41% and 38.06%, respectively. Table 5.4: Root mean square error of the control strategies in simulation.

Strategy PD FTC 1 FTC 2 RMSE 0.0214 0.0172 0.0155

An important take away from the simulation is the advantage of adopting asym-

+ − metrical values for 푘푎 and 푘푎 . The simulation clarified that the integral action of the inner loop provides a negative offset to compensate for the GE. In consequence, negative commands of the external loop have more impact than positive commands until the integral reaches to zero.

Experiments

In the experiments, we exploit the features of the Bebop 2 to run the metric monocular SLAM algorithm to estimate the pose of the camera (refer to Subsection 5.2.2), which will be the feedback of the external controller. For all tests, the camera angle was set to -83∘ with respect to the horizon. In the tests with the drone, we restrict the 푥-푦 position and the yaw angle with PID controllers: 푢푥(푡) = PID(푥; 푡), 푢푦(푡) = PID(푦; 푡), and 푢휓(푡) = PID(휓; 푡). To preserve

159 the direction in global coordinates of the 푥-푦 projection of the vector generated by the position controllers, we apply the transformation in (5.5). The control objective is to track a reference of 0.48 m from an initial condition

of 1 m. The values of fault-free control parameters are 푘푝,1 = 0.6, and 푘푑,1 = 0.2; the drone’s inner loop parameters are kept as default. The residual weighting matrix is 푊 = diag(1, 0.5) and the fault detection threshold is 퐽푡ℎ = 0.2. For the FTC + − strategies, the parameters are 푘푎 = 0.5, 푘푎 = 0.2, 푘푒 = 1.25, and 푘푠 = 0.01. In practice, we observed variable frequency in the vision feedback (external loop) with an average of 15 Hz ( 0.0667 s). Like in the simulation, the Bebop 2 publishes ≈ altitude measurements every 0.2 s. Instead of emulating the sensor faults, we opted for evaluating flights with real faults, in essence, sensor faults actually occur. Given the apparent stochastic behavior of sensor faults induced by the GE, we collected results from five tests for each control strategy. Only tests with detected sensor faults and without vision tracking losses were examined. For comparison, we have plotted the error signals in Fig. 5-14. Overall, the figure reveals that the best qualitative behavior was obtained with FTC1.This observation is confirmed with Table 5.5, where the FTC 1 strategy has the lowest average RMSE. Taking as reference the PD strategy, the FTC techniques improved the average error measure in 85.55% and 8.43%, respectively.

Test 1 Test 1 Test 1 Test 2 Test 2 Test 2 0.2 Test 3 0.2 Test 3 0.2 Test 3 Test 4 Test 4 Test 4 Test 5 Test 5 Test 5 0.1 0.1 0.1 Test 6 Test 6 Test 6

0 0 0

-0.1 -0.1 -0.1 Magnitude [m] Magnitude [m] Magnitude [m]

-0.2 -0.2 -0.2

-0.3 -0.3 -0.3 20 30 40 50 20 30 40 50 20 30 40 50 Time [s] Time [s] Time [s] (a) PD (b) FTC 1 (c) FTC 2

Figure 5-14: Error response of the control strategies for five tests with the real drone.

For further comparison, we picked one test of each strategy and plotted their signals in Fig. 5-15. Different from simulations, in experiments, a sensor fault may occur gradually (see the first detection in Fig. 5-15b). In this case, a fault can still

160 Table 5.5: Root mean square error of the strategies with the real drone.

Test No. 1 2 3 4 5 Average PD 0.0492 0.0591 0.0479 0.0460 0.0549 0.0514 FTC 1 0.0266 0.0304 0.0249 0.0317 0.0247 0.0277 FTC 2 0.0215 0.0576 0.0579 0.0417 0.0582 0.0474

be detected (after a delay) since our detector depends on the position component of

the residual. With 퐽푡ℎ, we sacrifice how quick we can identify a gradual fault for robustness against noise. On the other hand, it can be observed that the worst-case scenario from FTC 1 dominates the median response of the other strategies. Unlike in simulations, FTC 2 shows error peaks similar to the standard PD strategy.

1 y [m] 1 y [m] 1 y [m] v v v y [m] y [m] y [m] r r r z [m] z [m] z [m] 0.8 ref 0.8 ref 0.8 ref d d d lp lp lp 0.6 0.6 0.6

0.4 0.4 0.4 Magnitude Magnitude Magnitude

0.2 0.2 0.2

0 0 0 20 30 40 50 20 30 40 50 20 30 40 50 Time [s] Time [s] Time [s] (a) PD: Test 1 (b) FTC 1: Test 4 (c) FTC 2: Test 3

Figure 5-15: Sensor, reference, and fault detection signals for individual tests.

The control commands for the tests in the previous plots are shown in Fig. 5-16. The same trend as in simulations can be seen in this figure: the commands of FTC 2 exhibits the highest peaks, followed by FTC 1. The noise in the measurement and the computation of the unsmoothed first derivative explain the peaks in thePD commands. While collecting results for each strategy, we had complications with the vision algorithm. On one hand, the vision tracking was being lost when the camera ap- proached the ground. On the other, the vision tracking was being lost when the camera moved too fast. For the PD controller, we were losing the vision feedback because the commands allowed the drone to move close to the ground. Whereas for FTC 2, we were losing the feedback because the commands moved the drone rapidly. FTC 1 reduced the occurrence of this problem by keeping the drone close to the

161 u u u 0.4 p 0.4 p 0.4 p

0.3 0.3 0.3

0.2 0.2 0.2

0.1 0.1 0.1

0 0 0 Magnitude Magnitude Magnitude

-0.1 -0.1 -0.1

-0.2 -0.2 -0.2

-0.3 -0.3 -0.3 20 30 40 50 20 30 40 50 20 30 40 50 Time [s] Time [s] Time [s] (a) PD: Test 1 (b) FTC 1: Test 4 (c) FTC 2: Test 3

Figure 5-16: Control signals for individual tests. reference while using moderate energy. The performance of FTC 2 was significantly different in the experiments andthe simulation. One evident reason is the reduction of the parameter 푘푒 in the exper- iments. We lowered this parameter because we were not obtaining tests without

vision feedback losses with higher values of 푘푒. Another evident reason is the lower variable frequency of the real external loop. Together, these differences explain the performance degradation of FTC 2 in the experiments. Focusing on the improvements of the error measure for FTC 1, the improvement was greater in the experiments than in the simulation. Different from the simulation, sensor faults in real tests worsen as the vehicle moves further close to the ground. This indicates that the PD controller is expected to have inferior performance in reality. Moreover, the opportune and moderate commands of FTC 1 somewhat preserved the performance of this strategy. The combined effect is the increase in error measure improvement for FTC 1 in the experiments.

5.2.4 Summary

In this section, we have presented a procedure for fault diagnosis and two control sub- laws for a multirotor with altitude sensor faults. In particular, we have considered sensor faults induced by the GE. In the fault-free case, a hierarchical control composed by an external PD and an internal PI controller has been developed for trajectory tracking. Exploiting the trend of onboard cameras, we have considered a vision-based feedback for the external loop based on a well known technique in robotics known as

162 Monocular SLAM. This is the first time such a technique has been used to address any issue related to GE in multirotors The fault diagnosis has been achieved using a weighted residual, which is obtained by comparing estimations from the metric monocular SLAM system against faulty internal readings. The first control sub-law has been proposed as a combination of the external PD controller and a function of the residual. The second control sub- law has been based on SMC. The performance of the strategies has been illustrated in simulations and experiments. It is important to remark that we have adopted onboard sensors only. Regarding the results, we have discovered that both control sub-laws overcame the performance of the standard PD controller in simulations. However, the first control sub-law offered better behavior in experiments. The performance of the second control sub-law degraded due to a combination of its rapid switching nature and limitations of the vision algorithm. In the experiments, we have found that the first control sub-law improved the RMSE in 85% compared to the PD controller. Results reported in this section indicate that our fault detection scheme is feasible for altitude faults induced by the GE. To our knowledge, this is the first time that the problem of detecting internal sensor faults is addressed by using a metric monocular SLAM system. Besides, we have shown that our first control sub-law enhances the flying performance when hovering close to the ground. Therefore, this controller can be used to improve missions such as take-off, landing, hovering, and operating near the ground in general.

5.3 Optical Flow and GE

In robotics, a major challenge is the autonomous operation of tiny flying robots. For solving this challenge, flying insects provide a splendid source of inspiration since they can navigate with very limited sensory and processing organs. It is known that flying insects rely heavily on optical flow [67, 102], which is the apparent motion ofworld points caused by the relative motion between the observer and the environment [58].

163 Besides, this cue is promising for robots as it can be extracted from a single camera, which implies light weight and relatively low energy consumption [51, 180]. To tackle the GE problem, we first propose a method for detecting such an effect on rotorcraft MAVs. The objective is to detect the GE when the vehicle is flying at a constant nonzero velocity. In essence, we want to detect when the vehicle is pushed upwards when it flies past over an object. This method is based on deep learning and uses a convolutional neural network. We train the network so that it takes in an optical flow estimation obtained from the onboard camera and predicts whether or not the vehicle is in GE.

5.3.1 Dataset

Since no dataset is publicly available for our problem, we first create one to later train the network. Initially, we collect experimental data, which we then percolate to obtain the dataset. In the collection stage, we used a Bebop 2 quadcopter to save RGB images from its frontal camera and altitude estimations from its sensors during experimental flight sessions. Each session consisted of flying the quadrotor past over an object ata constant velocity. We restrict the object to be a table having one of its sides oriented perpendicularly to the nose of the drone. This situation is justified in the light of the results of the previous chapter that the most significant disturbances are caused by sensor (altimeter) faults. In this case, the drone is disturbed by the abrupt change in measured altitude when it passes over the table. On the other hand, we vary the height from the top of the table to the vehicle, ℎ 0.2, 0.3, 0.4, 0.5 m, and the forward ∈ { } velocity, 푣 0.05, 0.10, 0.15, 0.20 m/s. Refer to Fig. 5-17 for a representation of the ∈ { } conditions of the flight tests. These sets were defined empirically from preliminary tests to assure the occurrence of significant disturbances. Also, we performed a flight session for collecting data in normal circumstances, which includes movement to the left, right, forward, backward, upwards, downward, counterclockwise rotation, and clockwise rotation. After collecting the data, we percolate it manually. To do this, we checked the

164 Figure 5-17: Side view of the conditions of the flight tests in which the quadrotor passes over a table, the GE causes an upward disturbance. altitude estimations to determine in which time interval of each session the vehicle is pushed upwards due to sensor faults. Subsequently, we estimate the optical flow from the sequence of images throughout the determined time interval. To reduce the computational load in the execution of the neural network, we first resize the images to 100 100 pixels and then estimate the dense optical flow for each pair using the × Farneback method [46], which yields a matrix of size 100 100 2. These optical flow × × estimations are labeled as ’GE’ samples. On the other hand, we obtain the ’normal’ optical flow samples from the normal circumstances data. In the end, the balanced dataset resulted in a total of 414 samples, from which 206 and 208 correspond to the normal and GE classes, respectively.

5.3.2 Training

First, we propose a general structure of the network, which is then particularized with respect to three hyperparameters: number of convolutional layers, layer size, and number of dense layers. From the input to the output, the general structure consists of 푐 1, 2, 3 convolutional layers (3 3 kernel size), each one followed ∈ { } × by a max-pooling layer (2 2 kernel size), then 푑 0, 1, 2 dense layers, and an × ∈ { } 165 output dense layer. All layers share the same layer size 푙 32, 64, 128 , excepting ∈ { } the output dense layer which is of size 1. The activation functions are selected to be ReLUs for intermediate layers, and a sigmoid for the output layer. As expected, we restrict the input of the network to have the same size as an optical flow sample (100 100 2). × × To determine the appropriate network architecture, we train all networks resulting from the combination of 푐, 푑, and 푙, using the binary cross-entropy as the loss function, and the Adam optimizer [97]. Alternatively, we compute the accuracy for all networks as a proxy for evaluation after training. It is important to mention that, before training, the optical flow samples were normalized using the min-max method. Also, the samples are shuffled, partitioned (80% for training, 20% for validation), and organized in batches of size 20. In the analysis of the training results, we noticed the following. Increasing the layer size and the number of dense layers made the validation loss to increment in the final epochs. For that reason and to avoid clutter, we present the results ofthe top three architectures in Fig. 5-18, in which the nomenclature is formed as 푐-conv- 푙-nodes-푑-dense.

(a) Trng. loss (b) Trng. acc. (c) Val. loss (d) Val. acc.

Figure 5-18: Training and validation results of the top three neural network ar- chitectures: (orange) 1-conv-32-nodes-0-dense, (green) 2-conv-32-nodes-0-dense, and (magenta) 2-conv-32-nodes-1-dense.

In the selection of the appropriate architecture, we consider both the number of parameters and the validation loss. The network having the least quantity of param- eters is the one having only one convolutional layer, 1-conv-32-nodes-0-dense. On the other hand, the best validation loss is achieved by the network with the greatest number of parameters, 2-conv-32-nodes-1-dense. In the end, we select the architec-

166 ture 2-conv-32-nodes-0-dense, which offers a good tradeoff between the properties of interest. The selected architecture is shown in Fig. 5-19.

Figure 5-19: Architecture of the convolutional neural network for detecting the ground effect.

5.3.3 Detection Results

Here, we present qualitative results of the neural detection scheme. to make predic- tions with the trained neural network, we used a video from an unseen flight session that has not been used for training. The same preparation of resizing, optical flow estimation, and min-max normalization, as in previous sections, is applied to video images before entering the network. We present a few samples in Fig. 5-20. It can be observed that the network can discern between normal flight and GE conditions. However, we noted spurious switching of the prediction, as shown in the lower row of Fig. 5-20a. This is an undesired behavior because the vehicle is still being pushed upwards; the network predicts a normal behavior since the vehicle does not move upwards considerably at that particular moment (frame). Such undesired behavior could be solved by holding the prediction for a given number of consecutive frames. Further validation of the neural prediction scheme must be performed. On one hand, false positives, which are expected to happen in upward movements, must be assessed in normal flight conditions. On the other, the computational load mustbe evaluated to guarantee that the detection scheme is useful in real-world situations. A

167 (a) RGB images with detection labels

(b) Optical flow estimations

Figure 5-20: Qualitative results of the detection scheme. Eight forward-in-time frames ordered from left to right and up to down. neural network for estimating the optical flow could be used to decrease the compu- tational load.

5.3.4 Focus of Expansion

When a camera moves across a rigid scene, the optical flow can be used to infer the relative shift of the camera with respect to the scene. Furthermore, when the motion of the camera is characterized by a prevalence of translation forwards the scene, the 2D motion field is characterized by a radial shape. The motion vectors radiate from a point called the Focus of Expansion (FoE), which is a singular point for the system defined by the 2D motion vectors. The FoE can be directly used to mark theheading direction. We hypothesize that, when a MAV is flying past an object with a nonzero forward velocity, the location of the FoE could be used as feedback for controlling the GE.

168 Existing techniques to estimate the FoE can be grouped into two main approaches: continuous, and discrete. Algorithms of the continuous group employ dense optical flow estimations [134, 183, 173]. The discrete approach uses correspondences between image features, such as points or lines, that can be computed from sparse optical flow estimations [17, 59]. In particular, we tested four implementations for estimating the location of the FoE, three of which correspond to the discrete approach,6,7,8 and one to the continuous approach.9 Each algorithm was tested using the video of the flight session in Fig. 5-20. We decided to adopt the algorithm in [59] since it provided the most robust estimations. Qualitative results are presented in Fig. 5-21. It can be observed that the location of the FoE moves towards upwards as the vehicle is affected by the GE (frame 5 to frame 12).

Figure 5-21: Qualitative results of the algorithm to estimate the FoE using trajectories of interest points [59]. Twelve forward-in-time frames ordered from left to right and up to down, in which the intersection of the lines represent the FoE location.

For completeness, we present the quantitative results in Fig. 5-22. In this figure, we plot two consecutive time-series, corresponding to the 푦-axis position of the FoE (the positive direction of the image 푦-axis points downward the page and its origin is located at the image top border). Time-wise, the blue (normal) time-series precedes exactly the red (GE) time-series; however, for comparison purposes, we plot both

6https://github.com/aamini/TimeToContact.jl 7https://github.com/KennethYangle/time-to-collision 8http://agamenon.tsc.uah.es/Investigacion/gram/papers/FoE/ 9https://github.com/johnjlee/opticalflow

169 time-series on the same horizontal axis. Additionally, we present the equations of the trend lines, from which it can be observed that the GE trend line has a greater slope than the normal trend line. Such observation is partially in line with our hypothesis at the beginning of this subsection. In essence, we may conclude that the location of the FoE changes due to the GE. Therefore, the FoE is promising to be used as feedback for a control loop. Specifically, we envisage the scheme in Fig. 5-23. Nevertheless, further validation is required, especially in determining that the involved computational effort leaves room for closing the control loop.

Figure 5-22: Quantitative results of the estimations of the FoE’s vertical location.

Figure 5-23: Envisaged control scheme based on optical flow.

5.4 Chapter Conclusion

In this chapter, we set out to answer RQ 1, RQ 2, and RQ 3 in conjunction. To answer these questions, we first assumed that the GE induces random disturbances

170 which were counteracted with a multi-controller structure. Although we obtained favorable results, we noticed a rather odd behavior while executing the real-world tests: the drone suddenly moving towards the ground without being commanded to do so. This behavior does not follow what is reported in the literature of the GE on rotorcraft UAVs. Also, in the analysis of the multi-controller structure, we perceived that it shares some characteristics with the control reconfiguration approach. These two observations led us first to determine the existence of faults within the system, situation which was confirmed to occur within the inner control loop. It wasthen natural to attack the problem with fault-tolerant control.

There was no fault-tolerant control variant that we could use directly to attack our problem. For that reason, we took the idea of using both a fault diagnosis element and a fault estimation element, and then design them from the ground up while considering the restriction of using only onboard sensors. From the experimental evidence, we may conclude that the proposed system is feasible for mitigating the faults induced by the GE. Since our system is based on visual SLAM, it is affected by some of the problems of the vision algorithm, such as error accumulation (drift), loss of tracking, and metric scale mismatch. The first two problems are more likely to occur when the vehicle moves towards a non-seen region. The last one can occur if the SLAM algorithm is not properly initialized (refer to Section 5.2.2). However, these problems are being attacked in the vision community, and attempting to solve them is out of the scope of this thesis.

As an extension, we explored the detection and control of the GE in forward flight with optical flow. In the first part, we presented a GE detection scheme, whichis based on deep learning. We trained an artificial neural network so that it receives an optical flow image, computed from the vehicle’s frontal onboard camera, and classifies whether or not the vehicle is experiencing the GE while flying over an object at a constant nonzero velocity. Our results indicate that this scheme is promising for detecting the upward push that rotorcraft UAVs experience when passing over an object. In the second part, we delved into using the location of the focus of expansion as feedback for control. We do not draw conclusions from this part since it requires

171 more work, which is left for the future.

172 Chapter 6

Conclusion

In the context of rotorcraft MAVs, the GE is an aerodynamic interaction that occurs when the vehicle flies closely over a rigid surface. In this case, the airflow belowthe vehicle is forced to be pushed radially outward, which creates an air cushion that tends to push the vehicle upwards. This situation is persistent in constrained indoor environments, where the vehicle is required to operate close to objects. The GE has been extensively studied for UAVs in three domains: control, modeling, and appli- cations. In the control domain, several methods have been proposed, in which the GE is counteracted either by an integral action or a feedforward term. However, the presence of faults due to the GE in the components of a MAV has been scarcely ac- knowledged. Some efforts have focused on solving the problem for barometric sensors. Others have mentioned sensor malfunctions only to justify the performance degrada- tion of a control method, but have not addressed the problem. Indeed, the presence of faults in a control system degrades the control performance, which might lead to critical failures. In addition, MAVs are restricted in the number of sensors that they can carry. Both the presence of faults and the sensing restrictions pose a challenge in the autonomous operation of rotorcraft MAVs in constrained indoor environments. This thesis was devoted to studying the problem of sensor faults induced by the GE on a quadrotor MAV, under the restriction that the vehicle is equipped with an onboard camera, an altimeter, and an IMU. For the hovering case, we presented a novel fault-tolerant control scheme based on monocular SLAM. For the forward flight

173 case, we explored the usage of optical flow estimations for detecting and mitigating the GE.

6.1 Answers to the Research Questions

RQ 1: How can the ground effect be detected autonomously using the least quantity of onboard sensors

The GE can be detected autonomously using the onboard monocular camera and the altimeter. In particular, we found that images from the camera can be processed by a metric monocular SLAM algorithm, which yields a robust position in a global frame of reference. To retrieve the metric scale, the SLAM algorithm is initialized with a correct altitude measurement, which is obtained from the altimeter when the vehicle is hovering just after take off, while the vehicle remains far away from aerodynamic effects. Subsequently, measurements from the altimeter, which is affected bythe GE, are compared to measurements from the SLAM algorithm to detect disturbances induced by the GE.

RQ 2: How can unreliable sensors be compensated when the vehicle is flying in ground effect?

When the vehicle is in GE, the altimeter becomes unreliable because it is affected by the pressurized air below the rotorcraft. Since this sensor is commonly imple- mented in the inner control loop and the visual SLAM in the outer one, we found that the effect of an incorrect altimeter measurement on the position can be approx- imated and implemented as an additive term in the outer loop. This approach offers the advantage of leaving intact the inner loop, which is difficult or dangerous to alter for most vehicles.

RQ 3: How can the ground effect be interpreted such that this interpretation canbe exploited to mitigate the ground effect?

174 The disturbances induced by the GE can be interpreted as sensor faults, in par- ticular, as altimeter sensor faults. Low-level altitude estimations are obtained from the fusion of individual sensors, such as a barometer and an ultrasonic sensor. These two sensors are affected by the pressurized air and turbulence below when the drone is near a ground plane. We demonstrated that the fault-tolerant control scheme is well suited for mitigating disturbances induced by the GE.

6.2 Hypothesis and Objectives Assessment

On the basis of the answers to the research questions, we now recall our hypothesis: an onboard monocular camera could provide enough information for detecting and mitigating disturbances induced by the ground effect. We provided evidence that the monocular camera provides vast and rich information to detect and mitigate sensor faults, which are caused by the GE. Therefore, our hypothesis holds.

Did our research contribute to achieving the general objective mentioned in Chap- ter 1? The general objective is: to design and implement a novel algorithm for re- ducing the control error of a quadrotor flying in ground effect. We have contributed to achieving the general objective by developing a novel fault-tolerant control scheme for a quadrotor with sensor faults under GE in confined spaces. The strategy can, in principle, be employed by other types of rotorcraft MAVs. However, whether this is actually the case remains for now an open question.

We have contributed to the particular goals in providing the detection and mitiga- tion strategies, which conforms our fault-tolerant control scheme. Both the detection and mitigation strategies were validated in simulations and real-world experiments. Furthermore, we proposed two mitigation strategies, one based on the residual and the other on a sliding mode action. The first was more effective in simulations, but was surpassed by the residual-based strategy in experiments.

175 6.3 Limitations and Future Research

In this section, we disclose the limitations of this study and provide four main direc- tions for future research.

The limitations of this study are the following. In our fault-tolerant scheme, we did not consider model uncertainties nor sensor noise. For that reason, we based our scheme on deterministic definitions. Considering uncertainties allows the usage of stochastic tools that could enhance both the detection and mitigation strategies. Also, we obtained most of the experimental data using a particular quadrotor platform, which might limit the applicability of the results. Even though we proposed an idea based on optical flow for attacking the ground effect in forward flight, wedidnot provide conclusive results for the mitigation strategy.

The first direction of future research is to further develop the idea of detecting and mitigating the GE by exploiting optical flow estimations from the onboard monocular camera. We provided a method for detecting the GE in forward flight using a CNN. Also, we provided results from an algorithm for estimating the location of the focus of expansion, which could provide the feedback for a control algorithm.

A second direction of future research is to enhance the detection and estimation algorithms. This could be done by considering model uncertainties and sensor noise. These terms could be dealt with a state observer or with a Kalman filter. Also, delays in the measurements could be compensated by predicting the actual state from a delayed measurement. We could achieve this by using a mathematical model of the rotorcraft.

A third direction of future research is to extend the fault-tolerant scheme for considering altitude sensor faults caused by abrupt changes in the surface below the drone. Since low-level altitude measurements are influenced by the local structure of the environment, the vehicle will react to the changes in the local structure. For example, consider that the vehicle is flying at a commanded height of 1.5 m towards a table has a height of 1 m. Once the vehicle reaches the table, it will ascend 1 m because the measured low-level altitude will be 0.5 m. This will happen no matter

176 the technology of the range sensor, either ultrasonic, infrared, or laser. In principle, the proposed fault-tolerant control scheme could be used to detect and mitigate such faults. The final direction of future research is to explore the use of the metric monocu- lar SLAM algorithm for controlling other aerodynamic effects, such as the wall and ceiling effects. Given that the SLAM algorithm provides an estimation of therobot with respect to a global frame of reference, it could be used to correct for global deviations that cannot be captured by sensors that are influenced by local features of the environment.

177 178 Bibliography

[1] Sanjukta Aich, Chahat Ahuja, Tushar Gupta, and P. Arulmozhivarman. Anal- ysis of ground effect on multi-rotors. In 2014 International Conference on Electronics, Communication and Computational Engineering (ICECCE), pages 236–241, Hosur, India, November 2014.

[2] Roohul Amin, Li Aijun, and Shahaboddin Shamshirband. A review of quadrotor UAV: control methodologies and performance evaluation. International Journal of Automation and Control, 10(2), 2016.

[3] L. M. Argentim, W. C. Rezende, P. E. Santos, and R. A. Aguiar. PID, LQR and LQR-PID on a quadcopter platform. In 2013 International Conference on Informatics, Electronics and Vision (ICIEV), pages 1–6, Dhaka, Bangladesh, May 2013.

[4] Usman Arshad. Adaptive control implementation to include ground effect on UAV simulator. Master’s thesis, Politecnico di Milano, Milan, Italy, 2019.

[5] J. Balakrishnan. Control system design using multiple models, switching and tuning. PhD thesis, University of Yale, 1996.

[6] Shruti Balasubramanian. Comparison of angle measurements between Vicon and Myomotion systems. Technical report, Arizona State University, 2013.

[7] Moses Bangura and Robert Mahony. Nonlinear dynamic modeling for high performance control of a quadrotor. In Proceedings Australasian Conference on Robotics and Automation 2012, pages 1–10, Wellington, New Zealand, October 2012. Australian Robotics and Automation Association.

[8] John Bartholomew, Andrew Calway, and Walterio Mayol-Cuevas. Learning to predict obstacle aerodynamics from depth images for Micro Air Vehicles. In 2014 IEEE International Conference on Robotics and Automation (ICRA), pages 4967–4973, Hong Kong, China, May 2014.

[9] John Bartholomew, Andrew Calway, and Walterio Mayol-Cuevas. Improving MAV control by predicting aerodynamic effects of obstacles. In 2015 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 4826–4833, Hamburg, Germany, September 2015.

179 [10] Thomas Belatti, Caitlin Powers, and Vijay Kumar. Quadrotor flight in con- strained environments. Technical report, University of Pennsylvania, 2012.

[11] C. Berbra, S. Lesecq, and J.J. Martinez. A multi-observer switching strategy for fault-tolerant control of a quadrotor helicopter. In 2008 16th Mediterranean Conference on Control and Automation, pages 1094–1099, Ajaccio, France, June 2008.

[12] F. Berkenkamp, A. P. Schoelling, and A. Krause. Safe controller optimization for quadrotors with Gaussian process. In 2016 IEEE International Conference on Robotics and Automation (ICRA), Stockholm, Sweden, May 2016.

[13] Albert Betz. The ground effect on lifting propellers. Technical Report 835, National Advisory Committee for Aeronautics, Washington, DC, USA, 1937.

[14] Michael J. Black and P. Anandan. The robust estimation of multiple motions: Parametric and piecewise-smooth flow fields. Computer Vision and Image Un- derstanding, 63(1):75–104, 1996.

[15] Julia Bludau, Juergen Rauleder, L. Friedmann, and Manfred Hajek. Real-time simulation of rotor inflow using a coupled flight dynamics and fluid dynam- ics simulation. In Deutscher Luft- und Raumfahrtkongress 2016, pages 1–17, Braunschweig, Germany, September 2016.

[16] Hossein Bolandi, Mohammad Rezaei, Reza Mohsenipour, Hossein Nemati, and Seed Majid Smailzadeh. Attitude control of a quadrotor with optimized PID controller. Intelligent Control and Automation, 4(3):335–342, 2013.

[17] Christof Born. Determining the focus of expansion by means of flow field pro- jections. citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.49.2149& rep=rep1&type=pdf, 1994.

[18] S. Bouabdallah, A. Noth, and R. Siegwart. PID vs LQ control techniques applied to an indoor micro quadrotor. In 2004 IEEE/RSJ International Con- ference on Intelligent Robots and Systems (IROS), pages 2451–2456, Sendai, Japan, September 2004.

[19] S. Bouabdallah and R. Siegwart. Full control of a quadrotor. In 2007 IEEE/RSJ International Conference on Intelligent Robots and Systems, pages 153–158, San Diego, CA, USA, October 2007.

[20] Walter James Boyne. Helicopter. https://www.britannica.com/technology/ helicopter, 2020.

[21] T. Bresciani. Modelling, identification and control of a quadrotor helicopter. Msc thesis, Lund University, 2008. http://lup.lub.lu.se/luur/download? func=downloadFile&recordOId=8847641&fileOId=8859343.

180 [22] J. M. Brito-Domingues. Quadrotor prototype. Master’s thesis, Instituto Supe- rior Técnico, Universidade Técnica de Lisboa, Lisbon, Portugal, 2009.

[23] Richard E. Brown and Glen R. Whitehouse. Modelling rotor wakes in ground effect. Journal of the American Helicopter Society, 49(3):238–249, 2004.

[24] Cesar Cadena, Luca Carlone, Henry Carrillo, Yasir Latif, Davide Scaramuzza, Jose Neira, Ian Reid, and John Leonard. Past, present, and future of simul- taneous localization and mapping: Toward the robust-perception age. IEEE Transactions on Robotics, 32(6):1309–1332, 2016.

[25] A. Cesetti, E. Frontoni, A. Mancini, P. Zingaretti, and S. Longhi. A vision-based guidance system for UAV navigation and safe landing using natural landmarks. Journal of Intelligent and Robotic Systems, 57(1):233–257, 2010.

[26] I. C. Cheeseman and W. E. Bennett. The effect of the ground on a helicopter rotor in forward flight. Technical Report 3021, Aeronautical Research Council, London, UK, September 1955.

[27] J. Colmenares-Vazquez, N. Marchand, and J. E. Gomez-Balderas. Position control of a quadrotor under external constant disturbance. In 2015 Workshop on Research, Education and Development of Unmanned Aerial Systems (RED- UAS), pages 180–185, Cancun, Mexico, November 2015.

[28] Stephen Austin Conyers. Empirical Evaluation of Ground, Ceiling, and Wall Effect for Small-Scale Rotorcraft. PhD thesis, University of Denver, Denver, CO, USA, 2019.

[29] Stephen Austin Conyers, M. J. Rutherford, and Kimon P. Valavanis. An em- pirical evaluation of ground effect for small-scale rotorcraft. In 2018 IEEE In- ternational Conference on Robotics and Automation (ICRA), pages 1244–1250, Brisbane, QLD, Australia, May 2018.

[30] Michael V. Cook. Systems of axes and notation. In Flight Dynamics Principles, pages 13–32. Elsevier, 2013.

[31] H. C. Curtiss, M. Sun, W. F. Putman, and E. J. Hanker. Rotor aerodynamics in ground effect at low advance ratios. Journal of the American Helicopter Society, 29(1):48–55, 1984.

[32] Konstantinos Dalamagkidis. Aviation history and unmanned flight. In Kimon P. Valavanis and George J. Vachtsevanos, editors, Handbook of Unmanned Aerial Vehicles, chapter 4, pages 57–81. Springer Netherlands, 2015.

[33] Li Danjun, Zhou Yan, Shi Zongying, and Lu Geng. Autonomous landing of quadrotor based on ground effect modelling. In 2015 34th Chinese Control Conference (CCC), pages 5647–5652, Hangzhou, China, July 2015.

181 [34] David Gareth Davies, Robert Cameron Bolam, Yuriy Vagapov, and Peter Excell. Ultrasonic sensor for UAV flight navigation. In 2018 25th Interna- tional Workshop on Electric Drives: Optimization in Control of Electric Drives (IWED), pages 1–7, January 2018.

[35] Edwin Davis and Paul E. I. Pounds. Passive position control of a quadrotor with ground effect interaction. IEEE Robotics and Automation Letters, 1(1):539–545, 2016.

[36] Davide Del Cont Bernard, Mattia Giurato, Fabio Riccardi, and Marco Lovera. Ground effect analysis for a quadrotor platform. In Fourth CEAS Specialist Con- ference on Guidance, Navigation and Control, Advances in Aerospace Guidance, Navigation and Control, pages 351–367, Warsaw, Poland, April 2017. Springer International Publishing.

[37] Davide Del Cont Bernard, Fabio Riccardi, Mattia Giurato, and Marco Lovera. A dynamic analysis of ground effect for a quadrotor platform. In 20th IFAC World Congress, volume 50, pages 10311–10316, Tolouse, France, July 2017.

[38] André Desopper, Vincent Routhieau, German Roth, Wolfgang von Grunhagen, and Henk Haverdings. Study of the low speed characteristics of a tiltrotor. In 28th European Rotorcraft Forum, Bristol, UK, September 2002.

[39] James Diebel. Representing attitude: Euler angles, unit quaternions, and rota- tion vectors. Link, 2006. Accessed: 2020-02-29.

[40] Han Du, Zhiqiang Pu, Jianqiang Yi, and Hanbo Qian. Advanced quadrotor takeoff control based on incremental nonlinear dynamic inversion and integral extended state observer. In 2016 IEEE Chinese Guidance, Navigation and Control Conference (CGNCC), pages 1881–1886, Nanjing, China, August 2016.

[41] Han Du, Zhiqiang Pu, Jianqiang Yi, and Hanbo Qian. Advanced quadrotor takeoff control based on incremental nonlinear dynamic inversion and integral extended state observer. In 2016 IEEE Chinese Guidance, Navigation and Control Conference (CGNCC), pages 1881–1886, Nanjing, China, August 2016.

[42] Gina M. Eberhart. Modeling of ground effect benefits for multi-rotor small unmanned aerial systems at hover. Master’s thesis, Ohio University, Athens, OH, USA, 2017.

[43] Wilfried Enkelmann. Investigations of multigrid algorithms for the estimation of optical flow fields in image sequences. Computer Vision, Graphics, and Image Processing, 43(2):150–177, 1988.

[44] S. f and H. Boubertakh. Optimal tuning of a PD control by bat algorithm to stabilize a quadrotor. In 2016 8th International Conference on Modelling, Identification and Control (ICMIC), pages 938–942, Algiers, Algeria, November 2016.

182 [45] M. Faessler, D. Falanga, and D. Scaramuzza. Thrust mixing, saturation, and body-rate control for accurate aggressive quadrotor flight. IEEE Robotics and Automation Letters, 2(2):476–482, 2017.

[46] Gunnar Farnebäck. Two-frame motion estimation based on polynomial expan- sion. In Proceedings of the 13th Scandinavian Conference on Image Analysis, pages 363–370, Halmstad, Sweden, 2003.

[47] Fort F. Felker. A review of tilt rotor download research. In 14th European Rotorcraft Forum, pages 14–1–14–32, Milan, Italy, September 1988.

[48] A. Filippone, R. Bakker, P. M. Basset, B. Rodriguez, R. Green, F. Bensing, and A. Visingardi. Rotor wake modelling in ground effect conditions. In 37th Eu- ropean Rotorcraft Forum, pages 1–12, Vergiate and Gallarate, Italy, September 2011.

[49] Denis Fortun, Patrick Bouthemy, and Charles Kervran. Optical flow modeling and computation: A survey. Computer Vision and Image Understanding, 134:1– 21, 2015.

[50] Evan Fradenburgh. The helicopter and the ground effect machine. Journal of The American Helicopter Society, 5:14–33, 1960.

[51] N. Franceschini, J. M. Pichon, and C. Blanes. From insect vision to robot vision. Philosophical Transactions: Biological Sciences, 337(1281):283–294, 1992.

[52] P. E. Frandsen, K. Jonasson, Hans Bruun Nielsen, and Ole Tingleff. Uncon- strained optimization. Lecture note, Technital University of Denmark, 1999.

[53] Helen From. Predicting the ground effect in drone landing with online learning. Master’s thesis, KTH Royal Institute of Technlogy, Stockholm, Sweden, 2019.

[54] Balakrishnan Ganesh and Narayanan Komerath. Unsteady aerodynamics of ro- torcraft in ground effect. In 22nd Applied Aerodynamics Conference and Exhibit, pages 1–18, Reno, NV, USA, January 2004.

[55] Shijie Gao, Carmelo Di Franco, Darius Carter, Daniel Quinn, and Nicola Bezzo. Exploiting ground and ceiling effects on autonomous UAV motion planning. In 2019 International Conference on Unmanned Aircraft Systems (ICUAS), pages 768–777, Atlanta, GA, USA, June 2019.

[56] S. N. Ghazbi, Y. Aghli, M. Alimohammadi, and A. A. Akbari. Quadrotors unmanned aerial vehicles: A review. International Journal on Smart Sensing and Intelligent Systems, 9(1), 2016.

[57] James J. Gibson. The Perception of the Visual World. The Riverside Press, Cambridge, MA, USA, 1950.

183 [58] James J. Gibson. The Ecological Approach to Visual Perception. Psychology Press, classic edition, 2015.

[59] Pedro Gil-Jimenez, Hilario Gomez-Moreno, Roberto J. Lopez-Sastre, and Al- berto Bermejillo-Martin-Romo. Estimating the focus of expansion in a video sequence using the trajectories of interest points. Image and Vision Computing, 50:14–26, 2016.

[60] Xavier Glorot, Antoine Bordes, and Youshua Bengio. Deep sparse rectifier neu- ral networks. In Proceedings of the 14th International Conference on Artificial Intelligence and Statistics (AISTAT), Fort Lauderdal, FL, USA, April 2011.

[61] Ian Goodfellow, Yoshua Bengio, and Aaron Courville. Deep Learning. MIT Press, 2016. http://www.deeplearningbook.org.

[62] Daniel A. Griffiths, Shreyas Ananthan, and J. Gordon Leishman. Predictions of rotor performance in ground effect using a free-vortex wake model. Journal of the American Helicopter Society, 50(4):302–314, 2005.

[63] T. Grüning, A. Rauh, and H. Aschemann. Feedforward control design for a four-rotor UAV using direct and indirect methods. In 2012 17th International Conference on Methods Models in Automation Robotics (MMAR), pages 439– 444, Miedzyzdrojie, Poland, August 2012.

[64] Nicolas Guenard, Tarek Hamel, and Laurent Eck. Control laws for the tele op- eration of an unmanned aerial vehicle known as an X4-flyer. In 2006 IEEE/RSJ International Conference on Intelligent Robots and Systems, pages 3249–3254, Beijing, China, October 2006.

[65] V. Gupta and J. D. Baeder. Quad tiltrotor aerodynamics in ground effect. In 58th Annual Forum of the American Helicopter Society, pages 1–14, Montreal, QC, Canada, June 2002.

[66] Lawrence Hasdorff. Gradient Optimization and Nonlinear Control. John Wiley, first edition, 1976.

[67] Klaus Hausen. Motion sensitive interneurons in the optomotor system of the fly. Biological Cybernetics, 45:143–156, 1982.

[68] James S. Hayden. The effect of the ground on helicopter hovering power re- quired. In Proc. AHS 32nd Annual Forum, pages 1–11, Washington, DC, USA, May 1976.

[69] Xiang He, Marc Calaf, and Kam K. Leang. Modeling and adaptive nonlinear disturbance observer for closed-loop control of in-ground-effects on multi-rotor UAVs. In Proceedings of DSCC, pages 1–9, Tysons Corner, VA, USA, October 2017.

184 [70] Xiang He, Gordon Kou, Marc Calaf, and Kam K. Leang. In-ground-effect mod- eling and nonlinear-disturbance observer for multirotor unmanned aerial vehicle control. Journal of Dynamic Systems, Measurement, and Control, 141(7), 2019.

[71] Xiang He and Kam K. Leang. A new quasi-steady in-ground effect model for rotorcraft unmanned aerial vehicles. In Proceedings of ASME 2019, volume 3, pages 1–8, Park City, UT, USA, October 2019.

[72] Markus Hehn, Robin Ritz, and Raffaello D’Andrea. Performance benchmarking of quadrotor systems using time-optimal control. Autonomous Robots, 33:69–88, 2012.

[73] Bruno Herissé, Tarek Hamel, Robert Mahony, and F. Russotto. Landing a VTOL unmanned aerial vehicle on a moving platform using optical flow. IEEE Transactions on Robotics, 28(1):77–89, 2012.

[74] Joel A Hesch, Dimitrios G Kottas, Sean L Bowman, and Stergios I Roumeli- otis. Camera-IMU-based localization: Observability analysis and consistency improvement. The International Journal of Robotics Research, 33(1):182–201, November 2013.

[75] Harry H. Heyson. Ground effect for lifting rotors in forward flight. Techni- cal Report NASA-TN-D-234, National Aeronautics and Space Administration, Hampton, VA, USA, May 1960.

[76] Harry H. Heyson. Theoretical study of the effect of ground proximity on the induced efficiency of helicopter rotors. Technical Report TM-X-71951, National Aeronautics and Space Administration, Hampton, VA, USA, May 1977.

[77] Catherine F. Highman and Desmond J. Highman. Deep learning: An introduc- tion for applied mathematicians. SIAM Review, 61(4), 2019.

[78] Chin Gian Hooi. Height estimation and control of a rotorcraft in ground effect using multiple pressure probes. Master’s thesis, University of Maryland, College Park, MD, USA, 2015.

[79] Chin Gian Hooi, Francis D. Lagor, and Derek A. Paley. Flow sensing, estimation and control for rotorcraft in ground effect. In 2015 IEEE Aerospace Conference, pages 1–8, Big Sky, MT, USA, March 2015.

[80] Chin Gian Hooi, Francis D. Lagor, and Derek A. Paley. Flow sensing for height estimation and control of a rotor in ground effect: Modeling and experimental results. In AHS 71st Annual Forum, pages 1–12, Virginia Beach, VA, USA, May 2015.

[81] Chin Gian Hooi, Francis D. Lagor, and Derek A. Paley. Height estimation and control of rotorcraft in ground effect using spatially distributed pressure sensing. Journal of the American Helicopter Society, 61(4):1–14, 2016.

185 [82] Z. Hosseini, A. Ramirez-Serrano, and R. J. Martinuzzi. Ground / wall effects on a tilting ducted fan. International Journal of Micro Air Vehicles, 3(3):119–141, 2011.

[83] Botao Hu, Lu Lu, and Sandipan Mishra. Fast, safe and precise landing of a quadrotor on an oscillating platform. In 2015 American Control Conference (ACC), pages 3836–3841, Chicago, IL, USA, July 2015.

[84] Thierry Jardin, Sebastien Prothin, and Cristian García Magaña. Aerodynamic performance of a hovering microrotor in confined environment. Journal of the American Helicopter Society, 62(2):1–7, 2017.

[85] Kevin Jarret, Koray Kavukcuoglu, Marc’Aurelio Ranzato, and Yann LeCun. What is the best multi-stage architecture for object recognition? In 2009 IEEE 12th International Conference on Computer Vision, Kyoto, Japan, September 2009.

[86] Wayne Johnson. Helicopter Theory. Dover Publications, Inc., New York, USA, revised edition, 1994.

[87] Tarandeep Singh Kalra. CFD modeling and analysis of rotor wake in hover interacting with a ground plane. PhD thesis, University of Maryland, College Park, MD, USA, 2014.

[88] Xinyue Kan, Justin Thomas, Hanzhe Teng, Herbert G. Tanner, Vijay Kumar, and Konstantinos Karydis. Analysis of ground effect for small-scale UAVs in forward flight. IEEE Robotics and Automation Letters, 4(4):3860–3867, 2019.

[89] Konstantinos Karydis and M. Ani Hsieh. Uncertainty quantification for small robots using principal orthogonal decomposition. In 2016 International Sym- posium on Experimental Robotics, pages 33–42, Tokyo, Japan, October 2016. Springer International Publishing.

[90] Konstantinos Karydis and Vijay Kumar. Energetics in robotic flight at small scales. Interface Focus, 7(1):20160088, 2017.

[91] Konstantinos Karydis, Ioannis Poulakakis, Jianxin Sun, and Herbert G. Tanner. Probabilistically valid stochastic extensions of deterministic models for systems with uncertainty. The International Journal of Robotics Research, 34(10):1278– 1295, 2015.

[92] John F. Keane and Stephen S. Carr. A brief history of early unmanned aircraft. Johns Hopkins APL Technical Digest, 32(3):558–571, 2013.

[93] Hasan Keshavarzian and Kamran Daneshjou. Modified under-actuated quadro- tor model for forwarding flight in the presence of ground effect. Aerospace Science and Technology, 89:242–252, 2019.

186 [94] Hamid Saeed Khan and Muhammad Bilal Kadri. Attitude and altitude control of quadrotor by discrete PID control and non-linear model predictive control. In 2015 International Conference on Information and Communication Technolo- gies (ICICT), pages 1–11, Karachi, Pakistan, December 2015.

[95] Vladimir Khromov and Omri Rand. Ground effect modeling for rotary-wing simulation. In 26th International Congress of the Aeronautical Sciences, pages 14–19, Anchorage, AK, USA, September 2008.

[96] Jinho Kim, Stephen A. Wilkerson, and S. Andrew Gadsden. Comparison of gradient methods for gain tuning of a pd controller applied on a quadrotor system. In Unmanned Systems Technology XVIII, volume 9837, pages 278–287. SPIE, 2016.

[97] Diederik P. Kingma and Jimmy Lei Ba. Adam: A method for stochastic opti- mization. In 3rd International Conference for Learning Representations, pages 1–15, San Diego, USA, 2015.

[98] Donald E. Kirk. Optimal Control Theory: An Introduction. Dover Publications, first edition, 2004.

[99] Montgomery Knight and Ralph A. Hegner. Analysis of ground effect on the lifting airscrew. Technical Report 835, National Advisory Commitee for Aero- nautics, Washington, DC, USA, December 1941.

[100] Basaran Bahadir Kocer, Tegoeh Tjahjowidodo, and Gerald Gim Lee Seet. Centralized predictive ceiling interaction control of quadrotor VTOL UAV. Aerospace Science and Technology, 76:455–465, 2018.

[101] P. V. Kokotovich. The joy of feedback: nonlinear and adaptive. IEEE Control Systems Magazine, 12(3):7–17, 1992.

[102] Holger G. Krapp and Roland Hengstenberg. Estimation of self-motion by optic flow processing in single visual interneurons. Nature, 384:463–466, 1996.

[103] Li-Chun Lai, Chi-Ching Yang, and Chia-Ju Wu. Time-optimal control of a hovering quad-rotor helicopter. Journal of Intelligent and Robotic Systems, 45:115–135, 2006.

[104] Vinod K. Lakshminarayan, Tarandeep S. Kalra, and James D. Baeder. Detailed computational investigation of a hovering microscale rotor in ground effect. AIAA Journal, 51:893–909, 2013.

[105] Daewon Lee, Asad Awan, Suseong Kim, and H. Jin Kim. Adaptive control for a VTOL UAV operating near a wall. In AIAA Guidance, Navigation, and Control Conference, pages 1–12, Minneapolis, MN, USA, August 2012.

187 [106] Daewon Lee, H. Jin Kim, and Shankar Sastry. Feedback linearization vs. adap- tive sliding mode control for a quadrotor helicopter. International Journal of Control, Automation, and Systems, 7(3):419–428, 2009.

[107] Daewon Lee, Tyler Ryan, and H. Jin Kim. Autonomous landing of a VTOL UAV on a moving platform using image-based visual servoing. In 2012 IEEE International Conference on Robotics and Automation, pages 971–976, Saint Paul, MN, USA, May 2012.

[108] Timothy Lee, J. Gordon Leishman, and Manikandan Ramasamy. Fluid dy- namics of interacting blade tip vortices with a ground plane. Journal of the American Helicopter Society, 55:022005, 2010.

[109] J. Gordon Leishman. Principles of Helicopter Aerodynamics. Cambridge Uni- versity Press, New York, USA, second edition, 2006.

[110] John J. Leonard and Hugh Durrant-Whyte. Mobile robot localization by tracking geometric beacons. IEEE Transactions on Robotics and Automation, 7(3):376–382, 1991.

[111] A. Lestari, S. Niazi, and R. Ganesh Rajagopalan. Preliminary numerical analy- sis of a quad tilt rotor flowfield and performance. In Tiltrotor/Runway Indepen- dent Aircraft Technology and Applications Specialists’ Meeting of the American Helicopter Society, pages 1–8, Arlington, TX, USA, March 2001.

[112] Jeffrey S. Light. Tip vortex geometry of a hovering helicopter rotor inground effect. In 45th AHS Annual Forum, pages 551–558, Boston, MA, USA, May 1989.

[113] Giuseppe Loianno and Vijay Kumar. Vision-based fast navigation of micro aerial vehicles. In Micro- and Nanotechnology Sensors, Systems, and Appli- cations VIII, volume 9836, pages 280–293, Baltimore, MD, USA, May 2016. International Society for Optics and Photonics, SPIE.

[114] Robert Mahony and T. Hamel. Adaptive compensation of aerodynamic effects during takeoff and landing manoeuvres for a scale model autonomous helicopter. European Journal of Control, 7(1):43–57, 2001.

[115] R. L. Marr, D. G. Ford, and S. W. Ferguson. Analysis of the wind tunnel test of a tilt rotor powered force model. Technical Report NASA-CR-137529, National Aeronautics and Space Administration, Moffett Field, CA, USA, June 1974.

[116] A. Matus-Vargas, G. Rodriguez-Gomez, and J. Martinez-Carranza. Aerody- namic disturbance rejection acting on a quadcopter near ground. In 2019 6th International Conference on Control, Decision and Information Technologies (CoDIT), pages 1516–1521, Paris, France, April 2019.

188 [117] Antonio Matus-Vargas, Gustavo Rodriguez-Gomez, and Jose Martinez- Carranza. Numerical optimization techniques for nonlinear quadrotor control. In 2017 International Conference on Unmanned Aircraft Systems (ICUAS), Mi- ami, FL, USA, USA, July 2017.

[118] Christopher D. McKinnon and Angela P. Schoellig. Unscented external force and torque estimation for quadrotors. In 2016 IEEE/RSJ International Con- ference on Intelligent Robots and Systems (IROS), pages 5651–5647, Daejeon, South Korea, October 2016.

[119] Christopher David McKinnon. Data driven, force based interaction for quadro- tors. Master’s thesis, University of Toronto, Toronto, ON, Canada, 2015.

[120] James M. McMichael and Michael S. Francis. Micro air vehicles – Toward a new dimension in flight, 1997. Unpublished DARPA document.

[121] Pierre Merriaux, Yohan Dupuis, Remin Boutteau, Pascal Vasseur, and Xavier Savatier. A study of Vicon system positioning performance. Sensors, 17(7):1591, 2017.

[122] Mojtaba Mirzaei, Fereidoon Shabani Nia, and Hossein Mohammadi. Applying adaptive fuzzy sliding mode control to an underactuated system. In The 2nd International Conference on Control, Instrumentation and Automation, pages 654–659, Shiraz, Iran, November 2011.

[123] Nima Mohajerin and Steven L. Waslander. Modelling a quadrotor vehicle using a modular deep recurrent neural network. In 2015 IEEE International Con- ference on Systems, Man, and Cybernetics, pages 376–381, Kowloon, China, October 2015.

[124] Mohammed J. Mohammed, Mofeed T. Rashid, and Abduladhem A. Ali. De- sign optimal PID controller for quad rotor system. International Journal of Computer Applications, 106(3):15–20, 2014.

[125] Hyungpil Moon, Jose Martinez-Carranza, Titus Cieslewski, Matthias Faessler, Davide Falanga, Alessandro Simovic, Davide Scaramuzza, Shuo Li, Michael Ozo, Christophe De Wagter, Guido de Croon, Sunyou Hwang, Sunggoo Jung, Hyunchul Shim, Haeryang Kim, Minhyuk Park, Tsz-Chiu Au, and Si Jung Kim. Challenges and implemented technologies used in autonomous drone racing. Intelligent Service Robotics, 12(2):137–148, 2019.

[126] Rodrigo Munguia and Antoni Grau. Monocular slam for visual odometry: A full approach to the delayed inverse-depth feature initialization method. Math- ematical Problems in Engineering, 2012:26, 2012.

[127] Raul Mur-Artal and Juan D. Tardos. ORB-SLAM2: An open-source SLAM system for monocular, stereo, and RGB-d cameras. IEEE Transactions on Robotics, 33(5):1255–1262, October 2017.

189 [128] Desineni Subbaram Naidu. Optimal Control Systems. CRC Press, first edition, 2002.

[129] Vinod Nair and Geoffrey E. Hinton. Rectified linear units improve restricted boltzmann machines. In Proceedings of the 27th International Conference on Machine Learning, Haifa, Israe, June 2010.

[130] Hiroaki Nakanishi, Sayaka Kanata, and Tetsuo Sawaragi. Measurement model of barometer in ground effect of unmanned helicopter and its application to estimate terrain clearance. In 2011 IEEE International Symposium on Safety, Security, and Rescue Robotics, pages 232–237, Kyoto, Japan, November 2011.

[131] K. S. Narendra and K. Parthasarathy. Adaptive control using neural networks and approximate model. IEEE Transactions on Neural Networks, 8(3):475–485, 1997.

[132] N. D. Nathan and R. B. Green. The flow around a model helicopter main rotor in ground effect. Experiments in Fluids, 52(1):151–166, 2012.

[133] Nita Darshini Nathan. The rotor wake in ground effect and its investigation in a wind tunnel. PhD thesis, University of Glasgow, Scotland, UK, 2010.

[134] Shahriar Negahdaripour and Berthold K.P. Horn. A direct method for locating the focus of expansion. Computer Vision, Graphics, and Image Processing, 46:303–326, 1989.

[135] Oliver Nelles. Nonlinear System Identification. Springer-Verlag Berlin Heidel- berg, first edition, 2001.

[136] Laurence R. Newcome. Unmanned aviation: A brief history of unmanned aerial vehicles. Americal Institue of Aeronautics and Astronautics, first edition, 2004.

[137] H.V. Nguyen, C. Berbra, S. Lesecq, S. Gentil, A. Barraud, and C. Godin. Diagnosis of an inertial measurement unit based on set membership estimation. In 2009 17th Mediterranean Conference on Control and Automation, pages 211– 216, Thessaloniki, Greece, June 2009.

[138] Michael A. Nielsen. Neural Networks and Deep Learning. Determination Press, 2015.

[139] H. Nobahari and A. R. Sharifi. Continuous ant colony filter applied to online es- timation and compensation of ground effect in automatic landing of quadrotor. Engineering Applications of Artificial Intelligence, 32:100–111, 2014.

[140] Jorge Nocedal and Stephen J. Wright. Numerical Optimization. Springer, sec- ond edition, 2006.

190 [141] Kenichiro Nonaka and Hirokazu Sugizaki. Integral sliding mode altitude control for a small model helicopter with ground effect compensation. In Proceedings of the 2011 American Control Conference, pages 202–207, San Francisco, CA, USA, June 2011.

[142] Hassan Noura, Didier Theilliol, Jean-Christophe Ponsart, and Abbas Chamsed- dine. Fault-tolerant Control Systems. Springer London, 2009.

[143] Thanana Nuchkrua and Manukid Parnichkun. Identification and optimal con- trol of quadrotor. Science & Technology Asia, 17(4):36–53, 2012.

[144] Katsuhiko Ogata. Modern Control Engineering. Prentice Hall, fifth edition, 2010.

[145] Tom O’Haver. A pragmatic introduction to signal processing. https:// terpconnect.umd.edu/~toh/spectrum/, 2018.

[146] A. R. Partovi. Development of a cross style quadrotor. Meng thesis, Na- tional University of Singapore, 2012. https://core.ac.uk/download/pdf/ 48657308.pdf.

[147] Caitlin Powers, Daniel Mellinger, Aleksandr Kushleyev, Bruce Kothmann, and Vijay Kumar. Influence of aerodynamics and proximity effects in quadrotor flight. In The 13th International Symposium on Experimental Robotics, pages 289–302, Québec, QC, Canada, June 2013. Springer International Publishing.

[148] Sebastien Prothin, C. Fernandez Escudero, N. Doué, and Thierry Jardin. Aero- dynamics of MAV rotors in ground and corner effect. International Journal of Micro Air Vehicles, 11:1–13, 2019.

[149] Sebastien Prothin, C. Fernandez Escudero, Thierry Jardin, and N. Doué. ARChEaN: Aerodynamics of Rotors in Confined ENvironments study in ground and corner effect. In 10th International Micro-Air Vehicles Conference, pages 1–14, Melbourne, Australia, November 2018.

[150] Raymond W. Prouty. Helicopter Performance, Stability, and Control. Krieger Publishing Company, Malabar, FL, USA, second edition, 2001.

[151] Devi Pulla. A study of helicopter aerodynamics in ground effect. PhD thesis, Ohio State University, Columbus, OH, USA, 2006.

[152] Liguo Qin, Xiao He, Rui Yan, and Donghua Zhou. Active fault-tolerant control for a quadrotor with sensor faults. Journal of Intelligent & Robotic Systems, 88(2-4):449–467, January 2017.

[153] Anand Radhakrishnan and Fredric Schmitz. An experimental investigation of a quad tilt rotor in ground effect. In 21st AIAA Applied Aerodynamics Conference, pages 1–11, Orlando, FL, USA, June 2003.

191 [154] H. Rafaralahy, E. Richard, M. Boutayeb, and M. Zasadzinski. Simultaneous observer based sensor diagnosis and speed estimation of unmanned aerial vehi- cle. In 2008 47th IEEE Conference on Decision and Control, Cancun, Mexico, December 2008.

[155] Andrew Raine, Nauman Aslam, Christopher Underwood, and Sean Danaher. Development of an ultrasonic airflow measurement device for ducted air. Sen- sors, 15(5):10705–10722, May 2015.

[156] H. Rebecq, R. Ranftl, V. Koltun, and D. Scaramuzza. High speed and high dynamic range video with an event camera. IEEE Transactions on Pattern Analysis and Machine Intelligence, pages 1–16, 2019.

[157] R. Ritz, M. Hehn, S. Lupashin, and R. D’Andrea. Quadrocopter performance benchmarking using optimal control. In 2011 IEEE/RSJ International Confer- ence on Intelligent Robots and Systems, pages 5179–5186, San Francisco, CA, USA, September 2011.

[158] David Conal Robinson. Modelling and Estimation of Aerodynamic Disturbances acting on a Hovering Micro Helicopter in Close Proximity to Planar Surfaces. PhD thesis, Monash University, Melbourne, Australia, 2016.

[159] David Conal Robinson, H. Chung, and K. Ryan. Computational investiga- tion of micro helicopter near-wall effect. In 19th Australasian Fluid Mechanics Conference (AFMC), pages 1–4, Melbourne, Australia, December 2014. RMIT University.

[160] David Conal Robinson, H. Chung, and K. Ryan. Computational investigation of micro rotorcraft near-wall hovering aerodynamics. In 2014 International Con- ference on Unmanned Aircraft Systems (ICUAS), pages 1055–1063, Orlando, FL, USA, May 2014.

[161] David Conal Robinson, Kris Ryan, and Hoam Chung. Helicopter hovering attitude control using a direct feedthrough simultaneous state and disturbance observer. In 2015 IEEE Conference on Control Applications (CCA), pages 633– 638, Sydney, NSW, Australia, September 2015.

[162] L. Oyuki Rojas-Perez and Jose Martinez-Carranza. Metric monocular slam and colour segmentation for multiple obstacle avoidance in autonomous flight. In 2017 Workshop on Research, Education and Development of Unmanned Aerial Systems (RED-UAS), Linkoping, Sweden, October 2017.

[163] Tushar K. Roy. Robust adaptive backstepping controller for altitude control of a small scale helicopter by considering the ground effect compensation. Universal Journal of Control and Automation, 1(2):52–57, 2013.

[164] Tushar K. Roy, Matt Garratt, H. R. Pota, and M. K. Samal. Robust altitude control for a small helicopter by considering the ground effect compensation. In

192 Proceedings of the 10th World Congress on Intelligent Control and Automation, pages 1796–1800, Beijing, China, July 2012.

[165] Tushar K. Roy and A. A. Suman. Adaptive backstepping controller for altitude control of a small scale helicopter by considering the ground effect compensa- tion. In 2013 International Conference on Informatics, Electronics and Vision (ICIEV), pages 1–5, Dhaka, Bangladesh, May 2013.

[166] Alicia Arce Rubio, Alexandre Seuret, Yassine Ariba, and Alessio Mannisi. Op- timal Control Strategies for Load Carrying Drones, pages 183–197. Springer International Publishing, Cham, 2016.

[167] Tyler Ryan and H. Jin Kim. Modelling of quadrotor ground effect forces via simple visual feedback and support vector regression. In AIAA Guidance, Nav- igation, and Control Conference, Guidance, Navigation, and Control and Co- located Conferences, pages 1–12, Minneapolis, MN, USA, August 2012. Amer- ican Institute of Aeronautics and Astronautics.

[168] P. J. Sanchez-Cuevas, Guillermo Heredia, and Anibal Ollero. Characteriza- tion of the aerodynamic ground effect and its influence in multirotor control. International Journal of Aerospace Engineering, 2017:17, 2017.

[169] P. J. Sanchez-Cuevas, Guillermo Heredia, and Anibal Ollero. Experimental approach to the aerodynamic effects produced in multirotors flying close to obstacles. In ROBOT 2017: Third Iberian Robotics Conference, Advances in Intelligent Systems and Computing, pages 742–752, Seville, Spain, November 2017. Springer International Publishing.

[170] P. J. Sanchez-Cuevas, Guillermo Heredia, and Anibal Ollero. Multirotor UAS for bridge inspection by contact using the ceiling effect. In 2017 International Conference on Unmanned Aircraft Systems (ICUAS), pages 767–774, Miami, FL, USA, June 2017.

[171] P. J. Sanchez-Cuevas, Guillermo Heredia, and Anibal Ollero. Multirotor Aero- dynamic Effects in Aerial Manipulation, pages 67–82. Springer International Publishing, Cham, Switzerland, 2019.

[172] P. J. Sanchez-Cuevas, Victor Martín, Guillermo Heredia, and Aníbal Ollero. Aerodynamic effects in multirotors flying close to obstacles: Modelling and mapping. In Robot 2019: Fourth Iberian Robotics Conference, Advances in Intelligent Systems and Computing, pages 63–74, Porto, Portugal, November 2019. Springer International Publishing.

[173] Didi Sazbon, Hector Rotstein, and Ehud Rivlin. Finding the focus of expansion and estimating range using optical flow images and a matched filter. Machine Vision and Applications, 15:229–236, 2004.

193 [174] Lawrence F. Shampine, Jacek Kierzenka, and Mark W. Reichelt. Solving bound- ary value problems for ordinary differential equations in MATLAB with bvp4c. https://classes.engineering.wustl.edu/che512/bvp_paper.pdf, 2000.

[175] Stuart C. Shapiro. Encyclopedia of Artificial Intelligence. John Wiley & Sons, Inc., USA, second edition, 1992.

[176] I. Sharf, M. Nahon, A. Harmat, W. Khan, M. Michini, N. Speal, M. Trentini, T. Tsadok, and T. Wang. Ground effect experiments and model validation with Draganflyer X8 rotorcraft. In 2014 International Conference on Unmanned Aircraft Systems (ICUAS), pages 1158–1166, Orlando, FL, USA, May 2014.

[177] G. Shi, X. Shi, M. O’Connell, R. Yu, K. Azizzadenesheli, A. Anandkumar, Y. Yue, and S. Chung. Neural lander: Stable drone landing control using learned dynamics. In 2019 International Conference on Robotics and Automa- tion (ICRA), pages 9784–9790, Montreal, QC, Canada, May 2019.

[178] Ansu Man Singh, Deok Jin Lee, Dong Pyo Hong, and Kil To Chong. Succes- sive loop closure based controller design for an autonomous quadrotor vehicle. Applied Mechanics and Materials, 483:361–367, 2013.

[179] Randall Smith, Matthew Self, and Peter Cheeseman. Estimating uncertain spatial relationships in robotics. In Ingemar J. Cox and Gordon T. Wilfong, editors, Autonomous Robot Vehicles, pages 167–193. Springer New York, New York, NY, USA, 1990.

[180] Young Min Song, Yizhu Xie, Viktor Malyarchuk, Jianliang Xiao, Inhwa Jung, Ki-Joong Choi, Zhuangjian Liu, Hyunsung Park, Chaofeng Lu, Rak-Hwan Kim, Rui Li, Kenneth B. Cozier, Yonggang Huang, and John A. Rogers. Digital cameras with designs inspired by the arthropod eye. Nature, 497:95–99, 2013.

[181] G. Szafranski and R. Czyba. Different approaches of PID control UAV type quadrotor. In Proceedings of the International Micro Air Vehicle Conference and Flight Competition 2011 Summer Edition, pages 70–75, ‘t Harde, the Nether- lands, September 2011.

[182] Chee Pin Tan and Christopher Edwards. Sliding mode observers for robust de- tection and reconstruction of actuator and sensor faults. International Journal of Robust and Nonlinear Control, 13(5):443–463, 2003.

[183] M. Tistarelli, E. Grosso, and G. Sandini. Dynamic stereo in visual navigation. In Proceedings. 1991 IEEE Computer Society Conference on Computer Vision and Pattern Recognition, pages 186–193, Maui, HI, USA, June 1991.

[184] T. Tomic and S. Haddadin. A unified framework for external wrench estimation, interaction control and collision reflexes for flying robots. In 2014 IEEE/RSJ International Conference on Intelligent Robots and Systems, pages 4197–4204, Chicago, IL, USA, September 2014.

194 [185] Sadia Waheed, Asad Ullah Awan, Kunwar Faraz Ahmed Khan, and Muwahida Liaquat. Robust tracking of quadrotor UAV using RISE controller with input saturation. In 2015 34th Chinese Control Conference (CCC), pages 5507–5512, Hangzhou, China, July 2015.

[186] Xinkuang Wang, Shanshan Du, and Yong Liu. Research on ceiling effect of quadrotor. In 2017 IEEE 7th Annual International Conference on CYBER Technology in Automation, Control, and Intelligent Systems (CYBER), pages 846–851, Honolulu, HI, USA, July 2017.

[187] Peng Wei, Sui Nam Chan, Seongkyu Lee, and Zhaodan Kong. Mitigating ground effect on mini quadcopters with model reference adaptive control. International Journal of Intelligent Robotics Applications, 3(3):283–297, 2019.

[188] B. Xiao and S. Yin. A new disturbance attenuation control scheme for quadro- tor unmanned aerial vehicles. IEEE Transactions on Industrial Informatics, 13(6):2922–2932, 2017.

[189] Nguyen Xuan-Mung and Sung-Kyung Hong. Improved altitude control algo- rithm for quadcopter unmanned aerial vehicles. Applied Sciences, 9(10):2122, May 2019.

[190] Zhenyu Yu, Kenzo Nonami, Jinok Shin, and Demian Celestino. 3D vision based landing control of a small scale autonomous helicopter. International Journal of Advanced Robotic Systems, 4(1):51–56, 2007.

[191] J. K. Zbrozek. Ground effect on the lifting rotor. Technical Report 2347, Aeronautical Research Council, London, UK, July 1947.

[192] Ke Zhang, Bin Jiang, and Vincent Cocquempot. Adaptive observer-based fast fault estimation. International Journal of Control, Automation and Systems, 6(3):320–326, June 2008.

[193] Y.M. Zhang, A. Chamseddine, C.A. Rabbath, B.W. Gordon, C.-Y. Su, S. Rakheja, C. Fulford, J. Apkarian, and P. Gosselin. Development of advanced FDD and FTC techniques with application to an unmanned quadrotor heli- copter testbed. Journal of the Franklin Institute, 350(9):2396–2422, November 2013.

[194] J. Zhu, E. Liu, S. Guo, and C. Xu. A gradient optimization based PID tuning approach on quadrotor. In The 27th Chinese Control and Decision Conference (2015 CCDC), pages 1588–1593, Qingdao, China, May 2015.

[195] Andrew Zulu and Samuel John. A review of control algorithms for autonomous quadrotors. Open Journal of Applied Sciences, 4:547–556, 2014.

195