Method and system for detecting leakage of urban gas pipeline

By establishing a mathematical model of gas pipelines based on conservation of mass and conservation of momentum, performing discretization processing and signal correction, combined with the dynamic time window of Bayes theorem, accurate detection and positioning of urban gas pipeline leakage is achieved, solving the problems of low detection efficiency and insufficient accuracy in the existing technology, and reducing the maintenance cost of gas pipelines.

CN119594348APending Publication Date: 2025-03-11ALTAY SPECIAL EQUIP INSPECTION & TESTING INST
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411789876.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

The existing urban gas pipeline leakage detection methods rely on manual carrying equipment for regular inspection. They are costly and low in efficiency, and cannot detect abnormalities in a timely manner, which affects the safety of gas use and is insufficient detection accuracy, resulting in leakage failure to be accurately positioned and maintained in a timely manner, increasing safety hazards of gas supply.

Method used

Combining the principle of conservation of mass and conservation of momentum, a mathematical model of gas pipelines is established, discretized, signals at the end of the gas pipeline are collected, denoised corrections are performed, and the predicted pressure is input to the discretization model to calculate the predicted pressure, and compared with the actual pressure. The average pressure difference value is calculated through the dynamic time window determined by the Bayes theorem to determine the leakage position.

Benefits of technology

It improves the accuracy and efficiency of gas pipeline leakage detection, reduces resource investment in manual inspection, reduces gas pipeline maintenance and monitoring costs, ensures safe gas supply to gas pipelines, and accurately locates the leakage location.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119594348A_ABST
    Figure CN119594348A_ABST
Patent Text Reader

Abstract

The invention provides an urban gas pipeline leakage detection method and system, and relates to the technical field of pipeline leakage localization, and the method comprises the steps: building a gas pipeline mathematical model between adjacent pressure regulating stations; discretizing the gas pipeline inlet and the gas pipeline outlet to obtain a discretized data model for describing the gas pipeline inlet and the gas pipeline outlet; actual signals are collected; de-noising correction is carried out on the actual signal; inputting the corrected actual flow into the discretization data model according to the position of the discrete node to which the actual flow belongs, and outputting model prediction pressure; calculating a pressure difference value between the model prediction pressure of the gas pipeline outlet and the corrected actual pressure; calculating an average pressure difference value by combining a dynamic time window determined based on the Bayesian theorem under the condition that the pressure difference value is greater than a preset difference value, entering the next step under the condition that the average pressure difference value is greater than the preset difference value, and otherwise, returning to collect the actual signal again; and determining the leakage position of the gas pipeline. And the gas pipeline monitoring efficiency and the leakage position positioning accuracy are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of pipeline leakage positioning, and in particular to a method and system for detecting leakage of a town gas pipeline. Background Art

[0002] Town gas pipelines are pipeline networks used to transport gas (such as natural gas, liquefied petroleum gas, etc.), mainly providing gas energy to residents, commercial and industrial users in cities or towns. These pipelines are usually made of steel, plastic or composite materials, buried underground or laid along buildings. Leak detection of town gas pipelines refers to the process of monitoring whether there is a gas leak in the pipeline through professional equipment and technical means. Commonly used detection methods include gas concentration detection, acoustic wave detection, fiber optic sensing, etc. The purpose is to detect and repair gas leaks in a timely manner to ensure the safety of pipeline operation.

[0003] Gas pipeline leak detection is widely used in urban residential areas, commercial centers, industrial parks and other places, especially in densely populated areas or areas with high gas consumption. These detection activities are usually carried out during daily inspections, accident investigations or pipeline maintenance. It is very necessary to conduct leak detection on urban gas pipelines, because gas leaks may cause serious accidents such as fires and explosions, threatening the safety of residents' lives and property. In addition, gas leaks will waste energy and pollute the environment. Timely detection and repair of leaks can not only ensure gas safety, but also reduce economic losses and environmental impacts.

[0004] However, the existing urban gas pipeline leakage detection process mostly adopts the method of manual regular inspection with professional equipment, which is costly, inefficient and cannot timely detect the abnormal status of urban gas pipelines, seriously affecting the safety of urban gas use. Moreover, it is easily affected by irrelevant factors during the inspection process. The accuracy of leak detection is insufficient, resulting in the inability to accurately locate and maintain the leak in time even if it occurs, increasing the safety risks of urban gas supply. Summary of the invention

[0005] In order to solve the technical problem that in the prior art, the leakage detection process of town gas pipelines is mostly carried out manually with professional equipment for regular inspection, which is costly, inefficient and cannot timely detect the abnormal state of the town gas pipeline, seriously affecting the safety of town gas use, and is easily affected by irrelevant factors during the inspection process. The accuracy of leakage detection is insufficient, resulting in the inability to accurately locate and maintain the leakage in time even if it occurs, which increases the safety hazard of town gas supply, the present invention provides a method and system for detecting leakage of town gas pipelines.

[0006] The technical solution provided by the embodiment of the present invention is as follows:

[0007] First aspect

[0008] An embodiment of the present invention provides a method for detecting leakage of a town gas pipeline, comprising:

[0009] S1: Combine the principles of conservation of mass and conservation of momentum to establish a mathematical model of the gas pipeline between adjacent pressure regulating stations to describe the variation of gas pressure and gas flow in the gas pipeline with time and space parameters, where the time and space parameters include the gas pipeline position and time;

[0010] S2: Discretize the mathematical model of the gas pipeline to obtain a discretized data model describing the gas pipeline inlet and the gas pipeline outlet, wherein the gas pipeline inlet and the gas pipeline outlet respectively correspond to a discrete node in the discretized data model;

[0011] S3: collecting actual signals from the gas pipeline inlet and the gas pipeline outlet, wherein the actual signals include actual pressure and actual flow;

[0012] S4: De-noising the actual signal to remove the disturbance component caused by the gas turbulence phenomenon;

[0013] S5: inputting the corrected actual flow into the discretized data model according to the position of the corresponding discrete node, and outputting the model predicted pressure of the gas pipeline outlet;

[0014] S6: Calculate the pressure difference between the model predicted pressure and the corrected actual pressure at the gas pipeline outlet;

[0015] S7: When the pressure difference is greater than the preset difference, the average pressure difference is calculated in combination with the dynamic time window determined based on the Bayesian theorem. When the average pressure difference is greater than the preset difference, the process proceeds to step S8; otherwise, the process returns to step S3;

[0016] S8: Determine the leakage location of the gas pipeline based on the pressure gradient change law of the actual pressure corrected in the gas pipeline.

[0017] Second aspect

[0018] An embodiment of the present invention provides a system for detecting leakage of a town gas pipeline, comprising:

[0019] processor;

[0020] A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the method for detecting leakage of a town gas pipeline as described in the first aspect is implemented.

[0021] The third aspect

[0022] An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the method for detecting leakage of a town gas pipeline as described in the first aspect is implemented.

[0023] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0024] In the present invention, the principle of conservation of mass and the principle of conservation of momentum are combined to establish a mathematical model of the gas pipeline between adjacent pressure regulating stations to describe the law of change of gas pressure and gas flow in the gas pipeline with time and space parameters, and discretize it to be suitable for leakage detection at different nodes. Afterwards, the end signal of the gas pipeline, i.e., the actual signal of the gas pipeline inlet and the gas pipeline outlet, is collected, substituted into the established discretized data model, and the model predicted pressure representing the gas pipeline outlet under the ideal state is output, and then compared with the actual pressure of the collected gas pipeline outlet, so as to timely and effectively determine whether there is a leak in the gas pipeline. This scheme has high accuracy and strong feasibility. While ensuring the safe gas supply of the gas pipeline, it can reduce the resource investment in the manual inspection process and reduce the maintenance and monitoring cost of the gas pipeline. Finally, based on the pressure gradient change law of the actual pressure after correction in the gas pipeline, the gas pipeline leakage position is accurately located. In addition, the actual signal collected is denoised and corrected to remove the disturbance component caused by the ubiquitous gas turbulence phenomenon, and then the pressure comparison is performed to further enhance the accuracy of gas pipeline monitoring. Furthermore, after obtaining the pressure difference, the dynamic time window determined by the Bayesian theorem is used to calculate the average pressure difference. Only when the average pressure difference is greater than the preset difference is it determined that there is a leak and the leak location is detected. This secondary verification method greatly improves the accuracy and effectiveness of determining whether there is a leak based on the pressure difference, and avoids false alarms caused by inaccurate detection due to instantaneous impact inside the gas pipeline. It greatly improves the accuracy of gas pipeline leak detection and the accuracy of leak location positioning. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. 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 these drawings without creative work.

[0026] Figure 1 A schematic flow chart of a method for detecting leakage of a town gas pipeline provided by an embodiment of the present invention;

[0027] Figure 2 A schematic structural diagram of a town gas pipeline leakage detection system provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0028] The technical solution of the present invention is described below in conjunction with the accompanying drawings.

[0029] In the embodiments of the present invention, words such as "exemplarily" and "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "example" in the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "example" is intended to present the concept in a specific way. In addition, in the embodiments of the present invention, the meaning expressed by "and / or" can be both, or it can be either of the two.

[0030] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.

[0031] Reference Manual Attached Figure 1 , showing a flow chart of a method for detecting leakage of a town gas pipeline provided by an embodiment of the present invention.

[0032] The embodiment of the present invention provides a method for detecting leakage of a town gas pipeline, which can be implemented by a detection device for detecting leakage of a town gas pipeline, and the detection device for detecting leakage of a town gas pipeline can be a terminal or a server. The processing flow of the method for detecting leakage of a town gas pipeline can include the following steps:

[0033] S1: Combine the principles of conservation of mass and conservation of momentum to establish a mathematical model of the gas pipeline between adjacent pressure regulating stations to describe the changing patterns of gas pressure and gas flow in the gas pipeline with time and space parameters.

[0034] Among them, the spatiotemporal parameters include the gas pipeline location and time.

[0035] Among them, the principle of conservation of mass shows that in a pipeline system, the difference between the inflow mass and the outflow mass at a certain point at any time is equal to the change in mass in the system. The principle of conservation of momentum shows that during the flow of gas, the change in momentum is equal to the sum of the forces applied to the gas. The pressure regulating station is an important facility in the gas transmission and distribution system, which is used to regulate and stabilize the pressure in the pipeline to ensure that the gas is delivered to downstream users at a suitable pressure, and at the same time plays a role in safety protection. The mathematical model of the gas pipeline is a set of equations based on physical laws (such as the mass conservation equation and the momentum conservation equation) to describe the flow law of gas in the pipeline, involving the pressure, flow, speed and other influencing factors of the gas, and taking position and time as variables. By combining the conservation of mass and the conservation of momentum to establish a mathematical model, the gas flow state can be accurately simulated, providing a theoretical basis for leak detection. This can not only capture the impact of leakage on pressure and flow, but also dynamically adapt to the spatiotemporal changes of complex systems, and improve detection accuracy and efficiency.

[0036] In a possible implementation, the gas pipeline mathematical model is specifically:

[0037]

[0038] in, represents partial derivative, H(z,t) and Q(z,t) represent the instantaneous pressure and instantaneous flow rate associated with the gas pipeline position z and time t, respectively, g represents gravitational acceleration, A represents the cross-sectional area of ​​the gas pipeline, D represents the diameter of the gas pipeline, c represents the gas pressure wave velocity, μ represents the friction parameter associated with the Darcy-Weisbach friction coefficient γ, || represents the absolute value, Z represents the gas compressibility factor, R represents the universal gas constant, M represents the gas molar mass, and T represents the absolute temperature of the gas.

[0039] It should be noted that the mathematical model of the gas pipeline combines key variables such as gas flow, pressure fluctuation and energy loss. By accurately describing the dynamic laws of gas changes with position and time, it can provide a scientific and reliable theoretical basis for leak detection, improve the accuracy and timeliness of leak detection, and adapt to complex pipeline network environments.

[0040] S2: Discretize the mathematical model of the gas pipeline to obtain a discretized data model describing the gas pipeline inlet and the gas pipeline outlet.

[0041] The gas pipeline inlet and the gas pipeline outlet respectively correspond to a discrete node in the discretized data model.

[0042] Among them, discrete nodes divide the continuous gas pipeline space into several discrete points, and each node represents a specific position of the pipeline. The physical quantity of each node (such as pressure, flow) can be expressed by a specific numerical value rather than a continuous function. The discretized data model is a numerical calculation model obtained by discretizing the space and time of the gas pipeline mathematical model. It can perform numerical solutions on discrete nodes to describe the gas state at each node by converting continuous partial differential equations into discrete algebraic equations. Discretization can simplify complex continuous systems into numerical models that can be processed by computers, making the dynamic behavior of gas flow quantifiable at the inlet, outlet and intermediate positions of the pipeline, thereby improving the calculation accuracy and detection efficiency of the leakage location.

[0043] In a possible implementation, the discretization mathematical model is specifically:

[0044]

[0045] in, and They represent the flow rate change rate and pressure change rate of the i-th discrete node, respectively. i , H i+1 They represent the flow of the ith discrete node and the i+1th discrete node, respectively, Q i-1 , Q i They represent the pressure of the i-1th discrete node and the i-th discrete node, u ti represents the step function that defines the leakage state of the ith discrete node at time t, u ti =1 means there is a leak point, u ti =0 indicates no leakage point, i=1 indicates the gas pipeline inlet, i=n indicates the gas pipeline outlet, λ i It depends on the leakage flow Q leak The leakage coefficient corresponding to the discrete node i, Δ represents the gas pipeline length corresponding to the adjacent discrete nodes, that is, the gas pipeline unit length.

[0046] It should be noted that this discretized mathematical model can accurately analyze the dynamic changes between nodes by dividing the gas pipeline into multiple nodes, describing the flow rate change rate and pressure change rate, and introducing leakage-related parameters. Through numerical calculation and recursion, the leakage point can be quickly located, the accuracy and efficiency of detection can be improved, and it is suitable for real-time monitoring of complex gas networks.

[0047] S3: Collect actual signals from the gas pipeline inlet and outlet.

[0048] The actual signal includes the actual pressure and the actual flow.

[0049] Optionally, actual signals from the gas pipeline inlet and the gas pipeline outlet may be collected by sensors.

[0050] It should be noted that by collecting the actual pressure and flow signals at the inlet and outlet of the gas pipeline, the pipeline operation status data can be obtained in real time, providing a basis for subsequent analysis, quickly identifying abnormal pressure or flow changes in the pipeline, and preliminarily judging whether there is a leak. At the same time, it reduces interference from subjective factors, improves detection accuracy and efficiency, and lays a data foundation for accurately locating the leak point.

[0051] S4: Perform denoising correction on the actual signal to remove the disturbance components caused by gas turbulence.

[0052] Among them, gas turbulence refers to the irregular and turbulent flow of gas in the pipeline due to high flow velocity or rough pipe wall, which leads to instantaneous fluctuations and eddy currents in pressure and flow. This phenomenon may cause distortion of sensor data and affect the accuracy of leakage judgment. Therefore, it is necessary to correct the signal to eliminate interference and ensure data reliability and accuracy of subsequent analysis.

[0053] It should be noted that the actual signal collected by the sensor is denoised and corrected to eliminate the disturbance of pressure and flow caused by turbulence or other factors during gas transmission. This disturbance will cause the signal recorded by the sensor to deviate from the actual gas state, which may interfere with the accuracy of leak detection. Through denoising and correction, the signal is adjusted to a form that is more in line with the actual gas state, providing accurate and reliable data support for subsequent analysis. Eliminating the interference caused by turbulence through denoising and correction can more truly reflect the actual state in the gas pipeline, effectively avoid misjudgment and false alarms, provide an accurate data basis for leak detection, and greatly improve the reliability of leak judgment and positioning.

[0054] In a possible implementation, S4 specifically includes:

[0055] S401: Reconstruct the actual signal into the turbulence power spectrum according to the turbulence energy spectrum theory:

[0056] O(f)=x sensor ·E(f)

[0057] E(f)=D·ò 2 / 3 ·f -5 / 3

[0058] Where O(f) represents the actual signal x sensor The energy contribution at frequency f, E(f) represents the turbulent energy spectrum density, that is, the energy distribution of turbulence at frequency f, D represents the Kolmogorov constant, that is, the proportional factor reflecting the turbulent energy distribution, and ò represents the turbulent dissipation rate.

[0059] Optionally, D is an empirical constant, usually taken as 1.5. Where u represents the average flow rate of gas, and L represents the length of the gas pipeline. Kolmogorov constant is Kolmogorov constant.

[0060] S402: Remove the turbulence component in the actual signal by combining the turbulence power spectrum to achieve denoising correction of the actual signal:

[0061]

[0062] Among them, x turb-free represents the actual signal after removing the turbulence component, that is, the actual pressure after correction, f c Represents the critical frequency associated with the gas for distinguishing the turbulent components.

[0063] Specifically, the actual signal is reconstructed through the turbulence power spectrum, the high-frequency interference caused by the gas turbulence is removed from the sensor signal, and the corrected real pressure and flow signals are obtained, which significantly improves the reliability of the signal and eliminates the errors caused by turbulence, providing a more accurate data basis for subsequent leak detection, thereby improving detection accuracy and reducing the risks of false alarms and missed alarms. It is suitable for real-time monitoring of complex gas pipeline environments.

[0064] S5: Input the corrected actual flow into the discretized data model according to the position of the corresponding discrete node, and output the model predicted pressure of the gas pipeline outlet.

[0065] Specifically, the corrected actual flow rate (collected from the sensor and denoised) is used as the input data of the model. The flow data is input to the corresponding node of the mathematical model according to the pipeline position (discrete node) to which it belongs. The discretized gas pipeline mathematical model is formed by discretizing the continuous mass conservation equation and momentum conservation equation, and is used to describe the pressure and flow relationship of each node. The pressure value of each node is calculated step by step through numerical solution methods (such as finite difference method or finite element method): starting from the gas pipeline inlet (known pressure and flow), the pressure of the next node is calculated recursively using the discrete equation. Repeat this process until the pressure of the gas pipeline outlet node is calculated. Finally, the calculated pressure of the outlet node is used as the model predicted pressure, which represents the gas pipeline outlet pressure under ideal conditions (no leakage). By inputting the corrected flow rate into the discretized mathematical model and recursively calculating using the discrete form of the mass conservation and momentum conservation equations, the model predicted pressure can be accurately output. This pressure value is a theoretical ideal state, which can be compared with the actual pressure later to detect whether there is a leak.

[0066] It can be understood that by using the discretized mathematical model of the corrected flow input, the model predicted pressure at the outlet is calculated to provide a reference value under ideal conditions. After comparing with the actual pressure, leakage can be accurately determined, thereby improving the scientificity and accuracy of detection and adapting to complex pipeline environments.

[0067] S6: Calculate the pressure difference between the model predicted pressure and the corrected actual pressure at the gas pipeline outlet.

[0068] It should be noted that those skilled in the art can set the size of the preset pressure difference according to actual needs, and the present invention is not limited thereto.

[0069] In a possible implementation manner, the pressure difference is calculated as follows:

[0070] ΔP=P actual -P predicted

[0071] Where ΔP represents the actual pressure after correction P actual and the model predicts pressure P predicted The pressure difference between .

[0072] It is understandable that by calculating the pressure difference between the actual pressure after correction and the pressure predicted by the model, it is possible to accurately determine whether there is an abnormality in the pipeline. This process can effectively identify the impact of leakage on pipeline pressure, avoid errors caused by other factors, and provide an important basis for further determination of the leakage location, improve the accuracy and efficiency of detection, and ensure the safe operation of the gas transmission and distribution system.

[0073] S7: When the pressure difference is greater than the preset difference, the average pressure difference is calculated in combination with the dynamic time window determined based on the Bayesian theorem. When the average pressure difference is greater than the preset difference, proceed to step S8; otherwise, return to step S3.

[0074] Among them, Bayes' theorem is a probability calculation formula used to update the probability of an event and adjust the prior probability based on new evidence. The dynamic time window is an observation time interval that rolls over time and is used to analyze the operation status of the pipeline. The pressure difference within the window will be weighted to consider the changing trend of the time series and filter out short-term interference signals.

[0075] Specifically, first, detect whether the pressure difference exceeds the preset threshold as a trigger condition. If the condition is met, calculate the average pressure difference within the dynamic time window and filter out short-term abnormal data. If the average value still exceeds the threshold, confirm the leak and proceed to the next step of detection, otherwise return to re-collect data. Through the secondary judgment of the pressure difference and the dynamic analysis of the time window, the false alarms caused by short-term pressure fluctuations are reduced, the accuracy of leakage judgment is improved, and unnecessary waste of resources is reduced, providing a reliable basis for accurately locating leaks. When it is determined that there is no leakage, return to re-collect data to achieve a closed loop of gas pipeline leak detection, realize all-weather gas pipeline monitoring, reduce the investment cost of manual inspections, improve monitoring efficiency and real-time performance, and ensure the safety of gas supply.

[0076] In a possible implementation, the average pressure difference is determined in combination with the time window determined based on the Bayesian theorem, specifically including:

[0077] S701: Determine the optimal dynamic time window under the pressure difference based on Bayesian theorem:

[0078]

[0079] in, represents the optimal dynamic time, P(T w |ΔP) indicates the time window T under which the pressure difference ΔP is observed w The posterior probability, P(ΔP|T w ) represents the time window T w The likelihood function for the pressure difference ΔP, P(T w ) represents the time window T w The prior distribution of T is the T selected when ΔP is not observed. w , P(ΔP) represents the normalized probability of the pressure difference ΔP as the signal observation value, π represents pi, exp represents the natural exponential function, and σ represents the probability of the pressure difference ΔP at T w The standard deviation of the pressure difference under T w The average pressure difference under .

[0080] It is understandable that if T w It can capture the signal characteristics well, and the observed pressure difference ΔP is more likely to be close to its true mean μ, making P(ΔP|T w ) is larger. The modeling of the likelihood function is to describe that the closer ΔP is to the mean of the signal, the higher the probability value of the distribution is, indicating that the time window T w On the contrary, if T w The signal cannot be described well (e.g. the window is too small or too large), P(ΔP|T w ) will be smaller.

[0081] S702: Calculate the pressure difference at different times under the optimal dynamic time window:

[0082] ΔP t =P actual,t -P predicted,t

[0083] Among them, ΔP t Indicates that it belongs to the optimal dynamic time window The pressure difference at time t, P actual,t and P predicted,t They represent P at time t, i.e. the current time. actual and P predicted .

[0084] S703: Determine the average pressure difference value according to the calculated pressure difference value:

[0085]

[0086] in, Indicates the average pressure difference, P actual,i and P predicted,i Respectively represent the time i P actual and P at time i predicted , represents the maximum moment under the optimal dynamic time window, Indicates the maximum length of the optimal dynamic time window.

[0087] It should be noted that this process is based on the Bayesian theorem, and the observed pressure difference is screened through the optimal dynamic time window, the pressure difference at each moment in the window is calculated, and the average pressure difference is further determined. By dynamically adjusting the size and position of the time window, the signal characteristics are captured to ensure that the data matches the actual situation. This process effectively filters short-term fluctuations and interference signals, avoids false alarms, and improves the accuracy of leak detection. It is particularly suitable for dynamic signal analysis in complex pipeline operation environments.

[0088] S8: Determine the leakage location of the gas pipeline based on the pressure gradient change law of the actual pressure corrected in the gas pipeline.

[0089] It should be noted that the leak is located by analyzing the pressure gradient of the corrected actual pressure in the pipeline (i.e., the rate of change of pressure with position). Ideally, the change in pressure gradient is stable. However, near the leak point, the pressure will suddenly drop, which will appear as an abnormal change in the pressure gradient. By calculating the pressure gradient of each node along the pipeline and comparing it with the normal state, the location of the leak can be accurately determined. The leak point can be accurately located by using the abnormal change law of the pressure gradient, which reduces the blindness and time cost of manual investigation, improves detection efficiency and accuracy, and ensures the safe operation and rapid maintenance of the gas pipeline.

[0090] In a possible implementation, S8 specifically includes:

[0091] S801: Calculate the pressure gradient before the leak location and the pressure gradient after the leak location:

[0092]

[0093] in, Indicates the leak location x Leak The pressure gradient at each gas pipeline position x before, represents the pressure gradient behind the leak location, It means partial derivative, P in and P out Respectively represent the gas pipeline inlet pressure and gas pipeline outlet pressure, P xLeak Represents x Leak The pressure of the cylinder is shown in Figure 1, and P represents the actual pressure after correction.

[0094] S802: Determine the gas pipeline leakage location based on the linear interpolation principle according to the pressure gradient before the leakage location and the pressure gradient after the leakage location:

[0095]

[0096] It should be noted that by calculating the pressure gradient of the pipeline before and after the leakage point, combining the actual pressure data at both ends of the pipeline and the mathematical model to deduce the specific location of the leakage point, and utilizing the linear relationship of pressure changes, the leakage position can be located quickly and accurately, avoiding large-scale inspections, reducing manpower and time costs, and improving the accuracy and efficiency of leak detection.

[0097] In a possible implementation manner, after S8, the method further includes:

[0098] Issue early warning information about the location of gas pipeline leaks.

[0099] It is understandable that the system automatically generates early warning information based on the analysis results, accurately marks the location of the leak, and reminds relevant maintenance personnel to respond quickly. This step can shorten the maintenance response time, reduce the potential harm caused by the leak, and ensure the safety of pipeline operation and the continuity of gas use by users.

[0100] In actual application, the detection process of urban gas pipeline leakage is based on mathematical models. By combining the conservation of mass and momentum, the dynamic laws of gas pipeline pressure and flow are established, and then the model is discretized and adapted to the computing nodes. After the sensor collects the pressure and flow data of the inlet and outlet in real time, it removes turbulence and interference factors and corrects them to more accurate signals. The corrected data is input into the discrete model to calculate the predicted pressure and compared with the actual pressure to determine whether there is a leak. Secondary screening is performed through pressure difference and dynamic time window to effectively avoid false alarms and waste of resources, and finally the leakage point is accurately located in combination with the law of pressure gradient changes. This method can quickly and accurately detect leaks, improve efficiency, reduce labor costs, and ensure the safe operation of gas pipelines.

[0101] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0102] In the present invention, the principle of conservation of mass and the principle of conservation of momentum are combined to establish a mathematical model of the gas pipeline between adjacent pressure regulating stations to describe the law of change of gas pressure and gas flow in the gas pipeline with time and space parameters, and discretize it to be suitable for leakage detection at different nodes. Afterwards, the end signal of the gas pipeline, i.e., the actual signal of the gas pipeline inlet and the gas pipeline outlet, is collected, substituted into the established discretized data model, and the model predicted pressure representing the gas pipeline outlet under the ideal state is output, and then compared with the actual pressure of the collected gas pipeline outlet, so as to timely and effectively determine whether there is a leak in the gas pipeline. This scheme has high accuracy and strong feasibility. While ensuring the safe gas supply of the gas pipeline, it can reduce the resource investment in the manual inspection process and reduce the maintenance and monitoring cost of the gas pipeline. Finally, based on the pressure gradient change law of the actual pressure after correction in the gas pipeline, the gas pipeline leakage position is accurately located. In addition, the actual signal collected is denoised and corrected to remove the disturbance component caused by the ubiquitous gas turbulence phenomenon, and then the pressure comparison is performed to further enhance the accuracy of gas pipeline monitoring. Furthermore, after obtaining the pressure difference, the dynamic time window determined by the Bayesian theorem is used to calculate the average pressure difference. Only when the average pressure difference is greater than the preset difference is it determined that there is a leak and the leak location is detected. This secondary verification method greatly improves the accuracy and effectiveness of determining whether there is a leak based on the pressure difference, and avoids false alarms caused by inaccurate detection due to instantaneous impact inside the gas pipeline. It greatly improves the accuracy of gas pipeline leak detection and the accuracy of leak location positioning.

[0103] Reference Manual Attached Figure 2 , showing a structural schematic diagram of a town gas pipeline leakage detection system provided by the present invention.

[0104] The present invention further provides a town gas pipeline leakage detection system 20, which is applied to the above-mentioned town gas pipeline leakage detection method, comprising:

[0105] Processor 201.

[0106] The memory 202 stores computer-readable instructions. When the computer-readable instructions are executed by the processor 201, a method for detecting leakage of a town gas pipeline as in the method embodiment is implemented.

[0107] The town gas pipeline leakage detection system 20 provided by the present invention can execute the above-mentioned town gas pipeline leakage detection method and achieve the same or similar technical effects. To avoid repetition, the present invention will not go into details.

[0108] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0109] In the present invention, the principle of conservation of mass and the principle of conservation of momentum are combined to establish a mathematical model of the gas pipeline between adjacent pressure regulating stations to describe the law of change of gas pressure and gas flow in the gas pipeline with time and space parameters, and discretize it to be suitable for leakage detection at different nodes. Afterwards, the end signal of the gas pipeline, i.e., the actual signal of the gas pipeline inlet and the gas pipeline outlet, is collected, substituted into the established discretized data model, and the model predicted pressure representing the gas pipeline outlet under the ideal state is output, and then compared with the actual pressure of the collected gas pipeline outlet, so as to timely and effectively determine whether there is a leak in the gas pipeline. This scheme has high accuracy and strong feasibility. While ensuring the safe gas supply of the gas pipeline, it can reduce the resource investment in the manual inspection process and reduce the maintenance and monitoring cost of the gas pipeline. Finally, based on the pressure gradient change law of the actual pressure after correction in the gas pipeline, the gas pipeline leakage position is accurately located. In addition, the actual signal collected is denoised and corrected to remove the disturbance component caused by the ubiquitous gas turbulence phenomenon, and then the pressure comparison is performed to further enhance the accuracy of gas pipeline monitoring. Furthermore, after obtaining the pressure difference, the dynamic time window determined by the Bayesian theorem is used to calculate the average pressure difference. Only when the average pressure difference is greater than the preset difference is it determined that there is a leak and the leak location is detected. This secondary verification method greatly improves the accuracy and effectiveness of determining whether there is a leak based on the pressure difference, and avoids false alarms caused by inaccurate detection due to instantaneous impact inside the gas pipeline. It greatly improves the accuracy of gas pipeline leak detection and the accuracy of leak location positioning.

[0110] It should be understood that the processor in the embodiment of the present invention may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0111] It should also be understood that the memory in the embodiments of the present invention may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).

[0112] The above embodiments can be implemented in whole or in part by software, hardware (such as circuits), firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a tape), an optical medium (for example, a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.

[0113] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.

[0114] In the present invention, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0115] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0116] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0117] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0118] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0119] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0120] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0121] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, etc., various media that can store program codes.

[0122] An embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the method for detecting leakage of a town gas pipeline as described in the method embodiment is implemented.

[0123] A computer-readable storage medium provided by the present invention can implement the steps and effects of the method for detecting urban gas pipeline leakage in the above method embodiment. To avoid repetition, the present invention will not go into details.

[0124] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least:

[0125] In the present invention, the principle of conservation of mass and the principle of conservation of momentum are combined to establish a mathematical model of the gas pipeline between adjacent pressure regulating stations to describe the law of change of gas pressure and gas flow in the gas pipeline with time and space parameters, and discretize it to be suitable for leakage detection at different nodes. Afterwards, the end signal of the gas pipeline, i.e., the actual signal of the gas pipeline inlet and the gas pipeline outlet, is collected, substituted into the established discretized data model, and the model predicted pressure representing the gas pipeline outlet under the ideal state is output, and then compared with the actual pressure of the collected gas pipeline outlet, so as to timely and effectively determine whether there is a leak in the gas pipeline. This scheme has high accuracy and strong feasibility. While ensuring the safe gas supply of the gas pipeline, it can reduce the resource investment in the manual inspection process and reduce the maintenance and monitoring cost of the gas pipeline. Finally, based on the pressure gradient change law of the actual pressure after correction in the gas pipeline, the gas pipeline leakage position is accurately located. In addition, the actual signal collected is denoised and corrected to remove the disturbance component caused by the ubiquitous gas turbulence phenomenon, and then the pressure comparison is performed to further enhance the accuracy of gas pipeline monitoring. Furthermore, after obtaining the pressure difference, the dynamic time window determined by the Bayesian theorem is used to calculate the average pressure difference. Only when the average pressure difference is greater than the preset difference is it determined that there is a leak and the leak location is detected. This secondary verification method greatly improves the accuracy and effectiveness of determining whether there is a leak based on the pressure difference, and avoids false alarms caused by inaccurate detection due to instantaneous impact inside the gas pipeline. It greatly improves the accuracy of gas pipeline leak detection and the accuracy of leak location positioning.

[0126] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

[0127] There are a few points to note:

[0128] (1) The drawings of the embodiments of the present invention only relate to the structures related to the embodiments of the present invention, and other structures may refer to the general design.

[0129] (2) For the sake of clarity, in the drawings used to describe the embodiments of the present invention, the thickness of the layers or regions is exaggerated or reduced, that is, these drawings are not drawn according to the actual scale. It is understood that when an element such as a layer, film, region or substrate is referred to as being "on" or "under" another element, the element may be "directly" "on" or "under" the other element or there may be intermediate elements.

[0130] (3) In the absence of conflict, the embodiments of the present invention and the features therein may be combined with each other to obtain new embodiments.

[0131] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. The protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A method for detecting leakage of a town gas pipeline, characterized in that: include: S1: A mathematical model of a gas pipeline between adjacent pressure regulating stations is established by combining the principles of conservation of mass and conservation of momentum to describe the variation of gas pressure and gas flow in the gas pipeline with time and space parameters, wherein the time and space parameters include the position and time of the gas pipeline; S2: discretizing the gas pipeline mathematical model to obtain a discretized data model describing a gas pipeline inlet and a gas pipeline outlet, wherein the gas pipeline inlet and the gas pipeline outlet respectively correspond to a discrete node in the discretized data model; S3: Collecting actual signals from the gas pipeline inlet and the gas pipeline outlet, wherein the actual signals include actual pressure and actual flow; S4: performing denoising correction on the actual signal to remove disturbance components caused by gas turbulence; S5: inputting the corrected actual flow into the discretized data model according to the position of the corresponding discrete node, and outputting the model predicted pressure of the gas pipeline outlet; S6: Calculating the pressure difference between the model predicted pressure and the corrected actual pressure at the gas pipeline outlet; S7: when the pressure difference is greater than the preset difference, calculate the average pressure difference in combination with the dynamic time window determined based on the Bayesian theorem, and when the average pressure difference is greater than the preset difference, proceed to step S8, otherwise, return to step S3; S8: Determine the leakage location of the gas pipeline based on the pressure gradient change law of the actual pressure corrected in the gas pipeline.

2. The method for detecting leakage of a town gas pipeline according to claim 1, characterized in that: The gas pipeline mathematical model is specifically: in, represents partial derivative, H(z,t) and Q(z,t) represent the instantaneous pressure and instantaneous flow rate associated with the gas pipeline position z and time t, respectively, g represents gravitational acceleration, A represents the cross-sectional area of ​​the gas pipeline, D represents the diameter of the gas pipeline, c represents the gas pressure wave velocity, μ represents the friction parameter associated with the Darcy-Weisbach friction coefficient γ, | | represents the absolute value, Z represents the gas compressibility factor, R represents the universal gas constant, M represents the gas molar mass, and T represents the absolute temperature of the gas.

3. The method for detecting leakage of town gas pipeline according to claim 2, characterized in that: The discretization mathematical model is specifically: 1≤i≤n in, and They represent the flow rate change rate and pressure change rate of the i-th discrete node, respectively. i , H i+1 They represent the flow of the ith discrete node and the i+1th discrete node, respectively, Q i-1 , Q i They represent the pressure of the i-1th discrete node and the i-th discrete node, u ti represents the step function that defines the leakage state of the ith discrete node at time t, u ti =1 means there is a leak point, u ti =0 means no leakage point, i=1 means the gas pipeline inlet, i=n means the gas pipeline outlet, λ i It depends on the leakage flow Q leak The leakage coefficient corresponding to the discrete node i, Δ represents the gas pipeline length corresponding to the adjacent discrete node, that is, the gas pipeline unit length.

4. The method for detecting leakage of town gas pipeline according to claim 1, characterized in that: The S4 specifically includes: S401: Reconstruct the actual signal into a turbulence power spectrum according to the turbulence energy spectrum theory: O(f)=x sensor ·E(f) E(f)=D·ò 2 / 3 ·f -5 / 3 Where O(f) represents the actual signal x sensor Energy contribution at frequency f, E(f) represents the turbulent energy spectrum density, i.e., the energy distribution of turbulence at frequency f, D represents the Kolmogorov constant, i.e., the proportional factor reflecting the turbulent energy distribution, and ò represents the turbulent dissipation rate; S402: removing the turbulence component in the actual signal in combination with the turbulence power spectrum to achieve denoising correction of the actual signal: Among them, x turb-free represents the actual signal after removing the turbulence component, that is, the actual pressure after correction, f c Represents the critical frequency associated with the gas for distinguishing the turbulent components.

5. The method for detecting leakage of town gas pipeline according to claim 1, characterized in that: The pressure difference is calculated as follows: ΔP=P actual -P predicted Where ΔP represents the actual pressure after correction P actual and the model predicts pressure P predicted The pressure difference between .

6. The method for detecting leakage of town gas pipeline according to claim 5, characterized in that: The method of determining the average pressure difference in combination with the time window determined based on the Bayesian theorem specifically includes: S701: Determine the optimal dynamic time window under the pressure difference based on Bayesian theorem: in, represents the optimal dynamic time, P(T w |ΔP) indicates the time window T under which the pressure difference ΔP is observed w The posterior probability, P(ΔPT w ) represents the time window T w The likelihood function for the pressure difference ΔP, P(T w ) represents the time window T w The prior distribution of T is the T selected when ΔP is not observed. w , P(ΔP) represents the normalized probability of the pressure difference ΔP as the signal observation value, π represents pi, exp represents the natural exponential function, and σ represents the probability of the pressure difference ΔP at T w The standard deviation of the pressure difference under T w The mean pressure difference under S702: Calculate the pressure difference at different times in the optimal dynamic time window: ΔP t =P actual,t -P predicted,t Among them, ΔP t Indicates that it belongs to the optimal dynamic time window The pressure difference at time t, P actual,t and P predicted,t They represent P at time t, i.e. the current time. actual and P predicted ; S703: Determine the average pressure difference value according to the calculated pressure difference value: in, Indicates the average pressure difference, P actual,i and P predicted,i Respectively represent the time i P actual and P at time i predicted , represents the maximum moment under the optimal dynamic time window, Indicates the maximum length of the optimal dynamic time window.

7. The method for detecting leakage of town gas pipeline according to claim 1, characterized in that: The S8 specifically includes: S801: Calculate the pressure gradient before the leak location and the pressure gradient after the leak location: in, Indicates the leak location x Leak The pressure gradient at each gas pipeline position x before, represents the pressure gradient behind the leak location, It means partial derivative, P in and P out Respectively represent the gas pipeline inlet pressure and gas pipeline outlet pressure, Represents x Leak The pressure of, P represents the actual pressure after correction; S802: Determine the gas pipeline leakage position based on the linear interpolation principle according to the pressure gradient before the leakage position and the pressure gradient after the leakage position:

8. The method for detecting leakage of town gas pipeline according to claim 1, characterized in that: After S8, the method further includes: Send out early warning information about the leakage location of the gas pipeline.

9. A system for detecting leakage of town gas pipelines, characterized in that: include: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the method for detecting leakage of a town gas pipeline according to any one of claims 1 to 8 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, a method for detecting leakage of a town gas pipeline as claimed in any one of claims 1 to 8 is implemented.

Citation Information

Cited By

  • Building gas leakage monitoring method and monitoring device based on pressure signals

    CN121702663A