# Sliding Mode Thau Observer for Actuator Fault Diagnosis of Quadcopter UAVs
## 2 System Description  
While the right and left (3 and 4) motors of the quadcopter rotate in the clockwise direction, the other motors rotate in counterclockwise direction (Figure 1). Each motor is located at a distance \(L\) from the center of mass \(o\).  
Assuming the control variables can be described as  
\[\left\{\begin{array}{l}U_{1}=T_{1}+T_{2}+T_{3}+T_{4}\\ U_{2}=(T_{3}-T_{4})L\\ U_{3}=(T_{1}-T_{2})L\\ U_{4}=\tau_{1}+\tau_{2}-\tau_{3}-\tau_{4}\end{array}\right., \tag{1}\]  
Figure 1: Schematic of the geometric configuration of the quadcopter unmanned aerial vehicle (UAV).  
where \(\tau_{i}\) and \(T_{i}\) represent the torque and thrust force produced by the \(i\)th motor, respectively; \(U_{1}\) is the total thrust; \(U_{2},\ U_{3},\ U_{4}\) are the torques in \(\varphi,\theta,\psi\) directions, which correspond to roll, pitch, and yaw Euler angles, respectively (Figure 1).  
Thrust force and torque are related to the rotational speed as follows:  
\[T_{i} =b\Omega_{i}^{2}, \tag{2}\] \[\tau_{i} =d\Omega_{i}^{2}, \tag{3}\]  
where \(b,\ d\) represent the thrust and drag coefficients, and \(\Omega_{i}\) represents the rotational speed of the \(i\)th motor.  
Inserting Equations (2) and (3) into (1) yields  
\[\left\{\begin{array}{l}U_{1}=b(\Omega_{1}^{2}+\Omega_{2}^{2}+\Omega_{3}^{2} +\Omega_{4}^{2})\\ U_{2}=b(\Omega_{3}^{2}-\Omega_{4}^{2})\\ U_{3}=b(\Omega_{1}^{2}-\Omega_{2}^{2})\\ U_{4}=d(\Omega_{1}^{2}+\Omega_{2}^{2}-\Omega_{3}^{2}-\Omega_{4}^{2})\end{array} \right.. \tag{4}\]  
The quadcopter dynamic model has previously been formulated as follows [22; 24]:  
\[\left\{\begin{array}{l}I_{x}\ddot{\varphi}=U_{2}+(I_{y}-I_{z})\dot{\theta} \dot{\psi}-I_{T}\dot{\theta}\Omega-K_{\varphi}\dot{\varphi}\\ I_{y}\ddot{\theta}=U_{3}+(I_{z}-I_{x})\dot{\varphi}\dot{\psi}-I_{T}\dot{\varphi }\Omega-K_{\theta}\dot{\theta}\\ I_{z}\ddot{\psi}=U_{4}+(I_{x}-I_{y})\dot{\varphi}\dot{\theta}-K_{\psi}\dot{ \psi}\end{array}\right., \tag{5}\]  
where \(I_{x},\ I_{y},\ I_{z}\) represent the moments of inertia along the \(x,\ y,\ z\) directions, respectively; \(K_{\varphi},\ K_{\theta},\ K_{\psi}\) are drag coefficients; \(I_{T}\) is the moment of inertia of each motor, and \(\Omega=\Omega_{3}+\Omega_{4}-\Omega_{1}-\Omega_{2}\).  
We consider drag terms as disturbances, and they can be compensated by adaptive law, which is discussed in the \"nonlinear observer for fault diagnosis\" section. By defining the state vector \(x^{T}=\left[\begin{array}{cccc}\varphi&\theta&\psi&\dot{\varphi}&\dot{ \theta}&\dot{\psi}\end{array}\right]\), control input vector \(u^{T}=\left[\begin{array}{cccc}U_{2}&U_{3}&U_{4}\end{array}\right]\), and output vector \(y^{T}=\left[\begin{array}{cccc}\varphi&\theta&\psi&\dot{\varphi}&\dot{ \theta}&\dot{\psi}\end{array}\right]\), Equation (5) can be described in the state equation as  
\[\left\{\begin{array}{l}\dot{x}(t)=Ax(t)+p(x,u)+Bu(t)+E_{d}d(t)\\ y=Cx(t)\end{array}\right., \tag{6}\]  
where \(E_{d}\) is disturbance matrix, \(d(t)\in R^{s}\) is disturbance vector, \(A=\left[\begin{array}{cccc}0&0&0&1&0&0\\ 0&0&0&0&1&0\\ 0&0&0&0&0&1\\ 0&0&0&0&0&0&0\\ 0&0&0&0&0&0&0\\ 0&0&0&0&0&0\end{array}\right]\),  
\[B=\left[\begin{array}{cccc}0&0&0&0\\ 0&0&0&0\\ 0&0&0\\ 1/I_{x}&0&0\\ 0&1/I_{y}&0\\ 0&0&1/I_{z}\end{array}\right],\ C=I_{6\times 6},\ \text{and}\ p(x,u)=\left[ \begin{array}{cccc}0&\\ 0&\\ 0&\\ (\dot{\phi}\dot{\psi}(I_{y}-I_{z})-J_{T}\dot{\varphi}\Omega)/I_{x}\\ (\dot{\varphi}\dot{\psi}(I_{z}-I_{x})-J_{T}\dot{\varphi}\Omega)/I_{y}\\ \dot{\varphi}\dot{\theta}(I_{x}-I_{y})/I_{z}\end{array}\right]\]  
actuator fault occurs, Equation (6) can be described as  
\[\left\{\begin{array}{l}\dot{x}(t)=Ax(t)+p(x,u)+Bu(t)+Ff(t)+E_{d}d(t)\\ y=Cx(t)\end{array}\right., \tag{7}\]where \(F\) is the fault matrix, and \(f(t)\in R^{l}\) is an actuator fault vector.