Flocking for Multiple Subgroups of Multi-Agents With Different Social Distancing

In this paper, considering the difference in social distancing among individuals, according to the extent of social distancing, a group composed of $N$ mobile agents is divided into multiple different subgroups. Especially, from the perspective of differential game theory, the flocking problem of different subgroups can be regarded as collision avoidance between neighboring agents, or obstacle avoidance between agents and virtual static/dynamic obstacles. To explore the internal mechanism of this interesting problem, a novel flocking algorithm with multiple virtual leaders is designed. The proposed algorithm is a modified version of the traditional flocking and semi-flocking algorithms. Based on the Lyapunov stability theorem and LaSalle’s invariance principle, the stability analysis of the proposed algorithm is then proven. Furthermore, considering the complex environment that swarm robots or unmanned aerial vehicles (UAVs) may face when performing military missions such as surveillance, reconnaissance, and rescue, etc., we also investigate the flocking problem of multi-agents in both virtual static and dynamic obstacles environment. Finally, three kinds of simulation results are provided to demonstrate the effectiveness of the proposed results.


I. INTRODUCTION
Flocking (or collective behavior), a common phenomenon in nature, is characterized by self-organization, local interaction, and decentralization [1]- [3]. Examples of this phenom include such as fish schools, bird flocks, ant colonies, and bacteria swarms, etc. Due to its broad applications in fields such as multi-target tracking of mobile sensor networks [4]- [6], cooperative control of swarm robots [7]- [9], and coordinated motion of unmanned aerial vehicles [10]- [12], etc., the flocking of multi-agents has attracted a great deal of attention among researchers from different disciplines [13]- [24].
In 1986, Reynolds proposed three heuristic rules of the flocking: flock centering, collision avoidance, and velocity matching, and especially, he pioneered a computer model for simulating flocks of birds [13]. Since then, inspired by Reynolds' rules, theoretical investigations on the flocking of multi-agents have achieved fruitful outcomes. For example, in 1995, Vicsek et al. [14] provided a self-driven particle The associate editor coordinating the review of this manuscript and approving it for publication was Jianxiang Xi . model, also known as the Vicsek model, to investigate the flocking, transfer, and phase change of non-equilibrium systems. From the matrix theory (especially, the non-negative matrix theory), in 2003, Jadbabaie et al. [15] first proposed the mathematical proof of the Vicsek model, which greatly promoted the research on consistency and coordinated control for multi-agent systems. Soon after, Tanner [16] designed a decentralized control protocol to enable a group of vehicles to move as a flock, this protocol consists of a gradient-based term and velocity consensus term. Whereas Olfati-Saber suggested that navigational feedback should be added to determine the fragmentation of the initial states, thereby, Olfati-Saber provided a theoretical framework for the design and analysis of flocking for multi-agent systems [17]. However, since the flocking algorithm proposed in [17] requires substantial communication energy consumptions during the flocking process, it is impossible to apply this algorithm to engineering applications such as distributed sensing in mobile sensor networks. Considering that only partial agents can be informed of the virtual leader, Su et al. [18] reduced the communication energy consumption in Olfati-Saber's algorithm by adding a control indicator h i .
Recently, the following studies closely related to this paper have been published. Zhan and Li [19] presented a centralized flocking algorithm via the model predictive control based on global position-only measurements for the first time, and further developed this algorithm to a distributed mechanism. Since the laser range finder cannot identify obstacles and robots, Sakai et al. [20] designed a flocking algorithm in which all the detected targets are viewed as obstacles. Although numerical simulations and experimental results were provided to verify the effectiveness of this algorithm, some limitations remain. For instance, the calculation difficulties for a single robot greatly increases during the flocking process. This work will get over the limitation later. In 2015, Semnani and Basir [21], benefiting from the advantages of both the flocking [17] and anti-flocking algorithms [22], proposed a semi-flocking algorithm to achieve multi-target tracking in large-scale surveillance systems. After that, Yuan et al. [23] developed a fully distributed semi-flocking algorithm that only requires local information on states of the agents (or sensors). To promote sustainable prosumer management in smart grids, from the perspective of complex network, Cao et al. [24] proposed a partially visible multi-agent system to achieve collective behavior of the prosumers. Obviously, the prosumers also follow Reynolds' rules during the flocking process. However, most of the above researches assume that the agents have the same social distancing (or equilibrium distance) and sensing radius. In fact, as a society, social distancing will vary depending on different cultural backgrounds, environments, industries, and personalities, etc. From the perspective of psychology, social distancing can be divided into the following three categories: public distancing, personal distancing, and intimate distancing [25]. Indeed, the social distancing of any particular person will vary in special cases. For example, during the fight against COVID-19, social distancing for everyone has increased by more than 2-fold compared with that observed during the normal periods [26]. Therefore, it is of great theoretical and practical significance for the research on the flocking of multi-agents with different social distancing and sensing radii. Note that the social distancing is proportional to the sensing radius (refer to [17]). For brevity, we will mention only the different social distancing later.
In this paper, considering the difference in social distancing among individuals, based on the extent of social distancing, a group composed of N mobile agents can be divided into multiple different subgroups. Especially, one of things we are very interested in is the collision avoidance between different subgroups during the flocking process. To explore the internal mechanism of this interesting problem, a novel flocking algorithm with multiple virtual leaders is proposed. The proposed algorithm is a modified version of the flocking algorithm provided by Olfaiti-Saber [17] and the semi-flocking algorithm proposed in [21]. Similarly, this algorithm does not explicitly distinguish between neighboring agents and obstacles. However, different from the work of Sakai et al. [20], from the perspective of differential game theory, the agents can either be cooperative or non-cooperative in our algorithm [27]- [29]. Thus, the flocking problem of different subgroups can be regarded as collision avoidance between neighboring agents, or obstacle avoidance between agents and virtual static/dynamic obstacles (the virtual obstacles will be illustrated in Sections II and V). In this way, to some extent, the calculation difficulties for a single agent (or robot) can be reduced. Furthermore, considering the complex environment that swarm robots or unmanned aerial vehicles (UAVs) may face when performing military missions such as surveillance, reconnaissance, and rescue, etc., we also investigate the flocking problem of multi-agents in both virtual static and dynamic obstacles environment.
The outline of this paper is organized as follows. Section II introduces some preliminary knowledge about graph theory. A novel flocking algorithm with multiple virtual leaders is designed in Section III. In Section IV, based on the Lyapunov stability theorem and LaSalle's invariance principle, the stability analysis of the proposed algorithm is proven. Numerical simulations are presented in Section V to illustrate the effectiveness of the proposed algorithm and the theoretical results. Finally, the conclusion is described in Section VI.

II. PRELIMINARIES AND PROBLEM FORMULATION A. PRELIMINARIES OF GRAPH THEORY
Suppose that a group consists of N mobile agents. The interaction among these agents can be represented by a weighted undirected graph G = (V , E, A), where V = {1, 2, . . . , N } is a vertex set, E ⊆ {(i, j) : i, j ∈ V , j = i} is the edge set with vertexes of a junction, and the adjacency matrix A = [a ij ] of the undirected graph G is defined as a ij = 1, if (i, j) ∈ E, a ij = 0 otherwise. Note that the adjacency matrix A is symmetric (i.e., A T = A). The Laplacian matrix L = [l ij ] is a N ×N matrix, which is described by L = D−A, where the degree matrix D ∈ R N ×N is a diagonal matrix with diagonal

B. PROBLEM FORMULATION
Consider a group of N mobile agents moving in a twodimensional Euclidean space with double-integrator dynamics, which is defined as follows: where p i , v i ∈ R 2 are the position and velocity vector, respectively, of agent i, and u i ∈ R 2 is the control input (or control protocol). In this paper, we suppose that each agent is equal in size and mass, and has a limited sensing radius r (usually r > 0). Then, the neighboring set of agent i is described by where || · || is the Euclidean norm in R 2 , and each agent can acquire the information of its neighboring agents, as shown  in Figure 1. According to the α-lattice flocking (see Figure 2) proposed in [17], the desired geometry of flocking requests that the distances between neighboring agents are equal. In other words, the distances should satisfy the following constraints: where i = 1, 2, . . . , N , ∀j ∈ N i . d e > 0 represents the social distancing, and usually d e < r. Moreover, one γ −agent can be viewed as the virtual leader (or group objective) of the multi-agent system, which drives all agents to move towards the same target and asymptotically match the same velocity. We assume that there are K (1 ≤ K ≤ N ) virtual leaders, and each virtual leader abides by the following dynamics: where p γ k , v γ k , f γ k ∈ R 2 are the position, velocity, and control input, respectively, of the virtual leader γ k .
denotes the initial state vector pairs. In Section V, we suppose that the virtual leader always moves at a constant velocity p d along a fixed direction. Thus, the dynamic equation (4) is simplified as Besides, the main symbols of this paper are listed in Table 1. It is worth noting that this section does not explicitly distinguish between neighboring agents and obstacles. In [20], it was assumed that, for a robot, all the detected targets (including other robots) are viewed as obstacles. However, as a society, the interconnections between individuals are very complex, and impermanent. To obtain the maximum benefit, people may choose to cooperate or confront. With this in mind, in this paper, the agents can either be cooperative or non-cooperative. For example, from the perspective of differential game theory, when the agents i and j (i.e., j = 1, . . . , N , j = i) have the same target, they choose to cooperate, and then, the agent j is viewed as the neighbors of agent i. But when the targets of the agents i and j are different, they are non-cooperative. At the moment, for the agent i, the agent j is viewed as a virtual dynamic/static obstacle. Therefore, the flocking problem of different subgroups can be regarded as collision avoidance between neighboring agents, or obstacle avoidance between the agents and the virtual static/dynamic obstacles. This complex phenomenon is the main research interest in this work. Accordingly, in the next section, a novel flocking algorithm with multiple virtual leaders is proposed to explore the internal mechanism of collision avoidance between different subgroups of multi-agents.

III. FLOCKING CONTROL ALGORITHM WITH MULTIPLE VIRTUAL LEADERS
As mentioned above, a novel flocking algorithm with multiple virtual leaders is considered in this section. The proposed algorithm is a modified version of the typical flocking algorithm [17] and the semi-flocking algorithm [21]. In 2006, VOLUME 8, 2020 Olfati-Saber, inspired by Reynolds' rules, designed a typical flocking algorithm that has been extensively applied in fields such as mobile sensor networks and unmanned aircraft systems (UAS), etc. In [17], the control input u i for agent i is made up of three components where u g i , u d i are the gradient-based term and velocity consensus term, respectively, of the control input u i . u γ i is navigational feedback to enable each agent to successfully track its virtual leader, which is defined as.
where N γ k represents the number of the agents tracking the virtual leader γ k , and c 1 , c 2 > 0. Note that we are more focused on collision avoidance between different subgroups of multi-agents, rather than multi-target tracking of multi-agent systems. The semiflocking algorithm proposed in [21] is mainly divided into the following two parts: the target searching mode and the target tracking mode. Whereas, for convenience, we neglect the target searching mode in this paper. In other words, we assume that different groups can be informed of their own virtual leaders. For example, in Section V, based on the extent of social distancing, a group S, composed of N mobile agents, can be divided into the subgroups S 1 and S 2 . We assume that the number of the subgroup S 1 are M (1 < M < N ), but the agents i = M + 1, . . . , N for the subgroup S 2 . γ 1 and γ 2 are the virtual leaders of the subgroups S 1 and S 2 , respectively. Therefore, the navigational feedback u γ i is simplified as u Moreover, to the best of our knowledge, a major limitation of the artificial potential function proposed in [16]- [18] is the local minima that deviate from the globally optimal goal, which may lead to unexpected failure during the flocking process. To overcome this limitation, based on the Lennard-Jones potential function [30] and the self-organization process [31], a simpler pair-wise action function is designed to simplify the interaction protocols between neighboring agents. More specifically, the control input (5) is modified as where e ij = p j −p i √ 1+ε||p j −p i || 2 , ε ∈ (0, 1) is a value along the line connecting p i to p j , and a ij is the element of the adjacency matrix A in Section II. The pair-wise action function f α (x) is described by where k 1 is the coefficient of repulsion and k 2 is the coefficient of attraction. The pair-wise action function f α (x) can be shown in Figure 3 when the social distancing d e is 5. The plot shows that the action force between neighboring agents is a repulsion for a short range, but an attraction for a long range.
In particular, the pair-wise potential function F α (x) is defined as F α (x) = x d e f α (s)ds.

IV. STABILITY ANALYSIS
To analyze the collision avoidance capability and stability of the novel flocking algorithm with multiple virtual leaders, in this section, we first introduce a theorem related to the proposed algorithm. And then, prove this theorem by the Lyapunov stability theorem and LaSalle's invariance principle. Theorem 1: Consider a group of N mobile agents with double-integrator dynamics (1), and each agent is affected by the control input (7). Suppose that the initial positions and velocities of all agents are chosen at random with the Gaussian distribution. Then, the following statement holds: 1) Flocking of the agents with the same virtual leader is formed asymptotically.
2) The velocity of the agents with the same virtual leader asymptotically become consistent.

3) No collisions occur between any neighboring agents.
Proof: We first definep i = p i − p γ k ,ṽ i = v i − v γ k as the position error vector and velocity error vector, respectively. Accordingly, the error dynamics of agent i is given by And then, let p ij = p i − p j andp ij =p i −p j , clearly,p ij = p ij . Thus, the collective potential function V i in [17] can be rewritten asṼ In the same way, the control input (7) of agent i is modified as We choose an energy-like Lyapunov function as follows: where Thanks to the symmetry of the pair-wise potential function F α (x) and the adjacency matrix A, it follows that then 1 2 Consequently, where ⊗ is the Kronecker product notation, L denotes the Laplacian matrix in Section II, and I N γ k , I 2 are the identity matrices with corresponding dimensions. Because L and I N γ k are both positive semi-definite matrices, L + c 2 N γ k I N γ k is a positive semi-definite matrix as well. Hence,Q k (p,ṽ) ≤ 0, which means that Q k (p,ṽ) = Q k (t) is a non-increasing function over time t, and then Q k (t) ≤ Q k0  for all t ≥ 0. Note that Q k0 is the initial value of Q k (t). From Equations (12) and (13), we conclude that c 1p T ip i ≤ 2Q k0 for any agent i, which guarantees different α-lattice flocking of multiple subgroups with corresponding virtual leaders. Therefore, the part (i) is proven. Since Q k (t) > 0 andQ k (t) ≤ 0, we suppose that According to LaSalle's invariance principle, the trajectories of all agents starting from will converge to the largest set Tṽ . As mentioned above, it is clear that L ⊗ I 2 is also positive semi-definite. Therefore, we conclude thatQ k (p,ṽ) = 0 if and only ifṽ T (L ⊗ I 2 )ṽ = 0 andṽ Tṽ = 0, which is equivalent to v 1 ≡ · · · ≡ v N γ k ≡ v γ k . Thus, the part (ii) is proven.
At last, we prove the part (iii) by contradiction. Assume that there are at least two agents colliding during the flocking process, we then acquire which contradicts the condition Hence, this hypothesis is not valid, and then, the part (iii) is proven.

V. SIMULATION RESULTS
In this section, numerical simulations are presented to validate the effectiveness of the proposed algorithm. All simulations are performed on a platform with the following configurations: 2.20 GHz CPU, 8.00 GB RAM, Windows 10, and MATLAB R2016b. As mentioned in Section I, in real society, social distancing will vary depending on different cultural backgrounds, environments, industries, and personalities, etc. Considering the difference in social distancing among individuals, in this section, based on the extent of social distancing, a group S, composed of N = 60 mobile agents, can be divided into the subgroups S 1 and S 2 . The initial positions of all the agents are chosen at random with the Gaussian distribution, whereas the initial velocities are zero. The number of the subgroup S 1 is 20, whose social distancing is 5, whereas the number of the subgroup S 2 is 40, and its social distancing is 10. The initial position and initial velocity of the virtual leader γ 1 are set as p γ 1 (0) = [70, 0] T , and v γ 1 (0) = [0, 0] T , respectively, and marked with a red ''×''. The initial position and initial velocity of the virtual leader γ 2 are set as p γ 2 (0) = [0, 0] T , and v γ 2 (0) = [0.5, 0] T , respectively, and marked with a green ''O''. Other parameters of the proposed algorithm are given in Table 2, which remain unchanged throughout this paper. Figure 4 displays consecutive snapshots of the flocking for two subgroups of multi-agents with different social distancing applying the control input (7). From the perspective of differential game theory, when the virtual leader γ 2 asymptotically moves towards the virtual leader γ 1 , the subgroups S 1 and S 2 have the same target. Each agent only needs to consider the social distancing with its neighboring agents during the flocking process. From Figure 4(a) to Figure 4(c), there are increasing numbers of agents connected together, but at a certain distance (i.e., the social distancing). Then, the subgroups S 1 and S 2 form an irregular flocking (note that this is different from the traditional α-lattice flocking, in the next, we will explain the reason), as shown in Figure 4(c). Obviously, no collisions occurred. However, when the virtual leader γ 2 overtakes the virtual leader γ 1 , since the subgroup S 1 successfully tracks the virtual leader γ 1 , it no longer moves. At this time, for the subgroup S 2 , the subgroup S 1 is viewed as a virtual static obstacle represented by a translucent red ellipse (includes the following translucent green ellipse). From Figure 4(d) to Figure 4(f), it is shown that there are no collisions with the virtual static obstacle or other neighboring agents, and finally, forms two different α-lattice flocking. Flocking for three subgroups of multi-agents with different social distancing applying the control input (7) in 2-D. The red triangles belong to the subgroup S 1 , whose social distancing is 5. The green triangles represent the subgroup S 2 , whose social distancing is 10. Whereas the blue triangles denote the subgroup S 3 , and its social distancing is 15. The number of three subgroups is equal to 20, respectively. The red ''ĺw'' and green ''o'' denote the virtual leader, respectively, of the subgroup S 1 and S 2 , whereas the blue star represents the virtual leader of the subgroup S 3 . An undirected edge connecting two agents means that they are neighbors of each other. The velocities of multi-agents during the above simulation are further shown in Figure 5. The graph shows that the velocities in the x-axis direction and y-axis direction gradually converge to a constant set, respectively, when the subgroups S 1 and S 2 have the same target. Then, after the subgroup S 2 is regarded as a virtual static obstacle, the velocities begin to oscillate VOLUME 8, 2020 during the obstacle avoidance process, and finally, converge back to a constant set. Accordingly, the above phenomena are completely consistent with our predictions of Theorem 1 in Section IV.
From another perspective, Figure 4 can be regarded as a flocking problem of multi-agents in a virtual static obstacle environment. However, in practice, the obstacles are not only static, but also may be dynamic. Therefore, we next exchange the initial positions and dynamic equations of the subgroups S 1 and S 2 . In other words, the initial position and velocity of the virtual leader γ 1 are set as p γ 1 (0) = [0, 0] T , and v γ 1 (0) = [0.5, 0] T , respectively. The initial position and velocity of the virtual leader γ 2 are set as p γ 2 (0) = [70, 0] T , and v γ 2 (0) = [0, 0] T , respectively. The remaining parameters remain fixed. Figure 6 displays consecutive snapshots of the flocking of multi-agents in a virtual dynamic obstacle environment. From Figure 6(a) to Figure 6(c), we can find that its trajectory is similar to Figure 4, when the subgroups S 1 and S 2 have the same target. However, when the virtual leader γ 1 overtakes the virtual leader γ 2 , for the subgroup S 2 , the subgroup S 1 can be viewed as a virtual dynamic obstacle at the moment. From Figure 6(d) to Figure 6(f), it is clear that there are no collisions with the virtual dynamic obstacle or other neighboring agents. Similarly, Figure 7 reveals that the velocity consensus is achieved during the flocking process.
The above simulations demonstrate the effectiveness of the proposed algorithm in the flocking for two subgroups of multi-agents with collision avoidance capability. Note that the above simulations only apply to the case where the obstacle is dynamic or static, respectively. However, when swarm robots or unmanned aerial vehicles (UAVs) perform military missions such as surveillance, reconnaissance or rescue, and so on, the environment they face may be more complex. In other words, there are both static and dynamic obstacles. Therefore, we then divide the group S into the following three subgroups S 1 , S 2 and S 3 to help simulate the flocking of multi-agents in this complex environment.  as shown in Figure 8(f). Apparently, the graph shows that no collisions occurred during the whole flocking process. Moreover, Figure 9 indicates that the velocity consensus is also achieved, where the oscillation curves correspond to the collision avoidance process between different subgroups.
From the above simulations, we can find that the subgroup with large social distancing (e.g., the subgroup S 3 ) always actively avoids the subgroup with small social distancing (e.g., the subgroup S 1 or S 2 ), and especially, this is not related to the dynamic equation of the corresponding virtual leaders. In addition, it is worth noting that the formed flocking structure (i.e., Figure 4(c) and Figure 6(c)) is different from the traditional α-lattice structure, when different subgroups have the same target. What causes these phenomena? The pair-wise action function f α with different social distancing is shown in Figure 10. Suppose that the social distancing of agent i is d e , whereas the agent j has a larger social distancing (i.e., 2d e and 3d e ). The graph shows that, if p j − p i = d e ,  the action force f i α of agent i is zero, and then, it stays at rest. However, for the agent j, its action force f j α > 0, which is the repulsive force. Since the repulsive force, the agent j will gradually move away from the agent i until its action force is zero. Therefore, the irregular flocking is formed, as shown in Figure 4(c). Figure 10 reveals that social distancing d e plays a key role in the flocking of multi-agents. In other words, the subgroup with small social distancing has a stronger cohesive force than the other with the large one. Figure 11 shows the comparison of computational complexity with different flocking algorithms. As Figure 11 illustrates, the proposed algorithm demonstrates lower computational complexity than the other two algorithms, with respect to the number of agents. Therefore, we can conclude that the proposed algorithm is simple, yet effective for exploring the internal mechanism of collision avoidance between different subgroups of multi-agents.

VI. CONCLUSION
Most existing studies of flocking for multi-agent systems assumed that the agents have the same social distancing. However, as a society, social distancing will vary depending on different cultural backgrounds, environments, industries, and personalities, etc. Considering the difference in social distancing among individuals, in this paper, according to the extent of the social distancing, a group S, composed of N mobile agents, was divided into multiple different subgroups. Then, a novel flocking algorithm with multiple virtual leaders was proposed to research the flocking problem of multi-agents with different social distancing. The proposed algorithm is an improvement on the traditional flocking and semi-flocking algorithms. Especially, from the differential game theory, the flocking problem of different subgroups could be regarded as collision avoidance between neighboring agents, or obstacle avoidance between the agents and the virtual static/dynamic obstacles. Finally, numerical simulations demonstrated the effectiveness of the proposed algorithm and theoretical results. This work indicated that the social distancing plays a key role in the flocking of multi-agents, especially in multiple different subgroups of multi-agents.
As future works, we intend to consider the impact of individual heterogeneity on the flocking for multi-agent systems, rather than just being limited to different social distancing between individuals, and to explore how to apply the proposed algorithm to extremely large-scale datasets.