Introduction

Only a small percentage (approximately 5%) of individuals within a bee swarm have the capability to lead the entire group to a new nest [1]. Inspired by this, some scholars have proposed the pinning control method [2, 3]. Pinning control refers to the technique of controlling the motion of some of the individuals, called pinning agents, in a flocking system to guide the collective behavior toward a desired state. Pinning control offers the advantage of providing a simple and effective method to achieve group coordination and maintain coherence, even in the presence of disturbances or external forces that could disrupt the motion of the flock. This characteristic has significant practical application value for unmanned aerial vehicle swarms and other multi-robot systems. Strategic selection and behavioral control of the pinning agents allow steering the entire flock toward a desired destination or formation while preserving emergent properties, such as robustness, adaptability, and scalability. This makes pinning control a valuable tool for designing and controlling collective behavior in various applications, such as robotics, swarming drones, and social networks.

In practical engineering systems, due to limitations in communication, only a few nodes, or even a single pinning node in extreme cases, may be utilized. Additionally, there are surveys, such as [4] and [5], that review pinning control and pinning synchronization on complex dynamical networks, while [6] focuses on pinning-based consensus and flocking control of mobile multi-agent networked systems.

The selection of the optimal pinning node is a critical research topic that remains unsolved. Several scholars [7,8,9,10,11] have conducted studies on identifying the minimum set of control input nodes to ensure structural controllability of the system. YY Liu introduced the “minimum input theorem” [12], which provides a criterion for determining if a set of driving nodes can ensure system controllability on directed graphs. However, the problem of selecting the minimum set of pinning nodes remains NP-hard [7, 9, 10]. There is no direct solution of the best or the minimal pinning node set [11].

For the problem of second-order multi-agent flocking control, Olfati-saber [13] proposed the basic framework of the flocking control, and constructed the flocking control algorithm with leader, without leader and in the obstacle environment, respectively. Olfati-saber’s method assumed that the location and speed information of the virtual leader was available to all members, which was obviously not practical in the actual practice. Subsequent work in this field has proved that when only a small number of nodes are informed of the status of the virtual leader, flocking control can also be achieved. Thus, achieving flocking control in a multi-agent system can be accomplished using only a small number of pinning nodes [14]. This allows uninformed members to be guided by the informed members, thereby reducing communication costs for the agents. Pinning control is a kind of flocking control with virtual leader, which can achieve multi-agent synchronization as well as allows the community to evolve toward the given control goal. While Su demonstrated that a subset of nodes can inform the status of the virtual leader, no method or rules for selecting the pinning nodes were provided [14].

In this paper, we focus on optimal pinning node selecting problem for flocking control. The stability and collision-free nature of the multi-agent system during flocking motion are demonstrated using the Lyapunov method and our control strategy. The influence of the dynamic performance of the system by adding a pinning node is analyzed. It provides a theoretical basis for selecting the optimal control node.

The main contributions of this paper are as follows:

We propose a simple pinning node selection strategy for optimal synchronizability convergence of second-order multi-agent flocking. We employ eigenvalue perturbation theory to estimate the range of change in the smallest eigenvalue after adding a pinning node. The convergence of the system primarily depends on the smallest non-zero eigenvalue of the dynamic matrix. Therefore, the pinning node that has the greatest impact is selected to accelerate convergence.

The paper is structured as follows: The section “Related work” provides a brief overview of related work on pinning node selection strategies. The section “Dynamic model and mathematical preliminary” introduces the model depiction and relevant mathematical preliminaries. In the section “Control protocol design and analysis”, the control protocol is proposed. In the section “Selection method of pinning node”, the optimization index of topology uniformity and the effect of pinning node are analyzed. Some results are proposed which give us useful insight into the problem of pinning controls. In the section “Simulation”, some numerical examples of second-order multi-agent systems’ flocking are simulated to illustrate effectiveness of the proposed approach. Finally, the main ideas and conclusions are summarized in the section “Conclusion”.

Related work

Analysis method based on the smallest non-zero eigenvalue of extended Laplacian matrix

The Laplacian matrix's spectrum includes information about the graph's structural properties, such as its connectivity (represented by inequalities) and the number of spanning trees (represented by identities). Specifically, the smallest non-zero eigenvalue \(\lambda_{2}\) of the Laplacian matrix directly indicates the robustness of graph connectivity and even affects the convergence of multi-agent distributed cooperative control [15]. When pinning control signals are injected, the Laplacian matrix will be extended with the pinning nodes. We call the new matrix as “extended Laplacian matrix”. The value of the smallest eigenvalue \(\lambda_{1}\) of an extended Laplacian matrix increases, as well as the pinning controllability improves.

Therefore, the initial research aimed to determine the optimal placement of pinning nodes for maximizing the smallest eigenvalue of the extended Laplacian matrix. Amani [11] propose a centrality measurement method based on the sensitivity analysis of the Laplacian matrix to obtain the approximate solution of the optimal set. As merely one eigenvalue decomposition calculation on the Laplacian matrix is required, the computational efficiency is very high. However, this method needs the global knowledge on the network topology to construct the Laplacian matrix. To avoid the need of global knowledge on the network topology, the decentralized estimation algorithm is employed. Kempton et al. [16] propose a decentralized strategy through which each node can estimate the algebraic connectivity \(\lambda_{2}\), or the eigenratio \(r = {{\lambda_{n} } \mathord{\left/ {\vphantom {{\lambda_{n} } {\lambda_{1} }}} \right. \kern-0pt} {\lambda_{1} }}\). Inspired by the work of Kempton et al. [16], Di Meglio et al. [17] propose a fully decentralized approach used for pinning control to tune the control gains.

For large-scale networks, another evaluation method of node importance is to remove a single node. Removing a node from a complex network can be modeled as deleting the relevant rows and columns of the Laplacian matrix, as well as reducing the number of diagonal entries that represent other nodes connected to this node. Therefore, the effect of removing node \(k\) is approximated by removing row.\(k\) and column.\(k\) of Laplacian matrix. Amani et al. [18] proposed a spectral based measure of centrality to evaluate and rank the importance of nodes in pinning control and introduced a measurement method to rank nodes according to the influence of the network synchronization by the removed nodes from the network [19]. Watanabe and Masuda [20] proposed a perturbation strategy node deletion method to increase the spectral gap of the graph (i.e., the minimum eigenvalue of the second Laplacian matrix) by deleting nodes in a certain order to enhance the consistency and convergence performance of the network. Some studies [21,22,23] have even pointed out that the failure or loss of some key nodes can lead to network paralysis or the loss of control ability.

Numerous studies have focused on exploring the relationship between the system synchronization index and the matrix spectrum. For instance, Estrada et al. [24] introduced a measure of sub-graph centrality that is based on the spectrum of the adjacency matrix. Additionally, Saber Jafarizadeh [25] proposed ρ-synchronizability, which integrates weighted coupling configurations with topological considerations.

Analysis method based on directed graph

In the case of directed graph (digraph), the relationship between system stabilization and the pinned nodes has been well researched. The approach used for directed graphs (digraphs) can, in principle, also be applied to bi-directed graphs (bigraphs) while replacing strongly connected components with connected components.

Lu et al. [26] find that the smallest real part of eigenvalues of the Laplacian sub-matrix corresponding to the unpinned nodes can be used to measure the sterilizability of a digraph with a given pinned node set. The lower bound estimation of the sterilizability depends on two factors: the connection degrees of the pinned vertices, and the shortest paths from the pinned vertex set to the unpinned node set. Inspired by the work of Gao et al. [27] on controllability of large networks, DeLellis et al. [28] transformed the partial pinning control problem into an integer linear program (ILP). An optimization problem is formulated and solved to select the pinning and coupling gains. Bingquan Chen, Jinde Cao et al. [29, 30] also investigate the pinning asymptotic stabilization of Probabilistic Boolean Networks (PBNs) by a digraph approach. A necessary and sufficient condition is given to verify the feasibility of a set of pinned nodes based on an auxiliary digraph.

Pinning nodes selection based on centrality measures

Various centrality measures characterizing the structural characteristics of the complex network [31, 32] can be used as an enlightening basis for the selection of pinning nodes, such as degree centrality, correlation degree, betweenness centrality, connectivity centrality, proximity centrality, eigenvector centrality, swarming coefficient, and bridgeness of edges [33].

One of the main tasks of the pinning node is to transfer the information of the virtual leader to other nodes. Gao et al. [33] proposed the use of degree central nodes of connected subnets as pinning nodes. Maksim et al. [34] proposed to use the important index obtained by k-shell decomposition to measure the propagation performance of nodes in the network. Some important improvements based on this method include mixing degree decomposition [35], k-shell decomposition based on the gravity point of view [36], and so on. Sanchez et al. used recurrent high-order neural networks to identify system parameters [37]. Kong and Sun [38] investigated the synchronization problem of complex dynamical networks on time scales, but the problem how to determine the number of pinned nodes is still unsolved.

The advantage of this kind method is there are many mature complex networks centrality analysis tools available to utilize, but the centrality is not always the best choice, when combined with some specific network dynamics. Sometimes, the network may have a large number of nodes with the same centrality degree. How to deal with these problems is not solved.

Additionally, a challenge arises from the inability to establish direct proof of the controllability and performance of the system [12]. Jafarizadeh et al. [25] have illustrated that several proposed structural parameters, including betweenness centrality, do not exhibit a direct correspondence with the optimal measure of synchronizability.

For further insights, several papers [39,40,41] have reviewed the impact of various network structural parameters on network synchronization.

Dynamic model and mathematical preliminary

Multiagent dynamic model

Considering that \(N\) agents work in \(n\) dimensional Euclidean spaces, their dynamics equations can be written as

$$ \left\{ {\begin{array}{*{20}l} {{\dot{\mathbf{q}}}_{i} (t) = {\mathbf{p}}_{i} (t)} \hfill \\ {{\dot{\mathbf{p}}}_{i} (t) = {\mathbf{u}}_{i} (t)} \hfill \\ \end{array} } \right.\quad i = {1,}...{,}N, $$
(1)

where \({\mathbf{q}}_{i} (t),{\mathbf{p}}_{i} (t),{\mathbf{u}}_{i} (t) \in {\mathbb{R}}^{n}\) are the position vector, velocity vector, and acceleration vector of the agent \(i\), and \(t \in \left[ {0,} \right.\left. { + \infty } \right)\) [42].

An undirected graph \({\mathbf{G}}(t)\) composed of multiple agents at time \(t\) consists of nodes and edges, where the set of nodes is represented by \({\mathbf{V}} = \{ 1, \ldots N\}\). Let \(r > 0\) be the perceived radius of the agents, \(|| \cdot ||_{2}\) is the \(l^{2}\)-norm, or is called Euclidean norm, so that the neighborhood of agent \(i\) at time \(t\) is defined as.

The set of edges at time \(t\) is represented by

$$ {\mathbf{E}}(t) = \left\{ {(i,j) \in V \times V|j \in {\mathcal{N}}_{i} (t)} \right\}. $$
(2)

To avoid collision between agents, the agents need to keep a distance greater than the safe distance \(r_{s}\) while no more than the perceived radius \(r\), so we should set the expected distance \(d\) between two agents to be between \(r_{s}\) and \(r\)

$$ ||{\mathbf{q}}_{i} (t)-{\mathbf{q}}_{j} (t)||_{2} \,=\, d,\left( {i,j} \right) \in {\mathbf{E}}(t),r_{s} < d < r. $$
(3)

However, due to the interaction of attraction and repulsion between agents, it may be difficult to reach the ideal \(\alpha {\text{-lattices}}\) system [13] and eventually evolve into \(\alpha {\text{-lattices}}\)-like system with error \(\delta\) as (Fig. 1).

$$ {-}\delta { + }d \le {||}{\mathbf{q}}_{i} (t){-}{\mathbf{q}}_{j} (t){||}_{2} \le \delta + d,(i,j) \in {\mathbf{E}}(t). $$
(4)
Fig. 1
figure 1

a α-Lattice system; b α-lattices-like system

Matrix properties

Multiagent network can be represented by Laplacian matrix. The Laplacian matrix \({\mathbf{L}}\left( t \right)\) is defined as

$$\begin{aligned} {\mathbf{L}}\left( t \right) &= \left[ {L_{ij} \left( t \right)} \right]_{N \times N} {\text{, where }}L_{ii} \left( t \right) \\ & = \sum\limits_{j = 1,i \ne j}^{N} {a_{ij} } \left( t \right),L_{ij} \left( t \right) =-a_{ij} \left( t \right), \end{aligned}$$
(5)

where only if \(j \in {\mathcal{N}}_{i} \left( t \right)\), \(a_{ij} \left( t \right) = 1\); otherwise, \(a_{ij} \left( t \right) = 0\).

Kronecker tensor product \(\otimes\): If \({\mathbf{A}}\) is an m-by-n matrix and \({\mathbf{B}}\) is a p-by-q matrix, then the Kronecker tensor product of \({\mathbf{A}}\) and \({\mathbf{B}}\) is a large matrix formed by multiplying \({\mathbf{B}}\) by each element of \({\mathbf{A}}\)

$$ {\mathbf{A}} \otimes {\mathbf{B}} = \left[ {\begin{array}{*{20}l} {a_{11} {\mathbf{B}}} &\quad {a_{12} {\mathbf{B}}} &\quad \cdots &\quad {a_{1n} {\mathbf{B}}} \\ {a_{21} {\mathbf{B}}} &\quad {a_{22} {\mathbf{B}}} &\quad \ldots &\quad {a_{2n} {\mathbf{B}}} \\ \vdots &\quad \vdots &\quad \ddots &\quad \vdots \\ {a_{m1} {\mathbf{B}}} &\quad {a_{m2} {\mathbf{B}}} &\quad \cdots &\quad {a_{mn} {\mathbf{B}}} \\ \end{array} } \right]. $$
(6)

For any column vector \({\mathbf{z}}\), \({\mathbf{L}}\) satisfies the following sum of squares:

$$ {\mathbf{z}}^{T} \left( {{\mathbf{L}} \otimes {\mathbf{I}}_{m} } \right){\mathbf{z}} = \frac{1}{2}\sum\limits_{{j \in {\mathcal{N}}_{i} }} {a_{ij} \left( {z_{j}-z_{i} } \right)^{2} } . $$
(7)

Then, define the following matrices:

\({\mathbf{Z}}_{N \times N} = \Big\{ {\mathbf{A}} = (a_{ij} ) \, \in {\mathbb{R}}_{N \times N} :a_{ij} \le 0\begin{array}{*{20}c} {} \\ \end{array} if\begin{array}{*{20}c} {} \\ \end{array} i \ne j(i,j = 1,...,N) \Big\}\) denote the set of real square \(N \times N\) matrices whose off-diagonal elements are all nonpositive.

A nonsingular matrix \({\mathbf{A}}\) is called M matrix [43] if \({\mathbf{A}}\) ∈ \({\mathbf{Z}}_{N \times N}\) and all the eigenvalues of \({\mathbf{A}}\) have positive real parts.

Lemma 1

\({\mathbf{L}}\) is the Laplacian matrix of a connected graph and \({\mathbf{B}}\) is the non-all-zero diagonal matrix. \({\mathbf{B}} = diag\left( {b_{1} ,b_{{2}} , \cdots ,b_{N} } \right)\), and N is the number of agents. \(b_{i} = 1\), or 0. Let \({\mathbf{C}} = {\mathbf{L}} + {\mathbf{B}}\), then \({\mathbf{C}}\) is both positive definite matrix and M matrix.

Proof

Because \({\mathbf{L}},{\mathbf{B}}\) are positive semidefinite matrices, for any non-zero column vector \({\mathbf{x}},{\mathbf{y}}\)

$$ {\mathbf{x}}^{T} {\mathbf{Lx}} \ge 0,{\mathbf{y}}^{T} {\mathbf{By}} \ge 0, $$
(8)

then for any non-zero column vector \({\mathbf{u}}\)

$$ {\mathbf{u}}^{T} \left( {{\mathbf{L}} + {\mathbf{B}}} \right){\mathbf{u}} \ge 0, $$
(9)

then \({\mathbf{C}} = {\mathbf{L}} + {\mathbf{B}}\) is a positive semidefinite matrix.

Given that \({\mathbf{C}}\) is a positive semidefinite matrix, it can be proved by contradiction that \({\mathbf{C}}\) is a positive matrix.

If \({\mathbf{C}}\) is not a positive matrix, then there exists some non-zero column vector \({\mathbf{z}} \ne {\mathbf{0}}\), so that \({\mathbf{z}}^{T} {\mathbf{Cz}} = 0\). Also, because \({\mathbf{L}}\) is Laplacian matrix of a connected graph.

If and only if \({\mathbf{z}} = k\left[ {\begin{array}{*{20}c} {1} \\ {1} \\ \vdots \\ {1} \\ \end{array} } \right]\), \({\mathbf{z}}^{T} {\mathbf{Lz}}{ = }0\), while \({\mathbf{B}} = diag\left( {b_{1} ,b_{{2}} , \dots ,b_{N} } \right)\), we have

$$ {\mathbf{z}}^{T} {\mathbf{Bz}} = k^{2} \sum\limits_{i = 1}^{n} {b_{i} \ne 0} , $$
(10)

which contradicts the assumption.

Therefore, the conclusion has been proved that \({\mathbf{C}}\) is a positive definite matrix.

We can get that \({\mathbf{C}}\),\({\mathbf{C}}^{-1}\) are positive definite matrices, then \({\mathbf{C}},{\mathbf{C}}^{-1} \in\)\({\mathbf{M}}_{N}\).

Control protocol design and analysis

Controller design

Assume in time \(t\) control input is

$$ {\mathbf{u}}_{i} \left( t \right) = {\mathbf{f}}_{i}^{\alpha } \left( t \right) + h_{i} \left( t \right){\mathbf{f}}_{i}^{\gamma } \left( t \right). $$
(11)

\({\mathbf{f}}_{i}^{\alpha } \left( t \right)\) is used to control the separation, alignment, and aggregation rules of flocking motion. Different from literature [13], to facilitate analysis and calculation, the original potential force function is rewritten as

$$ \begin{aligned} {\mathbf{f}}_{i}^{\alpha } \left( t \right) &= c_{1}^{\alpha } \sum\limits_{{j \in {\mathcal{N}}_{i} \left( t \right)}} {a_{ij} \left( {\left( {{\mathbf{q}}_{j} \left( t \right)-{\mathbf{q}}_{i} \left( t \right)} \right)-{\mathbf{r}}\left( {{\mathbf{q}}_{j} \left( t \right)-{\mathbf{q}}_{i} \left( t \right)} \right)} \right)} \\ & \qquad + c_{2}^{\alpha } \sum\limits_{{j \in {\mathcal{N}}_{i} \left( t \right)}} {a_{ij} \left( {{\mathbf{p}}_{j} \left( t \right)-{\mathbf{p}}_{i} \left( t \right)} \right)} , \\ \end{aligned} $$
(12)

where \(c_{1}^{\alpha }\) and \(c_{2}^{\alpha }\) are the positive coefficients. \({\mathbf{r}}\left( {{\mathbf{q}}_{j} \left( t \right)-{\mathbf{q}}_{i} \left( t \right)} \right) = sign\left( {{\mathbf{q}}_{j} (t)-{\mathbf{q}}_{i} (t)} \right) \cdot k_{d}\), we call \({\mathbf{r}}\) the desired distance control term, \(k_{d} = k \cdot d\), \(k\) is the positive scale factor, and \(d\) is the expected distance. We define the sign function as \(sign({\mathbf{x}}) = \left\{ {\begin{array}{*{20}c} {\frac{{\mathbf{x}}}{{\left\| {\mathbf{x}} \right\|_{2} }},} & {{\mathbf{x}} \ne {\mathbf{0}}} \\ {0,} & {{\mathbf{x}} = {\mathbf{0}}} \\ \end{array} } \right.\), \({\mathbf{x}} \in {\mathbb{R}}^{n}\) and \({\mathbf{0}} = \left[ {\begin{array}{*{20}c} 0 & 0 & \cdots & 0 \\ \end{array} } \right]^{T}\).

Remark 1

When the expected distance is \(d = 0\), Eq. (12) degenerates from the flocking problem to the second-order consensus problem.

\({\mathbf{f}}_{i}^{\gamma } \left( t \right)\) receives the information of virtual leader, and the mathematical expression is

$$ {\mathbf{f}}_{i}^{\gamma } \left( t \right) = c_{1}^{\gamma } \left( {{\mathbf{q}}_{\gamma } \left( t \right)-{\mathbf{q}}_{i} \left( t \right)} \right) + c_{2}^{\gamma } \left( {{\mathbf{p}}_{\gamma } \left( t \right)-{\mathbf{p}}_{i} \left( t \right)} \right), $$
(13)

where \({\mathbf{p}}_{\gamma } \in {\mathbb{R}}^{n}\) is the velocity vector of the virtual leader at time \(t\), and \(c_{1}^{\gamma }\) and \(c_{2}^{\gamma }\) are the positive coefficients. \(h_{i} \left( t \right)\) is the parameter related to the pinning node selection, and the mathematical expression of \(h_{i} \left( t \right)\) at time \(t\) is

$$ h_{i} \left( t \right) = \left\{ {\begin{array}{*{20}l} {{\text{1, node }}i{\text{ is pinning node}}} \hfill \\ {{\text{0, node }}i{\text{ is NOT pinning node}}} \hfill \\ \end{array} } \right.. $$
(14)

The set of all agent nodes is \({\mathbf{V}}\). Take the non-empty subset of \({\mathbf{V}}\) as \({\mathbf{V}}_{b} \subset {\mathbf{V}}\). In different literature, \({\mathbf{V}}_{b}\) has different names, such as control node, driving node [12, 44], pinning node [45, 46], and leaders [13]. The remaining nodes \({\mathbf{V}}\backslash {\mathbf{V}}_{b}\) are called follower.\(h_{i} \left( t \right)\) depending on time means that the set of pinning nodes varies with time. The set \({\mathbf{V}}_{b}\) is constant with respect to time if and only if all the \(h_{i}\) do not depend on time.

Define the pinning matrix

$$ {\mathbf{H}}(t) = diag\left( {h_{1} (t),h_{{2}} (t), \cdots ,h_{N} (t)} \right), $$
(15)

N is the number of agents.

Define an augmented Laplacian matrix

$$ {\mathbf{A}}(t) = {\mathbf{L}}(t) + k{\mathbf{H}}(t). $$
(16)

Assumption 1

The initial status of the undirected graph \({\mathbf{G}}\left( 0 \right)\) is connected.

Assumption 2

The initial state has no collisions.

Theorem 1

Considering the equation of motion as shown in formula (1), and the control input as shown in formula (11), then take any one or more nodes as the pinning node and there are following conclusions:

  1. 1.

    The relative positions of all agents eventually approach to lattices (following the proof of Theorem 1 in [14]).

  2. 2.

    The speeds of all agents tend to virtual leader speed \({\mathbf{p}}_{\gamma } \left( t \right)\) (following the proof of Theorem 1 in [14]).

  3. 3.

    The pinning node’s position tends to the virtual leader position \({\mathbf{q}}_{\gamma } \left( t \right)\) (an extension of the conclusion of literature [47]).

Remark 2

If the initial state is not connected and divided into \(k\) subnets, then each subnet needs at least one pinning point, the same conclusion can be obtained.

Proof

Due to the switching of the pinning node and the interaction relationship between agents, the \({\mathbf{A}}(t)\) switching. Let \({\text{T}} = \left\{ {t_{1} ,t_{2} , \ldots t_{n} , \ldots } \right\}\) denotes the \({\mathbf{A}}(t)\) switching time set. The \({\mathbf{A}}(t)\) changes at time \(t_{n} \in {\text{T}}\), while the \({\mathbf{L}}(t)\) and \({\mathbf{H}}(t)\) are unchanged constants in the time interval \(\left[ {t_{n} ,t_{n + 1} } \right)\). The similar conclusion is proved in [47] that the defined total energy function is discontinuous at each switching time, but is a non-increasing differential function in each time interval \(\left[ {t_{n} ,t_{n + 1} } \right)\).

Let the tracking error between agent and virtual leader is \({\tilde{\mathbf{q}}}_{i} \left( t \right) = {\mathbf{q}}_{i} \left( t \right)-{\mathbf{q}}_{\gamma } \left( t \right)\), \({\tilde{\mathbf{p}}}_{i} \left( t \right) = {\mathbf{p}}_{i} \left( t \right)-{\mathbf{p}}_{\gamma } \left( t \right).\)

The position between agents is \({\mathbf{q}}_{ij} \left( t \right) = {\mathbf{q}}_{i} \left( t \right)-{\mathbf{q}}_{j} \left( t \right).\)

In each time interval \(t \in \left[ {t_{n} ,t_{n + 1} } \right),\) defining the total energy of the multi-agent \(Q\left( t \right)\) which is composed of the potential energy and the kinetic energy

$$ Q\left( t \right) = \frac{1}{2}\sum\limits_{i = 1}^{N} {\left( {U_{i} \left( {{\tilde{\mathbf{q}}}_{i} \left( t \right)} \right) + h_{i} c_{1}^{\gamma } {\tilde{\mathbf{q}}}_{i}^{T} \left( t \right){\tilde{\mathbf{q}}}_{i} \left( t \right) + {\tilde{\mathbf{p}}}_{i} \left( t \right)^{T} {\tilde{\mathbf{p}}}_{i} \left( t \right)} \right)} . $$
(17)

The potential energy function [14] is defined as follows:

$$ U_{i} \left( {{\tilde{\mathbf{q}}}_{i} \left( t \right)} \right) = \sum\limits_{{j \in {\mathcal{N}}_{i} \left( t \right)}}^{{}} {\Phi_{i} } \left( {{\tilde{\mathbf{q}}}_{ij} \left( t \right)} \right), $$
(18)
$$ \Phi_{i} \left( {{\tilde{\mathbf{q}}}_{ij} \left( t \right)} \right) = \Phi_{i} \left( {{\mathbf{q}}_{ij} \left( t \right)} \right) = {\mathbf{q}}_{ij} \left( t \right)^{T} {\mathbf{q}}_{ij} \left( t \right) + 2k_{d} \left\| {{\mathbf{q}}_{ij} \left( t \right)} \right\|_{2} > 0,\quad {\mathbf{q}}_{ij} \ne {\mathbf{0}}. $$
(19)

\(\Phi_{i} \left( {{\mathbf{q}}_{ij} } \right)\) is continuous and differentiable almost everywhere except \({\mathbf{q}}_{ij} = {\mathbf{0}}\). If there is no overlap between agents at the start time 0, \({\mathbf{q}}_{ij} \left( 0 \right) \ne {\mathbf{0}}\). Following the proof of Theorem 1 in [14], the \({\mathbf{q}}_{ij} \left( t \right) \ne {\mathbf{0}}\) will hold for all the \(t > 0\). Therefore, the unique singularity can be ignored.

And there is

$$ \nabla_{{{\mathbf{q}}_{ij} }} \Phi_{i} \left( {{\mathbf{q}}_{ij} } \right) = 2{\mathbf{q}}_{ij} + 2k_{d} \frac{{{\mathbf{q}}_{ij} }}{{\left\| {{\mathbf{q}}_{ij} } \right\|_{2} }}. $$
(20)

The energy equation can be rewritten as

$$\begin{aligned} Q\left( t \right) &= \frac{1}{2}\sum\limits_{i = 1}^{N} {\left( {U_{i} \left( t \right) + {\tilde{\mathbf{p}}}_{i} \left( t \right)^{T} {\tilde{\mathbf{p}}}_{i} \left( t \right)} \right)} \\ & = \frac{1}{2}\sum\limits_{i = 1}^{N} {\left( {\sum\limits_{{j \in {\mathcal{N}}_{i} \left( t \right)}}^{{}} {\Phi_{i} } \left( t \right) + h_{i} c_{1}^{\gamma } {\tilde{\mathbf{q}}}_{i}^{{}} \left( t \right)^{T} {\tilde{\mathbf{q}}}_{i} \left( t \right) + {\tilde{\mathbf{p}}}_{i} \left( t \right)^{T} {\tilde{\mathbf{p}}}_{i} \left( t \right)} \right)} . \end{aligned}$$
(21)

The derivative of \(Q\left( t \right)\) is

$$ \begin{gathered} \dot{Q}\left( t \right) = \sum\limits_{i = 1}^{N} {\left( {\sum\limits_{{j \in {\mathcal{N}}_{i} \left( t \right)}}^{{}} {\frac{1}{2}{\tilde{\mathbf{p}}}_{i} \left( t \right)^{T} \nabla_{{{\mathbf{q}}_{ij} }} \Phi_{i} \left( {{\mathbf{q}}_{ij} \left( t \right)} \right)} + h_{i} c_{1} {\tilde{\mathbf{p}}}_{i} \left( t \right)^{T} {\tilde{\mathbf{q}}}_{i} \left( t \right) + {\tilde{\mathbf{p}}}_{i} \left( t \right)^{T} {\mathbf{u}}_{i} \left( t \right)} \right)} \\ = \sum\limits_{i = 1}^{N} {\left( {{\tilde{\mathbf{p}}}_{i} \left( t \right)^{T} c_{2}^{\alpha } \sum\limits_{{j \in {\mathcal{N}}_{i} \left( t \right)}} {a_{ij} \left( {{\tilde{\mathbf{p}}}_{j} \left( t \right)-{\tilde{\mathbf{p}}}_{i} \left( t \right)} \right)}-h_{i} c_{2}^{\gamma } {\tilde{\mathbf{p}}}_{i} \left( t \right)^{T} {\tilde{\mathbf{p}}}_{i} \left( t \right)} \right)} \\ =-c_{2}^{\alpha } {\tilde{\mathbf{p}}}\left( t \right)^{T} \left( {{\mathbf{L}} \otimes {\mathbf{I}}_{n} } \right){\tilde{\mathbf{p}}}\left( t \right)-c_{2}^{\gamma } \sum\limits_{i = 1}^{N} {h_{i} {\tilde{\mathbf{p}}}_{i} \left( t \right)^{T} {\tilde{\mathbf{p}}}_{i} \left( t \right)} \\ =-{\tilde{\mathbf{p}}}\left( t \right)^{T} \left( {\left( {c_{2}^{\alpha } {\mathbf{L}} + c_{2}^{\gamma } {\mathbf{H}}} \right) \otimes {\mathbf{I}}_{n} } \right){\tilde{\mathbf{p}}}\left( t \right) < 0. \\ \end{gathered} $$
(22)

\({\tilde{\mathbf{p}}}_{{}} \left( t \right) = \left[ {\begin{array}{*{20}c} {{\tilde{\mathbf{p}}}_{i} \left( t \right)} & {{\tilde{\mathbf{p}}}_{2} \left( t \right)} & \cdots & {{\tilde{\mathbf{p}}}_{N} \left( t \right)} \\ \end{array} } \right]\)\(\in {\mathbb{R}}_{n \times N}\). \({\mathbf{L}}\) is the Laplacian matrix and also a semidefinite matrix. \({\mathbf{H}} = diag[h_{1} \dots h_{N} ]\) is a semidefinite definite matrix. \({\mathbf{L}}\) and \({\mathbf{H}}\) are constant matrixes in each time interval \(t \in \left[ {t_{n} ,t_{n + 1} } \right)\). From lemma 1 \(c_{2}^{\alpha } {\mathbf{L}} + c_{2}^{\gamma } {\mathbf{H}}\) is a positive matrix. Then \(\left( {\left( {c_{2}^{\alpha } {\mathbf{L}} + c_{2}^{\gamma } {\mathbf{H}}} \right) \otimes {\mathbf{I}}_{n} } \right)\) is a positive matrix. Therefore, at time \(t \in \left[ {t_{n} ,t_{n + 1} } \right)\),\(\dot{Q} < 0\).

Denote \(t_{n}\) as the switching time and \(t_{n}^{-}\) as the time before switching. The total energy function \(Q\left( {t_{n}^{-} } \right)\) may not be equal to \(Q\left( {t_{n} } \right)\) for the emergence of the type II uninformed agents as paper [14]. After a finite time \(T_{f}\), no more type II uninformed agents will emerge and the total energy of the system will continue to decay [47]

$$ Q(t) < Q_{0} < Q_{\max } . $$
(23)

The relative positions of all agents eventually approach to lattices. From the definition of the potential function \(U(q)\), \(\sum\nolimits_{i = 1}^{N} {U_{i} ({||}r{||}_{\alpha } ) \le Q(0) \le } Q_{\max }\), at time \(t\), the distance between two adjacent nodes that are neighbors should be less than \(r\), that is, the existing edge in the network will not break. Assuming that after \(\Delta t\) time, m new edges are added into the network, then

$$ Q(t + \Delta t) = Q_{0} + mU(||r-\varepsilon ||_{\alpha } ) < Q_{\max } . $$
(24)

This indicates that over time, the existing edges in the system will have no possibility of disconnection, while the initial network \(G\left( 0 \right)\) is connected, so the system will always remain connected.

Next, we need to answer the following two questions [44]:


Question 1: Will the controllability be achieved by choosing a set of nodes? This is a problem of controllability.


Question 2: How to select a minimum number of nodes collection, and make the system controllable? That is the problem of minimum set.

The first question could be solved by analyzing the spectrum of the Laplacian matrix with structural characteristics of the graph, in particular \(\lambda_{2}\). Its size directly reflects the convergence of graph connectivity, robustness, and even multi-agent distributed collaborative control [15]. With pinning control, the Laplacian matrix \({\mathbf{L}}\) is further transformed into the augmented Laplacian matrix \({\mathbf{A}}\), as shown in (16). By estimating the approximate range of the eigenvalues of \({\mathbf{A}}\) and the variation trend of the eigenvalues caused by the pinning control, we can preliminarily obtain the convergence effect of pinning control on the system.

Theorem 2

The minimum non-zero eigenvalue \(\lambda_{m}\) of the augmented Laplacian matrix \({\mathbf{A}}\) can be increased by either adding a pinning node or increasing one of the pinning gains. The proof is shown in reference [48].

Remark 3

Cheng et al. [48] present a network control strategy based on left Perron vector, but it requires iterative calculation of eigenvalues and eigenvectors of \({\mathbf{L}} + k{\mathbf{H}}\). It is difficult to solve the eigenvalues in practical engineering due to the large amount of computation. The method of eigenvalue perturbation can be used to approximate the optimal pinning point.

Remark 4

With regard to the first-order consistency problem, when no pinning control is applied, since the minimum eigenvalue of Laplacian is 0, the final result of convergence in multi-agent equilibrium is not necessarily 0, depending upon the average value of the initial state of multi-agent [49], and the second minimum eigenvalue dominates the convergence rate of consistency. When pinning control is applied, as the minimum eigenvalue of the system is non- zero, the equilibrium state finally converges to the state of the pinning point.

Selection method of pining node

Synchronization index

To analyze the effect on the system by changing \({\mathbf{H}}\), suppose a pinning control (15) is applied at time \(t_{p}\). Define the pinning matrix with parameter \(\beta\)

$$ {\mathbf{H}}(\beta ) = diag\left( {\beta_{1} ,\beta_{{2}} , \dots ,\beta_{N} } \right) $$
(25)
$$ {\text{ subject to }}\sum\limits_{j = i}^{N} {\beta_{j} } = N_{p} \quad {\text{ and }}\quad \beta_{j} = \{ 0,1\} $$

\(N_{p}\) is the total number of pinning nodes to be applied. We assume \(\left\{ {\begin{array}{*{20}c} {N_{p} = 0,} & {t < t_{p} } \\ {N_{p} = 1,} & {t \ge t_{p} } \\ \end{array} } \right.\).

One common Synchronizability Index \(\overline{R}\left( \beta \right)\) at time \(t_{p}\) is defined in [50]

$$ \overline{R}\left( \beta \right) = \frac{{\lambda_{N} \left( \beta \right)}}{{\lambda_{2} \left( \beta \right)}}, $$
(26)

\(\overline{R}\left( \beta \right)\) is the ratio of the eigenvalues of the augmented Laplacian matrix \({\mathbf{A}}\left( {\beta ,t_{p} } \right)\). \(\lambda_{N} \left( \beta \right)\) is the maximum eigenvalue. \(\lambda_{2}\)\(\left( \beta \right)\) is the second smallest eigenvalue. The smaller the eigenvalue ratio \(\overline{R}\left( \beta \right)\) is, the better the network synchronization performance will be.

However, when the connection between multi-agent systems is not completely connected, it leads to \(\lambda_{2} = 0\) and \(\overline{R}\) nonsense.

Therefore, we define a new Synchronizability Index \(R\left( \beta \right)\)

$$ R\left( \beta \right) = \frac{{\lambda_{m} \left( \beta \right)}}{{\lambda_{N} \left( \beta \right)}}, $$
(27)

where \(\lambda_{m} \left( \beta \right)\) and \(\lambda_{N} \left( \beta \right)\) are the minimum non-zero eigenvalue and the maximum eigenvalue of the augmented Laplacian matrix \({\mathbf{A}}\left( {\beta ,t_{p} } \right)\). It only requires the solution of two eigenvalues of matrix, which is easy to calculate [11].

Remark 5

Conclusion from Master Stability Function analysis [51]. With the stability functions for synchronized coupled systems, the spread of augmented Laplacian eigenvalues can be used as a synchronizability index. Therefore, a simple measure for the spread of eigenvalues is the ratio of the largest to the smallest [52, 53].

Remark 6

The synchronization index of augmented Laplacian matrix is an important index to represent the synchronization of the network. The smaller the synchronization index is, the better the synchronization performance of the network will be.

Remark 7

The larger the synchronization index is, the closer the ratio of the maximum eigenvalue of augmented Laplacian matrix to the subminimum eigenvalue is to 1, which indicates that all the eigenvalues of augmented Laplacian matrix are almost equal.

Remark 8

The synchronization index reflects the uniformity of network topology connection, and for the \(\alpha {\text{-lattices}}\) system, the synchronization index also reflects the uniformity of agent in spatial distribution.

Perturbation analysis

\(R\) can be used as an indicator of the convergence rate of a network control system [54]. The node which causes \(R\) to change more when selected as pinning node also has the stronger effect on the system convergence. Further, when we put pinning control on a node, the change of \(R\) caused by that is expressed as

$$ \Delta R = \frac{{\lambda_{N} \Delta \lambda_{m}-\lambda_{m} \Delta \lambda_{N} }}{{\lambda_{N}^{2} }}. $$
(28)

It is worth noting that since \(\lambda_{N}\) is much larger than \(\lambda_{m}\) in the initial phase, \(\Delta R\) is much more affected by \(\Delta \lambda_{m}^{{}}\) than by \(\Delta \lambda_{N}^{{}}\). Therefore, when adding a pinning node, if the effect on \(\Delta \lambda_{m}^{{}}\) is greater, the effect on \(\Delta R\) will generally be greater.

From the eigenvalue perturbation theory [55], changes of the eigenvalue \(\lambda_{n}\) caused by perturbation of the parameter \(p\) are [18]

$$ \frac{{d\lambda_{n} }}{dp} = {\mathbf{y}}_{n}^{T} \frac{{d{\mathbf{L}}(p)}}{dp}{\mathbf{x}}_{n} ,\quad n = 1,2, \ldots ,N, $$
(29)

where \(p\) reflects the node position. \({\mathbf{y}}_{n}^{T}\) and \({\mathbf{x}}_{n}\) are the normalized left and right eigenvectors of \({\mathbf{L}}\), respectively, and \({\mathbf{y}}_{n}^{T} {\mathbf{x}}_{n} = 1\).

When the pinning control is applied, the matrix \({\mathbf{L}}\) will be transformed to the matrix \({\overline{\mathbf{L}}}\), and \({\overline{\mathbf{L}}} = {\mathbf{L}}-k{\mathbf{H}}\). Therefore, the minimum eigenvalue of the new matrix \({\overline{\mathbf{L}}}\) is \(\overline{\lambda }_{1} > 0\) according to the previous analysis.

Since \({\mathbf{H}}\) is a diagonal matrix, only the diagonal element \(l_{ii}\) of \({\mathbf{L}}\) are affected, so the perturbation of \(R\) caused by pinning node is approximate to

$$ \frac{dR}{{dl_{ii} }} = \frac{{\left( {y_{1}^{i} x_{1}^{i} } \right)\lambda_{N}-\left( {y_{N}^{i} x_{N}^{i} } \right)\lambda_{1} }}{{\left( {\lambda_{N} } \right)^{2} }}, $$
(30)

where \(i\) represents the ith element of the vector. Since the minimum eigenvalue of \({\mathbf{L}}\) is \(\lambda_{1} = 0\), the corresponding eigenvector is \({\mathbf{x}}_{1} = \frac{1}{\sqrt N }{\mathbf{1}}_{N}\).

For an undirected graph with \({\mathbf{y}}_{n}^{{}} = {\mathbf{x}}_{n}^{{}}\), it can be written as.

$$ \frac{dR}{{dl_{ii} }} = \frac{1}{{\lambda_{N} }}\left( {\frac{1}{\sqrt N }-R\left( {x_{N}^{i} } \right)^{2} } \right). $$
(31)

To analyze the extreme value of (31), define Controllability Centrality [56] \(\Psi (i)\) as

$$ \Psi (i) = \left( {x_{N}^{i} } \right)^{2} ,\quad i = 1,2, \ldots ,N. $$
(32)

It shows that perturbation in the node i with maximum value of \(\left( {x_{N}^{i} } \right)^{2}\) will cause the highest variation in \(R\).

Because \(\frac{{d\lambda_{k} }}{{dl_{ii} }} =-\left( {{\mathbf{x}}_{N}^{i} } \right)^{2}\) and the minimum eigenvalue of \({\mathbf{L}}\) is \(\lambda_{1} = 0\), the corresponding eigenvector is \({\mathbf{x}}_{1} = \frac{1}{\sqrt N }{\mathbf{1}}_{N}\).

We define the max \(\Psi (i)\) as \({\text{max-}}\Psi\). For \(\sum\nolimits_{i = 1}^{N} {\left( {x_{N}^{i} } \right)^{2} = 1}\), so

$$ {\text{max-}}\Psi > \frac{1}{\sqrt N }. $$
(33)

We can select the pinning node i according to \({\text{max-}}\Psi\) to exert maximum control effect.

Remark 9

We assume that the perturbation \(k_{1}\) > 0 caused by the pinning control gain is consistent on all diagonal elements of matrix \({\mathbf{L}}\). Therefore, we will get the theoretical optimal result of the theory, when the perturbations are much smaller than the diagonal terms of the original Laplacian matrix \({\mathbf{L}}\), namely, the perturbation is far more less than the minimum degree of the network. For larger disturbance or small degree, the precision of the perturbation method may decrease.

The selection process is shown in Fig. 2.

  1. 1.

    First, according to whether the neighbor nodes are within the perception range, the adjacency matrix A is determined.

  2. 2.

    Use matrix A to create a graph and compute the Laplacian matrix L of the graph.

  3. 3.

    Calculate the eigenvalues and corresponding eigenvectors of matrix L.

  4. 4.

    Sort all the eigenvalues of matrix L in ascending order.

  5. 5.

    Obtain the eigenvector x corresponding to the non-zero minimum eigenvalue of matrix L.

  6. 6.

    The pinning node i with maximum value of \(\left( {x_{N}^{i} } \right)^{2}\) is selected, namely,\({\text{max-}}\Psi\)(max-Psi) node.

Fig. 2
figure 2

Pinning node selection flowchart

Simulation

In this section, the motion of multi-agent in two-dimensional space is studied. Assuming there are N agents, the velocity vector and position vector of each agent i are denoted as \({\mathbf{v}}_{i} (t)\) and \({\mathbf{p}}_{i} (t)\), respectively, while the velocity vector and position vector of the leader are denoted as \({\mathbf{v}}_{{{\text{leader}}}} (t)\) and \({\mathbf{p}}_{{{\text{leader}}}} (t)\), respectively. We first define the corresponding evaluation metrics.


1. Uniformity index of agents’ spatial distribution

The uniformity index of agents’ spatial distribution is used to describe the degree of evenness in the spatial distribution of the agents. In practical applications, the evenness of agent spatial distribution has a significant impact on task efficiency and safety, so evaluating and optimizing it are important. The uniformity index can be calculated by computing the degree of scattering of the agents in space. Specifically, we perform Delaunay triangulation of agents, calculate the squared differences in all connection lengths, and plot the triangulation graph.


2. Leader velocity tracking error

$$ {\text{V}}_{{{\text{err}}}} (t) = \frac{1}{N}\sum\limits_{i = 1}^{N} {\left\| {\left( {{\mathbf{v}}_{i} (t)-{\mathbf{v}}_{{{\text{leader}}}} (t)} \right)} \right\|} . $$
(34)

Leader Velocity Tracking Error is calculated by computing the velocity difference between all agents and the leader.


3. Speed consistency

$$ \Phi (t) = \left\| {\frac{1}{N}\sum\limits_{i} {\frac{{{\mathbf{v}}_{i} (t)}}{{\left\| {{\mathbf{v}}_{i} (t)} \right\|_{2} }}} } \right\|_{2} . $$
(35)

Speed consistency is calculated by computing the difference in velocity direction between all agents. The value ranges from 0 to 1, with a higher value indicating greater consistency in velocity among the agents. When speed consistency is 1, it means that all agents have the same velocity.


4. Minimum distance between agents

The minimum distance between agents. To facilitate the detection of collisions between agents, we calculate the minimum distance between every pair of agents in real time. If the minimum distance is not zero, or is greater than a certain threshold, it is considered that no collision has occurred.

Three sets of simulations are conducted to compare four different selection strategies of pinning node. The four selection strategies are: \({\text{max-}}\Psi\), \({\text{min-}}\Psi\), degree centrality maximization (max degree), and degree centrality minimization (min degree).

Simulation is conducted under two different agent quantities N = 100 and N = 50, to compare the control effects with varying numbers of agents. Moreover, when the number of agents N = 50, we conducted two sets of experiments with different pinning control gains. The first set used the same pinning control gain as N = 100, while the second set increased the gain of \(c_{1}^{\gamma }\) and \(c_{2}^{\gamma }\) of (14) by 2.5 times. The purpose is to observe the impact of pinning node selection strategy on system performance under different leader control gains.

Let the perception radius of the agent r = 80, and the repulsion distance radius d = 20. The virtual leader's initial position is \((25,25)\), and the speed is constant \((0.5,0.5)\). The simulation results of 100 agents are shown in Figs. 3, 4, 5, 6, 7, 8, 9, 10. The simulation results of 50 agents with the same leader gain as that of 100 agents are shown in Figs. 11, 12, 13, 14, 15, 16, 17, 18. The simulation results of 50 agents with the leader gain increased by 2.5 times are shown in Figs. 19, 20, 21, 22, 23, 24, 25, 26. To show the position changes of the agents, the initial positions of the agents are displayed, with the red arrow indicating the agents' velocity and the virtual leader indicated by a star, as shown in Figs. 3, 11, and 19. The final positions of the agents after the simulation are displayed in Figs. 4, 12, and 20. The trajectories of the agents during the simulation are shown in Figs. 5, 13, and 21. To examine the evenness of the agents' distribution in the environment, the uniformity index of spatial distribution of the agents is defined, as shown in Figs. 6, 14, and 22, to demonstrate its control effectiveness. The leader velocity tracking error of the agents are shown in Figs. 7, 15 and 23, which measures how well the agents are following the velocity of the leader. The speed consistency of the agent are shown in Figs. 8, 16 and 24, which measures how consistent the speeds of the agents are with each other. The curve of R, the synchronizability index of the agents are shown in Figs. 9, 17 and 25.

Fig. 3
figure 3

The initial status of agents (N = 100)

Fig. 4
figure 4

The final status of agents (N = 100)

Fig. 5
figure 5

The trajectory of intelligent agents (N = 100)

Fig. 6
figure 6

Uniformity index of agents’ spatial distribution (N = 100)

Fig. 7
figure 7

Leader velocity tracking error of agents (N = 100)

Fig. 8
figure 8

Speed consistency of agents (N = 100)

Fig. 9
figure 9

Curves of synchronizability index of agents (N = 100)

Fig. 10
figure 10

The minimum distance between agents (N = 100)

Fig. 11
figure 11

The initial status of agents (N = 50)

Fig. 12
figure 12

The final status of agents (N = 50)

Fig. 13
figure 13

The trajectory of intelligent agents (N = 50)

Fig. 14
figure 14

Uniformity index of agents’ spatial distribution (N = 50)

Fig. 15
figure 15

Leader velocity tracking error of agents (N = 50)

Fig. 16
figure 16

Speed consistency of agents (N = 50)

Fig. 17
figure 17

Curves of synchronizability index of agents (N = 50)

Fig. 18
figure 18

The minimum distance between agents (N = 50)

Fig. 19
figure 19

The initial status of agents (N = 50, gain = 2.5)

Fig. 20
figure 20

The final status of agents (N = 50, gain = 2.5)

Fig. 21
figure 21

The trajectory of intelligent agents (N = 50, gain = 2.5)

Fig. 22
figure 22

Uniformity index of agents’ spatial distribution (N = 50, gain = 2.5)

Fig. 23
figure 23

Leader velocity tracking error of agents (N = 50, gain = 2.5)

Fig. 24
figure 24

Speed consistency of agents (N = 50, gain = 2.5)

Fig. 25
figure 25

Curves of synchronizability index of agents (N = 50, gain = 2.5)

Fig. 26
figure 26

The minimum distance between agents (N = 50, gain = 2.5)

The minimum distance between the agents during the simulation are shown in Figs. 10, 18 and 26, which is important for detecting collisions and ensuring safety. At the initial state, since the initial positions are randomly generated, there may be some issues with small distances between individual agents, but they quickly repel each other and converge to the vicinity of the repulsion distance radius d = 20. No collisions occurred during any of the simulations.

For 100 agents, it can be seen that pinning on the \({\text{max-}}\Psi\) node, both the \(Err\) \(R\) and speed consistency converge the fastest. It is indicated that the \({\text{max-}}\Psi\) selection method has the greatest influence on \(R\), and can lead the followers approach the leader at the fastest. For 50 agents, selecting different nodes as attraction nodes has no significant effect on the overall convergence speed of the system consistency and control precision. However, when the leader gain is increased by 2.5 times, the effect of the attraction nodes is strengthened.

From the simulation results, it can be observed that all four methods for selecting controlling nodes can achieve consensus and follow the virtual leader node. In terms of convergence speed, the \({\text{max-}}\Psi\) method has a relatively fast convergence rate. In many cases, the convergence speed of the maximum degree centrality method is comparable to that of the \({\text{max-}}\Psi\) method. The reason behind this is that in the multi-agent system studied in this paper, due to the adoption of the nearest neighbor interaction pattern, each agent can only interact with a limited number of neighbors, making it difficult to exhibit a power-law distribution. As a result, the differences between nodes are not significant, especially when all agents are uniformly distributed in space, and the degree centrality of each node tends to be consistent. Therefore, regardless of which node is selected as the controlling node, the convergence effect is almost the same.

The simulation results show that the proposed algorithm can achieve effective swarm control. In a short time, the speed of all agents is basically the same and gradually approaches the speed of the virtual leader. As time passes, the distance between agents gradually approaches the ideal distance and is always greater than 0, indicating that there is no collision during the simulation. These results demonstrate the feasibility and effectiveness of the proposed algorithm in achieving swarm control.

Conclusion

We have proposed a simple flocking control strategy for the second-order multi-agent systems, which enables the control system to achieve stable and collision-free-flocking motion. The influence of adding a pinning node on the dynamic performance of the system was analyzed, and it was found that the controllability of a strongly connected network can be increased by adding a pinning node or increasing one of the pinning gains. Moreover, all the eigenvalues of the new system are greater than zero. We have also analyzed the synchronization index and pinning point selection strategies of the Laplacian matrix as it is an important index for representing the synchronization of the network. A higher synchronization index indicates better synchronization performance of the network. We have used the eigenvalue perturbation method to analyze the optimal pinning node. The simulations demonstrate that selecting the pinning point based on the synchronization index leads to the best results, and the convergence rate of velocity consistency error is faster than that achieved with the maximum degree centrality.