A Natural Gas Energy Metering Method Based on Density-Sound Velocity Correlation
Abstract
1. Introduction
2. Materials and Methods
2.1. Feature Correlation Analysis
2.1.1. Analysis of Key Parameters for Energy Metering
2.1.2. Compression Factor Feature Correlation Analysis
2.1.3. Correlation Analysis of Calorific Value Characteristics
2.1.4. Hypothetical Calculation Example and Process Description
2.2. Sample Dataset Construction
3. Prediction Model Construction
3.1. Models and Evaluation Indicators
- -
- SVR maps data to a high-dimensional space using a kernel function and identifies the optimal hyperplane [38].
- -
- GBR iteratively fits weak learners and corrects residuals to approximate the true regression function [39].
- -
- MLP is flexible regarding input data structure and can process data of arbitrary shape and dimension [40].
- -
- CNN reduces the dimensionality of input data while extracting spatial features [41].
3.2. Model Training
3.2.1. Compression Factor Prediction Model
3.2.2. Calorific Value Prediction Model
3.3. Model Switching Method Based on Feature Range
4. Case Study
4.1. Actual Flow Test
4.2. Experimental Results
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Abbreviations
| E | Total energy of natural gas |
| t0 | Initial moment of energy metering |
| tn | Final moment of energy metering |
| es(t) | Instantaneous energy flow as a function of time |
| qs(t) | Volume flow rate as a function of time |
| Hs(t) | Calorific value as a function of time |
| q | Volume flow rate |
| f | Volume flow correction parameter |
| P | Pressure |
| T | Thermodynamic temperature |
| Z | Compression factor |
| Ideal calorific value of natural gas under standard conditions | |
| Calorific value of natural gas under standard conditions | |
| Ideal calorific value of each component in natural gas under standard conditions | |
| xi | Molar fraction of each component |
| n | Total number of components in natural gas |
| m | Sample size |
| Gas density | |
| M | Molecular weight |
| Vm | Mole volume |
| Ru | Universal gas constant |
| c | Sound velocity |
| Isentropic index | |
| x’ | Normalised sample data |
| x | Original sample data before normalisation |
| xmax | Maximum value of the sample data |
| xmin | Minimum value of the sample data |
| yi | True sample value |
| Predicted value from the machine learning model | |
| Mean of the true sample values | |
| MAE | Mean absolute error |
| RMSE | Root mean square error |
| MAPE | Mean absolute percentage error |
| R2 | Coefficient of determination |
| subscript | |
| s | Standard reference conditions |
| o | Operating conditions |
References
- Wei, Q.; Zhou, P.; Shi, X. Assessing the congestion cost of gas pipeline between China and Russia. Energy Strateg. Rev. 2024, 55, 101493. [Google Scholar] [CrossRef]
- Huang, W.; Duan, J.; Chang, H.; Luo, Q.; Zhou, L.; Sun, Q. Construction of natural gas energy-measuring system in China: A discussion. Nat. Gas Ind. B 2022, 9, 33–40. [Google Scholar] [CrossRef]
- Zhou, J.; Zhou, P.; Liu, C.; Qin, Y.; Liang, G. Implementation plan and impact of natural gas pipeline network transformation from volume metering to energy metering in China. Int. J. Glob. Energy Issue 2025, 47, 214–242. [Google Scholar] [CrossRef]
- Chang, H.; Duan, J. Natural gas measurement technology system and its prospect in China. Nat. Gas Ind. B 2020, 7, 370–379. [Google Scholar] [CrossRef]
- Ficco, G.; Dell’Isola, M.; Vigo, P.; Celenza, L. Uncertainty analysis of energy measurements in natural gas transmission networks. Flow Meas. Instrum. 2015, 42, 58–68. [Google Scholar] [CrossRef]
- Zhou, J.; Fu, W.; Liang, G.; Zhang, D.; Ma, J. Precision and uncertainty in natural gas calorific value estimation: Advanced combinatorial predictive models for complex pipeline systems. Meas. Sci. Technol. 2024, 36, 015017. [Google Scholar] [CrossRef]
- Dörr, H.; Koturbash, T.; Kutcherov, V. Review of impacts of gas qualities with regard to quality determination and energy metering of natural gas. Meas. Sci. Technol. 2019, 30, 022001. [Google Scholar] [CrossRef]
- Roy, P.S.; Ryu, C.; Park, C.S. Predicting Wobbe Index and methane number of a renewable natural gas by the measurement of simple physical properties. Fuel 2018, 224, 121–127. [Google Scholar] [CrossRef]
- GB/T 17747.3-2011; Natural Gas—Calculation of Compression Factor—Part 3: Calculation Using Physical Properties. Standards Press of China: Beijing, China, 2011.
- Morrow, T.B. Development of a Low Cost Inferential Natural Gas Energy Flow Rate Prototype Retrofit Module; Office of Scientific and Technical Information (OSTI), U.S. Department of Energy: Oak Ridge, TN, USA, 2000.
- Kojima, K.; Ishiguro, T. Methane Number Calculation Method and Methane Number Measurement Device. U.S. Patent 1,013,274,6B2, 14 December 2022. [Google Scholar]
- Kamimoto, T.; Deguchi, Y.; Shisawa, Y.; Kitauchi, Y.; Eto, Y. Development of fuel composition measurement technology using laser diagnostics. Appl. Therm. Eng. 2016, 102, 596–603. [Google Scholar] [CrossRef]
- Gao, Y.; Dai, L.-K.; Zhu, H.-D.; Chen, Y.-L.; Zhou, L. Quantitative Analysis of Main Components of Natural Gas Based on Raman Spectroscopy. Chin. J. Anal. Chem. 2019, 47, 67–76. [Google Scholar] [CrossRef]
- GB/T 17747.2-2011; Natural Gas—Calculation of Compression Factor—Part 2: Calculation Using Molar—Composition Analysis. Standards Press of China: Beijing, China, 2011.
- Baniasadi, M.; Mohebbi, A.; Baniasadi, M. A new correlation based on artificial neural networks for predicting the natural gas compressibility factor. J. Eng. Thermophys. 2012, 21, 248–258. [Google Scholar] [CrossRef]
- Wang, J.; Huang, Z.; Xu, Y.; Xie, D. Gas–Liquid Two-Phase Flow Measurement Based on Optical Flow Method with Machine Learning Optimization Model. Appl. Sci. 2024, 14, 3717. [Google Scholar] [CrossRef]
- Luo, H.; Zhou, P.; Cui, J.; Wang, Y.; Zheng, H.; Wang, Y. Energy performance prediction of centrifugal pumps based on adaptive support vector regression. Eng. Appl. Artif. Intell. 2025, 145, 110247. [Google Scholar] [CrossRef]
- Karpash, O.; Darvay, I.; Karpash, M. New approach to natural gas quality determination. J. Pet. Sci. Eng. 2010, 71, 133–137. [Google Scholar] [CrossRef]
- Chamkalani, A.; Zendehboudi, S.; Chamkalani, R.; Lohi, A.; Elkamel, A.; Chatzis, I. Utilization of support vector machine to calculate gas compressibility factor. Fluid Phase Equilib. 2013, 358, 189–202. [Google Scholar] [CrossRef]
- Farzaneh-Gord, M.; Rahbari, H.R.; Mohseni-Gharesafa, B.; Toikka, A.; Zvereva, I. Accurate determination of natural gas compressibility factor by measuring temperature, pressure and Joule-Thomson coefficient: Artificial neural network approach. J. Pet. Sci. Eng. 2021, 202, 108427. [Google Scholar] [CrossRef]
- Nazari, S.; Bashipour, F. A rigorous model to compute thermodynamic properties of natural gas without applying full component analysis. Flow Meas. Instrum. 2021, 77, 101879. [Google Scholar] [CrossRef]
- Farzaneh-Gord, M.; Rahbari, H.R. The precise designation of natural gas volumetric flow by measuring simple thermodynamic properties and using artificial intelligence methods. J. Braz. Soc. Mech. Sci. Eng. 2022, 44, 370. [Google Scholar] [CrossRef]
- Hu, J.; Yang, Z.; Su, H. Dynamic Prediction of Natural Gas Calorific Value Based on Deep Learning. Energies 2023, 16, 799. [Google Scholar] [CrossRef]
- Dong, J.; Song, B.; He, F.; Xu, Y.; Wang, Q.; Li, W.; Zhang, P. Research on a Hybrid Intelligent Method for Natural Gas Energy Metering. Sensors 2023, 23, 6528. [Google Scholar] [CrossRef]
- Zhang, P.; Zhou, L.; Xu, W. Compressibility factor calculation from gross calorific value and relative density for natural gas energy measurement. Int. J. Energy Res. 2022, 46, 9948–9959. [Google Scholar] [CrossRef]
- GB/T 11062-2020; Calculation Methods for Natural Gas Calorific Value, Density, Relative Density and Wobbe Index. Standards Press of China: Beijing, China, 2020.
- Laznickova, R.; Huemer, H. Investigations on the limits of uncertainty of gas density measurements with vibrating tube densimeters. Meas. Sci. Technol. 1999, 9, 719. [Google Scholar] [CrossRef]
- Chen, D.; Cao, H.; Cui, B. Study on flow field and measurement characteristics of a small-bore ultrasonic gas flow meter. Meas. Control 2021, 54, 554–564. [Google Scholar] [CrossRef]
- Chen, C.; Sun, W.; Zhou, R.; Lin, C.; Chu, C.; Su, S. Optimization design and research of ultrasonic flowmeter based on time difference method. J. Mech. Sci. Technol. 2024, 38, 245–258. [Google Scholar] [CrossRef]
- Ghorbani, B.; Hamedi, M.; Shirmohammadi, R.; Mehrpooya, M.; Hamedi, M.H. A novel multi-hybrid model for estimating optimal viscosity correlations of Iranian crude oil. J. Pet. Sci. Eng. 2016, 142, 68–76. [Google Scholar] [CrossRef]
- Liang, F.; Jin, M.; Cui, H.; Zhu, Y.; Chen, J.; Tang, G.; Ding, R. An integrated approach of throttling physical model and machine learning for gas-liquid two-phase flow rates measurement. Flow Meas. Instrum. 2025, 104, 102866. [Google Scholar] [CrossRef]
- Smith, J.P.; Clancy, J. Understanding aga reprot no. 10, speed of sound in natural gas and other related hydrocarbons gases. In Proceedings of the 2010 American School of Gas Measurement Technology, Houston, TX, USA, 20–23 September 2010. [Google Scholar]
- ISO 6976:2016; Natural gas—Calculation of Calorific Values, Density, Relative Density and Wobbe Indices from Composition. International Organization for Standardization (ISO): Geneva, Switzerland, 2016.
- Farzaneh-Gord, M.; Mohseni-Gharyehsafa, B.; Toikka, A.; Zvereva, I. Sensitivity of natural gas flow measurement to AGA8 or GERG2008 equation of state utilization. J. Nat. Gas Sci. Eng. 2018, 57, 305–321. [Google Scholar] [CrossRef]
- Farzaneh-Gord, M.; Rahbari, H.R. An intelligent approach for calculating natural gas compressibility factor and its application in ultrasonic flow meters. Flow Meas. Instrum. 2020, 76, 101833. [Google Scholar] [CrossRef]
- Rana, P.; St-Onge, B.; Prieur, J.-F.; Cristina Budei, B.; Tolvanen, A.; Tokola, T. Effect of feature standardization on reducing the requirements of field samples for individual tree species classification using ALS data. ISPRS-J. Photogramm. Remote Sens. 2022, 184, 189–202. [Google Scholar] [CrossRef]
- Singh, D.; Singh, B. Feature wise normalization: An effective way of normalizing data. Pattern Recognit. 2022, 122, 108307. [Google Scholar] [CrossRef]
- Wang, W.; Men, C.; Lu, W. Online prediction model based on support vector machine. Neurocomputing 2008, 71, 550–558. [Google Scholar] [CrossRef]
- Park, S.; Jung, S.; Lee, J.; Hur, J. A Short-Term Forecasting of Wind Power Outputs Based on Gradient Boosting Regression Tree Algorithms. Energies 2023, 16, 1132. [Google Scholar] [CrossRef]
- Szoplik, J.; Muchel, P. Using an artificial neural network model for natural gas compositions forecasting. Energy 2023, 263, 126001. [Google Scholar] [CrossRef]
- Tang, W.; Zhang, Q.; Li, L.; Chen, R.; Li, H.; Wang, H.; Liu, X. Hybrid CNN-MLP architecture data-driven airflow parameters perception in underground metal mine. Expert Syst. Appl. 2025, 279, 127441. [Google Scholar] [CrossRef]
- Sun, Y.; Ding, S.; Zhang, Z.; Jia, W. An improved grid search algorithm to optimize SVR for prediction. Soft Comput. 2021, 25, 5633–5644. [Google Scholar] [CrossRef]
- Fayed, H.A.; Atiya, A.F. Speed up grid-search for parameter selection of support vector machines. Appl. Soft. Comput. 2019, 80, 202–210. [Google Scholar] [CrossRef]
- Yang, S.; Wan, M.P.; Chen, W.; Ng, B.F.; Dubey, S. Model predictive control with adaptive machine-learning-based model for building energy efficiency and comfort optimization. Appl. Energy 2020, 271, 115147. [Google Scholar] [CrossRef]
- Nguyen, H.D.; Chamroukhi, F. Practical and theoretical aspects of mixture-of-experts modeling: An overview. WIREs Data Min. Knowl. Discov. 2018, 8, e1246. [Google Scholar] [CrossRef]















| N2 | CO2 | C1 | C2 | C3 | i-C4 | n-C4 | neo-C5 | i-C5 | n-C5 | C6 | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Hs/M | 0 | 0 | 2.31 | 2.16 | 2.09 | 2.06 | 2.05 | 2.04 | 2.03 | 2.03 | 2.02 |
| Temperature (K) | Pressure (MPa) | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| 253 | 0.1 | 0.2 | 0.4 | 0.8 | 1.6 | 2.5 | 4.0 | 6.0 | 8.0 | 10.0 |
| 273 | 0.1 | 0.2 | 0.4 | 0.8 | 1.6 | 2.5 | 4.0 | 6.0 | 8.0 | 10.0 |
| 293 | 0.1 | 0.2 | 0.4 | 0.8 | 1.6 | 2.5 | 4.0 | 6.0 | 8.0 | 10.0 |
| 313 | 0.1 | 0.2 | 0.4 | 0.8 | 1.6 | 2.5 | 4.0 | 6.0 | 8.0 | 10.0 |
| 333 | 0.1 | 0.2 | 0.4 | 0.8 | 1.6 | 2.5 | 4.0 | 6.0 | 8.0 | 10.0 |
| SVR | GBR | MLP | CNN | |
|---|---|---|---|---|
| Basic Structural Parameters | Kernel: ‘rbf’ Gamma: ‘auto’ | N_estimators: 235; Max_depth: 5; Min_samples_split: 12; Max_features: 4; | Hidden layer sizes: (64, 32, 16); Batch_size: 64; Epochs: 50; | Fully connected layer sizes: (64, 32, 16) Conv layer: [Kernel size: (1,3), Padding: (0,1)]; Max pooling layer: [Kernel size: (1,2), Stride: (1,2)]; Batch_size: 64; Epochs: 102; |
| Training-related parameters | C = 10 Epsilon: 0.01 Degree: 5 | Learning rate: 0.01; Loss: ‘Least Squares’ | Learning rate: 0.025; Activation: ‘Tansig’; Optimizer: ‘adam’; Loss: ‘mseloss’; Dropout: 0.2; | Learning rate: 0.007; Activation: ‘Relu’; Optimizer: ‘adam’; Loss: ‘mseloss’; Dropout: 0.2; |
| Model | MAE | RMSE | MAPE (%) | R2 | Single-Sample Prediction Time (ms) |
|---|---|---|---|---|---|
| SVR | 0.00267 | 0.0052 | 0.32 | 0.9963 | 0.2374 |
| GBR | 0.00327 | 0.0061 | 0.39 | 0.9948 | 0.4080 |
| MLP | 0.00417 | 0.0072 | 0.50 | 0.9929 | 0.3552 |
| CNN | 0.00498 | 0.0083 | 0.60 | 0.9906 | 0.7584 |
| SVR | GBR | MLP | CNN | |
|---|---|---|---|---|
| Basic Structural Parameters | Kernel: ‘rbf’ Gamma: ‘scale’ | N_estimators: 250; Max_depth: 10; Min_samples_split: 3; Max_features: 4; | Hidden layer sizes: (256, 128, 64, 16); Batch_size: 64; Epochs: 50; | Fully connected layer sizes: (896, 256, 128, 64, 16) Conv layer: [Kernel size: (1,3), Padding: (0,1)]; Batch_size: 64; Epochs: 550; |
| Training-related parameters | C = 20 Epsilon: 0.06 Degree: 5 | Learning rate: 0.04; Loss: ‘Least Squares’ | Learning rate: 0.001; Activation: ‘Tansig’; Optimizer: ‘adam’; Loss: ‘mseloss’; Dropout: 0.2; | Learning rate: 0.005; Activation: ‘Relu’; Optimizer: ‘adam’; Loss: ‘mseloss’; Dropout: 0.2; |
| Model | MAE | RMSE | MAPE (%) | R2 | Single-Sample Prediction Time (ms) |
|---|---|---|---|---|---|
| SVR | 0.2741 | 0.385 | 0.76 | 0.9641 | 0.5257 |
| GBR | 0.2840 | 0.570 | 0.79 | 0.9222 | 0.4857 |
| MLP | 0.2481 | 0.415 | 0.69 | 0.9577 | 0.4394 |
| CNN | 0.2925 | 0.481 | 0.81 | 0.9448 | 0.7580 |
| Prediction Target | Feature Range | Algorithm Model |
|---|---|---|
| Compression factor | SVR-Z1 | |
| SVR-Z2 | ||
| Calorific value | MLP-H | |
| SVR-H |
| Prediction Target | Model | MAE | RMSE | MAPE(%) | R2 | Single-Sample Prediction Time (ms) |
|---|---|---|---|---|---|---|
| Compression factor | SVR-1 | 0.00054 | 0.0010 | 0.06 | 0.9995 | 0.2192 |
| SVR-2 | 0.00431 | 0.0070 | 0.57 | 0.9915 | 0.2234 | |
| SVR | 0.00118 | 0.0030 | 0.14 | 0.9987 | 0.2423 | |
| Calorific value | SVR | 0.4858 | 0.716 | 1.32 | 0.8524 | 0.5274 |
| MLP | 0.0840 | 0.133 | 0.24 | 0.9958 | 0.4419 | |
| MLP + SVR | 0.1583 | 0.331 | 0.44 | 0.9736 | 0.4653 |
| Gas1 | 2.99 | 0 | 85.1 | 8.92 | 2.99 | 0 | 0 | 0 | 0 | 0 |
| Gas2 | 2.00 | 0 | 90.07 | 5.94 | 1.99 | 0 | 0 | 0 | 0 | 0 |
| Gas3 | 2.02 | 2.52 | 94.135 | 0.521 | 0.201 | 0.1 | 0.1 | 0.15 | 0.152 | 0.101 |
| Gas4 | 0.996 | 0.099 | 97.0883 | 1.01 | 0.201 | 0.101 | 0.101 | 0.153 | 0.1507 | 0.1 |
| Compression Factor | Calorific Value (MJ/m3) | Energy (MJ) | |||
|---|---|---|---|---|---|
| AEmax | REmax | AEmax | REmax | REmax | |
| Gas1 | 0.021% | 0.478 | 1.19% | 1.21% | |
| Gas2 | 0.047% | 0.447 | 1.14% | 1.17% | |
| Gas3 | 0.017% | 0.296 | 0.79% | 0.80% | |
| Gas4 | 0.061% | 0.331 | 0.88% | 0.95% | |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Zhang, B.; Huang, Z.; Wang, W.; Wang, J.; Xie, D.; Cheng, Y.; Yang, Y. A Natural Gas Energy Metering Method Based on Density-Sound Velocity Correlation. Sensors 2026, 26, 343. https://doi.org/10.3390/s26010343
Zhang B, Huang Z, Wang W, Wang J, Xie D, Cheng Y, Yang Y. A Natural Gas Energy Metering Method Based on Density-Sound Velocity Correlation. Sensors. 2026; 26(1):343. https://doi.org/10.3390/s26010343
Chicago/Turabian StyleZhang, Bin, Zhenwei Huang, Wenlin Wang, Junxian Wang, Dailiang Xie, Ying Cheng, and Yi Yang. 2026. "A Natural Gas Energy Metering Method Based on Density-Sound Velocity Correlation" Sensors 26, no. 1: 343. https://doi.org/10.3390/s26010343
APA StyleZhang, B., Huang, Z., Wang, W., Wang, J., Xie, D., Cheng, Y., & Yang, Y. (2026). A Natural Gas Energy Metering Method Based on Density-Sound Velocity Correlation. Sensors, 26(1), 343. https://doi.org/10.3390/s26010343

