# Observer-Based Distributed Fault Detection for Heterogeneous Multi-Agent Systems
## 3 Results
### Output-Feedback-Based Distributed FD  
As state information is difficult to obtain, an output-feedback-based control law is designed here, as well as an output-feedback-based distributed FD scheme, where matrices \(A_{i}\), \(B_{fi}\) and \(C_{mi}\) need to satisfy the following assumption. **Assumption 4**. : \(C_{mi}B_{fi}\) _and \( \begin{bmatrix}sI-A_{i}&B_{fi}\\ C_{mi}&0\end{bmatrix} \) are of full column rank for \(\forall s\in\mathbb{C},Re(s)\geq 0\), \(i=1,2,\cdots,N\)._  
Inspired by Reference [2], we design a dynamic output-feedback-based distributed control law:  
\[ \begin{split} u_{i}&=K_{1i}\hat{x}_{i}+K_{2i}\eta_{i} \\ \hat{x}_{i}&=A_{i}\hat{x}_{i}+B_{i}u_{i}+E_{i}\eta_{i}+L_{i}(C_{mi} \hat{x}_{i}-y_{mi})\\ \eta_{i}&=S\eta_{i}-c\sum_{j=1}^{N}[a_{ij}(\eta_{i}-\eta_{j})+a_{i0}( \eta_{i}-v)]\end{split}  \tag{21}\]  
where \(c\) and \(K_{1i}\), \(K_{2i}\) and \(L_{i}\) are the scalar and parameter matrices to design, respectively. Let \(K_{2i}\) be designed as follows:  
\[K_{2i}=U_{i}-K_{1i}X_{i}\]  
\(X_{i}\) and \(U_{i}\) are still determined by the matrix equations introduced in Assumption 2. **Remark 9**. : _Control law (23) consists of two observers, i.e., the compensator \(\eta_{i}\) and state observer \(\hat{x}_{i}\), which aim at estimating exosystem and system states, respectively._  
\(y_{i}\) is designed as follows:  
\[y_{i}= \begin{bmatrix}y_{m_{1}^{i}}-C_{m_{1}^{i}}\hat{x}_{i_{1}}\\ \vdots\\ y_{m_{|\mathcal{N}_{i}|}^{2}}-C_{m_{|\mathcal{N}_{i}|}^{2}}\hat{x}_{\tilde{i} _{|\mathcal{N}_{i}|}}\end{bmatrix}  \tag{22}\]  
which contains measurement output and state estimate of agents in \(\mathcal{\bar{N}}_{i}\). Substitute (23) into (5), we have  
\[ \begin{split}\dot{x}_{i}&=A_{i}x_{i}+B_{i}K_{1i}\hat{x} _{i}+B_{i}K_{2i}\eta_{i}+E_{i}v+B_{f_{i}}f_{i}\\ \dot{\hat{x}}_{i}&=A_{i}\hat{x}_{i}+B_{i}u_{i}+E_{i} \eta_{i}+L_{i}(C_{mi}\hat{x}_{i}-y_{mi})\\ \dot{\eta}_{i}&=S\eta_{i}-c\sum_{j=1}^{N}[a_{ij}( \eta_{i}-\eta_{j})+a_{i0}(\eta_{i}-v)]\end{split}  \tag{23}\]  
let \(\theta_{i}=x_{i}-X_{i}v\), \(e_{xi}=x_{i}-\hat{x}_{i}\), \(e_{qi}=\eta_{i}-v\), and according to Assumption 2, we could obatin (24):  
\[ \begin{split}&\dot{\theta}_{i}=A_{i}x_{i}+B_{i}K_{1i}\hat{x}_{i}+B_{ i}K_{2i}\eta_{i}+B_{f_{i}}f_{i}+(E_{i}-X_{i}S)v\\ &=A_{i}x_{i}+B_{i}K_{1i}\hat{x}_{i}+B_{i}K_{2i}\eta_{i}+B_{f_{i}} f_{i}-(A_{i}X_{i}+B_{i}U_{i})v\\ &=A_{i}x_{i}+B_{i}K_{1i}(x_{i}-e_{xi})+B_{i}K_{2i}\eta_{i}+B_{f_{i }}f_{i}-(A_{i}X_{i}\\ &+B_{i}K_{2i}+B_{i}K_{1i}X_{i})v\\ &=(A_{i}+B_{i}K_{1i})\theta_{i}-B_{i}K_{1i}e_{xi}+B_{i}K_{2i}e_{ \eta i}+B_{f_{i}}f_{i}\\ &\dot{e}_{xi}=(A_{i}+L_{i}C_{mi})e_{xi}-E_{i}e_{\eta i}+B_{f_{i}} f_{i}\\ &\dot{e}_{\eta i}=Se_{\eta i}-c\sum_{j=1}^{N}[a_{ij}(e_{\eta i}-e _{\eta j})+a_{i0}e_{\eta i}]\end{split}  \tag{24}\]  
Denote  
\[ \begin{split}&\zeta_{i}=\begin{bmatrix}\theta_{i_{1}}^{T}&\cdots&\theta_{i_{|\mathcal{K}_{i}|}}^{T} \end{bmatrix}^{T},\varepsilon_{xi}=\begin{bmatrix}e_{x_{i_{1}}}^{T}&\cdots&e_{xi_{| \mathcal{K}_{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}&\tilde{e}_{xi}^{T}&e_{\eta}^{T}\end{bmatrix}^ {T}\\ &\tilde{f}_{i}=\begin{bmatrix}f_{i_{1}}^{T}&\cdots&f_{i_{|\mathcal{K}_{i}|}}^{T} \end{bmatrix}^{T}\end{split}  \tag{25}\]  
then we obtain the following MAS closed-loop system:  
\[