## 3 The Proposed DoA Estimation Algorithm and Beamforming Scheme
### DoA Estimation and Prediction
\begin{array}{c}\alpha_{n}\\ u_{n}\\ \beta_{n}\\ v_{n}\\ \lambda_{n}\\ w_{n}\end{array} \right]=\left[ \begin{array}{cccccc}1&\tau&0&0&0&0\\ 0&1&0&0&0&0\\ 0&0&1&\tau&0&0\\ 0&0&0&1&0&0\\ 0&0&0&0&1&\tau\\ 0&0&0&0&0&1\end{array} \right]\left[ \begin{array}{c}\alpha_{n-1}\\ u_{n-1}\\ \beta_{n-1}\\ v_{n-1}\\ \lambda_{n-1}\\ w_{n-1}\end{array} \right]+\left[ \begin{array}{c}0.5\tau^{2}\mu_{x}\\ \tau\mu_{x}\\ 0.5\tau^{2}\mu_{y}\\ \tau\mu_{y}\\ 0.5\tau^{2}\mu_{z}\\ \tau\mu_{z}\end{array} \right], \tag{9}\]  
where \(\tau\) is the time step of the prediction process. Here, \(\mathbf{v}_{0}\) and \(\mu\) are deducted from the original velocity \(\mathbf{v}_{b}\) and acceleration vectors \(\mu_{b}\) which are read from FSI in UAV's vehicle carried NED frame,\[\mathbf{v}_{0} = \mathbf{T}_{bn}\mathbf{v}_{b}, \tag{10}\] \[\mu = \mathbf{T}_{bn}\mathbf{t}_{b}, \tag{11}\]  
where \(\mathbf{T}_{bn}\) is the transformation matrix from the vehicle carried NED frame to the local NED frame,  
\[\mathbf{T}_{bn}=\left[ \begin{array}{ccc}\cos\!\delta\!\cos\!\psi&\cos\! \delta\!\sin\!\psi&-\!\sin\!\delta\\ r_{a}&r_{b}&\sin\!\phi\!\cos\!\delta\\ r_{c}&r_{d}&\cos\!\phi\!\cos\!\delta\end{array} \right],\] \[r_{a}=\sin\!\phi\!\sin\!\delta\!\cos\!\psi-\cos\!\phi\!\sin\!\psi, \tag{12}\] \[r_{b}=\sin\!\phi\!\sin\!\delta\!\sin\!\psi+\cos\!\phi\!\cos\!\psi,\] \[r_{c}=\cos\!\phi\!\sin\!\delta\!\cos\!\psi+\sin\!\phi\!\sin\!\psi,\] \[r_{d}=\cos\!\phi\!\sin\!\delta\!\sin\!\psi-\sin\!\phi\!\cos\!\psi,\]  
where, \(\phi\), \(\delta\) and \(\psi\) denote the Yaw, Pitch, and Roll rotational coordinates, respectively [34]. After the new position is predicted, \(DoA\) could be updated using Equation (8). Figure 4 illustrates how the prediction algorithm maintains a stable DoA estimation output. Suppose a linear array lies on the \(x\) axis and a DoA estimation is executed when the UAV is at the position \(\mathbf{pr}_{n}\), with the actual DoA to be \(\eta_{n}\). By applying the proposed algorithm the BS calculates the assumed DoA \(\gamma_{n}\), using the UAV's position from the FSI message, \(\mathbf{pe}_{n}\). After a certain time, the UAV reaches a new position \(\mathbf{pr}_{n+1}\), and the BS gets a new assumed position of it, \(\mathbf{pe}_{n+1}\). Now the actual and assumed DoA values become \(\eta_{n+1}\) and \(\gamma_{n+1}\), respectively. Thus, the DoA error becomes \(\eta_{n+1}-\gamma_{n+1}\), whereas on the estimation point it was \(\eta_{n}-\gamma_{n}\). It can be seen that compared with Figure 2, the DoA error has not shown notable variations with the movement of the UAV. We use the curves \(\mathbf{c}_{r}\) and \(\mathbf{c}_{e}\) to denote the actual and the predicted tracks, respectively. Since the IMU keeps highly accurate UAV velocity and acceleration information during a short time, the position error remains in a limited range during the whole prediction process. \(\mathbf{c}_{r}\) can be approximated by \(\mathbf{c}_{e}\) with a vector:  
\[\mathbf{c}_{r}\doteq\mathbf{c}_{e}+(\mathbf{pr}_{n}-\mathbf{pe}_{n}). \tag{13}\]  
Although the prediction process does not obtain a significantly more accurate position information, it keeps the DoA error free from cumulative increasing without adding to the training overhead.