## 2 The UAV VtolA7
### Aircraft Dynamics Modeling
#### 2.2.2 Six-DOF Equation  
Convert the aerodynamic force \(L\), \(D\), \(Y\) from the wind coordinate system to the body coordinate system:  
\[\left\{\begin{array}{l}F_{x}=-D\cos\alpha\cos\beta-Y\cos\alpha\sin\beta+L \sin\alpha-G\sin\theta+T\\ F_{y}=-D\sin\beta+Y\cos\beta+G\sin\phi\cos\theta\\ F_{z}=-D\sin\alpha\cos\beta-\sin\alpha\sin\beta-L\cos\alpha+G\cos\phi\cos \theta-\sum\limits_{k=1}^{4}T_{k}\end{array}\right. \tag{2}\]  
Figure 3: Control mechanism of VtoI A7 UAV.  
Among the above equations, \(\alpha\) and \(\beta\) are, respectively, the angle of attack and sideslip angle of VtolA7. The resultant moment acting on VtolA7 can be expressed as:  
\[\left\{\begin{array}{l}l=l_{a}-\sum\limits_{i=1}^{4}T_{k}(y_{k}-y_{cg})+Q_{T} \\ m=m_{a}+m_{cg}+\sum\limits_{k=1}^{4}T_{k}(x_{k}-x_{cg})+\sum\limits_{k=1}^{4} M_{y_{k}}\\ n=n_{a}+n_{cg}+\sum\limits_{k=1}^{4}Q_{k}\end{array}\right. \tag{3}\]  
where, \(x_{k}\), \(y_{k}\), and \(z_{k}\) are, respectively, the coordinates of the \(k\)-th rotor in the body coordinate system. \(l_{a}\), \(m_{a}\), \(n_{a}\) are, respectively, the aerodynamic moment. \(x_{r}\), \(y_{r}\), \(z_{r}\) and \(y_{cg}\), \(x_{cg}\), \(z_{cg}\) are, respectively, the aerodynamic reference point and center of gravity the body coordinate system. \(m_{cg}\) and \(n_{cg}\) are additional changes caused by the inconsistency between the focus and the center of gravity, and the thrust line of the front paddle and the center of gravity. \(Q_{T}\) is the reaction torque caused by the front-mounted propeller. \(Q_{k}\) is the \(k\)-th reaction torque caused by the \(k\)-th rotor.  
\[\left\{\begin{array}{l}m_{cg}=(L\cos\alpha+Y\sin\alpha\sin\beta+D\sin\alpha)( x_{r}-x_{cg})-T_{5}(z_{5}-z_{cg})\\ n_{cg}=(Y\cos\beta-D\sin\beta)(x_{r}-x_{cg})\end{array}\right. \tag{4}\]  
According to [PERSON]'s second law, the translation and rotation equation of six-DOF can be expressed as:  
\[\left\{\begin{array}{l}\dot{u}=vr-wq+F_{x}/m_{g}\\ \dot{v}=wp-ur+F_{y}/m_{g}\\ \dot{w}=uq-vp+F_{z}/m_{g}\\ l=I_{x}\dot{p}+(I_{z}-I_{y})qr-I_{zx}(pq+\dot{r})\\ m=I_{x}\dot{q}+(I_{x}-I_{z})rp+I_{zx}(p^{2}-r^{2})\\ n=I_{x}r+(I_{y}-I_{x})pq+I_{zx}(qr-p)\end{array}\right. \tag{5}\]  
where, \(u\), \(v\), and \(w\) are velocity vectors of the body coordinate system; \(m_{g}\) is the mass of the aircraft; \(I_{x}\), \(I_{y}\), and \(I_{z}\) are moments of inertia; \(I_{xy}\), \(I_{yz}\), and \(I_{zx}\) are products of inertia.  
Equations of motion for VtolA7 can be rewritten:  
\[\left\{\begin{array}{l}\dot{x}_{g}=u\cos\theta\cos\psi+v(\sin\theta\sin \phi\cos\psi-\cos\phi\sin\psi)+w(\sin\theta\cos\phi\cos\psi+\sin\phi\sin\psi) \\ \dot{y}_{g}=u\cos\theta\sin\psi+v(\sin\theta\sin\phi\sin\psi+\cos\phi\cos\psi)+ w(\sin\theta\cos\phi\sin\psi-\sin\phi\cos\psi)\\ \dot{h}=u\sin\theta-v\sin\phi\cos\theta-w\cos\phi\sin\theta\\ \dot{\phi}=p+\tan\theta(\theta\sin\phi+r\cos\phi)\\ \dot{\theta}=q\cos\phi-r\sin\phi\\ \dot{\psi}=(q\sin\phi+r\cos\phi)/\cos\theta\end{array}\right. \tag{6}\]  
where, \(x_{g}\), \(y_{g}\), and \(h\) are the position of the aircraft in the inertial system, \(\phi\), \(\theta\), and \(\psi\) are, respectively, the roll, pitch, and yaw angles.