1. Introduction
Conventional fossil energy has strong geographic attributes [
1], and the uneven distribution of typical oil and gas resources has led to countries around the world competing for control over energy supply, transportation channels and application markets. The global energy governance system has experienced numerous impacts from the Gulf War and other events. With the continued turbulence in the Middle East, it has become fragile and balanced, but with the continuous changes in the international geopolitical landscape and the competitiveness of various countries, it is urgent to enter a new stage of stability [
2]. Moreover, under the current background of resources, environment and social issues increasingly attracting public attention, sustainable development [
3], as the core concept and central principle of human economic and social development, will continue to guide the world to solve resource and environmental constraint dilemmas and solve economic, social and environmental problems. The natural gas industry is regarded as the main force in the development of a clean, high-efficiency and high-quality energy industry [
4]. It is expected to become an important driving force for dealing with resource and environmental constraints; building a clean, low-carbon, safe and efficient energy system; and achieving ecological surplus and harmonious symbiosis. As an economical and environmentally friendly energy-transportation method, especially for long-distance transportation, pipeline transportation has attracted more and more attention from both industry and academia. In 2019, the world’s natural gas consumption accounted for 24.2% of primary energy consumption [
5].
The natural gas pipeline network system refers to a large-scale infrastructure that is composed of multiple trunk natural gas long-distance pipelines and their supporting gas storage and peak shaving facilities and has information and natural gas interconnection capabilities between various subsystems [
6,
7]. The natural gas pipeline network is the link between natural gas resources and the market, and its reliable operation is directly related to the safety of natural gas users and the safety of the ecological environment along the pipeline [
8]. Due to economic and environmental concerns, natural gas pipelines are mostly distributed in plains, mountains, deserts, swamps, rivers, lakes and other sparsely populated fields. It is difficult to place them under the daily management and protection of pipeline companies all the time. Major accidents such as pipeline shutdowns and other mechanical failures have put forward higher requirements for the daily operation and management of natural gas pipeline transportation [
9]. In addition, the fast-paced development of the social economy requires large-scale and continuous output of energy sources, which obviously puts forward higher requirements on the production and supply capacity of natural gas companies, and this requirement cannot be met without the guarantee of efficient and advanced natural gas pipeline dispatching.
Natural gas pipeline dispatching generally includes full-line command, adjustment and monitoring according to the operation plan to ensure that the delivery task is completed according to the plan [
10]. Dispatchers first check the operation plan in the daily work, make appropriate modifications and then issue dispatch instructions according to the plan. The operation status of the whole pipeline is reflected back to the dispatching center, and the dispatching center carries out comprehensive monitoring. The establishment of a dispatch system requires natural gas industries to deeply analyze the characteristics and physical rules of their products and adopt certain coordination and command methods to achieve overall monitoring of the natural gas transportation process to ensure the smooth flow of information. According to a thorough review of previous investigations [
11,
12], the functional role of the natural gas pipeline dispatch system is mainly manifested in the following two points: Firstly, the system has a positive effect on ensuring the smooth implementation of the production plan, and the production scheduling department of the enterprise should use the system to complete the preset economic production goals so as to promote the maximization of economic benefits. Secondly, it is necessary to use the system to prevent and respond to unexpected situations that may occur during the entire production process, assist the staff in the organization and coordination of the production site and realize the controllability of the production and scheduling of natural gas resources. Based on the above analyses, it is not difficult to infer that the dispatch system should at least have certain functional modules of organization, coordination, monitoring, command and service, thereby helping the department to better supervise the operation of the natural gas pipelines. In the past decades, the optimization and regulation of natural gas have often relied on the development of hydraulic calculation models along the pipeline and the establishment of large-scale optimization problems with the goal of pipeline transmission volume and pipeline transmission costs so as to determine an economic and safe natural gas pipeline transportation scheduling plan. However, the practical natural gas pipeline dispatching often involves operations on a large number of compressors and stations along the pipeline, which challenges the conventional optimization methods iteratively solving a large-scale matrix. Moreover, the complex geological, social and economic conditions associated with pipeline transportation often result in a transient and changeful dispatching scenario, which requires an efficient and intelligent prediction of the changing transportation via the pipeline to suggest the adjusting operations to the dispatching center.
Currently, the use of a supervisory control and data acquisition (SCADA) system is well integrated into the dispatch and operation management of natural gas pipelines. This system effectively solves the problems of slow information transmission and difficulty in dispatching and greatly improves the intelligence level of natural gas pipelines. Based on that, intelligent natural gas pipeline dispatching has been enabled using big data and deep learning techniques. A breakthrough was reported in [
13], proposing a simplified dispatching scenario focusing on the direct relevance between the compressor operations and transportation status of one certain pipeline. It has been clearly stated that the transportation flux at a certain key station could be adjusted by opening or closing certain compressors. A self-adaptive deep neural network was established using the compressor Boolean values as the input features, named compressor Boolean neural network (CBNN), and the number of compressors included in the model can be adjusted automatically as a response to sudden failure of one compressor or error in the data transmission. The simplified scenario and the accelerated decision system were validated by the good prediction of the dispatching performance. However, the safety of natural gas transportation was not considered in that algorithm, while transportation safety should be taken into account preferentially in engineering practice [
14,
15]. Phase transition is not preferred in practical pipeline dispatching, as it may cause unsafe heat production, hydrate blockage and surface corrosion [
16,
17]. The accelerated phase equilibrium calculations using the thermodynamics-informed neural network (TINN) have been investigated thoroughly in [
18,
19,
20]. Thus, it is meaningful to incorporate the flash calculation network and the pipeline dispatching network in order to construct a coupled deep neural network and the related deep learning algorithm to evaluate the safety performance in the natural gas pipeline dispatching. More importantly, the number of phases in the transportation pipeline should be checked prior to further dispatching predictions, as the existence of liquefied gas may cause corrosion and damage the facilities [
21].
The remainder of this paper is organized as follows: In
Section 2, the new comprehensive deep neural network is introduced as a coupling of the TINN and the CBNN. The operation conditions and working scenario in the tested example are introduced in
Section 3, and the results of both the security check and dispatching performance are illustrated to evaluate the proposed method. In
Section 4, concluding remarks are presented and potential extensions to wider engineering applications are discussed.
2. Deep Learning Methods
In order to incorporate the function of safety check in the intelligent natural gas pipeline dispatching system, phase equilibrium should be considered to evaluate the total number of phases existing in the pipeline at various working conditions. An idealized deep neural network structure is designed first to meet this purpose, as shown in
Figure 1. Thermodynamic properties of all the components existing in the transported fluid (
) and environmental conditions (
) are defined as the key phase equilibrium parameters, while the input features also involve the compressor Boolean value (
) and the dispatching conditions denoting the scheduled energy supply (
) and denoting the variance tolerance that is used to evaluate the prediction performance (
).
The output of the idealized network can be divided into three parts, including evaluation of the dispatch security (denoted by
), prediction of the output flux (denoted by
) and calculation of the dispatch variance (denoted by
). The dispatch security is a Boolean value that equals 1 when there is only one phase in the transportation and 0 when there are two phases. It should work as a signal to control the whole decision making, in which the dispatching plan should be abandoned if the output
is read as zero. In other words, the three output sections are not parallel, and the dispatch security check should be carried out first. Thus, an efficient deep learning technique is proposed in this paper, using the idea of modular coding, as illustrated by the schematic diagram shown in
Figure 2. The thermodynamics-informed neural network (TINN) is used to accelerate phase equilibrium predictions of the transported fluids at first, and the output dispatch security Boolean value will be checked to decide whether the dispatching could be considered under the environmental conditions. If the pipeline is working in a safe condition (in the single-phase region), the further pipeline transportation prediction can be accelerated by the compressor Boolean neural network (CBNN). In addition to the predicted output flux through the pipeline at certain key stations, the dispatch variance will also be evaluated by comparing with the set variance tolerance. A successful natural gas pipeline dispatch should meet the requirement of the scheduled energy supply to a certain area, which means that the calculated dispatch variance should be less than the variance tolerance. Moreover, both the number of components existing in the transported fluid and the number of compressors working in a controllable condition could be varied during the practical pipeline operations; thus, the self-adaptive data padding network proposed in [
15,
22] is adapted to uniform the size of input and output data in various conditions. The thermodynamic properties of a certain number of ghost components and the compressor Boolean value of a certain number of ghost compressors are defined and padded into the data for further training and testing. It should be pointed out that the environmental conditions are only effective in the phase equilibrium calculations, as the current pipeline transportation calculation network considers only the compressor operations. In other words, the environmental conditions of the investigated pipeline daily operations have been taken into account in affecting the phase stability and transportation safety in the coupled network, which is an improvement as compared to [
15].
The effectiveness of the two functional networks, namely TINN and CBNN, is validated in [
15] and [
20], respectively, and the supportive network, SDPN, is also proved to meet engineering demands efficiently. It is also interesting to see that the thermodynamic properties of the ghost components are defined as zero, which is the same as the Boolean value of the ghost compressors. Thus, only one SDPN is needed in the coupled network structure, and we only need to change the output dimension for padding the two datasets. Besides, only the number of phases outputted from TINN is considered in the coupled method, and the compositional distribution of each phase, as another common output of TINN, is not considered. In fact, this coupling method not only meets the strict requirements for the single-phase pipeline transport fluid in actual operation but also greatly reduces the amount of data storage and calculation time needed.
In TINN, the deep learning model in each layer reads as:
where
denotes the weight parameters in the
th hidden layer (can be initialized using specific deep learning techniques [
23] or trained in the learning process),
denotes the input data in that layer (can be outputted from the previous layer or directly) and
denotes the output data (compositional distribution and number of phases at equilibrium).
denotes the activation function used in that layer, and
is the bias. Similarly, in CBNN, the deep learning model in the
th layer reads as:
where
denotes the output data in CBNN (transportation flux) and
denotes the activation function in the layer. Based on previous investigations, the softplus activation function [
24], written as the following formulation:
is selected as a good choice acting as the activation function for both purposes of phase equilibrium calculations and natural gas pipeline dispatching. As a result, the activation function in establishing the coupled neural network is uniformed as softplus, and the deep learning model can be uniformed as:
For a fully connected deep neural network, the output of the previous layer will be directly used as the input of the next one, so that the deep learning model of the whole coupled network structure can be formulated as (taking three layers as an example):
where
denotes the final output (
for the TINN and
for CBNN);
,
and
denote the weight parameters of the three layers (trained in different networks and datasets for different scenarios); and
denotes the input from the first layer. For TINN,
reads as the thermodynamic properties of each component and the environmental conditions. For CBNN,
reads as the compressor Boolean values along the pipeline.
Similarly, the general data padding model for the coupled network can be formulated as the following equation:
where the thermodynamic properties of the fluid with
components (
) reads as
or the pipeline operation data with
compressors (
) reads as
. The subscript
denotes the property of the ghost components or the status of ghost compressors, and in total,
ghost factors are defined to fulfill a dataset with
factors.
denotes the data not relevant with each component, namely the environmental conditions in TINN and dispatching parameters in CBNN. Although the general deep learning model and the activation function have been uniformed in the coupled network structure, the other network configurations including the number of hidden layers and the number of nodes in each layer cannot be uniformed into one certain number for the two different subnetworks based on previous investigations. However, the deep learning principles remain the same, as the direct relevance between the input and output features is still stationary in the coupled scenario, where thermodynamic properties determine the phase equilibrium states and compressor Boolean values determine the transportation flux. This direct relevance enables the application of data mining and simulation methods [
25], and thermodynamic and physical rules are introduced using the proposed structure.
The compositional distribution of the transported natural gas in the investigated pipeline in this paper and the corresponding thermodynamic properties of each component are listed in
Table 1. The key thermodynamic properties are selected as the critical temperature
, critical pressure
and acentric factor
, based on thermodynamic analysis, and the mole fraction
is also needed to initialize the problem. It can be seen that methane occupies an absolute majority in the working fluid, while a small amount of impurity alkanes can still be detected. To benefit the physical description and mathematical calculation, hexane and the longer-chain alkanes are combined into one big type and marked as
. As the main components in the air and often generated in petrochemical operations as a by-product, carbon dioxide and nitrogen are also detected in the fluid mixture with a certain content that cannot be neglected in the phase equilibrium calculation. The pipeline operation data in [
15] are adopted in this paper for data feeding CBNN. The average pipeline transportation pressure is 8.917 MPa for the sampled operation data during the period 2017–2020, and 16 compressor stations are taken into account. The deep learning model in TINN is trained using the data in [
20], as the main thermodynamic rules correlating the input features are believed to be the same, and we only change the compositions that still can be modeled by the same model. It should also be pointed out that the general adaptability of the developed TINN has been validated in previous studies, which enables the extension of that network model to this study with a different thermodynamic condition and different compositions.