1 Introduction

In the past decade, consensus problem, which means that each agent reaches an agreement on a common value asymptotically by cooperating with their neighbors, has attracted much attention in several areas for its broad engineering applications, such as automated highway systems, air traffic control, congestion control in communication networks, etc.

In the multi-agent systems, each agent needs certain input delay for itself to accept and process information, and communication delays between neighboring agents are non-negligible when the agents exchange information. So far, two types of consensus protocols with communication delays have been extensively adopted. One is that both the state of the agent and its neighbors are affected by identical delays, while another is that delays only affect the state received from neighbors of the agents.

Up to now, there has been much research on consensus problem of first-order[16], second-order[719], and high-order[20, 21] multi-agent systems with identical agents’ dynamics. In some practical situations, however, the agent of multi-agent systems has different dynamics for various constraints. Hence, consensus problem of heterogeneous multiagent systems has attracted many researchers’ interests.

For heterogeneous multi-agent systems composed of first-order and second-order integrator agents, Zheng et al.[22] discussed the consensus problem under the linear consensus protocol and the saturated consensus protocol, and the sufficient conditions were established when the communication topologies were undirected connected graphs and leader-following networks. Zheng and Wang[23] studied the finite-time consensus problem of heterogeneous multi-agent systems, and two classes of consensus protocols with and without velocity measurements were proposed by combining the homogeneous domination method with the addition of power integrator method. Liu and Liu[24] investigated consensus problem for discrete-time heterogeneous multi-agent systems composed of first-order and second-order agents, and obtained the sufficient consensus criteria for the agents with bounded communication delays under fixed topology and switching topologies, respectively. Moreover, Yin et al.[25] investigated the consensus problem for a set of discrete-time heterogeneous multi-agent systems and designed a consensus algorithm based on the event-triggered communication scheme, where communication is only needed between the agent and its local neighbors. In addition, a sufficient condition is obtained to guarantee the consensus of heterogeneous multi-agent systems in terms of linear matrix inequality (LMI) based on the Lyapunov functional method and the Kronecker product technique. Tian and Zhang[26] studied the high-order consensus problem for heterogeneous multi-agent systems with unknown communication delays, and got a necessary and sufficient consensus condition. Munz et al.[27] considered the multiagent systems with agents’ dynamics given by strictly stable linear systems with nonuniform communication delays, and set-valued consensus conditions have been acquired based on the properties of the frequency-domain feedback matrix.

In this paper, a general stationary consensus protocol is adopted for heterogeneous multi-agent systems with input and communication delay to follow a static leader. Firstly, consensus is analyzed for the system with time-varying input delay and communication delay under fixed topology. By constructing Lyapunov-Krasovskii functional, sufficient consensus condition is obtained and expressed in LMI form. Secondly, a delay-dependent consensus condition in the form of LMI is also obtained for the system with time-varying input delay and communication delay converging to the leader’s states under switching topologies. By using LMI toolbox in Matlab software, the bound of time delay can be determined based on LMI.

2 Problem description

In this paper, it is assumed that the heterogeneous multi-agent system is composed of m second-order agents and n-m first-order agents. The dynamics of heterogeneous multiagent systems are given as

$$\left\{ {\matrix{{{{\dot x}_i}(t) = {v_i}(t),} \hfill & {} \hfill \cr {{{\dot v}_i}(t) = {u_i}(t),} \hfill & {i = 1,2, \cdots, m} \hfill \cr {{{\dot x}_i}(t) = {u_i}(t),} \hfill & {i = m + 1, \cdots, n} \hfill \cr } } \right.$$
(1)

where x i R, v i R are the position, velocity and u i R is the control input respectively of agent i.

The interconnection topology of multi-agent systems is usually described as directed graph (digraph). Let G = (V, E, A) as the weighted digraph, V = {1, ⋯, n} is a set of vertices, \(E \subseteq V \times V\) is a set of edges, and \(A = [{a_{ij}}] \in {{\bf{R}}^{n \times n}}\) is a weighted adjacency matrix such that a ij > 0 and a ii = 0 for all i = 1, ⋯ , n. The node indexes n belong to a finite index set Λ = {1, ⋯, n}. The set of neighbors of node i is denoted by N i = {jV(i, j)∈ E}. The Laplacian matrix of the weighted digraph G is defined as L = DA, where \(D = {\rm{diag}}\{ \sum\nolimits_{j = 1}^n {{a_{ij}}}, i \in \Lambda \}\) is the degree matrix of G.

Based on the protocols in [8, 15], we proposed a consensus protocol with a static leader as follows

$$\matrix{{{u_i} = - {k_2}{v_i}(t) + {k_1}\sum\limits_{j = 1}^n {{a_{ij}}} ({x_j}(t) - {x_i}(t)) + } \hfill \cr {{b_i}({x_0} - {x_i}(t)),\quad i = 1,2, \cdots, m} \hfill \cr {{u_i} = \sum\limits_{j = 1}^n {{a_{ij}}} ({x_j}(t) - {x_i}(t)) + {b_i}({x_0} - {x_i}(t)),} \hfill \cr {i = m + 1, \cdots, n} \hfill \cr }$$
(2)

where k 1 > 0, k 2 > 0, a ij > 0, jN i is the adjacent element of neighbors matrix A. x 0R is a constant that denotes the position of the static leader, and the linked weight b i from agent i to the leader is defined as

$$\left\{ {\matrix{{{b_i} > 0,} \hfill & {{\rm{if}}\,{\rm{agent}}\,{\rm{is}}\,{\rm{connected}}\,{\rm{to}}\,{\rm{the}}\,{\rm{leader}}} \hfill \cr {{b_i} = 0,} \hfill & {{\rm{otherwise}}{\rm{.}}} \hfill \cr } } \right.$$

In this paper, the interconnection topology composed of the n agents and the static leader is denoted by \(\bar G\).

Under the time-varying input delay τ (t) > 0 and the communication delay η(t) > 0 between each agent, the protocol (2) can be written as

$$\matrix{{{u_i} = - {k_2}{v_i}(t - \tau (t)) + {k_1}\sum\limits_{j = 1}^n {{a_{ij}}} ({x_j}(t - \eta (t) - \tau (t)) - } \hfill \cr {{x_i}(t - \tau (t))) + {b_i}({x_0} - {x_i}(t)),\quad i = 1,2, \cdots, m} \hfill \cr {{u_i} = \sum\limits_{j = 1}^n {{a_{ij}}} ({x_j}(t - \eta (t) - \tau (t)) - {x_i}(t - \tau (t))) + } \hfill \cr {{b_i}({x_0} - {x_i}(t)),\quad i = m + 1, \cdots, n.} \hfill \cr }$$
(3)

With the consensus algorithm (3), the closed-loop form of system (1) is

$$\matrix{{{{\dot x}_i}(t) = {v_i}(t),} \hfill \cr {{{\dot v}_i}(t) = - {k_2}{v_i}(t - \tau (t)) + {k_1}\sum\limits_{j = 1}^n {{a_{ij}}} ({x_j}(t - \eta (t) - \tau (t)) - } \hfill \cr {{x_i}(t - \tau (t))) + {b_i}({x_0} - {x_i}(t)),\quad i = 1,2, \cdots, m,} \hfill \cr {{{\dot x}_i}(t) = \sum\limits_{j = 1}^n {{a_{ij}}} ({x_j}(t - \eta (t) - \tau (t)) - {x_i}(t - \tau (t))) + } \hfill \cr {{b_i}({x_0} - {x_i}(t)),\quad i = m + 1, \cdots, n.} \hfill \cr }$$
(4)

Define \({\bar x_i}(t) = {x_i}(t) - {x_0}\), and we can get

$$\matrix{{{{\dot \bar x}_s}(t) = {v_s}(t),} \hfill \cr {{{\dot v}_s}(t) = - {k_2}{I_m}{v_s}(t - \tau (t)) + {k_1}[{A_{ss}}{{\bar x}_s}(t - \eta (t) - \tau (t)) + } \hfill \cr {{A_{sf}}{{\bar x}_f}(t - \eta (t) - \tau (t)) - {D_s}{{\bar x}_s}(t - \tau (t))] - {B_s}{{\bar x}_s}(t),} \hfill \cr {{{\dot \bar x}_f}(t) = {A_{fs}}{{\bar x}_s}(t - \eta (t) - \tau (t)) + {A_{ff}}{{\bar x}_f}(t - \eta (t) - \tau (t)) - } \hfill \cr {{D_f}{{\bar x}_f}(t - \tau (t)) - {B_f}{{\bar x}_f}(t)} \hfill \cr }$$
(5)

where \({\bar x_s} = [{\bar x_1},{\bar x_2}, \cdots, {\bar x_m}],\,\,{v_s} = [{v_1},{v_2}, \cdots, {v_m}]\), and \({\bar x_f} = [{\bar x_{m + 1}}, \cdots, {\bar x_n}]\). \({A_{ss}} \in {{\bf{R}}^{m \times m}}\) is the adjacency matrix of second-order agents between each other, \({A_{ff}} \in {{\bf{R}}^{(n - m) \times (n - m)}}\) is the adjacency matrix of first-order agents between each other, \({A_{sf}} \in {{\bf{R}}^{m \times (n - m)}}\) and \({A_{fs}} \in {{\bf{R}}^{(n - m) \times m}}\) is adjacency matrix between first-order and second-order agents, and B s =diag{b 1, ⋯, b m }, B f = diag{b m +1, ⋯, b n }.

Then, system (5) can be rewritten as

$$\dot y(t) = {H_1}y(t) + {H_2}y(t - \tau (t)) + {H_3}y(t - \eta (t) - \tau (t))$$
(6)

where

and

$${{H_3} = \left[ {\matrix{0 \hfill & 0 \hfill & 0 \hfill \cr { - {k_1}{A_{ss}}} \hfill & 0 \hfill & {{k_1}{A_{sf}}} \hfill \cr {{A_{fs}}} \hfill & 0 \hfill & {{A_{ff}}} \hfill \cr } } \right].}$$

Therefore, the consensus convergence problem of multiagent system (4) is equivalent to the asymptotic stability of system (6).

3 Consensus analysis

First of all, the assumptions about the input delay and communication delay are made as follows.

Assumption 1. 0 ⩽ τ(t) ⩽ σ, \(0\leqslant\dot \tau (t)\leqslant\mu < 1,\sigma > 0\), t ⩾ 0.

Assumption 2. \(0 \leqslant \eta (t) \leqslant h,0 \leqslant \dot \eta (t) \leqslant d < 1,h > 0.\).

In the proof of the main results, moreover, the following lemma is needed[28].

Lemma 1. Assume that 0 ⩽ η(t) ⩽ h, h > 0 is piece-wise continuous function. For arbitrary differentiable vector function x(t): [−h, ∞) → R n and arbitrary positive definite matrix MR n ×n, the following inequality is established:

$$\matrix{{\left( {\int_{t - \eta (t)}^t {{{\dot x}^{\rm{T}}}} (s){\rm{d}}s} \right)M\left( {\int_{t - \eta (t)}^t {\dot x} (s){\rm{d}}s} \right) \leqslant } \hfill \cr {h\int_{t - h}^t {{{\dot x}^{\rm{T}}}} (s)M\dot x(s){\rm{d}}s,\quad t \geqslant 0.} \hfill \cr }$$

3.1 Fixed topology

In this section, consensus is analyzed for system (4) with time-varying input delay and time-varying communication delay under fixed topology.

Theorem 1. τ(t) and η(t) satisfy Assumptions 1 and 2, respectively, and the interconnection topology \(\overline G\) of multiagent system (4) has the leader as a globally reachable node. Then, multi-agent system (4) achieves an asymptotic consensus such that \({\lim\nolimits_{t \rightarrow \infty }}{x_i}(t) = {x_0},\,{\lim\nolimits_{t \rightarrow \infty }}{v_i}(t) = 0,i \in \Lambda\), i ∈ Λ, if the following LMI

$$\left[ {\matrix{{{M_{11}}} \hfill & {{M_{12}}} \hfill & {{M_{13}}} \hfill \cr {} \hfill & {{M_{22}}} \hfill & {{M_{23}}} \hfill \cr {} \hfill & * \hfill & {{M_{33}}} \hfill \cr } } \right] < 0$$
(7)

holds, where

$$\matrix{{{M_{11}} = H_1^{\rm{T}}P + P{H_1} + {Q_1} + \sigma H_1^{\rm{T}}{R_1}{H_1} + hH_1^{\rm{T}}{R_2}{H_1} - } \hfill \cr {{\sigma ^{ - 1}}{R_1}} \hfill \cr {{M_{12}} = P{H_2} + \sigma H_1^{\rm{T}}{R_1}{H_2} + hH_1^{\rm{T}}{R_2}{H_2} + {\sigma ^{ - 1}}{R_1}} \hfill \cr {{M_{13}} = P{H_3} + \sigma H_1^{\rm{T}}{R_1}{H_3} + hH_1^{\rm{T}}{R_2}{H_3}} \hfill \cr {{M_{22}} = (1 - \mu )({Q_2} - {Q_1}) + \sigma H_2^{\rm{T}}{R_1}{H_2} + hH_2^{\rm{T}}{R_2}{H_2} - } \hfill \cr {{\sigma ^{ - 1}}{R_1} - {h^{ - 1}}{R_2}} \hfill \cr {{M_{23}} = \sigma H_2^{\rm{T}}{R_1}{H_3} + hH_1^{\rm{T}}{R_2}{H_3} + {h^{ - 1}}{R_2}} \hfill \cr {{M_{33}} = (d + \mu - 1){Q_2} + \sigma H_3^{\rm{T}}{R_1}{H_3} + hH_3^{\rm{T}}{R_2}{H_3} - } \hfill \cr {{h^{ - 1}}{R_2}} \hfill \cr }$$

and P, Q j , R j , j = 1, 2, 3 are positive definite matrices with appropriate dimensions.

Proof. Choose a Lyapunov-Krasovskii functional for the system (6) as follows:

$$\matrix{{V(t) = {V_1}(t) + {V_2}(t) + {V_3}(t)} \hfill \cr {{V_1}(t) = {y^{\rm{T}}}(t)Py(t)} \hfill \cr {{V_2}(t) = \int_{t - \tau (t)}^t {{y^{\rm{T}}}} (s){Q_1}y(s){\rm{d}}s + } \hfill \cr {\int_{t - \eta (t) - \tau (t)}^{t - \tau (t)} {{y^{\rm{T}}}} (s){Q_2}y(s){\rm{d}}s} \hfill \cr {{V_3}(t) = \int_{ - \sigma }^0 {\int_{t + \theta }^t {{{\dot y}^{\rm{T}}}} } (s){R_1}\dot y(s){\rm{d}}s{\rm{d}}\theta + } \hfill \cr {\int_{ - h - \sigma }^{ - \sigma } {\int_{t + \theta }^t {{{\dot y}^{\rm{T}}}} } (s){R_2}\dot y(s){\rm{d}}s{\rm{d}}\theta.} \hfill \cr }$$

Calculating the derivative of V (t), we get

$$\matrix{{\dot V(t) = {{\dot y}^{\rm{T}}}(t)Py(t) + {y^{\rm{T}}}(t)P\dot y(t) + (1 - \mu ){y^{\rm{T}}}(t - \tau (t))} \hfill \cr {({Q_2} - {Q_1})y(t - \tau (t)) + (d + \mu - 1){y^{\rm{T}}}(t - \eta (t) - } \hfill \cr {\tau (t)){Q_2}y(t - \eta (t) - \tau (t)) + \sigma {{\dot y}^{\rm{T}}}(t){R_1}\dot y(t) - } \hfill \cr {{\sigma ^{ - 1}}({y^{\rm{T}}}(t) - {y^{\rm{T}}}(t - \tau (t))){R_1}(y(t) - y(t - \tau (t))) + } \hfill \cr {h{{\dot y}^{\rm{T}}}(t){R_1}\dot y(t) - {h^{ - 1}}({y^{\rm{T}}}(t - \tau (t)) - {y^{\rm{T}}}(t - \eta (t) - } \hfill \cr {\tau (t))){R_1}(y(t - \tau (t)) - y(t - \eta (t) - \tau (t))).} \hfill \cr }$$

Based on Lemma 1, we have

$$\dot V(t)\leqslant {\varphi ^{\rm{T}}}(t)M\varphi (t)$$

where \({\varphi ^{\rm{T}}}(t) = [{y^{\rm{T}}}(t),{y^{\rm{T}}}(t - \tau (t)),{y^{\rm{T}}}(t - \eta (t) - \tau (t))]\) and M is defined as (7). Therefore, if (7) is established, the system (6) is asymptotically stable, i.e., the agents in system (4) achieve an asymptotic consensus.

In practice, the input delay between the controller and actuator usually changes relatively slowly, but the derivative of communication delay may be greater than one or unknown for various communication constraints. When τ(t) satisfies Assumption 1 and the derivative of η(t)is not less than one or unknown, we choose the following Lyapunov-Krasovskii functional

$$\matrix{{V(t) = {y^{\rm{T}}}(t)Py(t) + \int_{ - \sigma }^0 {\int_{t + \theta }^t {{{\dot y}^{\rm{T}}}} } (s){R_1}\dot y(s){\rm{d}}s{\rm{d}}\theta + } \hfill \cr {\int_{ - h - \sigma }^0 {\int_{t + \theta }^t {{{\dot y}^{\rm{T}}}} } (s){R_2}\dot y(s){\rm{d}}s{\rm{d}}\theta.} \hfill \cr }$$

Thus, we can obtain the following consensus condition □

Theorem 2. τ(t) satisfies Assumption 1, and d ⩾ 1, or the derivative of η (t) is unknown, and the interconnection topology \(\overline G\) of multi-agent system (4) has the leader as a globally reachable node. The agents in system (4) achieve an asymptotic consensus, i.e., \({\lim\nolimits_{t \rightarrow \infty }}{x_i}(t) = {x_0}\), \({\lim\nolimits_{t \rightarrow \infty }}{v_i}(t) = 0,i \in \Lambda\), i ∈ Λ, if the following LMI

$$\left[ {\matrix{{{M_{f11}}} \hfill & {{M_{f12}}} \hfill & {{M_{f13}}} \hfill \cr {} \hfill & {{M_{f22}}} \hfill & {{M_{f23}}} \hfill \cr {} \hfill & * \hfill & {{M_{f33}}} \hfill \cr } } \right] < 0$$

holds, where

$$\matrix{{{M_{f11}} = H_1^{\rm{T}}P + P{H_1} + \sigma H_1^{\rm{T}}{R_1}{H_1} + (h + \sigma )H_1^{\rm{T}}{R_2}{H_1} + } \hfill \cr {{\sigma ^{ - 1}}{R_1} - {{(h + \sigma )}^{ - 1}}{R_2}} \hfill \cr {{M_{f12}} = P{H_2} + \sigma H_1^{\rm{T}}{R_1}{H_2} + (h + \sigma )H_1^{\rm{T}}{R_2}{H_2} + {\sigma ^{ - 1}}{R_1}} \hfill \cr {{M_{f13}} = P{H_3} + \sigma H_1^{\rm{T}}{R_1}{H_3} + (h + \sigma ) + H_1^{\rm{T}}{R_2}{H_3}} \hfill \cr {{{(h + \sigma )}^{ - 1}}{R_2}} \hfill \cr {{M_{f22}} = \sigma H_2^{\rm{T}}{R_1}{H_2} + (h + \sigma )H_2^{\rm{T}}{R_2}{H_2} - {\sigma ^{ - 1}}{R_1}} \hfill \cr {{M_{f23}} = \sigma H_2^{\rm{T}}{R_1}{H_3} + (h + \sigma )H_1^{\rm{T}}{R_2}{H_3}} \hfill \cr {{M_{f33}} = \sigma H_3^{\rm{T}}{R_1}{H_3} + (h + \sigma )H_3^{\rm{T}}{R_2}{H_3} - {{(h + \sigma )}^{ - 1}}{R_2}} \hfill \cr }$$

and P, Q j , R j j = 1, 2, 3 are positive definite matrices with appropriate dimensions.

The proof of Theorem 2 is similar to that of Theorem 1, so we omit it to contain the length of this paper.

3.2 Switching interconnection topology

The structure of the interconnection topology will change as time changes due to the addition of new links or the obstacles in links. For example, the communication range of agents is limited, or the agents change communication links and coupling weights. In this section, we investigate the consensus problem of heterogeneous multi-agent systems with switching topologies. Here, we assume that the number of switching topologies is finite. The set of topologies is defined as \(\Omega = \{ {\bar G_w},w = 1,2, \cdots, N\}\), and each digraph \({\bar G_w}\) has the leader as the globally reachable node. The system (4) with time-varying delays and switching topologies can be represented as

$$\matrix{{{{\dot x}_s}(t) = {v_s}(t)} \hfill \cr {{{\dot v}_s}(t) = - {k_2}I_m^w{v_s}(t - \tau (t)) + {k_1}[A_{ss}^w{x_s}(t - \eta (t) - \tau (t)) + } \hfill \cr {A_{sf}^w{x_f}(t - \eta (t) - \tau (t)) - D_s^w{x_s}(t - \tau (t))] + } \hfill \cr {B_s^w({x_0}{1_m} - {x_s}(t))} \hfill \cr {{{\dot x}_f}(t) = A_{fs}^w{x_s}(t - \eta (t) - \tau (t)) + A_{ff}^w{x_f}(t - \eta (t) - \tau (t)) - } \hfill \cr {D_f^w{x_f}(t - \tau (t)) - B_f^w({x_f}(t) - {x_0}{1_n}).} \hfill \cr }$$
(8)

Taking the variable transformation \({\bar x_i}(t) = {x_i}(t) - {x_0}\), we can get

$$\matrix{{{{\dot \bar x}_s}(t) = {v_s}(t)} \hfill \cr {{{\dot v}_s}(t) = - {k_2}I_m^w{v_s}(t - \tau (t)) + {k_1}[A_{ss}^w{{\bar x}_s}(t - \eta (t) - \tau (t)) - } \hfill \cr {A_{sf}^w{{\bar x}_f}(t - \eta (t) - \tau (t)) - D_s^w{{\bar x}_s}(t - \tau (t))] - B_s^w{{\bar x}_s}(t)} \hfill \cr {{{\dot \bar x}_f}(t) = A_{fs}^w{{\bar x}_s}(t - \eta (t) - \tau (t)) + A_{ff}^w{{\bar x}_f}(t - \eta (t) - \tau (t)) - } \hfill \cr {D_f^w{{\bar x}_f}(t - \tau (t)) - B_f^w{{\bar x}_f}(t).} \hfill \cr }$$
(9)

System (9) can be rewritten as

$$\dot y(t) = H_1^wy(t) + H_2^wy(t - \tau (t)) + H_3^wy(t - \eta (t) - \tau (t))$$
(10)

where

and

Theorem 3. τ(t) and η(t) satisfy Assumptions 1 and 2, and the interconnection topology G w of multi-agent systems (8) has the leader as a globally reachable node. Then, multi-agent systems (8) reach an asymptotic consensus, i.e., \({\lim _{t \rightarrow \infty }}{x_i}(t) = {x_0},\,{\lim _{t \rightarrow \infty }}{v_i}(t) = 0,\,i \in \Lambda\), if the following LMIs

$$\left[ {\matrix{{{M_{s11}}} \hfill & {{M_{s12}}} \hfill & {{M_{s13}}} \hfill \cr {} \hfill & {{M_{s22}}} \hfill & {{M_{s23}}} \hfill \cr {} \hfill & * \hfill & {{M_{s33}}} \hfill \cr } } \right] < 0$$
(11)

hold for w = 1, 2, ⋯, N, where

$$\matrix{{{M_{s11}} = H_1^{w{\rm{T}}}P + PH_1^w + {Q_1} + {Q_2} + \sigma H_1^{\rm{T}}{R_1}H_1^w + } \hfill \cr {(h + \sigma )H_1^{w{\rm{T}}}{R_2}H_1^w - {\sigma ^{ - 1}}{R_1} - {{(h + \sigma )}^{ - 1}}{R_2}} \hfill \cr {{M_{s12}} = PH_2^w + \sigma H_1^{w{\rm{T}}}{R_1}{H_2} + } \hfill \cr {(h + \sigma )H_1^{w{\rm{T}}}{R_2}H_2^w + {\sigma ^{ - 1}}{R_1}} \hfill \cr {{M_{s13}} = PH_3^w + \sigma H_1^{w{\rm{T}}}{R_1}H_3^w + (h + \sigma ) + H_1^{w{\rm{T}}}{R_2}H_3^w + } \hfill \cr {{{(h + \sigma )}^{ - 1}}{R_2}} \hfill \cr {{M_{s22}} = (\mu - 1){Q_1} + \sigma H_2^{w{\rm{T}}}{R_1}H_2^w + (h + \sigma )H_2^{w{\rm{T}}}{R_2}H_2^w - } \hfill \cr {{\sigma ^{ - 1}}{R_1}} \hfill \cr {{M_{s23}} = \sigma H_2^{w{\rm{T}}}{R_1}H_3^w + (h + \sigma )H_1^{w{\rm{T}}}{R_2}H_3^w} \hfill \cr {{M_{s33}} = (d + \mu - 1){Q_2} + \sigma H_3^{\rm{T}}{R_1}H_3^w + } \hfill \cr {(h + \sigma )H_3^{w{\rm{T}}}{R_2}H_3^w - {{(h + \sigma )}^{ - 1}}{R_2}} \hfill \cr }$$

and P, Q j , R j , j = 1, 2, 3 are positive definite matrices with appropriate dimensions.

Proof. Choosing a Lyapunov-Krasovskii functional for system (10)

$$\matrix{{V(t) = {V_1}(t) + {V_2}(t) + {V_3}(t),} \hfill \cr {{V_1}(t) = {y^{\rm{T}}}(t)Py(t),} \hfill \cr {{V_2}(t) = \int_{t - \tau (t)}^t {{y^{\rm{T}}}} (s){Q_1}y(s){\rm{d}}s + } \hfill \cr {\int_{t - eta(t) - \tau (t)}^t {{y^{\rm{T}}}} (s){Q_2}y(s){\rm{d}}s,} \hfill \cr {{V_3}(t) = \int_{ - \sigma }^0 {\int_{t + \theta }^t {{{\dot y}^{\rm{T}}}} } (s){R_1}\dot y(s){\rm{d}}s{\rm{d}}\theta + } \hfill \cr {\int_{ - h - \sigma }^0 {\int_{t + \theta }^t {{{\dot y}^{\rm{T}}}} } (s){R_2}\dot y(s){\rm{d}}s{\rm{d}}\theta.} \hfill \cr }$$

Calculating the derivative of V(t), we get

$$\matrix{{\dot V(t) = {{\dot y}^{\rm{T}}}(t)Py(t) + {y^{\rm{T}}}P\dot y(t) + {y^{\rm{T}}}(t)({Q_1} + {Q_2})y(t) + } \hfill \cr {(\mu - 1){y^{\rm{T}}}(t - \tau (t)){Q_1}y(t - \tau (t)) + (d + \mu - 1){y^{\rm{T}}}} \hfill \cr {(t - \eta (t) - \tau (t)){Q_2}y(t - \eta (t) - \tau (t)) + \sigma {{\dot y}^{\rm{T}}}(t)} \hfill \cr {{R_1}\dot y(t) - {\sigma ^{ - 1}}({y^{\rm{T}}}(t) - {y^{\rm{T}}}(t - \tau (t))){R_1}(y(t) - } \hfill \cr {y(t - \tau (t))) + (h + \sigma ){{\dot y}^{\rm{T}}}(t){R_2}\dot y(t) - } \hfill \cr {{{(h + \sigma )}^{ - 1}}({y^{\rm{T}}}(t - \tau (t)) - {y^{\rm{T}}}(t - \eta (t) - \tau (t)))} \hfill \cr {{R_2}(y(t - \tau (t)) - y(t - \eta (t) - \tau (t))).} \hfill \cr }$$

From Lemma 1, we have

$$\dot V(t)\leqslant{\varphi ^{\rm{T}}}(t)M\varphi (t)$$
(12)

where \({\varphi ^{\rm{T}}}(t) = [{y^{\rm{T}}}(t),{y^{\rm{T}}}(t - \tau (t)),{y^{\rm{T}}}(t - \eta (t) - \tau (t))]\) and M is defined as (11). Therefore, if (11) is established, the system (10) is asymptotically stable, i.e., the agents in system (8) reach an asymptotic consensus.

Remark 1. If τ(t) satisfies Assumption 1, and d ⩾ 1, or the derivative of η(t) is unknown, we can use the same Lyapunov-Krasovskii functional as that in Theorem 2. to get the consensus condition for the system with switching topologies, but we omit it here to avoid repetition.

4 Simulation results

In this paper, we assume that the multi-agent system is composed of two second-order agents and three first-order agents and a static leader, and the leader is the globally reachable node of the topology.

Example 1. The interconnection topology of system (4) is given in Fig. 1. The node 0 is the static leader, and the nodes 1, 2and the nodes 3, 4, 5 denote second-order agents and first-order agents respectively. We assume that the weights of edges are: a 12 = 1, a 23 = 0.2, a 34 = 0.2, a 45 = 0.3, a 52 = 0.3, b 5 = 1.5. and the control gains are chosen as k 1 = 0.1 and k2 = 1. The position of static leader is chosen as x 0 = 1, and the initial position and velocity of each node are generated randomly.

  1. 1)

    The input delay and communication delay are time-varying. We choose η(t) = 6 ∣sin(0.1t)∣ (s), and the derivative of η(t) is less than 1 that satisfies Assumption 1. By using the LMI toolbox in Matlab for the LMI (7) in Theorem 1, we can get τ < 0.478 s. In this section, we assume that τ(t) = 0.3 ∣sin(t)∣ (s), and the simulation results are shown in Fig. 2. Thus, each agent converges to the leader’s state, i.e., \({\lim\nolimits_{t \rightarrow \infty }}{x_i}(t) = {x_0}\), i = 1, 2, ⋯, 5.

  2. 2)

    We choose d > 1 and η(t) = 6 ∣sin(t)∣ (s)that satisfies Theorem 2. From the condition (7), we can get τ < 0.417 s. Choosing τ(t) = 0.3 ∣sin(t)∣ (s), and we obtain that each agent converges to the leader’s state, i.e., \({\lim\nolimits_{t \rightarrow \infty }}{x_i}(t) = 1\), i = 1, 2, ⋯, 5 and \({\lim\nolimits_{t \rightarrow \infty }}{v_i}(t) = 0\), i = 1, 2. The simulation results are shown in Fig. 3.

Fig. 1
figure 1

Interconnection topology with five agents and a leader

Fig. 2
figure 2

Switching signal with dwell time τ 1 = 17.7486, and τ 2 = 11.8165

Fig. 3
figure 3

Agents with d > 1 under fixed topology

Example 2. Consider a network of five agents and a static leader given by (8). The interconnection topology of the system is switched between the topology 1 in Fig. 4 and the topology 2 in Fig. 5. In the simulation, the interconnection topology is switched from topology 1 to topology 2 every 5 s. In topology 1, we choose the weights as: a 12 = 0.2, a 32 = 0.3, a 42 = 0.05, a 45 = 0.05, a 52 = 0.3, b 2 = 1.2. In topology 2, we choose the weights as: a 15 = 0.1, a 21 = 0.1, a32 = 0.3, a 43 = 0.1, a 53 = 0.3, b 1 = 0.8. Topology 1 and topology 2 has the same control gains that are given by k 1 = 0. 2 and k 2 = 1.

  1. 1)

    Consider the input delays and communication delays are time-varying. Choose η(t) = 6 ∣sin(0.02πt)∣ (s) and the derivative d < 1 satisfying Assumption 1. By using the LMI toolbox in Matlab for the LMI (11) in Theorem 2, we get τ < 0.812 s. In this section, we assume τ(t) = 0.3 ∣sin(0.5πt)∣ (s), and we obtain that each agent in system (8) converges to the leader’s state, i.e., \({\lim\nolimits_{t \rightarrow \infty }}{x_i}(t) = {x_0}\), i = 1, 2, ⋯, 5 and \({\lim\nolimits_{t \rightarrow \infty }}{v_i}(t) = 0\), i = 1, 2. The simulation results are shown in Fig. 6.

  2. 2)

    Choose η(t) = 6 ∣sin(2t)∣ (s)thatsatisfies d > 1. From condition (11), we can get τ < 0.79s. By choosing τ(t) = 0.3 ∣sin(0.5πt)∣ (s), the closed-loop system (8) achieves an asymptotic consensus, i.e., \({\lim _{t \rightarrow \infty }}{x_i}(t) = 1\), \({\lim _{t \rightarrow \infty }}{v_i}(t) = 0\), i = 1, 2, ⋯, 5. The simulation results are shown in Fig. 7.

Fig. 4
figure 4

Topology 1

Fig. 5
figure 5

Topology 2

Fig. 6
figure 6

Agents with d < 1 under switching topologies

Fig. 7
figure 7

Agents with d > 1 under switching topologies

5 Conclusion

In this paper, a stationary leader-following consensus protocol is adopted to solve the consensus problem for heterogeneous multi-agent systems composed of first-order and second-order agents with time-varying input delay and communication delay under fixed topology and switching topologies. By constructing Lyapunov-Krasovskii functional, the sufficient consensus conditions are provided for the heterogeneous multi-agent systems with time-varying input delay and communication delay under fixed and switching topologies respectively. Furthermore, consensus conditions are obtained for unknown or different values of the derivative of communication delay. Although the consensus conditions are all formulated in the form of LMIs, the main results provide consensus criteria to obtain the time delay upper-bounds by using the LMI tool box in Matlab.