Method and system for detecting leakage of hydrogen-doped natural gas pipeline in comprehensive pipe gallery
Through the CFD simulation model and multi-task learning neural network model, the problems of low accuracy and high cost of leakage detection in hydrogen-doped natural gas pipelines are solved, and fast and accurate leakage detection is achieved, which improves detection efficiency and accuracy.
Patent Information
- Application Number
- CN202411137530.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-11-29
- Estimated Expiration
- 2044-08-19
AI Technical Summary
The existing natural gas pipeline leakage detection methods have problems of low accuracy and high cost in hydrogen-doped natural gas pipelines, especially when small leakage signals are difficult to identify when detected by internal sensors of the pipeline, and external cables cannot be reused after detection.
Using computational fluid dynamics (CFD) simulation model and a neural network model based on multi-task learning, we construct hydrogen and methane concentration sensors, obtain data through the CFD simulation model, train neural network models to identify changes in hydrogen and methane concentration, and realize the doping of hydrogen Fast and accurate detection of natural gas pipeline leakage.
The full-time leakage detection of hydrogen-doped natural gas pipelines is realized, which improves detection accuracy and efficiency, reduces costs, and can quickly and accurately analyze the leakage location and leakage rate.
Smart Images

Figure CN119042546A_ABST
Abstract
Description
Technical Field
[0001] The 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 pipeline in the integrated pipeline corridor, in order to ensure the safe operation of the pipeline, the leakage detection of the hydrogen-mixed natural gas pipeline in the pipeline corridor is very important. For the natural gas pipeline inside the integrated pipeline corridor, there are two main leakage detection methods in the prior art: 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 leakage position, and the pressure sensor locates the leakage point by detecting the negative pressure wave signal. Another 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 detection personnel can accurately locate the leakage position according to the changes in the cable, and the detection effect is good and the detection accuracy is high.
[0003] When the above two leakage detection methods are applied to specific gas pipelines, they have different defects: the method of arranging sensors inside the pipeline to detect gas pipeline leaks has low accuracy. For example, if the leak port is small, the negative pressure wave signal generated is weak, and it is difficult for the pressure sensor to identify it; and the method of arranging cables outside the pipeline has high detection accuracy, but due to the high cost of the cables themselves, once they react with the gas escaping from the pipeline, the properties of the cables are changed and cannot be reused. Due to the difference between the properties of hydrogen and natural gas, in addition to the above shortcomings, whether the above two natural gas pipeline leakage detection methods are applicable to hydrogen-blended natural gas pipelines remains to be discussed. Therefore, it is urgent to design and develop a leakage detection method for hydrogen-blended natural gas pipelines in 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 the hydrogen-blended natural gas pipelines arranged in the integrated pipeline gallery.
[0005] A method for detecting leakage of a hydrogen-blended natural gas pipeline in an integrated pipeline gallery, the method comprising the following steps:
[0006] S1: Construct a CFD (Computational Fluid Dynamics) simulation model of an integrated pipeline corridor including a hydrogen-blended natural gas pipeline, arrange hydrogen concentration sensors and / or methane concentration sensors in the constructed CFD simulation model, and detect the changes in hydrogen concentration and / or methane concentration in the integrated pipeline corridor including the hydrogen-blended natural gas pipeline 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 in 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 the hydrogen-blended natural gas pipeline. 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 scheme provided in 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 gallery, and constructing 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, use the data set to train, verify and test the neural network pre-model based on multi-task learning, and 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 manual 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 leakage location and leakage rate of the hydrogen-blended natural gas pipeline, and makes adaptive predictions quickly and accurately.
[0009] 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. 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 the 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 is specifically:
[0011] S11: Taking the 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;
[0012] S12: Arranging a hydrogen concentration sensor and / or a methane concentration sensor in the constructed full-scale geometric simulation model of the integrated pipeline gallery including the hydrogen-blended natural gas pipeline;
[0013] S13: Meshing the constructed full-scale simulation geometric model of the integrated pipeline gallery including the hydrogen-blended natural gas pipeline, and verifying the mesh independence of the full-scale simulation geometric model;
[0014] S14: Select appropriate control equations and turbulence equations for the constructed full-scale geometric simulation model of the integrated pipeline gallery including the hydrogen-blended natural gas pipeline, and perform model verification on the simulation model;
[0015] S15: Use the full-scale geometric simulation model of the integrated pipeline corridor containing the hydrogen-blended natural gas pipeline that has been verified for grid independence and model verification to perform CFD model calculations, and obtain simulation data of the change of hydrogen concentration and / or methane concentration over time in the full-scale geometric simulation model of the integrated pipeline corridor containing the hydrogen-blended natural gas pipeline. Select appropriate CFD simulation software, and construct a full-scale geometric simulation model with the same geometric environment and physical environment as the actual integrated pipeline corridor on the CFD simulation software to obtain simulation results in the form of software simulation. The method of using the above CFD simulation to obtain hydrogen concentration and methane concentration change data is more feasible, the amount of data obtained is larger, the parameter adjustment is easier, and it is more convenient to observe the influence of a single parameter or multiple parameter groups on a certain physical quantity.
[0016] Optionally, S2 is specifically:
[0017] S21: setting a detection lower limit for a hydrogen concentration sensor arranged in the constructed full-scale geometric simulation model of the integrated pipeline gallery 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 a methane concentration sensor, and setting the methane concentration data below the detection lower limit to 0;
[0018] S22: presetting a hydrogen addition threshold value, if the hydrogen addition ratio of the fluid transported in the hydrogen addition pipeline is less than or equal to the hydrogen addition threshold value, 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 addition ratio of the fluid transported in the hydrogen addition pipeline is greater than the hydrogen addition threshold value, 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: taking the leakage position and leakage rate of the hydrogen-blended natural gas pipeline in the integrated pipe gallery simulation model as output data;
[0020] S24: Construct a data set by arranging the input data and the 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, where the neural network pre-model includes a shared layer and a specific task layer;
[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 forgettable 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. f ,b i ,b g ,b oare the corresponding bias matrices respectively. Long Short-Term Memory (LSTM) is a special recurrent neural network (RNN) that is specifically used to process and predict time-based sequence data. Through design improvements, it introduces a gating mechanism to solve the gradient vanishing and gradient exploding problems that are prone to occur in traditional RNNs when processing long sequence data. The shared layer is constructed with a long short-term memory network. The shared layer can better capture the long-term dependencies in the sequence data through cell states and gating mechanisms. In the process of analyzing the specific methane concentration data and hydrogen concentration data in the input data, it can retain distant contextual information and learn the patterns and features in the hydrogen concentration and / or methane concentration data that change over time with strong time sensitivity.
[0034] Optionally, 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, at least two fully connected layers are arranged in the specific task layer, a plurality of neurons are arranged in each of the fully connected layers, 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, the data is processed according to the following formula:
[0036]
[0037] Among them, 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: Arranging a hydrogen concentration sensor and / or a methane concentration sensor in the actual integrated pipe gallery including the hydrogen-blended natural gas pipeline, and using the hydrogen concentration sensor to collect the actual data of the hydrogen concentration in the integrated pipe gallery in real time, and using the methane concentration sensor to collect the actual data of the methane concentration in the integrated pipe gallery in real time;
[0040] S42: inputting the actual data of hydrogen concentration and / or the actual data of methane concentration as input data into a mature neural network model, and the mature neural network model obtains output data according to the analysis of the input data;
[0041] S43: Denormalize the output data obtained by the mature neural network model to obtain the prediction results of the leakage position 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 an integrated pipeline corridor, which is based on the hydrogen-blended natural gas pipeline leakage detection method in an integrated pipeline corridor as described above, and the system comprises:
[0042] Sampling module: used to collect hydrogen concentration data and / or methane concentration data in the integrated pipeline gallery including hydrogen-blended natural gas pipelines;
[0043] And, the leakage analysis module is used to give prediction results on whether there is a leakage, the leakage location and the leakage 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 effect of the technical solution of the present invention is that compared with the prior art, the present application is easier to implement, and when applied to an actual integrated pipeline gallery, once a leak occurs in the hydrogen-blended natural gas pipeline, the leak location and leak 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 drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 creative work.
[0047] Figure 1 In S11 of the hydrogen-blended natural gas pipeline leakage detection method in the integrated pipeline gallery provided in the specific embodiment, a full-scale simulation geometric model is constructed using CFD simulation software.
[0048] Figure 2 It 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 It 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 present invention is a schematic diagram of the structure of one of the LSTM units contained 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 It 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 realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0053] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are 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 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 used 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 it must be based on the ability of ordinary technicians in this field to implement. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such 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 gallery is provided, and the method comprises the following steps:
[0058] S1: construct a CFD simulation model of an integrated pipeline corridor including a hydrogen-blended natural gas pipeline, arrange a hydrogen concentration sensor and / or a methane concentration sensor in the constructed CFD simulation model, and detect changes in hydrogen concentration and / or methane concentration in the integrated pipeline corridor including the hydrogen-blended natural gas pipeline 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 gallery, and constructing 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, use the data set to train, verify and test the neural network pre-model based on multi-task learning, and obtain a neural network model based on multi-task learning;
[0061] S4: Arrange hydrogen concentration sensors and / or methane concentration sensors in an actual integrated pipeline corridor containing hydrogen-blended natural gas pipelines, apply a neural network model based on multi-task learning 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 actual hydrogen concentration data and / or methane concentration data.
[0062] In this specific embodiment, the method for detecting leakage of hydrogen-blended natural gas pipeline in the integrated pipeline gallery specifically includes the following steps:
[0063] S11: Taking the actual integrated pipeline corridor containing hydrogen-blended natural gas as a template, a full-size 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: Arrange hydrogen concentration sensors and / or methane concentration sensors in the constructed full-scale geometric simulation model of the integrated pipe gallery containing the hydrogen-blended natural gas pipeline; evenly arrange methane concentration sensors 3 at intervals of 10 m along the length direction of the integrated pipe gallery in the three-dimensional geometric model constructed in S11, that is, a total of 21 methane concentration sensors 3 are arranged in the three-dimensional geometric model. The methane concentration sensors 3 are all arranged at a height of 3.6 m from the ground in the three-dimensional geometric model.
[0065] S13: Meshing the constructed full-scale simulation geometric model of the integrated pipeline gallery 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 both computational efficiency and computational progress into consideration to facilitate subsequent CFD simulation calculations using the full-scale simulation geometric model of the integrated pipeline gallery 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 gallery including the hydrogen-blended natural gas pipeline that has been verified for grid independence and model verification to perform CFD model calculations to obtain simulation data of the change of hydrogen concentration and / or methane concentration over time in the full-scale geometric simulation model of the integrated pipeline gallery including the hydrogen-blended natural gas pipeline.
[0068] In this specific implementation, S2 includes the following sub-steps:
[0069] S21: Set the detection limit of the hydrogen concentration sensor arranged in the full-scale geometric simulation model of the integrated pipeline gallery containing the hydrogen-blended natural gas pipeline 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: presetting the hydrogen blending threshold to 50%. If the hydrogen blending ratio of the fluid transported in the hydrogen blending pipeline is less than or equal to 50%, the methane concentration sensor is adopted, and the simulated data of the methane concentration changing with time detected by the methane concentration sensor during the simulation process is used as input data; if the hydrogen blending ratio of the fluid transported in the hydrogen blending pipeline is greater than 50%, the hydrogen concentration sensor is adopted, and the simulated data of the hydrogen concentration changing with time detected by the hydrogen concentration sensor during the simulation process is used as input data;
[0071] S23: taking the leakage position and leakage rate of the hydrogen-blended natural gas pipeline in the integrated pipe gallery simulation model as output data;
[0072] S24: In the first simulation, a leak is constructed at 100m of the hydrogen-blended natural gas pipeline, the leak position is specified as directly above the pipeline, the total duration of a single CFD model calculation is specified as 180s, and the data acquisition frequency of the hydrogen concentration sensor and / or methane concentration sensor is 1s, that is, in a single CFD model calculation, each of the 21 sensors set in the integrated pipe gallery will collect 180 valid data. In the subsequent CFD model calculation process, the leak position and leak rate of the hydrogen-blended natural gas pipeline in the full-scale simulation geometric model of the integrated pipe gallery can be changed by CFD simulation software to represent different working conditions, and the changes of each hydrogen concentration sensor or methane concentration sensor over time under each working condition are sorted out, and they are respectively matched with the corresponding leak position and leak rate. The time series length is 10s, that is, 21 sensor data every 10s are selected as input data, and the corresponding leak position and leak rate are selected as output data. The paired input data and output data are randomly shuffled and randomly divided into training set, validation set and test set according to a certain proportion.
[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, 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 forgettable and memory functions, and in a single LSTM unit, σ represents the change of sigmoid function. t is the output signal of the forget gate. t is the output signal of the input gate. t Is the input node status. o 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 They 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 position and predicting the leakage rate; the specific task layer is constructed with a fully connected network, and at least two fully connected layers are arranged in the specific task layer, and each of the fully connected layers is arranged 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 implementation, 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: Arranging a hydrogen concentration sensor and / or a methane concentration sensor in the actual integrated pipe gallery including the hydrogen-blended natural gas pipeline, and using the hydrogen concentration sensor to collect the actual data of the hydrogen concentration in the integrated pipe gallery in real time, and using the methane concentration sensor to collect the actual data of the methane concentration in the integrated pipe gallery in real time;
[0089] S42: inputting the actual data of hydrogen concentration and / or the actual data of methane concentration as input data into a mature neural network model, and the mature neural network model obtains output data according to the 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. Denormalization restores the normalized data to the range of the original data, and its calculation formula is:
[0091] x=x′·(max(x)-min(x))+min(x)
[0092] Among them, x' is the normalized data, x is the data restored to the 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 also provided. The system is based on the method for detecting leakage of a hydrogen-blended natural gas pipeline in an integrated pipe gallery as described above. The system comprises:
[0094] Sampling module: used to collect hydrogen concentration data and / or methane concentration data in the integrated pipeline gallery including hydrogen-blended natural gas pipelines;
[0095] And, the leakage analysis module is used to give prediction results on whether there is a leakage, the leakage location and the leakage rate based on the hydrogen concentration data and / or methane concentration data in the integrated pipeline corridor.
[0096] In this specific implementation, 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 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 changes made using the contents of the present invention's specification and drawings, or directly / indirectly applied in other related technical fields, 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 gallery, characterized in that: The method comprises the following steps: S1: construct a CFD simulation model of an integrated pipeline corridor including a hydrogen-blended natural gas pipeline, arrange a hydrogen concentration sensor and / or a methane concentration sensor in the constructed CFD simulation model, and detect changes in hydrogen concentration and / or methane concentration in the integrated pipeline corridor including the hydrogen-blended natural gas pipeline in real time; S2: preprocessing the hydrogen concentration and / or methane concentration data in the obtained full-scale simulation model of the integrated pipeline gallery, and constructing 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, use the data set to train, verify and test the neural network pre-model based on multi-task learning, and obtain a neural network model based on multi-task learning; S4: Arrange hydrogen concentration sensors and / or methane concentration sensors in an actual integrated pipeline corridor containing hydrogen-blended natural gas pipelines, apply a neural network model based on multi-task learning 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 actual hydrogen concentration data and / or methane concentration data.
2. The method for detecting leakage of hydrogen-blended natural gas pipeline in an integrated pipe gallery according to claim 1, characterized in that: The S1 is specifically: S11: Taking the 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; S12: Arranging a hydrogen concentration sensor and / or a methane concentration sensor in the constructed full-scale geometric simulation model of the integrated pipeline gallery including the hydrogen-blended natural gas pipeline; S13: Meshing the constructed full-scale simulation geometric model of the integrated pipeline gallery including the hydrogen-blended natural gas pipeline, and verifying the mesh independence of the full-scale simulation geometric model; S14: Select appropriate control equations and turbulence equations for the constructed full-scale geometric simulation model of the integrated pipeline gallery including 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 gallery including the hydrogen-blended natural gas pipeline that has been verified for grid independence and model verification to perform CFD model calculations to obtain simulation data of the change of hydrogen concentration and / or methane concentration over time in the full-scale geometric simulation model of the integrated pipeline gallery including the hydrogen-blended natural gas pipeline.
3. The method for detecting leakage of hydrogen-blended natural gas pipeline in an integrated pipe gallery according to claim 2, characterized in that: The S2 is specifically: S21: setting a detection lower limit for a hydrogen concentration sensor arranged in the constructed full-scale geometric simulation model of the integrated pipeline gallery 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 a methane concentration sensor, and setting the methane concentration data below the detection lower limit to 0; S22: presetting a hydrogen addition threshold value, if the hydrogen addition ratio of the fluid transported in the hydrogen addition pipeline is less than or equal to the hydrogen addition threshold value, 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 addition ratio of the fluid transported in the hydrogen addition pipeline is greater than the hydrogen addition threshold value, 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: taking the leakage position and leakage rate of the hydrogen-blended natural gas pipeline in the integrated pipe gallery simulation model as output data; S24: Construct a data set by arranging the input data and the 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.
4. The method for detecting leakage of hydrogen-blended natural gas pipeline in an integrated pipe gallery according to claim 3, 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, where the neural network pre-model includes a shared layer and a specific task layer; 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.
5. The method for detecting leakage of hydrogen-blended natural gas pipeline in an integrated pipe gallery according to claim 4, 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 forgettable 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. f ,b i ,b g ,b o are the corresponding bias matrices respectively.
6. The method for detecting leakage of hydrogen-blended natural gas pipeline in an integrated pipe gallery according to claim 5, 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 arranged in the specific task layer, and a plurality of neurons are arranged in each of the fully connected layers, and each neuron in each of the fully connected layers is connected to one of the neurons in the next fully connected layer.
7. The method for detecting leakage of hydrogen-blended natural gas pipeline in an integrated pipe gallery according to claim 5, characterized in that: When normalizing the training set, validation set, and test set, the data is processed according to the following formula: Among them, 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.
8. The method for detecting leakage of hydrogen-blended natural gas pipeline in an integrated pipe gallery according to claim 7, characterized in that: The S4 specifically includes the following sub-steps: S41: Arranging a hydrogen concentration sensor and / or a methane concentration sensor in the actual integrated pipe gallery including the hydrogen-blended natural gas pipeline, and using the hydrogen concentration sensor to collect the actual data of the hydrogen concentration in the integrated pipe gallery in real time, and using the methane concentration sensor to collect the actual data of the methane concentration in the integrated pipe gallery in real time; S42: inputting the actual data of hydrogen concentration and / or the actual data of methane concentration as input data into a mature neural network model, and the mature neural network model obtains output data according to the 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 position and leakage rate in the hydrogen-blended natural gas pipeline arranged in the actual integrated pipeline corridor.
9. A system for detecting leakage of a hydrogen-blended natural gas pipeline in an integrated pipe gallery, the system being based on the method for detecting leakage of a hydrogen-blended natural gas pipeline in an integrated pipe gallery as claimed in any one of claims 1 to 8, characterized in that: The system includes: Sampling module: used to collect hydrogen concentration data and / or methane concentration data in the integrated pipeline gallery including hydrogen-blended natural gas pipelines; And, the leakage analysis module is used to give prediction results on whether there is a leakage, the leakage location and the leakage rate based on the hydrogen concentration data and / or methane concentration data in the integrated pipeline corridor.
10. The hydrogen-blended natural gas pipeline leakage detection system in the integrated pipe gallery according to claim 9, 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
Natural gas transportation pipeline leakage prediction method and application thereof
CN114263855A
Method and system for optimizing structure of hydrogen-doped natural gas mixer based on numerical simulation
CN117195428A
Method and system for regulating and controlling hydrogen doping proportion of natural gas pipeline
CN117231933A
Natural gas pipeline leakage detection method based on machine learning
CN117520989A
Training and predicting method, system and equipment of pipe gallery gas detection model and medium
CN118095073A
Cited By
Method and system for positioning gas pipeline leakage through combination of XGBoost algorithm and negative pressure waves
CN119647273A
Experimental device and method for simulating leakage, vibration and strain monitoring of comprehensive pipe gallery
CN120800672A
Cooling liquid leakage detection method and device based on multi-model fusion and electronic equipment
CN120822178A
Feature-level gas leakage prediction and early warning method based on multi-task neural network
CN120873798A
A feature-level gas leakage prediction and early warning method based on a multi-task neural network
CN120873798B
