Aerospace Systems

, Volume 1, Issue 1, pp 13–22 | Cite as

Lattice flocking of multi-quadrotor system: an algorithm based on artificial potential field

  • Zian Ning
  • Lei Song
  • Dan Huang
  • Xiaochun ZhangEmail author


This paper investigates the flocking and obstacle avoidance problem of multi-quadrotor system with a lattice-type structure. To tackle nonlinear dynamics and cooperative consensus of a swarm of quadrotors, we proposed two algorithms (one for free flocking and one for constrained flocking) based on artificial potential field with two cooperative strategies using position tracking and attitude tracking, respectively. Firstly, the inner-loop control model of single quadrotor is provided. Then, we build an artificial potential function to act on the coordinate variable. Third, obstacle avoidance term is added to the flocking algorithm proposed previously. Finally, the position and attitude are taken as the coordinate variables, respectively, to both two algorithms, one for optimizing the distance of each quadrotor until the lattice-type structure is formed and keeping continuously and another for optimizing the distance between quadrotor and obstacles to avoid collision. Simulation results demonstrate the validity of both algorithms.


Flocking Artificial potential field Multi-quadrotor system Unmanned aerial vehicle (UAV) Obstacle avoidance 

1 Introduction

In recent years, coordinated and cooperative control of multi-UAV has received much attention spurred by the fact that many benefits can be obtained when multi-UAV executes a task in a cooperative fashion. During all kinds of tasks, consensus is the basis of UAV cooperation. Wei and Beard in [1] introduced the basic theory of consensus problem of multi-agent. They also investigated some further problems such as formation structure, communication, noise and so on. Their study is very helpful for later flocking research. Song in [2] investigates the mean square consensus problem of multi-agent systems impacted by the combined uncertainty of multiplicative noises and time delays. Further research is the formation control because formation is the basis of multi-UAV mission. Turpin et al. [3] proposed a centralized formation control algorithm. They model formation by shape vectors and achieve safe reconfiguration by changing shape vectors. While for flocking, there are many advantages; flock has no accurate position control requirements and so it is very flexible like birds, fishes, ants and bees. Reynolds introduced three heuristic rules that led to creation of the first computer animation of flocking [4]. These three rules have made great influence on the later multi-agent research. Olfati-Saber in [5] proposed a distributed flocking algorithm for particle system that leads to flocking in 3D free space. They also considered constrained flocking. They see agent as second-order dynamic. Cetin et al. [6] used artificial potential field method to plan path for UAV in order to build a long-range communication chain. For obstacle avoidance, Oleynikova et al. in [7] present a continuous time trajectory optimization method for real-time collision avoidance on multi-rotor UAVs. This continuous method is very efficient but costly for single UAV.

On the other hand, the unmanned quadrotor is a widely used UAV for its many advantages, such as low cost, flexibility and efficiency. Especially, the ability to hover makes it suitable for many scenarios and the quadrotor’s structure is simple and easy to maintain. Several typical cooperation applications include crop monitoring [8], forest fires, urban traffic, inspection of the nuclear power station and so on. Mellinger in [9] studied the trajectory generation control for quadrotors. For quadrotor’s dynamic model, Rubio et al. in [10] presented two dynamic models of a quadrotor: translation dynamic and rotation dynamic. And they also compared the difference between them. For quadrotor’s control theories and algorithms, please see [11, 12, 13]; while the research on the flocking problem of multi-quadrotor system is relatively fewer, especially under desired conformation with specific geometric structure.

To capture an apparent spatial order in real life, the lattice type is normally used to model the flocking structure. Lattice-type structure is very flexible for multi-UAV system, because there is no strict requirement of position. We use the flocking algorithm based on artificial potential field to control the multi-quadrotor system, and make them flock together into lattice-type structure. For obstacle avoidance, we create virtual UAV on the boundary of neighbour obstacles and keeping a distance from it will avoid collision with obstacle. For single quadrotor control, two cooperative control strategies are provided based on position control and attitude control, respectively. Free flocking simulation results show that both the control strategies are effective for the free flocking algorithm, and the attitude control strategy can better eliminate the steady-state error and make the lattice-type structure more accurate. Constrained flocking simulation result shows that attitude control strategy is effective for constrained flocking algorithm.

This paper is organized as follows. In Sect. 2, we introduce the multi-quadrotor system control model and the flocking goal together with the obstacle avoidance target. In Sect. 3, we propose two control strategies for the flocking algorithm. Then in Sect. 4, some simulation results are provided. Finally, in Sect. 5, we conclude our work and look to the future research.

2 Problem formulation

The theoretical framework presented in this paper relies on some basic concepts in graph theory [14, 15], consensus problems [1, 16], and flocking algorithm [4].

2.1 Multi-quadrotor control model

We consider the flocking problem of multi-quadrotor system. Firstly, the typical control model of one single quadrotor should be constructed. The quadrotor can be modeled as a rigid body with three translational degrees of freedom along the axes and three rotational degrees of freedom around the axes. First, two basic coordinate systems of the world frame and the body frame are provided. The world frame, W, is defined by axes \( x_{w} \), \( y_{w} \) and \( z_{w} \). The body frame, B, is attached to the center of mass of the quadrotor. We use ZXY Euler angles to model the rotation of the quadrotor in the world frame.

We can model the quadrotor using \( q = \left[ {x,y,z} \right]^{\text{T}} \in R_{3} \), which refers to the position alone the axes of world frame, and yaw angle \( \psi \), roll angle \( \phi \) and finally pitch angle \( \theta \). The velocity in the world frame is expressed by \( p = \left[ {\dot{x},\dot{y},\dot{z}} \right]^{T} \in R_{3} \) and the angular velocity in the body frame is expressed by \( \varOmega = \left[ {\varOmega_{1} ,\varOmega_{2} ,\varOmega_{3} } \right]^{T} \in R_{3} \).

In conclusion, the state of the quadrotor is composed of the position, the orientation, the velocity and the angular velocity:
$$ X = \left[ {x,y,z,\phi ,\theta ,\psi ,\dot{x},\dot{y},\dot{z},\dot{\phi },\dot{\theta },\dot{\psi }} \right]. $$
The transforming matrix \( \hat{R} \) from body frame to world frame is given by:
$$ \hat{R} = \left[ {\begin{array}{*{20}c} {c\psi c\theta - s\phi s\psi s\phi } & { - c\phi s\psi } & {c\psi s\theta + c\theta s\phi s\psi } \\ {c\theta s\psi + c\psi s\phi s\theta } & {c\phi c\psi } & {s\psi s\theta - c\psi c\theta s\phi } \\ { - c\phi s\theta } & {s\phi } & {c\phi c\theta } \\ \end{array} } \right], $$
where \( c\theta \) and \( s\theta \) denote \( \cos (\theta ) \) and \( \sin (\theta ) \), respectively, and similarly for \( \phi \) and \( \psi \).
The quadrotor control its own states by adjusting the speed of four rotors. The relationship between the provided force \( F_{i} \) by rotor \( i \) and its angular speed \( \omega_{i} \) is:
$$ F_{i} = C_{F} \cdot \omega_{i}^{2} , $$
where \( C_{F} \) is a constant.
The provided moment \( M_{i} \) by rotor \( i \) and its angular speed \( \omega_{i} \) has similar relationship as follows:
$$ M_{i} = C_{M} \cdot \omega_{i}^{2} , $$
where \( C_{M} \) is a constant.
Compared to the vehicle dynamic model, the motor can give fast response to meet the angular speed command. Therefore, the dynamic model of motor can be ignored and both the ideal force and the moments about each axes can be achieved instantaneously. So the control inputs include the total forces of the four propellers \( \mu_{1} \), the moments about each axes \( \mu_{2} \), \( \mu_{3} \) and \( \mu_{4} \). The control inputs vector \( \mu \) is:
$$ \mu = \left[ {\begin{array}{*{20}c} {\mu_{1} } \\ {\mu_{2} } \\ {\mu_{3} } \\ {\mu_{4} } \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} {F_{1} + F_{2} + F_{3} + F_{4} } \\ {F_{2} D - F_{4} D} \\ {F_{3} D - F_{1} D} \\ {M_{1} + M_{2} + M_{3} + M_{4} } \\ \end{array} } \right], $$
where D stands for the distance between rotor and mass center.
Based on the proposed coordinate systems and force analysis, we establish the following nonlinear dynamic model:
$$ \dot{q} = p, $$
$$ m\ddot{q} = \left[ {\begin{array}{*{20}c} 0 \\ 0 \\ { - mg} \\ \end{array} } \right] + \hat{R}\left[ {\begin{array}{*{20}c} 0 \\ 0 \\ {\mu_{1} } \\ \end{array} } \right], $$
$$ \varOmega = \left[ {\begin{array}{*{20}c} {c\theta } & 0 & { - c\phi s\theta } \\ 0 & 1 & {s\phi } \\ {s\theta } & 0 & {c\phi c\theta } \\ \end{array} } \right]\left[ {\begin{array}{*{20}c} {\dot{\phi }} \\ {\dot{\theta }} \\ {\dot{\psi }} \\ \end{array} } \right], $$
$$ J\dot{\varOmega } = - \varOmega \times J\varOmega + \left[ {\begin{array}{*{20}c} {\mu_{2} } \\ {\mu_{3} } \\ {\mu_{4} } \\ \end{array} } \right], $$
where J stands for the inertia matrix of quadrotor, and \( \times \) is cross-product.
For a single quadrotor controller, there are two strategies: position command control and attitude command control, and the difference between them is the control input. For position command control, the input is the desired position state; while for attitude command control, the input is the desired attitude state. Figure 1 shows the structure of quadrotor controller. The desired attitude is calculated by translation position controller using position command input. While using attitude command control, the attitude command input is sent into the attitude controller directly.
Fig. 1

The structure of quadrotor controller containing three series controllers

For multi-quadrotor system, each quadrotor has the same dynamic and controller and each quadrotor can communicate with its neighbours. Every quadrotor’s control input is relying on its neighbors’ states. Figure 2 shows the control structure of the multi-quadrotor system. Each quadrotor received states from neighbor quadrotors, and transmit its own state to others.
Fig. 2

The overview of each quadrotor’s control structure in multi-quadrotor system

2.2 Flocking control target

For the agent communication topology, we use the proximity net. Every quadrotor has limited communication range because of the limitation of wireless sensor communication range. So, every quadrotor can only communicate with their neighbours. We define neighbors as follows:
$$ N_{i} = \left\{ {j \in V:||q_{j} - q_{i} || < r} \right\}, $$
where V is the edges of the proximity net and r is the communication range. Only if the distance between two UAV is less than communication range, they can communicate and they are neighbours.
To capture an apparent spatial order in real-life flocks, we use lattice-type structure to model the geometry of desired conformation of agents in a flock. This geometric object can be described as follows:
$$ ||q_{j} - q_{i} || = d,\quad \forall j \in N_{i} (q), $$
where qi is the i-th UAV’s position state. This means all the UAVs keep the same distance eventually. This geometric structure is very flexible because each UAV does not have an absolute fixed position. They just flock together. In 2D space, the structure looks like crystals (see Fig. 3). As there is no strict requirement of position, this type of structure is very flexible.
Fig. 3

An example of the desired conformation (lattice-type structure) of multi-UAV

As the UAV’s neighbors are determined by communication distance r and the UAVs with greater distance than r will have no influence on it, the desired relative distance d must be smaller than r. There must be a lower bound of desired relative distance d to avoid collision because of overshoot, but we did not calculate its value. Later in chapter 4, the simulation results show that the values of a set of parameters we use based on the experience can avoid this problem.

For each UAV, we now assume that each dynamic UAV has the following model:
$$ \left\{ {\begin{array}{*{20}c} {\dot{q}_{i} = p_{i} } \\ {\dot{p}_{i} = u_{i} ,} \\ \end{array} } \right. $$
where \( q_{i} \) is the position state vector, and \( p_{i} \) is the velocity state vector. Each UAV applies a control input \( u_{i} \) which is the acceleration vector. Apparently, this is a second-order dynamic system. Later, we will replace it with quadrotor’s non-linear dynamic model.

For most multi-UAV missions, there is still a long distance from the mission area to the takeoff location. So the multi-UAV formation needs to navigate the mission area together. Usually there are obstacles on the way; so the multi-UAV must have obstacle-avoidance capability and that is constrained flocking.

So, in conclusion, we want all the UAV to form lattice-type structure flock using proximity net topology by controlling all the UAV’s acceleration. Then the flock can pass through obstacle area with no collision and reform lattice-type structure. So the multi-UAV system has constrained flocking ability.

3 Main results

3.1 Free flocking algorithm

We hope that all the unmanned aerial vehicles (UAV) will eventually maintain the same distance to all of its adjacent UAVs (lattice-type structure). So when two unmanned aerial vehicles are close to each other, they need repulsive effect to avoid collision; while when they are far apart, they need to be attractive. They also need to keep the same speed at the same time. Actually, these are the three heuristic rules introduced by Reynolds in 1986 [4]. Here are the three flocking rules: flocking centering, collision avoidance and velocity matching.

According to the above-mentioned conditions, we hope that the potential function has the following characteristics:
  1. 1.


  2. 2.

    Reaches minimum value at the desired relative distance d;

  3. 3.

    Vanishes when distance is bigger than communication distance r.

First, we define an action function:
$$ \begin{aligned} \phi_{\alpha } (z) & = \rho_{h} (z/r_{\alpha } )\phi (z - d_{\alpha } ) \\ \phi (z) & = \frac{1}{2}\left[ {(a + b)\sigma_{1} (z + c) + a - b} \right], \\ \end{aligned} $$
where \( \sigma_{1} (z) = {z \mathord{\left/ {\vphantom {z {\sqrt {1 + z^{2} } }}} \right. \kern-0pt} {\sqrt {1 + z^{2} } }} \) and \( 0 < a \le b \), \( c = {{|a - b|} \mathord{\left/ {\vphantom {{|a - b|} {\sqrt {4ab} }}} \right. \kern-0pt} {\sqrt {4ab} }} \) to guarantee \( \phi (0) = 0 \). And
$$ \rho_{h} (z) = \left\{ {\begin{array}{*{20}l} {1,} \hfill &\quad {z \in [0,h)} \hfill \\ {\frac{1}{2}\left[ {1| + \cos \left( {\pi \frac{z - h}{1 - h}} \right)} \right],} \hfill &\quad {z \in [h,1)} \hfill \\ {0,} \hfill &\quad {\text{otherwise,}} \hfill \\ \end{array} } \right. $$
is a bump function.
Then we integrate this action function and the finally potential function is defined as
$$ \varphi_{\alpha } (z)\int\limits_{{d_{\alpha } }}^{z} {\phi_{\alpha } (s){\text{d}}s} . $$
This function is depicted in Fig. 4 with the parameter d = 6, r = 9.
Fig. 4

Potential function \( \varphi_{\alpha } (z) \)

So the final collective potential function is a non-negative function, with the property that any solution of the set of algebraic constraints is ‘closely related to’ global minimum value and vice versa [5].

To achieve collision avoidance, we construct the following control input.
$$ u_{i} = \sum\limits_{{j \in N_{i} }} {\phi_{\alpha } \left( {\left\| {q_{j} - q_{i} } \right\|_{\sigma } } \right)} \vec{n}_{ij} + a_{ij} (q)(p_{j} - p_{i} ), $$
where \( \vec{n}_{ij} = \frac{{q_{j} - q_{i} }}{{\sqrt {1 + \varepsilon \left\| {q_{j} - q_{i} } \right\|^{2} } }} \) is a vector to indicate orientation.

But (16) has no group objective, and it states the interaction rule of two UAVs. So fragmentation phenomenon will appear. To solve this problem, we add a new term. The free flocking algorithm is as follows.

Algorithm 1:
$$ \begin{aligned} u_{i} & = \sum\limits_{{j \in N_{i} }} {\phi_{\alpha } \left( {\left\| {q_{j} - q_{i} } \right\|_{\sigma } } \right)\vec{n}_{ij} + \sum\limits_{{j \in N_{i} }} {a_{ij} (q)(p_{j} - p_{i} )} } \\ & \quad + f_{i}^{\gamma } (q_{i} ,p_{i} ,q_{r} ,p_{r} ), \\ \end{aligned} $$
where \( f_{i}^{\gamma } (q_{i} ,p_{i} ,q_{r} ,p_{r} ) = - c_{1} (q_{i} - q_{r} ) - c_{2} (p_{i} - p_{r} ) \) is the group objective term. And the pair \( (p_{r} ,q_{r} ) \) is the state of virtual objective. The virtual objective has the following model
$$ \left\{ {\begin{array}{*{20}l} {\dot{q}_{r} = p_{r} } \hfill \\ {\dot{p}_{r} = f_{r} (q_{r} ,p_{r} ),} \hfill \\ \end{array} } \right. $$
with \( \left( {q_{r} (0),p_{r} (0)} \right) = (q_{d} ,p_{d} ) \). In this paper, we use \( f_{r} \equiv 0 \). So the virtual objective moves along a straight line.

3.2 Constrained flocking algorithm

We simulate our obstacles as connected regions with boundaries that are smooth manifolds. Specifically, we focus on circle obstacle and wall obstacle.

To achieve obstacle avoidance, we create a virtual UAV on the boundary of a neighbouring obstacle, which is the nearest place from the real UAV. And we set the speed direction of the virtual UAV to tangential direction of the obstacle’s boundary (see Figs. 5, 6). Note that if the virtual UAV is at the endpoint of a line, its speed direction is equal to the real UAV. As long as the real UAV is keeping a certain distance from the virtual UAV, there will be no collision between the real UAV and the obstacle.
Fig. 5

The virtual UAV for obstacle avoidance with circle obstacle

Fig. 6

The virtual UAV for obstacle avoidance with line obstacle

Thus a new term will be added in the algorithm to achieve the effect of obstacle avoidance. So finally Algorithm 2 has three terms.

Algorithm 2:
$$ u_{i} = u_{i}^{\alpha } + u_{i}^{\beta } + u_{i}^{\gamma } , $$
where \( u_{i}^{\alpha } \) denotes the flock term, \( u_{i}^{\beta } \) denotes the obstacle avoidance term and \( u_{i}^{\gamma } \) denotes the group objective term. Each term in Eq. (19) is explicitly specified as follows:
$$ \begin{aligned} u_{i}^{\alpha } & = c_{1}^{\alpha } \sum\limits_{{j \in N_{i} }} {\phi_{\alpha } } \left( {\left\| {q_{j} - q_{i} } \right\|_{\sigma } } \right)\vec{n}_{ij} + c_{2}^{\alpha } \sum\limits_{{j \in N_{i} }} {a_{ij} (q)(p_{j} - p_{i} )} \\ u_{i}^{\beta } & = c_{1}^{\beta } \sum\limits_{{k \in N_{i} }} {\phi_{\beta } } \left( {\left\| {q_{k} - q_{i} } \right\|_{\sigma } } \right)\vec{n}_{ij} + c_{2}^{\beta } \sum\limits_{{k \in N_{i} }} {b_{ik} (q)(p_{k} - p_{i} )} \\ u_{i}^{\gamma } & = c_{1}^{\gamma } \sigma_{1} (q_{i} - q_{\gamma } ) - c_{2}^{\gamma } (p_{i} - p_{\gamma } ), \\ \end{aligned} $$
where \( \sigma_{1} (z) = {z \mathord{\left/ {\vphantom {z {\sqrt {1 + \left\| z \right\|^{2} } }}} \right. \kern-0pt} {\sqrt {1 + \left\| z \right\|^{2} } }} \) and \( c_{n}^{v} \) are positive constants for all \( n = 1,2 \) and \( v = \alpha ,\beta ,\gamma \). The pair \( (p_{k} ,q_{k} ) \) is the state of virtual UAV created for obstacle avoidance.

3.3 Multi-quadrotor control strategies

As mentioned in the chapter 2.1, there are two strategies for the control of single quadrotor (position command control and attitude command control). So in the flocking of multi-quadrotor system, we use both to do the comparison.

We first introduce how to use these two control strategies in the flocking of multi-quadrotor system.

For position command control, the control input of quadrotor is the desired position. So we first use the same amount of virtual vehicles to execute flocking algorithm, which are second-order dynamic systems. Then let the real nonlinear dynamic quadrotor track the position of its own virtual vehicle. In general, each quadrotor’s control input is the virtual vehicle’s position state.

For attitude command control, the quadrotor’s control input is the desired attitude state (pitch angle \( \theta \) and roll angle \( \phi \)). When the attitude angle of the quadrotor is small (less than 30°), the attitude angle is approximately proportional to the acceleration in the horizontal direction. So we can use the results of flocking algorithm as the desired attitude angle which can be the control input of quadrotor.

In conclusion, in attitude command control, the output of flocking algorithm is sent directly into the quadrotor’s attitude controller as control input; while for position command control, the output of flocking algorithm is sent into a virtual second-order dynamic vehicle to calculate the desired position which will be the control input of quadrotor’s position controller.

Since a virtual vehicle is added between the flocking algorithm and the quadrotor in the position command control, the quadrotor begins to have obvious movement as desired only when the virtual vehicle has moved a certain distance. So there must be a time delay for the real quadrotor to move as desired. Our simulation results in chapter 4 also proved this.

The detailed steps of both two control strategies are as follows.

In control strategy 1, for i-th quadrotor update, the control input is position state \( q_{i} \). While in control strategy 2, attitude state \( \phi_{\text{des}} ,\theta_{\text{des}} {\text{ and }}\psi_{\text{des}} \).

We calculate the collective potential value Q in both two control strategies for later evaluation. And Q follows to
$$ Q = \frac{1}{2}\sum\limits_{i} {\sum\limits_{j \ne i} {\varphi_{\alpha } \left( {\left\| {q_{j} - q_{i} } \right\|_{\sigma } } \right)} } . $$

The algorithm is distributed, so the quadrotor calculates the control inputs itself, just relying on its neighbors’ states. This scheme can reduce the calculation cost on one UAV. Thus, each UAV do not need a powerful computer, and that is easy.

4 Simulation results

In this section, we present some simulation results. The update frequency is 100 Hz. The objective point is marked with a red × sign. The following parameters based on experience remain fixed throughout all simulations: \( d = 7 \), \( r = 8.4 \), \( a = b = 5 \), \( c = {{(a - b)} \mathord{\left/ {\vphantom {{(a - b)} {\sqrt {4ab} }}} \right. \kern-0pt} {\sqrt {4ab} }} \), \( h = 0.2 \).

For the sensor measure process, we considered some practical problems. Several sensors will be installed on the quadrotor frame to measure the state itself. These sensors are: GPS, accelerometer and gyroscope. But each sensor has error and delay. So, we added random additive noise to these sensors. The update frequency of GPS is relatively low, and inversely proportional to accuracy. To ensure positioning accuracy, most commercial UAV set the GPS update frequency to 10 Hz. Thus, we set the GPS’s update frequency to 10 Hz to simulate the real situation.

Table 1 shows the parameters of quadrotor we used.
Table 1

Quadrotor parameter


Data range

Mass (kg)


Moment of axes (x, y, z) (kg/m2)

[0.05, 0.05, 0.24]

Roll and pitch angle \( \phi ,\theta \)

− 30° to 30°

Yaw angle \( \psi \)

− 180° to 180°

Angular velocity, \( \dot{\phi },\dot{\theta },\dot{\psi } \)

− 50 to 50 deg/s

Control input \( \mu_{1} \)


Control input \( \mu_{2} ,\mu_{3} \)

− 6.25 to 6.25

Control input \( \mu_{4} \)

− 2.25 to 2.25

4.1 Multi-quadrotor free flocking simulation using algorithm 1

At the beginning, we randomly sprinkle 15 points in the scene around the original position (0, 0) as the initial position of the UAVs. Set the virtual objective’s position with (0, 0). Each quadrotor can only communicate with its neighbours designed by a sphere with constant radius which is the communication range r; while every quadrotor can receive the objective’s state. The objective has a constant speed heading right.

Figures 7 and 8 show the simulation results using position command control and attitude command control, respectively. The yellow triangular in Fig. 7 are the virtual vehicles, and their positions are sent to nearby quadrotors. The straight lines between quadrotors in both figures indicate that their distance has reached the desired value d.
Fig. 7

Free flocking simulation result for n = 15 quadrotors using position command control strategy

Fig. 8

Free flocking simulation result for n = 15 quadrotors using attitude command control strategy

Since the position is randomly at first, few quadrotors have the desired distance with its neighbours. Finally, in Fig. 7b, a lattice-type flock is formed and maintained thereafter. But there is an obvious distance between the virtual vehicle and its nearby quadrotor, which indicates that there exists a state error for every quadrotor. Figure 8 shows the flocking for a group of \( n = 15 \) quadrotors using attitude command control. As you can see in Fig. 8b, each quadrotor is equally distanced from all of its neighbours and form a lattice-type flock eventually, and there are no state errors.

As we analyzed in chapter 3, there will be time delays in the control of quadrotor when using position tracking. That is why Fig. 7 shows state error for every quadrotor, and the simulation results of attitude tracing are much more accurate. Same conclusion will be found in the later analysis of Q-function which is shown in Fig. 9.
Fig. 9

The Q function (collective potential function)

Figure 9 shows the Q-function using both control strategies. As mentioned in the chapter 3, the smaller the value of Q, the more accurate the lattice-type flock is. We will compare the smallest value and the decline rate of both two Q-function to find which control strategy is better. When using position tracking the smallest value of Q is 64.39, while using attitude tracking, 58.33. The comparison of decline rate of Q-function over the first 2 min also proved the better performance of attitude tracking. After calculation the decline rate of Q-function over the first 2 min is 38.45 when using position tracking, while for attitude tracking, 45.84. Table 2 shows the difference of Q-function between two control strategies.
Table 2

Comparison of Q-function between two control strategies

Control strategy

Minimum value of Q

Decline rate of Q-function over the first 2 min

Position tracking



Attitude tracking



So in conclusion, the flocking of multi-quadrotor system is less accurate when using position tracing, because of the time delaying in each quadrotor, which is caused by the adding virtual vehicle in the control. Thus, the simulation results proved that attitude tracing is better than position tracing.

4.2 Multi-quadrotor constrained flocking simulation with obstacle avoidance using algorithm 2

For constrained flocking simulation, we placed three obstacles in the area where the multi-quadrotor formation will navigate through. The three obstacles are two circle obstacles and a line obstacle. Table 3 shows the parameters of obstacles.
Table 3

Obstacle parameters

Obstacle number





Center: (20, 20)

Radius: 1



Center: (35, 35)

Radius: 1.3



Length: 5

Endpoint: (20, 30) (25, 30)

At first, 15 quadrotors’ initial positions are randomly set and the objective’s initial position is set to \( ( - 5, - 5) \) and the initial speed is zero. The objective’s speed is constant heading to top right corner. Note that \( c_{1}^{\alpha } < c_{1}^{\gamma } < c_{1}^{\beta } \) and \( c_{2}^{v} = 2\sqrt {c_{1}^{v} } \) for all species.

Attitude command control strategy is used in this simulation. Figure 10 shows the simulation result. As you can see, throughout the navigation, the objective passes through three objectives.
Fig. 10

Constrained flocking simulation result for n = 15 quadrotors using attitude command control strategy

In Fig. 10a, 15 quadrotors’ initial positions are random, and their speed is zero. In Fig. 10b, lattice-type flock is formed, and they have not encountered obstacles so far. In Fig. 10c, the objective passes through the first circle obstacle, while quadrotors avoid obstacle. Finally, in Fig. 10f, all quadrotors pass through the obstacle area with no collision and reform lattice-type flock. The simulation result proves that algorithm 2 is effective for obstacle avoidance.

5 Conclusion

In this paper, we use the flocking algorithm based on artificial potential field to control the multi-quadrotor system, and make them flock together into lattice-type structure. We also investigate constrained flocking with obstacle avoidance ability. Two cooperative control strategies for multi-quadtotor system are provided based on position command control and attitude command control, respectively. Simulation results show that both the control strategies are effective for free flocking algorithm, and using attitude command control strategy can better eliminate the steady-state error and make the lattice-type structure more accurate. Attitude command control strategy is effective for constrained flocking algorithm. Further, the impact of communication noise and delay is worth investigating to be more practical.


  1. 1.
    Wei R, Beard RW (2008) Distributed consensus in multi-vehicle cooperative control. Springer, LondonzbMATHGoogle Scholar
  2. 2.
    Song L, Huang D, Nguang SK et al (2016) Mean square consensus of multi-agent systems with multiplicative noises and time delays under directed fixed topologies. Int J Control Autom Syst 14(1):69–77CrossRefGoogle Scholar
  3. 3.
    Turpin M, Michael N, Kumar V (2012) Trajectory design and control for aggressive formation flight with quadrotors. Auton Robots 33(1):143–156CrossRefGoogle Scholar
  4. 4.
    Reynolds CW (1987) Flocks, herds, and schools: a distributed behavioral model. In: ACM SIGGRAPH’87 computer graphics conference proceedings, vol 21, no. 4, pp 25–34, July 1987Google Scholar
  5. 5.
    Olfati-Saber R (2006) Flocking for multi-agent dynamic systems: algorithms and theory. IEEE Trans Autom Control 51(3):401–420MathSciNetCrossRefGoogle Scholar
  6. 6.
    Cetin O, Zagli I, Yilmaz G (2013) Establishing obstacle and collision free communication relay for UAVs with artificial potential fields. J Intell Robotic Syst 69(1):361–372CrossRefGoogle Scholar
  7. 7.
    Oleynikova H, Burri M, Taylor Z et al (2016) Continuous-time trajectory optimization for online UAV replanning. In: IEEE/RSJ international conference on intelligent robots and systems. IEEE, 2016Google Scholar
  8. 8.
    Valente Joao, Sanz D, Barrientos A et al (2011) An air-ground wireless sensor network for crop monitoring. Sensors 11(6):6088–6108CrossRefGoogle Scholar
  9. 9.
    Mellinger D (2012) Trajectory generation and control for quadrotors. Dissertations and theses—gradworksGoogle Scholar
  10. 10.
    Rubio JDJ, Cruz JHP, Zamudio Z et al (2014) Comparison of two quadrotor dynamic models. IEEE Latin Am Trans 12(4):531–537CrossRefGoogle Scholar
  11. 11.
    Bouabdallah S, Siegwart R (2007) Full control of a quadrotor[M]Google Scholar
  12. 12.
    Altug E, Ostrowski JP, Taylor CJ (2003) Quadrotor control using dual camera visual feedback. In: IEEE international conference on robotics and automation, 2003. Proceedings ICRA. IEEE, 2003 vol 3, pp 4294–4299Google Scholar
  13. 13.
    Das A, Subbarao K, Lewis F (2009) Dynamic inversion with zero-dynamics stabilisation for quadrotor control. Iet Control Theory Appl 3(3):303–314MathSciNetCrossRefGoogle Scholar
  14. 14.
    Diestel R (2000) Graph theory, vol. 173 of graduate texts in mathematics. Springer, New YorkGoogle Scholar
  15. 15.
    Bollobas B (1998) Modern graph theory, vol. 184 of graduate texts in mathematics. Springer, New YorkGoogle Scholar
  16. 16.
    Saber RO, Murray RM (2003) Consensus protocols for networks of dynamic agents. In: American control conference, 2003. Proceedings of the IEEE, 2003, pp 951–956Google Scholar

Copyright information

© Shanghai Jiao Tong University 2018

Authors and Affiliations

  • Zian Ning
    • 1
  • Lei Song
    • 1
  • Dan Huang
    • 1
  • Xiaochun Zhang
    • 2
    Email author
  1. 1.School of Aeronautics and AstronauticsShanghai Jiao Tong UniversityShanghaiChina
  2. 2.Shanghai Aircraft Design and Research Institute, China COMACShanghaiChina

Personalised recommendations