# Observer-Based Distributed Fault Detection for Heterogeneous Multi-Agent Systems
## 3 Results
### State-Feedback-Based Distributed FD
\begin{bmatrix}\mathbf{e}_{k}^{T}\otimes B_{f_{i_{k}}}^{T}&0 \end{bmatrix} ^{T}\), \(\tilde{B}_{f_{-i_{k}}}\) denotes the surplus of \(\tilde{B}_{f_{i}}\) after deleting \(\tilde{b}_{f_{i_{k}}}\), and  
\[\tilde{f}_{-i_{k}}= \begin{bmatrix}f_{i_{1}}^{T}&\cdots&f_{i_{k-1}}^{T}&f_{i_{k+ 1}}^{T}&\cdots&f_{i_{|\mathcal{N}_{i}|}}^{T}\end{bmatrix} ^{T}\]  
Construct \(|\mathcal{N}_{i}|\) observers (15) for all the agents of \(\mathcal{N}_{i}\) in agent \(i\), which are labelled as \(i_{k}^{\tau}\), \(k=1,\cdots,|\mathcal{N}_{i}|\). \[ \begin{array}{l}\dot{z}_{i_{\overline{i_{k}}}}=G_{i_{\overline{i_{k}}}}z_{ i_{\overline{i_{k}}}}+R_{i_{\overline{i_{k}}}}y_{i}\\ \dot{\psi}_{i_{\overline{i_{k}}}}=z_{i_{\overline{i_{k}}}}+Q_{i_{\overline{i_ {k}}}}y_{i},k=1,\cdots,|\mathcal{N}_{i}|\end{array}  \tag{15}\]  
where  
\[ \begin{array}{l}(Q_{i_{\overline{i_{k}}}}C_{i}-I)b_{f_{i_{k}}}=0,T_{i_{ \overline{i_{k}}}}=I-Q_{i_{\overline{i_{k}}}}C_{i}\\ G_{i_{\overline{i_{k}}}}=T_{i_{\overline{i_{k}}}}A_{i}-R_{1_{i_{\overline{i_{k }}}}}C_{i},R_{2_{i_{\overline{i_{k}}}}}=G_{i_{\overline{i_{k}}}}Q_{i_{ \overline{i_{k}}}}\\ R_{i_{\overline{i_{k}}}}=R_{1_{i_{\overline{i_{k}}}}}+R_{2_{i_{\overline{i_{k }}}}}\end{array}  \tag{16}\]  
\(R_{1_{i_{\overline{i_{k}}}}}\) is a matrix to make \(G_{i_{\overline{i_{k}}}}\) Hurwitz stable. Then, construct \(|\mathcal{N}_{i}|\) residual generators \(r_{i_{\overline{i_{k}}}}\) as follows:  
\[r_{i_{\overline{i_{k}}}}=y_{i}-C_{i}\dot{\psi}_{i_{\overline{i_{k}}}},k=1, \cdots,|\mathcal{N}_{i}|.\]  
**Theorem 1**. : _Suppose that observers (15) exist for each agent in \(\mathcal{N}_{i}\), and Assumption 3 is satisfied. If \(\lim_{t\rightarrow\infty}r_{i_{\overline{i_{k}}}}(t)=0\), and \(\lim_{t\rightarrow\infty}r_{i_{\overline{i}}}(t)\
eq 0\), where \(j\in\mathcal{N}_{i}\) and \(j\
eq\overline{i}_{k}\), there occurs a fault in agent \(\widetilde{i}_{k}\)._  
Proof of Theorem 1.: The UIO error (residual) dynamics are shown as follows:  
\[ \begin{array}{l}\dot{e}_{i_{\overline{i_{k}}}}(t)=G_{i_{\overline{i_{k}}}}e_ {i_{\overline{i_{k}}}}(t)+T_{i_{\overline{i_{k}}}}\tilde{B}_{f_{-i_{\overline{ i_{k}}}}}\tilde{f}_{-i_{\overline{i_{k}}}},\\ r_{i_{\overline{i_{k}}}}(t)=C_{i}e_{i_{\overline{i_{k}}}}(t),\end{array}  \tag{17}\]  
where \(e_{i_{\overline{i_{k}}}}=\psi_{i}-\dot{\psi}_{i_{\overline{i_{k}}}}=T_{i_{ \overline{i_{k}}}}\psi_{i}-z_{i_{\overline{i_{k}}}}\). Therefore, residual generators will only be influenced by \(f_{-i_{\overline{i_{k}}}}(t)\). Assumption 3 indicates that \(\tilde{f}_{-i_{\overline{i_{k}}}}(t)=0\) if \(f_{i_{\overline{i_{k}}}}(t)\
eq 0\), therefore, \(\lim_{t\rightarrow\infty}r_{i_{\overline{i_{k}}}^{T}}(t)=0\) and \(\lim_{t\rightarrow\infty}r_{i_{\overline{i_{k}}}}(t)\
eq 0\), \(j\
eq\overline{i}_{k}\) indicates that agent \(\widetilde{i}_{k}\) is faulty. **Remark 4**. : _Assumption 3 could be relaxed if the number of faulty agents is known, and all the faulty agents locate in the same set \(\mathcal{N}_{i}\). Assume the number of faulty agents as \(h<|\mathcal{N}_{i}|\), then construct \(C_{|\mathcal{N}_{i}|}^{h}\) systems as follows:_  
\[\left\{ \begin{array}{l}\dot{\psi}_{i}=A_{i}\psi_{i}+\tilde{b}_{f_{\overline{ i_{k}}}}\tilde{f}_{k}+\tilde{B}_{f_{-i_{k}}}\tilde{f}_{-i_{\overline{k}}}\\ y_{i}=C_{i}\dot{\psi}_{i},k=1,\cdots,C_{|\mathcal{N}_{i}|}^{h}\end{array} \right.\]  
_where \(\tilde{f}_{ik}= \begin{bmatrix}\tilde{f}_{k_{1}}^{T}&\tilde{f}_{k_{2}}^{T}& \cdots&\tilde{f}_{i_{|\mathcal{N}_{i}|}}^{T}\end{bmatrix} ^{T}\), i.e., \(h\) elements chosen from \(\{f_{i_{1}},f_{i_{2}},\cdots,f_{i_{|\mathcal{N}_{i}|}}\}\), then \(\tilde{f}_{ik}\) has \(C_{|\mathcal{N}_{i}|}^{h}\) combinations, as well as \(\tilde{b}_{f_{k}}\). \(\tilde{B}_{f_{-i_{k}}}\) is the surplus of \(\tilde{B}_{f_{i}}\) after deleting \(\tilde{b}_{f_{i_{k}}}\)._  
_Design \(C_{|\mathcal{N}_{i}|}^{h}\) observers and residual generators in agent \(i\) for above systems following the same steps. Finally, the only residual generator containing all the faults converges to zero.