# Sliding Mode Thau Observer for Actuator Fault Diagnosis of Quadcopter UAVs
## 4 Experimental Results  
### Experimental Setup and Parameters  
For safety purposes, the quadcopter test bed was developed in the guidance, navigation, and control (GNC) lab (Figure 2). The fault diagnosis algorithm from Section 3 was tested on a DJI F450 quadcopter. The algorithm was implemented on a Pixhawk2 flight controller using C++ program from Eclipse software [26]. The flight controller used firmware version 3.5. In the experimental setup, a remote control was used to inject faults by limiting the pulse width modulation (PWM) of the motors, which allowed us to switch between stabilized and fault modes. During testing, the Mission Planner (MP), a commercially available software, was used to monitor flight data through Xbee (Telemetry) communication [27]. Since the MP has some limitations with regard to parameter monitoring, the fault estimation data had to be obtained through a C++ program that writes them to a log file. The experimental procedure is summarized in Figure 3.  
Figure 3: Experimental procedure. Figure 2: DJI F450 quadcopter. The DJI F450 parameter values are shown in Table 1. For the experiment, the matrices were chosen as follows: the fault matrix \(F=B\), and the disturbance matrix \(E_{d}=\left[ \begin{array}{cccccc}1&1&1&1&1&1\end{array} \right]^{T}\). The pair \((A,C)\) is observable and condition C1 is satisfied, \(p(x,u)\) is continuously differentiable, and satisfies condition C2 as it only contains multiplications and divisions. Thus, all conditions are met, and the proposed scheme is applicable. We used the following learning rate \(\Gamma=diag(0.005,0.005,0.005)\) and sampling time \(T=0.0025\) s for the experimental test bed. The matrices obtained from the ASMTO are \(F_{1}=\left[ \begin{array}{cccccc}101.77&101.77&101.77&101.77&101.77&101.77 \end{array} \right]\), \(F_{2}=\left[ \begin{array}{cccccc}-26&5&5&13,946&5&5\\ 5&-24&5&5&12,887&5\\ 3&3&-16&3&3&8701\end{array} \right]\)\(G=\left[ \begin{array}{cccccc}100&0&0&1&0&0\\ 0&100&0&0&1&0\\ 0&0&100&0&0&1\\ 1&0&0&100&0&0\\ 0&1&0&0&100&0\\ 0&0&1&0&0&100\end{array} \right]\), \(P=\left[ \begin{array}{cccccc}101.8&0.04&0.04&-0.19&0.04&0.04\\ 0.04&101.81&0.04&0.04&-0.19&0.04\\ 0.04&0.04&101.8&0.04&0.04&-0.19\\ -0.19&0.04&0.04&101.8&0.04&0.04\\ 0.04&-0.19&0.04&0.04&101.8&0.04\\ 0.04&0.04&-0.19&0.04&0.04&101.8\end{array} \right]\). The 30% partial loss fault is injected artificially into motor 1 by limiting the PWM of the motor at time \(t=7\) s. This is achieved by changing from stabilized mode to fault mode using the remote control. The fault percentage is user-controllable, and can be set in the C++ program. The moments of motors M2, M3, and M4 remained zero while the moment of motor M1 decreases because of the actuator fault (Figure 4). \begin{table}
\begin{tabular}{c c c} \hline
**Parameter** & **Description** & **Value** \\ \hline \(L\) & Arm length & 0.225 m \\ \(b\) & Thrust coefficient & \(9.8\times 10^{-6}\) N/m\({}^{2}\) \\ \(d\) & Drag coefficient & \(1.6\times 10^{-7}\) \\ \(\mathrm{m}\) & Mass & \(2\) kg \\ \(l_{x}\): \(l_{y}\): \(l_{z}\) & Moments of inertia & 0.0035; 0.0035; 0.005 kg\(\cdot\)m\({}^{2}\) \\ \(l_{T}\) & Rotor inertia & \(2.8\times 10^{-6}\) kg\(\cdot\)m\({}^{2}\) \\ \hline \end{tabular}
\end{table} 
Table 1: DJI F450 quadcopter parameters. Figure 4: Motor offsets caused by the fault. **Remark 3**. : _From Equations (15) and (20), it is easy to show that_  
\[\dot{e}_{f}=-\Gamma F_{2}e_{y}+\sigma\Gamma e_{f}+\sigma\Gamma f(t)-\dot{f}(t). \tag{30}\]  
The speed with which the estimation converges depends on the fault characteristics and the ASMTO design parameters. From Equation (30), we can see that \(\Gamma\) and \(\sigma\) need to be tuned in order to obtain better estimations that are adapted to the fault characteristics. Normally, the value of \(\sigma\) would be fixed in this algorithm. **Remark 4**. : _Since the moments of roll and pitch are at least one order of magnitude larger than the moment of yaw, the latter has a larger error in its fault estimation.