Method for constructing and optimally designing hydraulic model of spring water direct drinking pipe network in residential district

By separating the scaling rate using the Langerier saturation index and physical information neural network, and combining the sparsed Jacobian matrix and ensemble Kalman filtering, the problem of real-time tracking of mineralized scaling and water quality safety in spring water pipe networks was solved, achieving efficient hydraulic model calibration and operation and maintenance optimization.

CN122065489APending Publication Date: 2026-05-19SHANDONG PROV CONSTR DESIGN & RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANDONG PROV CONSTR DESIGN & RES INST
Filing Date
2026-04-10
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing technologies cannot track the spatiotemporal heterogeneous dynamic evolution of pipe roughness coefficient caused by mineralization and scaling of spring water in real time. The calculation delay of digital twin model parameter recalibration is not matched with the real-time data update frequency of sensors. The calculation cost of the Jacobian matrix of ensemble Kalman filtering is high. The hydraulic model calibration and drinking water quality safety constraints lack an inherent coupling mechanism.

Method used

The Langerier saturation index is used to calculate the scale thickness increment, the fast and slow variable disturbance components are separated, the physical information neural network is used to infer the pipe roughness coefficient field in parallel, the Jacobian matrix is ​​sparsified and analyzed, and the pipe roughness coefficient is updated by combining ensemble Kalman filtering, and water quality-hydraulic dual safety constraints are embedded.

Benefits of technology

It enables real-time tracking of mineralized scale formation in spring water, reduces computational costs and calibration errors, ensures the safety of drinking water quality and pressure compliance, and improves operation and maintenance efficiency and cost-effectiveness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122065489A_ABST
    Figure CN122065489A_ABST
Patent Text Reader

Abstract

The invention discloses a residential district spring water direct drinking pipe network hydraulic model construction and optimization design method. According to the method, a pipeline roughness coefficient slow-varying trend component is predicted based on a Langelier saturation index and a scaling rate physical equation, and a fast-varying disturbance component is extracted through variational mode decomposition, so that parameter multi-scale decomposition is realized; a physical information neural network is used as a hydraulic positive problem agent solver, whole-network hydraulic state parallel reasoning is completed within 50 milliseconds, and meanwhile an accurate analysis Jacobian matrix is obtained at zero extra cost through automatic differential; bayesian statistical fusion of multi-sensor observation and parameter estimation is realized through sparse ensemble Kalman filtering based on a pipe network observability coefficient, and pipeline roughness coefficient posterior probability distribution is output. According to the invention, parameter real-time calibration completely synchronous with the acquisition period of the sensor is realized, and the consumption of computing resources is reduced by more than 80%; water quality-hydraulic power double safety constraints are embedded; and whole-network high-precision state estimation under 20% of sensor coverage rate is supported.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of hydraulic modeling and intelligent operation and maintenance technology for water supply networks, specifically to a method for constructing and optimizing a hydraulic model of a residential community's direct drinking water pipeline network. Background Technology

[0002] With the continuous growth in demand for healthy drinking water, direct drinking water pipe network systems in residential communities using natural spring water as the water source have been widely constructed and applied. Compared with municipal tap water pipe networks, spring water direct drinking water pipe networks have significant characteristics such as high water mineralization and direct drinking without deep treatment, which places higher demands on the precise control of the hydraulic status of the pipe network.

[0003] Hydraulic models are the core tool for the intelligent operation and maintenance of direct drinking water pipeline networks, and the pipe roughness coefficient (Hayzen-Williams coefficient C value) is the most critical parameter in the hydraulic model. Spring water is rich in calcium, magnesium, and carbonate ions, forming a mineralized scale layer, primarily composed of calcium carbonate, on the inner wall of the pipe. This causes the effective flow area and pipe wall roughness to continuously change over time. Furthermore, due to uneven distribution of flow velocity, temperature, and mineralization in different pipe sections, the scaling rate can vary by up to 30%, exhibiting significant spatiotemporal heterogeneity. In existing technologies, the pipe roughness coefficient is typically updated using annual manual water outage testing, which fails to reflect the continuous evolution of the actual operating status of the pipeline network.

[0004] Online calibration methods, such as ensemble Kalman filtering, require solving the forward problem of a hydraulic model with multiple ensemble members for each parameter update. This results in a single calculation delay on the order of minutes, far exceeding the 10-second data update frequency of sensors, leading to long-term lag in the digital twin model. Furthermore, the Jacobian matrix relies on finite difference approximation, and the computational cost increases linearly with the number of pipe segments. The slow scaling trend of the roughness coefficient in spring water pipes is coupled with rapid temperature disturbances; existing methods do not handle this in a layered manner, resulting in redundant calibration dimensions. Additionally, existing calibration methods lack an inherent coupling mechanism with drinking water quality safety constraints. Summary of the Invention

[0005] Technical Objective: To address the shortcomings of existing technologies, this invention discloses a method for constructing and optimizing a hydraulic model of a residential community's direct drinking water pipeline network. This method solves several problems: the difficulty in real-time tracking of the spatiotemporal heterogeneous dynamic evolution of the pipe roughness coefficient caused by mineralization and scaling of spring water; the mismatch between the calculation delay of digital twin model parameter recalibration and the update frequency of real-time sensor data; the linear increase in the calculation cost of the Jacobian matrix for ensemble Kalman filtering with the number of pipe sections; and the lack of an inherent coupling mechanism between hydraulic model calibration and direct drinking water quality safety constraints.

[0006] Technical solution: To achieve the above technical objectives, the present invention adopts the following technical solution:

[0007] A method for constructing and optimizing a hydraulic model of a residential community's direct drinking water pipeline network includes the following steps:

[0008] Step S1: Obtain online water quality monitoring data of spring water, calculate the Langerier saturation index, and use the physical equation of scaling rate based on Langerier saturation index, calcium ion concentration and flow velocity in the pipe to calculate the scaling thickness increment of each pipe section, and map the scaling thickness increment to the slow trend component of the pipe roughness coefficient of each pipe section, and update the slow trend component at a daily or lower frequency.

[0009] Step S2: Perform variational mode decomposition on the real-time time-series observation data of the pressure sensor and flow sensor to separate and obtain the fast-changing disturbance component, and use the amplitude constraint range of the fast-changing disturbance component as the a priori range of the state vector of the ensemble Kalman filter.

[0010] Step S3: Superimpose the slow-changing trend component obtained in step S1 with the fast-changing disturbance component corresponding to the set member to obtain the pipe roughness coefficient field of each set member. Input the field into the pre-trained physical information neural network and infer the predicted pressure value of the whole network node and the predicted flow rate value of the pipe segment corresponding to each set member in parallel.

[0011] Step S4: Perform automatic differentiation on the physical information neural network in step S3 to obtain the analytical Jacobian matrix of the network output with respect to the pipe roughness coefficient, and perform sparsification pruning on the analytical Jacobian matrix based on the pipe network observability coefficient to obtain a sparse analytical Jacobian matrix.

[0012] Step S5: Based on the ensemble predicted values ​​obtained in step S3, the sparse analytical Jacobian matrix obtained in step S4, and the sensor measured observation vectors, the posterior Kalman gain is calculated using the ensemble Kalman filter update formula. The rapidly varying disturbance components of each ensemble member are updated, and the posterior mean and posterior covariance of the pipe roughness coefficient are output, thus completing the adaptive real-time calibration of the hydraulic model parameters.

[0013] In one embodiment, in step S1, the physical equation for the scaling rate is:

[0014] ,

[0015] Where ε is the pipe scale thickness, t is time, k is the scaling rate coefficient, LSI is the Langrillly saturation index, and v is the average flow velocity inside the pipe. For reference flow velocity; the slowly varying component of the pipe roughness coefficient is mapped using the following formula:

[0016]

[0017] in, denoted as the initial roughness coefficient of the pipe, and D as the designed inner diameter of the pipe; the scaling rate coefficient k is obtained by joint calibration based on the calcium ion concentration and water temperature of the spring water.

[0018] In one embodiment, in step S3, the loss function of the physical information neural network during training includes data fitting loss, mass conservation constraint loss, Hayzen-Williams equation constraint loss, minimum residual pressure constraint loss at nodes, and maximum hydraulic residence time constraint loss in pipe sections. These five types of losses are combined in a weighted summation manner. The weight coefficients of the mass conservation constraint loss and the Hayzen-Williams equation constraint loss are not less than three times the weight coefficient of the data fitting loss. The single inference delay of the physical information neural network does not exceed 50 milliseconds.

[0019] In one embodiment, the maximum hydraulic residence time constraint for the pipe segment includes the hydraulic residence time of each pipe segment. ,in For the length of the pipe section, The cross-sectional area of ​​the pipe section for flow. The predicted flow rate of the pipe section is obtained from physical information neural network inference; the residual chlorine depletion time limit. ,in This refers to the initial residual chlorine concentration of the spring water. This represents the lower limit of residual chlorine concentration at the terminal node. It is the first-order residual chlorine decay rate constant.

[0020] In one embodiment, in step S4, the element in the i-th row and j-th column of the network observability coefficient matrix Ω Calculated using the following formula:

[0021] ,

[0022] in, Let i be the predicted pressure value of the i-th sensor. Let be the roughness coefficient of the j-th pipe segment; the sparsification pruning retains the following: The matrix elements; the sparsification threshold Adaptive adjustment as follows:

[0023]

[0024] in, As the initial threshold, The attenuation coefficient is... This represents the mean of the posterior standard deviation of the estimated pipe roughness coefficient at the current moment.

[0025] In one embodiment, in step S2, the number of members in the ensemble Kalman filter is 100 to 500; during ensemble initialization, the initial values ​​of the rapid perturbation components of each member are independently sampled from a Gaussian distribution with zero mean and variance of historical observation residuals; the spatial correlation structure among ensemble members is determined by analyzing historical pipeline roughness coefficient evolution data using variogram analysis.

[0026] In one embodiment, when the Langerilla saturation index exceeds 0.5, a forced instant update of the slow-varying trend component is triggered, and the posterior covariance matrix of the ensemble Kalman filter is simultaneously reset to the expanded prior covariance; when the Langerilla saturation index is below -0.5, a pipeline scour warning is triggered and the update cycle of the slow-varying trend component is shortened.

[0027] A hydraulic model construction and optimization design system for a residential community spring water direct drinking water pipeline network is provided to implement the above-described method for constructing and optimizing a hydraulic model for a residential community spring water direct drinking water pipeline network, including:

[0028] The multi-scale signal decomposition module is used to receive online water quality monitoring data of spring water, calculate the Langerier saturation index, drive the physical equation of scaling rate to obtain the slow trend component of the roughness coefficient of each pipe section, and perform variational mode decomposition on the real-time time series observation data of the sensor to obtain the fast disturbance component.

[0029] The physical information neural network agent module is used to receive the pipeline roughness coefficient field input, output the pressure prediction value of the entire network node and the flow prediction value of the pipe segment with an inference delay of no more than 50 milliseconds, and output the analytical Jacobian matrix of the network output with respect to the pipeline roughness coefficient through automatic differentiation;

[0030] The sparse ensemble Kalman filter module is used to perform sparse pruning on the analytical Jacobian matrix based on the pipe network observability coefficient, and to calculate the posterior Kalman gain using the sparse analytical Jacobian matrix, ensemble predictions and sensor measured observation vectors, update the rapidly changing disturbance component of the pipe roughness coefficient, and output the posterior mean and posterior covariance.

[0031] The digital twin state output module is used to superimpose the posterior mean of the slow-changing trend component and the fast-changing disturbance component to form a real-time pipeline roughness coefficient field, and call the physical information neural network proxy module to output the real-time estimate of the hydraulic state of the entire network and the distribution of parameter uncertainty.

[0032] In one embodiment, the multi-scale signal decomposition module further includes a Langerile saturation index feedforward prediction submodule. The Langerile saturation index feedforward prediction submodule monitors the changing trend of the Langerile saturation index in real time. When the Langerile saturation index exceeds a preset threshold, it sends a covariance reset command to the sparse set Kalman filter module and an online fine-tuning trigger command to the physical information neural network agent module, thereby realizing the automatic response and rapid parameter reconvergence of the system under the condition of sudden water quality changes.

[0033] In one embodiment, the digital twin state output module further includes an uncertainty visualization submodule. The uncertainty visualization submodule converts the diagonal elements of the posterior covariance matrix of the pipe roughness coefficient into confidence intervals for parameters of each pipe segment and presents them in the form of a heat map on the pipe network topology map. When the posterior standard deviation of any pipe segment parameter exceeds a preset uncertainty alarm threshold, the pipe segment is automatically marked and a sensor placement optimization suggestion is generated. The optimization suggestion is determined based on the candidate placement position with the largest information gain in the current observability coefficient matrix.

[0034] Beneficial Effects: The hydraulic model construction and optimization design method for direct drinking water pipeline network in residential communities provided by this invention has the following beneficial effects:

[0035] (1) For the first time, the physical mechanism of mineralization and scaling of spring water is embedded into the digital twin calibration framework. The "active feedforward" calibration is achieved through the Langerile saturation index feedforward prediction channel, and the prediction error of the slow-change trend component does not exceed 2%.

[0036] (2) The exact analytical Jacobian matrix is ​​obtained by automatic differentiation using physical information neural network, reducing the cost of obtaining the Jacobian matrix from the traditional O(N) positive problem solution of finite difference to zero additional computation cost.

[0037] (3) Multi-scale decomposition separates the slow scaling trend from the rapid temperature disturbance, reduces the dimension of the effective parameters for real-time calibration by about 80%, and achieves real-time calibration that is completely synchronized with the sensor acquisition cycle, with a calibration error of no more than ±1.5%.

[0038] (4) The physical information neural network loss function is embedded with water quality-hydraulic dual safety constraints to ensure end-to-end compliance of residual chlorine retention and minimum service pressure in drinking water, and the end residual chlorine compliance rate is increased to 99.7%.

[0039] (5) Based on the uncertainty of the posterior parameters, the observability sparsity threshold is dynamically adjusted, reducing the computational resource consumption by more than 80%, and the entire life cycle is adaptively optimal. Attached Figure Description

[0040] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.

[0041] Figure 1 The diagram shows the overall system architecture of this invention, illustrating the composition and data flow of four functional layers: the physical perception layer, the multi-scale signal decomposition layer, the physical information neural network and ensemble Kalman filter fusion layer, and the digital twin state output layer.

[0042] Figure 2The flowchart of the method of the present invention shows the parallel dual-loop structure of the slow-change trend update loop (daily level) and the fast-change real-time calibration loop (10-second level) and the execution relationship of steps S1 to S5.

[0043] Figure 3 This is a schematic diagram of the network structure and dual functions of the physical information neural network agent module, showing the network input features, residual backbone, positive problem inference output head, uncertainty estimation output head, and automatic differential Jacobian matrix acquisition path.

[0044] Figure 4 This is a flowchart of the sparse set Kalman filter module, showing the complete process of set initialization, prediction step, sparsity pruning, Kalman gain calculation, set membership update, and posterior output. Feedback loop.

[0045] Figure 5 This is a schematic diagram of the adaptive sparsity threshold adjustment mechanism, showing the mean of the posterior standard deviation. With sparsity threshold The dynamic relationship between the initial stage of operation, the stable operation period, and the sudden change in water quality. Detailed Implementation

[0046] The present invention will now be described more clearly and completely by way of a preferred embodiment in conjunction with the accompanying drawings, but this does not limit the invention to the scope of the described embodiment.

[0047] The overall system architecture of this invention is as follows: Figure 1 As shown, it consists of four layers: a physical perception layer, a multi-scale signal decomposition layer, a physical information neural network and ensemble Kalman filter fusion layer, and a digital twin state output layer.

[0048] like Figure 1 As shown, the physical sensing layer includes a pressure sensor group (accuracy ±0.1%FS), a flow sensor group (accuracy ±0.5%), a water quality sensor group (real-time acquisition of water temperature T, total dissolved solids TDS, and pH value), and a pump valve status acquisition unit, with a data acquisition cycle of 10 seconds. The multi-scale signal decomposition layer includes a slow-varying trend module (daily update, based on scaling physics equations) and a fast-varying disturbance extraction module (10-second update, based on variational mode decomposition). The fusion layer handles PINN proxy solution (single inference ≤50ms) and ensemble Kalman filter Bayesian parameter update functions. The digital twin state output layer outputs the real-time hydraulic state of the entire network, the spatial distribution of pipe roughness coefficients, and a heatmap of parameter uncertainties. All layers are connected via standardized data interfaces, and the slow-varying trend components are transmitted to the fast-varying real-time calibration loop via a shared channel as a priori reference.

[0049] The complete execution flow of the method of this invention is as follows: Figure 2As shown, a dual-loop architecture is adopted, in which a slow-changing trend update loop and a fast-changing real-time calibration loop run in parallel.

[0050] like Figure 2 As shown, the slow-varying trend update cycle has a default trigger period of 24 hours (triggered immediately when the Langerile saturation index exceeds the threshold), executing steps S1-a (water quality data reading), S1-b (LSI calculation), S1-c (threshold judgment branch), S1-d (scale thickness increment calculation), and S1-e (C-value trend component update). The fast-varying real-time calibration cycle is triggered by the arrival of sensor data packets (10-second cycle), executing steps S2-a (data preprocessing), S2-b (VMD fast-varying component extraction), S3 (PINN ensemble parallel inference), S4-a (automatic differential Jacobian matrix acquisition), S4-b (observability sparsity pruning), and S5 (ensemble Kalman filter update). The two cycles are linked through the C_trend data channel, with the slow-varying trend component serving as the prior benchmark input for fast-varying calibration, forming a two-layer fusion mechanism of "physical prior guidance + data-driven update".

[0051] Example 1

[0052] This embodiment uses a residential community's direct drinking water pipeline network as an example. The network comprises 128 nodes and 156 pipe sections, equipped with 26 pressure sensors and 14 flow sensors. The sensor data acquisition cycle is 10 seconds. Spring water quality parameters: calcium ion concentration (Ca... 2+ The concentration of total dissolved solids (TDS) was 120 mg / L, the average annual water temperature was 18 degrees Celsius, and the initial value of the Langrillly saturation index was 0.3.

[0053] (1) Step S1: Calculation of Langerier saturation index and slow trend update of C value

[0054] The system reads online water quality monitoring data every 24 hours and calculates the Langrillly saturation index using the following formula:

[0055] The formula for calculating saturated pH value is:

[0056]

[0057] In the formula, A, B, , These are the correction factors for water temperature, TDS, calcium hardness, and alkalinity, calculated according to standard water quality chemical methods. The scaling rate equation is:

[0058]

[0059] In the formula, ε is the pipe scale thickness (unit: mm), t is time (unit: day), k is the scaling rate coefficient (laboratory calibration value k = 0.023 mm / day), and v is the average flow velocity in the pipe. = 0.3 m / s is the reference flow velocity. The equivalent inner diameter correction formula is:

[0060]

[0061] The formula for mapping the slow-varying trend component of the pipe roughness coefficient is:

[0062]

[0063] in D is the equivalent inner diameter, and D is the design inner diameter. This is the initial roughness coefficient (130 for stainless steel pipes).

[0064] (2) Step S2: Variational mode decomposition and set initialization

[0065] Whenever a sensor data packet arrives (every 10-second cycle), the system performs variational mode decomposition on the historical sequence of the past 30 sampling points of each pressure sensor to separate the rapidly changing disturbance components. The number of ensemble members is set to 200, and the initial values ​​of the rapidly changing disturbance components of each member are... The spatial correlation structure among set members is determined by analyzing historical data using variograms.

[0066] (3) Step S3: Parallel inference of physical information neural network

[0067] Physical information neural network structure such as Figure 3 As shown.

[0068] like Figure 3 As shown, the network adopts an 8-layer residual fully connected structure, with each layer having a width of 512. The input features are [pipe roughness coefficient field (mean and variance), node water demand vector, boundary conditions (pump head, water tank level), water quality characteristics (TDS, water temperature)], and the output is the predicted pressure values ​​for all nodes in the network. Pipeline segment flow forecast The training loss function is:

[0069]

[0070] in, The sensor data fitting loss (weight 1) is used. The loss is due to the mass conservation constraint (weight α = 5). The constraint loss for the Hezen-Williams equation (weight β = 5). The minimum residual pressure constraint loss at the node (weight γ = 2, lower limit of residual pressure) = 0.05 MPa), This represents the maximum hydraulic residence time constraint loss for the pipe section (weight δ = 2). The specific calculation formulas for each constraint loss are as follows:

[0071] Loss due to mass conservation constraint (residuals of continuity equation):

[0072]

[0073] Hazen-Williams equation constraint loss (head loss-discharge relationship):

[0074]

[0075] in, , For the length of the pipe section, The roughness coefficient of the pipe section is... Pipe diameter. Hydraulic residence time constraint loss:

[0076]

[0077] Hydraulic residence time of each pipe section The calculation formula is:

[0078]

[0079] Residual chlorine depletion time limit The calculation formula is:

[0080]

[0081] in, = 0.3 mg / L as the initial residual chlorine concentration, = 0.05 mg / L is the lower limit of residual chlorine at the end. = 0.42 per hour is the first-order residual chlorine decay rate constant, from which we obtain The total latency for parallel inference of 200 ensemble members under GPU environment is approximately 8 milliseconds after training is complete.

[0082] (4) Step S4: Automatic differentiation of Jacobian matrix and sparsity pruning

[0083] like Figure 4 The diagram shows the complete algorithm flow of the sparse set Kalman filter. It uses the PyTorch automatic differentiation framework to perform a backpropagation on the physical information neural network that has completed inference, directly obtaining the analytical Jacobian matrix H (takes about 3 milliseconds, without any additional forward problem solving):

[0084]

[0085] In equation (11), H is 3D matrix For the number of sensors, The number of pipe segments. The network observability coefficient matrix Ω is calculated by the following formula:

[0086]

[0087] like Figure 4 middle As shown in the feedback loop, the adaptive sparsification threshold Dynamically adjust as follows:

[0088]

[0089] in, = 0.1, λ = 2.0. In the first 30 days after the system is put into operation, ≈ 10, θ(t) approaches zero, retaining all pathways; after stable operation With θ(t) ≈ 0.014, approximately 15% of the sparse pathways are retained, and the computational cost is reduced to 15% of the original.

[0090] (5) Step S5: Ensemble Kalman filter statistical fusion update

[0091] like Figure 4 As shown in the set member update step, the Kalman gain K is calculated by the following formula:

[0092]

[0093] in, Let the set of state and predicted observations be the covariance matrix. R is the observation noise covariance matrix (estimated by the MC-Dropout neural network for physical information). The update formula for each set member is:

[0094]

[0095] In equation (15), For each member's perturbation term, This represents the sensor's measured vector. Output the posterior mean. and posterior standard deviation The real-time estimation of the pipe roughness coefficient is as follows:

[0096]

[0097] After 100 days of continuous operation, the root mean square error of the pipeline roughness coefficient calibration was 1.2% (meeting the ±1.5% requirement), the prediction error of the hydraulic state pressure of the entire network was less than 0.3%, and the complete calibration calculation cycle was about 9.8 seconds, which was completely synchronized with the 10-second sensor acquisition cycle.

[0098] Example 2

[0099] This embodiment, based on Embodiment 1, further implements the Langrillly saturation exponent feedforward prediction channel as described in claim 6. The dynamic adjustment mechanism of the adaptive sparsity threshold is as follows: Figure 5 As shown in the figure, the horizontal axis represents the running time (in days), and the left vertical axis represents the mean of the posterior standard deviation. (Solid line), the right vertical axis represents the sparsification ratio (dashed line, corresponding to the effect of threshold θ(t)). Figure 5 The three typical operation phases are clearly shown: the initial operation phase (0 to 30 days). Larger values ​​(approximately 5 to 10) result in θ(t) approaching zero, preserving all observable update pathways, and achieving a sparsity ratio close to 0%; stable operation period (30 to 280 days). Gradually converged to 1 to 2, θ(t) increased to 0.01 to 0.05, only the main observable pathways were retained, the sparsification ratio increased to about 85%, and the computational cost was significantly reduced; during water quality abrupt changes (marked by vertical dashed lines in the figure). If there is a sudden increase, θ(t) will automatically decrease, the update path will automatically expand, and the parameters will return to normal levels after reconvergence.

[0100] One summer, the temperature of the spring water source rose from 18 degrees Celsius to 28 degrees Celsius, and the Langerile saturation index rose from 0.3 to 0.78, exceeding the trigger threshold of 0.5. After the feedforward prediction channel detected that the LSI exceeded the threshold, it performed the following: (1) forced triggering step S1 slow trend update; (2) expanded the ensemble Kalman filter posterior covariance matrix to 3 times the initial prior covariance; (3) reset the sparsity threshold θ to θ0, temporarily restored the full-path update mode, and dynamically adjusted it after 5 update cycles. The results showed that the time required for the parameters to reconverge to ±2% accuracy was shortened from 72 hours in the traditional method to 6 hours.

[0101] Example 3

[0102] This embodiment, based on Embodiment 1, further implements a water quality-hydraulic dual-constraint embedding mechanism. mg per liter mg per liter Determine every hour Hours, and constrain the maximum residence time loss of the pipe section. and the minimum residual pressure constraint loss of the node Simultaneously, the loss function of the neural network training was embedded with physical information, and the weight coefficients were set to δ = 2 and γ = 2, respectively. Validation results showed that the compliance rate of residual chlorine concentration at the end nodes increased from 89.3% before implementation to 99.7%, and the compliance rate of residual pressure at the nodes increased from 92.1% to 99.5%.

[0103] Example 4

[0104] This embodiment describes the complete deployment and implementation scheme of the system of the present invention in the intelligent operation and maintenance platform of the direct drinking water pipeline network in a residential community. The system architecture corresponds to... Figure 1 The four-layer structure shown has each component deployed under the edge-cloud collaborative architecture: the edge side deploys a multi-scale signal decomposition module and a physical information neural network agent module, which use embedded GPUs (with no less than 4 gigabytes of video memory) to complete local real-time inference (10-second cycle); the cloud side deploys a sparse ensemble Kalman filter module and a digital twin state output module, which interact with the edge side through 4G / 5G networks (transmission latency of no more than 1 second).

[0105] The uncertainty visualization submodule displays the posterior standard deviation of the roughness coefficient for each pipe section. Real-time display on the pipeline topology heatmap: When green is displayed (parameters converge, high reliability); The screen will display yellow (this requires attention); The system displays a red indicator (recommending additional sensors) and automatically pushes sensor optimization placement suggestions based on the principle of maximizing information gain from the observability coefficient matrix. After 12 months of continuous operation and verification, the real-time calibration error of the pipeline roughness coefficient has been consistently below ±1.5%, the response time for pipeline leakage detection has been shortened from 48 hours using traditional methods to less than 2 hours, and the overall operation and maintenance cost has been reduced by approximately 35%.

[0106] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for constructing and optimizing a hydraulic model of a residential community's direct drinking water pipeline network, characterized in that, Includes the following steps: Step S1: Obtain online water quality monitoring data of spring water, calculate the Langerier saturation index, and use the physical equation of scaling rate based on Langerier saturation index, calcium ion concentration and flow velocity in the pipe to calculate the scaling thickness increment of each pipe section, and map the scaling thickness increment to the slow trend component of the pipe roughness coefficient of each pipe section, and update the slow trend component at a daily or lower frequency. Step S2: Perform variational mode decomposition on the real-time time-series observation data of the pressure sensor and flow sensor to separate and obtain the fast-changing disturbance component, and use the amplitude constraint range of the fast-changing disturbance component as the a priori range of the state vector of the ensemble Kalman filter. Step S3: Superimpose the slow-changing trend component obtained in step S1 with the fast-changing disturbance component corresponding to the set member to obtain the pipe roughness coefficient field of each set member. Input the field into the pre-trained physical information neural network and infer the predicted pressure value of the whole network node and the predicted flow rate value of the pipe segment corresponding to each set member in parallel. Step S4: Perform automatic differentiation on the physical information neural network in step S3 to obtain the analytical Jacobian matrix of the network output with respect to the pipe roughness coefficient, and perform sparsification pruning on the analytical Jacobian matrix based on the pipe network observability coefficient to obtain a sparse analytical Jacobian matrix. Step S5: Based on the ensemble predicted values ​​obtained in step S3, the sparse analytical Jacobian matrix obtained in step S4, and the sensor measured observation vectors, the posterior Kalman gain is calculated using the ensemble Kalman filter update formula. The rapidly varying disturbance components of each ensemble member are updated, and the posterior mean and posterior covariance of the pipe roughness coefficient are output, thus completing the adaptive real-time calibration of the hydraulic model parameters.

2. The method for constructing and optimizing the hydraulic model of a residential community's direct drinking water pipeline network according to claim 1, characterized in that, In step S1, the physical equation for the scaling rate is: , Where ε is the pipe scale thickness, t is time, k is the scaling rate coefficient, LSI is the Langrillly saturation index, and v is the average flow velocity inside the pipe. For reference flow velocity; the slowly varying component of the pipe roughness coefficient is mapped using the following formula: in, denoted as the initial roughness coefficient of the pipe, and D as the designed inner diameter of the pipe; the scaling rate coefficient k is obtained by joint calibration based on the calcium ion concentration and water temperature of the spring water.

3. The method for constructing and optimizing the hydraulic model of a residential community's direct drinking water pipeline network according to claim 1, characterized in that, In step S3, the loss function of the physical information neural network during training includes data fitting loss, mass conservation constraint loss, Hayzen-Williams equation constraint loss, minimum residual pressure constraint loss at nodes, and maximum hydraulic residence time constraint loss in pipe sections. These five types of losses are combined in a weighted summation manner. The weight coefficients of the mass conservation constraint loss and the Hayzen-Williams equation constraint loss are not less than three times the weight coefficient of the data fitting loss. The single inference delay of the physical information neural network does not exceed 50 milliseconds.

4. The method for constructing and optimizing the hydraulic model of a residential community spring water direct drinking water pipeline network according to claim 3, characterized in that, In the maximum hydraulic residence time constraint of the pipe section, the hydraulic residence time of each pipe section ,in For the length of the pipe section, The cross-sectional area of ​​the pipe section for flow. The predicted flow rate of the pipe section is obtained from physical information neural network inference; the residual chlorine depletion time limit. ,in This refers to the initial residual chlorine concentration of the spring water. This represents the lower limit of residual chlorine concentration at the terminal node. It is the first-order residual chlorine decay rate constant.

5. The method for constructing and optimizing the hydraulic model of a residential community spring water direct drinking water pipeline network according to claim 1, characterized in that, In step S4, the element in the i-th row and j-th column of the network observability coefficient matrix Ω Calculated using the following formula: , in, Let i be the predicted pressure value of the i-th sensor. Let be the roughness coefficient of the j-th pipe segment; the sparsification pruning retains the following: The matrix elements; the sparsification threshold Adaptive adjustment as follows: in, As the initial threshold, The attenuation coefficient is... This represents the mean of the posterior standard deviation of the estimated pipe roughness coefficient at the current moment.

6. The method for constructing and optimizing the hydraulic model of a residential community's direct drinking water pipeline network according to claim 1, characterized in that, In step S2, the number of members in the ensemble Kalman filter is between 100 and 500. During ensemble initialization, the initial values ​​of the rapid perturbation components of each member are independently sampled from a Gaussian distribution with zero mean and variance of historical observation residuals. The spatial correlation structure among ensemble members is determined by analyzing historical pipeline roughness coefficient evolution data using variogram analysis.

7. The method for constructing and optimizing the hydraulic model of a residential community's direct drinking water pipeline network according to claim 1, characterized in that, When the Langerile saturation index exceeds 0.5, a forced instant update of the slow-varying trend component is triggered, and the posterior covariance matrix of the ensemble Kalman filter is simultaneously reset to the expanded prior covariance. When the Langerile saturation index is below -0.5, a pipeline scour warning is triggered and the update cycle of the slow-varying trend component is shortened.

8. A system for constructing and optimizing a hydraulic model of a residential community's direct drinking water pipeline network, characterized in that, A method for constructing and optimizing a hydraulic model of a residential community spring water direct drinking water pipeline network as described in any one of claims 1-7, comprising: The multi-scale signal decomposition module is used to receive online water quality monitoring data of spring water, calculate the Langerier saturation index, drive the physical equation of scaling rate to obtain the slow trend component of the roughness coefficient of each pipe section, and perform variational mode decomposition on the real-time time series observation data of the sensor to obtain the fast disturbance component. The physical information neural network agent module is used to receive the pipeline roughness coefficient field input, output the pressure prediction value of the entire network node and the flow prediction value of the pipe segment with an inference delay of no more than 50 milliseconds, and output the analytical Jacobian matrix of the network output with respect to the pipeline roughness coefficient through automatic differentiation; The sparse ensemble Kalman filter module is used to perform sparse pruning on the analytical Jacobian matrix based on the pipe network observability coefficient, and to calculate the posterior Kalman gain using the sparse analytical Jacobian matrix, ensemble predictions and sensor measured observation vectors, update the rapidly changing disturbance component of the pipe roughness coefficient, and output the posterior mean and posterior covariance. The digital twin state output module is used to superimpose the posterior mean of the slow-changing trend component and the fast-changing disturbance component to form a real-time pipeline roughness coefficient field, and call the physical information neural network proxy module to output the real-time estimate of the hydraulic state of the entire network and the distribution of parameter uncertainty.

9. The system for constructing and optimizing a hydraulic model of a residential community's direct drinking water pipeline network according to claim 8, characterized in that, The multi-scale signal decomposition module also includes a Langerile saturation index feedforward prediction submodule. The Langerile saturation index feedforward prediction submodule monitors the changing trend of the Langerile saturation index in real time. When the Langerile saturation index exceeds a preset threshold, it sends a covariance reset command to the sparse set Kalman filter module and an online fine-tuning trigger command to the physical information neural network agent module, so as to realize the automatic response and rapid parameter reconvergence of the system under the condition of sudden water quality changes.

10. A system for constructing and optimizing a hydraulic model of a residential community's direct drinking water pipeline network according to claim 8, characterized in that, The digital twin state output module also includes an uncertainty visualization submodule. The uncertainty visualization submodule converts the diagonal elements of the posterior covariance matrix of the pipeline roughness coefficient into confidence intervals for parameters of each pipe segment and presents them in the form of a heat map on the pipeline network topology map. When the posterior standard deviation of any pipe segment parameter exceeds the preset uncertainty alarm threshold, the pipe segment is automatically marked and sensor placement optimization suggestions are generated. The optimization suggestions are determined based on the candidate placement positions with the largest information gain in the current observability coefficient matrix.