Prediction of Liquid Accumulation Height in Gas Well Tubing Using Integration of Crayfish Optimization Algorithm and XGBoost
Abstract
:1. Introduction
2. COA–XGBoost Prediction Model
2.1. XGBoost Algorithm
2.2. Crayfish Optimization Algorithm
2.3. Evaluation Metrics
2.4. COA–XGBoost Model
- Define the Search Room for Crayfish Positions: Define the parameter ranges for the eight key hyperparameters in the XGBoost algorithm: n_estimators, max_depth, min_child_weight, learning_rate, gamma, colsample_bytree, reg_alpha, and reg_lambda. Set the number of iterations to 150 and the population size of crayfish to 20.
- Evaluate Fitness Function for Each Crayfish: Each crayfish evaluates its fitness function based on its current position, simulating the process of searching for food in the environment. The fitness function is evaluated using the Mean Absolute Error of the XGBoost algorithm. The foraging process includes movement, environmental perception, and assessing the density of food in the current location.
- Update Positions and States of Crayfish: Based on the foraging results, update the positions and states of individual crayfish. The crayfish exchange information and collaborate to improve the fitness of the population.
- Terminate Optimization and Output Optimal Solution: When the maximum number of iterations is reached, the optimization process ends. Output the optimal solution, i.e., the combination of XGBoost hyperparameters that achieves the minimum fitness value, and plot the optimization curve.
- Retrain and Test the XGBoost: Input the relevant features and actual values from the training set into the XGBoost with the optimal hyperparameters for retraining. Then, input the test set into the retrained model to obtain the prediction results.
3. Application Example
3.1. Study Area Overview
3.2. Data Source
3.3. Application of the COA–XGBoost Model
- Calculate the mean of each column :
- Calculate the standard deviation of each column :
- Obtain the z-scores . indicates the z-score value of the j-th feature of the i-th sample. It is computed using the following Formula (18).
3.4. Algorithm Comparison
4. Conclusions
- (1)
- This article proposes a novel COA–XGBoost algorithm for forecasting liquid loading height. The application of the method to 32 instrumented gas wells in a specific gas field demonstrates its ability to accurately forecast liquid loading height, as evidenced by the close agreement between the predicted and actual values.
- (2)
- Comparing the prediction performance of XGBoost, SVR, RF, and COA–XGBoost for gas well tubing liquid height, the results indicate that the COA–XGBoost performs the best. It achieves an average relative error of 2.25% and an adjusted score of 0.92, demonstrating high prediction accuracy.
- (3)
- This study proposes a COA–XGBoost tailored for forecasting liquid loading height in gas wells, specifically in a gas field located in the eastern Sichuan Basin, China. When compared with traditional generalized models, the proposed model exhibits stronger applicability and higher accuracy.
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
Abbreviations
COA | Crayfish Optimization Algorithm |
COA–XGBoost | Integration of Crayfish Optimization Algorithm and XGBoost |
SVR | Support Vector Regression |
RF | Random Forest |
GBRT | Gradient Boosting Regression Trees |
PLATA | Models for tubing and annular liquid volume prediction |
RMSE | Root Mean Square Error |
MAE | Mean Absolute Error |
Average Relative Error | |
Cumulative Error |
References
- Shekhar, S.; Kelkar, M.; Hearn, W.J.; Hain, L.L. Improved prediction of liquid loading in gas wells. SPE Prod. Oper. 2017, 32, 539–550. [Google Scholar] [CrossRef]
- Pagan, E.V.; Waltrich, P.J. A simplified model to predict transient liquid loading in gas wells. J. Nat. Gas Sci. Eng. 2016, 35, 372–381. [Google Scholar] [CrossRef]
- Guo, J.; Guo, Z.; Cui, Y.; Meng, D.; Wang, G.; Ji, G.; Cheng, L.; Sun, Y.; Jia, C. Methodology for estimating recovery factors in large tight sandstone gas fields. Acta Pet. Sin. 2018, 39, 1389–1396. [Google Scholar]
- Luo, C.; Zhang, L.; Liu, Y.; Zhao, Y.; Xie, C.; Wang, L.; Wu, P. An improved model to predict liquid holdup in vertical gas wells. J. Pet. Sci. Eng. 2020, 184, 106491. [Google Scholar] [CrossRef]
- Chen, Y.; Miao, B.; Wang, Y.; Huang, Y.; Jiang, Y.; Shi, X. A Deep Regression Method for Gas Well Liquid Loading Prediction. SPE J. 2024, 29, 1847–1861. [Google Scholar] [CrossRef]
- Nosseir, M.A.; Darwich, T.A.; Sayyouh, M.H.; Sallaly, M.E. A new approach for accurate prediction of loading in gas wells under different flowing conditions. SPE Prod. Facil. 2000, 15, 241–246. [Google Scholar] [CrossRef]
- Chen, Y.; Huang, Y.; Miao, B.; Shi, X.; Li, P. Adaptive anomaly detection-based liquid loading prediction in shale gas wells. J. Pet. Sci. Eng. 2022, 214, 110522. [Google Scholar] [CrossRef]
- Nie, J.; Qiao, L.; Wang, B.; Wang, W.; Li, M.; Zhou, C. Prediction of dynamic liquid level in water-producing shale gas wells based on liquid film model. Front. Earth Sci. 2023, 11, 1230470. [Google Scholar] [CrossRef]
- Zhang, L.; Luo, C.; Liu, Y.; Zhao, Y.; Xie, C.; Zhang, Q.; Ai, X. Advances in liquid accumulation prediction in gas wells. Nat. Gas Ind. 2019, 39, 57–63. [Google Scholar]
- Guo, B.; Ghalambor, A.; Xu, C. A systematic approach to predicting liquid loading in gas wells. SPE Prod. Oper. 2005, 21, 81–88. [Google Scholar]
- Jiang, J.; Li, K.; Du, J.; Chen, Z.; Liu, Y.; Liu, Y. Prediction system for water-producing gas wells using edge intelligence. Expert Syst. Appl. 2024, 247, 123303. [Google Scholar] [CrossRef]
- Bissor, E.H.; Yurishchev, A.; Ullmann, A.; Brauner, N. Prediction of the critical gas flow rate for avoiding liquid accumulation in natural gas pipelines. Int. J. Multiph. Flow 2020, 130, 103361. [Google Scholar] [CrossRef]
- Turner, R.G.; Hubbard, M.G.; Dukler, A.E. Analysis and prediction of minimum flow rate for the continuous removal of liquids from gas wells. J. Pet. Technol. 1969, 21, 1475–1482. [Google Scholar] [CrossRef]
- Li, M.; Sun, L.; Li, S. A new continuous liquid unloading model for gas wells. Nat. Gas Ind. 2001, 5, 021. [Google Scholar]
- Wang, Y.; Liu, Q. A new method for calculating the minimum critical liquid carrying flow rate of gas wells. Daqing Pet. Geol. Dev. 2007, 6, 82–85. [Google Scholar]
- Cao, G.; Hou, D.; Jiang, X. Improvement of the liquid accumulation prediction model for gas wells. Daqing Pet. Geol. Dev. 2014, 33, 97–101. [Google Scholar]
- Soares, C.; Gray, K. Real-time predictive capabilities of analytical and machine learning rate of penetration (ROP) models. J. Pet. Sci. Eng. 2019, 172, 934–959. [Google Scholar] [CrossRef]
- Aboutaleb, S.; Behnia, M.; Bagherpour, R.; Bluekian, B. Using non-destructive tests for estimating uniaxial compressive strength and static Young’s modulus of carbonate rocks via some modeling techniques. Bull. Eng. Geol. Environ. 2018, 77, 1717–1728. [Google Scholar] [CrossRef]
- Wang, F.; Zai, Y.; Zhao, J.; Fang, S. Field application of deep learning for flow rate prediction with downhole temperature and pressure. In Proceedings of the International Petroleum Technology Conference, online, 23 March–2 April 2021. [Google Scholar]
- Cheraghi, Y.; Kord, S.; Mashayekhizadeh, V. Application of machine learning techniques for selecting the most suitable enhanced oil recovery method; challenges and opportunities. J. Pet. Sci. Eng. 2021, 205, 108761. [Google Scholar] [CrossRef]
- Xue, Y.; Araujo, M.; Lopez, J.; Wang, K.; Kumar, G. Machine learning to reduce cycle time for time-lapse seismic data assimilation into reservoir management. Interpretation 2019, 7, SE123–SE130. [Google Scholar] [CrossRef]
- Chen, T.; Guestrin, C. Xgboost: A scalable tree boosting system. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, 13–17 August 2016; pp. 785–794. [Google Scholar]
- Ogunleye, A.; Wang, Q.G. XGBoost model for chronic kidney disease diagnosis. IEEE/ACM Trans. Comput. Biol. Bioinform. 2019, 17, 2131–2140. [Google Scholar] [CrossRef]
- Qiu, Y.; Zhou, J.; Khandelwal, M.; Yang, H.; Yang, P.; Li, C. Performance evaluation of hybrid WOA-XGBoost, GWO-XGBoost and BO-XGBoost models to predict blast-induced ground vibration. Eng. Comput. 2022, 38, 4145–4162. [Google Scholar] [CrossRef]
- Sagi, O.; Rokach, L. Approximating XGBoost with an interpretable decision tree. Inf. Sci. 2021, 572, 522–542. [Google Scholar] [CrossRef]
- Ma, M.; Zhao, G.; He, B.; Li, Q.; Dong, H.; Wang, S.; Wang, Z. XGBoost-based method for flash flood risk assessment. J. Hydrol. 2021, 598, 126382. [Google Scholar] [CrossRef]
- Jia, H.; Rao, H.; Wen, C.; Mirjalili, S. Crayfish optimization algorithm. Artif. Intell. Rev. 2023, 56, 1919–1979. [Google Scholar] [CrossRef]
- Chaib, L.; Tadj, M.; Choucha, A.; Khemili, F.Z.; Attia, E.F. Improved crayfish optimization algorithm for parameters estimation of photovoltaic models. Energy Convers. Manag. 2024, 313, 118627. [Google Scholar] [CrossRef]
- Fakhouri, H.N.; Ishtaiwi, A.; Makhadmeh, S.N.; Al-Betar, M.A.; Alkhalaileh, M. Novel Hybrid Crayfish Optimization Algorithm and Self-Adaptive Differential Evolution for Solving Complex Optimization Problems. Symmetry 2024, 16, 927. [Google Scholar] [CrossRef]
- Jia, H.; Zhou, X.; Zhang, J.; Abualigah, L.; Yildiz, A.R.; Hussien, A.G. Modified crayfish optimization algorithm for solving multiple engineering application problems. Artif. Intell. Rev. 2024, 57, 127. [Google Scholar] [CrossRef]
- Shikoun, N.H.; Al-Eraqi, A.S.; Fathi, I.S. BinCOA: An Efficient Binary Crayfish Optimization Algorithm for Feature Selection. IEEE Access 2024, 12, 28621–28635. [Google Scholar] [CrossRef]
- Safaei-Farouji, M.; Kadkhodaie, A. Application of ensemble machine learning methods for kerogen type estimation from petrophysical well logs. J. Pet. Sci. Eng. 2022, 208, 109455. [Google Scholar] [CrossRef]
- Ming, R.; He, H.; Hu, Q. A new model for improving the prediction of liquid loading in horizontal gas wells. J. Nat. Gas Sci. Eng. 2018, 56, 258–265. [Google Scholar] [CrossRef]
- Ohtani, K. Bootstrapping R2 and adjusted R2 in regression analysis. Econ. Model. 2000, 17, 473–483. [Google Scholar] [CrossRef]
Serial Number | Production Pressure (MPa) | Well Number | Ratio |
---|---|---|---|
1 | >10 | 5 | 1.7 |
2 | 5–10 | 33 | 11.22 |
3 | 2–5 | 83 | 28.23 |
4 | <2 | 173 | 58.5 |
Count | Mean | Standard Deviation | Min | 25% | 50% | 75% | Max | |
---|---|---|---|---|---|---|---|---|
Casing Pressure (MPa) | 107 | 5.34 | 3.38 | 1.19 | 3.04 | 4.3 | 8.03 | 20.4 |
Oil Pressure (MPa) | 107 | 3.16 | 2.87 | 0.52 | 1.49 | 2.07 | 3.87 | 17.1 |
Tubing Depth (m) | 107 | 4603 | 770.79 | 2598.6 | 4361 | 4805 | 4966 | 6212 |
Oil Layer Mid-depth (m) | 107 | 4539 | 745.31 | 2203.1 | 4386 | 4777 | 4967 | 5823 |
Daily Gas Production ( m3/d) | 107 | 5.15 | 4.24 | 0.3 | 2.45 | 4.1 | 6.05 | 20 |
Daily Water Production (m3/d) | 107 | 3.63 | 7.21 | 0.1 | 0.5 | 1 | 2 | 49 |
Wellhead Temperature (°C) | 107 | 21.6 | 8.58 | 5 | 15 | 22 | 29 | 40 |
Fluid Accumulation Height (m) | 107 | 4531 | 764.64 | 2598.6 | 4346 | 4700 | 4938 | 6212 |
Model | RMSE | MAE | Adjusted | ||
---|---|---|---|---|---|
XGBoost | 242.94 | 154.2 | 0.9 | 3.34 | 106.9 |
COA–XGBoost | 174.55 | 98.77 | 0.92 | 2.25 | 72.1 |
Model | RMSE | MAE | Adjusted | ||
---|---|---|---|---|---|
COA–XGBoost | 174.55 | 98.77 | 0.92 | 2.25 | 72.1 |
SVR | 227.1 | 149.93 | 0.91 | 3.55 | 113.51 |
RF | 325.31 | 198.11 | 0.82 | 4.53 | 144.83 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Xia, W.; Liu, B.; Xiang, H. Prediction of Liquid Accumulation Height in Gas Well Tubing Using Integration of Crayfish Optimization Algorithm and XGBoost. Processes 2024, 12, 1788. https://doi.org/10.3390/pr12091788
Xia W, Liu B, Xiang H. Prediction of Liquid Accumulation Height in Gas Well Tubing Using Integration of Crayfish Optimization Algorithm and XGBoost. Processes. 2024; 12(9):1788. https://doi.org/10.3390/pr12091788
Chicago/Turabian StyleXia, Wenlong, Botao Liu, and Hua Xiang. 2024. "Prediction of Liquid Accumulation Height in Gas Well Tubing Using Integration of Crayfish Optimization Algorithm and XGBoost" Processes 12, no. 9: 1788. https://doi.org/10.3390/pr12091788