## 3 Active Fault-Tolerant Control System Design
### Fault Diagnosis Scheme  
In this section, the designing of a fault estimation scheme through an adaptive observer in the presence of actuator faults and external disturbances is presented. This information is used for controller design, which is presented in Section 3.2. By defining \(x^{T}=\left[ \begin{array}{cccc}\phi&\theta&\psi&z&\dot{\phi}&\dot{\theta}& \dot{\psi}&\dot{z}\end{array} \right]\) as the state vector, \(u^{T}=\left[ \begin{array}{cccc}F_{1}&F_{2}&F_{3}&F_{4}\end{array} \right]= \left[ \begin{array}{cccc}u_{1}&u_{2}&u_{3}&u_{4}\end{array} \right]\) as the control force vector, and \(y=\left[ \begin{array}{cccc}\phi&\theta&\psi&z&\dot{\phi}&\dot{\theta}&\dot{ \psi}&\dot{z}\end{array} \right]\) as the output vector, and using linearization technique for \(z\)-direction and attitude system at hovering point [37]. Equation (1) can be rewritten in a state-space form as:  
\[\left\{ \begin{array}{l}\dot{x}(t)=Ax(t)+Bu(t)+H+E_{d}d(t)\\ y=Cx(t)\end{array} \right. \tag{5}\]  
Figure 2: Control structure of a quadcopter. where \(E_{d}\) is the disturbance matrix, \(d(t)\) is the disturbance vector, \(E_{d}=I_{8\times 8}\), \(A=\left[ \begin{array}{ccc}0&0&0&0\\ 0&0&0&0\\ 0&0&0&0\\ 0&0&0&0\\ 0&-L/I_{x}&0&L/I_{x}\\ -L/I_{y}&0&L/I_{y}&0\\ d/(bl_{z})&-d/(bl_{z})&d/(bl_{z})&-d/(bl_{z})\\ 1/m&1/m&1/m&1/m\end{array} \right]\), \(C=I_{8\times 8}\), and \(H=\left[ \begin{array}{cccccc}0&0&0&0&0&0&-g\end{array} \right]^{T}\). When a fault occurs in the actuator, Equation (5) becomes [37]:  
\[\left\{ \begin{array}{c}\dot{x}(t)=Ax(t)+Bu(t)-BU(t)\Delta(t)+H+E_{d}d(t)\\ y=Cx(t)\end{array} \right. \tag{6}\]  
where \(U(t)=\left[ \begin{array}{cccc}u_{1}(t)&0&0&0\\ 0&u_{2}(t)&0&0\\ 0&0&u_{3}(t)&0\\ 0&0&0&u_{4}(t)\end{array} \right]\); \(\Delta(t)=\left[ \begin{array}{c}\dot{\aleph}_{1}(t)\\ \dot{\aleph}_{2}(t)\\ \dot{\aleph}_{3}(t)\\ \dot{\aleph}_{4}(t)\end{array} \right]\) is the loss of control effectiveness matrix, \(0\leq\mathfrak{s}_{i}(t)\leq 1\); \(i=1,\ldots,4\); \(\mathfrak{s}_{i}(t)=0\) and \(\mathfrak{s}_{i}(t)=1\) means that the \(i\)th actuator is completely healthy or fully damaged, respectively. The state space model (Equation (6)) can be rewritten as:  
\[\left\{ \begin{array}{c}\dot{x}(t)=Ax(t)+Bu(t)+Bf(t)+H+E_{d}d(t)\\ y=Cx(t)\end{array} \right. \tag{7}\]  
where \(f(t)=-U(t)\Delta(t)\). Before designing the adaptive observer, the following assumptions and lemmas are proposed. **Assumption 1**. : \(\dot{f}(t)\) _is norm-bounded, i.e., \(\|\dot{f}(t)\|\leq f_{1}\), with \(f_{1}>0\)._  
**Lemma 1**. : _For a given matrix \(P=P^{T}\geq 0\) and scalar \(\rho>0\), the following inequality must be satisfied:_  
\[2x^{T}y\leq\rho^{-1}x^{T}Px+\rho y^{T}P^{-1}y \tag{8}\]  
If all the above-mentioned assumptions and lemmas hold, then the adaptive observer can be constructed as:  
\[\left\{ \begin{array}{c}\dot{\hat{x}}(t)=A\hat{x}(t)+Bu(t)+B\hat{f}(t)+H+L(y (t)-\hat{y}(t))\\ \hat{y}=C\hat{x}(t)\end{array} \right. \tag{9}\]  
**Theorem 1**. : _For a given observer gain, \(L\), constant \(\varepsilon>0\), if there exist the matrices \(P=P^{T}>0\), \(G=G^{T}>0\), \(\Lambda=\Lambda^{T}>0\), \(R_{1}\) and \(R_{2}\) such that:_  
\[\left[ \begin{array}{ccc}M_{11}&M_{12}&M_{13}\\ *&M_{22}&M_{23}\\ *&*&M_{33}\end{array} \right]<0 \tag{10}\]  
\[B^{T}P=R_{1}C \tag{11}\]where \(M_{11}=\left(A-LC\right)^{T}\!P+P(A-LC)+C^{T}C\), \(M_{12}=\left(A-LC\right)^{T}\!C^{T}R_{2}^{T}\), \(M_{13}=PE_{d}\), \(M_{22}=\rho^{-1}G-2R_{2}CB,M_{23}=-R_{2}CE_{d}\), \(M_{33}=-\varepsilon^{2}I_{p}\), \(\eta=\rho^{-1}f_{1}^{2}\lambda_{\max}(\Lambda^{-1}G^{-1}\Lambda^{-1})\), and \(I_{p}\) is the unitary matrix with appropriate dimension, then, the fault estimation law can be presented as:  
\[\dot{f}(t)=\rho\Lambda R_{1}e_{y}(t)+\rho\Lambda R_{2}\dot{e}_{y}(t) \tag{12}\]  
Stability  
Let  
\[ \begin{array}{l}e_{x}(t)=x(t)\ -\hat{x}(t)\\ e_{f}(t)=f(t)-\hat{f}(t)\end{array}