## 2 Quadrotor Dynamic Model  
In this section, the dynamic model of the quadrotor with wind disturbances is described. The quadrotor is assumed as rigid so that we can focus on the expression forms of the position, velocity, attitude, and angular velocity only. An inertial reference frame \(x_{w},y_{w},z_{w}\) is defined to represent the position and velocity of the quadrotor. A body-fixed reference frame \(x_{b},y_{b},z_{b}\) is defined to model the forces and moments. Note that the quadrotor as shown in Figure 1 is symmetrical and the internal mass distribution is also symmetrical. Then the translational dynamics of the quadrotor are as follows:  
\[\dot{p}=v, \tag{1}\]  
\[m\dot{v}=mg+Rf_{T}e_{3}+f_{ext}, \tag{2}\]  
where \(m\in\mathbb{R}\) is the mass of the quadrotor; \(g\in\mathbb{R}^{3}\) is the gravity vector; \(p\in\mathbb{R}^{3}\) is the position vector, which expresses the quadrotor center of mass in the inertial frame; \(v\in\mathbb{R}^{3}\) is the velocity vector; \(f_{T}\in\mathbb{R}\) is the total thrust from four propellers; and \(f_{ext}\in\mathbb{R}^{3}\) is the external disturbance force from unmodeled aerodynamic effects and wind gust conditions. The rotation matrix from the body-fixed reference frame to the inertial reference frame is \(R\in\mathbb{R}^{3\times 3}\). On account of \(f_{T}\) always only acts on the axes of the body-fixed reference frame, the quadrotor has to change its acceleration to reach the desired position. And the rotational dynamics are given by:  
\[J\dot{\Omega}=J\Omega\times\Omega+M+M_{ext}, \tag{3}\]  
where \(\Omega\in\mathbb{R}^{3}\) is the body angular velocity vector, \(J\in\mathbb{R}^{3\times 3}\) is the moment of inertial matrix in the body fixed frame, \(M\in\mathbb{R}^{3}\) represents the moment from propellers, and \(M_{ext}\in\mathbb{R}^{3}\) represents the external disturbance moment. In terms of control allocation of the quadrotor, the output consists of the total thrusts and moments acting on the quadrotor, while the input is determined by the speed of the four propellers. We can model \(f_{T}\) and \(M\) as a quadratic function of four motors. Therefore, the moment \(M\) can be presented as  
\[M= \begin{bmatrix}-l_{y}k_{1}&l_{y}k_{1}&l_{y}k_{1}&-l_{y}k_{1}\\ l_{x}k_{1}&-l_{y}k_{1}&l_{x}k_{1}&-l_{x}k_{1}\\ k_{3}&k_{3}&-k_{3}&-k_{3}\end{bmatrix}\begin{bmatrix}\omega_{1}^{2}\\ \omega_{2}^{2}\\ \omega_{3}^{2}\\ \omega_{4}^{2}\end{bmatrix} + \begin{bmatrix}-l_{y}k_{2}&l_{y}k_{2}&l_{y}k_{2}& -l_{y}k_{2}\\ l_{x}k_{2}&-l_{y}k_{2}&l_{x}k_{2}&-l_{x}k_{2}\\ k_{4}&k_{4}&-k_{4}&-k_{4}\end{bmatrix}\begin{bmatrix}\omega_{1}\\ \omega_{2}\\ \omega_{3}\\ \omega_{4}\end{bmatrix} , \tag{4}\]  
where \(\omega= \begin{bmatrix}\omega_{1}&\omega_{2}&\omega_{3}&\omega_{4}\end{bmatrix} ^ {T}\) is the vector of the motor speed, \(l_{x}\) and \(l_{y}\) are the quadrotor moment arms of the x-axis and y-axis, respectively, and \(k_{1},k_{2},k_{3},k_{4}\) are the quadratic coefficients [7]. We can obtain the control force \(f_{T}\) and moment \(M\) and then directly distribute the signal to four motors. As discussed in [13], the second item (the first degree) in (4) can be omitted in most cases. The thrust and the moment generated by the propellers can be represented as the quadratic terms of the motor speed. We can simplify it further by assuming that the ratio of the coefficient of rotor thrust and the moment is constant, which means \(k_{3}/k_{1}=k_{4}/k_{2}=k\). This is reasonable when the yaw angle changes not radically. Then we can derive that  
\[ \begin{bmatrix}f_{T}\\ M\end{bmatrix} =B \begin{bmatrix}\omega_{2}^{2}\\ \omega_{2}^{2}\\ \omega_{2}^{2}\\ \omega_{4}^{3}\end{bmatrix} , \tag{5}\]  
\[B=k_{1} \begin{bmatrix}1&1&1&1\\ -l_{y}&l_{y}&l_{y}&-l_{y}\\ l_{x}&-l_{x}&l_{x}&-l_{x}\\ k&k&-k&-k\end{bmatrix} . \tag{6}\]  
Figure 1: A quadrotor schematic with an inertial reference frame and a body-fixed reference frame. \(B\in\mathbb{R}^{4\times 4}\) denotes the control matrix.