## 4 Prediction of Distribution of Drones
### Model Construction  
The traditional GRU model can only predict the point position of the aircraft. Considering the flexible and changeable characteristics of the drone, this paper constructs a quartile regression bidirectional gate recurrent unit neural network (QRDGRU). This QRDGRU model is an improved model from the bidirectional gated recurrent unit (D-GRU) structure from the authors' previous research. The D-GRU model integrates the prediction based on the change of location for two adjacent points, as well as the prediction based on the change of location at intervals of two points [24]. In this research, the quartile regression structure is further incorporated. The QRDGRU model can provide the position distribution of the drone to compensate for possible irregularities in the mapping learned by the neural network layer when sampling at a single interval, from which the air transport managers can have a better knowledge of the position of the drone.  
Similar to GRU, the QRDGRU structure includes two gates, update gate \(z_{t}\) and reset gate \(r_{t}\), to control input and output values. The essence of QRDGRU is the improvement of data processing and loss function. Equation (4) demonstrates the loss function of QRDGRU:  
\[\begin{split} f_{\text{loss}}&=\min\sum\limits_{i= 1}^{N}\rho_{\tau}[Y_{i}-\text{f}(X_{i},W_{\tau_{i}},b_{\tau_{i}})]\\ &=\min\left[\sum\limits_{Y_{i}\geq\text{f}(X_{i},W_{\tau_{i}},b_ {\tau_{i}})}\tau|Y_{i}-\text{f}(X_{i},W_{\tau_{i}},b_{\tau_{i}})|+\sum\limits_{ Y_{i}<\text{f}(X_{i},W_{\tau_{i}},b_{\tau_{i}})}(1-\tau)|Y_{i}-\text{f}(X_{i},W_{ \tau_{i}},b_{\tau_{i}})|\right]\end{split} \tag{4}\]  
The estimation of the QRDGRU parameters can be regarded as an optimization problem of parameters in Equation (4). The parameters are iteratively optimized by back-propagation through the network. Among them, \(X_{i}\) is the time series trajectory input of the drone; \(Y_{i}\) is the true position of the drone; f(\(X_{i}\), \(W_{\tau_{i}}\), \(b_{\tau_{i}}\)) is the predicted value of the neural network; and \(\tau\) is the quartile, usually in the range of (0, 1); \(W_{\tau_{i}}\) is the weight matrix of the neural network under quartile \(\tau\); \(b_{\tau_{i}}\) is the bias parameter of the neural network under quartile \(\tau\). Figure 3 shows the structure of the QRDGRU model. The QRDGRU takes the sample sequences at two time intervals as the input of two parallel GRU stacked layers, and combines the extracted features with fully connected layers, and the latitude, longitude, altitude, horizontal speed, vertical speed, heading angle, pitch angle, and roll angle are learned by the QRGRU under each quartile. After that, the network output value under each quartile is obtained, and the loss is calculated through the regression layer.  
The QRDGRU obtains the optimal estimation of its parameters by continuously adjusting \(W_{\tau_{i}}\) and \(b_{\tau_{i}}\), thereby training the network under different quartiles, and obtaining the predicted value of the drone position under different quartiles according to the learned network.  
\[Q_{Y}(\tau\,|\,X)=\text{f}(X,\tilde{W}_{\tau},\hat{b}_{\tau})^{2} \tag{5}\]  
Among them, \(Q_{Y}(\tau\,|\,X)\) is the predicted position of the drone under quartile \(\tau\) when the trajectory data of the drone is input as \(X\); \(\tilde{W}_{\tau}\) and \(\hat{b}_{\tau}\) are the optimal weight matrix and optimal bias parameter of the network under quartile \(\tau\), respectively; \(\tau\) is a continuous value between (0, 1). The predicted position of the drone under different quartiles can form the predicted position distribution of the drone. The output of the QRDGRU model \(Q_{Y}(\tau\,|\,X)\) under different quartiles is the conditional distribution of the predicted position of the drone.