# UAV Formation Flight Based on Nonlinear Model Predictive Control

Authors: Zhou Chao; Shao-Lei Zhou; Lei Ming; Wen-Guang Zhang
Journal: Mathematical Problems in Engineering
 (2012)

---

## Abstract

We designed a distributed collision-free formation flight control law in the framework of nonlinear model predictive control. Formation configuration is determined in the virtual reference point coordinate system. Obstacle avoidance is guaranteed by cost penalty, and intervehicle collision avoidance is guaranteed by cost penalty combined with a new priority strategy.


---

## Body

## 1. Introduction

Extensive research has been conducted on cooperative control for multiagent systems in the recent years. One motivator for the growing interest is the application of distributed multiple UAVs for distributed sensing and collaborative operations [1]. Among the main subproblems of multiple UAVs cooperative control problem, formation flight is of great interest and widely researched [2, 3]. The main goal of formation flight of multiple UAVs is to achieve a desired group formation shape while controlling the overall behavior of the group [2].Various control schemes have been proposed for UAV formation flight, such as PID [3], potential method [4, 5], constraint forces [2], adaptive output feedback approach [6], sliding mode approach [7], and consensus-based method [8]. But those methods cannot consider constraints explicitly, such as stall velocity of fixed wing UAV, angular turn rate constraints, and control input saturation constraints. Optimization-based method can deal with the constraints appropriately, and it has proven to be one of the more successful methods for addressing formation control problems. Among the more popular optimization-based approaches is model predictive control (MPC) method.Model predictive control, or receding horizon control (RHC), is a feedback control scheme in which a trajectory optimization is solved at each time step. The first control input of the optimal sequence is applied, and the optimization is repeated at each subsequent step [9]. It is nowadays a very active research area and a thorough survey of this method is given by Mayne et al. in [10]. It has been widely used in systems with relatively slow dynamics, such as chemical processes. With the advent of faster modern computers, its application areas are expanding to multiagent control and large-scale distributed control problems. A motivation for its wide use is the hard constraints on controls and states that are difficult to handle by other methods. Centralized MPC has been applied to the cooperative control of multiple vehicles [11]. But the computational effort required for a single optimization can become prohibitive and scales very poorly with the size of the number of unmanned vehicles. To address this problem, decentralized model predictive control (DMPC) method [12] is proposed by breaking the optimization into smaller subproblems.Formation control strategy is important for the formation control problem. In the literature, there are mainly three information structure approaches to the formation control problem, namely, leader-follower [13], virtual structure [14], and behavioral approach [15]. Most of the multiagent formation control researches are performed in leader-follower structure, where some vehicles are designed as leaders while others are designed as followers. It is easy to understand and implement. However, this approach is not robust with respect to leader’s failure. Although virtual leader strategy is proposed to improve its robustness, the chain structure leads to a poor disturbance rejection property [13]. In the virtual structure approach, the entire formation is treated as a single virtual rigid body structure. Rather than following a path, each vehicle follows a moving point, which allows the virtual structure to potentially be attached to another vehicle [12]. The guidance of a group is easier than the other approaches since all agents in the formation are treated as a single object. But the formation can only perform synchronized maneuvers, and it is difficult to consider obstacle avoidance [16]. In the behavior approach, several desired behaviors are prescribed for each vehicle, including formation keeping, goal seeking, and collision/obstacle avoidance. The control action of each vehicle is a weighted average of the control for each behavior [17]. It is suitable for uncertain environments, but lack of a rigorous theoretic analysis.MPC-based multivehicle formation control problem has been widely studied, such as [18–21]. In [20], a dual mode MPC method was used for robot formation control. To guarantee the stability, the dual mode controller has to switch from an MPC control to a terminal state controller. Several researchers exclusively studied UAV formation flight problem in the framework of MPC method [22–28]. Among those papers, [22, 24] mainly studied tight formation flight problem. [25–28] only use the UAV linear dynamical model in MPC problem formulation. [23] uses the UAV nonlinear dynamical model in MPC problem formulation and leader-follower structure to design formation flight controller. It uses Karush-Kuhn-Tucker (KKT) variables to achieve collision avoidance maneuver. But it needs to dynamically choose suitablevariables to determine the tradeoff between tracking and collision avoidance.Sequential quadratic program (SQP) is one of the most effective methods for solving nonlinear programming (NLP) problem. It uses penalty or merit functions to enforce global convergence. However, it is usually difficult to choose suitable penalty parameters in practice. To avoid the practical problems associated with the setting of the penalty parameter, Fletcher and Leyffer [29] introduced a filter for SQP trust region algorithm to promote global convergence.In this paper, we design a distributed UAV formation flight control law in the framework of nonlinear MPC. A virtual reference point control strategy is used to determine the formation configuration. The main contribution of the paper is that obstacle avoidance is guaranteed by a new cost penalty. Intervehicle collision avoidance is guaranteed by cost function combined with a priority strategy, using the delayed neighboring information. For simplicity, it is assumed that all data used in the formation flight are not corrupted by both the process and measurement noise.The rest of the paper is organized as follows. Section2 gives the problem formulation. Nonlinear model predictive control-based collision-free formation flight control law is designed in Section 3. Section 4 shows the simulation results and compares the algorithm with other approaches in terms of performance. Finally, concluding remarks and future work are given in Section 5.


## 2. Problem Formulation

### 2.1. 2D UAV Dynamical Models

A common control system for an unmanned aerial vehicle is a two-loop structure where the attitude dynamics are controlled by an inner loop, and the position dynamics are controlled by an outer loop. In the context of a group of UAVs in formation, the outer loop also contains a controller that can achieve and maintain the given formation configuration. For simplicity, the two-dimension motion of UAVs [30] in a horizontal plan is analyzed and the inner loop dynamic of the UAV is modeled as a first-order model:(2.1)x˙i=visin⁡ψi,y˙i=vicos⁡ψi,ψ˙i=gtanγivi,v˙i=1αv(vic-vi),γ˙i=1αγ(γic-γi),
where (xi,yi),ψi,vi,and γi are UAV i’s inertial position, heading angle, velocity, and roll angle, respectively. vicandγic are the commanded velocity and roll angle to UAV i’s autopilots; gis the gravitational constant. αv and αγ are positive constants.Generally, there is a reference trajectory for UAVs to flight in formation. Dynamic and kinematics constraints prohibit unmanned aerial vehicles from following arbitrary reference trajectories. Enlightened from [31], we assume that the reference trajectory generated by a formation flight trajectory generator satisfies the following equations:(2.2)x˙r=vrcos⁡ψr,y˙r=vrsin⁡ψr,ψ˙r=wr,
wherevr and wr are piecewise continuous and uniformly bounded, and they satisfy the following constraints:(2.3)0<vmin⁡≤vr≤vmax⁡,|wr|≤wmax⁡.


### 2.2. Formation Control Strategy

In this paper, virtual point tracking strategy is used to achieve the desired formation. Assume that there is a moving reference point representing a UAV following a predesigned reference trajectory. The real-time movement of the reference point can be known in advance or in-flight through wireless communication by each UAV. Each UAV must try to keep the prescribed relative distance and angle from this reference point. In essence, it is similar to virtual leader method, but there is no error propagation between UAVs.Figure1 illustrates that reference point coordinate system XrOrYr is attached to the reference point Or. It is uniquely determined by reference point’s position and velocity direction. Formation configuration can be defined in XrOrYr. The desired position of each UAV can be determined by the following equation:(2.4)[xidyid]=[xryr]+[cos⁡ψrsin⁡ψr-sin⁡ψrcos⁡ψr][xidryidr],
where (xr,yr) and ψr are the coordinates and course of the virtual reference point in XOY.Figure 1
Formation definition in reference point coordinate systemXrOrYr.


### 2.3. Control Objectives

Consider a team ofNv homogenous UAVs. For simplifying the notation, we can represent the ith UAV’s dynamical model using a nonlinear discrete state space form as(2.5)xi(k+1)=f(xi(k),ui(k)),
where xi(k)=[xi(k),yi(k),vi(k),ψi(k)]T andui(k)=[vic(k),γic(k)]T are the ith UAV’s state and control input at time k, respectively. f is a nonlinear continuous function.Define theith UAV’s tracking state error vector and control inputs error vector as(2.6)xei(k)=xi(k)-xid(k),
where xid(k)=[xid(k),yid(k),vr(k),ψr(k)]T.So, the UAV formation flight problem can be transformed to find control law such that(2.7)xei(k)→0,i=1,…,Nv.


## 2.1. 2D UAV Dynamical Models

A common control system for an unmanned aerial vehicle is a two-loop structure where the attitude dynamics are controlled by an inner loop, and the position dynamics are controlled by an outer loop. In the context of a group of UAVs in formation, the outer loop also contains a controller that can achieve and maintain the given formation configuration. For simplicity, the two-dimension motion of UAVs [30] in a horizontal plan is analyzed and the inner loop dynamic of the UAV is modeled as a first-order model:(2.1)x˙i=visin⁡ψi,y˙i=vicos⁡ψi,ψ˙i=gtanγivi,v˙i=1αv(vic-vi),γ˙i=1αγ(γic-γi),
where (xi,yi),ψi,vi,and γi are UAV i’s inertial position, heading angle, velocity, and roll angle, respectively. vicandγic are the commanded velocity and roll angle to UAV i’s autopilots; gis the gravitational constant. αv and αγ are positive constants.Generally, there is a reference trajectory for UAVs to flight in formation. Dynamic and kinematics constraints prohibit unmanned aerial vehicles from following arbitrary reference trajectories. Enlightened from [31], we assume that the reference trajectory generated by a formation flight trajectory generator satisfies the following equations:(2.2)x˙r=vrcos⁡ψr,y˙r=vrsin⁡ψr,ψ˙r=wr,
wherevr and wr are piecewise continuous and uniformly bounded, and they satisfy the following constraints:(2.3)0<vmin⁡≤vr≤vmax⁡,|wr|≤wmax⁡.


## 2.2. Formation Control Strategy

In this paper, virtual point tracking strategy is used to achieve the desired formation. Assume that there is a moving reference point representing a UAV following a predesigned reference trajectory. The real-time movement of the reference point can be known in advance or in-flight through wireless communication by each UAV. Each UAV must try to keep the prescribed relative distance and angle from this reference point. In essence, it is similar to virtual leader method, but there is no error propagation between UAVs.Figure1 illustrates that reference point coordinate system XrOrYr is attached to the reference point Or. It is uniquely determined by reference point’s position and velocity direction. Formation configuration can be defined in XrOrYr. The desired position of each UAV can be determined by the following equation:(2.4)[xidyid]=[xryr]+[cos⁡ψrsin⁡ψr-sin⁡ψrcos⁡ψr][xidryidr],
where (xr,yr) and ψr are the coordinates and course of the virtual reference point in XOY.Figure 1
Formation definition in reference point coordinate systemXrOrYr.


## 2.3. Control Objectives

Consider a team ofNv homogenous UAVs. For simplifying the notation, we can represent the ith UAV’s dynamical model using a nonlinear discrete state space form as(2.5)xi(k+1)=f(xi(k),ui(k)),
where xi(k)=[xi(k),yi(k),vi(k),ψi(k)]T andui(k)=[vic(k),γic(k)]T are the ith UAV’s state and control input at time k, respectively. f is a nonlinear continuous function.Define theith UAV’s tracking state error vector and control inputs error vector as(2.6)xei(k)=xi(k)-xid(k),
where xid(k)=[xid(k),yid(k),vr(k),ψr(k)]T.So, the UAV formation flight problem can be transformed to find control law such that(2.7)xei(k)→0,i=1,…,Nv.


## 3. Control Law Design

The main idea of the MPC approach is to obtain the control action by repeatedly solving an optimal control problem online. Since each UAV has the ability of computation, we can design distributed formation flight control law in the framework of MPC. Each UAV calculates its own control inputs based on local states and neighboring UAV’s state information.


### 3.1. Virtual Point Tracking

From (2.5), the prediction of the ith UAV’s dynamics by itself can be obtained as(3.1)xi(k+s+1∣k)=f(xi(k+s∣k),ui(k+s∣k)),s=0,…,N-1,
where N is the predictive horizon and xi(k+s∣k) indicates the ith UAV’s state predicted at time k+s and xi(k∣k)=xi(k). Correspondingly, ui(k+s∣k) is the predicted control inputs at time k+s and ui(k∣k)=ui(k).Firstly, without considering obstacle avoidance and intervehicle collision avoidance problem, at time stepk, the cost function is defined as(3.2)JN(xi,ui,k)=∑s=1N-1(xeiT(k+s∣k)Qxei(k+s∣k)+ueiT(k+s-1∣k)Puei(k+s-1∣k))+xeiT(k+N∣k)QNxei(k+N∣k),
where Q, P, and QN are positive-definite symmetric matrices, uei(k)=ui(k)-uid(k).


### 3.2. Obstacle Avoidance

In obstacle-rich environment, UAV must be able to avoid obstacles automatically. Traditionally, inequality constraints are added to the MPC optimization problem directly to realize obstacle avoidance [24]. It is easy to formulate the problem, but difficult to solve, because of its nonconvex property. Moreover, this type of distance-based obstacle avoidance method usually leads to unwanted avoidance and frequent maneuver.Here, we proposed a new effective method to guarantee obstacle avoidance. As depicted in Figure2, when the shortest distance between UAV and obstacle is less than the dangerous distance lD, the position and velocity orientation of the UAV are used to predict if the shortest distance between them is less than the minimal allowable distance lM in the near future. If so, a cost function is added to the UAV’s objective function and UAV starts to avoid it while guaranteeing not deviating too far away from the previous desired trajectory to achieve formation. For simplicity, we only consider static and circular obstacles and assume that the position and the radius of the obstacle can be obtained in real time.Figure 2
Static obstacle avoidance while tracking trajectory.At timek, the obstacle avoidance cost function of the ith UAV is chosen as(3.3)Lo(xi,k)={0iflis(k)≥lD,0iflis(k)<lD,lisp(k)≥lM,∑s=1N-a(lis(k+s∣k)-lM)iflis(k)<lD,lisp(k)<lM,
where(3.4)lis(k)=(xi(k)-xo)2+(yi(k)-yo)2-Ro,lis(k+s∣k)=(xi(k+s∣k)-xo)2+(yi(k+s∣k)-yo)2-Ro,lisp(k)=|cot(ψi(k))(xo-xi(k))+(yo-yi(k))|(cot(ψi(k)))2+1.lD,lM are positive constants, and a is a positive parameter. (xo,yo) and Ro are the Cartesian coordinates and the radius of the obstacle, respectively.


### 3.3. Intervehicle Collision Avoidance

Intervehicle collision avoidance is also an important aspect in formation flight. Similar to obstacle avoidance problem, some papers ensure collision avoidance, in the framework of MPC, by adding inequality constraints to the optimization problem [23]. However, too many constraints usually make the optimization problem become difficult to solve, especially in large-scale formation flight application. Moreover, UAVs involved with collision avoidance may maneuver simultaneously to avoid collision, which leads to an undesired chain reaction in the formation, especially in close formation flight.Here we proposed a new method to ensure intervehicle collision avoidance through cost function with priority strategy. Firstly, UAVs involved with collision avoidance are tagged with a priority level according to its current relative position and mission at each sampling instant. When the relative distance between two UAVs is less than the safe separation, UAV with lower priority level should take the UAV with higher priority level as a moving obstacle to avoid. This strategy can avoid undesired chain maneuver because less UAVs need to maneuver for collision avoidance.The policy of tagging priority level is as follows:•
UAVs with smaller tracking error have higher priority level than those with larger tracking error;•
UAVs with emergent mission, such as obstacle avoidance, have the highest priority.Different from obstacle avoidance, we assume that each UAV has a circular protected zone with radiusdD and circular collision zone with radius dM, as depicted in Figure 3. When the protected zones of two UAVs intersect, UAV with lower priority should take the other UAV as a moving obstacle to avoid. When the collision zones of two UAVs intersect, collision will happen.Figure 3
UAV’s protected zone and collision zone.In this paper, we assume that the intervehicle wireless communication network is always available but introduces a random time delaydk in the information flow. It is assumed that dk is bounded, that is,(3.5)0≤dk≤dmax⁡.
So, at time step k, the ith UAV can obtain the jth UAV’s future position vector predicted at time step k-dk,that is, (xj(k+s∣k-dk),yj(k+s∣k-dk)),s=1,…,N.The intervehicle collision avoidance cost function of theith UAV is chosen as(3.6)Lp(xi,k)={0ifdij(k)≥2dD,0ifdij(k)<2dD,pi(k)>pj(k),∑s=1N-b(dij(k+s∣k)-2dD)ifdij(k)<2dD,pi(k)<pj(k),
where(3.7)dij(k)=(xi(k)-xj(k∣k-dk))2+(yi(k)-yj(k∣k-dk))2,dij(k+s∣k)=(xi(k+s∣k)-xj(k+s∣k-dk))2+(yi(k+s∣k)-yj(k+s∣k-dk))2.dD,dM are positive constant, b is a positive parameter, and pi(k) and pj(k) are the priority level, at time k, of the ith UAV and the jth UAV, respectively.Since, at time stepk, the ith UAV can only obtain the jth UAV’s predicted position from time step k-dk to k-dk+N, positions of the jth UAV from time k-dk+N+1 to k+N should be recurred by the ith UAV according to the delayed information.For simplicity, we take the linear recurrence method to predict thejth UAV’s positions from time step k-dk+N+1 to k+N as follows:(3.8)[xj(k-dk+N+s)yj(k-dk+N+s)]=2[xj(k-dk+N-1+s)yj(k-dk+N-1+s)]-[xj(k-dk+N-2+s)yj(k-dk+N-2+s)],s=1,…,dk.All UAV’s priority level should be calculated in a distributed way. Since there exist a random communication delay, theith UAV calculates the priority level according to the neighboring  jth UAV’s distance error vectorej(k∣k-dk) and its current distance error ei(k∣k).


### 3.4. Optimization Problem

To achieve collision-free formation flight, at timek, the ith UAV needs to solve the following optimization problem:(3.9)ui*=argmin⁡ui{JN(xi,ui,k)+Lo(xi,k)+Lp(xi,k)},
subject to(3.10)xi(k+s+1∣k)=f(xi(k+s∣k),ui(k+s∣k)),xi(k+s∣k)∈Xi,ui(k+s∣k)∈Ui,s=0,…,N-1.The optimal input for the current sampling interval is applied to theith UAV. At time k+1, repeat this procedure again with updated information and shifted horizon.


## 3.1. Virtual Point Tracking

From (2.5), the prediction of the ith UAV’s dynamics by itself can be obtained as(3.1)xi(k+s+1∣k)=f(xi(k+s∣k),ui(k+s∣k)),s=0,…,N-1,
where N is the predictive horizon and xi(k+s∣k) indicates the ith UAV’s state predicted at time k+s and xi(k∣k)=xi(k). Correspondingly, ui(k+s∣k) is the predicted control inputs at time k+s and ui(k∣k)=ui(k).Firstly, without considering obstacle avoidance and intervehicle collision avoidance problem, at time stepk, the cost function is defined as(3.2)JN(xi,ui,k)=∑s=1N-1(xeiT(k+s∣k)Qxei(k+s∣k)+ueiT(k+s-1∣k)Puei(k+s-1∣k))+xeiT(k+N∣k)QNxei(k+N∣k),
where Q, P, and QN are positive-definite symmetric matrices, uei(k)=ui(k)-uid(k).


## 3.2. Obstacle Avoidance

In obstacle-rich environment, UAV must be able to avoid obstacles automatically. Traditionally, inequality constraints are added to the MPC optimization problem directly to realize obstacle avoidance [24]. It is easy to formulate the problem, but difficult to solve, because of its nonconvex property. Moreover, this type of distance-based obstacle avoidance method usually leads to unwanted avoidance and frequent maneuver.Here, we proposed a new effective method to guarantee obstacle avoidance. As depicted in Figure2, when the shortest distance between UAV and obstacle is less than the dangerous distance lD, the position and velocity orientation of the UAV are used to predict if the shortest distance between them is less than the minimal allowable distance lM in the near future. If so, a cost function is added to the UAV’s objective function and UAV starts to avoid it while guaranteeing not deviating too far away from the previous desired trajectory to achieve formation. For simplicity, we only consider static and circular obstacles and assume that the position and the radius of the obstacle can be obtained in real time.Figure 2
Static obstacle avoidance while tracking trajectory.At timek, the obstacle avoidance cost function of the ith UAV is chosen as(3.3)Lo(xi,k)={0iflis(k)≥lD,0iflis(k)<lD,lisp(k)≥lM,∑s=1N-a(lis(k+s∣k)-lM)iflis(k)<lD,lisp(k)<lM,
where(3.4)lis(k)=(xi(k)-xo)2+(yi(k)-yo)2-Ro,lis(k+s∣k)=(xi(k+s∣k)-xo)2+(yi(k+s∣k)-yo)2-Ro,lisp(k)=|cot(ψi(k))(xo-xi(k))+(yo-yi(k))|(cot(ψi(k)))2+1.lD,lM are positive constants, and a is a positive parameter. (xo,yo) and Ro are the Cartesian coordinates and the radius of the obstacle, respectively.


## 3.3. Intervehicle Collision Avoidance

Intervehicle collision avoidance is also an important aspect in formation flight. Similar to obstacle avoidance problem, some papers ensure collision avoidance, in the framework of MPC, by adding inequality constraints to the optimization problem [23]. However, too many constraints usually make the optimization problem become difficult to solve, especially in large-scale formation flight application. Moreover, UAVs involved with collision avoidance may maneuver simultaneously to avoid collision, which leads to an undesired chain reaction in the formation, especially in close formation flight.Here we proposed a new method to ensure intervehicle collision avoidance through cost function with priority strategy. Firstly, UAVs involved with collision avoidance are tagged with a priority level according to its current relative position and mission at each sampling instant. When the relative distance between two UAVs is less than the safe separation, UAV with lower priority level should take the UAV with higher priority level as a moving obstacle to avoid. This strategy can avoid undesired chain maneuver because less UAVs need to maneuver for collision avoidance.The policy of tagging priority level is as follows:•
UAVs with smaller tracking error have higher priority level than those with larger tracking error;•
UAVs with emergent mission, such as obstacle avoidance, have the highest priority.Different from obstacle avoidance, we assume that each UAV has a circular protected zone with radiusdD and circular collision zone with radius dM, as depicted in Figure 3. When the protected zones of two UAVs intersect, UAV with lower priority should take the other UAV as a moving obstacle to avoid. When the collision zones of two UAVs intersect, collision will happen.Figure 3
UAV’s protected zone and collision zone.In this paper, we assume that the intervehicle wireless communication network is always available but introduces a random time delaydk in the information flow. It is assumed that dk is bounded, that is,(3.5)0≤dk≤dmax⁡.
So, at time step k, the ith UAV can obtain the jth UAV’s future position vector predicted at time step k-dk,that is, (xj(k+s∣k-dk),yj(k+s∣k-dk)),s=1,…,N.The intervehicle collision avoidance cost function of theith UAV is chosen as(3.6)Lp(xi,k)={0ifdij(k)≥2dD,0ifdij(k)<2dD,pi(k)>pj(k),∑s=1N-b(dij(k+s∣k)-2dD)ifdij(k)<2dD,pi(k)<pj(k),
where(3.7)dij(k)=(xi(k)-xj(k∣k-dk))2+(yi(k)-yj(k∣k-dk))2,dij(k+s∣k)=(xi(k+s∣k)-xj(k+s∣k-dk))2+(yi(k+s∣k)-yj(k+s∣k-dk))2.dD,dM are positive constant, b is a positive parameter, and pi(k) and pj(k) are the priority level, at time k, of the ith UAV and the jth UAV, respectively.Since, at time stepk, the ith UAV can only obtain the jth UAV’s predicted position from time step k-dk to k-dk+N, positions of the jth UAV from time k-dk+N+1 to k+N should be recurred by the ith UAV according to the delayed information.For simplicity, we take the linear recurrence method to predict thejth UAV’s positions from time step k-dk+N+1 to k+N as follows:(3.8)[xj(k-dk+N+s)yj(k-dk+N+s)]=2[xj(k-dk+N-1+s)yj(k-dk+N-1+s)]-[xj(k-dk+N-2+s)yj(k-dk+N-2+s)],s=1,…,dk.All UAV’s priority level should be calculated in a distributed way. Since there exist a random communication delay, theith UAV calculates the priority level according to the neighboring  jth UAV’s distance error vectorej(k∣k-dk) and its current distance error ei(k∣k).


## 3.4. Optimization Problem

To achieve collision-free formation flight, at timek, the ith UAV needs to solve the following optimization problem:(3.9)ui*=argmin⁡ui{JN(xi,ui,k)+Lo(xi,k)+Lp(xi,k)},
subject to(3.10)xi(k+s+1∣k)=f(xi(k+s∣k),ui(k+s∣k)),xi(k+s∣k)∈Xi,ui(k+s∣k)∈Ui,s=0,…,N-1.The optimal input for the current sampling interval is applied to theith UAV. At time k+1, repeat this procedure again with updated information and shifted horizon.


## 4. Simulation

In order to illustrate the feasibility and effectiveness of the designed formation flight control law, a simulation is presented in this section. Five UAVs are required to achieve the desired formation configuration from random initial positions and maintain the configuration while tracking the formation reference trajectory. Collision avoidance and obstacle avoidance should always be guaranteed in the whole process. The simulation is carried out in MATLAB. The optimization problem is solved by filterSQP function in TOMLAB [32].


### 4.1. Simulation Parameters

The total simulation time is 200 seconds. The predictive control horizon and control time interval of the MPC are selected asN=5 and TS=0.5 s.The desired UAV formation configuration is an arrow with virtual points located at{(0,0.577),(-0.25,0.144),(0.25,0.144),(-0.5,-0.288),and(0.5,-0.288)} in the virtual reference point coordinate system. Three static obstacles located at [5,6],[3,2] and [6.5,3] with the radius of 1 km, 0.5 km, and 0.4 km, respectively. dM=0.02 km, dD=0.2 km, lD=2 km, lM=100m,dmax=2, a=1000, b=1000, and wr=0.035 rad/s (Table 1).Table 1
Control inputs constraints of each UAV.
vmax200m/svmin100m/s|v˙max|20m/sγmax30degγmin-30deg|γ˙max|20deg/sαv3.2sαγ0.6sThe reference trajectory of the reference point is illustrated as(xr0,yr0)=[3,4],ψr0=90°,vr0=150m/s,vr=150m/s,t∈[0,200]s  (4.1)wr={0(rad/s),t∈[0,100]s,0.02(rad/s),t∈(100,175]s,0(rad/s),t∈(175,200]s.


### 4.2. Simulation Results

Figure4 shows that five UAVs can rendezvous to a desired hexagonal configuration in about 100 s. The arrows show the position and heading of each UAV at snapshots of time, specifically at 0,25,50,75,100,125,150,175, and 200 seconds. In the process of formation achievement, UAV4 can avoid two obstacles automatically. After formation achievement, UAVs can track the formation reference trajectory and keep the formation configuration while maneuvering. Figure 5 illustrates UAV4’s control input commands and tracking error history. We can see that the control inputs are bounded in the constraints and tracking error can be gradually controlled to zero. Figure 6 shows distance error of each UAV, and Figure 7 shows the relative distance between UAVs. The simulation results show that the MPC-based designed formation flight control law can work well in obstacle-rich environment.Figure 4
UAV formation achievement and maintained simulation results.UAV4’s control inputs and tracking error history.
(a)
velocity commands and real velocity(b)
roll angle commands and real roll angle(c)
position tracking error(d)
course angle  tracking errorFigure 6
Each UAV’s distance error history.Figure 7
Relative distance history of UAVs.Figure8 shows that the configuration of the formation cannot be maintained in the process of sharp turn. Some UAVs cannot track the virtual reference point with the prescribed offset because of its inherent control input saturation constraints. Figures 9–11 show that although UAV4’s roll angle is the maximum but the angular velocity cannot reach the desired position in the process of sharp turn.Figure 8
Trajectories of five UAVs with sharp turn (wr=-0.03rad/s,t∈100s,150s)].UAV4’s control inputs and tracking error history with sharp turn.
(a)
velocity commands and real velocity(b)
roll angle commands and real roll angle(c)
position tracking error(d)
course angle tracking errorFigure 10
Each UAV’s distance error history with sharp turn.Figure 11
Relative distance history of UAVs with sharp turn.


## 4.1. Simulation Parameters

The total simulation time is 200 seconds. The predictive control horizon and control time interval of the MPC are selected asN=5 and TS=0.5 s.The desired UAV formation configuration is an arrow with virtual points located at{(0,0.577),(-0.25,0.144),(0.25,0.144),(-0.5,-0.288),and(0.5,-0.288)} in the virtual reference point coordinate system. Three static obstacles located at [5,6],[3,2] and [6.5,3] with the radius of 1 km, 0.5 km, and 0.4 km, respectively. dM=0.02 km, dD=0.2 km, lD=2 km, lM=100m,dmax=2, a=1000, b=1000, and wr=0.035 rad/s (Table 1).Table 1
Control inputs constraints of each UAV.
vmax200m/svmin100m/s|v˙max|20m/sγmax30degγmin-30deg|γ˙max|20deg/sαv3.2sαγ0.6sThe reference trajectory of the reference point is illustrated as(xr0,yr0)=[3,4],ψr0=90°,vr0=150m/s,vr=150m/s,t∈[0,200]s  (4.1)wr={0(rad/s),t∈[0,100]s,0.02(rad/s),t∈(100,175]s,0(rad/s),t∈(175,200]s.


## 4.2. Simulation Results

Figure4 shows that five UAVs can rendezvous to a desired hexagonal configuration in about 100 s. The arrows show the position and heading of each UAV at snapshots of time, specifically at 0,25,50,75,100,125,150,175, and 200 seconds. In the process of formation achievement, UAV4 can avoid two obstacles automatically. After formation achievement, UAVs can track the formation reference trajectory and keep the formation configuration while maneuvering. Figure 5 illustrates UAV4’s control input commands and tracking error history. We can see that the control inputs are bounded in the constraints and tracking error can be gradually controlled to zero. Figure 6 shows distance error of each UAV, and Figure 7 shows the relative distance between UAVs. The simulation results show that the MPC-based designed formation flight control law can work well in obstacle-rich environment.Figure 4
UAV formation achievement and maintained simulation results.UAV4’s control inputs and tracking error history.
(a)
velocity commands and real velocity(b)
roll angle commands and real roll angle(c)
position tracking error(d)
course angle  tracking errorFigure 6
Each UAV’s distance error history.Figure 7
Relative distance history of UAVs.Figure8 shows that the configuration of the formation cannot be maintained in the process of sharp turn. Some UAVs cannot track the virtual reference point with the prescribed offset because of its inherent control input saturation constraints. Figures 9–11 show that although UAV4’s roll angle is the maximum but the angular velocity cannot reach the desired position in the process of sharp turn.Figure 8
Trajectories of five UAVs with sharp turn (wr=-0.03rad/s,t∈100s,150s)].UAV4’s control inputs and tracking error history with sharp turn.
(a)
velocity commands and real velocity(b)
roll angle commands and real roll angle(c)
position tracking error(d)
course angle tracking errorFigure 10
Each UAV’s distance error history with sharp turn.Figure 11
Relative distance history of UAVs with sharp turn.


## 5. Conclusion and Future Work

In this paper, a collision-free UAV formation flight controller is designed in the framework of MPC. The formation configuration is determined in the virtual reference point coordinate system which is uniquely determined by virtual reference point’s position and velocity direction. Then a distributed formation flight control law is designed in the frame work of MPC, which considers the nonlinear dynamical model of UAV, state and control input constraints. Obstacle avoidance is guaranteed by cost penalty. Intervehicle collision avoidance is guaranteed by collision cost penalty, using the delayed neighboring information, combined with a new priority strategy. Simulation results show that the designed controller is capable of achieving and maintaining the formation along the desired reference trajectory while avoiding obstacles and intervehicle  collision. In the future, we will investigate the effects of communication delay on the proposed formation flight controller and formation reconfiguration control problem.



---

*Source: 261367-2012-02-02.xml*