Lost Circulation Prediction Based on Long Short-Term Memory Network and Random Forest Algorithm
-
摘要: 井漏问题是制约钻井安全和效率的关键因素之一,为了实现对井漏风险的准确预测,提出了一种基于长短期记忆网络(Long Short-Term Memory, LSTM)和随机森林(Random Forest, RF)的井漏预测混合模型。根据算法原理构建LSTM模型、 RF模型和LSTM-RF混合模型,采用相关性分析法选择了14种井漏特征参数,将其输入到3种井漏预测模型中进行训练,分析对比了不同模型的性能和井漏预测准确率。实验结果发现,混合模型在测试集上的均方根误差(RMSE)为0.11、平均绝对误差(MAE)为0.22、决定系数(R2)为0.95,综合准确率达到了84.2%,各项指标显著优于单一模型。此外,利用混合模型进行现场实际应用,成功预测井漏5井次。研究结果表明,LSTM-RF混合模型在井漏预测中综合性能最优,能更精确地预测井漏,为钻井作业过程中的井漏预防和决策提供参考。Abstract: Lost circulation is one of the key factors restricting drilling safety and efficiency. To realize accurate prediction of lost circulation, a hybrid model for the prediction of lost circulation is presented based on long short-term memory (LSTM) and random forest (RF) algorithm. The LSTM model, the RF model and the LSTM-RF hybrid model are constructed based on algorithm principle. Fourteen lost circulation characteristic parameters are selected using correlation analysis method, and are input into three lost circulation prediction models for training. The performance and lost circulation prediction accuracy of the three models are then analyzed and compared. The experimental results show that the root mean square error (RMSE) of the hybrid model on the test dataset is 0.11, the mean absolute error (MAE) is 0.22, the coefficient of determination (R2) is 0.95, and the overall accuracy reaches 84.2%, each indicator is better than that of the single model. Furthermore, hybrid model has successfully predicted 5 times of lost circulation in field application. The results of this study show that LSTM-RF hybrid model is a model with optimal comprehensive performance in lost circulation prediction, it can predict lost circulation more precisely, and can provide reference for the prevention of lost circulation and for the decision making in drilling operation.
-
表 1 初步筛除后的特征参数及权重系数
参数名称 标识符 参数单位 权重系数 参数名称 标识符 参数单位 权重系数 标准井深 DEP m 0.95 出口密度 MWOUT g/cm3 0.79 大钩高度 HOKHEI m 0.78 当量密度 MWE g/cm3 0.87 钻时 DRITIME min/m 0.90 总池体积 PITTOT m3 0.88 大钩负荷 HKLD kN 0.83 钻井液密度 MW g/cm3 0.90 钻压 WOB kN 0.91 漏斗黏度 FUNNELV s 0.79 扭矩 TOR kN·m 0.88 切力10秒 CF10S Pa 0.76 转盘转速 RPM r/min 0.85 切力10分 CF10MIN Pa 0.79 立管压力 SPP MPa 0.90 岩性 LITH 无 0.88 入口流量 FLOWIN L/s 0.88 层位 FORM 无 0.90 入口密度 MWIN g/cm3 0.78 裂缝 ISCRACK 无 0.85 表 2 Y1井数据标记结果(部分)
井深(m) 分类 标号 裂缝 3113 极大似然 1 1 3174 蚂蚁追踪 1 1 3274 极大似然 2 1 3535 蚂蚁追踪 2 1 3750 蚂蚁追踪 3 1 3996 极大似然 3 1 4090 蚂蚁追踪 4 1 4458 蚂蚁追踪 5 1 5000 极大似然 4 1 5005 蚂蚁追踪 6 1 5200 蚂蚁追踪 7 1 表 3 模型参数设置
分类器名称 参数设置 取值大小 LSTM Learning_rate 0.001 batch_size 32 hidden_size 64 RF n_estimators 100 max_depth 10 表 4 3种模型的性能评估结果
指标 LSTM
模型RF模型 LSTM-RF
混合模型MSE 0.23 0.18 0.11 MAE 0.34 0.26 0.22 R2 0.91 0.92 0.95 表 5 LSTM-RF模型预测部分统计数据
井号 预测井
漏段/m井漏
井深/m总漏失量/
m3发生时
工况预测
效果Y1 3174~3184 3179 519.9 钻进 成功 Y2 3083~3093 3088 266 钻进 成功 3218~3228 3223 34.5 钻进 成功 Y3 2835~2845 2838 55 钻进 成功 Y4 无 3459 8.9 下钻 失败 Y5 3297~3307 3301 97.6 钻进 成功 Y6 2936~2946 2942 107.28 钻进 成功 表 6 井漏预测应用结果
井号 预测井漏段/m 井漏井深/m 预测效果 Z1 2934~2944 2938 成功 Z2 无 3725 失败 Z3 3214~3224 3219 成功 Z4 3772~3782 3776 成功 Z5 2826~2838 2833 成功 Z6 3149~3159 未发生井漏 失败 Z7 3096~3106 3101 成功 -
[1] 李根生, 宋先知, 祝兆鹏, 等. 智能钻完井技术研究进展与前景展望[J]. 石油钻探技术, 2023, 51(4): 35-47. doi: 10.11911/syztjs.2023040LI Gensheng, SONG Xianzhi, ZHU Zhaopeng, et al. Research progress and the prospect of intelligent drilling and completion technologies[J]. Petroleum Drilling Techniques, 2023, 51(4): 35-47. doi: 10.11911/syztjs.2023040 [2] 陈林, 陆海瑛, 王泽华, 等. 融合LightGBM和SHAP的井漏类型判断及主控因素分析[J]. 钻井液与完井液, 2023, 40(6): 771-777. doi: 10.12358/j.issn.1001-5620.2023.06.011CHEN Lin, LU Haiying, WANG Zehua, et al. Identifying types and analyzing main controlling factors of mud losses using a method integrating LightGBM algorithm and SHAP[J]. Drilling Fluid & Completion Fluid, 2023, 40(6): 771-777. doi: 10.12358/j.issn.1001-5620.2023.06.011 [3] 孙伟峰, 卜赛赛, 张德志, 等. 基于DCC—LSTM的钻井液微量漏失智能监测方法[J]. 天然气工业, 2023, 43(9): 141-148. doi: 10.3787/j.issn.1000-0976.2023.09.014SUN Weifeng, BU Saisai, ZHANG Dezhi, et al. DCC-LSTM based intelligent minor lost circulation monitoring method[J]. Natural Gas Industry, 2023, 43(9): 141-148. doi: 10.3787/j.issn.1000-0976.2023.09.014 [4] 孙金声, 刘凡, 程荣超, 等. 机器学习在防漏堵漏中研究进展与展望[J]. 石油学报, 2022, 43(1): 91-100. doi: 10.7623/syxb202201008SUN Jinsheng, LIU Fan, CHENG Rongchao, et al. Research progress and prospects of machine learning in lost circulation control[J]. Acta Petrolei Sinica, 2022, 43(1): 91-100. doi: 10.7623/syxb202201008 [5] HOU X X, YANG J, YIN Q S, et al. Lost circulation prediction in South China sea using machine learning and big data technology[C]//Offshore Technology Conference. Houston, Texas, USA, 2020: OTC-30653-MS. [6] 万康, 马志超, 郭青松, 等. 人工智能技术在石油钻井工程事故预警中的应用[J]. 录井工程, 2022, 33(2): 24-29. doi: 10.3969/j.issn.1672-9803.2022.02.005WAN Kang, MA Zhichao, GUO Qingsong, et al. Application of artificial intelligence on petroleum drilling engineering accident early warning[J]. Mud Logging Engineering, 2022, 33(2): 24-29. doi: 10.3969/j.issn.1672-9803.2022.02.005 [7] PANG H W, MENG H, WANG H Q, et al. Lost circulation prediction based on machine learning[J]. Journal of Petroleum Science and Engineering, 2022, 208, Part A: 109364. [8] 罗鸣, 李盛阳, 彭巍, 等. 基于深度卷积特征重构的井漏事故预测[J]. 计算机仿真, 2023, 40(7): 82-88. doi: 10.3969/j.issn.1006-9348.2023.07.015LUO Ming, LI Shengyang, PENG Wei, et al. Lost circulation accident forewarning based on deep convolutional feature reconstruction network[J]. Computer Simulation, 2023, 40(7): 82-88. doi: 10.3969/j.issn.1006-9348.2023.07.015 [9] 孙伟峰, 刘凯, 张德志, 等. 结合钻井工况与Bi-GRU的溢流与井漏监测方法[J]. 石油钻探技术, 2023, 51(3): 37-44. doi: 10.11911/syztjs.2023043SUN Weifeng, LIU Kai, ZHANG Dezhi, et al. A kick and lost circulation monitoring method combining Bi-GRU and drilling conditions[J]. Petroleum Drilling Techniques, 2023, 51(3): 37-44. doi: 10.11911/syztjs.2023043 [10] SHERSTINSKY A. Fundamentals of recurrent neural network (RNN) and long Short-Term memory (LSTM) network[J]. Physica D. Nonlinear Phenomena, 2020, 404: 132306. doi: 10.1016/j.physd.2019.132306 [11] HOCHREITER S, SCHMIDHUBER J. Long Short-Term memory[J]. Neural Computation, 1997, 9(8): 1735-1780. doi: 10.1162/neco.1997.9.8.1735 [12] 杨丽, 吴雨茜, 王俊丽, 等. 循环神经网络研究综述[J]. 计算机应用, 2018, 38(S2): 1-6,26.YANG Li, WU Yuqian, WANG Junli, et al. Research on recurrent neural network[J]. Journal of Computer Applications, 2018, 38(S2): 1-6,26. [13] BREIMAN L. Random forests[J]. Machine Learning, 2001, 45(1): 5-32. doi: 10.1023/A:1010933404324 [14] ABBAS A K, BASHIKH A A, ABBAS H, et al. Intelligent decisions to stop or mitigate lost circulation based on machine learning[J]. Energy, 2019, 183: 1104-1113. doi: 10.1016/j.energy.2019.07.020 -