A water supply network water demand checking method based on truncated normal distribution

CN116822244BActive Publication Date: 2026-08-18INNOVATION CENTER OF YANGTZE RIVER DELTA ZHEJIANG UNIVERSITY +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310909563.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-24
Publication Date
2026-08-18
Estimated Expiration
2043-07-24

AI Technical Summary

Technical Problem

节点需水量校核通常基于贝叶斯定理,并假设服从正态概率分布,而正态分布的无限可能性会导致对节点需水量不切实际和错误的估计

Benefits of technology

[0039] The beneficial effects of this invention are as follows: First, this invention uses a truncated normal distribution to construct a truncated prior probability distribution and a truncated likelihood function, limiting the node water demand and monitoring data to a reasonable range. Second, it establishes a water demand verification objective function based on the truncated normal distribution, defining the solution node water demand distribution within a reasonable interval, thereby improving verification accuracy and providing a scientific basis for hydraulic modeling of water supply networks. Applying this invention to two pipe networks, the application results demonstrate its superiority in node water demand verification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116822244B_ABST
    Figure CN116822244B_ABST
Patent Text Reader

Abstract

The application discloses a water demand checking method for a water supply pipe network based on a truncated normal distribution and belongs to the field of pipe network water power modeling. The method comprises the following steps: (1) using a truncated normal distribution, constructing a truncated prior probability distribution of node water demand in the water supply pipe network and a truncated likelihood function of monitoring data; (2) based on the Bayes theorem, fusing the truncated prior probability distribution and the truncated likelihood function, constructing a truncated posterior probability distribution, and establishing a checking objective function by maximizing the truncated posterior probability distribution; (3) using the Newton iteration method to solve the objective function, obtaining the water demand adjustment amount of each node in the water supply pipe network, and iteratively solving the water demand of each node in the water supply pipe network. The application establishes a water demand checking objective function based on the truncated normal distribution, defines that the water demand distribution of the node to be solved is within a reasonable interval, and further improves the checking accuracy of the node water demand, thereby providing a scientific basis for water power modeling of the water supply pipe network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of hydraulic modeling of pipe networks, specifically a method for verifying the water demand of water supply pipe networks based on a truncated normal distribution. Background Technology

[0002] The water demand parameters at nodes in a water supply network are one of the most significant factors affecting the accuracy of network simulation. Large-scale, real-world water supply networks are equipped with node pressure sensors and pipeline flow sensors, whose monitoring information aids in the verification of network models. However, uncertainties in measurement and the model itself can significantly impact the accuracy of parameter estimation, and verifying node water demand in noisy environments remains a major challenge in hydraulic modeling of water supply networks.

[0003] Data assimilation considering various uncertainties has been used for parameter verification in model simulations. Currently, data assimilation methods for water supply network parameter verification mainly include sampling-based analytical methods and analytical solution methods. Sampling-based methods require frequent evaluation of sample probability density, which is particularly time-consuming when dealing with large-scale water supply networks, and has never been the first choice for modeling engineers. Therefore, computationally efficient analytical solution methods (such as the Gaussian approximation method) have received widespread attention. A common assumption of this method is that the prior information on node water demand and the monitoring information provided by the SCADA system both follow a normal distribution. The normal distribution assumes that random variables are distributed from negative infinity to positive infinity; however, in practice, water demand and monitoring data are usually distributed within a finite region. Therefore, the traditional normal distribution assumption that parameters are distributed in an infinite interval is inconsistent with reality, resulting in the possibility of negative or very large values ​​for the verified node water demand, making it unusable in practice.

[0004] In summary, accurate verification of node water demand is crucial for the modeling and management of water supply networks. Node water demand verification is typically based on Bayes' theorem and assumes a normal probability distribution. However, the infinite possibilities of a normal distribution can lead to unrealistic and erroneous estimates of node water demand. Summary of the Invention

[0005] To address the aforementioned issues, this invention aims to propose a method for verifying water demand in water supply networks based on a truncated normal distribution. This method restricts node water demand and monitoring data to a feasible range, avoiding unreasonable verification results such as negative pressure and negative water demand caused by traditional algorithms, thereby improving the practicality of the network hydraulic model.

[0006] To achieve the above objectives, the present invention takes the following steps:

[0007] A method for verifying the water demand of a water supply network based on a truncated normal distribution includes the following steps:

[0008] (1) Using the truncated normal distribution, construct the truncated prior probability distribution of water demand at nodes in the water supply network and the truncated likelihood function of monitoring data;

[0009] (2) Based on Bayes' theorem, the truncated prior probability distribution and the truncated likelihood function are integrated to construct the truncated posterior probability distribution. By maximizing the truncated posterior probability distribution, the verification objective function is established.

[0010] (3) Use the Newton-Raphson iteration method to solve the objective function, obtain the water demand adjustment of each node of the water supply network, and iteratively solve the water demand of each node of the water supply network.

[0011] Furthermore, the prior probability distribution of the cutoff water demand of nodes in the water supply network mentioned in step (1) is as follows:

[0012]

[0013]

[0014] Where p(.) represents the probability density function, x t x represents the water demand at time t. t (i) represents the water demand of node i at time t, and n represents the number of nodes in the water supply network. Let x represent the normalization constant of node i at time t. t|t-1 (i) represents the average water demand of node i, P t|t-1 (i) represents the variance of water demand at node i, where λ is a constant and λ>0, a x (i), b x (i) represents the range of water demand distribution for node i.

[0015] Furthermore, the truncated likelihood function of the monitoring data mentioned in step (1) is specifically as follows:

[0016]

[0017]

[0018] Where m represents the number of monitoring points in the water supply network, and each monitoring point is equipped with a pressure sensor or a flow sensor, y t y represents the monitoring data at time t. t (j) represents the monitoring data of monitoring point j at time t. h(x) represents the normalization constant of the monitoring data at monitoring point j at time t; t j) represents the node's water demand as x t At that time, the output value of the j-th sensor in the WDS hydraulic model; R(j) represents the variance of the noise in the monitoring data at monitoring point j, λ is a constant and λ>0, a h(j) represents the minimum value output by the WDS hydraulic model, b h (j) represents the maximum value output by the WDS hydraulic model.

[0019] Furthermore, the truncated posterior probability distribution described in step (2) is as follows:

[0020]

[0021] Where p(x) t (i) represents the water demand x of node i at time t. t (i) is the truncated prior probability distribution, p(y t (j)|x t ) indicates that the water demand is x t Monitoring data y at monitoring point j t The truncated likelihood function of (j), where n represents the number of nodes in the water supply network, m represents the number of monitoring points in the water supply network, and p(x) t |y t ) represents the truncated posterior probability distribution at time t.

[0022] Furthermore, the verification objective function is as follows:

[0023]

[0024] Wherein, J(x) t Let x be the objective function for verifying the water demand at time t. t|t-1 (i) represents the average water demand of node i at time t, P t|t-1 (i) represents the variance of water demand at node i at time t, where λ is a constant and λ>0, a x (i), b x (i) represents the water demand distribution range of node i, h(x t j) represents the node's water demand as x t At that time, the output value of the j-th sensor in the WDS hydraulic model, R(j) represents the variance of the noise in the monitoring data at monitoring point j, and a h (j) represents the minimum value output by the WDS hydraulic model, b h (j) represents the maximum value output by the WDS hydraulic model.

[0025] Furthermore, in step (3), the objective function is linearized, and the solution corresponding to the objective function is obtained by Newton's iteration method, as shown in the following equation:

[0026]

[0027]

[0028] in, This represents the adjustment amount of water demand at the node in the k-th iteration. Let be the water demand of the node in the k-th iteration. and These are the verification objective functions J(x) t The first and second gradients of ).

[0029] Furthermore, before solving, initialize x t|t-1 This is prior information, namely the average water demand.

[0030] Furthermore, the aforementioned verification objective function J(x) t The first and second gradients are as follows:

[0031]

[0032]

[0033] in, Represents the squared residual matrix. Represents the Jacobian matrix. This represents the residual cubic matrix, with the superscript T indicating transpose.

[0034] Furthermore, the aforementioned as well as The calculation method is as follows:

[0035]

[0036]

[0037]

[0038] Furthermore, after K iterations... Water demand at the verified node x t Using covariance This indicates its uncertainty, and K represents the preset number of iterations.

[0039] The beneficial effects of this invention are as follows: First, this invention uses a truncated normal distribution to construct a truncated prior probability distribution and a truncated likelihood function, limiting the node water demand and monitoring data to a reasonable range. Second, it establishes a water demand verification objective function based on the truncated normal distribution, defining the solution node water demand distribution within a reasonable interval, thereby improving verification accuracy and providing a scientific basis for hydraulic modeling of water supply networks. Applying this invention to two pipe networks, the application results demonstrate its superiority in node water demand verification. Attached Figure Description

[0040] Figure 1This is an example of the analytical solution calculation process for the nonlinear verification objective function shown in this embodiment of the invention;

[0041] Figure 2 This is a model diagram of a water supply network shown in an embodiment of the present invention;

[0042] Figure 3 This is a graph showing the difference between the estimated and theoretical values ​​of the time-delay simulation state, as illustrated in an embodiment of the present invention.

[0043] Figure 4 A real large-scale pipeline network model diagram shown for the implementation of this invention;

[0044] Figure 5 The comparison results of the measured pressure values ​​and model simulation values ​​of 61 estimated sensors shown in the embodiments of the present invention are as follows: (a) is the estimated group of sensors, and (b) is the verification group of sensors. Detailed Implementation

[0045] The purpose of this invention is to develop a method for verifying the water demand of a water supply network based on a truncated normal distribution. The specific embodiments of this invention are described in further detail below with reference to the accompanying drawings. This invention is specifically applied to the estimation of state parameters of urban water distribution systems.

[0046] The water demand verification method for water supply networks based on truncated normal distribution proposed in this invention mainly includes the following steps:

[0047] Step 1. Truncate the prior probability distribution and model the likelihood function.

[0048] The probability density function (PDF) of the truncated normal distribution in the interval [a, b] is as follows:

[0049]

[0050] Where x is a random variable; μ and σ are the expected value and standard deviation of the normal distribution; λ is a constant and λ>0; C is a normalization constant, which ensures that the integral of the above formula over the interval [a, b] is 1.

[0051] (1) Truncating the prior probability distribution

[0052] Engineers or pipeline system operators can determine the water demand at each node (x) based on water meter data, site surveys, or engineering experience. t Parameters of the probability distribution (mean, variance, distribution range, etc.). For the water demand x of a single node to be verified. t (i), assuming its mean is x t|t-1 (i) The variance is P t|t-1 (i) The distribution range is [a x (i), b x(i)], then the truncated prior probability density function has the following form:

[0053]

[0054] Where, x t (i) represents the water demand of node i at time t, p(.) represents the probability density function, and C x(i) a represents the normalization constant of node i. x (i), b x (i) represents the range of water demand distribution for node i.

[0055] Assuming the pipeline network has n nodes, and the water demand of each node is independent, then the prior probability distribution of the cutoff water demand of all nodes at time t is as follows:

[0056]

[0057] (2) Cut-off likelihood function (conditional probability distribution)

[0058] Assume the monitoring data y at the j-th monitoring point in the pipeline network t The noise of (j) is η t (j), η t (j)∈[a η (j), b η (j)], the variance of the noise is R(j); y t (j) The mean is the node water demand is x t At that time, the output value h(x) of the WDS hydraulic model at the j-th sensor t The WDS hydraulic model described in j) is an existing technology in this field, with the node water demand as x. t Given the input, predict the sensor output values ​​at each monitoring point. The value of y can be derived from this. t (j)∈[h(x t ,j)+a η ,h(x t ,j)+b η ], then y t The likelihood function of (j) is:

[0059]

[0060] Among them, a h (j)=y t (j)-b η (j) represents the minimum value output by the WDS hydraulic model, b h (j)=y t (j)-a η (j) represents the maximum value of the WDS hydraulic model output; p(.|.) represents the conditional probability distribution. h(x) represents the normalization constant of the monitoring data at monitoring point j at time t. t j) represents the node's water demand as x t At that time, the output value of the WDS hydraulic model at the j-th sensor.

[0061] Assuming the pipeline network has m monitoring points, and the noise at each monitoring point is independent, then the truncated likelihood function of all monitoring data at time t is:

[0062]

[0063] Step 2. Truncating the posterior probability distribution and verifying the objective function

[0064] Based on Bayes' theorem, and according to the prior probability distribution p(x) of the node water demand cutoff... t ), truncation of the likelihood function p(y) t |x t ), thus obtaining the cut-off posterior probability distribution of the water demand at the nodes.

[0065]

[0066] Maximize the truncated posterior probability distribution p(x) t |y t This is equivalent to maximizing p(x). t |y t The logarithm of )

[0067]

[0068] Wherein, ln[p(x t (i))] and ln[p(y t (i)|x t [] can be expanded as:

[0069]

[0070]

[0071] The final form of the verification objective function of this invention is:

[0072]

[0073] Step 3. Analytical solution of the nonlinear verification objective function

[0074] The solution to the nonlinear equation is obtained using the Newton-Raphson iteration method, as shown in equations (8, 9):

[0075]

[0076]

[0077] in, This is the water demand correction vector for the node in the k-th iteration; and These are the objective functions J(x) t The first and second gradients of the gradient are initialized before solving. x t|t-1 This is prior information, namely the average water demand.

[0078] In one specific embodiment of the present invention, and The derivation is as follows:

[0079]

[0080]

[0081] in Represents the squared residual matrix. Represents the residual cubic matrix, and This represents the Jacobian matrix. The calculation method is as follows:

[0082]

[0083]

[0084]

[0085] The first gradient of the objective function and second gradient Substituting the expanded form into formula (8) yields the iterative adjustment value. Then Substituting into formula (9), the node water demand x can be solved iteratively. t Covariance can be calculated using the following formula:

[0086]

[0087] Covariance matrix P t The Woodbury matrix identity is used to solve for the uncertainty in nodal water demand. The iterative steps can be derived from the appendix. Figure 1 Obtained from [the source].

[0088] like Figure 2 A simplified pipeline network diagram is provided, consisting of one water source, eight water demand nodes, and eleven pipe segments. Two pressure monitoring points (nodes 3 and 7) and three flow monitoring points (pipe segments L8, L10, and L11) are established. A simulation with 240 time steps is performed based on this network. The specific steps are as follows:

[0089] Step 0: Case Design

[0090] 1) Random measurement noise is added to the theoretical nodal pressure values ​​to obtain the observed value y. t The random noise follows a normal distribution with a variance of R. The variances of the pressure and flow sensors are each set to 1m. 2 And 1 (L / s) 2 .

[0091] 2) Prior node water demand is predicted based on historical data. In this case, it is assumed that the prior water demand is equal to the estimated water demand of the node at the previous time step (x). t|t-1 =x t-1 In the first time step, the water demand of each node is assumed to be the average of the total water demand. At the same time, this data is also used as the historical water demand data of the nodes. The prior water demand covariance is assumed to be constant.

[0092] 3) Prior PDF cutoff points according to [a x (i), b x (i)]=[0.5x r (i),2x r (i)] calculate, where x r (i) is the theoretical value of the water demand at the i-th node. For pressure sensors, the cutoff point of the likelihood function is determined according to [a h (j), b h [y(j)] = [y(j) - 1.5, y( / ) + 1.5] is calculated; for flow sensors, the cutoff point of the likelihood function is calculated according to [a h (j), b h The calculation is performed using [(j)] = [-y(j), 2y(j)]. Here, y(j) is the observation value of the j-th sensor.

[0093] 4) The constant parameter is λ = 1, and the maximum allowed number of iterations is K = 20.

[0094] Step 1: Set the estimation parameters

[0095] The pressures at nodes 3 and 7, and the flow rates at pipe segments L8, L10, and L11 were selected as measurements. The observed values ​​and their variances are as follows:

[0096] y t=1 =[35.1, 28.4, 3.8, 16.2, 69.4] T

[0097] R=[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0] T

[0098] The likelihood cutoff points are as follows:

[0099]

[0100] The prior PDF and prior covariance of the node water demand are as follows:

[0101] x t=1|t=0 =x t=0 = [8.5, 8.5, 8.5, 8.5, 8.5, 8.5, 8.5, 8.5] T

[0102] P t=1|t=0 =diag(1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)

[0103] The cutoff point of the prior PDF is as follows:

[0104]

[0105] At each time step, 20 iterations are performed to determine the estimated node water demand. The prior value of the node water demand is set to the value at the time of the first iteration (k=0).

[0106]

[0107] Step 2: Calculate the model output

[0108] Node water demand Using the value of the current iteration (k=0) as input to the WDS hydraulic model, the model output is:

[0109]

[0110] Step 3: Calculate the Jacobian matrix

[0111] By substituting the input from the WDS hydraulic model, the Jacobian matrix... Can be calculated:

[0112]

[0113] Step 4: Calculate the first derivative of the objective function and second derivative

[0114]

[0115]

[0116] Step 5: Calculate the adjustment amount of the estimated node water demand.

[0117]

[0118] Step 6: Update the node's water requirement for the next iteration.

[0119]

[0120] when season when season

[0121]

[0122] k = k + 1

[0123] Step 7: Termination conditions are met

[0124] Repeat steps 2-6 until k = K. Use the estimated result as prior information for the next time step to estimate the next time step.

[0125] Figure 3 The pipeline network was showcased. Figure 2 The results show that all eight nodes in the dataset were compared with the estimated values ​​of this invention and the actual values ​​using other data assimilation methods. This invention can reduce the maximum error from 214% to 24%, with significant effects on nodes N1, N2, N4, and N5. This invention can effectively avoid unrealistic estimates of node water demand that are either too high or too low. This is mainly due to the use of a truncated normal PDF, which limits the parameters to a reasonable range. Figure 3 As shown, the estimated nodal water demand is confined to the region defined by the cutoff point (grey dashed line). In contrast, the control group uses a standard normal PDF, which allows estimation of nodal water demand across the entire range (-∞, ∞).

[0126] Figure 4 This paper demonstrates the application of the present invention in the state estimation of a real large-scale water supply network in City H. The network comprises three reservoirs, 4242 nodes, 4841 pipes, and 77 pressure sensors installed within it. Of the 77 pressure sensors, 61 were used to estimate the water demand at the nodes, while the remaining 16 sensors were compared with model output values ​​to verify the accuracy of the estimation.

[0127] Figure 5 A large pipeline network is shown. Figure 4 A comparison was made between the measured pressure values ​​from 61 estimated sensors and the simulated values ​​from the model. For this invention, the deviations of 59 estimated sensors were within 1 m, and the deviations of 2 estimated sensors were between 1 m and 1.5 m. In the control group, the deviations of 7 estimated sensors were greater than 1 m, and the deviations of 3 estimated sensors were greater than 2 m, with a maximum residual of 3.68 m. In the validation dataset, the deviations of 6 sensors were greater than 1 m, and the deviations of 3 sensors were greater than 2 m, with a maximum residual of 3.05 m.

[0128] Furthermore, the control group estimated the water demand of 191 negative nodes, while this invention did not estimate the water demand of any negative nodes. This is because, in a real water supply network, estimating water demand using a limited number of field measurements is an ill-conditioned problem. Uneven sensor distribution also affects the estimation results. Sensors with excessively large state estimation errors are mainly located in sparsely populated regions. In Bayesian estimation, there is competition among sensors, and the estimated water demand is a compromise between them. Closely located sensors tend to adjust their node water demand in similar directions, making them more competitive. Therefore, sensor competitiveness increases in areas with high sensor density and decreases in areas with low sensor density, exacerbating the ill-conditioned problem in sparsely populated areas and leading to excessive bias. The use of truncated likelihood restricts the simulated values ​​to a reasonable range, and the constraints implicit in truncated likelihood play an important role in dealing with ill-conditioned problems.

[0129] The above examples are merely specific embodiments of the present invention. Obviously, the present invention is not limited to the above embodiments and many variations are possible. All variations that can be directly derived or conceived by those skilled in the art from the disclosure of the present invention should be considered within the scope of protection of the present invention.

Claims

1. A method for verifying the water demand of a water supply network based on a truncated normal distribution, characterized in that, Includes the following steps: (1) Using the truncated normal distribution, construct the truncated prior probability distribution of water demand at nodes in the water supply network and the truncated likelihood function of monitoring data; The prior probability distribution of water demand cutoff at nodes in the water supply network is as follows: ; ; in, Represents the probability density function. express Water demand at any given time express Time Node The water demand, This indicates the number of nodes in the water supply network. express Time Node The normalization constant, Represents a node The average water demand, Represents a node The variance of water demand is a constant and , Represents a node The distribution range of water demand; The truncated likelihood function of the monitoring data is specifically as follows: ; ; in, This indicates the number of monitoring points in the water supply network. Each monitoring point is equipped with a pressure sensor or a flow sensor. express Real-time monitoring data, express Time monitoring point Monitoring data, express Time monitoring point The normalization constant of the monitoring data; Indicates the water demand of the node. At that time, the WDS hydraulic model was in its first stage. The output values ​​of each sensor; Indicates monitoring point The variance of noise in the monitoring data. is a constant and , This represents the minimum value output by the WDS hydraulic model. (1) Represents the maximum value of the output of the WDS hydraulic model; (2) Based on Bayes' theorem, the truncated prior probability distribution and the truncated likelihood function are integrated to construct the truncated posterior probability distribution. By maximizing the truncated posterior probability distribution, the verification objective function is established. The truncated posterior probability distribution is as follows: ; in, express Time Node water demand The truncated prior probability distribution, Indicates water demand Time monitoring point Monitoring data The truncation likelihood function, This indicates the number of nodes in the water supply network. This indicates the number of monitoring points in the water supply network. express Truncating the posterior probability distribution at time step; The specific verification objective function is as follows: ; in, for The objective function for checking water demand at any time express Time Node The average water demand, express Time Node The variance of water demand is a constant and , Represents a node The distribution range of water demand, Indicates the water demand of the node. At that time, the WDS hydraulic model was in its first stage. The output value of each sensor Indicates monitoring point The variance of noise in the monitoring data. This represents the minimum value output by the WDS hydraulic model. This represents the maximum value output by the WDS hydraulic model; (3) Use the Newton iteration method to solve the objective function, obtain the water demand adjustment of each node of the water supply network, and iteratively solve the water demand of each node of the water supply network.

2. The method for verifying water demand in a water supply network based on a truncated normal distribution as described in claim 1, characterized in that, In step (3), the objective function is linearized, and the solution corresponding to the objective function is obtained by Newton's iteration method, as shown in the following equation: ; ; in, For the first Adjustment of node water demand in the next iteration. For the first The water requirement of the next iteration node. and These are the verification objective functions. The first and second gradients.

3. The method for verifying water demand in a water supply network based on a truncated normal distribution as described in claim 2, characterized in that, Initialize before solving , This is prior information, namely the average water demand.

4. The method for verifying water demand in a water supply network based on a truncated normal distribution as described in claim 2, characterized in that, The aforementioned verification objective function The first and second gradients are as follows: ; ; in, Represents the squared residual matrix. Represents the Jacobian matrix. This represents the residual cubic matrix, with the superscript T indicating transpose.

5. The method for verifying water demand in a water supply network based on a truncated normal distribution as described in claim 4, characterized in that, The aforementioned , ,as well as The calculation formula is as follows: ; ; 。 6. The method for verifying water demand in a water supply network based on a truncated normal distribution according to claim 2, characterized in that, After K iterations Water demand at the verified node Using covariance This indicates its uncertainty, and K represents the preset number of iterations.