1 Introduction

Enormous attention from the research community has been paid to the consensus problem of multi-agent systems, partly due to its applications in the formation control of unmanned air vehicles, the cooperative control of mobile robots, the design of distributed sensor networks, and so on (see [13] and references therein). Although first-order consensus protocols have been intensively studied [48], they are unapplicable to consensus of second-order multi-agent systems (i.e., agents are governed by both position and velocity states) which can characterize a broad class of real vehicles. It has been demonstrated that second-order consensus may not be reached even if the communication topology contains a spanning tree [9], which is somewhat different from first-order consensus. Therefore, the consensus problem for second-order multi-agent systems is more challenging than the first-order case [1015].

It should be pointed out that most previous results focus on multi-agent systems with fixed communication topologies. However, for practical engineering and social multi-agent systems, their interaction topologies are often unreliable due to the limited sensing region of sensors or effect of obstacles. Upto now, much progress has been achieved in solving consensus problems under switching topologies [1621]. For example, the pioneering work of Jadbabaie et al. [16] proved that “jointly connectivity” over a time interval is sufficient for consensus of first-order multi-agent systems with undirected topology. Then, Ren and Beard [17] generalized the results in [16] to the directed information topology. Generally speaking, these initial attempts were obtained without noticing that the communication topologies of multi-agent systems cannot shift arbitrarily fast in reality. Naturally, researchers began to impose some constraints on the time interval between consecutive switchings (i.e., the so-called dwell time (DT)). Along this line, Zareh et al. [22] solved the second-order multi-agent systems with slow switching topology by proposing a PD-like protocol. Minimum bounds of the DT were calculated to ensure stability of hybrid systems in [23].

Another challenge in multi-agent consensus is the inherent nonlinear dynamics of agents and ubiquitous communication time delay between interacting agents [24]. Until now, many techniques have been employed to analyze nonlinear multi-agent systems, including dissipativity theory [25], non-smooth analysis [26], and Lyapunov functions [27, 28]. In [29], Wang and Slotine derived delay-independent sufficient conditions for group agreement with time-delayed communications. On the other hand, delay-dependent conditions for consensus of a class of second-order multi-agent systems were derived in [30]. Despite the overall progress, some issues in this area still await further research, such as multi-agent consensus with more constraints including inherent nonlinear dynamics, restricted interaction topology (e.g., average dwell time (ADT) switching topology [31]) and communication time delay simultaneously.

With the above motivation, this paper deals with the consensus problem of second-order multi-agent systems with nonlinear dynamics, communication time delay, and restricted switching topology. By introducing a state transformation, the consensus problem is converted to a stability problem of the corresponding disagreement systems. Then, by constructing piecewise Lyapunov–Krasovskii functionals, it is proved that second-order consensus can be achieved if each switching topology contains a directed spanning tree and the system parameters satisfy the derived linear matrix inequalities (LMIs).

The remainder of the paper is organized as follows. Some necessary preliminaries and consensus problem formulations are given in Sect. 2. In Sect. 3, we present the sufficient conditions for ensuring consensus in terms of LMIs. A numerical example is simulated to verify the theoretical results in Sect. 4. Section 5 draws the conclusion and puts forward some future topics.

Some mathematical notations are used throughout the paper. Let \(I_n\) and \(O_n \) be the \(n \times n\) identity matrix and zero matrix, respectively; \(1_n=[1,\ldots ,1]^T \in R^n\), and \(0_n=[0,\ldots ,0]^T \in R^n\). \(\text{ diag }\{x_1,\ldots ,x_m\}\) denotes the diagonal matrix with diagonal entries \(x_1\) to \(x_m\). We say \(X > 0\) (\(X < 0\)) if the matrix \(X\) is positive (negative) definite. \(\bar{\lambda }(\cdot )\) and \(\underline{\lambda }(\cdot )\) denote, respectively, the maximum and minimum eigenvalue of a positive definite matrix.

2 Preliminaries and problem setup

We first recall some concepts from the graph theory. A directed graph (or digraph) \(\mathcal {G}=(\mathcal {V},\mathcal {E},\mathcal {A})\) of order \(n\) consists of a set of nodes \(\mathcal {V}=\{1,\ldots ,n\}\), a set of edges \(\mathcal {E}\subseteq \mathcal {V}\times \mathcal {V}\), and a weighted adjacency matrix \(\mathcal {A}=[a_{ij}] \in \mathbb {R}^{n \times n}\). A directed edge in \(\mathcal {E}\) is denoted by \(e_{ij}=(i,j)\in \mathcal {E}\), which means that node \(i\) has access to the information of node \(j\). The element \(a_{ij}\) in \(\mathcal {A}\) is decided by the edge between \(i\) and \(j\), i.e., \(e_{ij}\in \mathcal {E} \Leftrightarrow a_{ij}>0\), otherwise \(a_{ij}=0\). The set of neighbors of node \(i\) is denoted by \(N_i=\{j \in \mathcal {V}|(i,j)\in \mathcal {E }\}\). The Laplacian matrix \(L\) of graph \(\mathcal {G}\) is defined by \(L=D-\mathcal {A}\), where \(D=\text{ diag }\{d_1,\ldots ,d_n\}\) and \(d_i=\sum _{j\in N_i}a_{ij}\) is the in-degree of node \(i\). A sequence of edges \((i_1,i_2), ~(i_2,i_3),\ldots ,(i_{k-1},i_k)\) is called a directed path from node \(i_k\) to node \(i_1\). If there exists at least one node (called the root) having directed paths to any other nodes, the digraph is said to have a spanning tree.

We consider a multi-agent system with \(n\) agents, in which the \(i\)th agent moves according to the following second-order dynamics:

$$\begin{aligned} \left\{ \begin{aligned} \dot{x}_i&=v_i\\ \dot{v}_i&=f(x_i,v_i,t)+u_i, \end{aligned} \right. \end{aligned}$$
(1)

where \(x_i,v_i,u_i \in R\) are position state, velocity state, and control input of agent \(i\), respectively, and \(f(x_i,v_i,t)\) is the inherent nonlinear dynamics of agent \(i\).

For the multi-agent system (1), a protocol with communication time delay is proposed as

$$\begin{aligned} u_i(t)&= -k_0 v_i(t)+k_1\sum _{j\in N_i(t)}a_{ij}(t)[x_j(t-\tau )\nonumber \\&-x_i(t-\tau )], i={1,2,\ldots ,n}. \end{aligned}$$
(2)

With protocol (2), the multi-agent system (1) becomes

$$\begin{aligned} \left\{ \begin{aligned} \dot{x}_i&=v_i\\ \dot{v}_i&=f(x_i,v_i,t)-k_0 v_i\\&+\, k_1\sum _{j\in N_i(t)}a_{ij}(t)[x_j(t-\tau )-x_i(t-\tau )]. \end{aligned} \right. \end{aligned}$$
(3)

To facilitate our derivation, we rewrite the multi-agent system (3) in a compact form as

$$\begin{aligned} \begin{aligned} \dot{\eta }(t)&= \left[ \begin{array}{cc} O_n &{} I_{n}\\ O_n &{} -k_0 I_n\\ \end{array} \right] \eta (t)\\&+\left[ \begin{array}{cc} O_n &{} O_n\\ -k_1 L(t) &{} O_n\\ \end{array} \right] \eta (t-\tau ) +\left[ \begin{array}{c} 0_{n}\\ f(x,v,t)\\ \end{array} \right] \end{aligned} \end{aligned}$$
(4)

with \(\eta =[x^T,v^T]^T,x=[x_1,x_2,\ldots ,x_n]^T,v=[v_1,v_2,\ldots ,v_n]^T,f(x,v,t)=[f(x_1,v_1,t),\)

\(f(x_2,v_2,t),\ldots ,f(x_n,v_n,t)]^T.\)

Remark 1

The consensus protocol (2) is only based on the local velocity information and the neighboring position information. Without requiring the neighboring velocity information, the proposed protocol (2) is more practical. Another virtue of the protocol (2) is its simplicity even with the presence of communication delay and nonlinear dynamics, thus it is viable even for agents with simple computational ability.

When the connection of the nodes in the digraph changes with time, the topology of the system is said to be switching. To describe the variable topologies, let \(\bar{\mathcal {G}}=\{\mathcal {G}_1,\mathcal {G}_2,\ldots ,\mathcal {G}_M\}\) denote the finite set of all possible topologies and \(\mathcal {M}=\{1,2,\ldots ,M\}\) as the index set. Here, we consider the switching signals as time dependent, therefore, the topology \(\mathcal {G}_{\sigma (t)}\) of the multi-agent system at time \(t\) is activated, where the map \(\sigma (t):[0,+\infty )\rightarrow \mathcal {M}\) is a right continuous piecewise constant function (called switching signal).

The following assumption and lemma are needed in the following section.

Assumption 1

The nonlinear term \(f(x,v,t)\) satisfies the Lipschitz condition with the Lipschitz constant \(\rho \), i.e.,

$$\begin{aligned} \begin{aligned}&|f(x_2,v_2,t)-f(x_1,v_1,t)|\\&\quad \le \rho ^{1/2}\sqrt{(x_2-x_1)^2+(v_2-v_1)^2},\forall x_i,v_i \in R,~\\&\quad i=1,2,~\forall t\ge 0. \end{aligned} \end{aligned}$$

Definition 1

[31] For any switching signal \(\sigma (t)\) and \(t_2>t_1\ge t_0\) , let \(N_{\sigma }(t_2,t_1)\) denote the switching number of \(\sigma (t)\) over the interval \([t_1,t_2)\). For given \(\tau _a>0\) and an integer \(N_0 \ge 0\), if

$$\begin{aligned} N_{\sigma }(t_2,t_1)<N_0+\frac{t_2-t_1}{\tau _a} \end{aligned}$$

holds, then \(\tau _a\) is called an ADT.

Remark 2

The ADT will be used to describe the switching signals. When \(N_0 \ne 0\), the switching signals with ADT property are allowed to switch fast and then compensated it by slow switching consequently.

Definition 2

The consensus of system (1) is said to be achieved, if for all agents using the protocol (2) such that the closed-loop system satisfies

$$\begin{aligned} \begin{aligned}\lim _{t \rightarrow \infty }|x_i(t)-x_j(t)|=0,~~\lim _{t \rightarrow \infty }|v_i(t)\\ -v_j(t)|=0,\forall i,j ={1,2,\ldots ,n}. \end{aligned} \end{aligned}$$

Lemma 1

[32] For any two real vectors \(x,~y \in R^n\) and positive definite matrix \(\Phi \in R^{n \times n}\), we have

$$\begin{aligned} 2x^Ty\le x^T\Phi x+y^T \Phi ^{-1} y. \end{aligned}$$

3 Consensus under restricted switching topology

Here, we introduce a state transformation for both position and velocity states

$$\begin{aligned} \left\{ \begin{aligned} \psi&\triangleq [\psi _1,\psi _2,\ldots ,\psi _{n-1}]^T=Ex\\ \zeta&\triangleq [\zeta _1,\zeta _2,\ldots ,\zeta _{n-1}]^T=Ev \end{aligned} \right. \end{aligned}$$
(5)

where \(E=[-1_{n-1},I_{n-1}]\in R^{(n-1)\times n}\) is the transformation matrix. Denote \(\xi = [\psi ^T , \zeta ^T]^T\) and \(\bar{f}(x,v,t)\!=\![f(x_2,v_2,t)-f(x_1,v_1,t),\ldots ,f(x_n,v_n, t)-f(x_1,v_1,t)]^T\). The corresponding disagreement system of multi-agent system (4) can be expressed in the following reduced-order compact form

$$\begin{aligned} \begin{aligned} \dot{\xi }(t)=&~\Xi _0\xi (t)+\Xi _d \xi (t-\tau ) +\left[ \begin{array}{c} 0_{n-1}\\ \bar{f}(x,v,t) \end{array} \right] \end{aligned} \end{aligned}$$
(6)

where \(\Xi _0=\small \left[ \begin{array}{cc} O_{n-1}&{}I_{n-1}\\ O_{n-1}&{}-k_{0} I_{n-1} \end{array} \right] ,\, \Xi _d=\small \left[ \begin{array}{cc} O_{n-1}&{} O_{n-1}\\ -k_{1}EL(t)F &{} O_{n-1} \end{array} \right] ,\, F=[0_{n-1},I_{n-1}]^T\in R^{n\times (n-1)}.\)

Then by Newton–Leibniz formula, the disagreement system (6) can be rewritten as

$$\begin{aligned} \dot{\xi }(t)=\Pi _0\xi (t)-\Pi _d\int \limits _{-\tau }^0\xi (t+\theta )d\theta +\left[ \begin{array}{c} 0_{n-1}\\ \bar{f}(x,v,t) \end{array} \right] \end{aligned}$$
(7)

where \(\Pi _0=\small \left[ \begin{array}{cc} O_{n-1} &{} I_{n-1}\\ -k_1 EL(t)F&{}-k_0 I_{n-1} \end{array}\right] ,\, \Pi _d= \small \left[ \begin{array}{cc} O_{n-1} &{} O_{n-1}\\ O_{n-1} &{}-k_1 EL(t)F \end{array}\right] \).

According to Definition 2, consensus of the multi-agent system (4) is achieved if and only if the disagreement system (7) is asymptotically stable.

Theorem 1

Suppose that each digraph \(\mathcal {G}_{i}\,(i\in \mathcal {M})\) contains a spanning tree. For given constant \(\alpha >0 \), the consensus problem of the multi-agent system (1) is solved by the protocol (2) under ADT switching topology if there exist matrices \(Q_{i}>0,~R_i>0\) such that the following LMIs hold

$$\begin{aligned} \left[ \begin{array}{c@{\quad }c@{\quad }c} \Upsilon _i^{11}&{} 0 &{} -\tau P_i\Pi _d\\ * &{} -e^{-\alpha \tau }Q_i &{} 0 \\ * &{} * &{} -\tau e^{-\alpha \tau }R_i \end{array}\right] <0,~i\in \mathcal {M} \end{aligned}$$
(8)

with \(\Upsilon _i^{11}=\Pi _0^T P_i+P_i\Pi _0+\alpha P_i+I_2 \otimes (\bar{P}_i+2\rho \bar{\lambda }(\bar{P}_i) I_{n-1})+Q_i+\tau R_i\), and

$$\begin{aligned} \tau _a>\tau _a^*=\frac{\ln \beta }{\alpha } \end{aligned}$$
(9)

where \(\beta \) satisfies

$$\begin{aligned} P_i \le \beta P_j,~Q_i \le \beta Q_j,~R_i \le \beta R_j ~~\text{ for }~ i,j\in \mathcal {M}.\nonumber \\ \end{aligned}$$
(10)

Proof

First, we choose a Lyapunov–Krasovskii functional as

$$\begin{aligned} V_i(t)=V_i^1(t)+V_i^2(t)+V_i^3(t) \end{aligned}$$
(11)

where

$$\begin{aligned} \begin{aligned}V_i^1(t)&=\xi ^T(t)P_i\xi (t)\\ V_i^2(t)&=\int \limits _{t-\tau }^t e^{\alpha (s-t)}\xi ^T(s)Q_i\xi (s)ds\\ V_i^3(t)&=\int \limits _{-\tau }^0\int \limits _{t+r}^te^{\alpha (s-t)}\xi ^T(s)R_i\xi (s)dsdr\\ \end{aligned} \end{aligned}$$

and \(P_i=\small \left[ \begin{array}{cc}k_0\bar{P}_i &{} \bar{P}_i\\ \bar{P}_i &{} \bar{P}_i\\ \end{array}\right] \) with positive definite matrix \(\bar{P}_i\in R^{(n-1)\times (n-1)}\) satisfying \(\bar{P}_i(EL_iF)+(EL_iF)^T\bar{P}_i=I_{n-1}\) and \(k_0>1\). \(Q_i\) and \(R_i\) are positive definite matrices determined by (8).

For the term \(V_i^1\), its time derivative along trajectory of the disagreement system (7) is

$$\begin{aligned} \begin{aligned} \dot{V}_i^1(t)&=\xi ^T(t)(\Pi _0^T P_i+P_i\Pi _0)\xi (t)-\,2\xi ^T(t) P_i\Pi _d \\&\quad \times \int \limits _{-\tau }^0 \xi (t+\theta )d\theta +\,2\xi ^T(t)P_i \left[ \begin{array}{c}0_{n-1}\\ \bar{f}(x,v,t)\end{array}\right] \\&=\xi ^T(t)(\Pi _0^T P_i+P_i\Pi _0)\xi (t)-\,2\xi ^T(t) P_i\Pi _d\\&\quad \times \int \limits _{-\tau }^0 \xi (t \!+\! \theta )d\theta \!+\! \,2\xi ^T\text{ diag }\{\bar{P}_i,\bar{P}_i\}\left[ \begin{array}{c}\bar{f}(x,v,t)\\ \bar{f}(x,v,t)\end{array}\right] . \end{aligned} \end{aligned}$$
(12)

Using Lemma 1, we have

$$\begin{aligned}&2\xi ^T\text{ diag }\{\bar{P}_i,\bar{P}_i\}\left[ \begin{array}{c} \bar{f}(x,v,t)\\ \bar{f}(x,v,t)\\ \end{array}\right] \nonumber \\&\quad \le \left[ \bar{f}^T(x,v,t) ~ \bar{f}^T(x,v,t)\right] \text{ diag }\{\bar{P}_i,\bar{P}_i\}\left[ \begin{array}{c} \bar{f}(x,v,t)\\ \bar{f}(x,v,t)\\ \end{array}\right] \nonumber \\&\quad +\,\xi ^T\text{ diag }\{\bar{P}_i,\bar{P}_i\}\xi \nonumber \\&\quad \le \xi ^T(I_2 \otimes (\bar{P}_i+2\rho \bar{\lambda }(\bar{P}_i) I_{n-1}))\xi . \end{aligned}$$
(13)

For the term \(V_i^2\) and \(V_i^3\), we have

$$\begin{aligned} \begin{aligned} \dot{V}_i^2(t)=&-\alpha V_i^2(t)+\xi ^T(t)Q_i\xi (t)\\&-\,e^{-\alpha \tau }\xi (t-\tau )Q_i\xi (t-\tau ), \end{aligned} \end{aligned}$$
(14)

and

$$\begin{aligned} \begin{aligned} \dot{V}_i^3(t)=&-\alpha V_i^3(t)+\tau \xi ^T(t)R_i\xi (t)\\&-\int \limits _{t-\tau }^t e^{\alpha (s-t)}\xi ^T(s)R_i\xi (s)ds\\ \le&-\alpha V_i^3(t)+\tau \xi ^T(t)R_i\xi (t)\\&-e^{-\alpha \tau }\int \limits _{-\tau }^0 \xi ^T(t+\theta )R_i\xi (t+\theta )d\theta . \end{aligned} \end{aligned}$$
(15)

Then, combining (12)–(15), we conclude that

$$\begin{aligned} \begin{aligned}&\dot{V}_i(t)+\alpha V_i(t) \le \xi ^T(t)\left( \Pi _0^T P_i+P_i\Pi _0+\alpha P_i\right. \\&\qquad \left. +\,Q_i+\tau R_i\right) \xi (t)\\&\qquad +\,\xi ^T(t)\left( I_2 \otimes \left( \bar{P}_i+2\rho \bar{\lambda }(\bar{P}_i) I_{n-1}\right) \right) \xi (t)\\&\qquad -\,e^{-\alpha \tau }\xi (t-\tau )Q_i\xi (t-\tau )\\&\qquad -\,2\xi ^T(t) P_i\Pi _d \int \limits _{-\tau }^0 \xi (t+\theta )d\theta \\&\qquad -\int \limits _{-\tau }^0 e^{-\alpha \tau }\xi ^T(t+\theta )R_i\xi (t+\theta )d\theta \\&\quad \le \frac{1}{\tau }\int \limits _{-\tau }^0 \varpi ^T(t)\left[ \begin{array}{ccc}\Upsilon _i^{11}&{} 0 &{} -\tau P_i\Pi _d\\ * &{} -e^{-\alpha \tau }Q_i &{} 0 \\ * &{} * &{} -\tau e^{-\alpha \tau }R_i \end{array}\right] \varpi (t) d\theta \end{aligned} \end{aligned}$$
(16)

where \(\varpi (t)=[\xi ^T(t),\xi ^T(t-\tau ), \xi ^T(t+\theta )]^T\).

Therefore, if (8) holds, we have

$$\begin{aligned} \dot{V}_i(t)\le -\alpha V_i(t) \end{aligned}$$
(17)

whose integration gives

$$\begin{aligned} V_i(t)\le e^{-\alpha (t-t_0)}V_i(t_0),~ i\in \forall \mathcal {M}. \end{aligned}$$
(18)

Second, we construct a family of piecewise Lyapunov–Krasovskii functionals for each subsystem as follows:

$$\begin{aligned} V_{\sigma (t)}(t)=V_{\sigma (t)}^1(t)+V_{\sigma (t)}^2(t)+V_{\sigma (t)}^3(t) \end{aligned}$$
(19)

where

$$\begin{aligned} \begin{aligned} V_{\sigma (t)}^1(t)&=\xi ^T(t)P_{\sigma (t)}\xi (t)\\ V_{\sigma (t)}^2(t)&=\int \limits _{t-\tau }^t e^{\alpha (s-t)}\xi ^T(s)Q_{\sigma (t)}\xi (s)ds\\ V_{\sigma (t)}^3(t)&=\int \limits _{-\tau }^0\int \limits _{t+r}^te^{\alpha (s-t)} \xi ^T(s)R_{\sigma (t)}\xi (s)dsdr. \end{aligned} \end{aligned}$$

Combining (10) and (11), we have for any switching instants \(t_j\,(j=1,2,\ldots )\)

$$\begin{aligned} V_{\sigma (t_{j})}(t_{j})\le \beta V_{\sigma (t_{j}^{-})}(t_{j}^{-}). \end{aligned}$$
(20)

Therefore, when \(t\in [t_k,t_{k+1})\), from (18) and (20), we have

$$\begin{aligned} \begin{aligned} V_{\sigma (t)}(t)&\!\le \! e^{-\alpha (t-t_k)} V_{\sigma (t_k)}(t_k)\!\le \! \beta e^{-\alpha (t-t_k)}V_{\sigma (t_k^-)}(t_k^-)\\&\le \beta e^{-\alpha (t-t_k)}e^{-\alpha (t_k-t_{k-1)}} V_{\sigma (t_{k-1})}(t_{k-1})\ldots \\&\le \beta ^k e^{-\alpha (t-t_0)}V_{\sigma (t_0)}(t_0)\\&= \beta ^{N_{\sigma }(t,\,t_0)} e^{-\alpha (t-t_0)} V_{\sigma (t_0)}(t_0)\\&\le \beta ^{N_0} e^{-(\alpha -\frac{\ln \beta }{\tau _a})(t-t_0)}V_{\sigma (t_0)}(t_0) \end{aligned} \end{aligned}$$
(21)

According to (11), we have

$$\begin{aligned} a||\xi (t)||^2 \le V_{\sigma (t)}(t),~V_{\sigma (t_0)}(t_0)\le b||\xi (t_0)||_c^2. \end{aligned}$$
(22)

where \(||\xi (t_0)||_c=\sup \nolimits _{-\tau \le \theta \le 0}\{||\xi (t_0+\theta )||\}\), \(a=\min \nolimits _{i\in \mathcal {M}}\underline{\lambda }(P_i), b=\max \nolimits _{i\in \mathcal {M}}\{\bar{\lambda }(P_i)+\tau \bar{\lambda }(Q_i)+\frac{\tau ^{2}}{2}\bar{\lambda }(R_i)\}.\)

Substituting (22) into (21), we have

$$\begin{aligned} ||\xi (t)||\le \sqrt{\frac{b}{a}}\beta ^{\frac{1}{2}{N_0}} e^{-\frac{1}{2}(\alpha -\frac{\ln \beta }{\tau _a})(t-t_0)}||\xi (t_0)||_c. \end{aligned}$$
(23)

With (9) holds, we can conclude that the consensus of the multi-agent system (4) has been achieved exponentially by the designed protocol (2). The proof is completed.\(\Box \)

Remark 3

The final consensus state of the multi-agent system (4) is influenced by the nonlinear term \(f(x_{i},v_{i},t)\). Unlike the linear cases where the states of the agents will converge to a static position with the velocities ending up at \(0\), the consensus states of the agents here are variable. Therefore, by designing proper nonlinear term, we are able to regulate the consensus states of the multi-agent system (4).

4 Numerical simulation

In this section, we give an example to demonstrate the effectiveness of theoretical analysis. The considered second-order multi-agent system consists of six agents labeled 1 through 6. Figure 1 shows four digraphs \(\mathcal {G}_1-\mathcal {G}_4\) each of which contains a directed spanning tree. For simplicity, all the elements in the adjacency matrices are assumed to be 0 or 1.

Fig. 1
figure 1

Four digraphs \(G_1-G_4\) each of which contains a spanning tree

The set of possible communication topologies is composed of \(\mathcal {G}_1-\mathcal {G}_4\). The inherent nonlinear dynamics is given as \(f(x_i,v_i,t)=0.1(x_i+\cos v_{i})\). Suppose the communication delay \(\tau = 0.01\), then the LMIs (8) in Theorem 1 are feasible if we choose \( \alpha = 0.2,k_{0}=20.25\) and \(k_1 = 22\). We can also obtain that when \(\beta = 1.84\), LMIs (10) hold. As predicted by Theorem 1, the protocol (2) solves the consensus problem of the second-order nonlinear multi-agent system (1) for the switching signal with ADT satisfying

$$\begin{aligned} \tau _a>\tau _a^*=\frac{\ln \beta }{\alpha }=3.05. \end{aligned}$$

In the simulation, the initial states of agents are selected randomly from the interval [\(-\)0.2, 0.2]. Figure 2 shows the consensus dynamics with \(\tau _a=3.1\), where all velocities converge to a constant while all positions of the agents change with time.

Fig. 2
figure 2

a Position states \(x_i(t)\); b velocity states \(v_i(t)\); c switching signal \(\sigma (t)\)

5 Conclusion

In this paper, we have studied consensus of second-order multi-agent systems with inherent nonlinear dynamics, communication time delay, and restricted switching topology simultaneously. A novel approach based on state transformation was employed to facilitate consensus analysis. We not only established sufficient conditions for consensus in terms of LMIs, but also calculated lower bound of ADT for admissible switching signals. Instead of using the concept of generalized algebraic connectivity in the literature, our results are more effective especially for models with large number of agents. The final consensus state is time varying according to the nonlinear term. Here, we point out that although we only consider the agents with only one dimension case, all results are valid for agents with any dimension by introducing the notation of the Kronecker product. In future, we will remove the constraint on nonlinear terms and tackle it with approximation capability of neural networks or fuzzy logic algorithm.