Machine learning enhanced water supply network real-time hydraulic modeling method and monitoring system

By combining the KANSA framework with a physically constrained machine learning method, the problems of dynamic response lag and insufficient data utilization in the hydraulic state estimation of the water supply network are solved, real-time hydraulic modeling and accurate state estimation of the water supply network are achieved, supporting the efficient operation and maintenance of the water supply network.

CN120597743APending Publication Date: 2025-09-05GUANGZHOU WATER SUPPLY CO +2

Patent Information

Application Number
CN202510476937.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-16
Publication Date
2025-09-05

Smart Images

  • Figure CN120597743A_ABST
    Figure CN120597743A_ABST
Patent Text Reader

Abstract

The invention discloses a machine learning enhanced real-time hydraulic modeling method for a water supply network. The method comprises the following steps: acquiring position numbers of sensors in the water supply network and correspondingly acquired historical hydraulic data; based on position numbers of sensors in the water supply network and time nodes in an acquisition period, constructing a sensor sampling matrix corresponding to each monitoring target, and filling historical hydraulic data into the corresponding sensor acquisition matrixes to form a training set; constructing an initial model; constructing a physical constraint loss function and training the initial model by using the training set to obtain a hydraulic prediction model for predicting a global hydraulic state; and inputting the sensor acquisition matrix of the monitoring target in the water supply pipe network into the hydraulic prediction model to output global pipe network hydraulic data. The invention further provides a real-time hydraulic monitoring system for the water supply network. The model constructed by the method provided by the invention can realize real-time estimation of the hydraulic state of the water supply network, and provides accurate data support for daily maintenance of the water supply network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of intelligent water management, and in particular relates to a real-time hydraulic modeling method and monitoring system for a water supply network enhanced by machine learning. Background Art

[0002] The efficient operation and maintenance of urban water supply systems relies on accurate estimation of the hydraulic state of the pipe network. Hydraulic state estimation constructs hydraulic conservation constraints for the pipe network based on the mass-energy conservation law and employs an optimization algorithm to solve this underdetermined nonlinear system of equations, achieving a match between calculated results at sparse sensor locations and measured data. With the iterative development of IoT sensing technology, although the unit cost of monitoring equipment has significantly decreased and deployment density has increased significantly, the coverage of existing sensor networks still struggles to meet the unique solution requirements for hydraulic state estimation. This lack of system observability results in a high degree of uncertainty in state estimation methods, creating a credibility gap that hinders the implementation of this technology.

[0003] The traditional approach to hydraulic state estimation involves creating a hydraulic solver for a water supply network and employing an optimization algorithm to calibrate the water consumption at each node. The hydraulic solver is then used to solve the network's hydraulic state. There are two general approaches to calibrating hydraulic solvers for water supply networks: offline calibration and online calibration. Offline calibration utilizes historical datasets to achieve high parameter accuracy under steady-state conditions. However, its computationally intensive optimization process often exhibits lag and insufficient adaptability to dynamic network changes, making it ineffective at tracking real-time network transients. Online calibration frameworks improve temporal responsiveness by continuously assimilating real-time sensor data. However, these optimization methods only consider sensor data collected at a single moment in time. This fundamental assumption of temporal independence limits dynamic feature extraction and leads to a systematic loss of information about water use patterns during the optimization process.

[0004] Patent document CN106202765B discloses a real-time modeling method for DMA of a water supply network in an urban area. The method comprises: first, constructing a DMA network model and performing inlet boundary processing. Secondly, connecting the network model to GIS, revenue system and SCADA system. Then pre-processing the data online. Finally, performing real-time simulation. The present invention can completely establish a DMA real-time model, which can fully reflect the dynamic characteristics of the water supply network, reduce the uncertainty of the model, and thus greatly improve the simulation accuracy and dynamic tracking performance. At the same time, based on this method, a real-time model of the entire urban water supply network can be gradually established for anomaly tracking and positioning, etc. This method needs to rely on a pre-built hydraulic solver, and it is impossible to incorporate historical data collected by sensors into the modeling process to achieve in-depth mining of historical operating condition data.

[0005] Patent document CN113312849A discloses a water demand prediction method and system, including the following steps: Step 1, Start; Step 2, Acquire and Clean Field Data; Step 3, Update the Model in Real Time; Step 4, Calibrate the Model; Step 5, Evaluate Model Accuracy: If the model accuracy does not meet the requirements, return to Step 4, Model Calibrate; If it meets the application objectives, execute Step 6, Complete; Step 6, Complete. The specific implementation of this method requires reliance on a pre-built hydraulic solver and cannot incorporate historical data collected by sensors into the modeling process to deeply mine historical operating condition data. Summary of the Invention

[0006] The purpose of the present invention is to provide a machine learning enhanced real-time hydraulic modeling method and monitoring system for water supply networks. The model constructed by this method can realize real-time estimation of the hydraulic status of the water supply network and provide accurate data support for the daily maintenance of the water supply network.

[0007] To achieve the first objective of the present invention, the following technical solution is provided: a machine learning-enhanced real-time hydraulic modeling method for a water supply network, comprising the following steps: Obtain the location number of each sensor in the water supply network and the corresponding historical hydraulic data collected. The historical hydraulic data includes the node water consumption, pipe section flow, and node pressure of each monitoring target during multiple collection cycles. The monitoring targets include pipelines and water nodes. Based on the location numbers of sensors in the water supply network and the time nodes in the acquisition cycle, a sensor sampling matrix corresponding to each monitoring target is constructed, and historical hydraulic data is filled into the corresponding sensor acquisition matrix to form a training set; Building an initial model based on the KANSA model architecture, the initial model includes a feature extraction module, a feature fusion module and a prediction module; The feature extraction module is used to extract features from the input sensor acquisition matrix in the time dimension and the space dimension to obtain time-pipeline network water consumption features and space-pipeline network topology features; The feature fusion module is used to fuse the time-pipeline network water usage feature with the space-pipeline network topology feature to output a fused feature; The prediction module performs prediction based on the input fusion features to output prediction results, which include node water consumption, pipe section flow, and node pressure of all pipelines; Constructing a physical constraint loss function and using the training set to train the initial model to obtain a hydraulic prediction model for predicting the global hydraulic state; The sensor acquisition matrix of the monitoring target in the water supply network is input into the hydraulic prediction model to output the global network hydraulic data.

[0008] This paper incorporates network hydraulic constraints into the loss function of a neural network-based model, establishing a physical information-embedded neural network based on soft constraints. This approach enables digital, real-time hydraulic modeling of water supply networks. By incorporating sensor time series features into self-constraints, the feature space spanned by state estimation is reduced, improving state estimation accuracy.

[0009] Specifically, the sensor sampling matrix is ​​based on the historical hydraulic data of each pipeline or water-using node, and uses the sensor location number as the row index and the acquisition time node as the column index to construct the sensor acquisition matrix of node water consumption, pipe flow and node pressure respectively; For sensors that are not arranged in the corresponding pipeline or water node, the position of the corresponding sensor acquisition matrix is ​​assigned a null value.

[0010] Specifically, the feature extraction module completes feature extraction of the sensor acquisition matrix in the time dimension and the spatial dimension by transposing the sensor acquisition matrix and coupling the Kolmogorov-Arnold network based on the Chebyshev basis function and the attention mechanism.

[0011] The expression of the feature extraction module is as follows: ; ; ; ; ; in, Represents the input sensor acquisition matrix, the superscript T represents the transpose, are trainable parameters optimized via backpropagation in the neural network, , and There are three different linear transformations.

[0012] Specifically, the feature fusion module fuses the time-pipeline network water usage feature and the space-pipeline network topology feature by using vector multiplication.

[0013] Specifically, the expression of the vector multiplication is as follows: ; ; ; in, Represents the input sensor acquisition matrix, and the superscript T represents transpose.

[0014] Specifically, during the training process, the non-zero position information in the sensor sampling matrix is ​​used to correct the intermediate process and final output of the model.

[0015] Specifically, the physical constraint loss function includes the node flow continuity equation, the pipe head loss equation and the ring energy balance equation. During the model training process, the back propagation algorithm is used to achieve the joint optimization of model parameters and physical conservation deviations.

[0016] Specifically, the expression of the rational constraint loss function is as follows: Mass conservation deviation ; Pipe section head loss equation ; Ring energy balance equation ; in, Indicates the flow status of the pipe section; Indicates the water demand status of the node; Indicates the node pressure status; The pressure drop equation for the pipe section is expressed as follows, and the Hezen-Williams formula is used for calculation.

[0017] In order to achieve the second purpose of the present invention, the following technical solution is provided: a real-time hydraulic monitoring system for a water supply network, which is implemented by the above-mentioned machine learning enhanced real-time hydraulic modeling method for a water supply network.

[0018] Compared with the prior art, the present invention has the following beneficial effects: In response to the problems of dynamic response lag in current modeling methods based on hydraulic solvers and the lack of physical conservation constraints in current numerical modeling methods, a Kolmogorov-Arnold Attention Network (KANSA) framework that integrates physical conservation constraints with spatiotemporal feature extraction is proposed. By establishing a bidirectional processing mechanism for the spatiotemporal features of sensor data, it can cope with the complex hydraulic correlations of water supply networks while accurately capturing long time series pattern characteristics, providing more accurate data support for subsequent data analysis or daily maintenance of water supply networks. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 A schematic diagram of the machine learning-enhanced real-time hydraulic modeling method for a water supply network provided in this embodiment; Figure 2 This is a test pipe network topology diagram of a certain area used for testing provided in this embodiment. DETAILED DESCRIPTION

[0020] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0021] like Figure 1 As shown in FIG, a machine learning-enhanced real-time hydraulic modeling method for a water supply network provided in this embodiment includes: Obtain the location number of each sensor in the water supply network and the corresponding historical hydraulic data collected, the historical data including the node water consumption, pipe section flow and node pressure of each pipeline in multiple collection cycles; Based on the location numbers of sensors in the water supply network and the time nodes in the acquisition cycle, a sensor sampling matrix corresponding to each pipeline is constructed, and historical hydraulic data is filled into the corresponding sensor acquisition matrix to form a training set; Building an initial model based on the KANSA model architecture, the initial model includes a feature extraction module, a feature fusion module and a prediction module; The feature extraction module is used to extract features from the input sensor acquisition matrix in the time dimension and the space dimension to obtain time-pipeline network water consumption features and space-pipeline network topology features; The feature fusion module is used to fuse the time-pipeline network water usage feature with the space-pipeline network topology feature to output a fused feature; The prediction module performs prediction based on the input fusion features to output prediction results, which include node water consumption, pipe section flow, and node pressure of all pipelines; Constructing a physical constraint loss function and using the training set to train the initial model to obtain a hydraulic prediction model for predicting the global hydraulic state; The sensor acquisition matrix of any pipe in the water supply network is input into the hydraulic prediction model to output the global network hydraulic data.

[0022] This embodiment also provides a real-time hydraulic monitoring system for a water supply network, which is implemented by the machine learning enhanced real-time hydraulic modeling method for a water supply network provided in the above embodiment.

[0023] In order to better illustrate the technical effect of the method provided in this embodiment, the following specific examples are provided for illustration.

[0024] like Figure 2 The figure shows the test pipe network topology used in this test in a certain region. It contains one water source, 23 water demand nodes, and 33 pipe segments. There are four sensors each for node water consumption, segment flow, and node pressure. The water plant's output volume and pressure are also known.

[0025] Firstly, a dynamic sensor sampling matrix is ​​constructed, and the newly collected data and historical time series information are fused through a sliding time window mechanism to form a sensor sampling matrix with both spatial topological correlation and temporal evolution characteristics.

[0026]

[0027] Table 1 above is a 24-hour node water consumption table for some monitoring points.

[0028]

[0029] Table 2 above is the 24-hour pipe flow table for some monitoring points.

[0030]

[0031] Table 3 is the 24h node pressure table of some monitoring points.

[0032] In Tables 1, 2, and 3 above, the row names are timestamps, and the column names are the numbers of the monitoring points on the topological map. The sensor collected values ​​are then normalized and preprocessed before being transformed into sampling matrices.

[0033] Among them, Table 4 is the node water consumption sampling matrix.

[0034]

[0035] Table 5 is the pipeline flow sampling matrix.

[0036]

[0037] Table 6 is the node pressure sampling matrix.

[0038]

[0039] Based on the above Tables 4, 5, and 6, the row names are the numbers of the monitoring points on the topology map, and the column names are timestamps. For the node / pipeline index row where no sensor is deployed, its value in the sampling matrix is ​​0.

[0040] Design a layered encoding-processing-decoding KANSA model architecture, in which the encoding layer uses KAN The Attention module extracts the network characteristics from the sampling matrix in two dimensions, time and space, and then performs feature fusion on the obtained time and space features. The processing layer uses the Kolmogorov-Arnold network to enhance the nonlinear mapping capability to process the coupled sensor sampling matrix obtained in the encoding layer. The decoding layer uses the multi-layer perceptron (MLP) to output the spatiotemporal distribution matrix of node water demand, pipe flow and node pressure.

[0041] Among them, in the feature extraction module, features are collected from the time dimension and spatial dimension of the sensor sampling matrix using the Kolmogorov-Arnold attention network, namely: ; ; ; ; ; in, Represents the input sensor acquisition matrix, the superscript T represents the transpose, are trainable parameters optimized via backpropagation in the neural network, , and There are three different linear transformations.

[0042] Subsequently, the feature fusion module is used to fuse the time-network water consumption characteristics and the space-network water consumption characteristics by vector multiplication: ; ; ; in, Represents the input sensor acquisition matrix, the superscript T represents the transpose, Indicates the order of features and deal with.

[0043] Node water consumption , pipe flow or nodal pressure The sampling matrix adopts the same processing method, and the processed results are respectively used , and To express.

[0044] In the form of residual connection, the non-zero position information of the sampling matrix is ​​used to correct the intermediate state of the model in real time to ensure the spatiotemporal consistency between the physical observables and the model predictions: ; ; ; The above sensor sampling matrix is ​​spliced ​​in a new dimension (" "),get , then through the Kolmogorov-Arnold network Extract the interaction features between sensor sampling matrices, namely: ; in , and They represent the node water consumption, pipe flow and node pressure sampling matrices processed by the encoder respectively.

[0045] The interaction features are then passed through a multi-layer perceptron Parallel decoding to obtain the node water consumption status , pipe flow status and node pressure state , which is expressed as follows: ; ; .

[0046] In the form of residual connection, the non-zero position information of the sampling matrix is ​​used to correct the model output in real time to ensure the spatiotemporal consistency between the physical observables and the model prediction values, and obtain the node water consumption status , pipe flow status and node pressure state ,Right now: ; ; .

[0047] A physical constraint loss function is constructed. The loss function is composed of the node flow continuity equation, the pipe head loss equation, and the ring energy balance equation. The back propagation algorithm is used to achieve the joint optimization of model parameters and physical conservation deviations: Mass conservation deviation ; Pipe section head loss equation ; Ring energy balance equation .

[0048] Finally, the calculated mass and energy conservation deviations are used to update the neural network model parameters. The neural network backpropagation algorithm continuously adjusts the model parameters until the calculated average deviations of the mass and energy conservation constraints meet the convergence threshold. At this point, the model outputs the final estimated node water consumption, pipe flow, and node pressure states.

[0049] In summary, this embodiment provides a real-time, highly accurate method for digital hydraulic modeling of water supply networks. By incorporating network hydraulic constraints into the loss function of a neural network-based model, a physical information-embedded neural network based on soft constraints is established, enabling real-time digital hydraulic modeling of water supply networks. By incorporating sensor time series features into self-constraints, the feature space spanned by state estimation is reduced, improving state estimation accuracy. The subsequent model provides technical support for the operational management and digital transformation of water supply network systems.

[0050] In addition, the terms "upper", "lower", "inner", "outer", "front", and "back" are used for descriptive purposes only and should not be understood as indicating or implying relative importance. Unless otherwise specifically stated, the relative steps, numerical expressions, and values ​​of the components and steps described in these embodiments do not limit the scope of the present invention.

[0051] Of course, the above description is only a specific embodiment of the present invention and is not intended to limit the scope of implementation of the present invention. Any equivalent changes or modifications made based on the structure, features and principles described in the scope of the patent application of the present invention should be included in the scope of the patent application of the present invention.

[0052] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the above-described embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above-described embodiments within the technical scope disclosed by the present invention, or replace some of the technical features therein with equivalents. Such modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.

Claims

1. A machine learning-enhanced real-time hydraulic modeling method for water supply networks, characterized in that: The following steps are involved: Obtain the location number of each sensor in the water supply network and the corresponding historical hydraulic data collected. The historical hydraulic data includes the node water consumption, pipe section flow, and node pressure of each monitoring target during multiple collection cycles. The monitoring targets include pipelines and water nodes. Based on the location numbers of sensors in the water supply network and the time nodes in the acquisition cycle, a sensor sampling matrix corresponding to each monitoring target is constructed, and historical hydraulic data is filled into the corresponding sensor acquisition matrix to form a training set; Building an initial model based on the KANSA model architecture, the initial model includes a feature extraction module, a feature fusion module and a prediction module; The feature extraction module is used to extract features from the input sensor acquisition matrix in the time dimension and the space dimension to obtain time-pipeline network water consumption features and space-pipeline network topology features; The feature fusion module is used to fuse the time-pipeline network water usage feature with the space-pipeline network topology feature to output a fused feature; The prediction module performs prediction based on the input fusion features to output prediction results, which include node water consumption, pipe section flow, and node pressure of all pipelines; Constructing a physical constraint loss function and using the training set to train the initial model to obtain a hydraulic prediction model for predicting the global hydraulic state; The sensor acquisition matrix of the monitoring target in the water supply network is input into the hydraulic prediction model to output the global network hydraulic data.

2. The machine learning enhanced real-time hydraulic modeling method for water supply network according to claim 1 is characterized in that: The sensor sampling matrix is ​​based on the historical hydraulic data of each pipeline or water node, and uses the sensor location number as the row index and the acquisition time node as the column index to construct the sensor acquisition matrix of node water consumption, pipe flow and node pressure respectively; For sensors that are not arranged in the corresponding pipeline or water node, the position of the corresponding sensor acquisition matrix is ​​assigned a null value.

3. The machine learning enhanced real-time hydraulic modeling method for water supply network according to claim 1 is characterized in that: The feature extraction module completes feature extraction of the sensor acquisition matrix in the time dimension and the spatial dimension by transposing the sensor acquisition matrix and coupling the Kolmogorov-Arnold network based on the Chebyshev basis function and the attention mechanism.

4. The machine learning enhanced real-time hydraulic modeling method for water supply network according to claim 1, characterized in that: The feature fusion module uses vector multiplication to fuse the time-pipeline network water consumption feature and the space-pipeline network topology feature.

5. The machine learning enhanced real-time hydraulic modeling method for water supply network according to claim 1, characterized in that: During the training process, the non-zero position information in the sensor sampling matrix is ​​used to correct the intermediate state and final output of the model.

6. The machine learning enhanced real-time hydraulic modeling method for water supply network according to claim 1, characterized in that: The physical constraint loss function includes the node flow continuity equation, the pipe head loss equation and the ring energy balance equation. During the model training process, the back propagation algorithm is used to achieve the joint optimization of model parameters and physical conservation deviations.

7. The machine learning enhanced real-time hydraulic modeling method for water supply network according to claim 6, characterized in that: The expression of the rational constraint loss function is as follows: Mass conservation deviation ; Pipe section head loss equation ; Ring energy balance equation ; in, Indicates the flow status of the pipe section; Indicates the water demand status of the node; Indicates the node pressure status; The pressure drop equation for the pipe section is expressed as follows, and the Hezen-Williams formula is used for calculation.

8. A real-time hydraulic monitoring system for a water supply network, characterized in that: This is achieved by the machine learning enhanced real-time hydraulic modeling method for water supply networks as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • A Real-Time DMA Modeling Method for Urban Water Supply Networks

    CN106202765B

  • Automatic updating and calibration algorithm for hydraulic model of water supply network

    CN113312849A

Cited By

  • Water service pipe network management system based on GIS

    CN120952760A

  • Machine learning-based method for calculating hydraulic performance of nodes of channel and pipe combined water delivery system

    CN121503232A

  • Method for calculating hydraulic performance of nodes of a conduit-pipeline combined water delivery system based on machine learning

    CN121503232B