# Observer-Based Distributed Fault Detection for Heterogeneous Multi-Agent Systems
## 3 Results  
### State-Feedback-Based Distributed FD  
Define \(y_{i}\) as the observer feedback information that agent \(i\)'s observers for FD could utilise, which is designed to contain state \(x_{i}\) and compensator state \(\eta_{i}\) of agent \(i\), as well as agent \(i\)'s neighbours', where agent \(i\)'s neighbours' compensator state \(\eta_{i}\) are also utilised in control law (7). \[y_{i}= \begin{bmatrix}x_{i_{1}}-X_{i_{1}}\eta_{i_{1}}\\ \vdots\\ x_{i_{|X_{i}|}}-X_{i_{|X_{i}|}}\eta_{i_{|X_{i}|}}\end{bmatrix}  \tag{8}\]Substitute (7) into (5), we obtain  
\[ \begin{split}\dot{x}_{i}&=(A_{i}+B_{i}K_{1i})x_{i}+B_{i }K_{2i}\eta_{i}+E_{i}\upsilon+B_{f_{i}}f_{i}\\ \dot{\eta}_{i}&=S\eta_{i}-c\sum_{j=1}^{N}[a_{ij}( \eta_{i}-\eta_{j})+a_{i0}(\eta_{i}-\upsilon)]\end{split}  \tag{9}\]  
Furthermore, let \(\theta_{i}=x_{i}-X_{i}\upsilon,e_{\eta i}=\eta_{i}-\upsilon\), and according to Assumption 2, we could obatin  
\[ \begin{split}&\dot{\theta}_{i}=(A_{i}+B_{i}K_{1i})x_{i}+B_{i}K_{2i }\eta_{i}-(A_{i}X_{i}+B_{i}U_{i})\upsilon+B_{f_{i}}f_{i}\\ &=(A_{i}+B_{i}K_{1i})x_{i}+B_{i}K_{2i}\eta_{i}-(A_{i}X_{i}+B_{i}K_ {2i}+B_{i}K_{1i}X_{i})\upsilon\\ &+B_{f_{i}}f_{i}\\ &=(A_{i}+B_{i}K_{1i})\theta_{i}+B_{i}K_{2i}e_{\eta i}+B_{f_{i}}f _{i}\\ &\dot{e}_{\eta i}=S\epsilon_{\eta i}-c\sum_{j=1}^{N}[a_{ij}(e_{ \eta i}-e_{\eta j})+a_{i0}e_{\eta i}]\end{split}  \tag{10}\]  
**Remark 3**. : _Obviously, it is impossible to design observers for System (10) decoupled from \(e_{\eta i}(t)\) if agent \(i\) could not obtain exogenous signal \(\upsilon(t)\) directly. What is more, the evolution of \(e_{\eta i}(t)\) is influenced by \(e_{\eta j}(t),j\in\mathcal{N}_{i}\), i.e., \(||e_{\eta i}(t)||\) may not be monotonic for \(t\geq 0\), therefore, the bound of \(||e_{\eta i}(t)||\) is unknown based only on local information, which means that isolation thresholds cannot be selected [28]. Therefore, observers for FD need to be designed for the following closed-loop System (12), where utilisation of exogenous signal \(\upsilon\) is avoided._  
Denote  
\[ \begin{split}\zeta_{i}&=\begin{bmatrix}\theta_{i_{1 }}^{T}&\cdots&\theta_{i_{i}|\mathcal{N}_{i}|}^{T}\end{bmatrix}^{T}, \tilde{f}_{i}=\begin{bmatrix}f_{i_{1}}^{T}&\cdots&f_{i_{1}|\mathcal{N}_{i}|}^{T }\end{bmatrix}^{T}\\ e_{\eta}&=\begin{bmatrix}e_{\eta 1}^{T}&\cdots&e_{\eta N}^{T}\end{bmatrix}^{T}, \psi_{i}=\begin{bmatrix}\zeta_{i}^{T}&e_{\eta}^{T}\end{bmatrix}^{T}\end{split}  \tag{11}\]  
we obtain System (12) for agent \(i\). \[ \begin{split}\dot{\psi}_{i}&=A_{i}\psi_{i}+\tilde{B}_{f_{i}} \tilde{f}_{i}\\ A_{i}&=\begin{bmatrix}\Omega_{1i}&\Omega_{2i}\\ 0&I_{N}\otimes S-c\mathcal{H}\otimes I_{q}\end{bmatrix},\tilde{B}_{f_{i}}= \begin{bmatrix}\Omega_{3i}\\ 0\end{bmatrix}\\ \Omega_{1i}&=\text{diag}(A_{\tilde{t}_{1}}+B_{\tilde{t}_{1}}K_{1 \tilde{t}_{1}},\cdots,A_{\tilde{t}_{1}|\mathcal{N}_{i}|}+B_{\tilde{t}_{1}| \mathcal{N}_{i}|}K_{1\tilde{t}_{1}|\mathcal{N}_{i}|})\\ \Omega_{2i}&=\begin{bmatrix}\mathbf{e}_{\tilde{t}_{1}}\otimes(B_{\tilde{t}_{1 }}K_{2\tilde{t}_{1}})^{T},\cdots,\mathbf{e}_{\tilde{t}_{1}|\mathcal{N}_{i}|} \otimes(B_{\tilde{t}_{1}|\mathcal{N}_{i}|}K_{2\tilde{t}_{1}|\mathcal{N}_{i}|}) ^{T}\end{bmatrix}^{T}\\ \Omega_{3i}&=\text{diag}(B_{f_{i_{1}}},\cdots,B_{\tilde{f}_{i_{1}|\mathcal{N}_{ i}|}})\end{split}  \tag{12}\]  
and (8) can be rewritten as follows:  
\[ \begin{split}& y_{i}=C_{i}\psi_{i}\\ C_{i}&=\begin{bmatrix}I&-C_{11}\end{bmatrix}\\ C_{i1}&=\begin{bmatrix}\mathbf{e}_{\tilde{t}_{1}}\otimes X_{\tilde{t}_{1}}^ {T}&\mathbf{e}_{\tilde{t}_{2}}\otimes X_{\tilde{t}_{2}}^{T}&\cdots&\mathbf{e}_{i_{1}| \mathcal{N}_{i}|}\otimes X_{\tilde{t}_{1}|\mathcal{N}_{i}|}^{T}\end{bmatrix}^{T} \end{split}  \tag{13}\]  
Combine (12) and (13), we obtain \(|\mathcal{N}_{i}|\) systems as follows:  
\[\left\{ \begin{split}\dot{\psi}_{i}&=A_{i}\psi_{i}+\tilde{b}_{f_{ \tilde{t}_{2}}}f_{\tilde{t}_{k}}+\tilde{B}_{f_{-\tilde{t}_{k}}}\tilde{f}_{-i \tilde{t}_{k}}\\ y_{i}&=C_{i}\psi_{i},k=1,\cdots,|\mathcal{N}_{i}|\end{split} \right. \tag{14}\]where \(\tilde{b}_{f_{i_{k}}}=