1 Introduction

In the contemporary world a continuous technological development and improvement of innovative systems and processes with the simultaneous minimization of the operation cost can be observed. At the same time the pursuit to ensure the reliability and optimal work of the systems and process in diverse conditions is expected. To achieve such a goal new advanced fault diagnosis and control systems are developed. One of the leading research trends is devoted to developing novel fault-tolerant control (FTC) schemes, which have numerous applications in the real systems [3, 5, 12, 13, 21, 23, 24, 27]. Nowadays, the main direction of developing FTC systems is oriented on the various observers-based approaches. Such techniques are especially attractive because they allow for the effective parallel fault detection and estimation. Moreover, they enable to reconstruct the exact actuator and sensors faults characteristics, and such knowledge is required for the designing efficient FTC systems. In the literature several mature methods can be found as the Kalman filter-based [18], minimum-variance estimators [14], adaptive estimators [31], sliding mode observers [6, 30] and adaptive observers [25].

Unfortunately, the observer-based FTC is difficult to apply for the systems when the analytical model of the diagnosed system is too complex or unavailable. Such difficulty can be overcome by the application of the artificial neural networks (ANNs) [15, 19]. The main concept of this approach relies on the application of the computational models which only reflect the behaviour of the diagnosed system. The ANNs are especially attractive in the tasks of multidimensional, complex, dynamic and highly nonlinear systems identification. However, it should be mentioned that the ANNs have some limitations mainly following from the complex mathematical description which does not allow it to combine with analytical methods such as observers. Similarly as in the case of the physical model-based the ANN-based FTC approach should be robust against noises, disturbances and model uncertainty [17, 19, 21, 28]. In the literature frequently the generalization properties of the neural models are underlined; however, the form of the state-space neural model with its uncertainty description is rarely available. Such property is desirable in the case of the application of the neural model in the FTC tasks [19, 26].

To combine the benefits of the ANNs and observer-based approaches for their applications in the FTC purposes, a new methodology of designing neural scheme of the faults estimation with its uncertainty description is proposed. The application of the ANNs in such scheme is possible by the conversion of the neural model without linearization into a linear parameter-varying (LPV) form [1, 4, 7] while maintaining its neural form and property what facilitates its implementation in the real industrial systems. The developed methodology, which is based on the extension of the quadratic boundedness (QB) approach, enables to obtain the estimator of the state as well as actuator and sensor faults for nonlinear discrete-time systems. The description of the system by the set of a bilinear matrix inequalities (BMIs) due to application of the linear matrix inequalities (LMIs) approach allows to obtain the fault estimate with their uncertainty description. Such knowledge allows to obtain adaptive thresholds which can be applied to design an advanced FTC system. It is worth highlighting that in the developed approach, the robustness of the fault diagnosed scheme is achieved by minimizing an influence of external disturbances. Moreover, the proposed methodology guarantees that a prescribed disturbance attenuation level is achieved with respect to the state as well as actuator and sensor fault estimation errors while guaranteeing convergence of the observer.

The paper is organized as follows. Section 2 presents some information about the recurrent neural network (RNN) model and its LPV representation which can be applied in the FTC tasks. Subsequently, Sect. 3 describes a new robust UIO design procedure for the state and actuators and sensors fault estimation purpose. Moreover, it provides the adaptive thresholds design procedure. Section 4 shows an example of the application of the developed approach in the task of the actuators and sensors robust FD of the multitank system. The final part of the paper concerns the concluding remarks.

2 Problem formulation

The objective of the preliminary part of this paper is to provide essential information about the problem being undertaken along with its formal definition. Firstly, let us consider the following nonlinear discrete-time system

$$\begin{aligned} \varvec{x}_{k+1} = \phi \left( \varvec{x}_{k},\varvec{u}_{k}\right) , \end{aligned}$$
(1)

where \(\varvec{x}_{k}\in \mathbb {R}^n\) and \(\varvec{u}_{k}\in \mathbb {R}^r\) are the state and input vector, respectively, while \(\phi \left( \cdot \right)\) is an unknown nonlinear function which are describing the behaviour of the system with respect to the state and input.

The task of modelling the above nonlinear system is realized with a recurrent neural network (RNN) detailed in [20]. Moreover, the RNN modelling framework is equipped with sensor and actuator faults resulting in:

$$\begin{aligned} \varvec{x}_{k+1}&= \varvec{A}\varvec{x}_{k} + \varvec{B}\left[ \varvec{u}_{k} + \varvec{f}_{a,k}\right] + \varvec{A}_{0}\sigma \left( \varvec{E}_{1}\varvec{x}_{k}\right) \nonumber \\&+ \varvec{B}_{0}\sigma \left( \varvec{E}_{2}\left[ \varvec{u}_{k}+\varvec{f}_{a,k}\right] \right) , \end{aligned}$$
(2)
$$\begin{aligned} \varvec{y}_{k}&= {} \varvec{C}\varvec{x}_{k} + \varvec{f}_{s,k}, \end{aligned}$$
(3)

where \(\sigma \left( \cdot \right)\) is a nonlinear activation function of hidden layers. Matrices \(\varvec{A}\), \(\varvec{B}\), \(\varvec{A}_{0}\), \(\varvec{B}_{0}\), \(\varvec{E}_{1}\), \(\varvec{E}_{2}\) are the block weight matrices. Moreover, \(\varvec{f}_{a,k} \in \mathbb {F}_a \subset \mathbb {R}^{r}\) denote the actuator fault, while \(\varvec{f}_{s,k} \in \mathbb {F}_s \subset \mathbb {R}^{m}\) indicate the sensor fault vector. Note that, there is no sensor fault distribution matrix standing next to the sensor fault vector \(\varvec{f}_{s,k}\), i.e. it is equal to the identity matrix. It means that all sensors faults are taken into account. This means that the faults may influence all sensors.

In this point, it should be noted that the vast majority of the works devoted to fault diagnosis (FD) deal either with actuator or with sensor faults, respectively. However, this is rather a unrealistic assumption as one can easily imagine a situation in which both sensors and actuators are faulty. The novelty and main scope of this paper is to propose a scheme wherein both actuator and sensor faults are taken into account, contrarily to the approaches that can be found in the references (see, e.g. [20]).

The aim is to represent (2)–(3) in the linear parameter-varying (LPV)-like form:

$$\begin{aligned} \varvec{x}_{k+1}=& \varvec{A}\left( \gamma _k\right) \varvec{x}_{k} + \varvec{B}\left( \gamma _k\right) \varvec{u}_{k} + \varvec{B}\left( \gamma _k\right) \varvec{f}_{a,k}\nonumber \\&+\,\varvec{W}_{1}\varvec{w}_{1,k}, \end{aligned}$$
(4)
$$\begin{aligned} \varvec{y}_{k}&= {} \varvec{C}\varvec{x}_{k} + \varvec{f}_{s,k} + \varvec{W}_{2}\varvec{w}_{2,k}, \end{aligned}$$
(5)

where \(\varvec{\gamma }\) is an appropriate scheduling parameter and \(\varvec{w}_{1,k}\) and \(\varvec{w}_{2,k}\) are exogenous disturbance vectors which represent process and measurement uncertainties, respectively. Moreover, \(\varvec{W}_{1}\) and \(\varvec{W}_{2}\) denote their distribution matrices.

It should be highlighted that the derivation presented here is partially based on [1]. The problem of transforming neural state-space model (2)–(3) into (4)–(5) implies that

$$\begin{aligned} (\varvec{A}(\varvec{\gamma }),\varvec{B}(\varvec{\gamma })) \in \theta = Co\{(\varvec{A}_{i},\varvec{B}_{i}), i =1,\dots ,p\}. \end{aligned}$$
(6)

where

$$\begin{aligned}&Co\{(\varvec{A}_{i},\varvec{B}_{i}), i =1,\dots ,p\}\nonumber \\&=\left\{ \varvec{X}:\,\sum _{i=1}^p\gamma _i(\varvec{A}_{i},\varvec{B}_{i}),\, \sum _{i=1}^p\gamma _i=1,\,\gamma _i\ge 0\right\}. \end{aligned}$$
(7)

Let us also define the time-varying parameter [1]

$$\begin{aligned} \gamma _i = {\left\{ \begin{array}{ll} \frac{\varvec{\sigma }(\varvec{E}_{1}^i\varvec{x}_{k}+\varvec{E}_{2}^i\varvec{u}_{k})}{ \varvec{E}_{1}^i\varvec{x}_{k}+\varvec{E}_{2}^i\varvec{u}_{k}}, &{}\quad \varvec{E}_{1}^i\varvec{x}_{k}+\varvec{E}_{2}^i\varvec{u}_{k} \ne 0\\ 1, &{}\quad \varvec{E}_{1}^i\varvec{x}_{k}+\varvec{E}_{2}^i\varvec{u}_{k} = 0 \end{array}\right. }, \end{aligned}$$
(8)

for \(1<i<p\), where \(\varvec{E}_{1}^i, \varvec{E}_{2}^i\) stands for the ith rows in the respective hidden layer weight matrices. Then (2) can be rewritten as follows

$$\begin{aligned} \begin{aligned} \varvec{x}_{k+1}&= \varvec{A}\varvec{x}_{k}+\varvec{B}\left[ \varvec{u}_{k}+\varvec{f}_{a,k}\right] + \varvec{A}_{0}\varTheta \varvec{E}_{1}\varvec{x}_{k}\\&\quad +\,\varvec{B}_{0}\varTheta \varvec{E}_{2}\left[ \varvec{u}_{k}+\varvec{f}_{a,k}\right] + \varvec{W}_{1}\varvec{w}_{1,k}, \end{aligned} \end{aligned}$$
(9)

with diagonal \(\varTheta \in \mathfrak {R}^{p\times p}\) in the form

$$\begin{aligned} \varTheta = \text {diag}\left( \gamma _{1},\ldots ,\gamma _{p}\right) . \end{aligned}$$
(10)

Subsequently, neural network (2)–(3) is transformed into:

$$\begin{aligned} \varvec{x}_{k+1}&= \varvec{A}\varvec{x}_{k}+\varvec{B}\left[ \varvec{u}_{k}+\varvec{f}_{a,k}\right] + \varvec{g}\left( \varvec{x}_{k}\right) \nonumber \\&+\,\varvec{h}(\varvec{u}_{k}\!+\!\varvec{f}_{a,k})+\varvec{W}_{1}\varvec{w}_{1,k}, \end{aligned}$$
(11)
$$\begin{aligned} \varvec{y}_{k}&= {} \varvec{C}\varvec{x}_{k}+\varvec{f}_{s,k}+\varvec{W}_{2}\varvec{w}_{2,k}, \end{aligned}$$
(12)

where \(\varvec{g}\left( \varvec{x}_{k}\right)\) and \(\varvec{h}(\varvec{u}_{k})\) are defined as follows:

$$\begin{aligned} \varvec{g}\left( \varvec{x}_{k}\right)= & {} \sum _{i=1}^p \gamma ^i\varvec{A}_{0}^i\varvec{E}_{1}^{i}\varvec{x}_{k}, \end{aligned}$$
(13)
$$\begin{aligned} \varvec{h}(\varvec{u}_{k})= & {} \sum _{i=1}^p \gamma ^i\varvec{B}_{0}^i\varvec{E}_{2}^{i}\varvec{u}_{k}. \end{aligned}$$
(14)

Finally, the neural model boils down to traditional LPV shape (4)–(5) where

$$\begin{aligned} \varvec{A}(\varvec{\gamma })&= {} \varvec{A}+ \sum _{i=1}^p \gamma _i\varvec{A}^{i}, \end{aligned}$$
(15)
$$\begin{aligned} \varvec{B}(\varvec{\gamma })&= {} \varvec{B}+ \sum _{i=1}^p \gamma _i\varvec{B}^{i}. \end{aligned}$$
(16)

Moreover, as it was shown, no linearization is used for transforming neural network (2)–(3) into LPV form (4)–(5). Having a general system description, it is possible to develop an estimator which will be able to estimate all sensor and actuator faults, simultaneously.

Note that the observability of the resulting neural network-based LPV model can be efficiently verified using the approach proposed in [33].

3 Adaptive estimator design

3.1 State and faults estimation

To handle the above-defined problem of simultaneous estimation of the state \(\varvec{x}_{k}\) as well as actuator \(\varvec{f}_{a,k}\) and sensor \(\varvec{f}_{s,k}\) faults, the following neural network-based estimation scheme is proposed:

$$\begin{aligned} \hat{\varvec{x}}_{k+1}=\, & {} \varvec{A}\left( \gamma \right) \hat{\varvec{x}}_{k} + \varvec{B}\left( \gamma \right) \varvec{u}_{k} + \varvec{B}\left( \gamma \right) \varvec{\hat{f}}_{a,k}\nonumber \\&+\,\varvec{K}_{x}\left( \varvec{y}_{k}-\varvec{C}\hat{\varvec{x}}_{k}-\varvec{\hat{f}}_{s,k}\right) , \end{aligned}$$
(17)
$$\begin{aligned}{\hat{\varvec{f}}}_{a,k+1}= \,& {} {\hat{\varvec{f}}}_{a,k} + \varvec{K}_{a}\left( \varvec{y}_{k}-\varvec{C}\hat{\varvec{x}}_{k}-{\hat{\varvec{f}}}_{s,k}\right) , \end{aligned}$$
(18)
$$\begin{aligned} {\hat{\varvec{f}}}_{s,k+1}= \,& {{\hat{\varvec{f}}}_{s,k}} + {\varvec{K}}_{s}\left( {\varvec{y}}_{k}-{\varvec{C}}{\hat{\varvec{x}}}_{k}-{{\hat{\varvec{f}}}_{s,k}}\right) , \end{aligned}$$
(19)

which include the gain matrices \(\varvec{K}_{x}\), \(\varvec{K}_{a}\), \(\varvec{K}_{s}\) for the state, actuator and sensor fault, respectively.

Bearing in mind (4)–(5) along with (17), the state estimation error is

$$\begin{aligned} \begin{aligned} \varvec{e}_{k+1}&= \varvec{x}_{k+1} - \hat{\varvec{x}}_{k+1} = \varvec{A}\left( \gamma \right) \varvec{x}_{k} + \varvec{B}\left( \gamma \right) \varvec{u}_{k}\\&\quad +\,\varvec{B}\left( \gamma \right) \varvec{f}_{a,k} + \varvec{W}_{1}\varvec{w}_{1,k} - \varvec{A}\left( \gamma \right) \hat{\varvec{x}}_{k}\\&\quad -\,\varvec{B}\left( \gamma \right) \varvec{u}_{k} - \varvec{B}\left( \gamma \right) {\hat{\varvec{f}}}_{a,k} - \varvec{K}_{x}\varvec{C}\varvec{x}_{k}\\&\quad -\,\varvec{K}_{x}\varvec{f}_{s,k} - \varvec{K}_{x}\varvec{W}_{2}\varvec{w}_{2,k} + \varvec{K}_{x}\varvec{C}\hat{\varvec{x}}_{k}\\&\quad +\,\varvec{K}_{x}{\hat{\varvec{f}}}_{s,k} = \left[ \varvec{A}\left( \gamma \right) -\varvec{K}_{x}\varvec{C}\right] \varvec{e}_{k} + \varvec{B}\left( \gamma \right) \varvec{e}_{a,k}\\&\quad -\,\varvec{K}_{x}\varvec{e}_{s,k} + \varvec{W}_{1}\varvec{w}_{1,k}-\varvec{K}_{x}\varvec{W}_{2}\varvec{w}_{2,k}, \end{aligned} \end{aligned}$$
(20)

where \(\varvec{e}_{a,k}\) and \(\varvec{e}_{s,k}\) are the actuator and sensor fault errors, respectively. Subsequently, the dynamics estimation error of the actuator fault obeys

$$\begin{aligned} \begin{aligned} \varvec{e}_{a,k+1}&= \varvec{f}_{a,k+1} - {\hat{\varvec{f}}}_{a,k+1} = \varvec{f}_{a,k+1} + \varvec{f}_{a,k} - \varvec{f}_{a,k}\\&\quad -\,{\hat{\varvec{f}}}_{a,k} - \varvec{K}_{a}\varvec{C}\varvec{x}_{k} - \varvec{K}_{a}\varvec{f}_{s,k} + \varvec{K}_{a}\varvec{C}\hat{\varvec{x}}_{k}\\&\quad -\,\varvec{K}_{a}\varvec{W}_{2}\varvec{w}_{2,k} + \varvec{K}_{a}{\hat{\varvec{f}}}_{s,k} = \varvec{\varepsilon }_{a,k} + \varvec{e}_{a,k}\\&\quad -\,\varvec{K}_{a}\varvec{C}\varvec{e}_{k} - \varvec{K}_{a}\varvec{e}_{s,k} - \varvec{K}_{a}\varvec{W}_{2}\varvec{w}_{2,k}, \end{aligned} \end{aligned}$$
(21)

with an error between consecutive samples of the actuator fault \(\varvec{\varepsilon }_{a,k}=\varvec{f}_{a,k+1}-\varvec{f}_{a,k}\). In a similar fashion, the dynamics of the sensor fault estimation error is described by

$$\begin{aligned} \begin{aligned} \varvec{e}_{s,k+1}&= \varvec{f}_{s,k+1} - {\hat{\varvec{f}}}_{s,k+1} = \varvec{f}_{s,k+1} + \varvec{f}_{s,k} - \varvec{f}_{s,k}\\&\quad -\,{\hat{\varvec{f}}}_{s,k} - \varvec{K}_{s}\varvec{C}\varvec{x}_{k} - \varvec{K}_{s}\varvec{f}_{s,k} - \varvec{K}_{s}\varvec{W}_{2}\varvec{w}_{2,k}\\&\quad +\,\varvec{K}_{s}\varvec{C}\hat{\varvec{x}}_{k} + \varvec{K}_{s}{\hat{\varvec{f}}}_{s,k} = \varvec{\varepsilon }_{s,k} - \varvec{K}_{s}\varvec{C}\varvec{e}_{k}\\&\quad +\,\left[ \varvec{I}- \varvec{K}_{s}\right] \varvec{e}_{s,k} - \varvec{K}_{s}\varvec{W}_{2}\varvec{w}_{2,k}, \end{aligned} \end{aligned}$$
(22)

with \(\varvec{\varepsilon }_{s,k}=\varvec{f}_{s,k+1}-\varvec{f}_{s,k}\) denoting the error between consecutive samples of the sensor fault.

Furthermore, having defined the estimation errors for the state as well as for the actuator and sensor faults, the following augmented vectors can be constructed:

$$\begin{aligned} \bar{\varvec{e}}_{k+1}= & {} \begin{bmatrix} \varvec{e}_{k+1}\\ \varvec{e}_{a,k+1}\\ \varvec{e}_{s,k+1} \end{bmatrix}, \end{aligned}$$
(23)
$$\begin{aligned} \varvec{v}_{k}= & {} \begin{bmatrix} \varvec{w}_{1,k}\\ \varvec{w}_{2,k}\\ \varvec{\varepsilon }_{a,k}\\ \varvec{\varepsilon }_{s,k} \end{bmatrix}. \end{aligned}$$
(24)

Then the estimation error of the state and faults takes the following compact form

$$\begin{aligned} \bar{\varvec{e}}_{k+1} = \varvec{X}\left( \gamma \right) \bar{\varvec{e}}_{k} + \varvec{Z}\varvec{v}_{k}, \end{aligned}$$
(25)

with:

$$\begin{aligned} \varvec{X}\left( \gamma \right)= \,& {} {\bar{\varvec{A}}}_{{}}\left( \gamma \right) -\bar{\varvec{K}}_{}\bar{\varvec{C}}_{}, \end{aligned}$$
(26)
$$\begin{aligned} \varvec{Z}= \,& {} \bar{\varvec{W}}_{}-\bar{\varvec{K}}_{}\bar{\varvec{V}}, \end{aligned}$$
(27)

where the augmented matrices of the estimator are given by:

$$\begin{aligned} \begin{matrix} {\bar{\varvec{A}}}_{{}}\left( \gamma \right) &{}=&{} \begin{bmatrix} \varvec{A}\left( \gamma \right) &{} \varvec{B}\left( \gamma \right) &{} \bf{0}\\ \bf{0}&{} \varvec{I}&{} \bf{0}\\ \bf{0}&{} \bf{0}&{} \varvec{I}\end{bmatrix}, &{}\bar{\varvec{C}}_{}= \begin{bmatrix} \varvec{C}&{} \bf{0}&{} \varvec{I}\end{bmatrix},\\ \bar{\varvec{W}}_{}&{}=&{} \begin{bmatrix} \varvec{W}_{1} &{} \bf{0}&{} \bf{0}&{} \bf{0}\\ \bf{0}&{} \bf{0}&{} \varvec{I}&{} \bf{0}\\ \bf{0}&{} \bf{0}&{} \bf{0}&{} \varvec{I}\end{bmatrix}, &{} \bar{\varvec{V}}= \begin{bmatrix} \bf{0}&{} \varvec{W}_{2} &{} \bf{0}&{} \bf{0}\end{bmatrix},\\ \bar{\varvec{K}}_{}&{}=&{} \begin{bmatrix} \varvec{K}_{x}\\ \varvec{K}_{a}\\ \varvec{K}_{s} \end{bmatrix}. \end{matrix} \end{aligned}$$
(28)

For the purpose of further analysis, it is proposed to use the so-called quadratic boundedness (QB) approach [2]. This implies the need for the following assumptions:

  1. Assumption 1:
    $$\begin{aligned} \begin{aligned} \varvec{\varepsilon }_{a,k}&=\varvec{f}_{a,k+1}-\varvec{f}_{a,k}, \\ \varvec{\varepsilon }_{a,k}&\in \mathcal {E}_{\varvec{\varepsilon }_{a}},\ \mathcal {E}_{\varvec{\varepsilon }_{a}}=\{\varvec{\varepsilon }_{a}\ : \ \varvec{\varepsilon }_{a}^T\varvec{Q}_{\varvec{\varepsilon }_{a}}\varvec{\varepsilon }_{a}\le 1\}, \\&\varvec{Q}_{\varvec{\varepsilon }_{a}} \succ 0. \end{aligned} \end{aligned}$$
    (29)
  2. Assumption 2:
    $$\begin{aligned} \begin{aligned} \varvec{\varepsilon }_{s,k}&=\varvec{f}_{s,k+1}-\varvec{f}_{s,k}, \\ \varvec{\varepsilon }_{s,k}&\in \mathcal {E}_{\varvec{\varepsilon }_{s}},\ \mathcal {E}_{\varvec{\varepsilon }_{s}}=\{\varvec{\varepsilon }_{s}\ : \ \varvec{\varepsilon }_{s}^T\varvec{Q}_{\varvec{\varepsilon }_{s}}\varvec{\varepsilon }_{s}\le 1\},& \varvec{Q}_{\varvec{\varepsilon }_{s}} \succ 0. \end{aligned} \end{aligned}$$
    (30)

Assumption 1 and Assumption 2 are required to attain a suitable fault estimation quality. The value of \(\varvec{\varepsilon }_{a,k}\) and \(\varvec{\varepsilon }_{s,k}\) is unknown but bounded in an ellipsoidal set [29].

  1. Assumption 3:
    $$\begin{aligned} \begin{aligned} \varvec{w}_{1,k}&\in \mathcal {E}_{\varvec{w}_{1}},\ \mathcal {E}_{\varvec{w}_{1}}=\{\varvec{w}_{}\ : \ \varvec{w}_{1}^T\varvec{Q}_{\varvec{w}_{1}}\varvec{w}_{1}\le 1\},\\&\varvec{Q}_{\varvec{w}_{1}} \succ 0, \end{aligned} \end{aligned}$$
    (31)
  1. Assumption 4:
    $$\begin{aligned} \begin{aligned} \varvec{w}_{2,k}&\in \mathcal {E}_{\varvec{w}_{2}},\ \mathcal {E}_{\varvec{w}_{2}}=\{\varvec{w}_{}\ : \ \varvec{w}_{2}^T\varvec{Q}_{\varvec{w}_{2}}\varvec{w}_{2}\le 1\},\\&\varvec{Q}_{\varvec{w}_{2}} \succ 0, \end{aligned} \end{aligned}$$
    (32)

Assumption 5 and Assumption 4 state that the external disturbances are unknown but also bounded in an ellipsoidal set. Thus, the contribution of this paper can be associated with the so-called bounded-error or set-membership approaches [32].

  1. Assumption 2:
    $$\begin{aligned} \mathcal {E}_v= \,& \{ \varvec{v}: \varvec{v}^T\varvec{Q}_{\varvec{v}} \varvec{v} \le 1\},\quad \varvec{Q}_{\varvec{v}}\succ \varvec{0}. \end{aligned}$$
    (33)
    $$\begin{aligned} \varvec{Q}_{\varvec{v}_{}}=\, & \frac{1}{4}\text {diag}(\varvec{Q}_{\varvec{\varepsilon }_{a}}, \varvec{Q}_{\varvec{\varepsilon }_{s}},\varvec{Q}_{\varvec{w}_{1}},\varvec{Q}_{\varvec{w}_{2}}). \end{aligned}$$
    (34)

Since \(\varvec{v}_{k}\) contains \(\varvec{\varepsilon }_{a,k}\) and \(\varvec{\varepsilon }_{s,k}\), Assumption 1 and Assumption 2 pertain a fault rate of change constraint, which means that the difference between consecutive samples of \(\varvec{f}_{a,k}\) and \(\varvec{f}_{s,k}\) must be bounded. Similarly, since \(\varvec{v}_{k}\) contains \(\varvec{w}_{1,k}\) and \(\varvec{w}_{2,k}\), Assumption 3 and Assumption 4 state that the external disturbances are unknown but bounded. Originally, such a methodology was used to design a state estimator for linear uncertain discrete-time systems. However, the extension proposed in this paper allows obtaining the estimator which is able to estimate the state as well as actuator and sensor faults along with suitable uncertainty intervals.

Let us formulate the Lyapunov candidate function

$$\begin{aligned} V_k = \bar{\varvec{e}}_{k}^T\varvec{P}\bar{\varvec{e}}_{k}, \end{aligned}$$
(35)

with \(\varvec{P}\succ 0\).

To introduce the QB approach [2, 10, 11], let us remind the following definitions:

Definition 1

System (25) is strictly quadratically bounded for all allowable \(\varvec{v}_{k} \in \mathbb {E}_v\), if \(\bar{\varvec{e}}_{k}^T\varvec{P}\bar{\varvec{e}}_{k} > 1\) implies \(\bar{\varvec{e}}_{k+1}^T\varvec{P}\bar{\varvec{e}}_{k+1} < \bar{\varvec{e}}_{k}^T\varvec{P}\bar{\varvec{e}}_{k}\) for any \(\varvec{v}_{k} \in \mathbb {E}_v\).

Note that the strict quadratic boundedness of (25) ensures that \(V_{k+1}<V_k\) for any \(\varvec{v}_{k}\in \mathbb {E}_v\) when \(V_k>1\).

Definition 2

A set \(\mathbb {E}\) is a positively invariant set for (25) for all \(\varvec{v}_{k}\in \mathbb {E}_v\) if \(\bar{\varvec{e}}_{k}\in \mathbb {E}\) implies \(\bar{\varvec{e}}_{k+1}\in \mathbb {E}\) for any \(\varvec{v}_{k}\in \mathbb {E}_v\).

Note that if \(\bar{\varvec{e}}_{k}\) is outside an invariant set \(\mathbb {E}\), i.e. \(V_k>1\), then \(V_k\) decreases until \(\bar{\varvec{e}}_{k}\) comes back to the invariant set \(\mathbb {E}\). This means that the proposed scheme provides knowledge about lower and upper bounds of the system states that can be perceived as worst-case situations. Based on these definitions and the results presented in [2], the following lemma can be formulated for (25):

Lemma 1

The following statements are equivalent:

  1. 1.

    System (25) is strictly quadratically bounded for all \(\varvec{v}_{k}\in \mathbb {E}_v\).

  2. 2.

    The ellipsoid

    $$\begin{aligned} \mathbb {E}=\{\bar{\varvec{e}}_{k}:\bar{\varvec{e}}_{k}^T\varvec{P}\bar{\varvec{e}}_{k}\le 1\}, \end{aligned}$$
    (36)

    is an invariant set for (25) for any \(\varvec{v}_{k}\in \mathbb {E}_v\).

  3. 3.

    There exists a scalar \(\alpha \in (0,1)\) such that:

    $$\begin{aligned} \begin{bmatrix} \varvec{X}\left( \gamma \right) ^T\varvec{P}\varvec{X}\left( \gamma \right) -\varvec{P}+\alpha \varvec{P}&\varvec{X}\left( \gamma \right) ^T\varvec{P}\varvec{Z}\\ \varvec{Z}^T\varvec{P}\varvec{X}\left( \gamma \right)&\varvec{Z}^T\varvec{P}\varvec{Z}-\alpha \varvec{Q}_{v} \end{bmatrix}\preceq 0. \end{aligned}$$
    (37)

Bearing in mind above results, the following theorem is formulated

Theorem 1

System (25) is strictly quadratically bounded for all \(\varvec{v}_{k}\in \mathbb {E}_v\) if there exist matrices \(\varvec{P}\succ 0\), \(\varvec{U}\) and a scalar \(\alpha \in (0,1)\), such that the following inequality is satisfied

$$\begin{aligned} \begin{bmatrix} -\varvec{P}+\alpha \varvec{P}&\varvec{0}&{\bar{\varvec{A}}}_{{}}\left( \gamma \right) ^T\varvec{P}-\bar{\varvec{C}}_{}^T\varvec{U}_1^T\\ \varvec{0}&-\alpha \varvec{Q}_v&\bar{\varvec{W}}_{}\varvec{P}-\bar{\varvec{V}}^T\varvec{U}_1^T\\ \varvec{P}{\bar{\varvec{A}}}_{{}}\left( \gamma \right) -\varvec{U}_1\bar{\varvec{C}}_{}&\varvec{P}\bar{\varvec{W}}_{}-\varvec{U}_1\bar{\varvec{V}}&-\varvec{P}\end{bmatrix}\prec 0. \end{aligned}$$
(38)

Proof

Based on (25) and (37) it can be observed that QB is equivalent to

$$\begin{aligned} V_{k+1} - \left( 1-\alpha \right) V_k - \alpha \varvec{v}_{k}^T\varvec{Q}_{v}\varvec{v}_{k} < 0, \end{aligned}$$
(39)

which leads to

$$\begin{aligned} \bar{\varvec{e}}_{k+1}^T\varvec{P}\bar{\varvec{e}}_{k+1} - \bar{\varvec{e}}_{k}^T\varvec{P}\bar{\varvec{e}}_{k} + \alpha \bar{\varvec{e}}_{k}^T\varvec{P}\bar{\varvec{e}}_{k} - \alpha \varvec{v}_{k}^T\varvec{Q}_{v}\varvec{v}_{k} < 0. \end{aligned}$$
(40)

Using (25) it can be shown that (40) can be equivalently rewritten as

$$\begin{aligned} \begin{aligned}&\bar{\varvec{e}}_{k}^T\left( \varvec{X}\left( \gamma \right) ^T\varvec{P}\varvec{X}\left( \gamma \right) - \varvec{P}+ \alpha \varvec{P}\right) \bar{\varvec{e}}_{k}\\&\quad + \bar{\varvec{e}}_{k}^T\left( \varvec{X}\left( \gamma \right) ^T\varvec{P}\varvec{Z}\right) \varvec{v}_{k} + \varvec{v}_{k}^T\left( \varvec{Z}^T\varvec{P}\varvec{X}\left( \gamma \right) \right) \bar{\varvec{e}}_{k}\\&\quad + \varvec{v}_{k}^T\left( \varvec{Z}^T\varvec{P}\varvec{Z}- \alpha \varvec{Q}_{v}\right) \varvec{v}_{k} \prec 0. \end{aligned} \end{aligned}$$
(41)

By introducing

$$\begin{aligned} \bar{\varvec{v}}_{k} = \begin{bmatrix} \bar{\varvec{e}}_{k}\\ \varvec{v}_{k} \end{bmatrix}, \end{aligned}$$
(42)

inequality (41) may be transformed into the following form

$$\begin{aligned} \bar{\varvec{v}}_{k}^T \begin{bmatrix} \varvec{X}\left( \gamma \right) ^T\varvec{P}\varvec{X}\left( \gamma \right) - \varvec{P}+ \alpha \varvec{P}&\varvec{X}\left( \gamma \right) ^T\varvec{P}\varvec{Z}\\ \varvec{Z}^T\varvec{P}\varvec{X}\left( \gamma \right)&\varvec{Z}^T\varvec{P}\varvec{Z}-\alpha \varvec{Q}_{v} \end{bmatrix}\bar{\varvec{v}}_{k}\prec 0, \end{aligned}$$
(43)

or into an alternative form

$$\begin{aligned} \begin{bmatrix} \varvec{X}\left( \gamma \right) ^T\\ \varvec{Z}^T \end{bmatrix}\varvec{P}\begin{bmatrix} \varvec{X}\left( \gamma \right)&\varvec{Z}\end{bmatrix}+ \begin{bmatrix} -\varvec{P}+\alpha \varvec{P}&\varvec{0}\\ \varvec{0}&-\alpha \varvec{Q}_{v} \end{bmatrix}\prec 0. \end{aligned}$$
(44)

Subsequently, applying Schur complement to (44) and then multiplying left and right side by \(\text {diag}\left( \varvec{I},\varvec{I},\varvec{P}\right)\) give

$$\begin{aligned} \begin{bmatrix} -\varvec{P}+\alpha \varvec{P}&\varvec{0}&\varvec{X}\left( \gamma \right) ^T\varvec{P}\\ \varvec{0}&-\alpha \varvec{Q}_{v}&\varvec{Z}^T\varvec{P}\\ \varvec{P}\varvec{X}\left( \gamma \right)&\varvec{P}\varvec{Z}&-\varvec{P}\end{bmatrix}\prec 0. \end{aligned}$$
(45)

Introducing:

$$\begin{aligned} \varvec{P}\varvec{X}\left( \gamma \right)=\, & {} \varvec{P}\left( {\bar{\varvec{A}}}_{{}}\left( \gamma \right) - \bar{\varvec{K}}_{}\bar{\varvec{C}}_{}\right) = \varvec{P}{\bar{\varvec{A}}}_{{}}\left( \gamma \right) - \varvec{U}_1\bar{\varvec{C}}_{}, \end{aligned}$$
(46)
$$\begin{aligned} \varvec{P}\varvec{Z}=\, & {} \varvec{P}\left( \bar{\varvec{W}}_{} - \bar{\varvec{K}}_{}\bar{\varvec{V}}{}\right) = \varvec{P}\bar{\varvec{W}}_{} - \varvec{U}_1\bar{\varvec{V}}{}. \end{aligned}$$
(47)

and applying (46)–(47) into (45) completes the proof. \(\square\)

It is worth to emphasize that (38) is the set of bilinear matrix inequalities (BMIs) due to a multiplication of \(\alpha\) and \(\varvec{P}\). However, since \(\alpha\) is included in the set \(\left( 0,1\right)\), a simple iterative algorithm may be employed to handle this problem. And as a consequence, the problem is reduced to solve a set of linear matrix inequalities (LMIs) by changing the parameter \(\alpha\), iteratively.

Finally, the design procedure boils down to solve the set of LMIs (38) and then to calculate gain matrices for the estimator from

$$\begin{aligned} \bar{\varvec{K}}_{} = \begin{bmatrix} \varvec{K}_{x} \\ \varvec{K}_{a} \\ \varvec{K}_{s} \end{bmatrix} = \varvec{P}^{-1}\varvec{U}_1. \end{aligned}$$
(48)

3.2 Derivation of uncertainty intervals

In order to provide the measure of imprecision of the achieved estimates, the uncertainty intervals for the state and faults are proposed. To solve the above problem, let us start with the following theorem:

Theorem 2

If system (25) is strictly quadratically bounded for all \(\varvec{v}_{k} \in \mathcal {E}_{\varvec{v}_{}}\), then the uncertainty intervals for the state and fault are given as follows:

$$\begin{aligned}&\hat{\varvec{x}}_{i,k} - \varvec{z}_{i,k} \le \varvec{x}_{i,k} \le \hat{\varvec{x}}_{i,k} + \varvec{z}_{i,k}, \nonumber \\&\quad i=1,\ldots ,n, \end{aligned}$$
(49)
$$\begin{aligned}&{\hat{\varvec{f}}}_{a,j,k} - \varvec{z}_{i,k} \le \varvec{f}_{a,j,k} \le {\hat{\varvec{f}}}_{a,j,k} + \varvec{z}_{i,k}, \nonumber \\&\quad j=1,\ldots ,r,\quad i=n+1,\ldots ,n+r, \end{aligned}$$
(50)
$$\begin{aligned}&{\hat{\varvec{f}}}_{s,l,k} - \varvec{z}_{i,k} \le \varvec{f}_{s,l,k} \le {\hat{\varvec{f}}}_{s,l,k} + \varvec{z}_{i,k},\nonumber \\&\quad l=1,\ldots ,s,\quad i=n+r+1,\ldots ,n+r+s, \end{aligned}$$
(51)

with

$$\begin{aligned} z_{i,k}= \,& {} \left( \zeta _k(\alpha ) \varvec{c}_{i}^T\varvec{P}^{-1}\varvec{c}_{i} \right) ^{\frac{1}{2}}, \end{aligned}$$
(52)
$$\begin{aligned} \zeta _k(\alpha )=\, & {} (1-\alpha )^kV_0+1-(1-\alpha )^k, \end{aligned}$$
(53)

where \(V_k=\bar{\varvec{e}}_{k}^T\varvec{P}\bar{\varvec{e}}_{k}\) and \(\varvec{c}_{i}\) is the ith column of an \(n+r+m\)-order identity matrix.

Proof

Theorem 1 guarantees that there exist \(\alpha \in (0,1)\) and \(\varvec{P}\succ \varvec{0}\) such that (38) holds. Furthermore, from (43) it can be shown that:

$$\begin{aligned} \begin{aligned}&\bar{\varvec{e}}_{k}^T\left( \varvec{X}\left( \gamma \right) ^T\varvec{P}\varvec{X}\left( \gamma \right) - \varvec{P}+\alpha \varvec{P}\right) \bar{\varvec{e}}_{k}+\\&\bar{\varvec{e}}_{k}^T\left( \varvec{X}\left( \gamma \right) ^T\varvec{P}\varvec{Z}\right) \varvec{v}_{k}+\\&\varvec{v}_{k}^T\left( \varvec{Z}^T\varvec{P}\varvec{X}\left( \gamma \right) \right) \bar{\varvec{e}}_{k}+\\&\varvec{v}_{k}^T\left( \varvec{Z}^T\varvec{P}\varvec{Z}-\alpha \varvec{Q}_{v}\right) \varvec{v}_{k}< \varvec{0} \Longrightarrow \\&\bar{\varvec{e}}_{k}^T\left( \varvec{X}\left( \gamma \right) ^T\varvec{P}\varvec{X}\left( \gamma \right) \right) \bar{\varvec{e}}_{k} -(1-\alpha )V_k + \\&\bar{\varvec{e}}_{k}^T\left( \varvec{X}\left( \gamma \right) ^T\varvec{P}\varvec{Z}\right) \varvec{v}_{k}+\\&\varvec{v}_{k}^T\left( \varvec{Z}^T\varvec{P}\varvec{X}\left( \gamma \right) \right) \bar{\varvec{e}}_{k}+\\&\varvec{v}_{k}^T\left( \varvec{Z}^T\varvec{P}\varvec{Z}\right) \varvec{v}_{k}-\alpha \varvec{v}_{k}^T\varvec{Q}_{v} \varvec{v}_{k}< \varvec{0}\Longrightarrow \\&V_{k+1}-(1-\alpha )V_k-\alpha \varvec{v}_{k}^T\varvec{Q}_{v}\varvec{v}_{k}< \varvec{0}\Longrightarrow \\&V_{k+1}<(1-\alpha )V_k+\alpha \varvec{v}_{k}^T\varvec{Q}_{v}\varvec{v}_{k}. \end{aligned} \end{aligned}$$
(54)

Subsequently, by the fact that \(\varvec{v}_{k}^T\varvec{Q}_v\varvec{v}_{k}\le 1\), the upper bound of \(V_{k+1}\) defined by (54) can be overbounded with the nonstrict inequality of the form:

$$\begin{aligned} V_{k+1}&\le \alpha + (1-\alpha )V_k. \end{aligned}$$
(55)

Following [2], by induction, inequality (55) yields:

$$\begin{aligned} V_k\le \zeta _k(\alpha ), \end{aligned}$$
(56)

where the sequence \(\zeta _k(\alpha )\) is defined by (53). Thus, from (56) it is evident that for any \(\varvec{v}_{k} \in \mathcal {E}_{\varvec{v}_{}}\), \(\bar{\varvec{e}}_{k}\) is contained inside the ellipsoid:

$$\begin{aligned} \bar{\varvec{e}}_{k}^T\varvec{P}\bar{\varvec{e}}_{k}\le \zeta _k(\alpha ). \end{aligned}$$
(57)

The maximum and minimum values of \(\bar{\varvec{e}}_{i,k}\) can be computed by maximizing/minimizing \(\varvec{c}_{i}^T\bar{\varvec{e}}_{k}\) under (57) where \(\varvec{c}_{i}\) is ith column of identity matrix.

Using the Lagrange approach, the following Lagrange function can be formulated:

$$\begin{aligned} \varvec{h}(\bar{\varvec{e}}_{k},\lambda )=\varvec{c}_{i}^T\bar{\varvec{e}}_{k}+\lambda (\bar{\varvec{e}}_{k}^T\varvec{P}\bar{\varvec{e}}_{k}-\zeta _k(\alpha )), \end{aligned}$$
(58)

where \(\lambda\) stands for the Lagrange multiplier. Differentiating (58) with respect to \(\bar{\varvec{e}}_{k}\) and \(\lambda\) yields:

$$\begin{aligned} \frac{\partial \varvec{h}(\bar{\varvec{e}}_{k},\lambda )}{\partial \bar{\varvec{e}}_{k}}=\, & {} \varvec{c}_{i}^T+2 \lambda \bar{\varvec{e}}_{k}^T\varvec{P}=\varvec{0}, \end{aligned}$$
(59)
$$\begin{aligned} \frac{\partial \varvec{h}(\bar{\varvec{e}}_{k},\lambda )}{\partial \lambda }= \,& {} \bar{\varvec{e}}_{k}^T\varvec{P}\bar{\varvec{e}}_{k}- \zeta _k(\alpha )=0. \end{aligned}$$
(60)

Thus, from (59), it can be shown that:

$$\begin{aligned} \bar{\varvec{e}}_{k}^T=-\frac{1}{2\lambda }\varvec{c}_{i}^T\varvec{P}^{-1}. \end{aligned}$$
(61)

Substituting (61) into (60) leads to:

$$\begin{aligned} \lambda =\pm \frac{1}{2}\left( \zeta _k(\alpha )^{-1} \varvec{c}_{i}^T\varvec{P}^{-1}\varvec{c}_{i} \right) ^{\frac{1}{2}}. \end{aligned}$$
(62)

Finally, introducing (62) into (61) yields:

$$\begin{aligned} -z_{i,k}\le \bar{\varvec{e}}_{i,k}\le z_{i,k},\quad i=1,\dots ,n+r, \end{aligned}$$
(63)

where \(z_{i,k}\) is given by (52), which completes the proof. \(\square\)

To illustrate the above-described approach, Fig. 1 shows exemplary uncertainty interval.

Fig. 1
figure 1

Exemplary uncertainty intervals

The size of the uncertainty interval is related to the Lyapunov matrix \(\varvec{P}\) shaping uncertainty ellipsoid (57). In particular, by maximizing the determinant of this matrix one can obtain an uncertainty ellipsoid, which has the smallest possible volume. Another, optimization criteria are related to the trace of \(\varvec{P}\). In this case, the average length of its axes can be minimized. The main drawback of the above criteria is that they can lead to large differences between uncertainty intervals of the achieved estimates. For example, this size can be very small for state estimates, while it can be excessively large for an actuator fault. To settle this problem it is proposed to minimize the largest axis of (57), which entails in

$$\begin{aligned} \max \underline{\sigma }(\varvec{P}), \end{aligned}$$
(64)

under (38). Unfortunately such an optimization task is hard to solve directly. However, it can be observed that (64) is equivalent to:

$$\begin{aligned} \min {\bar{\sigma }}(\varvec{P}^{-1}). \end{aligned}$$
(65)

Subsequently, using the approach indicated in [27], i.e. by defining \(\beta >0\) such that

$$\begin{aligned} {\bar{\sigma }}(\varvec{P}^{-1})<\beta , \end{aligned}$$
(66)

optimization task (65) can be transformed into an equivalent problem

$$\begin{aligned}&\min \beta , \end{aligned}$$
(67)

under

$$\begin{aligned}&\varvec{P}^{-1}[\beta ^{-1}\varvec{I}]\varvec{P}^{-1}-\beta \varvec{I} \prec 0, \quad \beta >0. \end{aligned}$$
(68)

For the purpose of subsequent analysis let us recall the following lemma.

Lemma 2

[8, 9, 22] The following statements are equivalent

  1. 1.

    There exist \(\varvec{X}\succ 0\) and \(\varvec{W}_{} \succ 0\) such that

    $$\begin{aligned} \varvec{V}^T\varvec{X}_{}\varvec{V}-\varvec{W}_{}\prec 0. \end{aligned}$$
    (69)
  2. 2.

    There exist \(\varvec{X}_{}\succ 0\) such that

    $$\begin{aligned} \begin{bmatrix} -\varvec{W}_{}&\varvec{V}^T\varvec{U}^T\\ \varvec{U}\varvec{V}&\varvec{X}_{}-\varvec{U}-\varvec{U}^T \end{bmatrix}\prec 0. \end{aligned}$$
    (70)

Remark 1

It is important to note that the regularity of \(\varvec{U}\) is ensured by the fact that the last block-diagonal element of (70) implies \(\varvec{U}+\varvec{U}^T \succ \varvec{X}\succ \varvec{0}\).

Applying Lemma 2 to (68) leads to

$$\begin{aligned} \begin{bmatrix} -\beta \varvec{I}&\varvec{P}^{-1}\varvec{U}_2^T\\ \varvec{U}_2\varvec{P}^{-1}&\beta \varvec{I} -\varvec{U}_2-\varvec{U}_2^T \end{bmatrix} \prec 0. \end{aligned}$$
(71)

Substituting \(\varvec{U}_2=\varvec{P}\) into the above inequality leads to

$$\begin{aligned} \begin{bmatrix} -\beta \varvec{I}&\varvec{I}\\ \varvec{I}&\beta \varvec{I} -2\varvec{P}\end{bmatrix} \prec 0. \end{aligned}$$
(72)

Finally, the optimization problem is formulated as follows:

$$\begin{aligned} \min \beta , \end{aligned}$$
(73)

under \(\beta >0\), (38) and (72). Note that solving the above optimization problem guaranties that excessively large uncertainty intervals will be eliminated.

3.3 The final design procedure of the proposed approach

To summarize the considerations, the following procedure consisting of two stages is proposed to design estimator:

Stage 1:

—Offline computation:

1.:

Collect data sets to train neural network;

2.:

Train neural network in form (2)–(3);

3.:

Transform neural network to LPV using (6)–(15);

4.:

Select \(\varvec{Q}_{\varvec{\varepsilon }_{a}}\), \(\varvec{Q}_{\varvec{\varepsilon }_{s}}\), \(\varvec{Q}_{\varvec{w}_{1}}\), \(\varvec{Q}_{\varvec{w}_{2}}\);

5.:

Obtain matrix \(\varvec{P}\), \(\varvec{U}_1\) and \(\varvec{U}_2\) solving (4);

6.:

Calculate gain matrices using (48);

Stage 2:

—Online computation: for each k,

1.:

compute the fault estimate \(\varvec{\hat{f}}_{a,k}\) and \(\varvec{\hat{f}}_{s,k}\) with (17)–(19);

4 Illustrative example

The aim of this section is to show the effectiveness of the proposed approach. For that purpose, the algorithm has been implemented to a laboratory multitank (MT) system provided by Inteco. The MT system is presented in Fig. 2. It was developed for experimentally testing linear and nonlinear methodologies used in control, fault diagnosis as well as identification. It consists of three separated, differently shaped tanks placed one above another. The tanks are interconnected manual valves and electro-valves. The MT system is fed with 12-V DC pump. By using this pump the liquid is pumped from the reservoir to the upper tank. Subsequently, the liquid from the upper tank outflows gravitationally to the other tanks. The MT system is controlled by digital I/O board that works with MATLAB/Simulink. For more information concerning the MT specification, the reader is referred to [16].

Fig. 2
figure 2

The laboratory multitank system

An initial phase of developing the adaptive fault estimator, which is described in Sect. 3, was to obtain the neural LPV model of the considered system. It should be underlined that the Levenberg–Marquardt backpropagation algorithm has been used to train the neural network. In total, 70% of data set gathered from the system was taken as a training set, 15% as validation set and 15% as testing. Note that the analysis of training methods of the neural network is beyond the scope of this paper. However, we employ a very frequently used routine, which is Levenberg–Marquardt algorithm. There is no particular reason behind using this approach, and similar strategies can be utilized interchangeably. The sampling time is \(T_s=0.01 [s]\). Several experiments with different number of neurons have been performed. The best performance has been obtained with the 13 neurons in the hidden layer of the neural network. Training data were collected in the open-loop control under fault-free conditions, \(\varvec{f}_{a,k}=\varvec{0}\), \(\varvec{f}_{s,k}=\varvec{0}\). with the random input signal as steps signal. The performance of the trained neural network can be shown in Fig. 3 presenting real water levels and their representations given by neural network. Furthermore, let us consider the following fault scenarios comprising both actuator and sensor faults:

$$\begin{aligned} \varvec{f}_{a,k}&= {} \left\{ \begin{array}{ll} -0.45\cdot \varvec{u}_{k}, &{} \qquad 5000 \le k \le 7500,\\ 0, &{} \qquad \text{ otherwise }, \end{array}\right. \nonumber \\ \varvec{f}_{s,1,k}&= {} 0, \end{aligned}$$
(74)
$$\begin{aligned} \varvec{f}_{s,2,k}= & {} \left\{ \begin{array}{ll} \varvec{y}_{2,k}+0.04, &{} \quad 6000 \le k \le 8000,\\ 0, &{} \quad \text{ otherwise }. \end{array} \right. \nonumber \\ \varvec{f}_{s,3,k}= & {} \left\{ \begin{array}{ll} \varvec{y}_{3,k}-0.1, &{} \quad 7000 \le k \le 9000,\\ 0, &{} \quad \text{ otherwise }. \end{array} \right. \end{aligned}$$
(75)

which can be perceived as temporary \(45\%\) loss of the effectiveness of the pump. Moreover, partly at the same time, the sensor faults occur. Such a dangerous situation might happen in real industrial environment and could cause incorrect operation of the system. As a consequence, it even might be a reason of a total failure of the system.

Fig. 3
figure 3

Real water levels and their neural network representations

The second stage was to obtain gain matrices of the estimator. Using MATLAB and YALMIP with SeDuMi solver, the problem under \(\beta >0\), (38) and (72) was solved and then calculating (48), the following gain matrices have been obtained:

$$\begin{aligned} \varvec{K}_{x}= & {} \begin{bmatrix} 0.2037&-0.0110&0.0003\\ -0.0593&0.0052&-0.0006\\ -0.0016&-0.0011&0.0020 \end{bmatrix}, \end{aligned}$$
(76)
$$\begin{aligned} \varvec{K}_{a}&= {} \begin{bmatrix} 0.1779&-0.0088&0.0003 \end{bmatrix}, \end{aligned}$$
(77)
$$\begin{aligned} \varvec{K}_{s}= & {} \begin{bmatrix} 0.5824&0.0277&-0.0011\\ -0.0110&1.0783&0.0018\\ 0.0009&0.0079&1.0877 \end{bmatrix}, \end{aligned}$$
(78)

with the optimal parameter \(\alpha =0.2\). Furthermore, performing a number of experiments the disturbance distribution matrices were established as \(\varvec{W}_{1} = \text {diag}(0.05, 0, 0)\) and \(\varvec{W}_{2} = 0.01Im\). Figures 4, 5 and 6 present the response of the system which represent the water level in the first, second and third tank, respectively. In these plots a blue solid line stands for the real state \(\varvec{x}_{i,k}\), while red dashed one is its estimate \(\hat{\varvec{x}}_{i,k}\). Moreover, the measured output \(\varvec{y}_{i,k}\) is given by a black dash-dotted line and uncertainty intervals are given by a green solid line. It can be easily observed that the estimates follow the real state in spite of the sensor faults. The real sensor faults \(\varvec{f}_{s,i,k}\), plotted blue solid line, along with their estimates \({\hat{\varvec{f}}}_{s,i,k}\), depicted by red dashed line with uncertainty intervals are given by green solid line, shown in Figs. 7 and 8. Meanwhile, the sensor faults, the actuator malfunction, have been occurred. However, the adaptive estimator, proposed in this paper, identified both actuator and sensor faults correctly. Indeed, as a consequence, both sensor and actuator faults have been estimated very well. It can be seen in Fig. 9 wherein blue solid line represents the real actuator fault \(\varvec{f}_{a,k}\), while its estimate \({\hat{\varvec{f}}}_{a,k}\) is represented by a red dashed one and uncertainty intervals are given by green solid line. They overbound the real state as well as the real but unknown actuator and sensor faults. It might seem that the actuator fault estimate lies outside the boundaries in some periods. However, taking into account the zoom window, it can be easily seen that it lies precisely between the thresholds.

Fig. 4
figure 4

State \(\varvec{x}_{1,k}\) (blue solid line), its estimate \(\hat{\varvec{x}}_{1,k}\) (red dashed line), the measured output \(\varvec{y}_{1,k}\) (black dash-dotted line) and intervals (green solid line) (color figure online)

Fig. 5
figure 5

State \(\varvec{x}_{2,k}\) (blue solid line), its estimate \(\hat{\varvec{x}}_{2,k}\) (red dashed line), the measured output \(\varvec{y}_{2,k}\) (black dash-dotted line) and intervals (green solid line) (color figure online)

Fig. 6
figure 6

State \(\varvec{x}_{3,k}\) (blue solid line), its estimate \(\hat{\varvec{x}}_{3,k}\) (red dashed line), the measured output \(\varvec{y}_{3,k}\) (black dash-dotted line) and intervals (green solid line) (color figure online)

Fig. 7
figure 7

The sensor faults \(\varvec{f}_{s,2,k}\) (blue solid line), its estimate \(\varvec{\hat{f}}_{s,2,k}\) (red dashed line) and intervals (green solid line) (color figure online)

Fig. 8
figure 8

The sensor faults \(\varvec{f}_{s,3,k}\) (blue solid line), its estimate \(\varvec{\hat{f}}_{s,3,k}\) (red dashed line) and intervals (green solid line) (color figure online)

Fig. 9
figure 9

The actuator faults \(\varvec{f}_{a,k}\) (blue solid line), its estimate \({\hat{\varvec{f}}}_{a,k}\) (red dashed line) and intervals (green solid line) (color figure online)

5 Conclusions

The main objective of this paper was to provide a novel fault estimation strategy based on a well-established and frequently used neural network structure. The primary advantage of the proposed approach over those present in the literature is that it makes it possible to estimate state as well as actuator and sensor fault, simultaneously. Another advantage is that it can be used for all kind of systems for which neural network-based modelling provides satisfactory results. Finally, the uncertainty of the resulting estimates can be moderately minimized by using the proposed strategy. All these features make the proposed approach an excellent candidate for the implementation of fault-tolerant control schemes. Indeed, the experimental results performed with a real laboratory equipment clearly exhibit and justify all the above-mentioned properties.