## 2 Mathematical Modeling of UAV  
### Dynamic Modeling  
To facilitate the acquisition of the dynamic parameter changes of aircraft and design the FTAC algorithm, we tested and acquired QBall-X4 quadrotor UAV data using fault injection platform software. We assumed that the aircraft was a rigid body during the design process. The X-shaped framework was adopted. A general dynamic model of the quadrotor aircraft was thus constructed. Figure 1 shows the vehicle coordinate system and the inertial coordinate system of the quadrotor aircraft in an X-shaped configuration.  
The control system of a quadrotor aircraft was powered by the brushless DC motor. The main task of the controller was to produce the desired aircraft attitude and position by changing the rotation speed of the four motors. Therefore, converting the rotation speed into force and moment of force was an essential part of the initial modeling of the multi-rotor aircraft [33]. The virtual control input of the aircraft \(U=\left[u_{1}u_{2}u_{3}u_{4}\right]^{T}\) is introduced and defined as follows:  
\[\begin{cases}u_{1}=f_{m,1}+f_{m,2}+f_{m,3}+f_{m,A}\\ u_{2}=f_{m,2}+f_{m,3}-f_{m,1}-f_{m,A}\\ u_{3}=f_{m,1}+f_{m,3}-f_{m,2}-f_{m,4}\\ u_{4}=f_{m,1}+f_{m,2}-f_{m,3}-f_{m,4}\\ \end{cases}, \tag{1}\]  
where \(u_{1}\) is the total lift provided by the four motors to the UAV; \(u_{2}\) is the input control quantity of roll; \(u_{3}\) is the input control quantity of pitch; \(u_{4}\) is the input control quantity of yaw. The lift of each actuator is expressed as follows:  
\[f_{m,i}=c_{T,i}\cdot\Omega_{i}^{2}\ \ \ \ \ \left(i=1,2,3,4\right)\, \tag{2}\]  
where the parameter \(\Omega_{i}\ (rad/s)\) is the angular velocity of the rotor an \(c_{T,i}\) is the comprehensive thrust coefficient of a single o  
Figure 1: Reference coordinate system of the quadrotor.  
To design the FTAC algorithm, we referred to the dynamic model of the multi-rotor UAV from [7; 34]. The dynamic model of the quadrotor aircraft considered in this study used the following form:  
\[\left\{\begin{array}{l}\ddot{\phi}=\dot{\phi}\dot{\psi}\big{(}J_{yy}-j_{zz} \big{)}/J_{xx}+J_{m}/J_{xx}\dot{\theta}\Omega_{r}+l/J_{xx}u_{2}-K_{4}l/J_{xx} \dot{\phi}\\ \ddot{\theta}=\dot{\psi}\dot{\psi}\big{(}J_{zz}-J_{xx}\big{)}/J_{yy}+J_{m}/J_{yy} \dot{\theta}\Omega_{r}+l/J_{yy}u_{3}-K_{5}l/J_{yy}\dot{\theta}\\ \ddot{\psi}=\dot{\phi}\dot{\phi}\big{(}J_{xx}-J_{yy}\big{)}/J_{zz}+1/J_{zz}u_{3} -K_{6}/J_{zz}\dot{\psi}\\ \dot{x}=(\cos\phi\sin\theta\cos\psi+\sin\phi\sin\psi)u_{1}/m-K_{1}\dot{x}/m\\ \ddot{y}=(\cos\phi\sin\theta\sin\psi-\sin\phi\cos\psi)u_{1}/m-K_{2}\dot{y}/m\\ \dot{z}=(\cos\phi\cos\theta)u_{1}/m-K_{3}\dot{z}/m-g\end{array}\right., \tag{3}\]  
where \([\phi\ \theta\ \psi]\) correspond to the roll, pitch, and yaw angles of the UAV, respectively; \([x\ y\ z]\) is the position of the UAV in the inertial coordinate system in each direction. The inertial matrix of the UAV is \(J\)= diag\([J_{xx}\ J_{yy}\ J_{zz}]\); \(J_{m}\) and \(\Omega_{r}\) are the inertia and total residual angular velocity of the rotor, respectively; \(l\) is the distance between the central point of the actuator and rotor bearing; \(K_{i}>0\ (i=1,\cdots,6)\) is the resistance coefficient; the aircraft's mass is \(m\); and the gravitational acceleration is g = 9.81 N/kg.