# Research on Wellbore Trajectory Prediction Based on a Pi-GRU Model
## 4 Conclusions  
A Pi-GRU prediction model based on multisource data fusion, which effectively utilizes multisource data and improves the accuracy of well trajectory prediction in the near-horizontal directional drilling scenario of coal mines, is proposed in this study. A systematic verification of its performance has been conducted, and the main conclusions are as follows. 1. Innovation and effectiveness of the model  
The Pi-GRU model integrates GRU and BP neural networks through a parallel architecture, achieving collaborative modeling of time series data (dip angle, azimuth angle, and tool plane angle) and non-time series data (stratum lithology). The experimental results show that the mean square errors of the azimuth and dip angle prediction results obtained on the test set of a certain mine in Shanxi Province reach 0.06\({}^{\circ}\) and 0.01\({}^{\circ}\), respectively, which are 66.67% and 76.92% lower than those of the emerging CNN-BiLSTM model, respectively. The ablation experiment further confirmed that the deep mining of non-time series features by BP branches is the key to improving model performance. The absence of BP branches reduced the R\({}^{2}\) of azimuth and dip angle by 8.23% and 7.6%, respectively. 2. Efficiency and practicality  
Although the training time of the Pi-GRU model (3.89 s) is slightly longer than that of the single-input GRU model (2.95 s), it significantly outperforms traditional data-driven models in terms of prediction accuracy. The detailed analysis of computational efficiency indicates that the inference delay of the Pi-GRU model is only 0.21 milliseconds, and the computing power required for its training and inference is much lower than the maximum computing power of the Jetson TX2 hardware (0.29 GFLOPS and 0.093 GFLOPS, respectively). Therefore, this model not only meets the demands of real-time applications but also demonstrates strong practicality and deployability on engineering sites. Figure 16: Predicted azimuth results. Figure 17: Predicted dip angle results. Generalization performance verification  
To verify the generalization performance of the model, we conducted cross-scenario validation in different wells of the Dehong Coal Mine. The results show that even under unknown geological conditions, the model can still maintain high-precision predictions. This indicates that the Pi-GRU model has good stability when dealing with different stratum profiles. Although the Pi-GRU model contains a large number of parameters (approximately 90,000), by introducing orthogonal experimental design and ablation experiments to optimize hyperparameters, the risk of overfitting is effectively reduced, ensuring its good generalization ability. In this study, the Pi-GRU model demonstrated excellent performance in wellbore trajectory prediction based on lithology and trajectory data. However, due to the availability of data, some related factors were not included. This includes the geomechanical properties of the formation, such as tensile strength, elastic modulus, porosity, and compressibility, which have a significant impact on the interaction between the drill bit and the rock and the wellbore trajectory deviation. In addition, dynamic drilling parameters (including drill bit weight, rotational speed, torque, and drilling rate) are key indicators of downhole instability. Although these features are not available in the current dataset, in future work, it will be explored to combine them with trajectory and lithology data to enhance the model's robustness and generalization under different drilling conditions. Finally, as machine learning models become increasingly common in industrial applications, it is crucial to assess their vulnerability to adversarial samples. Recent studies have shown that carefully designed inputs may mislead model predictions and are not easily detected [24]. Future research will evaluate the robustness of Pi-GRU against such threats and explore strategies such as adversarial training to enhance model security.