# Sliding Mode Thau Observer for Actuator Fault Diagnosis of Quadcopter UAVs
## 3 Nonlinear Observer for Fault Diagnosis
### Adaptive Sliding Mode Thau Observer for Fault Diagnosis  
The following conditions and lemmas are given for the ASMTO design:  
**C3**\(f(t)\) and \(\hat{f}(t)\) are norm-bounded, i.e., \(\|f(t)\|\leq f_{1}\), \(\|\hat{f}(t)\|\leq f_{2}\), with \(f_{1}\), \(f_{2}>0\). **C4** There exists an unknown constant that satisfies \(\|d(t)\|\leq N\). **Lemma 2**. : _For a given symmetric matrix \(P\geq 0\) and scalar \(\mu>0\), the following inequality must be satisfied:_  
\[2x^{T}y\leq\frac{1}{\mu}x^{T}Px+\mu y^{T}P^{-1}y. \tag{11}\]  
**Lemma 3**. : _If C2 holds, there exists a matrix \(P\geq 0\) such that_  
\[2e^{T}P(p(x_{1},u)-p(x_{2},u))\leq\gamma^{2}e^{T}PPe+e^{T}e. \tag{12}\]  
If all the above conditions and lemmas hold, then the ASMTO has a form  
\[\left\{ \begin{array}{l}\dot{\hat{x}}(t)=A\hat{x}(t)+p(\hat{x},u)+Bu(t)+E_{d }\hat{v}(t)+F\hat{f}(t)\ +K(\hat{y}(t)-y(t))\\ \hat{y}=C\hat{x}(t)\end{array} \right., \tag{13}\]  
where \(\hat{x}(t)\in R^{n}\), \(\hat{f}(t)\in R^{l}\), \(\hat{y}(t)\in R^{q}\) are the observer state vector, fault estimation of \(f(t)\), and observer output vector, respectively. \(K\) is the Thau observer gain matrix and \(v(t)\) is given by the following algorithm:  
Using Theorem 1, Lemma 2, and Lemma 3, one can see that  
\[2e_{x}^{T}(t)PFe_{f}(t)+\tfrac{2}{\sigma}e_{f}^{T}\Gamma^{-1}\dot{f }(t)\] \[=2e_{x}^{T}(t)PFe_{f}(t)+\tfrac{2}{\sigma}e_{f}^{T}\Gamma^{-1} \Bigl{(}-\Gamma F_{2}e_{y}+\sigma\Gamma\dot{f}(t)\Bigr{)}\] \[=2e_{f}^{T}\dot{f}(t)\] \[\leq e_{f}^{T}Ge_{f}+\dot{f}^{T}(t)G^{-1}\dot{f}(t)\] \[\leq e_{f}^{T}Ge_{f}+f_{1}^{2}\lambda_{\text{max}}(G^{-1})\] \[2e_{x}^{T}(t)PE_{d}(v(t)-d(t))\] \[=\tfrac{2}{\sigma}\bigl{(}F_{1}e_{y}(t)\bigr{)}^{T}\Bigl{(}-n(t) \tfrac{F_{1}e_{y}(t)}{|F_{1}e_{y}(t)|}-d(t)\Bigr{)}\enspace, \tag{24}\] \[<-\tfrac{2}{\sigma}\|F_{1}e_{y}(t)\|(n(t)-N)\]  
where \(\lambda_{\text{max}}\) is the maximum eigenvalue of the associated matrix. From Lemma 2, one can see that  
\[-\tfrac{2}{\sigma}e_{f}^{T}(t)\Gamma^{-1}\dot{f}(t) =\tfrac{2}{\sigma}\Bigl{(}-e_{f}^{T}(t)\Bigr{)}\Bigl{(}\Gamma^{- 1}\dot{f}(t)\Bigr{)}\] \[\leq\tfrac{1}{\sigma}(e_{f}^{T}(t)Ge_{f}(t)\] \[=2e_{x}^{T}(t)PFe_{f}(t)+\tfrac{2}{\sigma}e_{f}^{T}\Gamma^{-1} \Bigl{(}-\Gamma F_{2}e_{y}+\sigma\Gamma\dot{f}(t)\Bigr{)}\]0 \[=2e_{x}^{T}(t)PFe_{f}(t)+\tfrac{2}{\sigma}e_{f}^{T}\Gamma^{-1} \Bigl{(}-\Gamma F_{2}e_{y}+\sigma\Gamma\dot{f}(t)\Bigr{)}\]1 \[=2e_{x}^{T}(t)PFe_{f}(t)+\tfrac{2}{\sigma}e_{f}^{T}\Gamma^{-1} \Bigl{(}-\Gamma F_{2}e_{y}+\sigma\Gamma\dot{f}(t)\Bigr{)}\]2  
According to Lemma 3, we obtain  
\[=2e_{x}^{T}(t)PFe_{f}(t)+\tfrac{2}{\sigma}e_{f}^{T}\Gamma^{-1} \Bigl{(}-\Gamma F_{2}e_{y}+\sigma\Gamma\dot{f}(t)\Bigr{)}\]3 \[=2e_{x}^{T}(t)PFe_{f}(t)+\tfrac{2}{\sigma}e_{f}^{T}\Gamma^{-1} \Bigl{(}-\Gamma F_{2}e_{y}+\sigma\Gamma\dot{f}(t)\Bigr{)}\]4 \[=2e_{x}^{T}(t)PFe_{f}(t)+\tfrac{2}{\sigma}e_{f}^{T}\Gamma^{-1} \Bigl{(}-\Gamma F_{2}e_{y}+\sigma\Gamma\dot{f}(t)\Bigr{)}\]5 \[=2e_{x}^{T}(t)PFe_{f}(t)+\tfrac{2}{\sigma}e_{f}^{T}\Gamma^{-1} \Bigl{(}-\Gamma F_{2}e_{y}+\sigma\Gamma\dot{f}(t)\Bigr{)}\]6  
With (23), (24), (25), and (26), Equation (22) becomes  
\[=2e_{x}^{T}(t)PFe_{f}(t)+\tfrac{2}{\sigma}e_{f}^{T}\Gamma^{-1} \Bigl{(}-\Gamma F_{2}e_{y}+\sigma\Gamma\dot{f}(t)\Bigr{)}\]7 \[=2e_{x}^{T}(t)PFe_{f}(t)+\tfrac{2}{\sigma}e_{f}^{T}\Gamma^{-1} \Bigl{(}-\Gamma F_{2}e_{y}+\sigma\Gamma\dot{f}(t)\Bigr{)}\]8 \[=2e_{x}^{T}(t)PFe_{f}(t)+\tfrac{2}{\sigma}e_{f}^{T}\Gamma^{-1} \Bigl{(}-\Gamma F_{2}e_{y}+\sigma\Gamma\dot{f}(t)\Bigr{)}\]9 \[=2e_{f}^{T}\dot{f}(t)\]0 \[=2e_{f}^{T}\dot{f}(t)\]1 \[=2e_{f}^{T}\dot{f}(t)\]2 \[=2e_{f}^{T}\dot{f}(t)\]3 \[=2e_{f}^{T}\dot{f}(t)\]4  
where \(\eta=f_{1}^{2}\lambda_{\text{max}}(G^{-1})+\tfrac{1}{\sigma}f_{2}^{2}\lambda_ {\text{max}}(\Gamma^{-1}G^{-1}\Gamma^{-1}))\), \(\xi(t)=\left[ \begin{array}{cc}e_{x}^{T}(t)&e_{f}^{T}(t)\end{array} \right]\), and \(\Theta=\left[ \begin{array}{cc}P(A-KC)+(A-KC)^{T}P+\gamma^{2}PP+I&0\\ 0&\tfrac{\sigma+1}{\sigma}G\end{array} \right]\).