# Modeling and Application of Dynamic Soaring by Unmanned Aerial Vehicle
## 2 Dynamic Soaring Application Model
### Energy Harvesting Mechanism Model  
The energy harvesting mechanism model is based on the equation of motion and mechanical energy equation. This model will indicate the real-time energy change during the dynamic soaring. Like previous studies, this paper built the mechanism model under the noninertial reference frame. The axes systems and forces are detailed in Figures 1 and 2. In Figures 1 and 2, \(\left[u,v,w\right]\) are the airspeed components in the three directions under the body axes, \(V_{a}\) is the airspeed vector, \(\left[F_{xa},F_{ya},F_{za}\right]\) are the forces defined in the wind axes, \(\left[F_{xe},F_{ye},F_{ze}\right]\) are the forces defined in the NED axes, and \(\left[W_{xe},W_{ye},W_{ze}\right]\) are the wind speed in the NED axes. The forces defined in the wind axes usually are the aerodynamic forces: lift, drag, and side force. The forces defined in the NED axes are normally gravity. To get the resultant force, the transfer matrix is needed to transfer different forces into one axes system. The wind-body (wind to body) transfer matrix can note as \(\mathbf{T_{W}^{B}}\). It is composed of the angle between wind axes and body axes, normally named the aerodynamic angle. The transfer matrix can be written as:  
\[\mathbf{T_{W}^{B}}=\left[ \begin{array}{ccc}\cos\alpha\cos\beta&-\cos\alpha\sin \beta&-\sin\alpha\\ \sin\beta&\cos\beta&0\\ \sin\alpha\cos\beta&-\sin\alpha\sin\beta&\cos\alpha\end{array} \right] \tag{1}\]  
where \(\alpha\) is the angle of attack and \(\beta\) is the sideslip angle. The NED-body (NED to body) transfer matrix can written as \(\mathbf{T_{N}^{B}}\). It is composed of the angle between NED axes and body axes, normally named the Euler angle. The matrix can be written as:  
\[\mathbf{T_{N}^{B}}=\left[ \begin{array}{ccc}\cos\theta\cos\psi&\cos\theta\sin \psi&-\sin\theta\\ -\cos\phi\sin\psi+\sin\phi\sin\theta\cos\psi&\cos\phi\cos\psi+\sin\phi\sin \theta\sin\psi&\sin\phi\cos\theta\\ \sin\phi\sin\psi+\cos\phi\sin\theta\cos\psi&-\sin\phi\cos\psi+\cos\phi\sin \theta\sin\psi&\cos\phi\cos\theta\end{array} \right], \tag{2}\]  
Figure 1: The three axes system this paper used. (**a**) North-East-Down (NED) axes system; (**b**) Body axes system; (**c**) Wind axes system. Figure 2: The forces acting on the UAV model. where \(\theta\) is the pitching angle, \(\psi\) is the yaw angle, and \(\phi\) is the bank angle. To calculate the NED-wind (NED to wind) transfer matrix \(\mathbf{T}_{N}^{\text{W}}\), we can combine the NED-body transfer matrix and body-wind transfer matrix:  
\[\mathbf{T}_{N}^{\text{W}}\)=\(\mathbf{T}_{B}^{\text{W}}\mathbf{T}_{N}^{\text{B}}\)=\(\mathbf{T}_{W}^{\text{B}}\)\(-\mathbf{T}_{N}^{\text{B}}\)=\(\mathbf{T}_{W}^{\text{B}}\)\(\mathbf{T}_{N}^{\text{T}}\)\(\mathbf{T}_{N}^{\text{B}}\)  
Thus, the equation of motion in the body axes is:  
\[m\left[ \begin{array}{c}\frac{du}{dt}\\ \frac{dv}{dt}\\ \frac{dv}{dt}\end{array} \right]=\mathbf{T}_{N}^{\text{B}}\left[ \begin{array}{c} F_{xe}\\ F_{ye}\\ F_{ze}\end{array} \right]+\mathbf{T}_{W}^{\text{B}}\left[ \begin{array}{c}F_{xa}\\ F_{ya}\\ F_{za}\end{array} \right]-m\left[ \begin{array}{c}qw-rv\\ ru-pw\\ pv-qu\end{array} \right]-\mathbf{T}_{N}^{\text{B}}\left[ \begin{array}{c}m\dot{W}_{ ye}\\ m\dot{W}_{ye}\\ m\dot{W}_{ze}\end{array} \right] \tag{4}\]  
where \([p,q,r]\) refer to the Euler angle velocity, \(m\) is the mass of the UAV, and \(\left[\dot{W}_{xe},\dot{W}_{ye},\dot{W}_{ze}\right]\) are the wind accelerations in the NED axes. Recall the kinetic energy equation and set it in the body axes:  
\[E_{k}=\frac{1}{2}m\Big{(}u^{2}+v^{2}+w^{2}\Big{)} \tag{5}\]  
\[\frac{dE_{k}}{dt}=m\frac{du}{dt}u+m\frac{dv}{dt}v+m\frac{dw}{dt}w \tag{6}\]  
Taking together Equations (4) and (6):  
\[