Flocking Control of Multiple Mobile Agents with the Rules of Avoiding Collision

This paper investigates the flocking and the coordinative control problems of multiple mobile agents with the rules of avoiding collision.We propose a set of control laws using hysteresis in adding new links and applying newpotential function to guarantee that the fragmentation of the network can be avoided, under which all agents approach a common velocity vector, and asymptotically converge to a fixed value of interagent distances and collisions between agents can be avoided throughout themotion. Furthermore, we extend the flocking algorithm to solve the flocking situation of the group with a virtual leader agent. The laws can make all agents asymptotically approach the virtual leader and collisions can be avoided between agents in the motion evolution. Finally, some numerical simulations are showed to illustrate the theoretical results.


Introduction
In recent years, the problem of coordinated motion of multiple mobile agents, especially the flocking control [1][2][3], has attracted a lot of attention among researchers.Researchers structure a distributed model that simulates these behaviors such as flocks, herds, and schools [3][4][5][6][7][8][9][10][11][12][13][14][15][16][17][18][19][20][21].The wide attention and research on this issue get a good application in biology, social behavior, statistical physics, control engineering, and other fields [2][3][4][5][6][7][8][9][10][11].Most previous works of flocking algorithm are based on the assumption that the network topologies are always connected [12,13].However, in fact, it is difficult to ensure that network maintains connection at all times even if the initial network is connected [14].Therefore, there is great realistic significance to find out an algorithm that ensures that the connectivity requirement of the network is always satisfied.Fortunately, a connectivity preserving flocking algorithm for network topologies with distributed control was studied in [14][15][16][17].Under the condition that the initial network is connected, the author applies appropriate weight for network edge to make the network maintain connection.In [2,16], in order to maintain network connectivity, the method of measuring the local network was applied.In [17], using the potential function method was considered.
However, these methods were designed for single-integrator dynamics.In [13], the author first proposed a distributed connected algorithm for the second-order network system.With the algorithm, collisions between agents can be avoided in the motion evolution.
In this work, we consider how to maintain network connectivity by constructing artificial potential function and investigating the flocking algorithm with avoiding collision rules.This algorithm is using hysteresis in adding new links [14] and applying new potential function method to maintain network connectivity.The major difference from the algorithm which was considered in [13,15] is that we choose the new potential function.Furthermore, the situation of multiagent systems with a virtual leader is further investigated.We conclude that, in the case that the initial network is connected, the laws can make all agents approach a common velocity vector and asymptotically converge to a fixed value of interagent distances and collisions between agents can be avoided throughout the motion.
The rest of this paper is organized as follows.We define the multiagent flocking problem in Section 2, and some background on Graphs, Laplacian, and Reynolds model is presented in this section.In Section 3 we propose a new flocking algorithm and its results analyses are presented.

Mathematical Problems in Engineering
Then, some numerical simulation examples are presented in Section 4. Finally, some conclusions are made in Section 5.

Problem Formulation
2.1.Background.In order to improve the understanding of the flocking control problem and facilitate the narrative for the next part, some basic knowledge including the undirected graph (), Laplacian matrix, and Reynolds model is introduced as follows.

Algebraic Graph Theory.
Assume that each agent has the same sensing radius , for given constants  ∈ (0, ] and  0 ∈ (0, ), satisfying  0 ≤ .Consider the agent  as a node and use undirected edge link node  and other nodes which can be sensing.Thus, the graph consisting of a set of nodes  = {1, . . ., } and a time-varying set of edges () = {(, ) ∈  ×  :  ∼ } can be expressed as an undirected graph () at time , and the detailed meaning is as follows [15,22]: , a new edge is generated between agent  and agent .
Here,   () denotes the position vector of agent  and ‖ • ‖ expresses the Euclidean norm.The description of whether there exist edges between agent  and agent  at time  can use a symmetric indicator function (, ) ∈ {0, 1}, and we can describe it as follows: Here, if The above imply that a new edge will be added when the distance between the two agents is less than induction radius .

Laplacian. Define the Laplacian of agent 𝑖 as 𝐿 = 𝐷−𝐴,
where  is the adjacency matrix of graph () such that [13] where  = diag{  ,  ∈ },   = ∑ ∈    ,  = , 2, . . ., , is the sum of th row element of matrix .Obviously, the sum is zero of all row elements for Laplacian.Furthermore, Laplacian is a positive semidefinite matrix that satisfies the following sum-of-squares property [14]: For a given undirected graph (), the Laplace matrix is symmetrical, and the nonnegative adjacency matrix  satisfies   = .

Reynolds Model.
In 1986, Reynolds introduced three heuristic rules that led to creating the first computer animation of flocking [3].Then, researchers used the name Reynolds model that describes the rules.The flocking algorithm that will be proposed is based on these rules.Here, we list three flocking rules of Reynolds [4].
(i) Flock centering: attempt to stay close to nearby agents.(ii) Velocity matching: attempt to match velocity with nearby agents.
(iii) Collision avoidance: avoid collisions with nearby agents.

Problem Description.
In our background, the Reynolds model was proposed based on the position and velocity of agents; consider a group of mobile agents moving in a dimensional Euclidean space.Let •   ∈   and V  ∈   denote the position vector and velocity vector of agent ,  = 1, 2, . . ., , respectively.The motion equations of each agent are described by the following double integrator: where   ∈   denotes the energy control input of agent ,  = 1, 2, . . ., .The value of the position vector and the velocity vector of each agent is stored in the form of matrix; define Then, the problems of flocking control can consider how to design the control input   value, which can make all agent motion satisfy the three rules of Reynolds.
The control purpose of this work is to make all agents approach a uniform velocity and asymptotically converge to a fixed value of interagent distances, and collisions can be avoided among agents in the motion evolution.Namely, for all ,  ∈ , we require V  () − V  () → 0 and   () −   () →   , and here   ∈   is offset constants.In general, we want the final desired formation that satisfies equation  1 () =  2 () =  3 () = ⋅ ⋅ ⋅ =   ().In order to achieve this goal, the control input   is designed as follows: And consider the situation of the group with a virtual leader agent; the control input   in this case can be described as follows:
The (‖  ‖) where in ( 8) is nonnegative artificial potential function, which independent variables is the distance ‖  ‖ between agent  and agent ; here ‖  ‖ ∈ [0, ].It has the following properties: (i) the potential function (‖  ‖) achieves its unique minimum value when ‖  ‖ reaches a desired distance; (ii) if ‖  ‖ → 0 and ‖  ‖ → , the potential function We can know that no distance between agents will tend to 0 or  at all times, which implies that any two agents can attract each other and collisions can be avoided by constructing (‖  ‖).One example to meet the above features of artificial potential function is as follows: For the physical properties of the dynamic agent, we define the total energy of agent system as follows: It shows that  is the sum of the total potential energy and the total relative kinetic energy among agents.Define the initial energy  0 = ((0), V(0)); it is easy to see that  is a positive semidefinite function.
For the convenience of description, denote the velocity and position of the center of mass (COM) of all agents as follows [22]: Considering a group of  agents with dynamic motion (4) steered by protocol (8) in combination with the artificial potential function which we have put forward, the following conclusion can be got based on the above description.
Theorem 1. Assume that the initial energy  0 = ((0), V(0)) and the initial network (0) are finite and connected, respectively.Then, one has the main result: (i) for all  ≥ 0, the () will maintain connection; (ii) the velocity V of the COM remains the same for all  ≥ 0; (iii) all agents approach a uniform velocity V and asymptotically converge to the fixed value of interagent distances; (iv) collisions among agents can be avoided.
Proof.Part one of Theorem 1 is proved first.We can speculate that the topology of () is fixed at the time period [ −1 ,   ) under the assumption that () switches at time   ( = 1, 2, . . ., ).In view of initial energy  0 is finite, and we obtain the time derivative of energy equation () in [ 0 ,  1 ) as follows: One has •  () ≤ 0 in the time [ 0 ,  1 ) because of the fact that () is positive semidefinite [14], and it means that the following inequality is established at the time period According to the definition of the artificial potential function, it is easy to know () >  max ≥  0 .Therefore, all existing edge-distances will not tend to  in [ 0 ,  1 ) from the definition of artificial potential function, which implies that fragmentation of existing edges will be avoided at time  1 .Hence, the edge number of the interaction network must be increased.The potential energy, which comes from the new edges, is a limited value because of the effect of hysteresis.
Using a similar analysis method, we can obtain the time derivative of (), and the following equation exists in time period [ −1 ,   ): Based on this fact, the inequation is reasonable in [ −1 ,   ) ( = 1, 2, . . ., ) as follows: It is obvious that all existing edge-distances will not tend to  in [ −1 ,   ), which implies that fragmentation of existing edges will be avoided at time   .Therefore,  max ≥ (  ).According to the above analysis, we know that (0) is connected and no edge in (0) will be fragmented, and it proves that () maintains connection for all  ≥ 0.
In what follows, we will give the proof procedure of parts (ii) and (iii).
Let us consider that there are   edges being added to the dynamic network at   ; it is easy to know that From ( 9) and ( 15), we have Combined with ( 16), clearly,  max ≥ () for all time  ≥ 0. Hence, we can define the positive invariant set Ω that goes with above analysis.Consider the following: Here, .The inequality ‖  ‖ ≤ ( − 1) is reasonable for all agents  and  under the fact that () always maintains connection.From () ≤  max , we have V   V  ≤ 2 max or ‖V  ‖ ≤ √2 max , and it means that the positive invariant set Ω is compact.Note that network () is a fixed topology; combining with LaSalle's invariance principle [23], we know that the value of each solution lies in set Ω that tends to the range of the invariant set From ( 14), we can get It is easy to see that , which shows that all agents approach a uniform velocity V.
For given conditions   =   and (‖  ‖) = (‖  ‖) and the control input (8), we have This formula implies that part (ii) of Theorem 1 is established.
At the end of Section 3, we prove part (iv).According to the set Ω = {ŝ ∈   , V ∈   | (ŝ, V) ≤  max }, it is easy to know that  ≤  max for all  ≥ 0. Hence, we can deduce that lim ‖  ‖ → 0 (‖  ‖) = ∞ combines with the definition of artificial potential function.Thus, collisions between any two agents can be avoided.

With a Virtual
Leader.The situation of multiagent systems (4) with a virtual leader is considered in this subsection.The control input is governed by where V  denotes the velocity of the virtual leader agent and it is a constant vector.If  1 = 1, it means that agent  has the information of the virtual leader, and otherwise  1 = 0.The last item in the equation has the same role of the   in (7).We define the total energy of agent system as follows: It shows that  is the sum of the total interrelated kinetic energy and the total potential energy between the virtual leader and the agents of dynamic network, and it satisfies the feature of positive semidefinite function.In this work, we will choose the artificial potential function (‖  ‖) which satisfies the property defined in Section 2.
Similar to the analysis of flocking behavior without the virtual leader, considering a group of  agents with dynamic motion (4) steered by protocol (24) in combination with the artificial potential function which we have put forward, we can get the following conclusion.
Theorem 2. Assume that the initial energy  0 = ((0), V(0)) and the initial network (0) are finite and connected, respectively.Then, the following hold: (i) the () will maintain connection for all  ≥ 0; (ii) all agents approach a uniform velocity V  and asymptotically converge to the fixed value of interagent distances; (iii) collisions can be avoided between any agents; (iv) the velocity of the COM will exponentially converge to the desired velocity V  , and the group keeps on moving with the velocity V  all the following time.
Proof.Part one of Theorem 2 is proved first.
Assume that   =   −V   represents the position difference and Ṽ = V  − V  represents the velocity difference between agent  of the network and virtual leader.The kinetic equation of agent  is given by According to the definition of (‖  ‖), we have (‖  ‖) = (‖s  ‖); therefore, the control input (24) can be rewritten as follows: The energy equation ( 25) can be rewritten as follows: Referencing the proof of part (i) of Theorem 1, we obtain the time derivative of energy equation () at the time It is clear that () ≤ 0, which implied that the following inequality is existing in [ −1 ,   ), ( = 1, 2, . . ., ).Consider the following: Hence, all existing edge-distances will not tend to radius  in [ −1 ,   ), ( = 1, 2, . . ., ), which implies that fragmentation of existing edges will be avoided at time  1 ; thus (  ) ≤  max .We further understand that (0) is connected and no edge in (0) will be fragmentated, and it ensures that () maintains connection for all  ≥ 0.Then, we give the proof procedure of part (ii).We can get that the positive invariant set is where  [23]: Hence Ṽ1 = Ṽ2 = ⋅ ⋅ ⋅ = Ṽ = 0, and it means that which implies that all agents approach a uniform velocity V  .We now prove part (iii) of Theorem 2. According to the set Ω = {ŝ ∈   , V ∈   | (ŝ, V) ≤  max }, it is easy to know that  ≤  max for all  ≥ 0. However, we can deduce lim ‖  ‖ → 0 (‖  ‖) = ∞ from the definition of artificial potential function.Thus collisions will be avoided among agents.
At the end of this section, we will prove part (iv).We can get the following equation from the control protocol (24): We can get the solution of the equation which implies that the initial velocity of the COM will exponentially converge to the desired velocity V  .

Numerical Simulation
In this section, several numerical examples of the proposed control laws are presented to illustrate the rationality of the theoretical analysis.threshold dictating is  = 0.1, the difference between  and  is the threshold of add edges.The simulation results are shown as follows in the figures.The initial states of each agent are shown in Figure 1; the black lines represent existing neighboring relations between agent  and agent  at time , and the blue point and the solid lines with arrows represent the multiagent and the direction of velocity, respectively.Figure 2 shows the final states of the 10 agents with the control protocol (8), which showed that all agents eventually move in the same direction.The paths and final states of the agents' motion that evolve according to the control protocol (8) are captured in Figure 3, where the dotted line represents the path of each agent.Figures 4 and 5 describe the convergence process of the agents velocity over the -axis and the axis.It is clearly known that all agents approach a uniform velocity V.The convergence process of position over the axis and the -axis is demonstrated in Figures 6 and 7. We can know clearly that all agents asymptotically converge to the stabilization of interagent distances.

Flocking with a Virtual
Leader.This simulation is performed with a virtual leader and 10 agents moving in a twodimensional Euclidean space under the control protocol (24).The choice of initial positions and initial velocities of the 10 agents is the same with the simulation of the flocking without a virtual leader.The initial position and velocity of the virtual leader are chosen randomly.Here we set   = [10, 10]  and V  = [3, 3]  , respectively.The radius for interagent sensing and communication is  = 4 and we will perform the simulation with  = 0.1.The initial states of each agent are shown in Figure 8; the pink hexagons represent the virtual leader and its velocity vector is described as the solid lines with arrows.Figure 9 shows the final states of the 10 agents with the control protocol (24), which showed that all agents eventually move in the same direction of the virtual leader.The paths and final states of the agents' motion that evolve according to the control protocol (24) are captured in Figure 10.      the convergence process of the agents velocity over the -axis and the -axis, where the dotted line represents the path of the ten agents and the red solid line represents the virtual leader, which makes it clearly known that all agents approach the velocity V  of virtual leader and the group with the virtual leader keeps on moving at this velocity V  all the time.The convergence process of position over the -axis and the -axis is demonstrated in Figures 13 and 14.These figures are in close agreement with our theoretical predictions in Theorem 2.

Conclusion
In this paper, we have investigated the flocking and the coordinative control problems of mobile autonomous agents with preserved network connectivity and proposed the flocking algorithm with avoiding collision rules.This algorithm has proposed using hysteresis in adding new links and applying new potential function method to ensure that the network always stays connected and collisions between agents can be avoided.The extended application of the flocking algorithm with a virtual leader has been investigated.The simulation has proved that the laws can make all agents approach a common velocity vector and asymptotically converge to the fixed value of interagent distances and collisions between any agents can be avoided throughout the motion.The laws also satisfy the situation that there exists a virtual leader in the group of all agents, and it is proved that the value of desired velocity of the group is the same as that of the virtual leader.Future work means that there is no edge between agent  and agent  at time , then  = 0.If (((, )[ − ] = 0) ∩ ( −  ≤ ‖  () −   ()‖ < )) ∪ (‖  () −   ()‖ <  − ), scilicet that exist edge between agent  and agent  at time , then  = 1.

Figure 8 :Figure 9 :
Figure 8: Initial states with a virtual leader.

Figures 11 and 12
Figures 11 and 12  describe the convergence process of the agents velocity over the -axis and the -axis, where the dotted line represents the path of the ten agents and the red solid line represents the virtual leader, which makes it clearly known that all agents approach the velocity V  of virtual leader and the group with the virtual leader keeps on moving at this velocity V  all the time.The convergence process of position over the -axis and the -axis is demonstrated in Figures13 and 14.These figures are in close agreement with our theoretical predictions in Theorem 2.
Figures 11 and 12  describe the convergence process of the agents velocity over the -axis and the -axis, where the dotted line represents the path of the ten agents and the red solid line represents the virtual leader, which makes it clearly known that all agents approach the velocity V  of virtual leader and the group with the virtual leader keeps on moving at this velocity V  all the time.The convergence process of position over the -axis and the -axis is demonstrated in Figures13 and 14.These figures are in close agreement with our theoretical predictions in Theorem 2.
We have assumed that multiple mobile agents are moving in -dimensional Euclidean space; consider the fact that the agent can only sense other agents in its epsilon neighborhood because of the limited awareness of each agent.So we define   () = { | (, )[] = 1,  ̸ = ,  = 1, . . .} stand for the epsilon neighborhood of agent  at time .The control input (6) for agent  is governed by 3.1.Without a Virtual Leader.