The measurement accuracy of ultrasonic flow meters installed in multiproduct pipelines is reduced under complex operating conditions, due to fluid composition, temperature-pressure fluctuations, and installation factors. To address this problem, an intelligent online calibration method was proposed based on Stacking ensemble learning. The mass flowmeter-derived volumetric flow was used as the benchmark to achieve dynamic calibration and enhance measurement precision and reliability. A Stacking ensemble framework was constructed with nine machine learning algorithms including random forest (RF), K-nearest neighbors (KNN), and extreme gradient boosting (XGBoost) as candidate base learners. Over 80 000 field measurements from a southwest China multiproduct pipeline were collected. Models were trained and evaluated after data preprocessing. Based on coefficient of determination (R2) and other metrics, the three optimal models were selected as base learners. Linear regression was adopted as meta-learner for weighted integration to construct the Stacking calibration model. Performance was assessed via R2, mean absolute error (MAE), root mean square error (RMSE), and mean absolute percentage error (MAPE) metrics. Case studies demonstrate that an R2 of 0.999 1 is achieved by the Stacking model, outperforming individual base learners. The MAPE is merely 0.216%, indicating that flow measurement bias is effectively reduced. Absolute errors are mainly distributed within the 0~1 m3/h range, exhibiting a right-skewed distribution with minimal tail extension, indicating superior prediction accuracy and stability. The advantages of multiple heterogeneous learners are effectively integrated by this intelligent calibration model for ultrasonic flow meters. Therefore, measurement accuracy is enhanced and a viable solution is provided for online flowmeter calibration in complex industrial environments. This approach also offers reliable technical support for safe and economical pipeline operations while providing theoretical foundation and practical guidance for intelligent industrial instrument calibration.
NIU Peng-tao, LI Miao, DU Jian, LIU Chun-ying, LIAO Qi, XU Ning, DING Hui-mei, LIANG Yong-tu.
Calibration Method for Ultrasonic Volumetric Flowmeters Based on Ensemble Machine Learning[J].
Science Technology and Engineering, 2026, 26(16): 6852-6860 DOI:10.12404/j.issn.1671-1815.2503981
YangJianchang, WangPing, DengLisan, et al. Application of gas ultrasonic flowmeter in natural gas measurement[J]. Oil & Gas Storage and Transportation, 2002(9): 35-37, 58-60.
SuBin, ZhangPengfei, ChengDongxu, et al. A review of temperature compensation algorithms for ultrasonic flowmeters[J]. Modern Electronics Technique, 2023, 46(13): 115-120.
HeWeihong, XuJiexin, ZhangJing, et al. Analysis and suppre-ssion measures for zero-flow drift in ultrasonic flowmeters[J]. Technologyand Innovation, 2022(14): 108-110, 114.
ChenGang, GuoYi, YuTao, et al. Correction of measurement errors of ultrasonic flowmeter in Lanzhou-Zhengzhou-Changsha pipeline[J]. Oil & Gas Storage and Transportation, 2012, 31(11): 877-879, 887.
[11]
WillatzenM, KamathH. Nonlinearities in ultrasonic flow measurement[J]. Flow Measurement and Instrumentation, 2008, 19(2): 79-84.
GuMin, SunLina, ChenJiannan, et al. Application of ultrasonic flowmeter in on-line calibration of metering facilities[J]. Jiangsu Water Resources, 2022(5): 60-62, 66.
[14]
牛放. 高精度超声波流量计的流场分析及温度补偿方法研究[D]. 徐州: 中国矿业大学, 2021.
[15]
NiuFang. Flow field analysis and temperature compensation method for high-precision ultrasonic flowmeter[D]. Xuzhou: China University of Mining and Technology, 2021.
[16]
王璐. 小流量超声波水表的研究[D]. 济南: 山东建筑大学, 2015.
[17]
WangLu. Research on small flow ultrasonic water meter[D]. Jinan: Shandong Jianzhu University, 2015.
[18]
HerdovicsB, CeglaF. Compensation of phase response changes in ultrasonic transducers caused by temperature variations[J]. Structural Health Monitoring, 2019, 18(2): 508-523.
[19]
AmerM A, Novoa-DíazD, Puig-PujolA, et al. Ultrasonic velocity of water-ethanol-malic acid-lactic acid mixtures during the malolactic fermentation process[J]. Journal of Food Engineering, 2015, 149: 61-69.
YuQun, DaiMinda, YuShuhui. Research on temperature compensation algorithm for flow measurement based on two-dimensional bilinear interpolation[J]. Process Automation Instrumentation, 2020, 41(11): 28-32.
ShaoXianhe, LuZhicheng, WangZhu. Temperature compensation algorithm for flow measurement based on least squares surface fitting[J]. Chinese Journal of Sensors and Actuators, 2016, 29(6): 897-902.
[24]
张国杰. 基于相位差法的超声波户用水表的开发与设计[D]. 青岛: 山东科技大学, 2020.
[25]
ZhangGuojie. Development and design of ultrasonic household water meter based on phase difference method[D]. Qingdao: Shandong University of Science and Technology, 2020.
[26]
YazdanshenasshadB, SafizadehM S. Neural-network-based error reduction in calibrating utility ultrasonic flow meters[J]. Flow Measurement and Instrumentation, 2018, 64: 54-63.
LiuWei, LiAilong, LiZhuo, et al. RSS fingerprint localization based on BP neural network optimized by improved grey wolf algorithm[J]. Electronic Measurement Technology, 2025, 48(14): 162-175.
HeYuxuan, SuHuai, ZhangCheng, et al. Gel point estimation method of mixed crude oil based on ensemble machine learning model[J]. Journal of China University of Petroleum (Edition of Natural Science), 2025, 49(2): 214-222.
XingYan, SongXinyu, LiFei, et al. Prediction of urban air pollutant emissions by integrating ensemble learning algorithm and empirical model[J]. Environmental Monitoring in China, 2025, 41(3): 14-23.
GuoRenwei, ZhuTianlong, LiPeng, et al. Short-term wind power ensemble forecasting based on variational mode decomposition and fuzzy entropy[J]. Science Technology and Engineering, 2025, 25(24): 10263-10272.
DongMeina, LiuLiping, WangZezhong, et al. Evaluation me-thod of line loss rate in active distribution area based on Stacking ensemble learning[J]. Electrical Measurement & Instrumentation, 2023, 60(6): 134-139, 173.
LiangHaibo, MaRui. Porosity prediction method based on Stacking ensemble learning[J]. Journal of Electronic Measurement and Instrumentation, 2024, 38(12): 202-210.
XiangWenqiang, ShaoWei, LuoShaohui, et al. Simulation of soil moisture in permafrost region of Qinghai-Tibet Plateau based on LSTM model[J]. Science Technology and Engineering, 2025, 25(31): 13236-13245.