Research on soft-sensing for oil mixing information in batching transport pipelines of product oils
LIU Gang1,YUAN Ziyun1,SUN Qingfeng2,CHEN Lei1,LI Miao3,PAN Yuanhao1,WU Yuchen1,WANG Zihan1
1.College of Pipeline and Civil Engineering, China University of Petroleum (East China)//Shandong Provincial Key Laboratory of Oil & Gas Storage and Transportation Safety; 2.Shandong Gangyuan Pipeline Logistics Company; 3.PipeChina South China Company
【目的】混油控制是成品油顺序输送管道亟需解决的难题之一,混油信息则是优化顺序输送管道运行效率的基础数据。现场安装传感器的监测结果存在偏差,且无法满足现场提前获取混油信息的需求;纯数据驱动模型建立的混油软测量方法未考虑管输工艺与仪表测量特性,预测精度欠佳。【方法】通过分析顺序输送管道的管输工艺与测量仪表的监测过程,提出融合物理认知的变分贝叶斯高斯混合回归模型,并结合新一维混油浓度演化模型,构建顺序输送管道混油信息软测量方法:基于站场“硬”传感器(即真实传感器)获取的管输运行参数,建立表征顺序输送混油信息变化规律的高精度“软”传感器,其主要功能是实现混油界面的定位、后行油品密度测量值的预测、混油界面密度分布信息的预测。【结果】新建软测量方法具备更好的适用性,混油界面到站时间预测误差较传感器测量方法减少了76.2%,后行油品测量密度预测均方根误差(Root Mean Square Error,RMSE)较纯数据驱动软测量方法降低了41.4%,混油界面密度分布预测曲线RMSE低于0.9kg/m3,且计算耗时少于30s。【结论】融合物理认知与数据的顺序输送管道混油信息软测量方法可实现混油信息的高效预测,辅助现场操作人员掌握管输批次状态,优化油品批次管理,为顺序输送智慧物流提供技术支撑。(图6,表5,参[17])
[Objective] Oil mixing control is identified as one of the urgent challenges to be addressed for the batching transport pipelines of product oils. Accurate oil mixing information provides essential data for optimizing the operational efficiency of these pipelines. However, monitoring results obtained from on-site sensors often fall short of meeting the field need for access to oil mixing information in advance, primarily due to deviations. Predictions made using soft-sensing methods based on purely data-driven models tend to exhibit low accuracy, as they do not consider the complexities of the pipeline transportation process and the characteristics of instrument measurements. [Methods] This paper presents a variational Bayesian Gaussian mixture regression model incorporating physical cognition, developed from an analysis of the pipeline transportation process and the monitoring process of measurement instruments along batching transport pipelines. Additionally, it proposes a soft-sensing method for oil mixing information of these pipelines, by introducing a novel one-dimensional oil mixing concentration evolution model. Based on the operational parameters of pipeline transportation acquired by physical sensors mounted at stations and yards, high-precision “soft” sensors are developed to characterize the variation patterns of oil mixing information in batch pipelining. They are designed primarily to position oil mixing interfaces, predict the density measurements of trailing oils, and predict the density distributions at oil mixing interfaces, ultimately enabling the accurate prediction of oil mixing information. [Results] The proposed soft-sensing technique demonstrated improved applicability. The predicted arrival times of oil mixing interfaces at stations exhibited an error reduction of 76.2%, compared with the method based on sensor measurements. The predicted density measurements for trailing oils showed a 41.4% fall in Root Mean Square Error (RMSE) compared with the purely data-driven soft-sensing method. The curves for predicated density distributions at oil mixing interfaces remained below 0.9 kg/m³. Furthermore, the computation time for these predictions was less than 30 s. [Conclusion] The soft-sensing method for oil mixing information in batch transport pipelines facilitates efficient predictions by integrating physical cognition with data. This approach provides on-site operators with more accurate information to identify the batch status in pipeline transportation and optimize the batch management of oils. Consequently, this technique serves as a technical support system for smart logistics in batch pipelining. (6 Figures, 5 Tables, 17 References)
通过对数据潜藏的多模态特性进行辨识,并在各模态内建立针对性的局部预测模型,能更精准地描述输入变量与输出变量之间的函数映射关系。然而,传统的VBGMR模型[9]要求所有输入变量参与回归关系构建过程,导致模型结构复杂度较高,易陷入过拟合误区。为此,建立融合物理认知的KIVBGMR模型,通过分析管输工艺与仪表监测过程,精选与待预测变量高度关联的特征变量,提升模型预测性能。在KIVBGMR中,假定从原始输入变量 xi 中挑选的关键特征变量为 ϕi ,可得对应输出变量 yi 的条件概率密度函数:
随后,通过收集相邻站间管输热力与水力数据、管输平均监测流速,结合KIVBGMR模型确定管输运行工况数据蕴含的运行模态信息。在构建回归关系阶段,基于管输工艺与仪表监测特点,单独选取管输平均流速监测值 vm 为关键回归变量,结合训练样本获取不同模态下混油界面的折算关系,最终建立混油界面平均流速 va 的软测量方法。基于式(14)、式(15),结合混油界面平均流速的预测值 ˆva 与管输距离L,可计算t时刻混油界面距离前一站场的位置信息 ˆLin ,同时预测界面到达当前站场的时刻ta。
图2 某相邻站场管道进出口温压数据、管输平均监测流速、混油界面平均流速及两种流速之间折算系数的高斯分布情况图Fig. 2 Gaussian distributions of temperature and pressure at pipeline inlet and outlet, average monitored flow rates, average flow rates at oil mixing interfaces, and the conversion coefficient between these two types of flow rates in two adjacent oil stations
在构建训练集与测试集时,通常将绝大部分样本划入训练集以保证模型预测性能[17]。采用1∶1比例对126条混油样本进行划分,通过扩大测试集样本量更全面地评估模型的泛化性能。在确定 KIBGMR、VBGMR及KIVBGMR模型的模态数与超参数取值过程中,VBGMR为纯数据驱动模型,故将其先验参数τ0 设为零向量。混油界面平均流速 va 与管输平均监测流速 vm 之间虽存在一定偏差,但其折算系数应在1附近波动。基于该先验认知,令KIBGMR、KIVBGMR模型中的 τ0 为1,增强模型对数据集中潜藏离群样本的鲁棒性。其余超参数及模态数采用十折交叉验证,确定模型模态数及超参数集合。最终,将KIBGMR模型的模态数设定为 7,超参数 λ 取 10; VBGMR、KIVBGMR模型的模态数分别取 2、 8,超参数W−10 =10 I ,其余超参数取值均为1。为了对比新建模型与主流机器学习模型在构建混油界面信息软测量方法时的适用性,引入常见的梯度提升决策树(Gradient Boosting Decision Trees, GBDT)以及人工神经网络(Artificial Neural Network, ANN)作为对比模型。同时,为进一步说明将管输平均监测流速作为关键回归变量对提升混油界面定位准确度的重要性,将上述两种模型的待预测变量从界面流速转变为折算系数后,可以获得物理知识引导的 GBDT(Knowledge-informed GBDT, KIGBDT)与 ANN(Knowledge-informed ANN, KIANN)模型。通过预测折算系数,结合管输平均监测流速,可获得混油界面平均流速的预测值。采用 Python3.7完成编程, GBDT、 KIGBDT模型的超参数采用系统默认设置,ANN、KIANN模型中神经元个数设定为20,采用ReLU函数作为非线性激活函数,结合Adam优化器最小化损失函数,学习率设为0.01。
图3 某管网混油界面平均流速不同方法的预测结果与实际值拟合图Fig. 3 Fitting diagram of predicted average flow rates at oil mixing interfaces by various methods and actual values for a pipeline network
表1 不同方法预测某管网混油界面平均流速的误差对比表Table 1 Comparison of errors in predicted average flow rates at oil mixing interfaces by various methods for a pipeline network
表2 不同方法预测某管网混油界面到站时间的误差对比表Table 2 Comparison of errors in predicted arrival times of oil mixing interfaces at stations by various methods for a pipeline network
图4 不同方法预测某管网混油界面到站时间的RMSE随模态数变化图Fig. 4 RMSE variations in predicted arrival times of oil mixing interfaces at stations by different methods with number of modes for a pipeline network
图5 不同软测量方法对后行油品密度测量值预测结果与实际值对比图Fig. 5 Comparison between the predicted trailing oil density measurements and the actual values using various soft-sensing methods
表3 不同方法预测某管网后行油品密度的误差对比表Table 3 Comparison of errors in predicted trailing oil density measurements by various methods for a pipeline network
表4 某顺序输送管段不同批次混油界面后行油品测量密度、流速及到站时间预测结果表Table 4 The results of predicated density measurements, flow rates, and arrival times at stations of trailing oils at oil mixing interfaces for different batches in a batch transport pipeline section
图6 某顺序输送管段不同批次混油界面密度分布曲线预测结果图Fig. 6 Curves of predicted density distributions at oil mixing interfaces for different batches in a batch transport pipeline section
表5 某顺序输送管段不同批次混油界面密度分布预测耗时及误差对比表Table 5 Time consumption and error comparison in predicting density distributions at oil mixing interfaces for different batches in a batch transport pipeline
[1] 梁永图,廖绮,邱睿,涂仁福,邵奇,沈亮. 市场化改革背景下成品油管网运营关键技术及展望[J]. 油气储运,2023,42(9):978−987,1008. 10.6047/j.issn.1000-8241.2023.09.003. LIANG Y T,LIAO Q,QIU R,TU R F,SHAO Q,SHEN L. Key operation technologies and prospects to product oil pipeline network under market-oriented reform[J]. Oil & Gas Storage and Transportation,2023,42(9): 978−987,1008.
[2] 梁永图,邱睿,涂仁福,杜渐,廖绮,邵奇. 中国油气管网运行关键技术及展望[J]. 石油科学通报,2024,9(2):213−223. 10.3969/j.issn.2096-1693.2024.02.016. LIANG Y T,QIU R,TU R F,DU J,LIAO Q,SHAO Q. Key technologies and prospects for the operation of oil and gas pipeline networks in China[J]. Petroleum Science Bulletin,2024,9(2):213−223.
[3] 黄维和,刘刚,陈雷,杨文,袁子云. 中国成品油管道顺序输送混油研究现状与展望[J]. 中国石油大学学报(自然科学版),2023,47(5):122−129. 10.3969/j.issn.1673-5005.2023.05.012. HUANG W H,LIU G,CHEN L,YANG W,YUAN Z Y. Current status and prospect of studies on mixed oils in batch transportation of multi-product pipelines in China[J]. Journal of China University of Petroleum (Edition of Natural Science),2023,47(5): 122−129.
[4] 陈朋超. “双碳”愿景下管网多介质灵活输运与智能化高效利用发展战略思考[J]. 油气储运,2023,42(7):721−730. 10.6047/j.issn.1000-8241.2023.07.001. CHEN P C. Strategic thinking on pipeline network development for flexible multi-media transport and intelligent efficient utilization under dual carbon vision[J]. Oil & Gas Storage and Transportation,2023,42(7): 721−730.
[5] 郭祎,于达,宋进舟,沈亮,于阳,吕政,等. 国家管网体制下成品油管道批次界面跟踪技术[J]. 油气储运,2023,42(6):601−611. 10.6047/j.issn.1000-8241.2023.06. GUO Y,YU D,SONG J Z,SHEN L,YU Y,LYU Z,et al. Products pipeline batch interface tracking technology under PipeChina system[J]. Oil & Gas Storage and Transportation,2023,42(6):601−611.
[10] 汤东东. 成品油管道混油浓度在线预测及基于质量指标的切割方法研究[D]. 北京:中国石油大学(北京),2019. TANG D D. On-line prediction of mixed oil concentration in product pipelines and study on cutting method based on quality index[D]. Beijing: China University of Petroleum (Beijing),2019.
[11] 杜渐,郑坚钦,夏玉恒,张秀玲,徐宁,廖绮,等. 耦合混油发展机理与数据修正的成品油管道混油浓度预测[J]. 油气储运,2024,43(7):796−808. 10.6047/j.issn.1000-8241.2024.07.009. DU J,ZHENG J Q,XIA Y H,ZHANG X L,XU N,LIAO Q,et al. Prediction of mixed oil concentration in product oil pipeline coupling oil mixing mechanism and data correction[J]. Oil & Gas Storage and Transportation,2024,43(7): 796−808.
[16] 袁子云,刘刚,陈雷,邵伟明,张钰晗. 融合机制与高斯混合回归算法的成品油管道顺序输送混油长度预测模型[J]. 中国石油大学学报(自然科学版),2023,47(2):123−128. 10.3969/j.issn.1673-5005.2023.02.014. YUAN Z Y,LIU G,CHEN L,SHAO W M,ZHANG Y H. Predictive model of mixed oil length for sequential transportation of multi-product pipeline by combining mechanism and Gaussian Mixture Regression algorithm[J]. Journal of China University of Petroleum (Edition of Natural Science),2023,47(2): 123−128.
[17] 吴小平,杨罗,田晓龙. 基于RS-ISOA-KELM的输气管道内腐蚀速率预测方法[J]. 油气储运,2024,43(2):180−188,221. 10.6047/j.issn.1000-8241.2024.02.007. WU X P,YANG L,TIAN X L. Prediction method for internal corrosion rate of gas pipeline based on RS-ISOA-KELM model[J]. Oil & Gas Storage and Transportation,2024,43(2): 180−188,221.