CN117520989A - Natural gas pipeline leakage detection method based on machine learning - Google Patents

Natural gas pipeline leakage detection method based on machine learning Download PDF

Info

Publication number
CN117520989A
CN117520989A CN202311528487.6A CN202311528487A CN117520989A CN 117520989 A CN117520989 A CN 117520989A CN 202311528487 A CN202311528487 A CN 202311528487A CN 117520989 A CN117520989 A CN 117520989A
Authority
CN
China
Prior art keywords
natural gas
gas pipeline
data
network
model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311528487.6A
Other languages
Chinese (zh)
Inventor
殷达
束方存
杨成刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Weeg Electronics Co ltd
Original Assignee
Weeg Electronics Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Weeg Electronics Co ltd filed Critical Weeg Electronics Co ltd
Priority to CN202311528487.6A priority Critical patent/CN117520989A/en
Publication of CN117520989A publication Critical patent/CN117520989A/en
Pending legal-status Critical Current

Links

Classifications

    • FMECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
    • F17STORING OR DISTRIBUTING GASES OR LIQUIDS
    • F17DPIPE-LINE SYSTEMS; PIPE-LINES
    • F17D5/00Protection or supervision of installations
    • F17D5/02Preventing, monitoring, or locating loss
    • F17D5/06Preventing, monitoring, or locating loss using electric or acoustic means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/213Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/243Classification techniques relating to the number of classes
    • G06F18/2433Single-class perspective, e.g. one-against-all classification; Novelty detection; Outlier detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • G06N3/0455Auto-encoder networks; Encoder-decoder networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computational Linguistics (AREA)
  • Molecular Biology (AREA)
  • Software Systems (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Mathematical Physics (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • General Health & Medical Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Computing Systems (AREA)
  • Acoustics & Sound (AREA)
  • Mechanical Engineering (AREA)
  • Examining Or Testing Airtightness (AREA)

Abstract

The invention discloses a natural gas pipeline leakage detection method based on machine learning, and belongs to the technical field of pipeline leakage detection; step S1, acquiring parameter configuration of a natural gas pipeline network; s2, calculating pressure data and temperature data of the natural gas in a leakage state and a non-leakage state; step S3, a self-encoder neural network model is built and trained, and performance test is carried out; and S4, deploying an intelligent monitoring device on a node of the natural gas pipeline network, performing field test to obtain a gas leakage detection model to detect whether the natural gas pipeline is leaked, if so, giving an alarm, and if not, performing model iteration through expanding a data set. The beneficial effects of the technical scheme are as follows: the method can comprehensively acquire the marking data, solve the problem of unbalanced data, locate the leakage position in real time, and has high efficiency and accurate location.

Description

Natural gas pipeline leakage detection method based on machine learning
Technical Field
The invention relates to the technical field of pipeline leakage detection, in particular to a natural gas pipeline leakage detection method based on machine learning.
Background
Natural gas leakage detection is a key for ensuring safe and efficient operation of an urban gas supply network, and with rapid development of industrialization and modernization, natural gas is used as a clean and efficient energy source and is widely used in the global scope, however, the transmission and distribution of natural gas mainly depend on a huge pipeline network, so that the natural gas leakage not only can cause waste of resources, but also can cause environmental pollution and safety accidents, and finally causes great loss; therefore, leak detection of natural gas pipeline networks is a complex problem with multiple disciplines, multiple layers and multiple aspects, and development and application of efficient and accurate leak detection technology and method are important subjects in the current industry.
In the prior art, the leakage detection method mainly comprises acoustic detection, thermal imaging, odor detection and the like, and although the methods can realize the positioning and recognition of leakage to a certain extent, the methods have the defects of low accuracy, low reaction speed, complex operation and the like, and have lower efficiency in real-time detection; the leakage prediction model based on big data analysis can monitor the state of a pipeline network in real time, and the possible leakage risk is found in advance, and patent CN110440144B discloses a positioning method based on the amplitude attenuation of pressure signals, provides the capability of processing complex data and detecting non-obvious modes, and can accurately classify leakage and non-leakage working conditions, but the application of the front edge technologies in the field of natural gas pipeline engineering is limited due to the lack of marked data and data imbalance, so that the serious data imbalance problem exists in a data set.
Disclosure of Invention
The invention aims to provide a natural gas pipeline leakage detection method based on machine learning, which solves the technical problems;
a natural gas pipeline leakage detection method based on machine learning comprises the following steps,
step S1, acquiring parameter configuration of a natural gas pipeline network, wherein the parameter configuration comprises three-dimensional coordinates of nodes of the natural gas pipeline network;
step S2, modeling is carried out according to the nodes of the natural gas pipeline network so as to calculate pressure data and temperature data of the natural gas in a leakage state and a non-leakage state;
step S3, a self-encoder neural network model is built and trained according to the pressure data and the temperature data, a trained self-encoder neural network model is obtained, performance test is conducted on the trained self-encoder neural network model, and a tested self-encoder neural network model is obtained;
and S4, deploying an intelligent monitoring device on a node of the natural gas pipeline network, performing field test on the tested self-encoder neural network model to obtain a gas leakage detection model so as to detect whether the natural gas pipeline leaks, if so, giving an alarm, and if not, performing model iteration through expanding a data set.
Preferably, the parameter configuration in step S1 further includes an inner diameter of the natural gas pipeline, a friction coefficient, an inlet position, an outlet position, a valve position, and a pressure regulator position.
Preferably, the inner diameter of the natural gas pipeline is greater than or equal to 50mm, the length of the natural gas pipeline is less than or equal to 100km, and the number of nodes of the natural gas pipeline network is less than or equal to 20.
Preferably, step S2 comprises,
s21, constructing a natural gas pipeline model according to the natural gas pipeline network so as to simulate pipeline air flow;
step S22, coding the natural gas pipeline network through a directed graph to obtain a natural gas network model so as to simulate the natural gas pipeline network;
step S23, constructing a natural gas network calculation model to calculate the pressure data and the temperature data of the natural gas in the leakage state and the non-leakage state.
Preferably, the calculation formula of the duct air flow in step S21 is
Wherein p (x, t) represents the coupling pressure, q (x, t) represents the mass flux, x represents the spatial coordinates in the horizontal direction, t represents the time variable of an equation describing a dynamic or time-varying phenomenon, g represents the standard gravitational acceleration and g=9.80665 m/s 2Represents the partial derivative with respect to time, ">Represents the partial derivative of the space, S represents the cross-sectional area of the pipeline, gamma 0 Indicating the gas state, z 0 Representing the average compression coefficient.
Preferably, the natural gas network model in step S22 has the following formula
Where i denotes the number of the node of the natural gas pipeline network (i=0, 1,2,3, … …), j denotes the pipe section number of the natural gas pipeline (j=0, 1,2,3, … …), epsilon denotes the pipeline, and N denotes the node.
Preferably, the natural gas network calculation model in step S23 has the following calculation formula
Wherein E (θ) represents a parameter quality matrix, A and B represent a parameter independent linear vector field component, respectively, C represents a linear output function, F c Represents a load vector, f (p, q, s p θ) represents a gravity deceleration term, p represents pressure, q represents flow, d q Represents demand node traffic, d p Representing demand node pressure, s q Representing supply node traffic, s p Representing the supply node pressure.
Preferably, the pressure data ranges from 0.5Bar to 5Bar, and the temperature data ranges from-10 ℃ to 50 ℃.
Preferably, in step S4, the intelligent monitoring device transmits the monitored data to an intelligent terminal, where the storage capacity of the intelligent terminal is at least 1TB, and the data processing speed of the intelligent terminal is at least 1000 pieces per second.
Preferably, the intelligent monitoring device in step S4 includes a pressure sensor, a temperature sensor, and a flow sensor.
The beneficial effects of the invention are as follows: due to the adoption of the technical scheme, the marking data can be comprehensively obtained, the problem of unbalanced data is solved, the leakage position is positioned in real time, the efficiency is high, and the positioning is accurate.
Drawings
FIG. 1 is a step diagram of a machine learning based natural gas pipeline leak detection method of the present invention;
FIG. 2 is a schematic diagram of step S2 of the present invention;
FIG. 3 is a full life cycle flow chart of leak detection of the present invention;
FIG. 4 is a schematic view of the natural gas pipeline network structure of the invention;
FIG. 5 is a schematic diagram of a natural gas network computing model of the present invention;
FIG. 6 is a schematic diagram of an automatic encoder neural network architecture of the present invention;
FIG. 7 is a schematic diagram of sensor distribution and leak location for a natural gas network according to the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that, without conflict, the embodiments of the present invention and features of the embodiments may be combined with each other.
The invention is further described below with reference to the drawings and specific examples, which are not intended to be limiting.
A machine learning-based natural gas pipeline leakage detection method, as shown in figures 1-7, comprises,
step S1, acquiring parameter configuration of a natural gas pipeline network, wherein the parameter configuration comprises three-dimensional coordinates of nodes of the natural gas pipeline network;
step S2, modeling is carried out according to nodes of a natural gas pipeline network so as to calculate pressure data and temperature data of natural gas in a leakage state and a non-leakage state;
step S3, a self-encoder neural network model is built and trained according to the pressure data and the temperature data, a trained self-encoder neural network model is obtained, performance test is conducted on the trained self-encoder neural network model, and a tested self-encoder neural network model is obtained;
and S4, deploying an intelligent monitoring device on a node of the natural gas pipeline network, performing field test on the tested self-encoder neural network model to obtain a gas leakage detection model so as to detect whether the natural gas pipeline leaks, if so, giving an alarm, and if not, performing model iteration through expanding a data set.
With the advancement of sensor technology, data analysis and machine learning algorithms in the prior art, a series of innovative approaches to leak detection have emerged in the field, with the internet of things (IoT) technology enabling remote monitoring, greatly improving the efficiency and accuracy of detection, wherein the design and evaluation of any leak detection system needs to contain measurement data sets from real production environments, but gas companies are rarely willing to share their private data, especially those containing leak or other fault signatures; in addition, training a high-performance machine learning model, acquiring balanced data sets including leakage and non-leakage conditions is also required, while a real natural gas pipeline network is in normal use conditions in most of the time, samples in accident leakage conditions are quite rare, and thus data unbalance of the data sets is caused, so how to better acquire marking data and improve the data unbalance to achieve higher detection accuracy and real-time efficiency is a key problem to be solved in the current and future.
The invention provides a natural gas pipeline leakage detection method based on machine learning, which is mainly used for natural gas leakage detection, wherein a natural gas pipeline network is a medium-low pressure natural gas pipeline network in a city, the limitations of difficulty in acquiring marked data and unbalance data in the traditional leakage detection technology are overcome, a machine learning model for training analog data and real data is integrated, the leakage position can be identified in real time, and the accuracy and efficiency of complex pipe network leakage detection are improved.
Further specifically, after the model intelligent monitoring device is actually deployed, abnormal conditions of unlabeled data can be continuously monitored, the unlabeled data are manually checked and marked from the predicted abnormal data, and the unlabeled data are added into a data set to iteratively improve the model, so that active learning is realized.
In a preferred embodiment, the parameter configuration in step S1 further comprises an inner diameter of the natural gas pipeline, a friction coefficient, an inlet position, an outlet position, a valve position, and a pressure regulator position.
The parameter configuration of the real pipeline network is obtained, wherein the parameter configuration comprises three-dimensional coordinates of pipeline nodes, pipeline inner diameters, friction coefficients, natural gas pipeline inlets and outlets, valves and distribution of pressure regulators in the pipeline network, the digitization of the pipeline network structure is realized, the efficiency and the accuracy of the planning, the design and the maintenance of the pipeline network are improved, and the optimization of the operation and the management of the pipeline network are facilitated.
In a preferred embodiment, the inner diameter of the natural gas pipeline is greater than or equal to 50mm, the length of the natural gas pipeline is less than or equal to 100km, and the number of nodes of the natural gas pipeline network is less than or equal to 20.
Specifically, in the urban medium-low pressure natural gas pipeline network, the inner diameter of the pipeline is not less than 50mm, the length of the pipeline is not more than 100km, the pipeline network is composed of various pipes and connectors, the length and the diameter of the pipe section are constrained by relevant national standards or industry standards, so that the safety of the pipeline is enhanced, in the low-pressure natural gas pipeline network, the inner diameter of the pipeline is not less than 50mm, the pipeline can bear higher pressure, the risk of explosion of the pipeline is reduced, meanwhile, the length of the pipeline is not more than 100km, the shorter pipeline is easier to maintain and manage, and the increase of inspection and maintenance workload is avoided.
Further specifically, the larger inner diameter of the pipeline can increase the gas supply capacity of the pipeline, ensure that the supply of low-pressure natural gas in the city is sufficient, the probability of leakage or other safety accidents of the long pipeline is possibly higher, the short pipeline can reduce the risk of the whole system, and the shorter pipeline can provide better flexibility, so that the pipeline network can be expanded or recombined in the future conveniently to adapt to city development and change.
And more specifically, the pipe and the joint which accord with the national standard or the industry standard are adopted, so that the durability of the pipeline can be improved, the service life of the pipeline is prolonged, the frequency of pipeline maintenance and replacement can be reduced, the maintenance cost is reduced, flexible layout and adjustment can be carried out according to the actual needs, and the adaptability and the expandability of a pipeline network are improved.
In a preferred embodiment, as shown in fig. 2, step S2 includes,
s21, constructing a natural gas pipeline model according to a natural gas pipeline network so as to simulate pipeline air flow;
step S22, coding the natural gas pipeline network through a directed graph to obtain a natural gas network model so as to simulate the natural gas pipeline network;
step S23, a natural gas network calculation model is constructed to calculate pressure data and temperature data of the natural gas in the leakage state and the non-leakage state.
Specifically, in order to solve the problem of difficulty in acquiring marked data, a numerical simulation technology is adopted to generate a simulation data set, a directed graph is adopted to model the spatial relationship between different nodes in a natural gas network, a simulation working condition is configured in a calculation model, and pressure and temperature data of natural gas under leakage and non-leakage working conditions are generated.
Further specifically, as nodes and pipelines in the natural gas network are widely and complex in distribution, actual data acquisition and marking are very difficult, a large amount of simulation data can be generated through directed graph modeling and configuration of simulation working conditions, the defect of actual data is overcome, and therefore the problem of difficulty in data acquisition is solved; the directed graph can clearly represent the spatial relationship among different nodes in the natural gas network, helps to understand the structure and the operation condition of the system, and is helpful for better analyzing and predicting the occurrence of leakage events; by configuring the simulation working conditions, natural gas pressure and temperature data under different working conditions can be generated and used for training a machine learning model, and the accuracy of leakage detection is improved.
More specifically, step S2 further includes a pressure-driven demand model describing a relationship between a gas pressure at the node and a gas consumption rate at the node, and based on the history data, a gaussian distribution model of gas consumption demands of each node on the network is obtained, and when there is difficulty in obtaining the history data, the basic demand of each node can be initialized by adopting uniform distribution, and the actual demand of each node is generated by using random gaussian distribution, so that the natural gas pipe network in the real environment can be better simulated.
In a preferred embodiment, the calculation of the duct air flow in step S21 is as follows
Wherein p (x, t) represents the coupling pressure, q (x, t) represents the mass flux, x represents the spatial coordinates in the horizontal direction, t represents the time variable of an equation describing a dynamic or time-varying phenomenon, g represents the standard gravitational acceleration and g=9.80665 m/s 2Represents the partial derivative with respect to time, ">Represents the partial derivative of the space, S represents the cross-sectional area of the pipeline, gamma 0 Indicating the gas state, z 0 Representing the average compression coefficient.
Specifically, as shown in fig. 4, the natural gas pipe network has 50 pipe sections, i.e., P1 to P50,2 gas inlet sources, i.e., inletp=5 kPa, and a plurality of pipe connection points, i.e., 100 to 137, which are main constituent units of the natural gas transmission network, since the length of the pipe is far greater than the diameter thereof, a spatial one-dimensional model can be selected, and the gas flow in the pipe connecting two pipes with the node length L can be simulated by isothermal euler equation, where the evolution of the coupling pressure P (x, t) and the mass flux q (x, t) is determined, and the influence of temperature and pressure on the pipe wall is neglected, assuming that the physical dimension of the pipe is the pipe diameter d and the derived cross-sectional areaAssuming a gaseous state gamma 0 :=R S T 0 Average compression coefficient z 0 :=z(p 0 ,T 0 ) E R is a constant.
Further specifically, the coupled partial differential equation can also be characterized as a nonlinear, two-dimensional, first-order hyperbolic conservation system, with coupling pressure satisfying continuity and mass flux satisfying conservation of momentum.
In a preferred embodiment, the natural gas network model in step S22 is calculated as
Where i denotes the number of a node of the natural gas pipeline network (i=0, 1,2,3, … …), j denotes the pipe section number of the natural gas pipeline (j=0, 1,2,3, … …), ε denotes the pipeline, and N denotes the node.
In particular, the gas pipeline network is encoded using a finite directed graph, which is a tuple consisting of a finite set g= (N, epsilon), where g represents the finite set, epsilon represents the pipeline segment, N represents the node connecting the pipelines, and the correlation matrix a epsilon { -1,0,1} |N||ε| Representing the connectivity of the network and satisfying the above formula A ij Based on this connectivity, a vectorization or matrixing method is employed to enforce certain conservation attributes in the computation to maintain network balance to ensure that the natural gas network model meets the assumed physical characteristics.
In a preferred embodiment, as shown in FIG. 5, the initial state p 0 、q 0 、z 0 And parameter T 0 、R s 、F c ,s p (t)、d q (t) inputting a natural gas network calculation model, outputting s by the natural gas network calculation model q (t)、d p (t) the natural gas network calculation model in step S23 has the calculation formula of
Wherein E (θ) represents a parameter quality matrix, A and B represent a parameter independent linear vector field component, respectively, C represents a linear output function, F c Represents a load vector, f (p, q, s p θ) represents a gravity deceleration term, and p represents a pressureForce, q represents flow, z represents compression coefficient, d q Represents demand node traffic, d p Representing demand node pressure, s q Representing supply node traffic, s p Representing supply node pressure, T 0 Indicating the gas temperature, R s Indicating the gas specific constant.
Specifically, through spatial discretization and reduced order simplification, a calculation micro element can be obtained, which represents a local system with the same input and output quantity and consists of a normal differential equation, an output function and an initial value, and the discretization and reduced order simplification can reduce the complexity of calculation, so that the simulation and analysis of the system are more efficient; by adjusting the discrete time step and the degree of reduced order simplification, a trade-off can be made between accuracy and computational efficiency to meet the needs of a particular application; discretization and reduced order simplification can decompose a complex system into a plurality of micro-element models, so that modularization and expandability of the system are realized; discretization and reduced order simplification can visualize the behavior of the system and make it easier to understand the dynamics and stability of the system.
In a preferred embodiment, the pressure data ranges from 0.5Bar to 5Bar and the temperature data ranges from-10 ℃ to 50 ℃.
Specifically, the numerical simulation technology is adopted to generate marked data, the constraint condition is that each simulation period is not more than 24 hours, and the generated data comprises leakage and non-leakage working condition data with the pressure range of 0.5 Bar-5 Bar and the temperature range of-10 ℃ to 50 ℃.
Further specifically, the data are generated through a numerical simulation technology, so that the range and the distribution of the data can be accurately controlled, and the generated data are ensured to accord with preset constraint conditions; the numerical simulation technology can generate a large amount of data, provides more diversified data and enriches the content of the data set.
More specifically, the numerical simulation technology can perform simulation calculation based on a physical model and experimental data, and the generated data has higher reliability and can be used for verifying and evaluating the performance and accuracy of an algorithm, a model or a system.
In a preferred embodiment, the intelligent monitoring device in step S4 transmits the monitored data to the intelligent terminal, the storage capacity of the intelligent terminal is at least 1TB, and the data processing speed of the intelligent terminal is at least 1000 pieces per second.
Specifically, the intelligent terminal uses the internet of things technology based on 4G or higher standards to collect sensor data in real time, the system meets the storage capacity of at least 1TB and the processing capacity of at least 1000 data per second, the leak detection system is applied to an abnormal detection algorithm of the output of the neural network, the constraint is that the real-time response time is not more than 5 seconds, the generated alarm has the accuracy of at least 95% and the false alarm rate not more than 5%, the response speed is high, and the detection result is accurate.
And more specifically, the real-time monitoring and control can be realized, the intelligent terminal can receive the sensor data in real time and process the sensor data through the technology of the Internet of things, so that an operator can monitor the detection system in real time.
In a preferred embodiment, the intelligent monitoring device in step S4 includes a pressure sensor, a temperature sensor, and a flow sensor.
Specifically, as shown in fig. 7, the sensors are mainly distributed near key nodes and air inlet sources of the pipe network, and by reasonably setting the installation positions of the sensors in the network, the model can effectively identify leakage events and accurately mark the areas of the leakage points in the network.
In a first embodiment, as shown in fig. 3, a full life cycle flow chart of the leak detection of the present invention is shown, comprising:
setting up a data platform, acquiring parameter configuration of a natural gas pipe network, digitizing the distribution of pipe network nodes and inlet and outlet units, creating a data set by using a simulation technology, and modeling through a directed graph to generate temperature and pressure data;
in the model algorithm module, a self-encoder neural network model is established, the model is trained and evaluated, and the reconstruction error RE of the data set under the condition that the self-encoder neural network model is not leaked normally is calculated normal Reconstruction error RE of model to leakage condition leakage When the coverage rate of the test passing exceeds the acceptance markAt standard (e.g., 90%), the performance is considered to be up to standard, provided that
If the performance does not reach the standard, continuing to evaluate the data through the preprocessed data, and if the performance reaches the standard, issuing a model;
in the data acquisition module, intelligent terminal deployment and sensor deployment are carried out, data acquisition and communication are carried out, the model passing through the performance test is subjected to field test through local analysis or online analysis, and acceptance judgment is carried out after fine adjustment of the model, provided that
In-situ testing focuses on F1 scoring when the test index exceeds acceptance criteria th F1 When the performance meets the standard, wherein TP represents the number of true positive events, FP represents the number of false positive events, and FN represents the number of false negative events; the threshold th can be set according to the training process 1 Th 2 And further adjusts when the data under the leakage condition is available, in practical application, if the reconstruction error is greater than the set alarm threshold th alarm Will trigger a leak alert; when a leakage event occurs outside the monitoring area, the probability of correctly triggering a leakage alarm is reduced, and the deployment position of the monitoring sensor needs to be reasonably configured so as to realize high-reliability leakage detection;
and warning is carried out in a data monitoring module in a popup window or short message mode, the model can be actively learned, an industry expert or an algorithm engineer manually checks and marks the samples from predicted abnormal data, the new marked data are added into a data set, and the model is iteratively improved by using more real marked data to realize model iteration.
Specifically, in order to solve the problem of unbalanced data, a self-coding neural network model is adopted, a self-coding neural network is trained on the preprocessed data to identify corresponding gas leakage modes, and the generated simulation data is used for preliminary test in a computer simulation environment to obtain the tested self-coding neural network model, so that the reliability and stability of the model performance are ensured, the model is helped to better distinguish different gas leakage modes, and the classification performance of the model is improved; the complexity of the model is reduced by reducing the dimensionality of the input data, thereby reducing the risk of overfitting.
More specifically, as shown in fig. 6, the self-encoder neural network includes an input layer, three hidden layers and an output layer, the input layer receives data from various intelligent terminals, namely, input x1 … xi, the hidden layers are used for feature extraction and encoding, and the output layer is used for reconstructing an input signal and performing leak detection, namely, output y1 … yi; the first layer and the last layer contain 11 neurons, the first layer and the last layer respectively correspond to 11 monitoring points, the second layer and the third layer encode input data from 11 nodes into a low-dimensional space, the fourth layer and the fifth layer decode data from the low-dimensional space back to 11 nodes, the hidden layer of the model contains 3 neurons, the self-encoder neural network has the capability of detecting abnormal samples from normal sample data sets, therefore, the model training is only needed by using samples under the non-leakage working condition, the automatic encoder neural network is adopted to reconstruct normal non-leakage data, an abnormal detection model is obtained by minimizing reconstruction errors, when leakage events exist in a monitoring area, the model can output larger reconstruction errors (compared with the non-leakage working condition), and the leakage events in the area can be effectively detected by setting a proper threshold value.
More specifically, 5000 samples were randomly drawn from the leak-free dataset, 80% of which were used for model training and 20% of which were used for model testing and validation, so that there was enough data to learn the parameters of the model when training the model, and independent data was used to evaluate the performance of the model during the testing and validation phase to avoid overfitting of the model on the training set.
Still more particularly, the number of layers of the neural network is no more than 5, and the training period of the self-encoder neural network is within 50 iteration periods, all training samples are derived from a leakage-free data set, and the training set is subjected to standardization processing before training begins.
In summary, the application provides a natural gas pipeline leakage detection method based on machine learning, which is mainly used for natural gas leakage detection, and adopts numerical simulation calculation to generate pressure, temperature and flow data of natural gas under leakage and non-leakage working conditions, and considers actual gas demand fluctuation, data noise, leakage degree and space and time distribution characteristics in a pipe network so as to obtain marking data more accurately and comprehensively; the self-encoder neural network is used for detecting the leakage working condition in unbalanced data, and training can be carried out only by using the data under normal use conditions, so that the problem of unbalanced data is effectively solved, and the accuracy of leakage detection is improved; when the pipeline in the sensor monitoring area leaks, the system has higher detection accuracy and real-time efficiency, can be easily deployed into a natural gas pipe network by using the technology of the Internet of things, and provides a robust, accurate and economic solution for urban natural gas pipe network leakage detection.
The foregoing description is only illustrative of the preferred embodiments of the present invention and is not to be construed as limiting the scope of the invention, and it will be appreciated by those skilled in the art that equivalent substitutions and obvious variations may be made using the description and illustrations of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. A natural gas pipeline leakage detection method based on machine learning is characterized by comprising the following steps of,
step S1, acquiring parameter configuration of a natural gas pipeline network, wherein the parameter configuration comprises three-dimensional coordinates of nodes of the natural gas pipeline network;
step S2, modeling is carried out according to the nodes of the natural gas pipeline network so as to calculate pressure data and temperature data of the natural gas in a leakage state and a non-leakage state;
step S3, a self-encoder neural network model is built and trained according to the pressure data and the temperature data, a trained self-encoder neural network model is obtained, performance test is conducted on the trained self-encoder neural network model, and a tested self-encoder neural network model is obtained;
and S4, deploying an intelligent monitoring device on a node of the natural gas pipeline network, performing field test on the tested self-encoder neural network model to obtain a gas leakage detection model so as to detect whether the natural gas pipeline leaks, if so, giving an alarm, and if not, performing model iteration through expanding a data set.
2. The machine learning based natural gas pipeline leak detection method of claim 1, wherein the parameter configuration in step S1 further comprises an inner diameter of the natural gas pipeline, a coefficient of friction, an inlet position, an outlet position, a valve position, and a pressure regulator position.
3. The machine learning based natural gas pipeline leakage detection method according to claim 2, wherein an inner diameter of the natural gas pipeline is 50mm or more, a length of the natural gas pipeline is 100km or less, and the number of nodes of the natural gas pipeline network is 20 or less.
4. The machine learning based natural gas pipeline leakage detection method of claim 1, wherein step S2 comprises,
s21, constructing a natural gas pipeline model according to the natural gas pipeline network so as to simulate pipeline air flow;
step S22, coding the natural gas pipeline network through a directed graph to obtain a natural gas network model so as to simulate the natural gas pipeline network;
step S23, constructing a natural gas network calculation model to calculate the pressure data and the temperature data of the natural gas in the leakage state and the non-leakage state.
5. The machine learning based natural gas pipeline leakage detection method of claim 4 wherein the pipeline air flow in step S21 is calculated as
Wherein p (x, t) represents the coupling pressure, q (x, t) represents the mass flux, x represents the spatial coordinates in the horizontal direction, t represents the time variable of an equation describing a dynamic or time-varying phenomenon, g represents the standard gravitational acceleration and g=9.80665 m/s 2Represents the partial derivative with respect to time, ">Represents the partial derivative of the space, S represents the cross-sectional area of the pipeline, gamma 0 Indicating the gas state, z 0 Representing the average compression coefficient.
6. The machine learning based natural gas pipeline leakage detection method of claim 4, wherein the natural gas network model in step S22 is calculated as
Where i denotes the number of the node of the natural gas pipeline network (i=0, 1,2,3, … …), j denotes the pipe section number of the natural gas pipeline (j=0, 1,2,3, … …), epsilon denotes the pipeline, and N denotes the node.
7. The machine learning based natural gas pipeline leakage detection method of claim 4, wherein the natural gas network calculation model in step S23 has a calculation formula of
Wherein E (θ) represents a parameter quality matrix, A and B represent a parameter independent linear vector field component, respectively, C represents a linear output function, F c Represents a load vector, f (p, q, s p θ) represents a gravity deceleration term, p represents pressure, q represents flow, d q Represents demand node traffic, d p Representing demand node pressure, s q Representing supply node traffic, s p Representing the supply node pressure.
8. The machine learning based natural gas pipeline leakage detection method of claim 1, wherein the range of pressure data is 0.5Bar to 5Bar and the range of temperature data is-10 ℃ to 50 ℃.
9. The machine learning based natural gas pipeline leakage detection method according to claim 1, wherein in step S4, the intelligent monitoring device transmits the monitored data to an intelligent terminal, the storage capacity of the intelligent terminal is at least 1TB, and the data processing speed of the intelligent terminal is at least 1000 pieces per second.
10. The machine learning based natural gas pipeline leak detection method of claim 1, wherein the intelligent monitoring device in step S4 includes a pressure sensor, a temperature sensor, and a flow sensor.
CN202311528487.6A 2023-11-15 2023-11-15 Natural gas pipeline leakage detection method based on machine learning Pending CN117520989A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311528487.6A CN117520989A (en) 2023-11-15 2023-11-15 Natural gas pipeline leakage detection method based on machine learning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311528487.6A CN117520989A (en) 2023-11-15 2023-11-15 Natural gas pipeline leakage detection method based on machine learning

Publications (1)

Publication Number Publication Date
CN117520989A true CN117520989A (en) 2024-02-06

Family

ID=89765885

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311528487.6A Pending CN117520989A (en) 2023-11-15 2023-11-15 Natural gas pipeline leakage detection method based on machine learning

Country Status (1)

Country Link
CN (1) CN117520989A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117927880A (en) * 2024-03-22 2024-04-26 南京南大智慧城市规划设计股份有限公司 Intelligent detection positioning method for pipe network water leakage diagnosis

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117927880A (en) * 2024-03-22 2024-04-26 南京南大智慧城市规划设计股份有限公司 Intelligent detection positioning method for pipe network water leakage diagnosis
CN117927880B (en) * 2024-03-22 2024-05-24 南京南大智慧城市规划设计股份有限公司 Intelligent detection positioning method for pipe network water leakage diagnosis

Similar Documents

Publication Publication Date Title
Cai et al. Application of Bayesian networks in reliability evaluation
CN109555979B (en) Water supply pipe network leakage monitoring method
US6970808B2 (en) Realtime computer assisted leak detection/location reporting and inventory loss monitoring system of pipeline network systems
CN110398320B (en) Gas leakage detection positioning method and system easy for continuous optimization
CN110242865B (en) Gas leakage detection and judgment method and system easy for continuous optimization
CN117520989A (en) Natural gas pipeline leakage detection method based on machine learning
US20220082409A1 (en) Method and system for monitoring a gas distribution network operating at low pressure
CN111611677A (en) Risk calculation modeling system and method for pipeline operation and integrity management
CN109886433A (en) The method of intelligent recognition city gas pipeline defect
CN116482227B (en) Pipeline corrosion monitoring method, device and system
CN115127036B (en) Municipal gas pipe network leakage positioning method and system
CN116557787B (en) Intelligent evaluation system and method for pipe network state
CN115127037A (en) Water supply pipe network leakage positioning method and system
Shravani et al. A machine learning approach to water leak localization
CN115654381A (en) Water supply pipeline leakage detection method based on graph neural network
Lučin et al. Detailed leak localization in water distribution networks using random forest classifier and pipe segmentation
CN117570381A (en) Pipe network leakage early warning method based on online prediction and data fusion
CN116484219A (en) Water supply network water quality abnormal pollution source identification method based on gate control graph neural network
CN113970073B (en) ResNet-based water supply network leakage accurate positioning method
CN112097125B (en) Water supply pipe network pipe burst detection and positioning method based on self-adaptive checking
Liu et al. Gas leak detection system in compressor stations based on a microphone array and multi-channel frequency Transformer
Fuentes Jr et al. Leak detection in water distribution networks via pressure analysis using a machine learning ensemble
CN115512717A (en) Two-stage single-sensor pipeline leakage positioning method based on ensemble learning
Gong et al. A leak sample dataset construction method for gas pipeline leakage estimation using pipeline studio
Amoatey et al. Inverse optimization based detection of leaks from simulated pressure in water networks, part 1: analysis for a single leak

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination