化工学报 ›› 2025, Vol. 76 ›› Issue (10): 5510-5521.DOI: 10.11949/0438-1157.20250296
收稿日期:2025-03-24
修回日期:2025-05-18
出版日期:2025-10-25
发布日期:2025-11-25
通讯作者:
贾文龙
作者简介:贾文龙(1986—)男,博士,教授,jiawenlong08@126.com
基金资助:
Wenlong JIA1(
), Junzhe CHEN1, Changjun LI1, Yong LIU2, Wen XIE1
Received:2025-03-24
Revised:2025-05-18
Online:2025-10-25
Published:2025-11-25
Contact:
Wenlong JIA
摘要:
精准定位天然气管道泄漏点对事故应急处置具有重要意义。针对现有泄漏定位方法依赖瞬时信号、易受管道运行噪声干扰、定位精度不足的缺陷,提出了基于TPE(tree-structured Parzen estimator)-XGBoost(eXtreme gradient boosting)模型的管道泄漏定位方法。通过采集持续200 s的压降速率时间序列数据构建训练集,对比了TPE、PSO(粒子群算法)、BOA(贝叶斯优化)和Optuna四种优化算法对XGBoost模型精度的影响;分析了TPE-XGBoost与SVM、CNN及CNN-LSTM-Attention模型的定位准确性;探究了数据时间窗(30~200 s)与叠加运行噪声对定位准确性的影响规律。研究结果表明:(1)经TPE优化后,XGBoost模型的性能显著提升,在测试集上决定系数R2达0.9835;(2)在泄漏定位任务中,TPE-XGBoost模型的定位偏差仅为3.77%,优于SVM、CNN及CNN-LSTM-Attention等对比模型;(3)当数据时间窗长度在30~200 s变化时,模型在测试集上的R2始终高于0.96;(4)在叠加管道运行噪声场景下,模型定位偏差为7.58%。
中图分类号:
贾文龙, 陈浚哲, 李长俊, 刘勇, 谢玟. 基于TPE-XGBoost模型的输气管道泄漏定位方法[J]. 化工学报, 2025, 76(10): 5510-5521.
Wenlong JIA, Junzhe CHEN, Changjun LI, Yong LIU, Wen XIE. Leak localization method for gas pipeline based on TPE-XGBoost modeling[J]. CIESC Journal, 2025, 76(10): 5510-5521.
| 参数 | 参数的解释 | 搜索范围 |
|---|---|---|
| n_estimators | 决策树的数量 | [100, 500] |
| max_depth | 决策树最大深度 | [ |
| learning_rate | 学习率,用于控制每棵树对最终预测的贡献 | [0.01, 0.3] |
| subsample | 子采样比例,训练每棵树时使用的样本比例 | [0.6, 1.0] |
| colsample_bytree | 特征采样比例,训练每棵树时使用的特征比例 | [0.6, 1.0] |
| alpha | L1正则化项系数 | [0, 10] |
| lambda | L2正则化项系数 | [0, 10] |
| min_child_weight | 叶子节点最小样本权重 | [ |
表1 XGboost模型中的控制参数及其解释和搜索范围
Table 1 Control parameters in the XGboost model and their interpretation and search range
| 参数 | 参数的解释 | 搜索范围 |
|---|---|---|
| n_estimators | 决策树的数量 | [100, 500] |
| max_depth | 决策树最大深度 | [ |
| learning_rate | 学习率,用于控制每棵树对最终预测的贡献 | [0.01, 0.3] |
| subsample | 子采样比例,训练每棵树时使用的样本比例 | [0.6, 1.0] |
| colsample_bytree | 特征采样比例,训练每棵树时使用的特征比例 | [0.6, 1.0] |
| alpha | L1正则化项系数 | [0, 10] |
| lambda | L2正则化项系数 | [0, 10] |
| min_child_weight | 叶子节点最小样本权重 | [ |
| 优化方法 | 最优的XGBoost超参数 | R2 | MAPE/% | RMSE | MAE |
|---|---|---|---|---|---|
| 未优化 | [100, 5, 0.1, 1.0, 1.0, 1.0, 1.0, 10] | 0.9766 | 82.0688 | 0.9334 | 0.4219 |
| Optuna | [500, 10, 0.2406, 0.7196, 0.6002, 9.9782, 2.8999, 3] | 0.9820 | 4.3397 | 0.8185 | 0.3722 |
| PSO | [110, 8, 0.0527, 0.6674, 0.8353, 4.0561, 0.0, 7] | 0.9827 | 4.5012 | 0.8036 | 0.3746 |
| BOA | [364, 6, 0.1846, 1.0, 0.9079, 2.8133, 9.4656, 10] | 0.9822 | 3.9499 | 0.8145 | 0.3523 |
| TPE | [300, 10, 0.0322, 0.7473, 0.8959, 1.2055, 2.9552, 10] | 0.9835 | 3.7669 | 0.7850 | 0.3257 |
表2 不同优化方法下的XGBoost模型最优参数与模型精度
Table 2 Optimal parameters and model accuracy of XGBoost model under different optimization methods
| 优化方法 | 最优的XGBoost超参数 | R2 | MAPE/% | RMSE | MAE |
|---|---|---|---|---|---|
| 未优化 | [100, 5, 0.1, 1.0, 1.0, 1.0, 1.0, 10] | 0.9766 | 82.0688 | 0.9334 | 0.4219 |
| Optuna | [500, 10, 0.2406, 0.7196, 0.6002, 9.9782, 2.8999, 3] | 0.9820 | 4.3397 | 0.8185 | 0.3722 |
| PSO | [110, 8, 0.0527, 0.6674, 0.8353, 4.0561, 0.0, 7] | 0.9827 | 4.5012 | 0.8036 | 0.3746 |
| BOA | [364, 6, 0.1846, 1.0, 0.9079, 2.8133, 9.4656, 10] | 0.9822 | 3.9499 | 0.8145 | 0.3523 |
| TPE | [300, 10, 0.0322, 0.7473, 0.8959, 1.2055, 2.9552, 10] | 0.9835 | 3.7669 | 0.7850 | 0.3257 |
| 对比模型 | 评价指标 | |||
|---|---|---|---|---|
| R2 | MAPE/% | RMSE | MAE | |
| SVM模型 | 0.3684 | 44.1430 | 4.6039 | 3.4720 |
| CNN模型 | 0.9285 | 70.8405 | 7.8271 | 1.1014 |
| CNN-LSTM-Attention模型 | 0.9821 | 5.4649 | 0.8161 | 0.4868 |
| TPE-XGBoost模型 | 0.9835 | 3.7669 | 0.7850 | 0.3257 |
表3 不同模型训练后的评价指标
Table 3 Evaluation metrics of different models after training
| 对比模型 | 评价指标 | |||
|---|---|---|---|---|
| R2 | MAPE/% | RMSE | MAE | |
| SVM模型 | 0.3684 | 44.1430 | 4.6039 | 3.4720 |
| CNN模型 | 0.9285 | 70.8405 | 7.8271 | 1.1014 |
| CNN-LSTM-Attention模型 | 0.9821 | 5.4649 | 0.8161 | 0.4868 |
| TPE-XGBoost模型 | 0.9835 | 3.7669 | 0.7850 | 0.3257 |
| 时间序列长度/s | 最优的XGBoost超参数 | R2 | MAPE/% | RMSE | MAE |
|---|---|---|---|---|---|
| 200(原样本) | [300, 10, 0.0322, 0.7473, 0.8959, 1.2055, 2.9552, 10] | 0.9835 | 3.7669 | 0.7850 | 0.3257 |
| 30 | [500, 7, 0.0343, 0.6883, 0.8551, 0.1294, 8.4151, 5] | 0.9684 | 4.6900 | 1.0850 | 0.4593 |
| 60 | [500, 3, 0.2373, 0.7256, 0.6869, 0.6724, 6.8736, 3] | 0.9746 | 4.6420 | 0.9729 | 0.4454 |
| 100 | [300, 10, 0.0196, 0.8709, 0.9269, 0.0061, 2.4808, 1] | 0.9778 | 3.4073 | 0.9090 | 0.2966 |
| 150 | [200, 5, 0.0663, 0.7551, 0.7193, 1.2775, 2.7646, 10] | 0.9815 | 4.2921 | 0.8312 | 0.3726 |
表4 时间窗长度与预测准确性比较
Table 4 Comparison of time window length and predictive accuracy
| 时间序列长度/s | 最优的XGBoost超参数 | R2 | MAPE/% | RMSE | MAE |
|---|---|---|---|---|---|
| 200(原样本) | [300, 10, 0.0322, 0.7473, 0.8959, 1.2055, 2.9552, 10] | 0.9835 | 3.7669 | 0.7850 | 0.3257 |
| 30 | [500, 7, 0.0343, 0.6883, 0.8551, 0.1294, 8.4151, 5] | 0.9684 | 4.6900 | 1.0850 | 0.4593 |
| 60 | [500, 3, 0.2373, 0.7256, 0.6869, 0.6724, 6.8736, 3] | 0.9746 | 4.6420 | 0.9729 | 0.4454 |
| 100 | [300, 10, 0.0196, 0.8709, 0.9269, 0.0061, 2.4808, 1] | 0.9778 | 3.4073 | 0.9090 | 0.2966 |
| 150 | [200, 5, 0.0663, 0.7551, 0.7193, 1.2775, 2.7646, 10] | 0.9815 | 4.2921 | 0.8312 | 0.3726 |
| 组别 | 数据集参数 | R2 | MAPE/% | RMSE | MAE |
|---|---|---|---|---|---|
| 1 | 仿真数据组 | 0.9835 | 3.7669 | 0.7850 | 0.3257 |
| 2 | 引入分析窗口起始点偏移组 | 0.9707 | 3.8550 | 1.0445 | 0.3436 |
| 3 | 增加运行噪声组 | 0.9580 | 7.5797 | 1.2510 | 0.6891 |
| 4 | 同时增加运行噪声和偏移分析窗口起始点组 | 0.9202 | 13.0698 | 1.7250 | 1.1217 |
| 5 | CNN-LSTM-Attention同时增加运行噪声和偏移分析窗口起始点组 | 0.8109 | 21.3808 | 2.6551 | 1.7654 |
表5 模拟管道运行波动的数据集设置与模型精度
Table 5 Dataset setup and model accuracy for simulating fluctuations in pipeline operations
| 组别 | 数据集参数 | R2 | MAPE/% | RMSE | MAE |
|---|---|---|---|---|---|
| 1 | 仿真数据组 | 0.9835 | 3.7669 | 0.7850 | 0.3257 |
| 2 | 引入分析窗口起始点偏移组 | 0.9707 | 3.8550 | 1.0445 | 0.3436 |
| 3 | 增加运行噪声组 | 0.9580 | 7.5797 | 1.2510 | 0.6891 |
| 4 | 同时增加运行噪声和偏移分析窗口起始点组 | 0.9202 | 13.0698 | 1.7250 | 1.1217 |
| 5 | CNN-LSTM-Attention同时增加运行噪声和偏移分析窗口起始点组 | 0.8109 | 21.3808 | 2.6551 | 1.7654 |
| [1] | 孙良, 王建林. 基于泄漏瞬变模型的管道泄漏检测与定位方法[J]. 应用基础与工程科学学报, 2012, 20(1): 159-168. |
| Sun L, Wang J L. Release transient modeling based leak detection and location method for pipelines[J]. Journal of Basic Science and Engineering, 2012, 20(1): 159-168. | |
| [2] | 孟令雅. 基于瞬态模型法的输气管道泄漏监测与定位技术[J]. 北京交通大学学报, 2008, 32(3): 73-77. |
| Meng L Y. Research on leak detection and position for natural gas pipeline based on transient model method[J]. Journal of Beijing Jiaotong University, 2008, 32(3): 73-77. | |
| [3] | 王辰, 刘庆文, 陈典, 等. 基于分布式光纤声波传感的管道泄漏监测[J]. 光学学报, 2019, 39(10): 1006005. |
| Wang C, Liu Q W, Chen D, et al. Monitoring pipeline leakage using fiber-optic distributed acoustic sensor[J]. Acta Optica Sinica, 2019, 39(10): 1006005. | |
| [4] | 付士崇, 张丹, 罗群. 基于光纤分布式声波传感的输气管道泄漏识别与定位方法[J]. 激光与光电子学进展, 2025, 62(3): 111-117. |
| Fu S C, Zhang D, Luo Q. Gas pipeline leakage identification and localization method based on fiber-optic distributed acoustic sensing[J]. Laser & Optoelectronics Progress, 2025, 62(3): 111-117. | |
| [5] | 韩宝坤, 何景涛, 王金瑞, 等. 天然气管道泄漏声学检测及定位方法[J]. 噪声与振动控制, 2021, 41(5): 58-64, 146. |
| Han B K, He J T, Wang J R, et al. Acoustic detection and location method for natural gas pipeline leakage[J]. Noise and Vibration Control, 2021, 41(5): 58-64, 146. | |
| [6] | Yan Z, Cui X, Gao Y. Acoustic injection method based on weak echo signals for leak detection and localization in gas pipelines[J]. Applied Acoustics, 2023, 211: 109577. |
| [7] | 杨红英, 华科, 叶昊, 等. 基于Hilbert-Huang变换的输气管道泄漏诊断方法[J]. 化工学报, 2011, 62(8): 2095-2100. |
| Yang H Y, Hua K, Ye H, et al. Leak diagnosis of gas transport pipelines based on Hilbert-Huang transform[J]. CIESC Journal, 2011, 62(8): 2095-2100. | |
| [8] | 周芷怡, 尹冠雄, 王彬, 等. 考虑基准点: 修正点两阶段的天然气管道泄漏定位新方法[J]. 天然气工业, 2023, 43(5): 88-99. |
| Zhou Z Y, Yin G X, Wang B, et al. A new two-stage natural gas pipeline leakage locating method considering base point and correction point[J]. Natural Gas Industry, 2023, 43(5): 88-99. | |
| [9] | 王春园. 可燃气体管道泄漏检测方法的研究[D]. 大连: 大连理工大学, 2019. |
| Wang C Y. Research on method for leakage detection of flammable gas pipeline[D]. Dalian: Dalian University of Technology, 2019. | |
| [10] | 李玉星, 刘翠伟. 基于声波的输气管道泄漏监测技术研究进展[J]. 科学通报, 2017, 62(7): 650-658. |
| Li Y X, Liu C W. Advances in leak detection and location based on acoustic wave for gas pipelines[J]. Chinese Science Bulletin, 2017, 62(7): 650-658. | |
| [11] | 贾文龙, 孙溢彬, 汤丁, 等. 基于支持向量机的输气管道泄漏压降信号智能识别方法[J]. 化工进展, 2022, 41(9): 4713-4722. |
| Jia W L, Sun Y B, Tang D, et al. Intelligent recognition method for pressure drop signals of gas pipeline leakage based on support vector machine[J]. Chemical Industry and Engineering Progress, 2022, 41(9): 4713-4722. | |
| [12] | Zhao J, Li J, Bai Y, et al. Research on leakage detection technology of natural gas pipeline based on modified Gaussian plume model and Markov chain Monte Carlo method[J]. Process Safety and Environmental Protection, 2024, 182: 314-326. |
| [13] | Hou Q, Ren L, Jiao W, et al. An improved negative pressure wave method for natural gas pipeline leak location using FBG based strain sensor and wavelet transform[J]. Mathematical Problems in Engineering, 2013(1): 1-8. |
| [14] | Tian X, Jiao W, Liu T, et al. Leakage detection of low-pressure gas distribution pipeline system based on linear fitting and extreme learning machine[J]. International Journal of Pressure Vessels and Piping, 2021, 194: 10553. |
| [15] | Yang L, Li Y, Di C. Application of XGBoost in identification of power quality disturbance source of steady-state disturbance events[C]//2019 IEEE 9th International Conference on Electronics Information and Emergency Communication (ICEIEC). 2019: 1-6. |
| [16] | Khan M S, Salsabil N, Alam M G R, et al. CNN-XGBoost fusion-based affective state recognition using EEG spectrogram image analysis[J]. Scientific Reports, 2022, 12(1): 14122. |
| [17] | 张忠义, 张磊, 王宇, 等. 基于数据挖掘的玉米淀粉果糖生产流程的关键位点筛选[J]. 化工学报, 2023, 74(10): 4208-4217. |
| Zhang Z Y, Zhang L, Wang Y, et al. Data mining-based screening of key points for corn starch and sugar production process[J]. CIESC Journal, 2023, 74(10): 4208-4217. | |
| [18] | Chakraborty D, Elzarka H. Advanced machine learning techniques for building performance simulation: a comparative analysis[J]. Journal of Building Performance Simulation, 2018, 12(2): 193-207. |
| [19] | Rong G, Li K, Su Y, et al. Comparison of tree-structured parzen estimator optimization in three typical neural network models for landslide susceptibility assessment[J]. Remote Sensing, 2021, 13(22): 4694. |
| [20] | Bergstra J, Bardenet R, Bengio Y, et al. Algorithms for hyper-parameter optimization[C]//Proceedings of the 24th International Conference on Neural Information Processing Systems. Red Hook, NY, USA: Curran Associates Inc., 2011: 2546-2554. |
| [21] | Ramachandram D, Lisicki M, Shields T J, et al. Bayesian optimization on graph-structured search spaces: optimizing deep multimodal fusion architectures[J]. Neurocomputing, 2018, 298: 80-89. |
| [22] | Lago J, De Ridder F, Vrancx P, et al. Forecasting day-ahead electricity prices in Europe: the importance of considering market integration[J]. Applied Energy, 2018, 211: 890-903. |
| [23] | Lago J, De Brabandere K, De Ridder F, et al. Short-term forecasting of solar irradiance without local telemetry: a generalized model using satellite data[J]. Solar Energy, 2018, 173: 566-577. |
| [24] | Chen T Q, Guestrin C. XGBoost: a scalable tree boosting system[C]//Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. San Francisco: ACM, 2016: 785-794. |
| [25] | Guo R, Zhao Z Q, Wang T, et al. Degradation state recognition of piston pump based on ICEEMDAN and XGBoost[J]. Applied Sciences, 2020, 10(18): 6593. |
| [26] | Ghanbari-Adivi F, Mosleh M. Text emotion detection in social networks using a novel ensemble classifier based on Parzen Tree Estimator (TPE)[J]. Neural Computing and Applications, 2019, 31(12): 8971-8983. |
| [27] | Shen K Y, Qin H, Zhou J Z, et al. Runoff probability prediction model based on natural gradient boosting with tree-structured parzen estimator optimization[J]. Water, 2022, 14(4): 545. |
| [28] | 孔凡超, 刘懿晗, 刘士吉, 等. 基于智能优化算法和Bi-LSTM神经网络的盾构隧道刀盘扭矩智能预测方法[J]. 中国科学: 技术科学, 2025, 55(1):171-186. |
| Kong F C, Liu Y H, Liu S J, et al. Intelligent prediction method for cutterhead torque of shield tunnel based on intelligent optimization algorithm and Bi-LSTM neural network[J]. Scientia Sinica (Technological), 2025, 55(1): 171-186. | |
| [29] | Sameen M I, Pradhan B, Lee S. Application of convolutional neural networks featuring Bayesian optimization for landslide susceptibility assessment[J]. Catena, 2020, 186: 104249. |
| [30] | 马飞虎, 雷皓安, 孙翠羽, 等. 基于RFE-OPTUNA-XGBoost模型的高速公路逃费模式识别[J]. 应用科学学报, 2024, 42(5): 857-870. |
| Ma F H, Lei H A, Sun C Y, et al. Highway toll evasion patterns identification based on RFE-OPTUNA-XGBoost model[J]. Journal of Applied Sciences, 2024, 42(5): 857-870. |
| [1] | 密晓光, 孙国刚, 程昊, 张晓慧. 印刷电路板式天然气冷却器性能仿真模型和验证[J]. 化工学报, 2025, 76(S1): 426-434. |
| [2] | 黄博, 黄灏, 王文, 贺隆坤. 薄膜型LNG船液货舱温度场计算分析[J]. 化工学报, 2025, 76(S1): 195-204. |
| [3] | 郭纪超, 徐肖肖, 孙云龙. 基于植物工厂中的CO2浓度气流模拟及优化研究[J]. 化工学报, 2025, 76(S1): 237-245. |
| [4] | 何婷, 黄舒阳, 黄坤, 陈利琼. 基于余热利用的天然气化学吸收脱碳-高温热泵耦合流程研究[J]. 化工学报, 2025, 76(S1): 297-308. |
| [5] | 娄岚浩, 杨立鹏, 杨晓光. 锂离子电池电化学机理模型参数辨识研究综述[J]. 化工学报, 2025, 76(9): 4369-4382. |
| [6] | 郭旭, 贾继宁, 姚克俭. 基于优化CNN-BiLSTM神经网络的间歇精馏过程建模[J]. 化工学报, 2025, 76(9): 4613-4629. |
| [7] | 朱春梦, 李增, 柳楠, 赵云鹏, 石孝刚, 蓝兴英. 基于自编码器和多尺度符号转移熵的FCC沉降器跑剂故障检测[J]. 化工学报, 2025, 76(9): 4512-4523. |
| [8] | 赵婧, 董书辰, 李高洋, 黄友科, 石浩森, 缪舒文, 谭辰妍, 朱唐琦, 李永帅, 潘慧, 凌昊. 基于电化学模型的电池性能模拟与优化[J]. 化工学报, 2025, 76(9): 4922-4932. |
| [9] | 李雪雯, 王治红, 高阳, 吴明鸥, 马文皓, 谭仁敏. 基于热泵技术的醇胺法脱硫再生系统多目标优化研究[J]. 化工学报, 2025, 76(9): 4563-4577. |
| [10] | 刘璐, 王文玥, 王腾, 王太, 董新宇, 汤建成, 王少恒. 基于双混合工质深冷的氢液化工艺优化与分析[J]. 化工学报, 2025, 76(9): 4933-4943. |
| [11] | 周光正, 钟子翰, 黄彦群, 王学重. 基于原位成像与图像分析技术的结晶过程智能监测[J]. 化工学报, 2025, 76(9): 4351-4368. |
| [12] | 刘奕扬, 邢志祥, 刘烨铖, 彭明, 李玉洋, 李云浩, 沈宁舟. 加氢站液氢泄漏扩散特性与安全监测数值模拟研究[J]. 化工学报, 2025, 76(9): 4694-4708. |
| [13] | 陈治宏, 吴佳伟, 楼小玲, 贠军贤. 化学品生物制造过程机器学习的研究进展[J]. 化工学报, 2025, 76(8): 3789-3804. |
| [14] | 张景皓, 王亚君, 张永康. 基于NRBO-SLSTM的化工过程运行状态评价[J]. 化工学报, 2025, 76(8): 4145-4154. |
| [15] | 郭梁, 陈烨, 贾启明, 谢秀娟. 液氦贮罐的自增压理论模拟及实验研究[J]. 化工学报, 2025, 76(7): 3561-3571. |
| 阅读次数 | ||||||
|
全文 |
|
|||||
|
摘要 |
|
|||||
京公网安备 11010102001995号