Method and system for leak detection of a pipeline
By updating the floating-point coding and steady-state simulation model of the pipeline network, the shortcomings of manual inspection in pipeline leak detection are solved, realizing automated and accurate pipeline inspection, adapting to resistance changes caused by pipeline aging, and reducing costs.
Patent Information
- Application Number
- CN202311514564.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-14
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2043-11-14
AI Technical Summary
Current pipeline leak detection technology mainly relies on manual inspection, which cannot achieve 24-hour real-time detection, is prone to omissions, and is costly.
A steady-state simulation model is constructed by performing floating-point encoding and decoding based on the initial resistance value of the target pipeline network. The fitness value is calculated using the simulated values of node flow and pressure, and the model is updated to achieve automatic leak detection, taking into account the change of pipeline resistance over time.
It enables automated and precise leak detection of pipelines, improves detection accuracy and reduces costs, and adapts to resistance changes caused by pipeline aging.
Smart Images

Figure CN117553243B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of simulation analysis technology, and in particular to a pipeline leak detection method and system. Background Technology
[0002] Pipelines are used in various industries. For example, data centers use HVAC systems for cooling. The HVAC pipes in these systems integrate water supply and distribution with usage into a unified scheduling and distribution subsystem. If a leak occurs in an HVAC pipe, a large amount of water will be lost, leading to air entering the pipes, causing the entire HVAC system to malfunction, which in turn can cause servers to overheat and crash, resulting in unnecessary disruption to business operations.
[0003] Currently, leak detection in pipelines is mainly carried out through manual inspection. However, manual inspection is usually not possible for 24-hour real-time monitoring, and it is also prone to oversights and has high costs. Summary of the Invention
[0004] This invention provides a pipeline leak detection method, system, electronic device, and storage medium to solve the problems of easy omissions and high costs in pipeline leak detection in the prior art.
[0005] This invention provides a pipeline leak detection method, comprising:
[0006] Based on the initial resistance value of the target pipeline network, floating-point encoding and floating-point encoded number decoding are performed to obtain multiple floating-point decoded numbers;
[0007] The floating-point decoded numbers are input into the preset steady-state simulation model of the target pipeline network to obtain the node flow simulation value and / or node pressure simulation value corresponding to each floating-point decoded number.
[0008] Based on the node traffic simulation value and the preset first fitness function, the first fitness value corresponding to each of the floating-point decoded numbers is obtained, and / or, based on the node pressure simulation value and the preset second fitness function, the second fitness value corresponding to each of the floating-point decoded numbers is obtained.
[0009] Based on the first fitness value and / or the second fitness value, a target resistance value is determined from all the floating-point decoded numbers;
[0010] Based on the target resistance value, the steady-state simulation model is updated;
[0011] Pipeline leak detection is performed using the updated steady-state simulation model.
[0012] Optionally, the steps for constructing the steady-state simulation model include:
[0013] Obtain the structural topology of the target pipeline network;
[0014] Based on the structural topology, a connection matrix is obtained. The number of rows in the connection matrix is the number of nodes in the structural topology, and the number of columns in the connection matrix is the number of pipes in the structural topology. The values of the elements in the connection matrix are used to determine the positional relationship between nodes and pipes.
[0015] Based on the connection matrix, steady-state simulation of the fluid in the target pipeline network is performed to obtain the simulated flow rate and simulated pressure values of each node, thus completing the construction of the steady-state simulation model.
[0016] Optionally, the step of performing steady-state simulation of the fluid in the target pipeline network based on the connection matrix to obtain the simulated flow rate and simulated pressure values of each node includes:
[0017] The product of the initial resistance value and the preset initial flow matrix is determined as the first intermediate matrix;
[0018] The ratio between 1 and the first intermediate matrix is determined as the second intermediate matrix;
[0019] The product of the connection matrix, the second intermediate matrix, and the transpose of the connection matrix is determined as the first intermediate quantity;
[0020] The ratio between the preset value of node flow and the first intermediate value is determined as the first node voltage drop matrix;
[0021] The product of the first node pressure drop matrix and the transpose of the connection matrix is determined as the pipe segment pressure drop matrix;
[0022] The product of the pressure drop matrix of the pipe segment and the second intermediate matrix is determined as the flow rate matrix of the pipe segment to be confirmed;
[0023] If the difference between the flow matrix of the pipe segment to be confirmed and the initial flow matrix is greater than a preset difference threshold, the initial flow matrix is updated to the flow matrix of the pipe segment to be confirmed, and a new flow matrix of the pipe segment to be confirmed is obtained based on the new initial flow matrix.
[0024] If the difference between the flow matrix of the pipe segment to be confirmed and the initial flow matrix is less than or equal to the preset difference threshold, the current flow matrix of the pipe segment to be confirmed is determined as the target flow matrix.
[0025] Based on the target pipe segment flow matrix, the simulated flow value and simulated pressure value of each node are obtained.
[0026] Optionally, the step of obtaining the simulated node flow value for each node based on the target pipe segment flow matrix includes:
[0027] Based on the target pipeline flow matrix and the connection matrix, the simulated node flow value for each node is obtained.
[0028] Optionally, the step of obtaining the simulated node pressure value for each node based on the target pipe segment flow matrix includes:
[0029] The product of the target pipe segment flow matrix and the initial resistance value is determined as the third intermediate matrix;
[0030] The ratio between 1 and the third intermediate matrix is determined as the fourth intermediate matrix;
[0031] The product of the connection matrix, the fourth intermediate matrix, and the transpose of the connection matrix is determined as the second intermediate quantity;
[0032] The ratio between the preset node flow rate and the second intermediate value is determined as the second node voltage drop matrix;
[0033] Based on the second node pressure drop matrix and the preset initial node pressure value, the simulated node pressure value of each node is obtained.
[0034] Optionally, the step of determining the initial resistance value includes:
[0035] Obtain the resistance coefficient of the fluid in the target pipeline network, wherein the resistance coefficient is the ratio between 64 and the Reynolds number of the fluid;
[0036] The ratio between the pipe length and pipe diameter of the target pipeline network is determined as the first ratio.
[0037] The square of the fluid velocity is determined as the first intermediate value;
[0038] The product of the first intermediate value and the density of the fluid is determined as the second intermediate value;
[0039] The ratio between the second intermediate value and 2 is determined as the second ratio.
[0040] The product of the drag coefficient, the first ratio, and the second ratio is determined as the third intermediate value;
[0041] The squared value of the initial flow matrix is determined as the fourth intermediate value;
[0042] The ratio between the third intermediate value and the fourth intermediate value is determined as the initial resistance value.
[0043] Optionally, the steps for pipeline leak detection using the updated steady-state simulation model include:
[0044] Obtain the actual flow rate and actual pressure measurement values of the target nodes in the target pipeline network;
[0045] Based on the actual flow measurement value, the actual pressure measurement value, the updated node flow simulation value and node pressure simulation value of the target node in the steady-state simulation model, and the preset flow error threshold and pressure error threshold, pipeline leak detection is performed.
[0046] Optionally, the pipeline leak detection step, based on the actual flow measurement value, the actual pressure measurement value, the updated node flow simulation value and node pressure simulation value of the target node in the steady-state simulation model, and preset flow error thresholds and pressure error thresholds, includes:
[0047] The actual flow rate measurement value and the actual pressure measurement value are filtered respectively to obtain the actual flow rate filter value and the actual pressure filter value at the current moment;
[0048] If the difference between the actual flow filtered value and the corresponding node flow simulation value is greater than or equal to the flow error threshold, and / or the difference between the actual pressure filtered value and the corresponding node pressure simulation value is greater than or equal to the pressure error threshold, it is determined that the corresponding target node has a leakage situation, and an alarm is issued.
[0049] Optionally, the step of filtering the actual flow rate measurement value and the actual pressure measurement value to obtain the current time's filtered actual flow rate value and filtered actual pressure value includes:
[0050] The actual flow rate filter value from the previous time step is determined as the actual flow rate prediction value from the current time step, and the actual pressure covariance filter value from the previous time step is determined as the actual pressure covariance prediction value from the current time step.
[0051] The sum of the current actual traffic prediction value and the preset accuracy measurement parameter is determined as the first intermediate number;
[0052] The ratio between the current actual traffic prediction value and the first intermediate value is determined as the gain coefficient;
[0053] The difference between the actual flow measurement value and the actual flow prediction value at the current time is determined as the second intermediate number;
[0054] The product of the second intermediate number and the gain coefficient is determined as the third intermediate number;
[0055] The sum of the third intermediate number and the predicted actual traffic value at the current time is determined as the filtered actual traffic value at the current time.
[0056] The difference between 1 and the gain coefficient is determined as the fourth intermediate number;
[0057] The product of the fourth intermediate number and the predicted value of the true pressure covariance at the current time is determined as the filtered value of the true pressure covariance at the current time.
[0058] Based on the actual pressure measurement value and the actual pressure covariance filter value at the current moment, the actual pressure filter value at the current moment is obtained.
[0059] The present invention also provides a pipeline leak detection system, comprising:
[0060] The encoding and decoding module is used to perform floating-point encoding and decoding of floating-point encoded numbers based on the initial resistance value of the target pipeline network, so as to obtain multiple floating-point decoded numbers.
[0061] The simulation module is used to input the floating-point decoded number into a preset steady-state simulation model of the target pipeline network to obtain the node flow simulation value and / or node pressure simulation value corresponding to each of the floating-point decoded numbers.
[0062] The fitness calculation module is used to obtain the first fitness value corresponding to each of the floating-point decoded numbers based on the node traffic simulation value and the preset first fitness function, and / or to obtain the second fitness value corresponding to each of the floating-point decoded numbers based on the node pressure simulation value and the preset second fitness function.
[0063] A target resistance value determination module is used to determine a target resistance value from all the floating-point decoded numbers based on the first fitness value and / or the second fitness value;
[0064] An update module is used to update the steady-state simulation model based on the target resistance value;
[0065] The leak detection module is used to perform pipeline leak detection using the updated steady-state simulation model.
[0066] The beneficial effects of this invention are as follows: The pipeline leak detection method and system provided by this invention obtain multiple floating-point decoded numbers by performing floating-point encoding and decoding based on the initial resistance value of the target pipeline network; inputting the floating-point decoded numbers into a preset steady-state simulation model of the target pipeline network to obtain the node flow simulation value and / or node pressure simulation value corresponding to each floating-point decoded number; obtaining the first fitness value corresponding to each floating-point decoded number based on the node flow simulation value and a preset first fitness function, and / or obtaining the second fitness value corresponding to each floating-point decoded number based on the node pressure simulation value and a preset second fitness function; determining the target resistance value from all floating-point decoded numbers based on the first fitness value and / or the second fitness value; updating the steady-state simulation model based on the target resistance value; and using the updated steady-state simulation model to perform pipeline leak detection. This method and system can effectively achieve automatic leak detection of the target pipeline network and better considers the changes in pipe resistance due to aging over time, effectively improving the accuracy of steady-state simulation, achieving accurate pipeline leak detection at a low cost. Attached Figure Description
[0067] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0068] Figure 1 This is a schematic flowchart of the pipeline leak detection method provided by the present invention;
[0069] Figure 2 This is a schematic diagram of the pipe leak detection system provided by the present invention;
[0070] Figure 3 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0071] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0072] The following examples illustrate this approach. Figures 1-3 This invention describes the pipeline leak detection method and system provided by the present invention.
[0073] Please refer to Figure 1 The pipeline leak detection method provided in this embodiment includes:
[0074] S110: Based on the initial resistance value of the target pipeline network, perform floating-point encoding and floating-point encoded number decoding to obtain multiple floating-point decoded numbers.
[0075] Specifically, a genetic algorithm is used to perform floating-point encoding on the initial resistance value of the target pipeline network, obtaining multiple floating-point encoded numbers. These floating-point encoded numbers are then decoded to obtain floating-point decoded numbers, with a one-to-one correspondence between the two. The range of the floating-point encoding can be determined based on actual conditions, such as setting it to between 0.2 and 5 times the initial resistance value. Genetic operations such as selection, crossover, and mutation are performed within this range. The crossover probability can be set based on actual conditions, such as between 0.4 and 0.9. The mutation probability can also be set based on actual conditions, such as between 0.01 and 0.1. It should be noted that the initial resistance value can be randomly set, such as 300 Pa / m. The initial resistance value refers to the initial pipe segment resistance of the target pipeline network. Step S110, by performing floating-point encoding on the initial resistance value and decoding the floating-point encoded numbers to obtain multiple floating-point decoded numbers, facilitates the subsequent determination of a more optimal resistance value as the target resistance value based on these multiple floating-point decoded numbers.
[0076] It should be mentioned that, in order to achieve leak detection in the target pipeline network, this embodiment establishes a steady-state simulation model to obtain the simulated flow rate and pressure values of each node in the target pipeline network. The hydraulic calculation formula for the pipeline network in the steady-state simulation model can be summarized as P = SQ. 2 In this model, P represents the pipe segment pressure drop matrix, S represents the pipe segment resistance, and Q represents the pipe segment flow rate. It can be seen that the accuracy of the steady-state simulation model is closely related to the pipe segment resistance of the target pipeline network, which in turn is related to the resistance coefficient, pipe length, and pipe diameter. As the pipeline ages over time, its resistance coefficient changes, leading to variations in the pipe segment resistance. Using a fixed pipe segment resistance for steady-state simulation would reduce its accuracy. Therefore, this embodiment first sets an initial resistance value as the initial pipe segment resistance. Based on this initial resistance value, floating-point encoding and decoding are performed to obtain multiple floating-point decoded numbers, facilitating the subsequent determination of the target resistance value from these numbers. Then, the steady-state simulation model is updated based on the target resistance value, thereby improving the accuracy of the steady-state simulation.
[0077] S120: Input the floating-point decoded numbers into a preset steady-state simulation model of the target pipeline network to obtain the node flow simulation value and / or node pressure simulation value corresponding to each floating-point decoded number. That is, substitute each floating-point decoded number into the calculation of the steady-state simulation model to obtain the node flow simulation value and / or node pressure simulation value corresponding to each floating-point decoded number. It should be noted that, regarding node flow, the node flow out of the pipeline network is positive, and the node flow in the pipeline network is negative.
[0078] S130: Based on the node traffic simulation value and the preset first fitness function, obtain the first fitness value corresponding to each of the floating-point decoded numbers, and / or, based on the node pressure simulation value and the preset second fitness function, obtain the second fitness value corresponding to each of the floating-point decoded numbers.
[0079] Specifically, based on the node flow simulation value, the corresponding node's actual flow measurement value, and the first fitness function, a first fitness value corresponding to each floating-point decoded number is obtained; and / or, based on the node pressure simulation value, the corresponding node's actual pressure measurement value, and the second fitness function, a second fitness value corresponding to each floating-point decoded number is obtained. The actual flow measurement value can be obtained using a pre-set flow sensor on the node. The actual pressure measurement value can be obtained using a pre-set pressure sensor on the node.
[0080] In some embodiments, the mathematical expression of the first fitness function is:
[0081]
[0082] Where f(x)1 represents the first fitness function or the first fitness value, n represents the number of nodes in the target network, and q ti Let q represent the actual flow measurement value of the i-th node. ci This represents the simulated node traffic value for the i-th node.
[0083] The mathematical expression for the second fitness function is:
[0084]
[0085] Where f(x)2 represents the second fitness function or the second fitness value, p ti p represents the actual pressure measurement value of the i-th node. ci This represents the simulated node pressure value for the i-th node.
[0086] S140: Determine the target resistance value from all the floating-point decoded numbers based on the first fitness value and / or the second fitness value. That is, determine the target resistance value based on the first fitness value and / or the second fitness value of all floating-point decoded numbers.
[0087] Specifically, the target resistance value is determined by the floating-point decoding number corresponding to the minimum value among all first fitness values. Alternatively, the target resistance value is determined by the floating-point decoding number corresponding to the minimum value among all second fitness values. Or, the target resistance value is determined by the floating-point decoding number where the first fitness value is less than a preset fitness threshold, and the second fitness value is also less than the fitness threshold.
[0088] It should be noted that by calculating the fitness value as described above, the accuracy of the obtained target resistance value can be significantly improved.
[0089] S150: Based on the target resistance value, update the steady-state simulation model. That is, substitute the target resistance value into the calculation of the steady-state simulation model to obtain the updated simulated node flow rate and simulated node pressure value for each node.
[0090] S160: Pipeline leak detection is performed using the updated steady-state simulation model. Specifically, pipeline leak detection is performed based on the simulated flow rate and pressure values of each node in the updated steady-state simulation model, as well as the actual flow rate and pressure measurements of the preset target node (the node to be leaked). This achieves automatic leak detection of the target pipeline network with a high degree of automation and accuracy.
[0091] In some embodiments, the steps for constructing the steady-state simulation model include:
[0092] First, the structural topology of the target pipeline network is obtained.
[0093] Secondly, based on the structural topology, a connection matrix is obtained. The number of rows in the connection matrix is the number of nodes in the structural topology, and the number of columns in the connection matrix is the number of pipes in the structural topology. The values of the elements in the connection matrix are used to determine the positional relationship between nodes and pipes.
[0094] Specifically, the mathematical expression of the connection matrix is as follows:
[0095] A = [a ij ] n×m
[0096] Where A represents the connectivity matrix, n represents the number of rows in the connectivity matrix, and the number of rows in the connectivity matrix is equal to the number of nodes in the structural topology. m represents the number of columns in the connectivity matrix, and the number of columns in the connectivity matrix is equal to the number of pipe segments. a ij This represents the element in the i-th row and j-th column of the connection matrix corresponding to node i and pipe segment j. The elements of the entire connection matrix take values of 1, -1, and 0. Different values represent different positional relationships between the node and the pipe. Specifically, a ij The mathematical expression is:
[0097]
[0098] It should be noted that using a connection matrix to represent the structural topology of the target pipeline network facilitates subsequent steady-state simulation.
[0099] Finally, based on the connection matrix, steady-state simulation of the fluid in the target pipeline network is performed to obtain the simulated flow rate and simulated pressure values of each node, thus completing the construction of the steady-state simulation model.
[0100] In some embodiments, the step of performing steady-state simulation of the fluid in the target pipeline network based on the connection matrix to obtain the simulated node flow rate and simulated node pressure value for each node includes:
[0101] ① The product of the initial resistance value and the preset initial flow matrix is determined as the first intermediate matrix. Assuming the initial resistance value is S0 and the initial flow matrix is Q0, the mathematical expression of the first intermediate matrix is S0Q0.
[0102] ②The ratio between 1 and the first intermediate matrix is determined as the second intermediate matrix.
[0103] That is, the second intermediate matrix
[0104] ③ The product of the connection matrix, the second intermediate matrix, and the transpose of the connection matrix is determined as the first intermediate quantity. The mathematical expression of the first intermediate quantity is: AG0A T A T This represents the transpose of the connection matrix.
[0105] ④ The ratio between the preset node flow rate and the first intermediate value is determined as the first node voltage drop matrix. It should be noted that the preset node flow rate p is a known boundary condition.
[0106] First node pressure drop matrix
[0107] ⑤ The product of the first node pressure drop matrix and the transpose of the connection matrix is used to determine the pipe segment pressure drop matrix. That is, the pipe segment pressure drop matrix P = A T p1.
[0108] ⑥ The product of the pressure drop matrix of the pipe segment and the second intermediate matrix is determined as the flow rate matrix of the pipe segment to be confirmed. That is, the flow rate matrix of the pipe segment to be confirmed is Q1 = PG0.
[0109] ⑦ If the difference between the flow matrix of the pipe segment to be confirmed and the initial flow matrix is greater than a preset difference threshold, the initial flow matrix is updated to the flow matrix of the pipe segment to be confirmed. Based on the new initial flow matrix, a new flow matrix of the pipe segment to be confirmed is obtained. That is, the difference between Q1 and Q0 is calculated. If the difference is greater than the preset difference threshold, the initial flow matrix is updated to the flow matrix of the pipe segment to be confirmed. Based on the new initial flow matrix, the calculations in steps ① to ⑥ above are repeated to obtain a new flow matrix of the pipe segment to be confirmed.
[0110] ⑧ If the difference between the flow rate matrix of the pipe segment to be confirmed and the initial flow rate matrix is less than or equal to the preset difference threshold, the current flow rate matrix of the pipe segment to be confirmed is determined as the target flow rate matrix. It should be noted that the preset difference threshold can be set according to the actual situation, such as 0.1, etc., which will not be elaborated here.
[0111] ⑨ Based on the target pipe segment flow matrix, the simulated flow rate and simulated pressure values for each node are obtained. It should be noted that in the above process, a better target pipe segment flow matrix is obtained through iterative optimization of the initial flow matrix.
[0112] In some embodiments, the step of obtaining the simulated node flow value for each node based on the target pipe segment flow matrix includes:
[0113] Based on the target pipeline flow matrix and the connection matrix, the simulated node flow value for each node is obtained.
[0114] Specifically, based on the target pipeline flow matrix and the connection matrix, the mathematical expression of the simulated node flow value for each node is obtained as follows:
[0115] q ci =AQ c
[0116] Among them, Q c This represents the flow matrix of the target pipe segment. It should be noted that the simulated node flow values determined through the above steps have high accuracy.
[0117] In some embodiments, the step of obtaining the simulated node pressure value for each node based on the target pipe segment flow matrix includes:
[0118] First, the product of the target pipe segment flow rate matrix and the initial resistance value is determined as the third intermediate matrix. Specifically, the mathematical expression of the third intermediate matrix is S0Q. c .
[0119] Next, the ratio between 1 and the third intermediate matrix is determined as the fourth intermediate matrix.
[0120] That is, the fourth intermediate matrix
[0121] Then, the product of the connection matrix, the fourth intermediate matrix, and the transpose of the connection matrix is determined as the second intermediate quantity. That is, the second intermediate quantity is AG1A. T .
[0122] The ratio between the preset node flow rate and the second intermediate value is then determined as the second node voltage drop matrix. That is, the second node voltage drop matrix.
[0123] Finally, based on the second node pressure drop matrix and the preset initial node pressure values, the simulated node pressure value for each node is obtained. It should be noted that the pressure drop in the pipeline is proportional to the length of the pipe segment; therefore, given the second node pressure drop matrix and the preset initial node pressure values, the simulated node pressure value for each node can be obtained.
[0124] In some embodiments, the step of determining the initial resistance value includes:
[0125] ① Obtain the resistance coefficient of the fluid in the target pipeline network, wherein the resistance coefficient is the ratio between 64 and the Reynolds number of the fluid.
[0126] Specifically, the mathematical expression for the drag coefficient is:
[0127]
[0128] Where λ represents the drag coefficient and Re represents the Reynolds number.
[0129] The mathematical expression for the Reynolds number is:
[0130]
[0131] Where ρ represents the fluid density, v represents the fluid velocity, d represents the pipe diameter, and μ represents the fluid viscosity. All of these parameters are known quantities.
[0132] ② The ratio between the pipe length and pipe diameter of the target pipeline network is determined as the first ratio. That is... Where L represents the length of the pipe.
[0133] ③ The square of the fluid velocity is determined as the first intermediate value.
[0134] ④ The product of the first intermediate value and the density of the fluid is determined as the second intermediate value.
[0135] ⑤ The ratio between the second intermediate value and 2 is defined as the second ratio. The mathematical expression of the second ratio is:
[0136] ⑥ The product of the drag coefficient, the first ratio, and the second ratio is determined as the third intermediate value. The mathematical expression of the third intermediate value is:
[0137] ⑦ The square of the initial flow matrix is determined as the fourth intermediate value. The mathematical expression of the fourth intermediate value is Q0. 2 .
[0138] ⑧ The ratio between the third intermediate value and the fourth intermediate value is determined as the initial resistance value. That is...
[0139] In some embodiments, the step of performing pipeline leak detection using the updated steady-state simulation model includes:
[0140] First, obtain the actual flow rate and actual pressure measurement values of the target nodes in the target pipeline network. It should be noted that the actual flow rate measurement value can be obtained using a pre-set flow sensor at the target node. The actual pressure measurement value can be obtained using a pre-set pressure sensor at the target node. The data acquisition period can be set according to actual conditions, such as 10 seconds.
[0141] Secondly, pipeline leak detection is performed based on the actual flow rate measurement value, the actual pressure measurement value, the updated simulated flow rate and pressure values of the target node in the steady-state simulation model, and preset flow rate and pressure error thresholds. It should be noted that performing pipeline leak detection based on the actual flow rate measurement value, the actual pressure measurement value, the updated simulated flow rate and pressure values of the target node in the steady-state simulation model, and preset flow rate and pressure error thresholds, achieves high accuracy, high automation, and low cost.
[0142] In some embodiments, the pipeline leak detection step, based on the actual flow measurement value, the actual pressure measurement value, the updated node flow simulation value and node pressure simulation value of the target node in the steady-state simulation model, and preset flow error thresholds and pressure error thresholds, includes:
[0143] ① The actual flow rate measurement value and the actual pressure measurement value are filtered respectively to obtain the current time's filtered actual flow rate value and filtered actual pressure value. It should be noted that filtering the actual flow rate measurement value and the actual pressure measurement value can improve the accuracy of the measurement values and help improve the accuracy and effectiveness of subsequent leak detection.
[0144] ② If the difference between the actual flow rate filter value and the corresponding simulated flow rate value at the node is greater than or equal to the flow rate error threshold, and / or the difference between the actual pressure filter value and the corresponding simulated pressure value at the node is greater than or equal to the pressure error threshold, a leak is determined at the corresponding target node, and an alarm is triggered. It should be noted that by employing the above steps, highly accurate pipeline leak detection can be achieved in the target pipeline network at a low cost.
[0145] In some embodiments, the step of filtering the actual flow rate measurement value and the actual pressure measurement value to obtain the current time-filtered actual flow rate value and the current-time filtered actual pressure value includes:
[0146] ① The actual flow rate filtered value from the previous time step is determined as the actual flow rate prediction value from the current time step, and the actual pressure covariance filtered value from the previous time step is determined as the actual pressure covariance prediction value from the current time step. That is, let q(t|t-1)=q(t-1|t-1), p(t|t-1)=p(t-1|t-1), where q(t|t-1) represents the actual flow rate prediction value from the current time step, q(t-1|t-1) represents the actual flow rate filtered value from the previous time step, p(t|t-1) represents the actual pressure covariance prediction value from the current time step, and p(t-1|t-1) represents the actual pressure covariance filtered value from the previous time step.
[0147] ②The sum of the predicted actual flow rate at the current moment and the preset accuracy measurement parameter is determined as the first intermediate number.
[0148] ③The ratio between the current actual traffic prediction value and the first intermediate value is determined as the gain coefficient.
[0149] Specifically, the mathematical expression for the gain coefficient is:
[0150]
[0151] Wherein, K(t) represents the gain coefficient, and R represents the accuracy measurement parameter. The accuracy measurement parameter can be set according to the actual situation, such as 0.01.
[0152] ④ The difference between the actual flow measurement value and the actual flow prediction value at the current time is determined as the second intermediate number.
[0153] ⑤ The product of the second intermediate number and the gain coefficient is determined as the third intermediate number.
[0154] ⑥ The sum of the third intermediate number and the predicted actual traffic flow at the current time is determined as the filtered actual traffic flow value at the current time.
[0155] Specifically, the mathematical expression of the current real flow filtering value is as follows:
[0156] q(t|t)=q(t|t-1)+K(t)*[q t -q(t|t-1)]
[0157] Where q(t|t) represents the actual flow filtering value of the current node at the current time, q t This represents the actual traffic measurement value of the current node at the current moment.
[0158] ⑦ The difference between 1 and the gain coefficient is determined as the fourth intermediate number.
[0159] ⑧ The product of the fourth intermediate number and the predicted value of the true pressure covariance at the current time is determined as the filtered value of the true pressure covariance at the current time.
[0160] Specifically, the mathematical expression for the current real pressure covariance filter value is:
[0161] p(t|t)=[1-K(t)]*p(t|t-1)
[0162] Where p(t|t) represents the true pressure covariance filter value at the current moment.
[0163] It should be noted that when calculating the value at time t=1, the value at time t=0 needs to be preset. Therefore, we can preset q(0|0)=0 and p(0|0)=1.
[0164] ⑨ Based on the actual pressure measurement value and the actual pressure covariance filter value at the current moment, the actual pressure filter value at the current moment is obtained. It can be understood that the actual pressure filter value at the current moment can be obtained based on the actual pressure measurement value at the current node and the actual pressure covariance filter value at the current moment.
[0165] The pipeline leak detection system provided by the present invention is described below. The pipeline leak detection system described below can be referred to in correspondence with the pipeline leak detection method described above.
[0166] Please refer to Figure 2 This embodiment also provides a pipeline leak detection system, including:
[0167] The encoding / decoding module 210 is used to perform floating-point encoding and decoding of floating-point encoded numbers based on the initial resistance value of the target pipeline network, so as to obtain multiple floating-point decoded numbers.
[0168] The simulation module 220 is used to input the floating-point decoded number into the preset steady-state simulation model of the target pipeline network to obtain the node flow simulation value and / or node pressure simulation value corresponding to each of the floating-point decoded numbers.
[0169] The fitness calculation module 230 is used to obtain the first fitness value corresponding to each of the floating-point decoded numbers based on the node traffic simulation value and the preset first fitness function, and / or to obtain the second fitness value corresponding to each of the floating-point decoded numbers based on the node pressure simulation value and the preset second fitness function.
[0170] The target resistance value determination module 240 is used to determine the target resistance value from all the floating-point decoded numbers based on the first fitness value and / or the second fitness value;
[0171] The update module 250 is used to update the steady-state simulation model based on the target resistance value;
[0172] The leak detection module 260 is used to perform pipeline leak detection using the updated steady-state simulation model. The pipeline leak detection system in this embodiment effectively achieves automatic leak detection of the target pipeline network and takes into account the changes in pipe resistance due to aging over time, thus effectively improving the accuracy of steady-state simulation. It achieves accurate pipeline leak detection at a low cost, with a high degree of automation and strong feasibility.
[0173] In some embodiments, the system further includes: a steady-state simulation model construction module, the steady-state simulation model construction module comprising:
[0174] A topology acquisition unit is used to acquire the structural topology of the target pipeline network;
[0175] A connection matrix acquisition unit is used to obtain a connection matrix based on the structural topology. The number of rows in the connection matrix is the number of nodes in the structural topology, and the number of columns in the connection matrix is the number of pipes in the structural topology. The values of the elements in the connection matrix are used to determine the positional relationship between nodes and pipes.
[0176] The steady-state simulation unit is used to perform steady-state simulation of the fluid in the target pipeline network based on the connection matrix, to obtain the simulated flow rate and simulated pressure values of each node, and to complete the construction of the steady-state simulation model.
[0177] In some embodiments, the steady-state simulation unit is specifically used to determine the product of the initial resistance value and the preset initial flow matrix as a first intermediate matrix;
[0178] The ratio between 1 and the first intermediate matrix is determined as the second intermediate matrix;
[0179] The product of the connection matrix, the second intermediate matrix, and the transpose of the connection matrix is determined as the first intermediate quantity;
[0180] The ratio between the preset value of node flow and the first intermediate value is determined as the first node voltage drop matrix;
[0181] The product of the first node pressure drop matrix and the transpose of the connection matrix is determined as the pipe segment pressure drop matrix;
[0182] The product of the pressure drop matrix of the pipe segment and the second intermediate matrix is determined as the flow rate matrix of the pipe segment to be confirmed;
[0183] If the difference between the flow matrix of the pipe segment to be confirmed and the initial flow matrix is greater than a preset difference threshold, the initial flow matrix is updated to the flow matrix of the pipe segment to be confirmed, and a new flow matrix of the pipe segment to be confirmed is obtained based on the new initial flow matrix.
[0184] If the difference between the flow matrix of the pipe segment to be confirmed and the initial flow matrix is less than or equal to the preset difference threshold, the current flow matrix of the pipe segment to be confirmed is determined as the target flow matrix.
[0185] Based on the target pipe segment flow matrix, the simulated flow value and simulated pressure value of each node are obtained.
[0186] In some embodiments, the steady-state simulation unit is further configured to obtain the node flow simulation value for each node based on the target pipeline flow matrix and the connection matrix.
[0187] In some embodiments, the steady-state simulation unit is further configured to determine the product of the target pipe segment flow matrix and the initial resistance value as a third intermediate matrix;
[0188] The ratio between 1 and the third intermediate matrix is determined as the fourth intermediate matrix;
[0189] The product of the connection matrix, the fourth intermediate matrix, and the transpose of the connection matrix is determined as the second intermediate quantity;
[0190] The ratio between the preset node flow rate and the second intermediate value is determined as the second node voltage drop matrix;
[0191] Based on the second node pressure drop matrix and the preset initial node pressure value, the simulated node pressure value of each node is obtained.
[0192] In some embodiments, the system further includes: an initial resistance value determination module, configured to obtain the resistance coefficient of the fluid in the target pipeline network, wherein the resistance coefficient is the ratio between 64 and the Reynolds number of the fluid;
[0193] The ratio between the pipe length and pipe diameter of the target pipeline network is determined as the first ratio.
[0194] The square of the fluid velocity is determined as the first intermediate value;
[0195] The product of the first intermediate value and the density of the fluid is determined as the second intermediate value;
[0196] The ratio between the second intermediate value and 2 is determined as the second ratio.
[0197] The product of the drag coefficient, the first ratio, and the second ratio is determined as the third intermediate value;
[0198] The squared value of the initial flow matrix is determined as the fourth intermediate value;
[0199] The ratio between the third intermediate value and the fourth intermediate value is determined as the initial resistance value.
[0200] In some embodiments, the leak detection module 260 includes:
[0201] The measurement value acquisition unit is used to acquire the actual flow measurement value and the actual pressure measurement value of the target node in the target pipeline network;
[0202] The pipeline leak detection unit is used to perform pipeline leak detection based on the actual flow measurement value, the actual pressure measurement value, the updated node flow simulation value and node pressure simulation value of the target node in the steady-state simulation model, and the preset flow error threshold and pressure error threshold.
[0203] In some embodiments, the pipeline leak detection unit includes:
[0204] The filtering subunit is used to filter the actual flow measurement value and the actual pressure measurement value respectively to obtain the current real flow filter value and the current real pressure filter value.
[0205] The leak detection subunit is used to determine that the corresponding target node has a leak and to issue an alarm when the difference between the actual flow filtered value and the corresponding node flow simulation value is greater than or equal to the flow error threshold, and / or the difference between the actual pressure filtered value and the corresponding node pressure simulation value is greater than or equal to the pressure error threshold.
[0206] In some embodiments, the leak detection subunit is specifically used to determine the true flow rate filter value of the previous moment as the true flow rate prediction value of the current moment, and to determine the true pressure covariance filter value of the previous moment as the true pressure covariance prediction value of the current moment.
[0207] The sum of the current actual traffic prediction value and the preset accuracy measurement parameter is determined as the first intermediate number;
[0208] The ratio between the current actual traffic prediction value and the first intermediate value is determined as the gain coefficient;
[0209] The difference between the actual flow measurement value and the actual flow prediction value at the current time is determined as the second intermediate number;
[0210] The product of the second intermediate number and the gain coefficient is determined as the third intermediate number;
[0211] The sum of the third intermediate number and the predicted actual traffic value at the current time is determined as the filtered actual traffic value at the current time.
[0212] The difference between 1 and the gain coefficient is determined as the fourth intermediate number;
[0213] The product of the fourth intermediate number and the predicted value of the true pressure covariance at the current time is determined as the filtered value of the true pressure covariance at the current time.
[0214] Based on the actual pressure measurement value and the actual pressure covariance filter value at the current moment, the actual pressure filter value at the current moment is obtained.
[0215] Figure 3 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 3As shown, the electronic device may include: a processor 310, a communication interface 320, a memory 330, and a communication bus 340, wherein the processor 310, the communication interface 320, and the memory 330 communicate with each other through the communication bus 340. The processor 310 can call logic instructions in the memory 330 to execute a pipeline leak detection method. This method includes: performing floating-point encoding and decoding based on the initial resistance value of the target pipeline network to obtain multiple floating-point decoded numbers; inputting the floating-point decoded numbers into a preset steady-state simulation model of the target pipeline network to obtain a node flow simulation value and / or a node pressure simulation value corresponding to each floating-point decoded number; obtaining a first fitness value corresponding to each floating-point decoded number based on the node flow simulation value and a preset first fitness function, and / or obtaining a second fitness value corresponding to each floating-point decoded number based on the node pressure simulation value and a preset second fitness function; determining a target resistance value from all the floating-point decoded numbers based on the first fitness value and / or the second fitness value; updating the steady-state simulation model based on the target resistance value; and performing pipeline leak detection using the updated steady-state simulation model.
[0216] Furthermore, the logical instructions in the aforementioned memory 330 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0217] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the pipeline leak detection method provided by the above methods. The method includes: performing floating-point encoding and decoding of the floating-point encoded number based on the initial resistance value of the target pipeline network to obtain multiple floating-point decoded numbers; inputting the floating-point decoded numbers into a preset steady-state simulation model of the target pipeline network to obtain a node flow simulation value and / or a node pressure simulation value corresponding to each of the floating-point decoded numbers; obtaining a first fitness value corresponding to each of the floating-point decoded numbers based on the node flow simulation value and a preset first fitness function, and / or obtaining a second fitness value corresponding to each of the floating-point decoded numbers based on the node pressure simulation value and a preset second fitness function; determining a target resistance value from all the floating-point decoded numbers based on the first fitness value and / or the second fitness value; updating the steady-state simulation model based on the target resistance value; and performing pipeline leak detection using the updated steady-state simulation model.
[0218] The system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0219] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0220] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for detecting leaks in pipelines, characterized in that, include: Based on the initial resistance value of the target pipeline network, floating-point encoding and floating-point encoded number decoding are performed to obtain multiple floating-point decoded numbers; The floating-point decoded numbers are input into the preset steady-state simulation model of the target pipeline network to obtain the node flow simulation value and / or node pressure simulation value corresponding to each floating-point decoded number. Based on the node traffic simulation value and the preset first fitness function, the first fitness value corresponding to each of the floating-point decoded numbers is obtained, and / or, based on the node pressure simulation value and the preset second fitness function, the second fitness value corresponding to each of the floating-point decoded numbers is obtained. Based on the first fitness value and / or the second fitness value, a target resistance value is determined from all the floating-point decoded numbers; Based on the target resistance value, the steady-state simulation model is updated; Pipeline leak detection is performed using the updated steady-state simulation model. The steps for constructing the steady-state simulation model include: Obtain the structural topology of the target pipeline network; Based on the structural topology, a connection matrix is obtained. The number of rows in the connection matrix is the number of nodes in the structural topology, and the number of columns in the connection matrix is the number of pipes in the structural topology. The values of the elements in the connection matrix are used to determine the positional relationship between nodes and pipes. Based on the connection matrix, steady-state simulation of the fluid in the target pipeline network is performed to obtain the simulated flow rate and simulated pressure of each node, thus completing the construction of the steady-state simulation model. Based on the connection matrix, the steps for performing steady-state simulation of the fluid in the target pipeline network to obtain the simulated flow rate and simulated pressure values of each node include: The product of the initial resistance value and the preset initial flow matrix is determined as the first intermediate matrix; The ratio between 1 and the first intermediate matrix is determined as the second intermediate matrix; The product of the connection matrix, the second intermediate matrix, and the transpose of the connection matrix is determined as the first intermediate quantity; The ratio between the preset node flow rate and the first intermediate value is determined as the first node voltage drop matrix; The product of the first node pressure drop matrix and the transpose of the connection matrix is determined as the pipe segment pressure drop matrix; The product of the pressure drop matrix of the pipe segment and the second intermediate matrix is determined as the flow rate matrix of the pipe segment to be confirmed; If the difference between the flow matrix of the pipe segment to be confirmed and the initial flow matrix is greater than a preset difference threshold, the initial flow matrix is updated to the flow matrix of the pipe segment to be confirmed, and a new flow matrix of the pipe segment to be confirmed is obtained based on the new initial flow matrix. If the difference between the flow matrix of the pipe segment to be confirmed and the initial flow matrix is less than or equal to the preset difference threshold, the current flow matrix of the pipe segment to be confirmed is determined as the target flow matrix. Based on the target pipe segment flow matrix, the simulated flow value and simulated pressure value of each node are obtained; The steps for determining the initial resistance value include: Obtain the resistance coefficient of the fluid in the target pipeline network, wherein the resistance coefficient is the ratio between 64 and the Reynolds number of the fluid; The ratio between the pipe length and pipe diameter of the target pipeline network is determined as the first ratio. The square of the fluid velocity is determined as the first intermediate value; The product of the first intermediate value and the density of the fluid is determined as the second intermediate value; The ratio between the second intermediate value and 2 is determined as the second ratio. The product of the drag coefficient, the first ratio, and the second ratio is determined as the third intermediate value; The squared value of the initial flow matrix is determined as the fourth intermediate value; The ratio between the third intermediate value and the fourth intermediate value is determined as the initial resistance value; The mathematical expression of the first fitness function is as follows: ; in, This represents the first fitness function or the first fitness value, where n represents the number of nodes in the target network. This represents the actual flow measurement value of the i-th node. This represents the simulated node traffic value for the i-th node; The mathematical expression for the second fitness function is: ; in, This represents the second fitness function or the second fitness value. This represents the actual pressure measurement value of the i-th node. This represents the simulated node pressure value of the i-th node.
2. The pipeline leak detection method according to claim 1, characterized in that, The steps for obtaining the simulated node flow value for each node based on the target pipe segment flow matrix include: Based on the target pipe segment flow matrix and the connection matrix, the simulated node flow value for each node is obtained.
3. The pipeline leak detection method according to claim 1, characterized in that, The steps for obtaining the simulated node pressure value for each node based on the target pipe segment flow matrix include: The product of the target pipe segment flow matrix and the initial resistance value is determined as the third intermediate matrix; The ratio between 1 and the third intermediate matrix is determined as the fourth intermediate matrix; The product of the connection matrix, the fourth intermediate matrix, and the transpose of the connection matrix is determined as the second intermediate quantity; The ratio between the preset node flow rate and the second intermediate value is determined as the second node voltage drop matrix; Based on the second node pressure drop matrix and the preset initial node pressure value, the simulated node pressure value of each node is obtained.
4. The pipeline leak detection method according to claim 1, characterized in that, The steps for pipeline leak detection using the updated steady-state simulation model include: Obtain the actual flow rate and actual pressure measurement values of the target nodes in the target pipeline network; Based on the actual flow measurement value, the actual pressure measurement value, the updated node flow simulation value and node pressure simulation value of the target node in the steady-state simulation model, and the preset flow error threshold and pressure error threshold, pipeline leak detection is performed.
5. The pipeline leak detection method according to claim 4, characterized in that, Based on the actual flow rate measurement value, the actual pressure measurement value, the updated node flow rate simulation value and node pressure simulation value of the target node in the steady-state simulation model, and the preset flow rate error threshold and pressure error threshold, the pipeline leak detection steps include: The actual flow rate measurement value and the actual pressure measurement value are filtered respectively to obtain the actual flow rate filter value and the actual pressure filter value at the current moment; If the difference between the actual flow filtered value and the corresponding node flow simulation value is greater than or equal to the flow error threshold, and / or the difference between the actual pressure filtered value and the corresponding node pressure simulation value is greater than or equal to the pressure error threshold, it is determined that the corresponding target node has a leakage situation, and an alarm is issued.
6. The pipeline leak detection method according to claim 5, characterized in that, The steps of filtering the actual flow rate measurement value and the actual pressure measurement value to obtain the current time's filtered actual flow rate value and filtered actual pressure value include: The actual flow rate filter value from the previous time step is determined as the actual flow rate prediction value from the current time step, and the actual pressure covariance filter value from the previous time step is determined as the actual pressure covariance prediction value from the current time step. The sum of the current actual traffic prediction value and the preset accuracy measurement parameter is determined as the first intermediate number; The ratio between the current actual traffic prediction value and the first intermediate value is determined as the gain coefficient; The difference between the actual flow measurement value and the actual flow prediction value at the current time is determined as the second intermediate number; The product of the second intermediate number and the gain coefficient is determined as the third intermediate number; The sum of the third intermediate number and the predicted actual traffic value at the current time is determined as the filtered actual traffic value at the current time. The difference between 1 and the gain coefficient is determined as the fourth intermediate number; The product of the fourth intermediate number and the predicted value of the true pressure covariance at the current time is determined as the filtered value of the true pressure covariance at the current time. Based on the actual pressure measurement value and the actual pressure covariance filter value at the current moment, the actual pressure filter value at the current moment is obtained.
7. A pipeline leak detection system, characterized in that, Using the pipeline leak detection method according to any one of claims 1 to 6, the pipeline leak detection system comprises: The encoding and decoding module is used to perform floating-point encoding and decoding of floating-point encoded numbers based on the initial resistance value of the target pipeline network, so as to obtain multiple floating-point decoded numbers. The simulation module is used to input the floating-point decoded number into a preset steady-state simulation model of the target pipeline network to obtain the node flow simulation value and / or node pressure simulation value corresponding to each of the floating-point decoded numbers. The fitness calculation module is used to obtain the first fitness value corresponding to each of the floating-point decoded numbers based on the node traffic simulation value and the preset first fitness function, and / or to obtain the second fitness value corresponding to each of the floating-point decoded numbers based on the node pressure simulation value and the preset second fitness function. A target resistance value determination module is used to determine a target resistance value from all the floating-point decoded numbers based on the first fitness value and / or the second fitness value; An update module is used to update the steady-state simulation model based on the target resistance value; The leak detection module is used to perform pipeline leak detection using the updated steady-state simulation model.
Citation Information
Patent Citations
Pipeline leakage detection method based on pipeline pressure data
CN104180166A
Pipe network leak detecting method in combination with resistance identification
CN105221933A