Introduction

In recent years, as a significant research branch of distributed artificial intelligence (DAI) and computational intelligence, the distributed cooperative control for multi-agent systems (MASs) has become a hot research topic. The related applications of DAI include mobile robots [1], vehicle fleet [2], satellite formation [3], multiple biomimetic robotic fish [4], unmanned aerial vehicle [5], unmanned ground vehicle [6], and so on. Through information exchanges, a group of agents can greatly enhance the intelligence degree of individual behavior and work cooperatively to accomplish some complex tasks that can not be successfully done by a single agent [7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23]. Wen et al. [7] studied the consensus controller of MASs with general linear dynamics and a fixed directed topology. By constructing a reduced-order observer-based protocol, Li et al. [8] devoted to the consensus problem for linear MASs under directed communication topologies. Wang et al. [9] researched the distributed tracking consensus problem for nonlinear leader-following MASs. Zou et al. [11] studied the adaptive output-feedback stabilization problem of stochastic strict-feedback systems with sensor uncertainty and unknown growth rate and stochastic disturbance. Liu et al. [12,13,14] mainly devoted to resolve three types of fixed-time event-triggered consensus problems for MASs.

From above literatures, we can see that the control protocol based on state feedback can resolve the consensus problem effectively, with the premise, is that the neighboring agents’ states are available. However, in practice, the states of MASs are always unavailable and only the output can be measured as feedback information [17,18,19,20]. Thus, it is necessary to design a suitable observer to estimate system states actually. [24] proposed a fuzzy observer for the periodic tracking control problem of nonlinear systems. In addition, a sliding-mode observer also can be devised to estimate the unavailable state. Sliding-mode observers not only provide practical possibilities for the technical implementation of state feedback, but also have been applied in many aspects of control engineering, e.g. replicating perturbation for achieving complete compensation to the disturbance and so on. Furthermore, in sliding-mode observers, the sliding mode can be designed artificially in advance, and its motion equation only depends on the selected switching function, while it is independent of the system parameters and external disturbances. Therefore, it possesses strong robustness. In [25, 26], sliding-mode observers with good robustness were designed for uncertain systems. For second-order nonlinear MASs, [27] studied consensus problems via sliding mode observer and controller, and for nonlinear MASs with high-order integral chained differentiators, the distributed adaptive fuzzy control via sliding-mode observers was proposed in [28]. In [29] and [30], sliding-observers based output consensus control were designed for homogeneous multi-agent systems and heterogeneous multi-agent systems, respectively. The observer-based output feedback control problem of network physical systems with periodic denial of service (DoS) attacks was studied in [31]. In most of the above existing literatures, sliding-mode observers were always designed without considering either external disturbances or nonlinear dynamics for general MASs, which motivates us to do the further work.

This work studies consensus control for MASs considering both nonlinearity and unknown disturbances via observer-based dynamic output method under directed switching topologies. The main contributions of our work are summarized as follows: (1) To estimate the actual and unavailable states, a local sliding-mode observer is constructed for nonlinear MASs with disturbances. (2) A novel distributed consensus controller under switching topologies is designed, in which some parameters are computed via the inequality. (3) Utilizing the Lyapunov function and LMI technique, sufficient conditions for MASs, the controller gain and observer gain matrices are obtained simultaneously. (4) The result presented in this work can resolve the consensus for nonlinear MASs with unavailable states and disturbances under directed switching topologies. Comparing with literatures [12,13,14], we design a type of distributed consensus control protocol based on constructed sliding-mode observers with considering unavailable states, nonlinear dynamics and unknown disturbances, simultaneously. Our work is different from [25, 26], where the observers were designed for traditional single-systems, the sliding-mode observers in our results could estimate states for MASs as one problem of DAI. Compared to [19] which investigated consensus for linear MASs via reduced-order observers, our theoretical approach is able to solve the disturbances and nonlinear dynamics. In contrast to the consensus protocol proposed in [32] which imposed the constraint that the state information is available, our controller based on sliding-mode observers could resolve the unavailable states, as well as disturbances and nonlinear dynamics.

Graph theory and problem formulation

Graph theory

The interaction topologies between agents is described by the directed graph \(G = \left( {v,\varepsilon ,A} \right) \), in which \(v = \left\{ {{v_1}, \ldots ,{v_n}} \right\} \) denotes the set of nodes, \(\varepsilon \subset v \times v\) the set of edges and \(A = \left[ {{a_{ij}}} \right] \) the adjacency matrix. If \(\left( {i,j} \right) \in \varepsilon \), then \({a_{ij}} = 1\), otherwise \({a_{ij}} = 0\). In particular, \({a_{ii}} = 0\). The Laplacian matrix for graph G is \(L=D-A\), with \(D = diag\left\{ {{d_1}, \ldots ,{d_n}} \right\} \) is called its degree matrix whose diagonal element of the matrix D is \({d_i} = \sum \nolimits _{j = 1}^n {{a_{ij}}},i = 1, \ldots ,n \).

Here a piecewise constant switching signal function \(\varsigma \left( t \right) :\left[ {0,\infty } \right) \mapsto \left\{ {1,2, \ldots ,m} \right\} \buildrel \varDelta \over = \varOmega \) represents m variable topologies. Let \({\lambda _{\varsigma \left( t \right) i}}\) be the ith positive real eigenvalue of Laplacian matrix \({L_{\varsigma \left( t \right) }}\) corresponding to graph \({G_{\varsigma \left( t \right) }}\), in which \({\lambda _{\max }}\) and \({\lambda _{\min }}\) are the maximum and minimum nonzero eigenvalues, respectively. Moreover, we assume \({G_{\varsigma \left( t \right) }}\) is directed and balanced in this work.

Lemma 1

[33] Define symmetric matrix \({L_c} = \left[ {{L_{{c_{ij}}}}} \right] \in {R^{n \times n}}\), where \({L_{{c_{ij}}}} = \left\{ {\begin{array}{ll} {\left( {n - 1} \right) /n,}&{}{i = j}\\ { - 1/n,}&{}{i \ne j} \end{array}} \right. \), and some properties are as follows:

  1. 1.

    The eigenvalues of \(L_c\) include 1 with multiplicity \(n-1\) and 0 with multiplicity 1. \(\mathbf{{1}}_n^T\) and \({\mathbf{{1}}_n}\) are respectively the left and right eigenvectors of \(L_c\) related to the zero eigenvalue.

  2. 2.

    There is an orthogonal matrix U, with \({\mathbf{{1}}_n}/\sqrt{n} \) as the last column, and thus satisfying \({U^T}{L_c}U = \left[ {\begin{array}{*{20}{c}} {{I_{n - 1}}}&{}0\\ 0&{}0 \end{array}} \right] \). Let \(L \in {R^{n \times n}}\) be the Laplacian matrix of any balanced graph, and hence \({U^T}LU = \left[ {\begin{array}{*{20}{c}} {{L_1}}&{}0\\ 0&{}0 \end{array}} \right] \) , with the positive definite matrix \({L_1} \in {R^{(n - 1) \times (n - 1)}}\) in the connected graph. Hence, there is an orthogonal matrix \({\varPi _1}\), which makes \({L_1} = {\varPi _1}{\varLambda _1}\varPi _1^T\) , with \({\varLambda _1} = \mathrm{{diag}}\left\{ {{\lambda _1} \ldots ,{\lambda _{n - 1}}} \right\} \), in which \({\lambda _1} \ldots ,{\lambda _{n - 1}}\) are \(n-1\) eigenvalues of Laplacian matrix.

Problem formulation

Consider the nonlinear MASs with the dynamic model as

$$\begin{aligned} \left\{ {\begin{array}{*{20}{c}} {{{\dot{x}}_i}\left( t \right) = A{x_i}\left( t \right) + B{u_i}\left( t \right) + f\left( {{x_i}\left( t \right) } \right) + D{\omega _i}\left( t \right) }\\ {{y_i}\left( t \right) = C{x_i}\left( t \right) ,{} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} i = 1,2, \ldots ,n} \end{array}} \right. \end{aligned}$$
(1)

in which \({x_i}\left( t \right) \in {R^r},{u_i}\left( t \right) \in {\mathrm{{R}}^m}\) and \({y_i}\left( t \right) \in {\mathrm{{R}}^p}\) are respectively the state, control input (control protocol) and measurement output. \(f\left( {{x_i}\left( t \right) } \right) \) is a nonlinear function and \({\omega _i}\left( t \right) \in {L_2}(0,\infty )\) is disturbance. ABCD are constant matrices with the appropriate dimensions. B and C are full-column rank and full-row rank matrices, respectively.

The controlled output function is chosen as

$$\begin{aligned} {z_i}\left( t \right) = {x_i}\left( t \right) - \frac{1}{n}\sum \limits _{j = 1}^n {{x_j}\left( t \right) } ,{} {} {} {} {} {} {} {} {} i = 1, \ldots n, \end{aligned}$$
(2)

Definition 1

For a class of MASs (1), if all the states of agents satisfy

$$\begin{aligned} \mathop {\lim }\limits _{t \rightarrow \infty } \left( {{x_i}\left( t \right) - {x_j}\left( t \right) } \right) = 0{} {} {} ,{} {} {} {} \forall i,j \in \left\{ {1,2, \ldots ,n} \right\} \end{aligned}$$

the MASs (1) is asymptotically convergent, and reach state consensus. And the control target is to construct the consensus controller \({u_i}(t)\) such that

$$\begin{aligned} {\int _0^\infty {\left\| {z\left( t \right) } \right\| } ^2}\mathrm{d}t < {\gamma ^2}{\int _0^\infty {\left\| {\bar{\omega }\left( t \right) } \right\| } ^2}\mathrm{d}t, \end{aligned}$$

where \(z\left( t \right) = {\left( {z_1^T\left( t \right) , \ldots ,z_n^T\left( t \right) } \right) ^T}\), \(\omega \left( t \right) = \left( \omega _1^T\left( t \right) , \ldots ,\right. \left. \omega _n^T\left( t \right) \right) ^T\), \({{\bar{\omega }}_i}\left( t \right) = {\omega _i}\left( t \right) - \frac{1}{n}\sum \limits _{j = 1}^n {{\omega _j}} \left( t \right) \), \(\bar{\omega }\left( t \right) = \left( \bar{\omega }_1^T\left( t \right) ,\right. \left. \ldots ,\bar{\omega }_n^T\left( t \right) \right) ^T\), \(\forall \bar{\omega }\left( t \right) \in {L_2}[0,\infty )\), and \(\gamma > 0\) is a given \({H_\infty }\) performance index.

Assumption 1

The nonlinear function \(f\left( {{x_i}\left( t \right) } \right) \) satisfies the Lipschitz condition with a Lispschitz constant \(\mu > 0\) , that is

$$\begin{aligned} \left\| {f\left( \mathrm{{x}} \right) - f\left( y \right) } \right\| \le \mu \left\| {x - y} \right\| \begin{array}{*{20}{c}} ,&{\forall x,y \in {R^r}} \end{array} \end{aligned}$$

Graph theory and problem formulation

For system (1), we propose the following sliding-mode observers

$$\begin{aligned} \dot{{\hat{x}}}_i(t)= A{{\hat{x}}_i}\left( t \right) + B{u_i}\left( t \right) + G\left( {{{\hat{y}}_i}\left( t \right) - {y_i}\left( t \right) } \right) {} + f\left( {{{\hat{x}}_i}\left( t \right) } \right) + D{v_i}\left( t \right) \end{aligned}$$
(3)

where \({{\hat{x}}_i}\left( t \right) \) is the estimated state, and \({v_i}\left( t \right) \in R\) is the nonlinear input (sliding-mode strategy) of the observer. G is the gain matrix. D is a constant matrix with the appropriate dimensions.

Set state error for the ith agent as

$$\begin{aligned} {e_i}\left( t \right) = {{\hat{x}}_i}\left( t \right) - {x_i}\left( t \right) \end{aligned}$$
(4)

and in this work, the nonlinear input is designed as

$$\begin{aligned} {v_i}\left( t \right) = \left\{ {\begin{array}{*{20}{c}} { - \rho \frac{{F{{\varPsi _i}(t)}}}{{\left\| {F{{\varPsi _i}(t)}} \right\| }},}&{}{{{\varPsi _i}(t)} \ne 0}\\ {0,}&{}{{{\varPsi _i}(t)}= 0} \end{array}} \right. \end{aligned}$$
(5)

where \({{\varPsi _i}(t)}=C{{\hat{x}}_i}\left( t \right) -y_i(t)\), F matrix to be solved, and \(\rho \) is a given positive constant. From (3) and (4), we have

$$\begin{aligned} {{\dot{e}}_i}\left( t \right) {} =&\left( {A + GC} \right) {e_i}\left( t \right) + f\left( {{{\hat{x}}_i}\left( t \right) } \right) - f\left( {{x_i}\left( t \right) } \right) \nonumber \\&+ D\left( {{v_i}\left( t \right) - {\omega _i}\left( t \right) } \right) \end{aligned}$$
(6)

Set \( e\left( t \right) = \left( e_1^T\left( t \right) , \ldots ,e_n^T\left( t \right) \right) ^T \), \(v\left( t \right) = ( v_1^T\left( t \right) , \ldots ,\)\( v_n^T\left( t \right) )^T\) and (6) is further rewritten as

$$\begin{aligned} \dot{e}\left( t \right) =&[{I_n} \otimes \left( {A + GC} \right) ]e\left( t \right) + \left[ {\begin{array}{*{20}{c}} {f\left( {{{\hat{x}}_1}\left( t \right) } \right) - f\left( {{x_1}\left( t \right) } \right) }\\ \vdots \\ {f\left( {{{\hat{x}}_n}\left( t \right) } \right) - f\left( {{x_n}\left( t \right) } \right) } \end{array}} \right] \nonumber \\&+ \left( {{I_n} \otimes D} \right) \left( {v\left( t \right) - \omega \left( t \right) } \right) \end{aligned}$$
(7)

Consensus control protocol design based on estimated system states

According to Definition 1, the following consensus control protocol is constructed

$$\begin{aligned} {u_i}\left( t \right) = K\sum \limits _{j \in {N_i}(t)} {{a_{ij}}\left( t \right) } \left( {{{\hat{x}}_i}\left( t \right) - {{\hat{x}}_j}\left( t \right) } \right) \end{aligned}$$
(8)

where \(K \in {\mathrm{{R}}^{m \times r}}\) represents the control gain matrix.

The structure for the proposed distributed consensus control (8) based on sliding-mode observers (3) of MASs (1) is shown in Fig. 1. It is the distributed consensus control structure based on sliding-mode observers (3) of MASs (1), which is composed of agents, communication network, a sliding-mode observer and a distributed consensus controller. The main concern of this work is how to design and analyze the distributed consensus controller based on sliding-mode observers under directed switching topologies in networks.

Fig. 1
figure 1

Distributed consensus control structure

According to Lemma 1, we have

$$\begin{aligned} u\left( t \right)= & {} \left( {{L_{\varsigma \left( t \right) }} \otimes K} \right) \hat{x}\left( t \right) \end{aligned}$$
(9)
$$\begin{aligned} z\left( t \right)= & {} \left( {{L_c} \otimes {I_r}} \right) x\left( t \right) \end{aligned}$$
(10)

with \(u ( t ) = ( u_1^T ( t ), \ldots ,u_n^T ( t ) )^T, x ( t ) = ( x_1^T ( t ), \ldots , \) \(x_n^T ( t ) )^T,\) \(\hat{x}( t ) = ( \hat{x}_1^T ( t ), \ldots ,\hat{x}_n^T( t ) )^T.\)

Based on (2), the derivative of controlled output \({z_i}\left( t \right) \) is

$$\begin{aligned} {{\dot{z}}_i}\left( t \right) =&A\left( {{x_i}\left( t \right) - \frac{1}{n}\sum \limits _{j = 1}^n {{x_j}\left( t \right) } } \right) + B\left( {{u_i}\left( t \right) - \frac{1}{n}\sum \limits _{j = 1}^n {{u_j}\left( t \right) } } \right) \nonumber \\&+ f\left( {{x_i}\left( t \right) } \right) - \frac{1}{n}\sum \limits _{j = 1}^n {f({x_j}\left( t \right) } ) + D{{\bar{\omega }}_i}\left( t \right) \end{aligned}$$
(11)

The following main result is provided.

Theorem 1

For MASs (1), we set \({P_2}D = {C^T}{F^T}\), \(\left\| {{\omega _i}\left( t \right) } \right\| \le \rho \). If there exists positive definite matrices \(P_1\) ,\(P_2\) , positive constants \(\mu \),\(\gamma \) and matrices \(Q_1\) , \(Q_2\) , the inequality

$$\begin{aligned} \left[ {\begin{array}{*{20}{c}} \varOmega &{}{{P_1}D}&{}{{\lambda _{\varsigma \left( t \right) i}}{Q_1}}&{}0&{}{{P_1}}\\ *&{}{ - {\gamma ^2}I}&{}0&{}0&{}0\\ *&{}*&{}M&{}{{P_2}}&{}0\\ *&{}*&{}*&{}{ - \frac{1}{\mu }I}&{}0\\ *&{}*&{}*&{}*&{}{ - \frac{1}{\mu }I} \end{array}} \right] < 0 \end{aligned}$$
(12)

is satisfied, where \(\varOmega = {P_1}A + {A^T}{P_1} + {\lambda _{\varsigma \left( t \right) i}}{Q_1} + {\lambda _{\varsigma \left( t \right) i}}Q_1^T + \left( {\mu + 1} \right) I\), \(M = {P_2}A + {A^T}{P_2} + {Q_2} + Q_2^T + \mu I\), \({Q_1} = {P_1}BK, {Q_2} = {P_2}GC\),\({P_2}D = {C^T}{F^T}\), \({\lambda _{\varsigma \left( t \right) i}} = {\lambda _{\min }}\) and \({\lambda _{\max }}\). \(\mu > 0\) denotes the Lispschitz constant. The system (1) is asymptotically stable, with \({H_\infty }\) performance index \(\gamma \) satisfying Definition 1.

Proof

Construct Lyapunov function

$$\begin{aligned} V\left( t \right)&= {z^T}\left( t \right) \left( {{I_n} \otimes {P_1}} \right) z\left( t \right) + {e^T}\left( t \right) \left( {{I_n} \otimes {P_2}} \right) e\left( t \right) \end{aligned}$$
(13)

According to (10), (11) and Lemma 1, compute the derivative of \({V}\left( t \right) \) as

$$\begin{aligned} {{\dot{V}}}( t)=&2{z^T}\left( t \right) \left( {{I_n} \otimes {P_1}} \right) \dot{z}\left( t \right) +2{e^T}\left( t \right) \left( {{I_n} \otimes {P_2}} \right) \dot{e}\left( t \right) \nonumber \\ =&2{z^T}\left( t \right) \left( {{L_c} \otimes {P_1}A} \right) x\left( t \right) + 2{z^T}\left( t \right) \left( {{L_c} \otimes {P_1}B} \right) u\left( t \right) \nonumber \\&+ 2\sum \limits _{i = 1}^n {z_i^T\left( t \right) {P_1}} \left[ {f\left( {{x_i}\left( t \right) } \right) - \frac{1}{n}\sum \limits _{j = 1}^n {f\left( {{x_j}\left( t \right) } \right) } } \right] \nonumber \\&+ 2{z^T}\left( t \right) \left( {{I_n} \otimes {P_1}D} \right) \bar{\omega }\left( t \right) \nonumber \\&+ 2{e^T}\left( t \right) \left[ {{I_n} \otimes {P_2}\left( {A + GC} \right) } \right] e\left( t \right) \nonumber \\&+ 2\sum \limits _{i = 1}^n {e_i^T\left( t \right) {P_2}} \left[ {f\left( {{{\hat{x}}_i}\left( t \right) } \right) - f\left( {{x_i}\left( t \right) } \right) } \right] {} \nonumber \\&+ 2{e^T}\left( t \right) \left( {{I_n} \otimes {P_2}D} \right) \left( {v\left( t \right) - \omega \left( t \right) } \right) \end{aligned}$$
(14)

Here, we set \(\overline{x} \left( t \right) {} \mathrm{{ = }}\frac{1}{n}\sum \limits _{j = 1}^n {{x_j}\left( t \right) }\). Because \(\sum \limits _{i = 1}^n {{z_i}\left( t \right) = 0} \) , ones obtain

$$\begin{aligned}&2\sum \limits _{i = 1}^n {z_i^T\left( t \right) {P_1}} \left[ {f\left( {{x_i}\left( t \right) } \right) - \frac{1}{n}\sum \limits _{j = 1}^n {f\left( {{x_j}\left( t \right) } \right) } } \right] \nonumber \\&\quad = 2\sum \limits _{i = 1}^n {{z_i}^T\left( t \right) {P_\mathrm{{1}}}\left[ {f\left( {{x_i}\left( t \right) } \right) - f\left( {\overline{x} \left( t \right) } \right) } \right] } \nonumber \\&\qquad + 2(\sum \limits _{i = 1}^N {{z_i}^T\left( t \right) ){P_\mathrm{{1}}}\left[ {f\left( {\overline{x} \left( t \right) } \right) - \frac{1}{n}\sum \limits _{j = 1}^n {f\left( {{x_j}\left( t \right) } \right) } } \right] }\nonumber \\&\quad = 2\sum \limits _{i = 1}^n {{z_i}^T\left( t \right) {P_\mathrm{{1}}}\left[ {f\left( {{x_i}\left( t \right) } \right) - f\left( {\overline{x} \left( t \right) } \right) } \right] } \end{aligned}$$
(15)

According to Assumption 1, (15) can be transformed as

$$\begin{aligned}&2\sum \limits _{i = 1}^n {z_i^T\left( t \right) {P_1}} \left[ {f\left( {{x_i}\left( t \right) } \right) - \frac{1}{n}\sum \limits _{j = 1}^n {f\left( {{x_j}\left( t \right) } \right) } } \right] \nonumber \\&\quad \le 2\mu \sum \limits _{i = 1}^n {\left\| {z_i^T\left( t \right) {P_1}} \right\| \left\| {\left( {{x_i}\left( t \right) - \frac{1}{n}\sum \limits _{j = 1}^n {{x_j}\left( t \right) } } \right) } \right\| } \nonumber \\&\quad = 2\mu \sum \limits _{i = 1}^n {\left\| {z_i^T\left( t \right) {P_1}} \right\| \left\| {{z_i}\left( t \right) } \right\| } \end{aligned}$$

Set \({Q_2} = {P_2}GC\), and based on Assumption 1, then combining (9),(10) and (14), we can get

$$\begin{aligned} {{\dot{V}}_1}\left( t \right) \le&2{x^T}\left( t \right) \left( {L_c^T{L_c} \otimes {P_1}A + L_c^T{L_c}{L_{\varsigma \left( t \right) }} \otimes {P_1}BK} \right) x\left( t \right) \nonumber \\&+ 2{x^T}\left( t \right) \left( {L_c^T{L_c}{L_{\varsigma \left( t \right) }} \otimes {P_1}BK} \right) e\left( t \right) \nonumber \\&+ {x^T}\left( t \right) \left( {L_c^T{L_c} \otimes \left( {\mu P_\mathrm{{1}}^\mathrm{{2}} + \mu I} \right) } \right) x\left( t \right) \nonumber \\&+2{x^T}\left( t \right) \left( {L_c^T \otimes {P_1}D} \right) \bar{\omega }\left( t \right) \nonumber \\&+{\mathrm{{e}}^T}\left( t \right) \left( {{I_N} \otimes \left( {{P_2}A + {A^T}{P_2} + {Q_2} + Q_2^T } \right) } \right) e\left( t \right) \nonumber \\&+{\mathrm{{e}}^T}\left( t \right) \left( {{I_N} \otimes \left( {\mu I + \mu {P_2}{P_2}} \right) } \right) e\left( t \right) \nonumber \\&+2\sum \limits _{i = 1}^N {e_i^T\left( t \right) } {P_2}D\left( {{v_i}\left( t \right) - {\omega _i}\left( t \right) } \right) \end{aligned}$$
(16)

Combining (5), \({P_2}D = {C^T}{F^T}\) and \(\left\| {{\omega _i}\left( t \right) } \right\| \le \rho \), we have

$$\begin{aligned}&2\sum \limits _{i = 1}^n {e_i^T\left( t \right) } {P_2}D\left( {{v_i}\left( t \right) - {\omega _i}\left( t \right) } \right) \\&\quad = 2\sum \limits _{i = 1}^n {e_i^T\left( t \right) } {P_2}D\left( { - \rho \frac{{F(C{{\hat{x}}_i}\left( t \right) -y_i(t))}}{{\left\| {F(C{{\hat{x}}_i}\left( t \right) -y_i(t))} \right\| }} - {\omega _i}\left( t \right) } \right) \\&\quad \le 2\sum \limits _{i = 1}^n {\left( { - \rho \cdot \left\| {e_i^T\left( t \right) {P_2}D} \right\| + \left\| {e_i^T\left( t \right) {P_2}D} \right\| \cdot \left\| {{\omega _i}\left( t \right) } \right\| } \right) }\\&\quad \le 2\sum \limits _{i = 1}^n {\left\| {e_i^T\left( t \right) {P_2}D} \right\| \cdot \left( { - \rho + \rho } \right) } \\&\quad = 0 \end{aligned}$$

So, we can obtain

$$\begin{aligned} \dot{V}\left( t \right) \le&2{x^T}\left( t \right) \left( {L_c^T{L_c} \otimes {P_1}A + L_c^T{L_c}{L_{\varsigma \left( t \right) }} \otimes {P_1}BK} \right) x\left( t \right) \nonumber \\&+ 2{x^T}\left( t \right) \left( {L_c^T{L_c}{L_{\varsigma \left( t \right) }} \otimes {P_1}BK} \right) e\left( t \right) \nonumber \\&+ {x^T}\left( t \right) \left( {L_c^T{L_c} \otimes \left( {{\mu _1}P_\mathrm{{1}}^\mathrm{{2}} + \mu I} \right) } \right) x\left( t \right) \nonumber \\&+ {e^T}\left( t \right) \left( {{I_n} \otimes \left( {{P_2}A + {A^T}{P_2} + {Q_2} + Q_2^T + \mu I + \mu P_\mathrm{{2}}^\mathrm{{2}}} \right) } \right) e\left( t \right) \nonumber \\&+ 2{x^T}\left( t \right) \left( {L_c^T \otimes {P_1}D} \right) \bar{\omega }\left( t \right) \end{aligned}$$
(17)

Based on Lemma 2, ones have

$$\begin{aligned}&U_{\varsigma \left( t \right) }^T{L_c}U_{\varsigma \left( t \right) }= \left[ {\begin{array}{*{20}{c}} {{I_{n - 1}}}&{}\mathrm{{0}}\\ \mathrm{{0}}&{}\mathrm{{0}} \end{array}} \right] \buildrel \varDelta \over = {{I'}_n}\\&U_{\varsigma \left( t \right) }^T{L_{\varsigma \left( t \right) }}U_{\varsigma \left( t \right) } =\left[ {\begin{array}{*{20}{c}} {{L_\mathrm{{1}}}}&{}\mathrm{{0}}\\ \mathrm{{0}}&{}\mathrm{{0}} \end{array}} \right] \buildrel \varDelta \over = L' \end{aligned}$$

in which, \({U_{\varsigma \left( t \right) }} \in {R^n}\) is an orthogonal matrix, and \(L_1>0\) since the balanced and directed graph \({G_{\varsigma \left( t \right) }} \) is connected. Then we can define:

$$\begin{aligned} \left\{ {\begin{array}{*{20}{c}} {{\varphi _{\varsigma \left( t \right) }}\left( t \right) = {{\left( {\varphi _{\varsigma \left( t \right) 1}^T\left( t \right) , \ldots ,\varphi _{\varsigma \left( t \right) n}^T\left( t \right) } \right) }^T} = \left( {U_{\varsigma \left( t \right) }^T \otimes {I_r}} \right) x\left( t \right) }\\ \begin{array}{l} {\sigma _{\varsigma \left( t \right) }}\left( t \right) = {\left( {\sigma _{\varsigma \left( t \right) 1}^T\left( t \right) , \ldots ,\sigma _{\varsigma \left( t \right) n}^T\left( t \right) } \right) ^T} = \left( {U_{\varsigma \left( t \right) }^T \otimes {I_r}} \right) \bar{\omega }\left( t \right) \\ {\chi _{\varsigma \left( t \right) }}\left( t \right) = {\left( {\chi _{\varsigma \left( t \right) 1}^T\left( t \right) , \ldots ,\chi _{\varsigma \left( t \right) n}^T\left( t \right) } \right) ^T} = \left( {U_{\varsigma \left( t \right) }^T \otimes {I_r}} \right) e\left( t \right) \end{array} \end{array}} \right. \end{aligned}$$

Then, (17) can be transformed as

$$\begin{aligned} \dot{V}\left( t \right)&\le 2\varphi _{\varsigma \left( t \right) }^T\left( t \right) \left( {{{I'}_n} \otimes {P_1}A + L' \otimes {P_1}BK} \right) {\varphi _{\varsigma \left( t \right) }}\left( t \right) \nonumber \\&\quad + 2\varphi _{\varsigma \left( t \right) }^T\left( t \right) \left( {L' \otimes {P_1}BK} \right) {\chi _{\varsigma \left( t \right) }}\left( t \right) \nonumber \\&\quad +{} \varphi _{\varsigma \left( t \right) }^T\left( t \right) \left( {{{I'}_n} \otimes \left( {\mu {P_1}{P_1} + \mu I} \right) } \right) {\varphi _{\varsigma \left( t \right) }}\left( t \right) \nonumber \\&\quad + 2\varphi _{\varsigma \left( t \right) }^T\left( t \right) \left( {{{I'}_n} \otimes {P_1}D} \right) {\sigma _{\varsigma \left( t \right) }}\left( t \right) \nonumber \\&\quad + \chi _{\varsigma \left( t \right) }^T\left( t \right) \left( {{I_n} \otimes \left( {{P_2}A \!+\! {A^T}{P_2} \!+\! {Q_2} \!+\! Q_2^T} \right) } \right) {\chi _{\varsigma \left( t \right) }}\left( t \right) \nonumber \\&\quad +\chi _{\varsigma \left( t \right) }^T\left( t \right) \left( {{I_n} \otimes \left( {\mu I + \mu P_\mathrm{{2}}^\mathrm{{2}}} \right) } \right) {\chi _{\varsigma \left( t \right) }}\left( t \right) \end{aligned}$$
(18)

Define

$$\begin{aligned} \left\{ {\begin{array}{*{20}{c}} \begin{array}{c} {\mathrm{Z}_{\varsigma \left( t \right) }}\left( t \right) = {\left( {\mathrm{Z}_{\varsigma \left( t \right) 1}^T\left( t \right) , \ldots ,\mathrm{Z}_{\varsigma \left( t \right) n - 1}^T\left( t \right) } \right) ^T}\\ {} {} {} {}{} {}{} {}{} = \left( {\varPi _{1\varsigma \left( t \right) }^T \otimes {I_{r - 1}}} \right) {\varphi _{\varsigma \left( t \right) }}\left( t \right) \end{array}\\ \begin{array}{c} {W_{\varsigma \left( t \right) }}\left( t \right) = {\left( {W_{\varsigma \left( t \right) 1}^T\left( t \right) , \ldots ,W_{\varsigma \left( t \right) n - 1}^T\left( t \right) } \right) ^T}\\ {} {} {} {}{} {}{} {}{}= \left( {\varPi _{1\varsigma \left( t \right) }^T \otimes {I_{r - 1}}} \right) {\sigma _{\varsigma \left( t \right) }}\left( t \right) \\ {\mathrm{E}_{\varsigma \left( t \right) }}\left( t \right) = {\left( {\mathrm{E}_{\varsigma \left( t \right) 1}^T\left( t \right) , \ldots ,\mathrm{E}_{\varsigma \left( t \right) n}^T\left( t \right) } \right) ^T}{} {} {} {}{} {}{} {}{}{}{}\\ = \left( {\varPi _{1\varsigma \left( t \right) }^T \otimes {I_r}} \right) {\chi _{\varsigma \left( t \right) }}\left( t \right) \end{array} \end{array}} \right. \end{aligned}$$

in which \({\varPi _{1\varsigma \left( t \right) }} \in {R^{\left( {n - 1} \right) \times \left( {n - 1} \right) }}\) and \({\varPi _{\varsigma \left( t \right) }} \in {R^{n \times n}}\) are orthogonal matrices. Eq.(18) can be further formed as

$$\begin{aligned}&\dot{V}\left( t \right) \le 2\mathrm{Z}_{\varsigma \left( t \right) }^T\left( t \right) \left( {{I_{n - 1}} \otimes {P_1}A + {\varLambda _1} \otimes {P_1}BK} \right) {\mathrm{Z}_{\varsigma \left( t \right) }}\left( t \right) \nonumber \\&+ 2\mathrm{Z}_{\varsigma \left( t \right) }^T\left( t \right) \left( {{\varLambda _1} \otimes {P_1}BK} \right) {\mathrm{E}_{\varsigma \left( t \right) }}\left( t \right) \nonumber \\&+\mathrm{Z}_{\varsigma \left( t \right) }^T\left( t \right) \left( {{I_{n - 1}} \otimes \left( {\mu P_\mathrm{{1}}^\mathrm{{2}} + \mu I} \right) } \right) {\mathrm{Z}_{\varsigma \left( t \right) }}\left( t \right) \nonumber \\&+ 2\mathrm{Z}_{\varsigma \left( t \right) }^T\left( t \right) \left( {{I_{n - 1}} \otimes {P_1}D} \right) {W_{\varsigma \left( t \right) }}\left( t \right) \nonumber \\&+ \mathrm{{E}}_{\varsigma \left( t \right) }^T\left( t \right) \left( {{I_n} \otimes \left( {{P_2}A + {A^T}{P_2} + {Q_2} + Q_2^T} \right) } \right) {\mathrm{{E}}_{\varsigma \left( t \right) }}\left( t \right) \nonumber \\&+\mathrm{{E}}_{\varsigma \left( t \right) }^T\left( t \right) \left( {{I_n} \otimes \left( {\mu I + \mu P_\mathrm{{2}}^\mathrm{{2}}} \right) } \right) {\mathrm{{E}}_{\varsigma \left( t \right) }}\left( t \right) \end{aligned}$$
(19)

The function is considered as follows for any \(T>0\)

$$\begin{aligned} {J_T} = \int _0^T {\mathrm{Z}_{}^T\left( t \right) } \mathrm{Z}\left( t \right) \mathrm{d}t - {\gamma ^2}\int _0^T {W_{}^T} \left( t \right) W\left( t \right) \mathrm{d}t \end{aligned}$$

With \(V(0)=0\) , we get

$$\begin{aligned} {J_T} {=} \int _0^T {{\mathrm{Z}^T}\left( t \right) \mathrm{Z}\left( t \right) - {\gamma ^2}{W^T}\left( t \right) W\left( t \right) + \dot{V}\left( t \right) } \mathrm{d}t - V\left( T \right) \end{aligned}$$
(20)

Set

$$\begin{aligned} {\phi _{\varsigma \left( t \right) i}}\left( t \right) = {\left( {\mathrm{Z}_{\varsigma \left( t \right) i}^T\left( t \right) ,W_{\varsigma \left( t \right) i}^T\left( t \right) ,\mathrm{E}_{\varsigma \left( t \right) i}^T\left( t \right) } \right) ^T} \end{aligned}$$

and combining (19) and (20), we can get

$$\begin{aligned} {J_T} \le&\int _0^T {\left( {\sum \limits _{i = 1}^{n - 1} {\phi _{\varsigma \left( t \right) i}^T\left( t \right) \varTheta {\phi _{\varsigma \left( t \right) i}}\left( t \right) } + \mathrm{E}_{\varsigma \left( t \right) n}^T\left( {M + \mu P_2^2} \right) \mathrm{E}_{\varsigma \left( t \right) n}^{}} \right) } \mathrm{d}t\\&- V\left( T \right) \end{aligned}$$

in which

$$\begin{aligned} \varTheta = \left[ {\begin{array}{*{20}{c}} {\varOmega + \mu P_1^2}&{}{{P_1}D}&{}{{\lambda _{\varsigma \left( t \right) i}}{Q_1}}\\ *&{}{ - {\gamma ^2}I}&{}0\\ *&{}*&{}{M + \mu P_2^2} \end{array}} \right] \end{aligned}$$

Utilizing Schur Lemma [34], inequality (12) can be equivalently transformed as \(\varTheta < 0\) and \(M+\mu P_2^2<0\). Hence we obtain \({J_T} < 0\), and the consensus objective as in Definition 1 is completed.

Remark 1

Limited to switching frequency and action delay, it is difficult to realize the slidingmode strategy (5) sometimes, and it may further cause chattering phenomenon. It is feasible to modify (5) to (21). In this situation, the error trajectories do not slide perfectly to zero, but within a small boundary layer around zero [35], the nonlinear input of the sliding-mode observers (3) can be designed as

$$\begin{aligned} {v_i}\left( t \right) = \left\{ {\begin{array}{*{20}{c}} { - \rho \frac{{F{{\varPsi _i}(t)}}}{{\left\| {F{{\varPsi _i}(t)}} \right\| +\delta }},}&{}{{{\varPsi _i}(t)} \ne 0}\\ {0,}&{}{{{\varPsi _i}(t)} = 0} \end{array}} \right. \end{aligned}$$
(21)

where \(\delta >0\) is a small constant.

Remark 2

During calculating G, F and controller gain matrix K, because the matrices C and B are not square matrices actually, we can not directly obtain their inverse matrices. Therefore, utilizing the pseudo inverse technology for the matrices, we can get the observer gain matrix G , the controller gain matrix K and F in the following:

$$\begin{aligned} G&=P_2^{\mathrm{{ - }}1}{Q_2}{C^T}{\left( {C{C^T}} \right) ^{ - 1}}\\ K&= {\left( {{B^T}B} \right) ^{ - 1}}{B^T}P_1^{ - 1}{Q_1}\\ F&= {\left( {{P_2}D} \right) ^T}{C^T}{\left( {C{C^T}} \right) ^{ - 1}} \end{aligned}$$

Remark 3

By solving the feasible solution of LMI (12), the sliding-mode observer (3) reduces parameters’ constraints in the design process. Furthermore, the consensus controller (8) based on the designed observer (3) could complete the state synchronization of MAS (1) with considering the unavailable states, nonlinear dynamics and external disturbances, simultaneously.

Simulation example

Parameters calculation for multiple simple-pendulum systems

Fig. 2
figure 2

Simple-pendulum system driven by DC motor

In this section, we consider multiple simple-pendulum systems described in MASs (1) with four simple-pendulums [36], and the simple-pendulum system is shown in Fig. 2. For the ith simple-pendulum, set \({x_{i1}} = {\theta _i}\), \({x_{i2}} = {\dot{\theta }_i}\), \({x_{i3}} = {i _{ai}}\) as angular displacement, angular velocity, and armature current, respectively, and denote \(x_i=[x_{i1}^T, x_{i2}^T, x_{i3}^T]\). Then we obtain the dynamics of the ith simple-pendulum as

$$\begin{aligned} {\dot{x}_i}(t) = A{\dot{x}_i}\left( t \right) + B{u_i}\left( t \right) + f\left( {{{ x}_i}\left( t \right) } \right) + D{\omega _i}\left( t \right) \end{aligned}$$

where

$$\begin{aligned} \mathbf{{A}} =&\left( {\begin{array}{*{20}{c}} 0&{}1&{}0\\ 0&{}0&{}{\frac{{{K_T}}}{{m{l^2}}}}\\ 0&{}{ - \frac{{{K_E}}}{L}}&{}{ - \frac{R}{L}} \end{array}} \right) ,\mathbf{{B}} = \left( {\begin{array}{*{20}{c}} 0\\ 0\\ {\frac{1}{L}} \end{array}} \right) \\ f\left( {{x_i}(t)} \right) =&{\left[ {0, - \frac{g}{l}\sin {x_{i1}(t)},0} \right] ^T} \end{aligned}$$

u represents the terminal voltage, R and L the resistance and inductance of the armature circuit respectively, \(i_a\) and E the armature current and the back electromotive force (EMF) of DC motor. m and l denote as the mass of the pendulum ball and the length of the pendulum rod, \(K_T\) and \(K_E\) represent torque constant and back EMF constant respectively.

The following system parameters are

$$\begin{aligned} A =&\left( {\begin{array}{*{20}{c}} 0&{}1&{}0\\ 0&{}0&{}{0.8}\\ 0&{}{ - 0.15}&{}{ - 1} \end{array}} \right) {} ,B = \left( {\begin{array}{*{20}{c}} 0\\ 0\\ 1 \end{array}} \right) ,C = \left[ {\begin{array}{*{20}{c}} 1&{}0&{}0\\ 0&{}0&{}1 \end{array}} \right] \\ D =&{\left[ {\begin{array}{*{20}{c}} 0&1&1 \end{array}} \right] ^T},f\left( {{x_i}(t)} \right) = {\left[ {\begin{array}{*{20}{c}} 0&{ - 0.5\sin {x_{i1}(t)}}&0 \end{array}} \right] ^T} \end{aligned}$$

and the external disturbance is supposed as \({d_i} = 0.02\cos t\) .

Fig. 3
figure 3

Interaction graphs

The switching communication topologies are considered as the set \({G_1,G_2,G_3}\) in Fig. 3 with \(\varsigma \left( t \right) = 1,2,3\) which is switched every \(\tau = 1\) to the next topology as \({G_1} \rightarrow {G_2} \rightarrow {G_3} \rightarrow {G_1} \rightarrow \cdots \) according to Fig. 4.

Fig. 4
figure 4

Switching signal \(\varsigma \left( t \right) \)

Set \(\mu = 0.55{} ,\gamma \mathrm{{ = }}0.55,\rho = 1,\delta = 0.01\). By solving asymptotical stability condition (12), the observer gain and controller gain matrices are obtained as

$$\begin{aligned} G&= \left[ {\begin{array}{*{20}{c}} { - 1.6991}&{}0\\ { - 0.7219}&{}{0.8098}\\ 0&{}{ - 0.6991} \end{array}} \right] \\ K&= \left[ {\begin{array}{*{20}{c}} { - 0.3036}&{ - 1.5322}&{ - 1.2078} \end{array}} \right] \end{aligned}$$

and other related parameters are computed as

$$\begin{aligned} {P_1}&= \left[ {\begin{array}{*{20}{c}} {0.4683}&{}{ - 0.1642}&{}{0.0659}\\ { - 0.1642}&{}{0.4036}&{}{ - 0.3002}\\ {0.0659}&{}{ - 0.3002}&{}{0.5940} \end{array}} \right] \\ {P_2}&= \left[ {\begin{array}{*{20}{c}} {1.3813}&{}0&{}0\\ 0&{}{1.3813}&{}0\\ 0&{}0&{}{1.3813} \end{array}} \right] \\ {Q_1}&= \left[ {\begin{array}{*{20}{c}} { - 0.6302}&{}{ - 0.0614}&{}{0.0282}\\ { - 0.0632}&{}{ - 0.5808}&{}{ - 0.0744}\\ {0.0286}&{}{ - 0.0761}&{}{ - 0.3827} \end{array}} \right] \\ {Q_2}&= \left[ {\begin{array}{*{20}{c}} { - 2.3470}&{}{ - 0.3841}&{}0\\ { - 0.9972}&{}{ - 2.3470}&{}{1.1186}\\ 0&{}{ - 2.0165}&{}{ - 0.9657} \end{array}} \right] \\ F&= \left[ {\begin{array}{*{20}{c}} 0&{1.3813} \end{array}} \right] \end{aligned}$$

Simulation analysis

Due to the angular velocity of simple-pendulum systems cannot be measured actually, the designed observer (3) is mainly used to estimate it. In Fig. 4, \({e_{\mathrm{{i}}2}}(i = 1,2,3,4)\) represents angular velocity error of four simple-pendulum systems, and we can see that \({e_{\mathrm{{i}}2}}(i = 1,2,3,4)\) converges to zero asymptotically, which concludes the designed sliding-mode observer (3) can estimate the agents’ states effectively.

Fig. 5
figure 5

State errors of the angular velocity in this work

Fig. 6
figure 6

State errors of the angular velocity in [19]

Furthermore, the angular velocity of four simple-pendulum systems is also estimated by the observer designed in [19]. The nonlinearity and disturbance are considered in 8-25 seconds and Fig. 6 displays the angular velocity error of the observer in [19]. Comparing Figs. 5 and 6, the state error curves in Fig. 6 show obvious fluctuation in 8-25 seconds, and the observer designed in our work possesses the superior in dealing with disturbances and nonlinearity.

Fig. 7
figure 7

Angular displacement under the controller (8)

Fig. 8
figure 8

Angular velocity under the controller (8)

Fig. 9
figure 9

Armature current under the controller (8)

Under the designed control protocol (8) with distributed observers (3), Figs. 7, 8, 9 demonstrate respectively angular displacement, angular velocity and armature current curves of four simple pendulums could achieve the goal of consensus control finally. By observing the simulation results on designed sliding-mode observers (3) and distributed controller (8), we can summarize that the proposed distributed control protocol based on sliding-mode observers is effective and asymptotically stable for nonlinear multi-agent systems with disturbances in our work.

Conclusions

This work has solved distributed consensus control for a class of MASs considering unavailable states, nonlinearity and unknown disturbances under switching topologies. The distributed sliding-mode observer has been proposed to estimate states of nonlinear MASs with external disturbances. Then, the consensus control law has been designed utilizing estimated state variables. The condition of robust consensus has been obtained satisfying the anti-jamming performance index. The simulation results about multiple simple-pendulum systems further illustrate that our proposed observer and controller are valid. Future work will be deserved on distributed cooperative control in higher-order nonlinear systems with unmeasurable states, external disturbances and communication delays under jointly connected topologies.