## 4 Simulation Results  
### Fault Diagnosis Results  
The parameter of the quadcopter was chosen as shown in Table 1. The matrices and parameters were chosen for fault diagnosis scheme as follows:  
\[P=\left[\begin{array}{cccccccc}1.1035&0.9849&0.9853&0.9848&0.9859&0.9853&0.9 851&0.9852\\ 0.9849&1.1037&0.9852&0.9848&0.9853&0.9858&0.9851&0.9852\\ 0.9853&0.9852&1.1040&0.98  
The system matrices \(A,\ B,\ C,\ H,\ E_{d}\) were presented in Section 3.1, and the observer gain matrix was chosen as \(L=200I_{8\times 8}\). The parameters were chosen for adaptive sliding mode controller as follows: \(k_{1}=k_{2}=k_{3}=0.9\); \(A_{1}=A_{2}=A_{3}=10\); \(\beta_{1}=\beta_{2}=\beta_{3}=100\); \(\delta_{1}=\delta_{2}=\delta_{3}=50\).  
The sampling time \(T=0.001\) s was chosen for the simulation. The system disturbance was chosen as white noise with the power of \(0.005\). The trajectory performance of attitude control and altitude control in fault-free operation are shown in Figure 3, where the initial values are \(\phi_{0}=0.1\ \text{rad}\ (\approx 5.7^{\circ}),\ \theta_{0}=0.1\ \text{rad}\ (\approx 5.7^{\circ}),\ \psi_{0}=0.1\ \text{rad}\ ( \approx 5.7^{\circ})\), and \(z=1\ \text{m}\). It can be shown that the attitude angles and altitude can converge quickly to the original position.  
To test the performance of fault estimation in Equation (12), the initial values were chosen as \(\phi_{0}=0\ \text{rad},\ \theta_{0}=0\ \text{rad},\ \psi_{0}=0\ \text{rad}\), and \(z=0.5\ \text{m}\). The time-varying fault offsets were created for motors 1 and 2 as follows:  
\[\omega_{1\_fault} =\left\{\begin{array}{ll}\omega_{1},&t<14\ (\text{fault-free})\\ 0.7(1+0.2\sin(2\pi t/25)\omega_{1},&t\geq 14\ (\text{fault})\end{array}\right. \tag{50}\] \[\omega_{2\_fault} =\left\{\begin{array}{ll}\omega_{2},&t<14\ (\text{fault-free})\\ 0.7(1+0.2\sin(2\pi t/25)\omega_{2},&t\geq 14\ (\text{fault})\end{array}\right. \tag{51}\]  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameter** & **Description** & **Value** \\ \hline \(L\) & Arm length & 0.23 m \\ \(b\) & Thrust coefficient & \(3.13\times 10^{-5}\) N/m\({}^{2}\) \\ \(d\) & Drag coefficient & \(7.5\times 10^{-7}\) \\ \(m\) & Mass & 2 kg \\ \(I_{x}\); \(I_{y}\); \(I_{z}\) & Moments of inertia & 0.0075; 0.0075; 0.013 kg\(\cdot\)m\({}^{2}\) \\ \(I_{T}\) & Rotor inertia & \(6\times 10^{-5}\) kg\(\cdot\)m\({}^{2}\) \\ \(K_{1}\), \(K_{2}\), \(K_{3}\), \(K_{4}\), \(K_{5}\), \(K_{6}\) & Aerodynamic term & 0.01 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Quadcopter parameters.  
The results show that the estimation value converges quickly to time-varying fault offset values with high precision (Figure 4). Figure 5 shows the loss of control effectiveness (LoCE) in each actuator, while Figures 6 and 7 show system states and control inputs. It can be shown that the attitude angles maintain their states in the presence of faults. It is clear that when fault occurs, the roll and pitch motion has more influence than the yaw motion. Therefore, after fault occurs, the altitude is increased to the desired value, although there is a decrease in altitude at the beginning time of fault occurrence.  
Figure 4: Fault estimation in the presence of white noise: (**a**) F1 fault offset; (**b**) F2 fault offset.  
Figure 3: Trajectory performance of attitude and altitude control in fault-free operation: (**a**) Roll angle; (**b**) Pitch angle; (**c**) Yaw angle; (**d**) Altitude.  
Figure 5: Loss of control effectiveness of actuators: (**a**) actuator 1; (**b**) actuator 2.  
Figure 6: System states in the presence of faults: (**a**) Roll angle; (**b**) Pitch angle; (**c**) Yaw angle; (**d**) Altitude.