Quadcopter Experimental Evaluation of Nonlinear ... - AIAA ARC

1 downloads 0 Views 520KB Size Report
University of Missouri-Kansas City, MO, 64110, USA. Real time ... controller and used for real-time recursive Fourier Transform Regression (FTR) parameter.
Quadcopter Experimental Evaluation of Nonlinear Dynamic Inversion Coupled with Fourier Transform Regression Mohammed I. Alabsi∗ and Travis D. Fields,† University of Missouri-Kansas City, MO, 64110, USA Real time parameter estimation of unmanned aircraft is an essential requirement for indirect adaptive control. However, the persistent excitation requirement for parameter convergence can severely degrade the trajectory tracking capabilities. With minimal flight excursions, orthogonal phase optimized multisine signals are superimposed with the active controller and used for real-time recursive Fourier Transform Regression (FTR) parameter estimation. A Non-Linear Dynamic Inversion (NDI) controller utilized the online parameter estimates for the control reconfiguration. In this paper, an on-board microcomputer utilized FTR for the parameter estimation of a quadrotor model. Experiments were conducted considering three testing scenarios: normal flight, induced failure during normal flight, and learning flight. The results indicate that the high fidelity online models were able to reconfigure the flight control even with little a priori information (learning flight). The integration of NDI control with FTR parameter estimation produces fast, efficient flight control that can both learn and mitigate anomalies in real-time.

Nomenclature {Ar , Ap , Ay } A {Br , Bp } {By,1 , By,3 } {By,2 , By,4 } {ˆbx , ˆby , ˆbz } {b1 , b2 , b3 } {Cr , Cp } {Dr , Dp , Dy } Fi Ixx Iyy Izz Kth Kaero L Pi ˜ X ˜ Z ¨ θ, ¨ ψ} ¨ {φ, ∗ Ph.D.

= = = = = = = = = = = = = = = = = = = =

Reference model drag constant about roll, pitch, yaw axes respectively, 1/s Multisine input amplitude Reference model input constant about roll, pitch axes respectively, 1/s2 Reference model input constant about yaw axis for motors one and three respectively, 1/s2 Reference model input constant about yaw axis for motors two and four respectively, 1/s2 Orthogonal unitary basis fixed to quadrotor frame Aerodynamic drag constant about roll, pitch, yaw axes respectively, kg.m2 /s Reference model input constant about roll, pitch axes respectively, 1/s2 Reference model input constant about roll, pitch, yaw axes respectively, rad/s2 Motor/propeller thrust force where i = 1,2,3,4 , N Quadrotor moment of inertia about center of mass along ˆbx axis, kg.m2 Quadrotor moment of inertia about center of mass along ˆby axis, kg.m2 Quadrotor moment of inertia about center of mass along ˆbz axis, kg.m2 Motor thrust coefficient, kg.m/s2 Motor aerodynamic moment coefficient, kg/s2 Quadrotor arm length, m Motor i input command where i = 1,2,3,4 Regressors matrix in frequency domain Measured output vector in frequency domain Quadrotor angular acceleration about ˆbx,y,z axis, rad/s2

student, Civil and Mechanical Engineering, 5110 Rockhill Rd, Kansas City, MO, AIAA Student Member. Professor, Civil and Mechanical Engineering, 5110 Rockhill Rd, Kansas City, MO, [email protected], AIAA

† Assistant

Member.

1 of 13 American Institute of Aeronautics and Astronautics

˙ θ, ˙ ψ} ˙ {φ, γ ω

= = =

Quadrotor angular velocity about ˆbx,y,z axis, rad/s Parameter vector Frequency, Hz

I.

Introduction

Flight controller reconfiguration is a fundamental aspect of adaptive control and fault tolerant control techniques. Aircraft control in off-nominal conditions with many uncertainties pose control challenges for the conventional flight controllers due to the deviation from baseline dynamics. The implementation of recursive parameter estimation coupled with Nonlinear Dynamic Inversion (NDI) can effectively regain control post failure. High fidelity on-line models minimize the required adaptation time and effort because the location and amount of the failure can be quantified efficiently. Further, online parameter estimation can reconfigure the NDI controller thereby canceling out the undesired dynamics imposed by the failure.1 The work described herein utilized a quadrotor with an on-board computer for experimental evaluation. A quadrotor was selected due to its low cost, high maneuverability and its natural instability which requires a fast controller action during failure testing. There have been a variety of reconfigurable fault tolerant control schemes developed over the past few years. A common approach utilizes gain scheduling Proportional Integral Derivative (GS-PID) controller for tuning the gains considering nominal and failure flight conditions.2 PID controllers are designed for fault free and pre-defined fault situations, switching between different controllers is based on the actuator health. However, GS-PID performance depends on the switching time between pre-tuned controllers and the accurate fault detection, both of which can be difficult to achieve given the random nature of failures. An alternative approach to traditional gain scheduling approach incorporates neural network with the dynamic inversion.3 Pre-trained and online learning neural networks provide the aircraft model parameters required for dynamic inversion (NDI). If trained sufficiently, neural network-based adaptive control does not require gain scheduling because it compensates for changing aircraft dynamics leading to minimal inversion error. However, pretrained and online learning neural networks require high computational resources which can be difficult for on-board computers used for unmanned aircraft. Additionally, reconfiguration of NDI model using precise parameter estimation outperforms neural network-based method in the sense of model identification irrespective of the training set. Adaptive control systems utilize flight data to automatically reconfigure the controller. The adaptive strategies fall within either direct or indirect categories. Direct adaptive control estimates the control gains based on parameterized plant model without the need for plant parameter estimation, while indirect adaptive control methods employ parameter estimation algorithms to adapt the control gains.4, 5 Direct Model Reference Adaptive Control (MRAC) is commonly utilized to compensate for the uncertainty in the unknown plant parameters.6 In the 1990s, a novel adaptive control architecture coined L1 adaptive control was developed which suggested the insertion of a first order filter at the input of MRAC scheme.7 The L1 adaptive controller is capable of tracking a desired transient reference signal via high adaptation gains and a low pass filter on actuation. However, aggressive learning characterized by high adaptation gains and learning rates results in less robust control towards the un-modeled dynamics.3, 8 Researchers proposed a hybrid approach (direct and indirect) in order to improve the direct MRAC performance related to the adaptation behaviour.9 In the hybrid MRAC scheme, the indirect adaptive law estimates the plant parameters which are used for NDI. A neural network compensates for the remaining inversion error. The indirect adaptive law plays a fundamental role in reducing the online neural network learning effort which is important given the limited on-board computational capabilities. Hence, the requirement of a robust, precise and efficient online parameter estimation method is vital for adaptive control. Recursive least squares has been used efficiently for parameter estimation. However, time domain analysis requires the entire data record to be stored which can be discounted by including data forgetting factor.10, 11 Fourier Transform Regression (FTR), which employs recursive least squares in frequency domain, has been used successfully to estimate aircraft stability and control derivatives.10, 12, 13 The frequency-domain based least squares offers a computational and storage advantages with a performance equivalent to the real time approach. For systems with active control system, such as naturally unstable quadrotor, the parameter estimation accuracy is deteriorated by the data linear dependence imposed by the control system. The input linear dependence, also known as collinearity, is an implication of the vehicle design. For example, the aileron control surfaces of fixed-wing aircraft receive equal and opposite input command in order to control

2 of 13 American Institute of Aeronautics and Astronautics

the roll motion. However, a well designed excitation input can reduce the collinearity between the actuators with minimal flight excursions.14 The focus of the work described herein is on experimental evaluation of FTR estimation to produce high fidelity online models and reconfigure the NDI control considering nominal, failure and learning flight scenarios.

II. A.

Methodology

Quadrotor Dynamics

The development of the quadrotor equations of motion have been studied extensively.15–18 Figure 1 shows the quadrotor structure used in this study and body-fixed coordinate system. Control of six degreeof-freedom is achieved with the four rotor/propeller actuators, creating an under-actuated system. Pitch motion is controlled by varying the speed of the front and rear motors (P1 and P3 ). Roll motion is controlled by varying the speed of left and right motors (P2 and P4 ). Yaw motion is generated by creating a nonzero aerodynamic moment through manipulating the speeds of the counter-clockwise (P2 and P4 ) and the clockwise (P3 and P1 ) motors. Lift is generated by adding the thrust from the four motors. Each degree of freedom can be realized as multi-input single-output system (i.e. two actuators are used to change the pitch angle).

bˆx P3

bˆy P2

P4

P1 Figure 1: Quadrotor body-fixed coordinate system and motion orientation. For parameter estimation and flight control application, a linear, decoupled dynamic model is developed for each axis assuming relatively small angular rotations.           P1 ¨ ˙ Ixx 0 0 φ b1 0 0 φ 0 −Kth,2 L 0 Kth,4 L            P2   0 Iyy 0   θ¨ =  0 b2 0   θ˙  +  −Kth,1 L 0 Kth,3 L 0   (1)  P3  ¨ ˙ 0 0 Izz ψ 0 0 b3 ψ Kaero,1 −Kaero,2 Kaero,3 −Kaero,4 P4 B.

Non-Linear Dynamic Inversion Controller

Let us express the quadrotor dynamics by the following representation: dy = f (x) + g(x)u (2) dt where f and g can be linear or nonlinear functions of x, u is the control input. If g is invertible for all value of x then the control law is obtained as follow: u = g −1 [−f (x) + v]

(3)

where v is the rate of the controlled state, usually called the virtual input. Using NDI controller, the rate of the desired state is specified instead of the state itself.19 The dynamic inversion requires exact knowledge of the model dynamics so that the system follows a desired trajectory.16, 20 Before applying the NDI, the rotational equations of motion need to be written in linear regressor form. φ¨ =

Ar φ˙ + Br P2 + Cr P4 + Dr 3 of 13

American Institute of Aeronautics and Astronautics

(4)

θ¨ = Ap θ˙ + Bp P1 + Cp P3 + Dp

(5)

ψ¨ = Ay ψ˙ + By,1 P1 + By,2 P2 + By,3 P3 + By,4 P4 + Dy

(6)

Examining the roll motion equation, Ar = b1 /Ixx , Br = L ∗ Kth,2 /Ixx , Cr = L ∗ Kth,4 /Ixx , and Dr is a bias term that accounts for modeling uncertainties and trim conditions. The contribution of each motor toward the motion is treated separately (Br and Cr terms) which are equal and opposite if the actuators generate the same thrust. Inverting the model and isolating the individual actuator contribution yield the individual control input.              



P1p P1y    P2r   P2y   P3p    P3y   P4r  P4y



0

1 Bp

       =        

0

0

1 Br

0

0 0

0

1 Cp

0

0

1 Cr

0

0 0



0

−Ap Bp

    0      φ¨ 1    By,2   ¨ θ +    0  ¨  ψ   1   By,3     0  

0

0

−Ar Br

0

0 0

0

−Ap Cp

0

0

−Ar Cr

0 0

0



1  By,1  

1 By,4

0

0



−Ay  By,1  

0   

˙ −Ay  φ  By,2   ˙ 

θ 0   ˙ ψ  −Ay  By,3   0 

(7)

−Ay By,4

where P1 = P1p + P1y , P2 = P2r + P2y , P3 = P3p + P3y , P4 = P4r + P4y . Linear controller design techniques can be followed for the design of the virtual input. ˙ + Kp ∗ (φdes − φ)) vφ = (φ¨des + Kd ∗ (φ˙ des − φ) ˙ + Kp ∗ (θdes − θ)) vθ = (θ¨des + Kd ∗ (θ˙des − θ)

(8)

˙ + Kp ∗ (ψdes − ψ)) vψ = (ψ¨des + Kd ∗ (ψ˙ des − ψ)

(10)

(9)

The virtual input required to follow a desired trajectory is substituted in Eq.7 in order to find the individual control input. P1p

=

1 ¨ ˙ + Kp ∗ (θdes − θ) − Ap ∗ θ) ˙ (θdes + Kd ∗ (θ˙des − θ) Bp

1 ¨ ˙ + Kp ∗ (ψdes − ψ) − Ay ∗ ψ) ˙ (ψdes + Kd ∗ (ψ˙ des − ψ) By,1 1 ¨ ˙ + Kp ∗ (φdes − φ) − Ar ∗ φ) ˙ P2r = (φdes + Kd ∗ (φ˙ des − φ) Br 1 ¨ ˙ + Kp ∗ (ψdes − ψ) − Ay ∗ ψ) ˙ P2y = (ψdes + Kd ∗ (ψ˙ des − ψ) By,2 1 ¨ ˙ + Kp ∗ (θdes − θ) − Ap ∗ θ) ˙ (θdes + Kd ∗ (θ˙des − θ) P3p = Cp 1 ¨ ˙ + Kp ∗ (ψdes − ψ) − Ay ∗ ψ) ˙ P3y = (ψdes + Kd ∗ (ψ˙ des − ψ) By,3 1 ¨ ˙ + Kp ∗ (φdes − φ) − Ar ∗ φ) ˙ P4r = (φdes + Kd ∗ (φ˙ des − φ) Cr 1 ¨ ˙ + Kp ∗ (ψdes − ψ) − Ay ∗ ψ) ˙ P4y = (ψdes + Kd ∗ (ψ˙ des − ψ) By,4 P1y

C.

=

(11) (12) (13) (14) (15) (16) (17) (18)

Real Time Parameter Estimation

The goal of the parameter estimation is to capture accurate systems dynamics required to reconfigure the NDI controller online with limited on-board computational capabilities. Therefore, the real time parameter estimation technique described in this paper utilizes a recursive Fourier transform coupled with a least squares estimation.10, 21 Frequency-domain parameter estimation outperforms its real-time counterparts because of 4 of 13 American Institute of Aeronautics and Astronautics

several advantages including flight data band pass filtering and computational efficiency. The linear regressor ∼

based model is formulated considering the dependent variable (angular acceleration) Z(ω) in frequency ∼

domain, the independent variable (regressors matrix) X(ω) and the unknown parameters γ = [A, B, C]0 . The angular acceleration is calculated using a six-point moving least squares trend line of the rate gyro data. The current tremd line slope is then the angular acceleration which is calculated with Eq.19: P6 P6 P6 6 ∗ k=i−5 φ˙i ∗ ti − k=i−5 φ˙i ∗ k=i−5 ti ¨ (19) slope = φ = P 2 P6 6 t 6 ∗ k=i−5 t2i − i k=i−5 The dependent variable is then transformed to the frequency domain with a recursive Fourier transform algorithm at each time step. The recursive Fourier transform enables extremely fast data transformations while retaining critical data needed for accurate identification estimation. Additionally, the frequency content is stored into M predetermined frequency bins, ωk where k = 1, 2, ...M . Therefore, the relatively small data storage requirements are known a priori, as the number of desired frequencies, M , is set by the user prior to conducting flight operations. ∼



= λZ i−1 (ω) + z(i)e−jωiδt

Zi (ω)

(20)

Within the recursive Fourier Transform, a forgetting factor, λ, is incorporated to enable exponential forgetting of previously transformed flight data. The inclusion of this factor is particularly important when attempting to estimate time varying parameters (i.e. in-flight failures). Typically, λ is contained between 0.95 and 0.999.22 Lower forgetting factors will converge faster; however, the stability of the parameter estimates will be degraded. For this study a forgetting factor of λ = 0.999 is used for all experiments. Both the dependent and independent (regressor matrix) are transformed to the frequency domain with the recursive Fourier transform. The frequency-domain linear regressor model then follows the form ∼



Z i (ω)

=



X(ω)γ + e

(21)



Where e is the regression error and γ is the unknown parameter matrix. The regressor matrix follows the regressor forms. An example regressor matrix for the roll axis is given by Eq. 22.   ˙ 1 ) P2 (w1 ) P4 (w1 ) φ(w  ˙   φ(w2 ) P2 (w2 ) P4 (w2 )  ∼  ˙   X(ω) =  (22)  φ(w3 ) P2 (w3 ) P4 (w3 )  .. ..  ..   .  . . ˙ φ(wM ) P2 (wM ) P4 (wM ) The equation error-based estimation is accomplished analytically by utilizing the traditional least squares cost function (Eq. 23). J(γ) =

1 ˜ ˜ 0 (Z˜ − Xγ) ˜ (Z − Xγ) 2

(23)

The benefit of the linear regressor least squares formulation is the ability to analytically solve for the optimal unknown parameter estimates each time step (rather than implementing a computationally expensive optimization algorithm). The optimal value of the parameters vector γ is obtained by equating the cost function gradient to zero and calculating the estimates. γ=

˜ ∗ X)] ˜ −1 Re(X ˜ ∗ Z) ˜ [Re(X

(24)

The Bias term D can not be included in the FTR as a bias represents a zero frequency component. The elimination of the bias term can affect the accuracy of the estimation results, and care should be taken to ensure the biases are removed from the data prior to performing a parameter estimation. Optimal input design is an essential aspect for the parameter estimation algorithm convergence and accuracy. The input design topic has been researched extensively and it was proved that the parameter theoretical lowest standard 5 of 13 American Institute of Aeronautics and Astronautics

error (cramer-rao bound) is dependent on the information content of an experiment.23 Three main factors were investigated in the literature for the optimal input design: input amplitude, input frequency band and excitation period. Research outcomes promoted the sharp cornered inputs because of their ability to excite wide frequency band.23, 24 However, higher number of frequencies yields higher input amplitudes which is not favored because of the loss of trajectory control. The aforementioned constraints led to the development of the phase optimized multisine input. The multisine input combines between wide frequency band excitation and lower signal amplitude leading to the maximization of the information content with minimal output excursions. This method can provide continuous excitation during the flight, Morelli presented an example where orthogonal inputs were applied while the pilot held controls for 8◦ sideslip angle, the correspondent perturbation angle induced by the input was less than 2◦ .25 Quadrotors don’t have separate control surfaces (elevator, aileron, rudder) that can be utilized for dynamic excitation. Therefore, the input is applied directly to motor output commands. Detailed explanation about the signal generation, phase optimization and amplitude selection is discussed in a companion paper.14

III.

Hardware and Testing Methodology

A custom quadrotor was constructed with a frame diameter of 0.45 m (1.5 ft) and total weight of (including battery and on-board computer) 1.223 kg (2.69 lb). Flight control and data transmission is performed by an on-board microcontroller (X-Monkey, RyanMechatronics LLC.). The microcontroller contains a barometric altimeter, three-axis gyroscope, three-axis magnetometer, three axis-accelerometer, GPS and on-board SD card logging. The processor is an ARM LPC1768 chip with 512 kb flash memory, 64 kb RAM memory, 6 output PWM, five 12 bit A/D converter and six pulse width modulation outputs. SD card logging, state estimation and control was performed in 100 Hz loop. A wired two-way serial data transmission was established to an on-board computer (Raspberry-Pi 3). The computer processor is a broadcom BCM387 chipset with 1 GB LPDDR2 RAM memory. The Raspberry-Pi computer boots a Linux operating system from a Micro SD card. The parameter estimation was not carried out at 100 Hz because of the limited computational capabilities of the microcomputer and serial communication packets dropout. Therefore, the data points are not equally spaced which can yield additional estimation error. Post-processing comparison between unequally time spaced flight data FTR and time interpolated FTR showed an error of 2%. The evaluation of the flight controller reconfiguration was conducted in three phases: normal, failure and learning flight. Testing during normal flight conditions enabled the comparison of the model real time parameter estimates with the benchmark results identified in a companion paper.14 Additionally, the parameter estimates stability over 30 seconds period was evaluated. During the failure testing, the parameter estimation algorithm was initiated ten seconds before the failure. The failure was simulated by cutting single motor output command by 30% and sending the nominal command (without failure) to the parameter estimation algorithm. In the learning flight testing, model parameters were cut into half in order to evaluate the capability of the estimation algorithm to identify the benchmark model parameters and reconfigure the controller. A set of four actuator multisine signals were assigned to each motor input as eleborated in the parameter estimation paper.14 The benchmark motor constants utilized in all three testing are listed in Table 1. Hence, the values might slightly differ during free flight due to load distribution. Br & Bp [1/s2 ] 0.087

By [1/s2 ] 0.0026

Table 1: Benchmark motor constant Free flight testing was performed in the 750f t2 UMKC Drone Research and Teaching (DRAT) laboratory. Within the DRAT lab a safety net flight volume has been created with dimensions of 3.7 × 2.5 × 2.8m (12.1 × 8.2 × 9.2f t). The multisine signals were enabled all the time. For both normal and failure testing, benchmark parameters were programmed initially and the parameter estimation algorithm was initiated right after the quadrotor takeoff; however, the normal flight did not utilize the online estimates while the failure flight utilized them right after failure. Owing to the ground effects that might affect the estimation accuracy, the failure was initiated after ten seconds of flight stabilizing at one meter height. For the learning flight, initial parameters were selected in order to safely fly the quadrotor in a quasi-stable state. The associated equation error variance-based error bounds were calculated for each parameter estimate.

6 of 13 American Institute of Aeronautics and Astronautics

The error bounds provide a quantifiable measure of the degree of fit between the regressor model and the dependent variable (angular acceleration for this study).10 h  i 0 1 (Z − X γˆ ) (Z − X γˆ ) (25) σ ˆ2 = m+s Where s is the number of parameters in the vector γ, m is the number of frequency bins. The square root of the diagonal elements of σ ˆ represents the standard error for each parameter estimate.

IV. A.

Results

Normal flight

The goal of the normal flight testing is to assess the parameter estimation accuracy and the controller performance. Prior to evaluate the active controller performance with the superimposed excitation signal, the free flight trajectory tracking capabilities were quantified considering multisine free baseline controller. Using A = 40 multisine amplitude, the standard deviation in the roll and yaw angles during ten second flight records was 7.08◦ and 2.3◦ receptively compared with 3.25◦ and 3.90◦ for the multisine free A = 0 baseline flight controller. Testing was conducted for roll, pitch and yaw axes with nominal actuators. The complete roll axis testing results are: Ar = −0.36, Br = −0.095 and Cr = 0.087. The real time estimates are calculated with the FTR method which do not provide bias estimates (Dr ). The real-time parameters were acquired at 50 Hz; however, the real-time estimates provided were the final trial estimates. An example trial with the normal flight parameter estimation is shown in Figure 2. For this trial, the estimation was initiated right after the quadrotor took off from the ground and the benchmark parameters were programmed in the controller. Hence, the parameters presented in the figure were not used for control purpose. The 90% convergence to the benchmark values for Br and Cr was observed at 20 seconds. The parameter estimate error bounds were calculated as the standard error of (±2ˆ σ ) defined in Eq.25. 5 Ar [1/s]

Real time est. Error bound 90% convergence

0 −5

0

5

10

15

20

25

30

0

5

10

15

20

25

30

0

5

10

15 Time [sec]

20

25

30

0 −0.05 Br [1/s2] −0.1

0.15 Cr [1/s2] 0.1 0.05 0

Figure 2: Roll motion parameter estimates during normal flight. Identical to the roll axis testing, the multisine signal of amplitude A = 40, was applied on nominal pitch actuators. The complete pitch testing results are Ap = 1.76, Bp = −0.075 and Cp = 0.079. Minor asymmetry and the battery mounting direction resulted in minor variation between pitch and roll parameters. An example of pitch normal flight parameter estimation with the same flight conditions is shown in Figure 3. The 90% parameter estimation convergence occurs at time 20 seconds. In both roll and pitch testing, the damping coefficient Ar and Ap have larger variations and took longer time to converge. The yaw axis parameter estimates were evaluated with an increased multisine input A = 60. The complete yaw testing results are Ay = 1.76, By,1 = −0.0014, By,2 = −0.0010, By,3 = 0.0010 and By,4 = 0.001423. 7 of 13 American Institute of Aeronautics and Astronautics

4 Ap [1/s]

Real time est. 2 0

Error bound 90% convergence 0

5

10

15

20

25

30

0

5

10

15

20

25

30

0

5

10

15 Time [sec]

20

25

30

0 −0.05 Bp [1/s2] −0.1

0.15 Cp [1/s2] 0.1 0.05 0

Figure 3: Pitch motion parameter estimates during normal flight.

Figure 4 shows the convergence time and accuracy for the yaw parameter estimates. Identical to the roll/pitch testing, the algorithm was initiated during takeoff. The estimates converged to 50% of the benchmark values during the first 30 seconds. Because of the increased multisine signal required to excite the yaw axis and longer convergence time of yaw parameters, the yaw axis testing will not be considered during failure and learning flights.

−5 Ay [1/s]

Real time est. Error bound

−10

0 −3 x 10

5

10

15

20

25

30

0 −3 x 10

5

10

15

20

25

30

0 −3 x 10

5

10

15

20

25

30

0 −3 x 10

5

10

15

20

25

30

0

5

10

15 Time [sec]

20

25

30

0 −5 By,1 [1/s2] −10 0 −5 By,2 [1/s2] −10 10 5 By,3 [1/s2] 0

10 5 By,4 [1/s2] 0

Figure 4: Yaw motion parameter estimates during normal flight.

8 of 13 American Institute of Aeronautics and Astronautics

B.

Failure flight

This section presents the parameter estimates convergence time and the adaptation behavior in terms of the angular rate measure during the failure flight. The estimation algorithm was initiated ten seconds before the failure and the estimates were streamed into the controller at 50 Hz. The failure was induced by cutting the output motor command by 30%, because a 50% failure could not safely stabilize with the hardware on the quadrotor. The nominal commands were sent to the parameter estimation algorithm. Figure 5 shows an example of the roll parameter estimates with the algorithm running before the failure. The failed actuator constant Br converged to the 90% of the steady state value of -0.071 in 1.5 seconds. Identical to the normal flight scenario, the nominal actuator constant Cr converged to the benchmark value of 0.087 within 0.5 seconds. There is a one second delay observed between the failure initiation and the estimation response which is caused by the serial buffer capacity. Figure 7 shows the adaptation behavior in terms of the angular rate, there is an observed oscillation that persists for the first four seconds after the failure initiation; however, the oscillation was reduced by order of ten after the fourth second post failure. 5 Ar [1/s]

0

Real time est. Error bound 90% convergence

−5 −5

0

5

10

15

0

5

10

15

0

5 Time from failure [sec]

10

15

0 −0.05 Br [1/s2] −0.1 −5 0.15 Cr [1/s2] 0.1 0.05 0 −5

Figure 5: Roll motion parameter estimates during failure flight. 5 Ap [1/s]

Real time est. 0

−5 −5

Error bound 90% convergence 0

5

10

15

0

5

10

15

0

5 Time from failure [sec]

10

15

0 −0.05 Bp [1/s2] −0.1 −5 0.15 Cp [1/s2] 0.1 0.05 0 −5

Figure 6: Pitch motion parameter estimates during failure flight.

9 of 13 American Institute of Aeronautics and Astronautics

2 1 Ang. rate [rad/s] 0 −1 −2 −1

0

1

2 Time from failure [sec]

3

4

5

Figure 7: Roll angular rate during failure flight.

The same failure test was applied on the pitch actuators. Figure 6 shows the pitch parameter estimates with the algorithm initiated ten seconds before the failure. The failed actuator constant Bp = −0.06 converged to 90% of the steady state value within 1.5 seconds while the nominal actuator constant Cp = 0.07 converged to 90% of the nominal value within 2.1 seconds. The duration in both cases includes the one second delay in the serial buffer. In both roll and pitch testing, the damping coefficient Ar and Ap have larger variations and took longer time to converge. The angular rates are not presented for the pitch motion because it is nearly identical to the roll behavior. C.

Learning flight

The learning process adapts the model parameters based on the online flight data. Free flight testing requires a well-tuned stabilization controller for safe flight. However, random parameters based on the experience that can maintain the flight at quasi-steady state were programmed until the learning algorithm kicks in and reconfigure the controller. Both roll and pitch results are nearly identical, hence only pitch results are presented. Examining the pitch axis, model parameters Bp and Cp are assigned values of -0.03 and 0.03. An example of learning trial is shown in Figure 8. The quadrotor was stabilized for 20 seconds before initiating the estimation algorithm. At time zero, the estimation was started and the learning process started after the first second. Both parameters converged to 90% of the benchmark values within three seconds Bp = −0.07 and Cp = 0.069. Figure 9 shows angular rate of the pitch angle, after the first second, the rate oscillation was reduced by order of three (from ±1rad to ±0.35rad). 25 Real time est. Ap [1/s]20 15 10 −5

Error bound 90% convergence Initial parameter 0

5

10

15

0

5

10

15

0

5 Time from FTR algorithm kick off [sec]

10

15

0 Bp [1/s2] −0.1

−0.2 −5 0.2 Cp [1/s2] 0.1

0 −5

Figure 8: Pitch motion parameter estimates during learning flight.

10 of 13 American Institute of Aeronautics and Astronautics

2 1.5 1 0.5 Ang. rate [rad/s] 0 −0.5 −1 −1.5 −2 −1

0

1

2 Time from failure [sec]

3

4

5

Figure 9: Pitch angular rate during learning flight.

V.

Discussion

The focus of the normal flight testing was to compare the parameter estimates to the benchmarking parameters, and evaluate the NDI controller performance. Closely examining the roll and pitch parameter estimation results, the nominal actuator effectiveness (Br , Cr , Bp and Cp ) are well estimated when compared with the benchmark values. The parameters were changing steadily during the first 20 seconds as the estimation was initiated during takeoff; however, the steady state estimates after 20 seconds are nearly identical to the benchmark values with minimal error bounds. The slow convergence of the parameters during the first 20 seconds was a result of the tubulence effect near to the ground. During the first ten seconds, the quadrotor was hovering near to the ground, hence the model was changed after stabilizng the vehicle around a desired hight of one meter. Regarding the yaw parameter estimates (By,1 , By,2 , By,3 and By,4 ), the added inertia and limited motor capabilities around the yaw axis limit the excitation possible. Even with an inreased multisine signal, the estimates failed to converge within the same period as the roll and pitch motion. An important consideration with increasing the excitation input amplitude is the degraded tracking capabilites, hence the yaw axis was not considered for failure and learning testing. The Variations in the damping coefficient (Ar , Ap and Ay ) are significantly larger than the effectiveness parameters. Fortunately, the model match contribution by the drag coefficient is only 3% compared with 36% and 38% contributions from the two roll actuators. Drag components are often neglected for non-aggressive flight maneuvers.26, 27 For this reason, drag term was neglected during further testing. By comparing the roll and yaw angle fluctuation before and after imposing the excitation signal A = 40, the perturbation were slightly more than the inherent instabilities in the multisine free baseline controller. During the failure testing, the parameter estimates and the location of the failed actuator (Br and Bp ) were identified with minimal change in the nominal actuator Cr and Cp . Even with sufficient multisine excitation, there is a 10% undershoot observed in the nominal actuator parameters as a result of the highly coupled quadrotor dynamics which is damped one second later. The failed actuator coefficient was reduced by 27% percent within 1.5 seconds which nearly equals to the induced motor effectiveness reduction. There is significant fluctuations observed in the angular rate (Figure 7) which are caused by the pilot trying to control and induce a failure at the same time. After the on-line controller reconfiguration, the fluctuations are damped by a factor of ten. The quick and precise failure detection could be utilized for wide range of flight failures detection either from actuator malfunction, mass unbalance or any failure that causes physical model change. The aim of the learning flight was to investigate the capability of the estimation algorithm to identify the benchmark parameters without having a priori knowledge about the estimates. The actuators’ contribution and location are identified precisely within a few seconds after the estimation initiation. Because of the random initial model parameters, inherent non-linearities were not canceled causing a sluggish controller behavior. After enabling the estimation, the controller was reconfigured and the NDI controller regained the system stability. Examining the pitch axis, Eq.26 presents the equation of motion after learning the model

11 of 13 American Institute of Aeronautics and Astronautics

parameters. θ¨ =

Ap θ˙ − 0.07P1 + 0.069P3 + Dp

(26)

The learning test shows how the FTR estimation coupled with NDI control can minimize the time and effort spent during the vehicle prototyping and controller tuning through flight testing rather than extended model development, wind tunnel testing and simulation effort.

VI.

Conclusion

The objective of this study was to investigate the potential applicability of the recursive Fourier Transform Regression for closed loop control reconfiguration using an on-board microcomputer. Initially, a normal flight testing was performed to gain insight into the parameter estimation and NDI controller performance. The FTR method was capable of identifying a stable roll and pitch model parameters that canceled out the inherent dynamics and control the vehicle in normal flight conditions. However, yaw model parameters required larger multisine input amplitude which resulted in degraded trajectory performance on the roll and pitch axes. During the failure testing, FTR was capable of identifying the location and magnitude of the reduced actuator effectiveness; the NDI controller was reconfigured online within very short period. With randomly selected motor effectiveness coefficients, the algorithm was able to learn the benchmark parameters from the scratch and regain the vehicle control. The main advantage of combining NDI controller with an efficient online parameter estimation is the direct reconfiguration of the controller without the need for online tuning, gain scheduling or any computational expensive learning methods. The described method enables the rapid vehicle development and prototyping with minimal pre-flight design phase effort. Additionally, the method will encourage ”build it” and ”fly it” concept for rapid prototyping leading to faster innovation in unmanned aircraft development.

Acknowledgment Funding was provided by the University of Missouri Research Board and the NASA EPSCOR Research Infrastructure Development program, grant NNX15AK35A. Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of NASA or the University of Missouri Research Board. The authors would also like to acknowledge Igancio Hernandez and Anderw Reardon for their assistance in flight testing and software development.

References 1 Enns, D., Bugajski, D., Hendrick, R., and Stein, G., “Dynamic inversion: an evolving methodology for flight control design,” International Journal of control, Vol. 59, No. 1, 1994, pp. 71–91. 2 Zhang, Y., Chamseddine, A., Rabbath, C., Gordon, B., Su, C.-Y., Rakheja, S., Fulford, C., Apkarian, J., and Gosselin, P., “Development of advanced FDD and FTC techniques with application to an unmanned quadrotor helicopter testbed,” Journal of the Franklin Institute, Vol. 350, No. 9, 2013, pp. 2396–2422. 3 Nguyen, N., Krishnakumar, K., Kaneshige, J., and Nespeca, P., “Dynamics and adaptive control for stability recovery of damaged asymmetric aircraft,” AIAA Guidance, Navigation, and Control Conference and Exhibits, 2006, pp. 21–24. 4 Ioannou, P. and Fidan, B., Adaptive Control Tutorial, SIAM, 2006. 5 Yucelen, T., “Emerging Frontires in Adaptive Systems & Learning,” 2014 American Control Conference. 6 Achtelik, M., Bierling, T., Wang, J., Hocht, L., and Holzapfel, F., “Adaptive Control of a Quadcopter in the Presence of large/complete Parameter Uncertainties,” Infotech@ Aerospace, 2011, pp. 29–31. 7 Cao, C. and Hovakimyan, N., “Design and analysis of a novel L1 adaptive controller, Part II: Guaranteed transient performance,” American Control Conference, 2006 , IEEE, 2006, pp. 3403–3408. 8 Ioannou, P. A., Annaswamy, A. M., Narendra, K. S., Jafari, S., Rudd, L., Ortega, R., and Boskovic, J., “-Adaptive Control: Stability, Robustness, and Interpretations,” IEEE Transactions on Automatic Control, Vol. 59, No. 11, 2014, pp. 3075–3080. 9 Nguyen, N. T., Krishnakumar, K. S., Kaneshige, J. T., and Nespeca, P. P., “Flight dynamics and hybrid adaptive control of damaged aircraft,” Journal of guidance, control, and dynamics, Vol. 31, No. 3, 2008, pp. 751–764. 10 Morelli, E. A., “Real-time parameter estimation in the frequency domain,” Journal of Guidance, Control, and Dynamics, Vol. 23, No. 5, 2000, pp. 812–818. 11 Bodson, M., “An adaptive algorithm with information-dependent data forgetting,” American Control Conference, Proceedings of the 1995 , Vol. 5, IEEE, 1995, pp. 3485–3489. 12 Chowdhary, G., DeBusk, W., and Johnson, E. N., “Real-time system identification of a small multi-engine aircraft with structural damage,” AIAA Infotech@ Aerospace, 2010, pp. 20–22.

12 of 13 American Institute of Aeronautics and Astronautics

13 Campa, G., Napolitano, M., Seanor, B., and Perhinschi, M. G., “Online parameter estimation techniques comparison within a fault tolerant flight control system,” Journal of Guidance, Control, and Dynamics, Vol. 25, No. 3, 2002, pp. 528–537, DOI:10.2514/2.4913. 14 Alabsi, M. I. and Fields, T. D., “Improved Persistent Excitation for Real Time Parameter Estimation,” AIAA Atmospheric Flight Mechanics Conference, 2017. 15 Torres Gaitan, A. and Bolea, Y., “Modeling and robust attitude control of a quadrotor system,” Electrical Engineering, Computing Science and Automatic Control (CCE), 2013 10th International Conference on, IEEE, 2013, pp. 7–12. 16 Das, A., Subbarao, K., and Lewis, F., “Dynamic inversion with zero-dynamics stabilisation for quadrotor control,” Control Theory & Applications, IET , Vol. 3, No. 3, 2009, pp. 303–314. 17 Bouabdallah, S., Murrieri, P., and Siegwart, R., “Design and control of an indoor micro quadrotor,” Robotics and Automation, 2004. Proceedings. ICRA’04. 2004 IEEE International Conference on, Vol. 5, IEEE, 2004, pp. 4393–4398. 18 Hoffmann, G. M., Huang, H., Waslander, S. L., and Tomlin, C. J., “Quadrotor helicopter flight dynamics and control: Theory and experiment,” Proc. of the AIAA Guidance, Navigation, and Control Conference, Vol. 2, 2007. 19 Ito, D., Georgie, J., Valasek, J., and Ward, D. T., “Reentry vehicle flight controls design guidelines: dynamic inversion,” 2002. 20 Girish, C. V., Emilio, F., Jonathan, H. P., and Hugh, L., “Nonlinear flight control techniques for unmanned aerial vehicles,” Handbook of Unmanned Aerial Vehicles, Springer, 2015, pp. 577–612. 21 Morelli, E. A. and Smith, M. S., “Real-time dynamic modeling: data information requirements and flight-test results,” Journal of Aircraft, Vol. 46, No. 6, 2009, pp. 1894–1905. 22 Morelli, E. A. and Smith, M. S., “Real-time dynamic modeling: data information requirements and flight-test results,” Journal of Aircraft, Vol. 46, No. 6, 2009, pp. 1894–1905, DOI:10.2514/1.40764. 23 Morelli, E. A., “Practical input optimization for aircraft parameter estimation experiments. Ph. D. Thesis, 1990,” 1993. 24 Mulder, J. A., “Design and evaluation of dynamic flight test manoeuvres,” Tech. rep., Delft University of Technology, 1986. 25 Morelli, E. A., “Flight test maneuvers for efficient aerodynamic modeling,” Journal of aircraft, Vol. 49, No. 6, 2012, pp. 1857–1867. 26 Altug, E., Ostrowski, J. P., and Mahony, R., “Control of a quadrotor helicopter using visual feedback,” Robotics and Automation, 2002. Proceedings. ICRA’02. IEEE International Conference on, Vol. 1, IEEE, 2002, pp. 72–77, DOI:10.1109/ROBOT.2002.1013341. 27 Salih, A. L., Moghavvemi, M., Mohamed, H. A., and Gaeid, K. S., “Flight PID controller design for a UAV quadrotor,” Scientific Research and Essays, Vol. 5, No. 23, 2010, pp. 3660–3667.

13 of 13 American Institute of Aeronautics and Astronautics