Autonomous Close Formation Flight Control with Fixed Wing and Quadrotor Test Beds

1Department of Mechanical and Aerospace Engineering (MAE), West Virginia University (WVU), P.O. Box 6106, Morgantown, WV 26506, USA 2MAE Department, WVU, Morgantown, WV 26505, USA 3Aerospace Engineering Department, University of Kansas, Lawrence, KS 66045, USA 4MAE Department, Saint Louis University, St. Louis, MO 63103, USA 5Division of Engineering, Pennsylvania State University, Reading, 220 Gaige Building, Reading, PA 19610, USA


Introduction
Autonomous formation fight is an enabling technology for future manned and unmanned aircraft systems.Its potential benefits include energy savings and greenhouse gas reduction [1,2], improved aircraft coordination within high density airspace [3,4], and mixed operations of Unmanned Aerial Vehicles (UAVs) and manned aircraft [5].Autonomous formation flight is also the foundation for autonomous aerial refueling [6] and UAV swarm operations [7].
Close formation flight (CFF) is a natural and well documented phenomenon.Experimental biology research shows that certain birds earn 11.4% to 14.0% energy savings when flying in a "V" shape formation [8,9].Similar benefits for fixed wing aircraft have also been investigated.In 2001, at NASA Dryden Flight Research Center, a demonstration of two F-18 research aircraft showed fuel savings of up to 14% during CFF [10].In 2006 and 2013, a similar mission was conducted with multiple C-17 military aircraft which showed 10-14% fuel savings [11,12].This research and others [13] also showed that the trailing aircraft has to be precisely controlled at a specific location behind the leader's wing tip to enjoy the energy savings.Therefore, precision computer control for close formation flight is a critical issue.
Autonomous formation flight control has been explored using a number of different strategies such as "Multiple-Input-Multiple-Output, " "Leader-Follower, " "Cyclic," and "Behavioral" [13].Techniques for stability analysis of an autonomous formation have also been developed for measuring how position errors propagate form one vehicle to another in a cascaded system [14,15].
For this research, the nonlinear dynamic inversion (NLDI) control laws were inspired by the feedback linearization models of the early nineties [33,34].Feedback linearization is a generic description for the process of cancelling nonlinearity from all or a part of system's differential equations to allow the use of linear approaches for controller design purposes.Input-output linearization describes the decomposition of those dynamics equations, a Multi-Input-Multi-Output (MIMO) system of equations, into linearized decoupled control laws [33].Once simplified to linear functions, the equations can be inverted.This linearization and inversion process is known as nonlinear dynamic inversion.The main limitation of the approach is given by the necessary multiple assumptions made about the aircraft dynamics; therefore, the controller only performs as desired in a limited flight envelope.However, as shown in the technical literature, the flight envelope has been expanded greatly using adaptive control [14,[35][36][37], fuzzy logic [38], and neural network (NN) [34,39] approaches.
Experimental demonstrations of autonomous formation flight with fixed wing aircraft are very limited due to the complexity associated with multiple aircraft operations.Flight experimentation has been done by NASA [10,40], DARPA [11], and academia [39,41,42].
The research presented in this paper describes the latest results of a long-term research effort by researchers at West Virginia University (WVU) in demonstrating and analyzing autonomous close formation flight performance using small unmanned fixed wing and quadrotor aircraft.The control laws are designed using a similar method done with the YF-22 [41] and previous Phastball [43] aircraft flight test studies.This paper expands the analysis of the Phastball flight test analysis.It also adds the design of control laws, flight simulation, and performance analysis for a quadrotor platform.
The main goal of this paper is to evaluate the performance of the designed formation controller from CFF flight test data.Another objective is to show the versatility of the control design by demonstrating close formation flight with two dynamically different platforms.In this effort, formation control performance is assessed and quantified by measuring how precisely the prespecified formation geometry can be maintained in level flight conditions.
The paper is organized as follows.Section 2 provides a description of the formation flight controller designs.Section 3 explains the test bed designs.Section 4 discusses the simulation validation.Section 5 describes the Phastball flight testing and Section 6 discusses the experimental results.Section 7 concludes the paper with a discussion on future research directions.leader aircraft is flown by an operator on the ground.The follower aircraft is piloted by its onboard computer.Predetermined formation geometry is maintained by the flight control laws.The geometry is defined by vertical, V  , lateral,   , and forward,   , clearance from the leader's GPS location.The orientation of the geometry is determined by the leader's azimuth angle,   , as illustrated in Figure 1.

Formation Flight Controller Design
The lateral, , forward, , and vertical, V, distance errors are measured from the trailing aircraft's desired position to its actual position: where , , and  are the aircraft positions in a Local Tangent Plane (LTP) as measured by the GPS receivers.
Leader parameters are indicated with the subscript "."These errors are the performance criteria for analysis.An aircraft's azimuth angle is calculated with where   and   are the aircraft velocity along -axis and axis of LTP.The formation flight controller contains inner and outer feedback loop structure.The outer-loop controller minimizes the distance errors.It provides the desired pitch attitude, throttle position, and roll angle references to the innerloop controller given its relative position with respect to the formation geometry.The inner-loop control laws then track these reference inputs by commanding the control actions, the aileron, rudder, elevator surfaces, and the motor speed.
The flight path roughly lies on a horizontal 2D plane.This simplifies the flight control design into two decoupled sets of equations, one vertical and one horizontal.
The outer-loop controller is designed using the NLDI approach.Two assumptions were made during the controller design process.First, the derivative of the flight path angle is assumed to be zero.Second, steady wings level or coordinated turn conditions are assumed for both the leader and follower aircraft.Detailed design for the outer-loop controller was presented in [41] and the developed nonlinear control laws for the horizontal tracking problem are where   and   are the desired roll angle and thrust commands, respectively. is mass (in kg). and  are the angle of attack and side slip angle, respectively;  is gravity;  is the flight path angle; and Ω is the aircraft angular turn rate. is the aircraft azimuth angle.  and   are constants to be provided by the engine model. 0 and   are the aerodynamic coefficients for drag.The linearized horizontal formation error dynamics, l  and f , are equated from the following compensator-type linear control laws: Vertical geometry control is performed by a linear altitude tracker to produce the desired pitch angle: where   is the desired pitch angle, V is the vertical distance, and  represents gains which are refined through simulation.The inner-loop control laws are designed with the goal of minimizing the cost function: and  are the state variables of the aircraft and the optimized control action, respectively.The longitudinal states of in the lateral direction and in the longitudinal direction, respectively.  is the aileron surface deflection,   is the rudder surface deflection, and   is the elevator surface deflection.  is the matrix of feedback gains associated with the difference between the desired outer-loop angles and the actual angles.  is the matrix of feedback gains for the rest of the aircraft states.Simulation is used to affirm the inner-loop gains ( 8) and ( 9) and then, iteratively, for adjusting the outer-loop gains ( 5) and ( 6) to refine controller performance.The refined gains are shown in Table 1.

Quadrotor Controller Design. NEO quadrotors fly in a
Leader-Follower configuration behind a leader as shown in Figure 2. The leader, red, can be a virtual or real object.The control design has an outer loop and an inner loop just like the Phastball controller design.The key difference in formation geometry between the Phastball and NEO is the formation frame with respect to the leader's yaw angle,   , and not the velocity azimuth.Since a quadrotor can move in all directions and hover, the leader's yaw angle was used in order for the formation to be maintained and to avoid collision.The formation geometry is defined by lateral, vertical, and forward clearance in the leader aircraft's body frame, where axis always points in the direction of gravity.The origin of the body reference frame is at the center of mass.-axis extends from between motor 1 and 2; -axis extends from between State information regarding positon of the follower aircraft can be recalculated into forward and lateral components using a rotation matrix similarly as in (1), except that   is replaced with Δ, the difference in yaw angles: The rate of change of the in-plane geometry with respect to time is defined as where the yaw rate is  and  is velocity.Next, ( 11) is derived into (12) in order to obtain the acceleration components needed to apply the geometry to the dynamics of the follower quadrotor. [ The follower aircraft's acceleration components noted as   and   relate to the vehicle dynamics in this way: where  is the total steady state thrust output,  is the mass of the quadrotor,  is the pitch angle, and  is the roll angle.
Where the Phastball substitutes acceleration for linearized flight dynamics [41], the NEO quadrotor substitutes the total thrust of the four rotors.Using the small angle assumption we can linearize (14) into Finally, the desired command components are isolated to the left of (15) to produce the longitudinal and lateral attitude commands: l  and f terms are then controlled with a set of compensatortype linear control laws as shown in (15) as was done with the outer loop for Phastball.Consider The inner loop tracks outer-loop commands and mitigates state perturbation.Roll and pitch commands are first expressed as linear trackers: The desired yaw angle and altitude are also expressed using relevant aircraft states: The square root term in (19) is related to the minimum thrust needed to stay aloft.It is derived from the weight being set equal to the thrust of the four rotors.Consider where   is the nondimensional thrust coefficient,  is the disk radius,  is the disk area, and  is the air density.This whole term can be estimated by capturing the thrust command while being in a manually controlled hover.The refined gains for the inner and outer loops are shown in Table 2.
The control action, , of each motor is based on the combination of ( 17) through (19).Each motor is labeled as a subscript number, 1-4:

Controller Performance Evaluation for Fixed Wing Aircraft.
A performance index is used to analyze how closely the control laws track and maintain the formation.Tracking is characterized by four elements: the steady state error,  ss (calculated as the average of the formation control error for a segment of flight data after the error stabilized during the straight-level fly); overshoot percentage, OS%; reaction time,   ; and settling time,   .They are defined as Minimum requirements are defined for each tracking element to define ideal performance criteria.Table 3 defines these goals for Phastball's NLDI controller.The controller performance is given a score as a comprehensive comparison against ideal behavior.The score is formulated in the performance index (23).The lateral, forward, and vertical controllers are all scored individually since they are all   5.The Phastball aircraft has "" tail configuration, where the horizontal surface is positioned high above the downwash produced by the wings.Two brushless electric ducted fans are mounted to a carbon fiber tube on the fuselage just behind the wings.

Aircraft Test Beds and Avionics
The follower aircraft's onboard 5th generation avionics [44], Gen-V system, features a custom flight computer, nose sensor suite, IMU, control signal distribution board, R/C subsystem, communication subsystem, power subsystem, and real-time software.An onboard GoPro5 camera records inflight video from off the nose.Figure 3 displays the follower aircraft avionics and components.
The Gen-V flight computer performs data acquisition, signal conditioning, and signal distribution as well as flight  control and failure accommodation functions [44].It is capable of integrating and distributing control command from five different sources: ground R/C safety pilot, ground research pilot, aircraft on-board flight control system, onboard failure emulation system, and On-Board Excitation System (OBES).Safety of the research aircraft is reinforced by several hardware redundancies on critical components.Software in the follower aircraft's Gen-V system uses an Extended Kalman Filter (EKF) to provide attitude estimation and reduce position uncertainty [45].
The leader aircraft has a simpler avionics system which collects flight data and transmits the leader's navigation state to the follower aircraft.A pair of 900 Mhz Freewave RF modems communicates the leader's 3-axis GPS position and velocity information to the follower aircraft during flight.

NEO: Quadrotor Test Bed.
The NEO 600 v2 is a commercial off-the-shelf quadrotor.system.This Gen-VI system, pictured in Figure 4, is capable of supporting both manual and autonomous flights.This avionics system has a flight computer and a control signal distribution board, laser rangefinder, ultrasonic sensors, a Netburner MOD544155 microprocessor, R/C receiver, an avionics board containing an IMU, power subsystem, and real-time software.During indoor testing, the state of the quadrotor can be determined with a VICON motion tracking system.The Gen-VI flight computer collects and conditions the sensor data.Control commands can come from the onboard computer, a transmitting PC via XBee wireless communication, or manual RC transmitted pilot commands.

Flight Simulation
4.1.Phastball Simulation.Previous effort by WVU researchers led to the development of a nonlinear model of the Phastball aircraft dynamics using real-time parameter identification through flight testing data [46].These parameters were used to develop a MATLAB/Simulink simulation as shown in Figure 5.The simulation's basic block functions are leader data inputs, control scheme, aircraft dynamics  S-function, and the output graphics.Figure 6 shows the graphic of the leader and follower aircraft trajectories.
A virtual leader is used for providing the leader input.The virtual leader is an array of position and velocity values that simulate an aircraft's trajectory along an oval track.This track was flown in [46].This keeps the conditions similar enough so that the simulation results will be suitable for analysis.In actual flight testing, the virtual leader is used for initial testing before an actual second aircraft is used.The virtual leader is programmed into the controller and is activated when the pilot switches from manual to autonomous flight control.The virtual leader acts as a receding waypoint, always out beyond the follower aircraft.
Figure 7 shows the position of the virtual leader aircraft, solid line, and the first follower aircraft, dotted line, with respect to time. Figure 8 displays the error between these two values.Formation is achieved within the 14 seconds before the aircraft enter the next turn.Figure 9 shows the commands that the outer loop produces based on the input errors.These error data are entered into the performance index shown in Table 7.

NEO Simulation.
The quadrotor simulator was developed by redesigning the controller for the nonlinear quadrotor model created in MATLAB/Simulink [47].The original model was created by Pounds [20].Figure 10 shows the new simulator block diagram in Simulink.The outer loop is orange, the inner loop is blue, yaw control is black, and altitude control is red.This simulator was used to build and analyze the ideal performance of the quadrotor controllers.The simulator's basic functions are the input control distribution, output graphics, and aircraft dynamics S-function.
Coordinates of the virtual leader are generated and input as the reference to the controller.The errors between the desired reference and the follower quadrotor's  and  positions are recorded for analysis of controller behavior.For the simulation the leader coordinates are represented with position coordinates.It starts at the coordinates [0, −1.5] and travels along -axis across the origin.The follower quadrotor starts at the coordinates [0.5, −1.7].The controller tries to match the current position of the leader.The follower quadrotor is able to converge to a 39 cm steady state error behind the leader as the leader continues to move.The trajectory is shown in Figure 11 and the position errors are shown in Figure 12.The control signals are shown in Figure 13.Error data are entered into the performance index shown in Table 8.

Phastball Flight Testing
Initial flight tests with a single Phastball aircraft were performed for validating the hardware, communication, and inner-loop controller performance.The validation of the fully developed formation flight controller was conducted first with a prerecorded leader aircraft's GPS trajectory around the airfield.Later, flight tests were conducted using a real leader aircraft and one follower aircraft.Twenty-one 2-aircraft formation flights were performed with the Phastball aircraft.Figure 14 pictures the leader and follower aircraft in flight.The leader aircraft maintained an oval flight path over the airfield.Once the aircraft rendezvoused in the air, the formation flight control laws were activated and the follower aircraft maintained formation.Figure 15 shows a top down view of the leader and follower aircraft's GPS trajectories.

Phastball Formation Flight Data
Analysis.Data collected from eighteen flights were selected for further analysis.Flights 1, 2, and 3 were not considered to be close formation flights, for their forward clearance was 50 m, 40 m, and 30 m, respectively.Those flights were performed for the gradual and safe training of the pilots.Flights 4, 6, and 9 were conducted with variable formation geometry to evaluate transient behaviors.Figure 16 illustrates what the vertical, lateral, and forward errors look like over the course of a single lap, respectively.
The transient response, illustrated in Figure 17 for the forward distance error, is characterized for all dimensions in Table 9.In Figure 17, the forward clearance decreased from 24 m to 12 m in 20 seconds after the pilot command, the red line, added 12 m of offset.
The steady state error analyses are shown for the straight legs and turning in Tables 10 and 11, respectively.Straight leg performance is significantly better, especially in the    vertical dimension.The average forward error is −0.82 meters meaning the controller is maintaining a closer than desired formation geometry.The average vertical error distance of 1.34 meters means the follower aircraft is tracking lower than desired.Convergence is relatively fast and there is very little oscillation instilled by the control scheme.This is favorable for maintaining close formation.Large overshoots, especially in the forward direction, should be considered dangerous, for this may cause collision.Initializing the autonomous control when the aircraft is within 5-wingspan proximity ensures that the overshoots are small and safe.
Table 10 shows the error behavior along the straight legs.The error seems to be proportional to the clearance distance.Standard deviation is desirably low.Close formation flight is successfully maintained along the straight legs.It should be noted that the steady state error calculation does not consider GPS errors, which is rated for 1.5 m RMS and could reach much higher values occasionally during the flight.The behavior of the error in the turns is shown in Table 11.Formation is poorly maintained, errors are greater, and the standard deviation shows a wider spread.Although close formation flight is not maintained, the aircraft continues to fly in a nominal state and can quickly return to CFF as soon as the formation comes out of the turn.Table 12 displays the proximity between the leader aircraft and follower aircraft to give better depiction of the formation flight geometry.
The vertical, lateral, and forward controller's performance is analyzed in Table 13 using the performance index.Only straight leg data from transient flights 7, 8, 10, 11, 12, and 13 are scored because transient data are required for the calculation.These selected flights have the same clearances.Scoring showed good ratings relative to scoring and reinforces the possibility of encountering wing tip vortices since the design criteria were met (from Table 3).

Conclusion
Close formation flight was achieved with a pair of lowcost fixed wing aircraft and the formation flight controller behaved desirably in these experiments.Formation flight was previously demonstrated with the WVU YF-22 subscale aircraft [41], where the magnitude of the mean distance error was found to be 13.52 m for a circular flight pattern.The Phastball performed substantially better than the YF-22 during the formation flight.Known factors that brought about this improvement are as follows: electric motors are more responsive over the YF-22's gas turbines in addition to improved avionics, state estimation, and controller tuning for the Phastball aircraft.The designed controller performs better during straightlevel flight than turning for the Phastball.Having the horizontal and vertical dimensions decoupled limits the tracking capabilities when the leader implements a turn, climb, or deceleration.The design could be improved by deriving the 3D formation control laws without decoupling the vertical and horizontal components.
Analysis of the performance index rated the vertical, lateral, and forward controllers at 41.1%, 52.4%, and 22.4% on average, respectively, during flight testing.Flight scores were greatly diminished with respect to the simulated performance index score but still surpassed the design goals.
A nonlinear model is set up for the quadrotor test bed and the simulated results achieved CFF.This proves the

3. 1 .
Phastball: Fixed Wing Test Bed.The basic parameters for the Phastball aircraft are shown in Table

Figure 7 :
Figure 7: Positions of virtual leader and follower Phastball aircraft.

Figure 8 :Figure 9 :
Figure 8: Error distances in the local plane with respect to the leader aircraft.

Figure 11 :
Figure 11:  and  trajectory of the follower quadrotor aircraft and lead coordinates (top down view).

Table 3 :
Fixed wing minimum requirements.

Table 4 :
Quadrotor minimum requirements.The performance index is composed of the same elements as was the Phastball.Minimum requirements are defined for each tracking element to define ideal performance criteria as shown in Table4.VTOL requirements are for the purpose of flying in an indoor facility.All requirements are weighted the same.
Table 6 displays the aircraft's main parameters.It has four brushless electric motors each connected to a 30 A electric speed controller (ESC).
This test bed is agile enough that it can fly both indoors and outdoors.It contains a custom generation six avionics

Table 8 :
NEO simulation performance index.

Table 9 :
Transient behavior from the initiation of FF Ctrl.

Table 10 :
Performance of FF during straight legs.

Table 11 :
Performance of the Phastball FF during turns.

Table 12 :
Proximity between leader and follower during FF.