Frequency-Domain System Identification and ...

16 downloads 2795 Views 724KB Size Report
Using frequency-domain system identification techniques, the closed-loop dynamic ... low cost make quadrotors an optimal choice for a variety of missions.
AIAA 2014-1342 AIAA SciTech 13-17 January 2014, National Harbor, Maryland AIAA Modeling and Simulation Technologies Conference

Frequency-Domain System Identification and Simulation of a Quadrotor Controller Wei Wei1 University of Cincinnati, Cincinnati, Ohio 45221 Mark B. Tischler2 Aviation Development Directorate – AFDD US Army Research, Development and Engineering Command (AMRDEC) Moffett Field, California 94035

Downloaded by Kelly Cohen on January 19, 2014 | http://arc.aiaa.org | DOI: 10.2514/6.2014-1342

and Nicholas Schwartz3, Kelly Cohen4 University of Cincinnati, Cincinnati, Ohio 45221

Using frequency-domain system identification techniques, the closed-loop dynamic model of a quadrotor unmanned aerial vehicle is extracted using the computer program CIFER ®. The resulting dynamic model is verified by comparing its predicted response against previously collected flight-test data. The results show that an accurate model was successfully extracted, which could be utilized for simulations and control system development. Simulation of the extracted model and analysis of the transient response are also provided.

Nomenclature = = = = =

vertical velocity lateral input longitudinal input directional input vertical input

I. Introduction

I

n the aerospace industry today, there is a large focus on aircraft and rotorcraft simulation. Simulators not only provide safety and efficiency when training pilots, but also greatly reduce costs when developing a control system for a particular vehicle. By having the ability to simulate an aircraft or rotorcraft response, flight controls engineers have the capability of designing and testing controller designs on the ground through computer simulations, greatly reducing the flying time and cost associated with controller development. In order to effectively utilize this capability, however, an accurate dynamic model of the system being analyzed is crucial. Recently, there has been a high interest in utilizing unmanned aerial vehicles (UAVs) for many different tasks. In particular, the demand for quadrotor UAVs has dramatically increased. Their ability to be easily scaled down and low cost make quadrotors an optimal choice for a variety of missions. As its configuration is naturally unstable, a feedback control system is required to stabilize the quadrotor so that it can be easily piloted. 1

Graduate Student, Department of Aerospace Engineering and Engineering Mechanics, Student Member AIAA. Senior Scientist and Flight Control Group Lead, AFDD, Ames Research Center, T12B-2, Associate Fellow AIAA. 3 Undergraduate Student, Department of Aerospace Engineering and Engineering Mechanics, Student Member AIAA. 4 Associate Professor, Department of Aerospace Engineering and Engineering Mechanics, Associate Fellow AIAA. 1 American Institute of Aeronautics and Astronautics 2

Copyright © 2014 by Wei Wei, Mark B. Tischler, Nicholas Schwartz, Kelly Cohen. Published by the American Institute of Aeronautics and Astronautics, Inc., with permission.

Using traditional modeling methods, the aerodynamic, inertial, and structural characteristics of an aircraft or rotorcraft are analyzed to predict a dynamic model. After this preliminary model is acquired, it is then simulated and compared with flight-test data. Based on these comparisons, additional fine-tuning of the model is usually required to improve its accuracy. Though this traditional modeling method is practical for aircraft configurations, it is rather difficult for small-scale rotorcraft configurations—their high vulnerability to turbulence and complex coupled aerodynamic forces greatly complicate the modeling process. In order to avoid these inaccuracies and minimize modeling time, a system identification approach is chosen to obtain a closed-loop dynamic model of a quadrotor configuration.

Downloaded by Kelly Cohen on January 19, 2014 | http://arc.aiaa.org | DOI: 10.2514/6.2014-1342

II. System Identification Methodology The system identification process is one that is well suited and provides low cost when developing the dynamic model of a quadrotor. The method of system identification utilizes measured input and output time history data gathered during flight-testing to capture the dynamic characteristics of a particular system.1 A generic mathematical architecture of the model is assumed prior to flight-testing. Flight-test data is then collected and processed through a system identification computer program, which obtains various dynamic coefficients through a process similar to statistical learning. A resulting dynamic mathematical model is then calculated and used to simulate the quadrotor dynamics. A frequency-domain system identification analysis was chosen for this project to obtain a linear representation of the quadrotor dynamics. Compared to time domain analyses, frequency-domain identification reduces the errors associated with bias effects and processing noise, resulting in a robust model. 1 Coherence functions also assist in determining the accuracy of the identified dynamic model throughout various frequencies of interest. For the scope of this project, it was desired to apply the method of system identification using the Comprehensive Identification from FrEquency Response (CIFER®)1 program to develop a closed-loop dynamic model of a given quadrotor configuration. CIFER® has been successfully implemented and applied in the system identification of commercial and military aircraft and rotorcraft configurations, including the XV-15, Bell-214ST, BO-105, AH-64, UH-60, V-22, AV-8 Harrier, and OH-58D.1 In addition, CIFER® has also been utilized to successfully extract dynamic models of scaled down model aircraft2 and single-rotor model helicopter configurations.3 When the frequency response is acquired in CIFER®, it is imperative to check the validity of the data. In CIFER®, the frequency response data validity is determined by evaluating its coherence, which is an indication of how well the output and input data are correlated. The definition of coherence is given as |̂

( )



( )|

( )|| ̂

(1)

( )|

where, ̂ ( ), ̂ ( ), and ̂ ( ) represent the auto spectral densities of the input, output, and cross-spectral density of the input and output, respectively, and is the frequency point. A perfect correlation between input and output would result in a coherence value of unity, while poor coherence typically falls below a value of 0.6. 1 After the coherence of the data is validated, the data must be decoupled such that the inputs provided by off-axis commands are eliminated from the output on the axis of interest. During flight-testing it would be ideal to excite one axis while the other axes of interest remain trimmed. However, this very rarely occurs. In order to maintain total craft stability during a test maneuver, the pilot may be required to use slight inputs from the other axes. These slight inputs from the other axes must be removed from the data before system identification, so that they are not included in the extracted model. The multiple single output system estimation can be expressed in Eq. (2), where ̂ is the system estimation.

Then the partial coherence of the th of

(

̂( )

̂ ( )̂ ( )

inputs

and the output

)





(

(

) || ̂

(2) can be written as

)| (

)|

2 American Institute of Aeronautics and Astronautics

(3)

where each quantity involves spectral matrix manipulations.4 The partial coherence directly gives an evaluation of the on-axis input-output linear relation with the influence of other off-axis inputs removed. In the system identification process, the transfer functions of each axis will be acquired first, followed by state space representations, and complete system analysis. The Single Input-Single Output (SISO) transfer function identification cost function can be defined as ∑

[

(| ̂ |

| |)

( ̂

) ]

(4)

where represents the number of frequency points, and are the starting and ending frequencies of fit, | | and are the magnitude (dB) and phase (degrees) at each frequency, and , and are the total, magnitude, ̂ and phase weights, respectively. and represent the estimated and actual value of each fit point, respectively.

Downloaded by Kelly Cohen on January 19, 2014 | http://arc.aiaa.org | DOI: 10.2514/6.2014-1342

III. Experimental Setup For the experiment, an AeroQuad Cyclone quadrotor was selected for testing (Fig. 1). The frame is constructed with aluminum plates in the center that contain most of the electronic components. Four hollow aluminum square tubes construct the motor arms, having dimensions of 5/8 in. x 5/8 in. x 13 in. Four XXD A2217 950KV motors powered by 30 amp electric speed controllers (ESC) are attached at the ends of each motor arm. These motors directly drive four APC 12 x 3.8 propellers.

Figure 1. AeroQuad UAV. A. Quadrotor Control For this project, the principal axes were positioned with the four rotor arms aligned with the X and Y axes, depicted in Fig. 2. For a quadrotor to achieve a stable hover, the rotational direction of the propellers must be altered such that the overall rotational torque is eliminated. To achieve this, the forward and aft motors rotate in a clockwise motion, while the port and starboard motors rotate in a counterclockwise motion. For a fixed propeller setup, the overall control of the quadrotor is achieved by directly altering the rotation speed of each individual motor.

Figure 2. Quadrotor coordinate system and motor numbering. 3 American Institute of Aeronautics and Astronautics

B. Instrumentation and Data Collection The layout of the AeroQuad control system is outlined in Fig. 3. The sensors used onboard the AeroQuad include an ITG-3200 gyro, ADXL345 accelerometer, HMC5883L magnetometer, BMP085 barometer, and MaxSonars EZ0 ultrasonic sensor. These sensors provide adequate data-collection capability and record the necessary parameters required for closed-loop system identification. The onboard controller consists of an ATmega2560 Arduino™-based platform. The radio controller used for this configuration is a Futaba® T12MZ 2.4 GHz transmitter, coupled with a R6008HS receiver onboard the AeroQuad. For wireless flight data transmission, a pair of Digi® XBee-PRO 900MHz modules was utilized. The data was transmitted through the XBee-PRO modules at a frequency of 40 Hz and was collected through MATLAB™ on a standalone computer.

Quadrotor MOTOR1

Downloaded by Kelly Cohen on January 19, 2014 | http://arc.aiaa.org | DOI: 10.2514/6.2014-1342

MOTOR2

ESC1

ESC2

GPIO

GPIO

CPU MOTOR3

MOTOR4

ESC3

ESC4

RS-232

XBEE

GPIO

IMU

A/D

ULTRASONIC

IIC

BAROMETER

GPIO

RECEIVER

900 MHz

GPIO

GPIO

2.4 GHz

Figure 3. AeroQuad instrumentation and system layout. Due to its configuration, a great amount of vibration on the AeroQuad existed due to the rotating propellers. To suppress vibration noise so to not compromise onboard sensor performance, the motor mounts and electronic bay were isolated from the main frame using rubber vibration insulators. A traditional PID controller was applied to the longitudinal and lateral axes of the AeroQuad so that it could be easily piloted during flight-testing. Prior to flight-testing, the PID inputs were altered and tested such that good handling qualities of the AeroQuad resulted. After these gains were determined, they were not altered throughout the entire system identification process. Fig. 4 displays the resulting closed-loop system of the AeroQuad including this PID controller. With the instrumentation present on the AeroQuad, the pilot inputs, motor command, Euler angles (ϕ, θ, ), angular rates (p, q, r), linear accelerations ( , , ), altitude, battery level, and elapsed time were able to be directly measured during flight-testing. For this paper, the angular rate responses of each axis were the only subjects of interest of the closed-loop dynamic model. As such, only the pilot commands, angular rates, and elapsed time were extracted from the flight-test data and used for the closed-loop system identification.

Figure 4. Quadrotor control system layout. C. Flight-test Procedure As CIFER® was chosen to be the primary software used in the system identification process, a flight-test procedure was devised based on frequency-domain system identification guidelines provided by Tischler et. al.1 For 4 American Institute of Aeronautics and Astronautics

Downloaded by Kelly Cohen on January 19, 2014 | http://arc.aiaa.org | DOI: 10.2514/6.2014-1342

frequency-domain system identification, the individual axes of the quadrotor were excited using frequency sweep maneuvers. In order to obtain a good data set, four frequency sweeps were carried out in the roll, pitch, and yaw axes during flight-tests. Based on a coherence analysis, the two best maneuvers for each axis of interest are selected for system identification. The selected input and output time history data is then concatenated and used in CIFER® to generate the dynamic model. Fig. 5 below depicts an example of a roll sweep flight data with three axes inputs and outputs.

Figure 6. Roll rate power spectral density.

Figure 5. Example roll sweep input.

Fig. 6 shows the power spectral density (PSD) of the roll rate signal given in Fig. 5. Integration under the PSD curve between 1-20 rad/s yields a root mean square (RMS) value of 0.354 rad/s (i.e., about 20 deg/s), associated with the sum of the forced response content (i.e., signal) and noise. The PSD between 20 to 120 rad/s with an associated RMS of 0.04057 rad/s (i.e., about 2 deg/s), reflects the measurement noise content. Then, the associated coherence function can be expressed as a function of the noise to signal ratio5 (

)

(5)

where = 0.04057 / (0.354 - 0.0457) = 0.129 is measurement noise to signal ratio. The resulting coherence is found to be 0.98, which is consistent with the high coherence of the roll rate frequency response shown in Fig. 7a, though there is additional loss in the frequency-response coherence due to process noise (e.g., atmospheric turbulence). This suggests a very low noise to signal ratio and is a very interesting result given the small scale of the vehicle and the inexpensive instrumentations onboard. In order to validate the accuracy of extracted models, it is desired to compare the predicted output provided by the dynamic model against the outputs of the actual system, using the same inputs and initial conditions. Therefore, it is required during flight-testing to perform doublet maneuvers in each axis of interest. Though not used in the system identification process, the doublet data collected will be used solely for model verification purposes. The accuracy of the model will be directly correlated to how well the response of the system is predicted.

IV. Results A. System Identification Model Extraction After flight-testing, the dynamic models of the longitudinal, lateral, directional, and vertical axes were extracted from CIFER® in the form of transfer functions. 5 American Institute of Aeronautics and Astronautics

Downloaded by Kelly Cohen on January 19, 2014 | http://arc.aiaa.org | DOI: 10.2514/6.2014-1342

The resulting magnitude, phase and coherence of the above longitudinal, lateral, directional, and vertical transfer functions are shown in Fig. 7. An examination of Fig. 7 shows a good coherence ( ( ) ) for a frequency range of 0.3-35 rad/s for the lateral and longitudinal axes, 0.5-30 rad/s for the directional axis, and 2-9 rad/s for the vertical axis. This implies the dynamics of the system were well excited in these corresponding axis frequency ranges with excellent signal to noise ratio. Therefore, the system can be well represented by a linear model.

a)

b)

c)

d)

Figure 7. Frequeny response of a) lateral, b) longtitudinal, c) directional, and d) vertical axes and flight-test data. The resulting transfer functions are displayed in Eqs. (6-9) below. Notice that the lateral and longitudinal transfer functions have similar layouts as expected considering the symmetrical configuration of the quadrotor. (

(

) (

(

)

(

)

( (

) (

)

(6)

)

(7)

) (

)

(8)

) (

)

(9)

6 American Institute of Aeronautics and Astronautics

Downloaded by Kelly Cohen on January 19, 2014 | http://arc.aiaa.org | DOI: 10.2514/6.2014-1342

The identified roll and pitch dynamics show a lightly damped behavior with very small time delay (about 60 ms). The identified directional and vertical models are simply first-order systems. Transfer function identification cost guidelines1 are acceptable (cost