Research on Visual Simulation of UAV Formation Flight Control Based on

This paper proposes a control method of UAV formation reconfiguration, and accomplishes simulation of the transformation of UAV formation from a defensive formation to an offensive one using MATLAB/Simulink. Then, a visual simulation platform is built to display the simulation process in the form of animation and make the results more intuitive. The platform is built by means of MFC, Vega API and MATLAB engine.


Introduction
Unmanned aerial vehicles (UAV) possess many advantages compared with manned vehicles such as smaller size, better maneuverability, stronger adaptability and no pilot casualties etc.Therefore, UAVs play a more and more important role in civil and military fields [ ].However, using a single UAV to complete special mission in the complex environment will get into some inextricable problems.For example, it's hard for a single UAV to monitor the whole battlefield information due to the restrict of its detection equipment.To overcome these problems, multiple UAVs formation is a considerable method [2].
The key technology of multiple UAVs formation is the control of UAV formation keeping and transformation [3,4].Firstly, this paper introduces a practical strategy of UAV formation control.Then, a model based on MATLAB/Simulink is set up to verify the feasibility of this strategy in digital simulation method.Finally, by means of Vega's powerful three-dimension visual simulation function, this paper builds a platform with MFC, Vega API and MATLAB engine [5,6].This platform demonstrates MATLAB's digital simulation results in an animation method.

Leader-Follower Relative Motion Equations
Set the formation coordinate system fixed on the follower UAV, with the origin of the coordinate system fixed on the center of follower mass.And x axis points along the flight velocity, y axis points along the right wing and z axis is determined by the right hand rule.Within this coordinate system, the coordinates of L (short for leader UAV) relative to F (short for follower UAV) is (x, y, z), as shown in Fig. 1.
The leader UAV's relative motion equations in the formation coordinate system are: where , h h represent the height of leader and follower.

Structure of UAV Formation Control System
UAV formation in this system is controlled by a formation controller using Leader-Follower method.And each UAV is controlled by an autopilot.In the process of formation keeping and transformation, the leader UAV aviates automatically according to the preconcerted flight path, and transmits flight status data to its followers at the same time.Meanwhile, follower UAVs receive status data from the leader UAV, including position, flight velocity, height and course.Autopilot of each UAV controls the flight to keep relative position to the leader using data received.
The structure of UAV formation system is shown in Fig. 2.
. The structure of UAV formation.
The autopilot within each UAV model is composed of a velocity controller , a height controller, a course controller and a sideslip suppressor, as in Fig. 3.

Structure of UAV Formation Control System
The platform is built mainly by three tools: MATLAB engine, MFC and Vega API.Digital simulation data generated by Simulink is transfered to this platform through MATLAB engine.While the visual scene and environment configuration information is transfered through Vega API.Then the Vega thread drives render loop using these data (Multi-thread is applied in this platform).At this moment, researchers can see the animated demonstration on computer screen intuitively.The platform structure is shown in Fig. 4. The software structure of this platform primarily contains three modules.And every module has its own functions.It is designed as shown in Fig. 5.

Simulation Results
In the simulation system, formation reconfiguration of three UAVs is designed as Fig. 6, three UAVs change their formation from formation 1 to formation 2.

Digital Simulation Results
The flight paths of three UAVs in three-dimension coordinate system are shown in Fig. 7, and those in twodimension coordinate system are shown in Fig. 8 ,where UAV1 is leader, UAV2 and UAV3 are followers.Results in Fig. 7 and Fig. 8 show that UAV1 aviates straight at one same height, UAV2 turns left and reduces its height while UAV3 turns right and reduces its height.

Visual Simulation Results
The visual simulation platform can show flight animation and state data of UAVs at the same time.The meanings and units of status data are shown in Table 1.The initial frame of visual simulation and status information of each UAV are shown in Fig. 9.The process of formation reconfiguration is shown clearly in the animation.At the initial time, three UAVs are in the same vertical plane but at different height.When the formation transformation starts, UAV1 continue aviates straight, UAV2 turns left, UAV3 turns right and both UAV2 and UAV3 reduce their height.
Compared with digital simulation, the visual simulation is more intuitive, therefore, researchers can judge the validity of simulation more directly and find system error more quickly.

Conclusion
A formation reconfiguration strategy has been verified in this paper.Controlled by the formation controller, UAVs transform their formation from one to another smoothly.Then, with the help of powerful three-dimension visual simulation function of Vega, simulation results are displayed in animation, a vivid way.
To overcome the defect of Vega having no interface function, a visual simulation platform is established in this paper.It helps users operate the simulation system conveniently, and enhances the ability of humancomputer interaction.
the flight velocity of leader and follower in the inertial coordinate system.L , F \ \ represent the yaw angle of leader and follower in the inertial coordinate system.E \ represents the error of yaw angle between leader and follower and This is an Open Access article distributed under the terms of the Creative Commons Attribution License 4.0, which permits distribution, and reproduction in any medium, provided the original work is properly cited.XQUHVWULFWHG XVH DOI: 10.1051/ C Owned by the authors, published by EDP Sciences, 2015

Figure 3 .
Figure 3.The structure of autopilot.

Figure 4 .
Figure 4.The structure of visual simulation platform.

Figure 5 .
Figure 5.The software structure of visual simulation platform.

Figure 9 .
Figure 9.Initial frame and status information.The frame of visual simulation and status information of each UAV in the process of transformation are shown in Fig.10.

Figure 10 .
Figure 10.Transforming frame and status information.The final frame of visual simulation and status information of each UAV are shown in Fig. 11.

Figure 11 .
Figure 11.Final frame and status information.

Table 1 .
Meanings and units of state data.