Study on Prediction Model for Drilling Fluid Classification Based on XGBoost
-
摘要: 根据钻井液体系设计的原则,结合实际钻井液设计资料,应用一种新的机器学习方法建立了钻井液体系分类预测模型。钻井液体系分类数据经过独热编码(one-hot)之后,通过灰色关联度分析方法,选择出钻井液体系分类预测的20个特征参数,其中压力的关联度最大,为0.8233。将选择的地质设计参数和工程设计参数,基于一种极端梯度增强算法(XGBoost)针对4种钻井液体系进行分类预测。结果显示,基于XGBoost的钻井液体系分类预测模型4类钻井液体系训练集的准确率都为100%,测试集的平均准确率为99.89%,精确率为99.97%,召回率为98.89%,F1值为0.98。将该模型应用于胜利油田M区块,分类结果符合实际钻井要求,能够辅助选择钻井液体系,为实现钻井液智能化设计提供了帮助。Abstract: A model for predicting the type of a drilling fluid system was established using a new machine learning method based on the principles of mud system design and by referencing the actual drilling fluid designs. By one-hot coding of the data concerning the classification of drilling fluid systems, twenty parameters for predicting the type of a drilling fluid were selected through grey relation analysis. Of these parameters pressure has the highest correlation degree, which is 0.8233. The selected geological parameters and engineering design parameters were used based on an extreme gradient boost (XGBoost) algorithm to predict the types of 4 drilling fluids. The results show that the accuracy of the training sets of the 4 drilling fluids are all 100%, the average percent accuracy of the test sets is 99.89%, the precision 99.97%, the recall rate 98.89%, and the F1 value 0.98. Applying this model to the M block in the Shengli Oilfield, the classification results met the drilling requirements, and was of help in selecting the suitable drilling fluids. This study has provided a help to the intelligent design of drilling fluid.
-
Key words:
- Design of drilling fluid system /
- XGBoost /
- Machine learning /
- Grey relation analysis
-
表 1 部分one-hot编码后的数据
井别 井斜/
(°)井深/
mT/
℃P/
MPa复杂情况 储层损害 主要岩性 pH 井漏 井塌 卡钻 酸敏 碱敏 盐敏 水敏 泥岩 砂岩 碳酸盐岩 盐膏层 生产井 2.00 530 28 5.50 0 1 0 0 0 0 1 1 0 0 0 7 2.00 557 28 6.00 0 1 0 0 0 0 1 1 0 0 0 7 2.50 578 30 6.50 0 1 0 0 0 0 1 1 0 0 0 7 定向井 23.45 2230 97 23.81 0 0 1 0 0 0 1 0 1 0 0 9 23.45 2240 98 24.54 0 0 1 0 0 0 1 0 1 0 0 9 24.31 2250 98 24.90 0 0 1 0 0 0 1 0 1 0 0 9 预探井 47.80 4410 65 112.00 1 0 0 1 0 0 0 0 0 1 0 5 47.80 4415 68 111.00 1 0 0 1 0 0 0 0 0 1 0 6 47.80 4420 70 112.50 1 0 0 1 0 0 0 0 0 1 0 6 超深井 36.50 8072 180 142.00 0 1 0 0 0 1 0 0 0 0 1 7 36.50 8109 180 138.00 0 1 0 0 0 1 0 0 0 0 1 7 39.50 8309 185 139.00 0 1 0 0 1 0 0 0 0 0 1 7 39.56 8414 190 141.00 0 0 1 0 1 0 0 0 0 0 1 7 39.56 8445 190 141.00 0 0 1 0 1 0 0 0 0 0 1 7 表 2 输出参数表
类别 钻井液体系 编号 体系1 分散钻井液 1 体系2 盐水钻井液 2 体系3 聚合物钻井液 3 体系4 抗高温钻井液 4 表 3 二分类混淆矩阵
混淆矩阵 预测值 类1 类2 真实值 类1 TP FN 类2 FP TN 表 4 钻井液体系分类预测模型测试集性能评价
钻井液
体系类别准确率/
%精确率/
%召回率/
%F1值 1 0.99 1.00 0.97 0.98 2 0.99 0.98 0.98 0.98 3 0.99 0.99 0.99 0.99 4 1.00 1.00 1.00 1.00 平均值 0.99 0.99 0.98 0.98 表 5 钻井液体系的分类
井段 井深/m 钻井液体系 一开 0~1050 分散钻井液体系 二开 1050~2500 聚合物钻井液体系 三开 2500~3600 抗高温钻井液体系 -
[1] 常晓峰,孙金声,王清臣. 水平井和斜井井眼清洁技术研究进展及展望[J]. 钻井液与完井液,2023,40(1):1-19.CHANG Xiaofeng, SUN Jinsheng, WANG Qingchen. Research progress and prospect of wellhole cleaning technology in horizontal Wells and inclined Wells[J]. Drilling Fluid & Completion Fluid, 2023, 40(1):1-19. [2] 周志华. 机器学习[M]. 北京: 清华大学出版社, 2016.ZHOU Zhihua. Machine Learning[M]. Beijing: Tsinghua University Press, 2016. [3] 林之韵,程云章,耿晓斌. 基于XGBoost的危重症患者住院时间分类预测模型和风险因素研究[J]. 生物医学工程研究,2023,42(1):36-42.LIN Zhiyun, CHENG Yunzhang, GENG Xiaobin. A XGBoost-based classification prediction model of hospital stay in critically ill patients and risk factors study[J]. Journal of Biomedical Engineering Research, 2023, 42(1):36-42. [4] 卢娅欣,黄月,李康. XGBoost算法在二分类非平衡高维数据分析中的应用[J]. 中国卫生统计,2021,38(1):21-24.LU Yaxin, HUANG Yue, LI Kang. Application of the XGBoost algorithm in the analysis of binary classified non-balanced high-dimensional data[J]. Chinese Journal of Health Statistics, 2021, 38(1):21-24. [5] 方侠旋. 基于XGBoost模型的文本多分类研究[J]. 网络安全技术与应用,2020(06):50-52.FANG Xiaxuan. Text multi-classification study based on the XGBoost model[J]. Network Security Technology & Application, 2020(06):50-52. [6] 赵晓东,徐振涛,刘福,等. 基于极端梯度提升算法的滑坡易发性评价模型[J]. 科学技术与工程,2022,22(23):10347-10354.ZHAO Xiaodong, XU Zhentao, LIU Fu, et al. Landslope susceptibility evaluation model based on extreme gradient lifting algorithm[J]. Science Technology and Engineering, 2022, 22(23):10347-10354. [7] 李红冀. 基于融合推理模型的钻井液优化设计系统研究[D]. 西南石油大学, 2015.LI Hongji. Research on drilling fluid optimization design system based on fusion inference model[D]. Southwest Petroleum University, 2015. [8] 马小石,李红冀,孟娜,等. 基于支持向量机的钻井液配方优选与成本控制[J]. 石油化工应用,2014,33(6):4-8.MA Xiaoshi, LI Hongji, MENG Na, et al. Drilling fluid formula optimization and cost control based on support vector machine[J]. Petrochemical Industry Application, 2014, 33(6):4-8. [9] 李建,蔡海艳,李嘉迪. 改进遗传算法及其在钻井液设计中的运用[J]. 西南石油大学学 报(自然科学版),2019,41(1):165-174.LI Jian, CAI Haiyan, LI Jiadi. Improving the genetic algorithm and its application in drilling fluid design[J]. Journal of Southwest Petroleum University(Science & Technology Edition) , 2019, 41(1):165-174. [10] 吴建章,梅飞,郑建勇,等. 基于改进经验小波变换和XGBoost的电能质量复合扰动分类[J]. 电工技术学报,2022,37(1):232-243.WU Jianzhang, MEI Fei, ZHENG Jianyong, et al. Composite disturbance classification of power quality based on improved empirical wavelet transform and XGBoost[J]. Transactions of China Electrotechnical Society, 2022, 37(1):232-243. [11] 李晨阳,陈雄飞,张勇,等. 基于XGBoost的铝合金LIBS光谱分类识别方法[J]. 光谱学与光谱分析,2021,41(2):624-628.LI Chenyang, CHEN Xiongfei, ZHANG Yong, et al. Classification method of LIBS based on XGBoost[J]. Spectroscopy and Spectral Analysis, 2021, 41(2):624-628. [12] 任冠龙,孟文波,何玉发,等. 深水浅层钻井液水合物抑制性能优化[J]. 钻井液与完井液,2022,39(5):529-537.REN Guanlong, MENG Wenbo, HE Yufa, et al. Optimization of hydrate inhibition performance of deep water shallow drilling fluid[J]. Drilling Fluid & Completion Fluid, 2022, 39(5):529-537.