A method and system for detecting leakage of a hydrogen-mixed natural gas pipeline in a comprehensive pipe gallery

By constructing a CFD simulation model in a hydrogen-blended natural gas pipeline and using a multi-task learning neural network, the problems of low detection accuracy and high cost in existing technologies have been solved, achieving rapid and accurate leak detection.

CN119042546BActive Publication Date: 2025-10-21XI AN JIAOTONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411137530.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-19
Publication Date
2025-10-21
Estimated Expiration
2044-08-19

Smart Images

  • Figure CN119042546B_ABST
    Figure CN119042546B_ABST
Patent Text Reader

Abstract

The application discloses a kind of hydrogen-containing natural gas pipeline leak detection methods in comprehensive pipe gallery, which comprises hydrogen-containing natural gas pipeline by constructing the CFD simulation model of comprehensive pipe gallery- data preprocessing- construct neural network pre-model based on multi-task learning- predict the leak result of hydrogen-containing natural gas pipeline to realize the leak detection of hydrogen-containing natural gas pipeline in comprehensive pipe gallery.The application also discloses a kind of hydrogen-containing natural gas pipeline leak detection systems in comprehensive pipe gallery.The beneficial effects of the technical scheme of the application are: compared with prior art, the application is easier to implement, when applied to actual comprehensive pipe gallery, once hydrogen-containing natural gas pipeline leaks, the leak position and leak rate can be quickly and accurately analyzed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of gas detection, and in particular to a method for detecting leakage of a hydrogen-blended natural gas pipeline. Background Art

[0002] When hydrogen is mixed into the natural gas pipelines within the integrated pipeline corridor, leak detection of the hydrogen-mixed natural gas pipelines within the corridor is very important to ensure the safe operation of the pipelines. For natural gas pipelines within the integrated pipeline corridor, there are two main leak detection methods in the existing technology: one method is to install a pressure sensor inside the pipeline to detect the pressure inside the pipeline in real time. If the pipeline leaks, a negative pressure wave will be generated at the leak location, and the pressure sensor locates the leak point by detecting the negative pressure wave signal. The other method is to install a cable on the outer wall of the pipeline. Once the pipeline leaks, the gas leaked from the pipeline will react with the cable made of special materials. The inspector can accurately locate the leak location based on the changes in the cable, with good detection effect and high detection accuracy.

[0003] When applied to specific gas pipelines, the two aforementioned leak detection methods each have different drawbacks: The method of placing sensors inside the pipeline to detect gas pipeline leaks has low accuracy. For example, if the leak opening is small, the resulting negative pressure wave signal is weak, making it difficult for the pressure sensor to identify it. While the method of placing cables outside the pipeline has higher detection accuracy, the cables themselves are expensive, and once they react with gas escaping from the pipeline, their properties are altered, making them unreusable. Due to the differences in the properties of hydrogen and natural gas, in addition to the aforementioned shortcomings, the applicability of these two natural gas pipeline leak detection methods to hydrogen-blended natural gas pipelines remains to be determined. Therefore, there is an urgent need to design and develop a leak detection method for hydrogen-blended natural gas pipelines within integrated pipeline corridors. Summary of the Invention

[0004] Based on this, it is necessary to provide a fast and convenient leakage detection method to perform full-time leakage detection on hydrogen-blended natural gas pipelines arranged in the integrated pipeline corridor.

[0005] A method for detecting leakage of a hydrogen-doped natural gas pipeline in an integrated pipeline corridor, the method comprising the following steps:

[0006] S1: Construct a CFD (Computational Fluid Dynamics) simulation model of an integrated pipeline corridor containing hydrogen-blended natural gas pipelines, arrange hydrogen concentration sensors and / or methane concentration sensors in the constructed CFD simulation model, and detect changes in hydrogen concentration and / or methane concentration in the integrated pipeline corridor containing hydrogen-blended natural gas pipelines in real time; there are many mature and reliable CFD simulation software in the prior art, and those skilled in the art can select appropriate CFD simulation software to apply to the technical solution provided by the present invention. In specific applications, technical personnel in this field can adopt three methods according to specific circumstances: collecting past real data, replicating the comprehensive pipeline corridor experimental environment in equal proportions, and constructing a CFD simulation model provided by the present invention to obtain data that can truly reflect the changes in hydrogen concentration and / or methane concentration in the comprehensive pipeline corridor and the leakage of hydrogen-blended natural gas pipelines. Obviously, compared with the two methods of collecting past real data and replicating the comprehensive pipeline corridor experimental environment for experiments in equal proportions, the method of obtaining data by constructing a CFD simulation model in the technical solution provided by the present invention is not only quick and convenient, easy to operate, and has low implementation cost, but the amount of data obtained by the CFD simulation model also far exceeds the amount of data obtained by collecting past real data and replicating the comprehensive pipeline corridor experimental environment for experiments in equal proportions. The massive amount of data is also more conducive to the subsequent model training in S2 and S3.

[0007] S2: Preprocessing the hydrogen concentration and / or methane concentration data in the obtained full-scale simulation model of the integrated pipeline corridor to construct it into a data set required by the neural network pre-model based on multi-task learning;

[0008] S3: Construct a neural network pre-model based on multi-task learning, and use the data set to train, verify and test the neural network pre-model based on multi-task learning to obtain a neural network model based on multi-task learning; the neural network pre-model has the characteristics of self-adaptation and self-learning. The hydrogen concentration and / or methane concentration change data of the integrated pipeline corridor containing the hydrogen-blended natural gas pipeline obtained by constructing the CFD simulation model in S1 is input into the neural network pre-model. The neural network pre-model can automatically extract features from the input data without human intervention. During the training process, it automatically learns the general rules between the changes in hydrogen concentration and / or methane concentration in the integrated pipeline corridor model and the corresponding hydrogen-blended natural gas pipeline leakage location and leakage rate, and makes adaptive predictions quickly and accurately.

[0009] S4: Hydrogen concentration sensors and / or methane concentration sensors are arranged in an actual integrated pipeline corridor containing a hydrogen-blended natural gas pipeline, and a neural network model based on multi-task learning is applied to the actual integrated pipeline corridor containing a hydrogen-blended natural gas pipeline. The leakage results of the hydrogen-blended natural gas pipeline are predicted based on the actual hydrogen concentration data and / or methane concentration data. After training, verification, and testing, the neural network pre-model is trained to become a mature neural network model that is familiar with the internal environment of the integrated pipeline corridor, the parameter system inside the hydrogen-blended natural gas pipeline, and the relationship between the methane concentration data or hydrogen concentration data in the hydrogen-blended natural gas pipeline and the pipeline leakage location and pipeline leakage rate. When this mature neural network model is applied to the actual integrated pipeline corridor, it can quickly and accurately make leakage predictions and monitor the operation of the hydrogen-blended natural gas pipeline arranged in the actual integrated pipeline corridor.

[0010] Optionally, the S1 specifically includes:

[0011] S11: Using an actual integrated pipeline corridor containing hydrogen-blended natural gas as a model, a full-scale geometric simulation model of the integrated pipeline corridor containing hydrogen-blended natural gas pipelines was constructed;

[0012] S12: Arranging hydrogen concentration sensors and / or methane concentration sensors in the constructed full-scale geometric simulation model of the integrated pipeline corridor including the hydrogen-blended natural gas pipeline;

[0013] S13: Meshing the constructed full-scale simulation geometric model of the integrated pipeline corridor including the hydrogen-blended natural gas pipeline, and verifying the mesh independence of the full-scale simulation geometric model;

[0014] S14: Select appropriate governing equations and turbulence equations for the constructed full-scale geometric simulation model of the integrated pipeline corridor containing the hydrogen-blended natural gas pipeline, and perform model verification on the simulation model;

[0015] S15: Use a grid-independence-verified and model-validated full-scale geometric simulation model of a comprehensive pipeline corridor containing hydrogen-blended natural gas pipelines to perform CFD model calculations, obtaining simulated data on the time-varying hydrogen and / or methane concentrations within the full-scale geometric simulation model of the comprehensive pipeline corridor containing hydrogen-blended natural gas pipelines. Select appropriate CFD simulation software, construct a full-scale geometric simulation model with the same geometric and physical environment as the actual comprehensive pipeline corridor on the CFD simulation software, and obtain simulation results in the form of software simulation. This method of using CFD simulation to obtain data on the variation of hydrogen and methane concentrations is more feasible, with a larger amount of data obtained, easier parameter adjustment, and more convenient for observing the effects of a single parameter or multiple parameter groups on a specific physical quantity.

[0016] Optionally, S2 is specifically:

[0017] S21: setting a detection lower limit for hydrogen concentration sensors arranged in the constructed full-scale geometric simulation model of the integrated pipeline corridor including the hydrogen-blended natural gas pipeline, and setting the hydrogen concentration data below the detection lower limit to 0; setting a detection lower limit for methane concentration sensors, and setting the methane concentration data below the detection lower limit to 0;

[0018] S22: A hydrogen doping threshold is preset. If the hydrogen doping ratio of the fluid transported in the hydrogen doping pipeline is less than or equal to the hydrogen doping threshold, the methane concentration sensor is adopted, and the simulated data of the methane concentration change over time detected by the methane concentration sensor during the simulation process is used as input data. If the hydrogen doping ratio of the fluid transported in the hydrogen doping pipeline is greater than the hydrogen doping threshold, the hydrogen concentration sensor is adopted, and the simulated data of the hydrogen concentration change over time detected by the hydrogen concentration sensor during the simulation process is used as input data.

[0019] S23: The leakage location and leakage rate of the hydrogen-blended natural gas pipeline in the integrated pipeline corridor simulation model are used as output data;

[0020] S24: Construct a data set by aligning input data with output data one by one in time sequence, randomly shuffle the data in the data set, and randomly divide the data set into a training set, a validation set, and a test set according to a certain ratio.

[0021] Optionally, S3 specifically includes the following sub-steps:

[0022] S3 specifically includes the following sub-steps:

[0023] S31: Construct a neural network pre-model based on a multi-task learning method with hard parameter sharing. The neural network pre-model includes shared layers and task-specific layers.

[0024] S32: Normalize the training set, validation set, and test set;

[0025] S33: Use the normalized training set to train the neural network pre-model, and use the normalized validation set to verify the training results of the neural network pre-model to change the hyperparameters in the neural network pre-model, and use the loss curve graph to evaluate the degree of fit of the neural network pre-model to the input data and / or output data; use the normalized test set to test the verified neural network pre-model, and identify the neural network pre-model that finally passes the test as a mature neural network model.

[0026] Optionally, the shared layer includes at least one layer of long short-term memory network, each layer of the long short-term memory network includes one or more long short-term memory units with forgetting and memory functions, and each of the long short-term memory units satisfies:

[0027] f t =σ(Wf ·[h t-1 ,x t ]+b f )

[0028] i t =σ(W i ·[h t-1 ,x t ]+b i )

[0029] g t =tanh(W g ·[h t-1 ,x t ]+b g )

[0030] o t =σ(W o ·[h t-1 ,x t ]+b o )

[0031] S t =g t ·i t +S t-1 ·f t

[0032] h t =tanh(S t )·o t

[0033] Where σ represents the change of sigmoid function; f t is the output signal of the forget gate; i t is the output signal of the input gate; g t is the input node state; o t is the output signal of the output gate; x t is the current input; S t-1 、S t are the hidden layer states at time t-1 and t respectively; h t-1 、h t are the long-term memory states at time t-1 and t respectively; W f ,W i ,W g ,W o are the weight matrices of the forget gate, input gate, input node, and output gate, respectively. b f ,b i ,b g ,b oare the corresponding bias matrices. The Long Short-Term Memory (LSTM) is a special recurrent neural network (RNN) designed specifically for processing and predicting time-based sequence data. Through design improvements, it introduces a gating mechanism to address the vanishing and exploding gradient problems that are common in traditional RNNs when processing long sequence data. The shared layer is constructed using the LSTM. Through cell states and gating mechanisms, the shared layer can better capture long-term dependencies in sequence data. When analyzing specific methane and hydrogen concentration data in the input data, it can retain more distant contextual information and learn patterns and features in the time-varying hydrogen and / or methane concentration data with strong time sensitivity.

[0034] Optionally, the specific task layer has two independent output tasks: predicting the leakage location and predicting the leakage rate; the specific task layer is constructed with a fully connected network, at least two fully connected layers are set in the specific task layer, each of the fully connected layers is set with multiple neurons, and each neuron in each of the fully connected layers is connected to one of the neurons in the next fully connected layer.

[0035] Optionally, when normalizing the training set, validation set, and test set, process the data according to the following formula:

[0036]

[0037] Where x is the original data, x' is the normalized data, min(x) is the minimum value in the data set, and max(x) is the maximum value in the data set.

[0038] Optionally, the S4 specifically includes the following sub-steps:

[0039] S41: disposing a hydrogen concentration sensor and / or a methane concentration sensor in an actual integrated pipeline corridor including a hydrogen-blended natural gas pipeline, wherein the hydrogen concentration sensor collects actual data of hydrogen concentration in the integrated pipeline corridor in real time, and the methane concentration sensor collects actual data of methane concentration in the integrated pipeline corridor in real time;

[0040] S42: Inputting the actual hydrogen concentration data and / or the actual methane concentration data as input data into a mature neural network model, and the mature neural network model obtains output data based on analysis of the input data;

[0041] S43: Denormalize the output data obtained by the mature neural network model to obtain the predicted results of the leakage location and leakage rate in the hydrogen-blended natural gas pipeline arranged in the actual integrated pipeline corridor. The present invention also provides a hydrogen-blended natural gas pipeline leakage detection system in the integrated pipeline corridor. The system is based on the hydrogen-blended natural gas pipeline leakage detection method in the integrated pipeline corridor as described above, and the system includes:

[0042] Sampling module: used to collect hydrogen concentration data and / or methane concentration data in the integrated pipeline corridor including hydrogen-blended natural gas pipelines;

[0043] And, the leakage analysis module is used to give prediction results on whether there is a leak, the leak location and the leak rate based on the hydrogen concentration data and / or methane concentration data in the integrated pipeline corridor.

[0044] Optionally, the leakage analysis module includes a long short-term memory network layer and a fully connected network layer, wherein the long short-term memory network layer is arranged before the fully connected network layer, and parameters are shared in the long short-term memory network layer in a hard parameter sharing manner.

[0045] The beneficial effects of the technical solution of the present invention are: compared with the existing technology, the present application is easier to implement. When applied to an actual integrated pipeline corridor, once a leak occurs in the hydrogen-blended natural gas pipeline, the leak location and leakage results can be quickly and accurately analyzed. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying any creative work.

[0047] Figure 1 In S11 of the method for detecting leakage of hydrogen-blended natural gas pipelines in an integrated pipeline corridor provided in a specific embodiment, a full-scale simulation geometric model is constructed using CFD simulation software.

[0048] Figure 2 This is a schematic diagram of arranging methane concentration sensors in a full-scale simulation geometric model in S12 of the method for detecting leakage of hydrogen-blended natural gas pipelines in an integrated pipeline gallery provided in a specific embodiment.

[0049] Figure 3 This is a schematic diagram of the model architecture of the neural network pre-model established in the method for detecting leakage of hydrogen-blended natural gas pipelines in an integrated pipeline gallery provided in a specific embodiment.

[0050] Figure 4The figure is a structural diagram of one of the LSTM units included in the shared layer in the neural network pre-model established in the method for detecting leakage of hydrogen-blended natural gas pipelines in an integrated pipeline gallery provided in a specific embodiment.

[0051] Figure 5 This is a schematic diagram of the network structure of the fully connected network in the neural network pre-model established in the method for detecting leakage of hydrogen-blended natural gas pipelines in an integrated pipeline gallery provided in a specific embodiment.

[0052] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION

[0053] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0054] It should be noted that all directional indications in the embodiments of the present invention (such as up, down, left, right, front, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the various components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0055] In addition, the descriptions of "first", "second", etc. in the present invention are only for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, "and / or" in the full text includes three solutions. Taking A and / or B as an example, it includes technical solution A, technical solution B, and technical solution that satisfies both A and B. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0056] refer to Figure 1-5 .

[0057] In this specific embodiment, a method for detecting leakage of a hydrogen-blended natural gas pipeline in an integrated pipeline corridor is provided, the method comprising the following steps:

[0058] S1: Construct a CFD simulation model of a comprehensive pipeline corridor containing hydrogen-blended natural gas pipelines, arrange hydrogen concentration sensors and / or methane concentration sensors in the constructed CFD simulation model, and detect changes in hydrogen concentration and / or methane concentration in the comprehensive pipeline corridor containing hydrogen-blended natural gas pipelines in real time;

[0059] S2: Preprocessing the hydrogen concentration and / or methane concentration data in the obtained full-scale simulation model of the integrated pipeline corridor to construct it into a data set required by the neural network pre-model based on multi-task learning;

[0060] S3: Construct a neural network pre-model based on multi-task learning, and use the dataset to train, verify, and test the neural network pre-model based on multi-task learning to obtain a neural network model based on multi-task learning;

[0061] S4: Hydrogen concentration sensors and / or methane concentration sensors are arranged in the actual integrated pipeline corridor containing hydrogen-blended natural gas pipelines, and the neural network model based on multi-task learning is applied to the actual integrated pipeline corridor containing hydrogen-blended natural gas pipelines, and the leakage results of the hydrogen-blended natural gas pipelines are predicted based on the actual hydrogen concentration data and / or methane concentration data.

[0062] In this specific embodiment, the method for detecting leakage of hydrogen-blended natural gas pipelines in the integrated pipeline gallery specifically includes the following steps:

[0063] S11: Taking an actual integrated pipeline corridor containing hydrogen-blended natural gas as a model, a full-scale geometric simulation model of the integrated pipeline corridor containing hydrogen-blended natural gas pipelines is constructed; in this specific embodiment, a three-dimensional geometric model with a length of 200m, a width of 2m, and a height of 3.8m is established to simulate the actual integrated pipeline corridor, and two ventilation holes are constructed at both ends of the three-dimensional geometric model, namely the air outlet 11 and the air inlet 12, and a pipeline is constructed inside the integrated pipeline corridor to simulate the hydrogen-blended natural gas pipeline 2 in the integrated pipeline corridor.

[0064] S12: Hydrogen concentration sensors and / or methane concentration sensors are arranged in the constructed full-scale geometric simulation model of the integrated pipeline corridor containing the hydrogen-blended natural gas pipeline. Methane concentration sensors 3 are evenly arranged along the length of the integrated pipeline corridor at intervals of 10 m in the three-dimensional geometric model constructed in S11, i.e., a total of 21 methane concentration sensors 3 are arranged in the three-dimensional geometric model. All methane concentration sensors 3 are positioned at a height of 3.6 m above the ground in the three-dimensional geometric model.

[0065] S13: Meshing the constructed full-scale simulation geometric model of the integrated pipeline corridor including the hydrogen-blended natural gas pipeline, and verifying the mesh independence of the full-scale simulation geometric model; selecting a meshing scheme that takes into account both computational efficiency and computational progress to facilitate subsequent CFD simulation calculations using the full-scale simulation geometric model of the integrated pipeline corridor including the hydrogen-blended natural gas pipeline;

[0066] S14: Select appropriate control equations and turbulence equations for the constructed full-scale geometric simulation model of the integrated pipeline corridor including the hydrogen-blended natural gas pipeline, and perform model verification on the simulation model; after adding the control equations and turbulence equations on the basis of the established three-dimensional geometric model, the full-scale simulation geometric model can be verified using previous reliable experimental data to ensure that the parameter environment of the simulation model fully fits the actual integrated pipeline corridor and that the error between the calculation results of the simulation model and previous experimental data is within an acceptable range.

[0067] S15: Use the full-scale geometric simulation model of the integrated pipeline corridor containing the hydrogen-blended natural gas pipeline that has undergone grid independence verification and model verification to perform CFD model calculations to obtain simulation data of the hydrogen concentration and / or methane concentration changing over time in the full-scale geometric simulation model of the integrated pipeline corridor containing the hydrogen-blended natural gas pipeline.

[0068] In this specific embodiment, S2 includes the following sub-steps:

[0069] S21: Set the detection limit of hydrogen concentration sensors arranged in the full-scale geometric simulation model of the integrated pipeline corridor containing hydrogen-blended natural gas pipelines to 10 -6 g / m 3 , the hydrogen concentration data below the detection limit is set to 0, and the methane concentration sensor sets the detection limit to 10 -6 g / m 3 , the methane concentration data below the detection limit is set to 0;

[0070] S22: Preset a hydrogen doping threshold of 50%. If the hydrogen doping ratio of the fluid transported in the hydrogen doping pipeline is less than or equal to 50%, the methane concentration sensor is used as the input data, and the simulated data of the methane concentration change over time detected by the methane concentration sensor during the simulation process is used as input data. If the hydrogen doping ratio of the fluid transported in the hydrogen doping pipeline is greater than 50%, the hydrogen concentration sensor is used as the input data, and the simulated data of the hydrogen concentration change over time detected by the hydrogen concentration sensor during the simulation process is used as input data.

[0071] S23: The leakage location and leakage rate of the hydrogen-blended natural gas pipeline in the integrated pipeline corridor simulation model are used as output data;

[0072] S24: During the initial simulation, a leak was constructed 100 meters into the hydrogen-blended natural gas pipeline. The leak location was set directly above the pipeline. A single CFD model run was set to a total duration of 180 seconds, and the data acquisition frequency for the hydrogen and / or methane concentration sensors was set to 1 second. This means that during a single CFD model run, each of the 21 sensors installed in the utility corridor will collect 180 valid data points. During subsequent CFD model runs, the CFD simulation software can be used to alter the leak location and rate of the hydrogen-blended natural gas pipeline within the full-scale simulation geometry of the utility corridor to represent different operating conditions. The temporal changes in the hydrogen and methane concentrations of each sensor under each operating condition are then mapped to the corresponding leak location and rate. A time series of 10 seconds, with data from the 21 sensors every 10 seconds, was selected as input data, and the corresponding leak locations and rates were used as output data. Pairs of input and output data were randomly shuffled and randomly divided into training, validation, and test sets according to a specific ratio.

[0073] In this specific implementation, S3 specifically includes the following steps:

[0074] S31: Construct a neural network pre-model based on a multi-task learning method with hard parameter sharing, wherein the neural network pre-model comprises a shared layer and a specific task layer; the shared layer comprises at least one layer of long short-term memory network, each layer of the long short-term memory network comprises one or more long short-term memory units with forgetting and memory functions, and in a single LSTM unit, σ represents the change of the sigmoid function. t is the output signal of the forget gate. t is the output signal of the input gate. g t is the input node status. t is the output signal of the output gate. t is the current input. t-1 、S t are the hidden layer states at time t-1 and t respectively. t-1 、h t are the long-term memory states at time t-1 and t respectively, and the data are calculated using the following formula:

[0075] f t =σ(W f ·[h t-1 ,x t ]+b f )

[0076] i t =σ(W i ·[h t-1 ,x t ]+b i )

[0077] g t =tanh(W g ·[h t-1 ,x t ]+b g )

[0078] o t =σ(W o ·[h t-1 ,x t ]+b o )

[0079] S t =g t ·i t +S t-1 ·f t

[0080] h t =tanh(S t )·o t

[0081] Where σ represents the change of sigmoid function; f t is the output signal of the forget gate; i t is the output signal of the input gate; g t is the input node state; o t is the output signal of the output gate; x t is the current input; S t-1 、S t are the hidden layer states at time t-1 and t respectively; h t-1 、h t are the long-term memory states at time t-1 and t respectively; W f ,W i ,W g ,W o are the weight matrices of the forget gate, input gate, input node, and output gate, respectively. f ,b i ,b g ,b oare the corresponding bias matrices respectively. The specific task layer has two independent output tasks, namely, predicting the leakage location and predicting the leakage rate; the specific task layer is constructed with a fully connected network, and at least two fully connected layers are set in the specific task layer, and each of the fully connected layers is provided with multiple neurons, and each neuron in each of the fully connected layers is connected to one of the neurons in the next fully connected layer. The fully connected network is a multi-layer structure, and each layer has multiple neurons, and each neuron in each layer is connected to one of the neurons in the next layer. The fully connected network usually includes an input layer, a hidden layer, and an output layer. Assume that the input of the i-th neuron is x1, x2, ..., x n , weights are w1, w2, ..., w n , the bias is b, the activation function is f, then the output y of the neuron is i It can be expressed as:

[0082]

[0083] S32: Normalize the training set, validation set, and test set. In this specific embodiment, the minimum-maximum normalization is used to linearly map each data to the range of [0, 1] according to the following formula:

[0084]

[0085] Where x is the original data, x' is the normalized data, min(x) is the minimum value in the data set, and max(x) is the maximum value in the data set;

[0086] S33: Use the normalized training set to train the neural network pre-model, and use the normalized validation set to verify the training results of the neural network pre-model to change the hyperparameters in the neural network pre-model, and use the loss curve graph to evaluate the degree of fit of the neural network pre-model to the input data and / or output data; use the normalized test set to test the verified neural network pre-model, and identify the neural network pre-model that finally passes the test as a mature neural network model.

[0087] In this specific implementation, S4 specifically includes the following steps:

[0088] S41: disposing a hydrogen concentration sensor and / or a methane concentration sensor in an actual integrated pipeline corridor including a hydrogen-blended natural gas pipeline, wherein the hydrogen concentration sensor collects actual data of hydrogen concentration in the integrated pipeline corridor in real time, and the methane concentration sensor collects actual data of methane concentration in the integrated pipeline corridor in real time;

[0089] S42: Inputting the actual hydrogen concentration data and / or the actual methane concentration data as input data into a mature neural network model, and the mature neural network model obtains output data based on analysis of the input data;

[0090] S43: Denormalize the output data obtained by the mature neural network model to obtain the prediction results of the leakage location and leakage rate of the hydrogen-blended natural gas pipeline arranged in the actual integrated pipeline corridor. The denormalization restores the normalized data to the range of the original data. The calculation formula is:

[0091] x=x′·(max(x)-min(x))+min(x)

[0092] Where x' is the normalized data, x is the data restored to its original range, min(x) is the minimum value in the data set, and max(x) is the maximum value in the data set.

[0093] In this specific embodiment, a system for detecting leakage of a hydrogen-blended natural gas pipeline in an integrated pipe gallery is further provided. The system is based on the above-mentioned method for detecting leakage of a hydrogen-blended natural gas pipeline in an integrated pipe gallery, and the system comprises:

[0094] Sampling module: used to collect hydrogen concentration data and / or methane concentration data in the integrated pipeline corridor including hydrogen-blended natural gas pipelines;

[0095] And, the leakage analysis module is used to give prediction results on whether there is a leak, the leak location and the leak rate based on the hydrogen concentration data and / or methane concentration data in the integrated pipeline corridor.

[0096] In this specific embodiment, the leakage analysis module includes a long short-term memory network layer and a fully connected network layer. The long short-term memory network layer is arranged before the fully connected network layer, and the parameters in the long short-term memory network layer are shared in a hard parameter sharing manner.

[0097] The above are only preferred embodiments of the present invention and are not intended to limit the patent scope of the present invention. All equivalent structural transformations made using the contents of the present invention's description and drawings, or direct / indirect applications in other related technical fields, within the scope of the present invention are included in the patent protection scope of the present invention.

Claims

1. A method for detecting leakage of hydrogen-blended natural gas pipelines in a comprehensive pipeline corridor, characterized in that: The method comprises the following steps: S1: Construct a CFD simulation model of a comprehensive pipeline corridor containing hydrogen-blended natural gas pipelines, arrange hydrogen concentration sensors and / or methane concentration sensors in the constructed CFD simulation model, and detect changes in hydrogen concentration and / or methane concentration in the comprehensive pipeline corridor containing hydrogen-blended natural gas pipelines in real time; S2: Preprocessing the hydrogen concentration and / or methane concentration data in the obtained full-scale simulation model of the integrated pipeline corridor to construct it into a data set required by the neural network pre-model based on multi-task learning; S3: Construct a neural network pre-model based on multi-task learning, and use the dataset to train, verify, and test the neural network pre-model based on multi-task learning to obtain a neural network model based on multi-task learning; S4: Deploy hydrogen concentration sensors and / or methane concentration sensors in an actual integrated pipeline corridor containing hydrogen-blended natural gas pipelines, apply a multi-task learning-based neural network model to the actual integrated pipeline corridor containing hydrogen-blended natural gas pipelines, and predict leakage results of the hydrogen-blended natural gas pipelines based on the actual hydrogen concentration data and / or methane concentration data; The S2 is specifically: S21: setting a detection lower limit for hydrogen concentration sensors arranged in the constructed full-scale geometric simulation model of the integrated pipeline corridor including the hydrogen-blended natural gas pipeline, and setting the hydrogen concentration data below the detection lower limit to 0; setting a detection lower limit for methane concentration sensors, and setting the methane concentration data below the detection lower limit to 0; S22: A hydrogen doping threshold is preset. If the hydrogen doping ratio of the fluid transported in the hydrogen doping pipeline is less than or equal to the hydrogen doping threshold, the methane concentration sensor is adopted, and the simulated data of the methane concentration change over time detected by the methane concentration sensor during the simulation process is used as input data. If the hydrogen doping ratio of the fluid transported in the hydrogen doping pipeline is greater than the hydrogen doping threshold, the hydrogen concentration sensor is adopted, and the simulated data of the hydrogen concentration change over time detected by the hydrogen concentration sensor during the simulation process is used as input data. S23: The leakage location and leakage rate of the hydrogen-blended natural gas pipeline in the integrated pipeline corridor simulation model are used as output data; S24: Construct a data set by aligning input data with output data one by one in time sequence, randomly shuffle the data in the data set, and randomly divide the data set into a training set, a validation set, and a test set according to a certain ratio.

2. The method for detecting leakage of hydrogen-blended natural gas pipelines in a comprehensive pipe gallery according to claim 1, characterized in that: The S1 is specifically: S11: Using an actual integrated pipeline corridor containing hydrogen-blended natural gas as a model, a full-scale geometric simulation model of the integrated pipeline corridor containing hydrogen-blended natural gas pipelines was constructed; S12: Arranging hydrogen concentration sensors and / or methane concentration sensors in the constructed full-scale geometric simulation model of the integrated pipeline corridor including the hydrogen-blended natural gas pipeline; S13: Meshing the constructed full-scale simulation geometric model of the integrated pipeline corridor including the hydrogen-blended natural gas pipeline, and verifying the mesh independence of the full-scale simulation geometric model; S14: Select appropriate governing equations and turbulence equations for the constructed full-scale geometric simulation model of the integrated pipeline corridor containing the hydrogen-blended natural gas pipeline, and perform model verification on the simulation model; S15: Use the full-scale geometric simulation model of the integrated pipeline corridor containing the hydrogen-blended natural gas pipeline that has undergone grid independence verification and model verification to perform CFD model calculations to obtain simulation data of the hydrogen concentration and / or methane concentration changing over time in the full-scale geometric simulation model of the integrated pipeline corridor containing the hydrogen-blended natural gas pipeline.

3. The method for detecting leakage of hydrogen-blended natural gas pipelines in a comprehensive pipe gallery according to claim 2, characterized in that: The S3 specifically includes the following sub-steps: S31: Construct a neural network pre-model based on a multi-task learning method with hard parameter sharing. The neural network pre-model includes shared layers and task-specific layers. S32: Normalize the training set, validation set, and test set; S33: Use the normalized training set to train the neural network pre-model, and use the normalized validation set to verify the training results of the neural network pre-model to change the hyperparameters in the neural network pre-model, and use the loss curve graph to evaluate the degree of fit of the neural network pre-model to the input data and / or output data; use the normalized test set to test the verified neural network pre-model, and identify the neural network pre-model that finally passes the test as a mature neural network model.

4. The method for detecting leakage of hydrogen-blended natural gas pipelines in a comprehensive pipe gallery according to claim 3, characterized in that: The shared layer includes at least one layer of long short-term memory network, each layer of the long short-term memory network includes one or more long short-term memory units with forgetting and memory functions, and each of the long short-term memory units satisfies: f t =σ(W f ·[h t-1 ,x t ]+b f ) i t =σ(W i ·[h t-1 ,x t ]+b i ) g t =tanh(W g ·[h t-1 ,x t ]+b g ) the t =σ(W o ·[h t-1 ,x t ]+b o ) S t =g t ·i t +S t-1 ·f t h t =tanh(S t )·o t Where σ represents the change of sigmoid function; f t is the output signal of the forget gate; i t is the output signal of the input gate; g t is the input node state; o t is the output signal of the output gate; x t is the current input; S t-1 、S t are the hidden layer states at time t-1 and t respectively; h t-1 、h t are the long-term memory states at time t-1 and t respectively; W f ,W i ,W g ,W o are the weight matrices of the forget gate, input gate, input node, and output gate respectively; b f ,b i ,b g ,b o are the corresponding bias matrices respectively.

5. The method for detecting leakage of hydrogen-blended natural gas pipelines in a comprehensive pipe gallery according to claim 4, characterized in that: The specific task layer has two independent output tasks, namely, predicting leakage location and predicting leakage rate; the specific task layer is constructed with a fully connected network, and at least two fully connected layers are set in the specific task layer, each of the fully connected layers is set with multiple neurons, and each neuron in each of the fully connected layers is connected to one of the neurons in the next fully connected layer.

6. The method for detecting leakage of hydrogen-blended natural gas pipelines in a comprehensive pipe gallery according to claim 4, characterized in that: When normalizing the training set, validation set, and test set, the data is processed according to the following formula: Where x is the original data, x' is the normalized data, min(x) is the minimum value in the data set, and max(x) is the maximum value in the data set.

7. The method for detecting leakage of hydrogen-blended natural gas pipelines in a comprehensive pipe gallery according to claim 6, characterized in that: The S4 specifically includes the following sub-steps: S41: disposing a hydrogen concentration sensor and / or a methane concentration sensor in an actual integrated pipeline corridor including a hydrogen-blended natural gas pipeline, wherein the hydrogen concentration sensor collects actual data of hydrogen concentration in the integrated pipeline corridor in real time, and the methane concentration sensor collects actual data of methane concentration in the integrated pipeline corridor in real time; S42: Inputting the actual hydrogen concentration data and / or the actual methane concentration data as input data into a mature neural network model, and the mature neural network model obtains output data based on analysis of the input data; S43: Denormalize the output data obtained by the mature neural network model to obtain the prediction results of the leakage location and leakage rate in the hydrogen-blended natural gas pipeline arranged in the actual integrated pipeline corridor.

8. A system for detecting leakage of hydrogen-blended natural gas pipelines in an integrated pipe gallery, the system being based on the method for detecting leakage of hydrogen-blended natural gas pipelines in an integrated pipe gallery according to any one of claims 1 to 7, characterized in that: The system includes: Sampling module: used to collect hydrogen concentration data and / or methane concentration data in the integrated pipeline corridor including hydrogen-blended natural gas pipelines; And, the leakage analysis module is used to provide prediction results on whether there is a leak, the leak location and the leak rate based on the hydrogen concentration data and / or methane concentration data in the integrated pipeline corridor.

9. The hydrogen-blended natural gas pipeline leakage detection system in the integrated pipeline corridor according to claim 8, characterized in that: The leakage analysis module includes a long short-term memory network layer and a fully connected network layer. The long short-term memory network layer is arranged before the fully connected network layer. The parameters in the long short-term memory network layer are shared in a hard parameter sharing manner.

Citation Information

Patent Citations

  • Method and system for regulating and controlling hydrogen doping proportion of natural gas pipeline

    CN117231933A

  • Numerical calculation and hazard assessment method for leakage and explosion of hydrogen-doped natural gas

    CN118211354A