Heat Transfer Model of Natural Gas Pipeline Based on Data Feature Extraction and First Principle Models
Abstract
:1. Introduction
2. First Principle Model
2.1. Gas Flow Model in Pipe
2.2. Thermal Model
2.2.1. Sukhov Formula
2.2.2. Steady-State Heat Transfer Model
2.2.3. Transient State Heat Transfer Model
2.2.4. Thermohydraulic Simulation of a Natural Gas Pipeline Based on the FVM
2.3. Model Comparison
2.3.1. Basic Data
2.3.2. Comparison of First Principle Models
3. Data-Driven Model Construction
3.1. NARX Neural Network
3.1.1. NARX Neural Network Introduction
3.1.2. NARX Neural Network Construction
- The measured pipeline data were divided into a training dataset and a dataset used in the case study, and the dataset used in the case study was a comparison of each method in the article.
- The training data set was normalized, which eliminated the impact of dimensions on model training. Batch normalization was used as the normalization method.
- The training data set was randomly divided into three types of training, verification, and test data, including 70%, 15%, and 15% data, respectively.
- The neural network model was trained. During training, the NARX model used the open structure for training, which means that the measured data were selected for input by the endogenous inputs of NARX.
- After the model training, the endogenous inputs of NARX were adjusted to the output value of NARX at the previous time to complete the closed-loop prediction of the model.
3.2. Time Series Decomposition
3.2.1. Time Series Decomposition
- Smooth the temperature time series X through the Savitzky–Golay filter Equation (19), and the difference between the results obtained and the temperature time series is the noise item R, which does not influence the trend item and the fluctuation item.
- The trend item represents the overall trend of the temperature changes in a period of time. Therefore, the trend item represents the overall change of natural gas temperatures over a long period of time. The trend item is obtained by filtering the time series with the mean value of 1000 points, which is the average value of the time required for the inlet temperature changes to transfer to the outlet temperature.
- The temperature time series minus the noise item and the trend item is the fluctuation item.
3.2.2. Subitem Fitting
3.3. System Identification
4. Data-Driven Model Comparison
4.1. Numerical Accuracy Comparison Method
4.2. Comparison of Simulation Results of Various Methods
5. Conclusions
- (1)
- The average simulation errors of the three data-driven models were 1.98%, 2.35%, and 3.01%, which satisfy the requirements for simulation accuracy in pipeline operations. The main accuracy loss of data-driven models occurred under abnormal working conditions, such as a sudden change of ambient temperature and natural gas cooling and transportation, while the calculation accuracy was very high under normal working conditions. Therefore, when the requirements for simulation accuracy are high, the data-driven model can be used for simulation under stable working conditions.
- (2)
- The time calculations of the data-driven models were 4.0382 s, 1.67 s, and 1.683 s, which were faster than that of the first principle model. Among them, the total time of time series decomposition and system identification were almost consistent. The NARX neural network and system identification models need to obtain the applicable model through the analysis of historical data. The time to establish the model was relatively long, while the time series decomposition model was calculated directly, which was shorter than the NARX neural network.
- (3)
- In terms of applicability, the three first principle models did not need to be calculated with actual known data, and have strong applicability to different pipelines, but the physical parameters, such as ambient temperature, thermal conductivity between the pipe and the surrounding environment should be known; the solutions of the three data-driven models were obtained by analyzing the known data. Therefore, the models obtained for different pipelines and even different working conditions were different, and there are requirements for the acquisition of actual data. Too little data will lead to the model output not being in line with the reality, and a large difference in data under different working conditions will also lead to a deviation of calculation capacity under different working conditions.
Author Contributions
Funding
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Su, H.; Zhang, J.; Zio, E.; Yang, N.; Li, X.; Zhang, Z. An integrated systemic method for supply reliability assessment of natural gas pipeline networks. Appl. Energy 2018, 209, 489–501. [Google Scholar] [CrossRef]
- Ríos-Mercado, R.Z.; Borraz-Sánchez, C. Optimization problems in natural gas transportation systems: A state-of-the-art review. Appl. Energy 2015, 147, 536–555. [Google Scholar] [CrossRef]
- Chen, Q.; Wu, C.; Zuo, L.; Mehrtash, M.; Wang, Y.; Bu, Y.; Sadiq, R.; Cao, Y. Multi-objective transient peak shaving optimization of a gas pipeline system under demand uncertainty. Comput. Chem. Eng. 2021, 147, 107260. [Google Scholar] [CrossRef]
- Wang, P.; Yu, B.; Han, D.; Sun, D.; Xiang, Y. Fast method for the hydraulic simulation of natural gas pipeline networks based on the divide-and-conquer approach. J. Nat. Gas Sci. Eng. 2018, 50, 55–63. [Google Scholar] [CrossRef]
- Koo, B. Comparison of finite-volume method and method of characteristics for simulating transient flow in natural-gas pipeline. J. Nat. Gas Sci. Eng. 2022, 98, 104374. [Google Scholar] [CrossRef]
- Wang, P.; Yu, B.; Deng, Y.; Zhao, Y. Comparison study on the accuracy and efficiency of the four forms of hydraulic equation of a natural gas pipeline based on linearized solution. J. Nat. Gas Sci. Eng. 2015, 22, 235–244. [Google Scholar] [CrossRef]
- Osiadacz, A.J. Different transient flow models-limitations, advantages, and disadvantages. In Proceedings of the PSIG Annual Meeting, San Francisco, CA, USA, 23–25 October 1996. [Google Scholar]
- Fan, D.; Gong, J.; Zhang, S.; Shi, G.; Kang, Q.; Xiao, Y.; Wu, C. A transient composition tracking method for natural gas pipe networks. Energy 2021, 215. [Google Scholar] [CrossRef]
- Alamian, R.; Behbahani-Nejad, M.; Ghanbarzadeh, A. A state space model for transient flow simulation in natural gas pipelines. J. Nat. Gas Sci. Eng. 2012, 9, 51–59. [Google Scholar] [CrossRef]
- Behbahani-Nejad, M.B.; Bagheri, A. A MATLAB Simulink library for transient flow simulation of gas networks. World Acad. Sci. Eng. Technol. 2008, 2, 139–145. [Google Scholar]
- Hadian, M.; AliAkbari, N.; Karami, M. Using artificial neural network predictive controller optimized with Cuckoo Algorithm for pressure tracking in gas distribution network. J. Nat. Gas Sci. Eng. 2015, 27, 1446–1454. [Google Scholar] [CrossRef]
- Su, H.; Zio, E.; Zhang, J.; Yang, Z.; Li, X.; Zhang, Z. A systematic hybrid method for real-time prediction of system conditions in natural gas pipeline networks. J. Nat. Gas Sci. Eng. 2018, 57, 31–44. [Google Scholar] [CrossRef]
- Cui, G.; Jia, Q.-S.; Guan, X.; Liu, Q. Data-driven computation of natural gas pipeline network hydraulics. Results Control Optim. 2020, 1, 100004. [Google Scholar] [CrossRef]
- Yin, X.; Wen, K.; Wu, Y.; Han, X.; Mukhtar, Y.; Gong, J. A machine learning-based surrogate model for the rapid control of piping flow: Application to a natural gas flowmeter calibration system. J. Nat. Gas Sci. Eng. 2022, 98, 104384. [Google Scholar] [CrossRef]
- He, L.; Wen, K.; Wu, C.; Gong, J.; Ping, X. Hybrid method based on particle filter and NARX for real-time flow rate estimation in multi-product pipelines. J. Process Control 2020, 88, 19–31. [Google Scholar] [CrossRef]
- Walters, E.S.P. Continuous-Time System Identification from Discrete -Time Measurements with Application to Natural Gas Pipeline Modeling. Ph.D. Thesis, Marquette University, Ann Arbor, MI, USA, 2002. [Google Scholar]
- Aalto, H. Model Predictive Control of Natural Gas Pipeline Systems—A case for Constrained System Identification. IFAC-PapersOnLine 2015, 48, 197–202. [Google Scholar] [CrossRef]
- Hai, W.; Xiaojing, L.; Weiguo, Z. Transient flow simulation of municipal gas pipelines and networks using semi implicit finite volume method. Procedia Eng. 2011, 12, 217–223. [Google Scholar] [CrossRef] [Green Version]
- Goldstein, R.J.; Eckert, E.R.G.; Ibele, W.E.; Patankar, S.V.; Simon, T.W.; Kuehn, T.H.; Strykowski, P.J.; Tamma, K.K.; Bar-Cohen, A.; Heberlein, J.V.R.; et al. Heat transfer: A review of 1998 literature. Int. J. Heat Mass Transf. 2001, 44, 253–366. [Google Scholar]
- Chaczykowski, M. Transient flow in natural gas pipeline—The effect of pipeline thermal model. Appl. Math. Model. 2010, 34, 1051–1067. [Google Scholar] [CrossRef]
- Thorley, A.R.D.; Tiley, C.H. Unsteady and transient flow of compressible fluids in pipelines—A review of theoretical and some experimental studies. Int. J. Heat Fluid Flow 1987, 8, 3–15. [Google Scholar] [CrossRef]
- Abbaspour, M.; Chapman, K.S. Nonisothermal Transient Flow in Natural Gas Pipeline. J. Appl. Mech. 2008, 75, 031018. [Google Scholar] [CrossRef]
- Price, G.R.; McBrien, R.K.; Rizopoulos, S.N.; Golshan, H. Evaluating the effective friction factor and overall heat transfer coefficient during unsteady pipeline operation. In Proceedings of the International Pipeline Conference, Calgary, AL, Canada, 9–13 June 1996; pp. 1175–1182. [Google Scholar]
- Li, X.; Wang, Y.; Zhu, Y.; Yang, G.; Liu, H. Temperature prediction of combustion level of ultra-supercritical unit through data mining and modelling. Energy 2021, 231, 120875. [Google Scholar] [CrossRef]
- Zadeh, L.A. From circuit theory to system theory. Proc. IRE 1962, 50, 856–865. [Google Scholar] [CrossRef]
Pipeline Parameters | Value |
---|---|
Length (km) | 202.8 |
Diameter (mm) | 1067 |
Wall thickness (mm) | 15.9 |
Roughness (mm) | 0.016 |
Average soil temperature ( °C) | 30 |
Pipe Wall Structure | Thickness (mm) | Ki (W/m·K) | ρ (kg/m3) | cp (J/kg·K) |
---|---|---|---|---|
Internal coating | 0.5 | 0.52 | 1800 | 1050 |
Steel X70 | 15.9 | 45.3 | 7830 | 500 |
External coating | 3.0 | 0.4 | 940 | 1900 |
Composition | Mole Fraction (%) |
---|---|
C1 | 94.8 |
C2 | 2.47 |
C3 | 0.41 |
NC4 | 0.09 |
IC4 | 0.06 |
NC5 | 0.03 |
IC5 | 0.03 |
C6+ | 0.08 |
N2 | 1.13 |
CO2 | 0.9 |
Heat Transfer Model | Steady | Transient |
---|---|---|
Grid spacing | 1000 m | 1000 m |
Time Step | 10 s | 10 s |
Simulation Horizon | 10 days | 10 days |
Calculation Time | 209 s | 951 s |
Error | Steady (%) | Transient (%) |
---|---|---|
Max | 7.64 | 1.60 |
Min | 0.00480 | 0.000532 |
Average | 1.82 | 0.64 |
Model | Training Time (s) | Simulation Time (s) | Total (s) |
---|---|---|---|
Steady-state | —— | 209 | 209 |
Transient | —— | 951 | 951 |
NARX neural network | 4.00 | 0.0382 | 4.0382 |
Time series decomposition | —— | 1.67 | 1.67 |
System identification | 1.52 | 0.163 | 1.683 |
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. |
© 2023 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 (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Wen, K.; Xu, H.; Qi, W.; Li, H.; Li, Y.; Hong, B. Heat Transfer Model of Natural Gas Pipeline Based on Data Feature Extraction and First Principle Models. Energies 2023, 16, 1096. https://doi.org/10.3390/en16031096
Wen K, Xu H, Qi W, Li H, Li Y, Hong B. Heat Transfer Model of Natural Gas Pipeline Based on Data Feature Extraction and First Principle Models. Energies. 2023; 16(3):1096. https://doi.org/10.3390/en16031096
Chicago/Turabian StyleWen, Kai, Hailong Xu, Wei Qi, Haichuan Li, Yichen Li, and Bingyuan Hong. 2023. "Heat Transfer Model of Natural Gas Pipeline Based on Data Feature Extraction and First Principle Models" Energies 16, no. 3: 1096. https://doi.org/10.3390/en16031096
APA StyleWen, K., Xu, H., Qi, W., Li, H., Li, Y., & Hong, B. (2023). Heat Transfer Model of Natural Gas Pipeline Based on Data Feature Extraction and First Principle Models. Energies, 16(3), 1096. https://doi.org/10.3390/en16031096