 Research
 Open Access
 Published:
Stability analysis of swarming model with time delays
Advances in Difference Equations volume 2021, Article number: 217 (2021)
Abstract
A swarming model is a model that describes the behavior of the social aggregation of a large group of animals or the community of humans. In this work, the swarming model that includes the shortrange repulsion and longrange attraction with the presence of time delay is investigated. Moreover, the convergence to a consensus representing dispersion and cohesion properties is proved by using the Lyapunov functional approach. Finally, numerical results are provided to demonstrate the effect of time delay on the motion of the group of agents.
1 Introduction
The study of the behavior of interacting agents in groups of animals has gained increasing interest in various fields such as biology, engineering, mathematics (see [2, 8, 12, 15, 20]). One fascinating feature of such systems is the collective behavior described as formation patterns and can be found in many natural systems such as flocks of birds, schools of fish, chemical compounds, crowd dynamics. From the biological point of view, pattern motion is the consequence of two natural behaviors. On the one hand, agents desire to communicate and stay close to the group. On the other hand, when they stay too close, they try to keep a distance to avoid collision with other agents. Hence, for understanding these behaviors, it is indispensable to take biological phenomena into account. The research on mathematical modeling and simulation of these systems is of increasing interest, starting with the works of Reynolds [19]. Reynolds’s model, called the threezone model, is the first principle model of swarming consisting of three fundamental characteristics of collective motion: cohesion, separation, and alignment rules. Further, this model has been extensively improved by adding many different effects and analyzed for different types of animals. For more details, see, e.g., [1, 3, 4, 10, 11, 14, 16]. In connection with these swarming models, it is essential to mention that the continuous models are developed through partial differential equations (PDEs) that describes the evolution of the particles’ density in the systems composed of a large number of interacting agents such as cell, molecular organism, or chemotaxis with high drift effect; see [13, 21].
In the present day, despite a large number of works devoted to studying the stability of the swarm, it is still of paramount interest how agents form the pattern configuration when they are faced with situations where a converging stable state cannot be ensured, especially in the presence of communication with time delay which is a result of traffic congestion or finite speeds of transmission and spread. The stability of swarming concerning time delays is investigated in various models. Firstly, a wellknown model is the Cucker–Smale flocking model, which describes agent’s motion based on its neighbor agents’ positions and velocities. The emergence of the flocking model described by the Cucker–Smale (CS) model with time delay was primarily investigated in [5, 6, 9, 17, 18]. In this model, time delays are included in the dynamic of velocities of agents. Besides, the model has been continuously extended by numerous researchers; for example, in [22] the authors consider the CS model by including a time delay in the communication function and velocities of agents, and the authors of [6] study the emergence of flocking where the interaction of agents is based on the CS communication function with a time delay and an attraction–repulsion force.
The contribution to this research effort is investigating the swarming model in which the interaction mechanism consists of attraction and repulsion functions which contain time delays. In particular, the first and secondorder models are studied. In the firstorder model, timedelays are included in the agents’ position, while in the secondorder model, agents adapt their velocity relative to other agents’ velocities with communication delay. Furthermore, based on these two models, the emergence of the swarm into the pattern formation is theoretically and numerically investigated. The stability of the swarm is related to parameters of the attraction and repulsion functions.
This work is organized as follows. In the next section, the first and secondorder swarm models with timedelay in the communication function are discussed. Additionally, in the firstorder model, the stability of the swarm is analyzed and supplemented with two numerical test cases. In the secondorder model, the dispersion and disagreement of the swarms that describe converging to pattern configuration are theoretically and numerically investigated. A conclusion in the last section completes the exposition of this work.
2 Swarm model and stability of swarm aggregation
In this section, we discuss the swarm model based on an agentbased model in an ndimensional Euclidean space proposed in [7] where the attraction–repulsion function includes a time delay. The evolution of swarming for the first and secondorder models is discussed, and then for both models, its stability properties are theoretically and numerically investigated.
2.1 The firstorder model
We consider the motion of N interacting individuals where their motion depends only on the position of an individual itself and its observation of other individuals’ positions. The equation of motion of the ith agent is given by
where \(x_{i}(t) \in \mathbb {R}^{d}\) represents the position of the ith agent and \(\nabla _{x_{i}}U(\x_{i}(t)x_{j}(t)\)\) denotes the gradient of U with respect to \(x_{i}\). Here \(\x_{i}(t)x_{j}(t)\\) is the Euclidean distance between the ith and jth agents. The function \(U:(\mathbb{R}^{d})^{N}\rightarrow \mathbb{R}\) represents the Morse potential function, which contains attractive and repulsive parts. The Morse potential has the following form:
where \(C_{r}e^{\frac{r}{l_{r}}}\) and \(C_{a}e^{\frac{r}{l_{a}}}\) model shortrange repulsion and longrange attraction, respectively. Parameters \(C_{r}\), \(C_{a}\) represent repulsive and attractive strengths, respectively, whereas \(l_{r}\), \(l_{a}\) are repulsive and attractive length scales. The derivative of the Morse potential is expressed as follows:
Next, we discuss the swarming system described in (1) with the effect of timedelays on repulsion and attraction. In this system, the time delay is a positive constant and is denoted as τ. Time delays model the situation that agents receive information from other members in the group after a certain time delay. As a consequence, each agent needs time to elaborate its reaction to other agents in the group. The swarming system (1) including the effect of time delay is presented as follows:
For simplicity, we define
and rewrite the derivative with respect to \(r_{ij}\) as
Therefore, the swarming system with time delay becomes
for \(i=1,\dots ,N\), with given initial data
In the following, we consider numerical simulations with the swarming system in the onedimensional case, \(d=1\), in two test cases: a system without time delay (\(\tau = 0\)) and a system with time delay \(\tau =3\). In both experiments, we consider three agents where the initial positions of agents are distributed randomly in \([1, 1]\) and the parameters related to the model are \(C_{a} = 5\), \(C_{r} = 3\), \(l_{a}= 4 \), and \(l_{r} = 1\). The results of numerical experiments are shown in Fig. 1. It can be seen in Figs. 1(a) and 1(b) that, due to the effect of the time delay, agents’ motion fluctuates during the early time; however, after a certain time, they start selforganizing and then become stationary.
2.2 Stability analysis for the firstorder model
In this subsection, theoretical results concerning the formation pattern of the swarm are investigated. We begin by introducing a free agent, a swarm member who does not have any neighbors in its repulsive range.
Definition 1
An agent i is called a “free agent” with respect to time delay if \(r_{ij}(t, \tau )>\delta \), \(\forall j=1, \dots , N\), \(j\neq i\), and δ is a repulsive range such that \(U'(r_{ij})>0\).
Theorem 1
Let \(R(s)=\sup_{i}\{\x_{i}(s)\\}\), for \(i=1, \ldots , N\) and \(s\in [t\tau ,t]\), be the swarming radius. If all members of the swarm are free agents with respect to some time delay, then their motion is towards the center.
Proof
Without loss of generality, we choose \(R=\x_{1}\\). Consider
where \(\lVert \cdot \rVert \) and \(\langle \cdot , \cdot \rangle \) denote the Euclidean norm and inner product, respectively. Since the first agent is free,
As a consequence, \(\langle x_{1}(t),x_{j}(t\tau )\rangle \x_{1}(t)\^{2}\leq 0\). It follows that \(\frac{d}{dt} (\frac{1}{2}\x_{1}(t)\^{2} )\leq 0\).
Therefore R is a decreasing function, that is, all agents move towards the center. □
In the following theorem, the stability of swarming corresponding to dispersion and cohesion properties are investigated. These properties are related to attraction and repulsion parameters (\(C_{a}\), \(C_{r}\), \(l_{a}\), \(l_{r}\)) in Morse potential function. We denote \(C=C_{r}/C_{a}\) and \(l=l_{r}/l_{a} \).
Theorem 2
(Dispersion and cohesion under Morse potential)

1.
For \(C\geq l>0\), the swarming radius becomes unbounded as \(t\rightarrow \infty \).

2.
For \(l\leq \min \{1,C\}\), the swarming radius is bounded.
Proof
Without loss of generality, we choose the swarming radius \(R=\x_{1}\\). We consider
Since \(R=\x_{1}\\), it follows that \(\x_{1}(t)\^{2}\langle x_{1}(t),x_{j}(t\tau )\rangle \geq 0\). For \(C\geq l>1\),
This yields that \(\frac{d}{dt} (\frac{1}{2}\x_{1}(t)\^{2} )\geq 0\). Therefore, the swarming radius becomes unbounded as \(t\rightarrow \infty \).
Further, we prove the second statement when \(l\leq \min \{1,C\}\). From
we know that \(\frac{\x_{1}(t)\^{2}\langle x_{1}(t),x_{j}(t\tau )\rangle }{r_{1j}} \geq 0\). Let us consider three cases.
Case I: If \(r_{1j}=\frac{l_{r}}{1l}\ln (\frac{C}{l} )\), then
We get that \(\frac{d}{dt} (\frac{1}{2}\x_{1}(t)\^{2} )=0\). Therefore, the swarming radius is normpreserving.
Case II: If \(r_{1j}=\frac{l_{r}}{1l}\ln (\frac{2C}{l} )> \frac{l_{r}}{1l}\ln (\frac{C}{l} )\), then
It follows that \(\frac{d}{dt} (\frac{1}{2}\x_{1}(t)\^{2} )<0\). Therefore, the swarming radius is decreased.
Case III: If \(r_{1j}=\frac{l_{r}}{1l}\ln (\frac{C}{2l} ) < \frac{l_{r}}{1l}\ln (\frac{C}{l} )\), then
that is, \(\frac{d}{dt} (\frac{1}{2}\x_{1}(t)\^{2} ) >0\). Hence, the swarming radius is increased. □
From the three cases discussed above, it can be concluded that if the distance between the first agent who has maximum swarming radius and the jth agent is equal to \(r_{1j}=\frac{l_{r}}{1l}\ln (\frac{C}{l} )\), then the swarming radius is bounded. On the other hand, if \(r_{1j}\) is greater than \(\frac{l_{r}}{1l}\ln (\frac{C}{l} )\), then the swarming radius is decreased to zero. While, if the distance between the first and jth agent is less than \(\frac{l_{r}}{1l}\ln (\frac{C}{l} )\), then swarming radius is increased. It shows that agents get far away from the center.
We present results of experiments to numerically verify Theorem 2.
It can be seen from Fig. 2 that for \(C\geq l>1\), when \(t\rightarrow \infty \), each agent moves far away from the origin, whereas Fig. 3 illustrates that for \(l\leq \min \{1,C\}\) the swarming radius is bounded.
2.3 The secondorder model
In this section, we focus on the swarming model which includes rules for orientation. In particular, this model contains a mechanism of selfpropulsion in which each agent moves with constant speed and adopts the average direction among its neighbors. The secondorder model is given by the following equations:
where \(x_{i} ,v_{i} \in \mathbb{R}^{d}\) are position and velocity of the ith agent, respectively. The term \((\alpha \beta \v_{i}(t)\^{2})v_{i}(t)\) models selfpropulsion and friction forces where parameters \(\alpha >0\) and \(\beta >0\) represent selfpropulsion and friction, respectively. The second term is the Morse potential function including interaction with a time delay.
In the following, we theoretically and numerically study the stability of the swarm described as converging to the pattern configuration. For investigation of pattern properties, we calculate dispersion \(X(t)\) and disagreement \(V(t)\) proposed in [17].
Definition 2
Let \(\mathbf {x}(t) =(x_{1}(t), \ldots , x_{N}(t))\) and \(\mathbf {v}(t)=(v_{1}(t), \dots , v_{N}(t))\) be the solution of the swarming model (7). We define dispersion and disagreement as
for \(i, j=1, \ldots , N\). We say that the solution \((\mathbf {x}(t), \mathbf {v}(t))\) tends to consensus if
Proposition 1
Let \((\mathbf {x}(t), \mathbf {v}(t))\) be the solution of system (7). If the solution \((\mathbf {x}(t), \mathbf {v}(t))\) converges to consensus, then
Proof
From the dynamical system (7), we consider \(\dot{v_{i}}(t)=0\), for \(i=1, \ldots , N\), that is,
We consider \((\alpha \beta \v_{i}(t)\^{2})v_{i}(t) =0 \) and assume that \(v_{i}(t) \neq 0\). Then it yields
Next, consider \(\frac{1}{N}\sum_{j\neq i}^{N}\nabla _{x_{i}}U(\x_{i}(t)x_{j}(t \tau )\) =0\), which can be written as
Since \((\frac{x_{i}(t)x_{j}(t\tau )}{r_{ij}} ) \neq 0\), we have \((\frac{C_{a}}{l_{a}}e^{\frac{r_{ij}}{l_{a}}} \frac{C_{r}}{l_{r}}e^{\frac{r_{ij}}{l_{r}}} ) =0 \).
Consequently, \(r_{ij} = \lVert x_{i}(t)x_{j}(t\tau )\rVert = \frac{l_{r}}{1l} \ln (\frac{C}{l})\). It can be concluded that when the system (7) tends to consensus, the velocity of each agent converges to value \(\sqrt{\frac{\alpha }{\beta }}\) and
□
In the sequel, we present results of numerical experiments to validate some aspects of theoretical findings and demonstrate the stability of swarms in two dimensions. For this purpose, we consider the following four testcases:
Case I: \(C_{a}>C_{r}\) and \(l_{a}>l_{r}\) (see Figs. 4–6).
In Case I, attraction parameters are stronger than those of repulsion. Hence, agents get closer to each other. As a consequence, the swarm is formed as a tight cluster, as showed in Fig. 4. In addition, it can be seen from Fig. 5 that \(X(t)\) and \(V(t)\) are periodical in amplitude and bounded by some value.
Case II: \(C_{a}>C_{r}\) and \(l_{a}< l_{r}\) (see Figs. 7–9).
Case III: \(C_{a}< C_{r}\) and \(l_{a}< l_{r} \) (see Figs. 10–12).
In Cases II and III, the repulsive length has a greater magnitude than the attractive one. It means that agents are repelled from others. It follows that the pattern configuration would not be formed, as shown in Figs. 8 and 11.
Case IV: \(C_{a}< C_{r}\) and \(l_{a}>l_{r}\) (see Figs. 13–15).
It can be seen from Figs. 14 and 15 that, when \(t\rightarrow \infty \), \(X(t)\) becomes constant and \(V(t)\) tends to zero. This means that the swarm converges to an asymptotic state. Pattern configuration is formed and each agent moves with the same velocity.
3 Conclusion
This work presented the emergence of swarm with delayed communication. First, the first and secondorder models of the swarm were described, where in the interaction function the time delay was taken into account. Further, the stability of the swarm was analyzed. For both models, agents’ movement to a stable state depended on the attraction–repulsion strengths and length scale in the Morse potential function. Finally, numerical results demonstrated the emergence of the swarm and referred that the swarm converges to an asymptotic state. Pattern configuration was formed, and each agent moved with the same velocity.
Availability of data and materials
Data sharing not applicable to this article as no datasets were generated or analyzed during the current study.
References
Borzi, A., Wongkaew, S.: Modeling and control through leadership of a refined flocking system. Math. Models Methods Appl. Sci. 25(2), 255–282 (2015)
Camazine, S., Deneubourg, J.L., Franks, N.R., Sneyd, J., Bonabeau, E., Theraula, G.: SelfOrganization in Biological Systems. Princeton University Press, Princeton (2003)
Caponigro, M., Fornasier, M., Piccoli, B., Trélat, E.: Sparse stabilization and control of alignment models. Math. Models Methods Appl. Sci. 25(3), 521–564 (2015)
Carrillo, J.A., Huang, Y., Martin, S.: Nonlinear stability of flock solutions in secondorder swarming models. Nonlinear Anal., Real World Appl. 17, 332–343 (2014)
Choi, Y.P., Haskovec, J.: Cucker–Smale model with normalized communication weights and time delay. arXiv preprint (2016). arXiv:1608.06747
Choi, Y.P., Li, Z.: Emergent behavior of Cucker–Smale flocking particles with heterogeneous time delays. Appl. Math. Lett. 86, 49–56 (2018)
Chuang, Y.L., Huang, Y.R., D’Orsogna, M.R., Bertozzi, A.L.: Multivehicle flocking: scalability of cooperative control algorithms using pairwise potentials. In: Proceedings 2007 IEEE International Conference on Robotics and Automation, pp. 2292–2299. IEEE Press, New York (2007)
Couzin, I.D., Krause, J., James, R., Ruxton, G.D., Franks, N.R.: Collective memory and spatial sorting in animal groups. J. Theor. Biol. 218(1), 1–12 (2002)
Erban, R., Haskovec, J., Sun, Y.: A Cucker–Smale model with noise and delay. SIAM J. Appl. Math. 76(4), 1535–1557 (2016)
Gazi, V., Passino, K.M.: Stability analysis of social foraging swarms: combined effects of attractant/repellent profiles. In: Proceedings of the 41st IEEE Conference on Decision and Control, vol. 3, pp. 2848–2853. IEEE Press, New York (2002)
Gazi, V., Passino, K.M.: A class of attractions/repulsion functions for stable swarm aggregations. Int. J. Control 77(18), 1567–1579 (2004)
Levine, H., Rappel, W.J., Cohen, I.: Selforganization in systems of selfpropelled particles. Phys. Rev. E 63(1), 017101 (2000)
Li, T., Pintus, N., Viglialoro, G.: Properties of solutions to porous medium problems with different sources and boundary conditions. Z. Angew. Math. Phys. 70(3), 1–18 (2019)
Maria, R., Orsogna, D., Chuang, Y.L., Bertozzi, A.L., Chayes, L.S.: Selfpropelled particles with softcore interactions: patterns, stability, and collapse. Phys. Rev. Lett. 96(10), 104302 (2006)
Mogilner, A., EdelsteinKeshet, L., Bent, L., Spiros, A.: Mutual interactions, potentials, and individual distance in a social aggregation. J. Math. Biol. 47(4), 353–389 (2003)
Pareschi, L., Toscani, G., Tosin, A., Zanella, M.: Hydrodynamic models of preference formation in multiagent societies. J. Nonlinear Sci. 29(6), 2761–2796 (2019)
Pignotti, C., Reche Vallejo, I.: Flocking estimates for the Cucker–Smale model with time lag and hierarchical leadership. J. Math. Anal. Appl. 464(2), 1313–1332 (2018)
Pignotti, C., Trélat, E.: Convergence to consensus of the general finitedimensional Cucker–Smale model with timevarying delays. arXiv preprint (2017). arXiv:1707.05020
Reynolds, C.W.: Flocks, herds and schools: a distributed behavioral model. In: Proceedings of the 14th Annual Conference on Computer Graphics and Interactive Techniques, pp. 25–34 (1987)
Vicsek, T., Czirók, A., BenJacob, E., Cohen, I., Shochet, O.: Novel type of phase transition in a system of selfdriven particles. Phys. Rev. Lett. 75(6), 1226 (1995)
Viglialoro, G., Woolley, T.E.: Solvability of a Keller–Segel system with signaldependent sensitivity and essentially sublinear production. Appl. Anal. 99(14), 2507–2525 (2020)
Yang, Z., Zhang, Q., Jiang, Z., Chen, Z.: Flocking of multiagents with time delay. Int. J. Syst. Sci. 43(11), 2125–2134 (2012)
Acknowledgements
This research is supported by Department of Mathematics, Faculty of Science, Chiang Mai University. The authors would like to thank the anonymous reviewers for their constructive criticism and suggestions.
Funding
Not applicable.
Author information
Authors and Affiliations
Contributions
All authors contributed equally in writing of this manuscript. All authors read and approved the final manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare that they have no competing interests.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Himakalasa, A., Wongkaew, S. Stability analysis of swarming model with time delays. Adv Differ Equ 2021, 217 (2021). https://doi.org/10.1186/s13662021033799
Received:
Accepted:
Published:
DOI: https://doi.org/10.1186/s13662021033799
Keywords
 Swarming model
 Consensus
 Stability
 Differential equations with time delay