Pipe network optimization scheduling system and method based on hydraulic model and neural network algorithm
By combining hydraulic models and neural network algorithms in the urban water supply pipe network system, a dispatching system is constructed, which solves the problems of tedious data processing and low computational efficiency in the water supply system, achieves more accurate and efficient water supply dispatch, and adapts to the needs of complex environments.
Patent Information
- Application Number
- CN202410682335.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-29
- Publication Date
- 2024-09-13
AI Technical Summary
The existing urban water supply network system scheduling has problems such as tedious data processing, uncertainty in results, and low computational efficiency of genetic algorithms, making it difficult to meet complex water supply needs and economic benefits.
Adopt a pipeline network optimization dispatching system based on hydraulic models and neural network algorithms. By constructing hydraulic models and dispatch models, combined with real-time monitoring data and historical water supply data, we can dynamically adjust pump operating frequency and dispatch parameters, optimize resource allocation, and achieve automation and intelligence. Scheduling.
It improves the accuracy and efficiency of dispatching, reduces the impact of human factors, adapts to the needs of water supply pipe networks of different sizes and complexity, reduces labor costs, and improves the economy and reliability of the water supply system.
Smart Images

Figure CN118644015A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of water supply pipe network system scheduling, and in particular to a pipe network optimization scheduling system and method based on a hydraulic model and a neural network algorithm. Background Art
[0002] The optimal scheduling of urban water supply network systems is a complex task that aims to ensure that the water needs of urban residents are met while maintaining water pressure and water quality standards. This process involves real-time monitoring of the status of urban water supply networks, predicting future water demand, and formulating reliable and economical scheduling plans based on this. The goal of optimal scheduling is to maximize economic and social benefits while meeting water supply demand.
[0003] In the process of achieving this goal, water supply system monitoring technology plays a key role. The monitoring system can automatically and in real time transmit key data (such as pressure and flow at the monitoring point, pressure and flow of water leaving the plant, water level in the clear water tank and water tower, etc.) to the dispatching center, providing a basis for decision-making for dispatchers.
[0004] In order to solve the optimization scheduling problem, genetic algorithms are widely used in optimization scheduling models. Genetic algorithms are a search algorithm that simulates the natural selection process. It optimizes the solution of the problem through selection, crossover and mutation operations in an iterative process. In urban water supply systems, genetic algorithms are used to solve multi-objective optimization problems to find the optimal solution that meets various constraints (such as hydraulic balance, water supply capacity and user demand).
[0005] However, manual scheduling and scheduling schemes using genetic algorithms also face some challenges in practical applications. First, dispatchers need to process and analyze a large amount of multi-dimensional data, which is time-consuming and laborious. Due to the lack of unified standards, different dispatchers may obtain different scheduling results. Secondly, the performance of genetic algorithms is highly dependent on the design of fitness functions, and the establishment of fitness functions directly affects the quality of scheduling results. In addition, genetic algorithms themselves are random and require a large number of samples to ensure the accuracy of the results. The algorithm is sensitive to initial values and is prone to falling into local optimal solutions, making it difficult to find global optimal solutions. As the scale of water supply networks expands, the computational efficiency of genetic algorithms may decrease, and these problems become more prominent.
[0006] To overcome these challenges, researchers and engineers are exploring more efficient optimization scheduling methods. This may include improving the fitness function design of genetic algorithms, developing new optimization algorithms, or combining machine learning techniques to improve the accuracy and efficiency of scheduling. Through these efforts, the optimization scheduling of urban water supply systems will be more scientific and efficient, thereby better serving urban residents and social development. Summary of the invention
[0007] In view of the problems existing in the prior art, the present invention provides a pipe network optimization scheduling system based on a hydraulic model and a neural network algorithm, comprising:
[0008] A hydraulic model building module is used to build a hydraulic model of the water supply network based on the collected water supply network structure data;
[0009] The scheduling model building module is used to train the scheduling model based on the collected historical pipe network water supply data;
[0010] The pipeline network scheduling module is respectively connected to the pipeline network hydraulic model construction module and the scheduling model construction module, and is used to input scheduling parameters into the scheduling model to obtain scheduling results, use the pipeline network hydraulic model to evaluate the scheduling results, and when it is evaluated that the scheduling results do not meet the output conditions, adjust the scheduling parameters to re-obtain the scheduling results and re-evaluate them, and when it is evaluated that the scheduling results meet the output conditions, output the current scheduling results.
[0011] Preferably, the water supply network structure data includes a plurality of nodes and network topology relationships and network equipment attributes, and the hydraulic model building module includes:
[0012] A model building unit is used to establish an initial network model of head loss between nodes and node flow continuity according to the network topology and network equipment properties;
[0013] A calibration unit is connected to the model building unit and is used to calibrate the initial model of the pipeline network to obtain the pipeline network hydraulic model whose simulation value and monitoring value meet the preset accuracy requirements when it is judged that there is an error based on the monitoring data of each node at the current moment and the model calculation value of the initial model of the pipeline network.
[0014] Preferably, the water supply network structure data includes the first curve coefficient of the water pump, the second curve coefficient of the water pump, the relative speed of the water pump, the virtual total head of the water pump and the water demand of multiple nodes, and the initial network model in the model building unit is:
[0015] H i -H j =h ij
[0016] Among them, H i is the water head at node i, H j is the water head at node j, h ij is the head loss between node i and node j, h ij Satisfies the following formula:
[0017]
[0018] Among them, r is the first curve coefficient of the water pump, n is the second curve coefficient of the water pump, ω is the relative speed of the water pump, h0 is the virtual total head of the water pump, Q ij is the traffic between node i and node j, Q ij Satisfies the following formula:
[0019]
[0020] Among them, D i is the water demand of node i.
[0021] Preferably, the calibration unit comprises:
[0022] A correction value calculation subunit is used to obtain the monitoring data of each observed node at the current moment and the model calculation value of the initial model of the pipe network, to construct an objective function and a gradient vector for each node when the difference between the monitoring data and the model calculation value is greater than a preset difference threshold value to optimize the parameters of the initial hydraulic model, and to calculate the corresponding correction value, to calculate the correction value of the next node when the L2 norm of the correction value of the current node is less than a preset norm threshold value, and to generate a correction signal when the L2 norm of the correction value of the current node is not less than the norm threshold value, to terminate the calculation of the correction value when the L2 norm of the correction value of all observed nodes is less than the preset norm threshold value or the number of calculation iterations exceeds the set number, otherwise, the correction value calculation for verification is continued iteratively;
[0023] a correction subunit, connected to the correction value calculation subunit, for correcting the flow at the next moment according to the correction value of the current node at the current moment and calculating the Jacobian matrix when receiving the correction signal, adjusting the gradient vector of the current node according to the Jacobian matrix and recalculating the correction value, calculating the correction value of the next node when the L2 norm of the correction value of the current node is less than a preset norm threshold, and generating a correction signal when the L2 norm of the correction value of the current node is not less than the norm threshold;
[0024] The leakage point finding subunit is respectively connected to the correction value calculation subunit and the correction subunit, and is used to indicate that the calibration of the parameters of the initial model of the pipeline network is completed when the L2 norm of the correction values of all the nodes is less than the preset norm threshold, so as to obtain the hydraulic model of the pipeline network.
[0025] Preferably, the historical pipe network water supply data includes the hourly average pressure of the pipe network pressure monitoring point and the hourly operation frequency data of the pump station, and the scheduling model building module includes
[0026] An initial model building unit is used to construct an initial model by using a neural network algorithm, taking the hourly average pressure of the pipe network pressure monitoring point as an input value and taking the hourly operation frequency data of the pump station as an output value;
[0027] A model training unit is connected to the initial model building unit and is used to train the initial model using the historical pipe network water supply data of the past year as a training set to obtain the scheduling model.
[0028] Preferably, the pipe network scheduling module includes:
[0029] A first scheduling unit, used for inputting the scheduling parameters into the scheduling model to obtain a scheduling result;
[0030] A second scheduling unit, connected to the first scheduling unit, is used to input the scheduling result into the pipe network hydraulic model to obtain a scheduling node simulation value;
[0031] An accuracy evaluation unit, connected to the second scheduling unit, and used to calculate the error between the scheduling node simulation value and the pre-configured scheduling expected value to obtain a scheduling accuracy evaluation result;
[0032] A judgment unit is connected to the accuracy evaluation unit and is used to start timing and adjust the scheduling parameters to re-obtain the scheduling result and re-evaluate when the scheduling accuracy evaluation result is not less than the preset scheduling accuracy, indicating that the output condition is not met. When the scheduling accuracy evaluation result is less than the preset scheduling accuracy or the timing times out, it indicates that the output condition is met and the current scheduling result is output.
[0033] Preferably, the scheduling node simulation value includes node simulation values of multiple nodes, each node is associated with a corresponding node expected value, and the accuracy evaluation unit includes:
[0034] A first error calculation subunit, used for calculating an average value of errors between the node simulation values and the node expected values of all the nodes;
[0035] A second error calculation subunit, configured to calculate a root mean square error according to the node simulation values and the node expected values of all the nodes;
[0036] A third error calculation subunit, configured to calculate an error standard deviation according to the node simulation values and the node expected values of all the nodes;
[0037] The accuracy evaluation subunit is respectively connected to the first error calculation subunit, the second error calculation subunit and the third error calculation subunit, and is used to obtain the scheduling accuracy evaluation result by weighted averaging the error mean value, the root mean square error and the error standard deviation.
[0038] Preferably, the water supply network structure data includes the pump coordinates of multiple water pumps and the node coordinates of multiple nodes, the scheduling parameters include the frequency of each of the water pumps, the scheduling node simulation value includes the node simulation value of each of the nodes, and each of the nodes is associated with a node expected value, then the judgment unit includes:
[0039] An association subunit, used for calculating the distance between each node and each water pump according to the node coordinates and the water pump coordinates, and associating each node with the nearest water pump according to each distance;
[0040] A parameter adjustment subunit is connected to the association subunit and is used to screen out each of the nodes whose difference between the node simulation value and the associated node expected value exceeds a threshold as a node to be adjusted, and then for each of the nodes to be adjusted, when the node simulation value is greater than the node expected value, the frequency of the corresponding water pump is reduced by a preset step size, and when the node simulation value is less than the node expected value, the frequency of the corresponding water pump is increased by a preset step size.
[0041] Preferably, the judging unit comprises:
[0042] A first timeout subunit is used to initialize the adjustment times when the output condition is not met for the first time, and increase the adjustment times by one each time the scheduling parameter is adjusted to obtain the scheduling result again, and indicates a timing timeout when the adjustment times exceed a preset upper limit;
[0043] or
[0044] The second timeout sub-unit is used to initialize the adjustment time when the output condition is not met for the first time. If the scheduling accuracy evaluation result of the re-obtained scheduling result is still not less than the preset scheduling accuracy before the adjustment time reaches the preset time upper limit, it indicates a timing timeout.
[0045] The present invention also provides a pipe network optimization scheduling method based on a hydraulic model and a neural network algorithm, which is applied to the above-mentioned pipe network optimization scheduling system, comprising:
[0046] Step S1, the pipe network optimization scheduling system constructs a pipe network hydraulic model according to the collected water supply pipe network structure data;
[0047] Step S2, the pipe network optimization scheduling system is trained to obtain a scheduling model based on the collected historical pipe network water supply data;
[0048] Step S3, the pipe network optimization scheduling system inputs the scheduling parameters into the scheduling model to obtain the scheduling results, uses the pipe network hydraulic model to evaluate the scheduling results, and evaluates whether the scheduling results meet the output conditions:
[0049] If yes, output the current scheduling result;
[0050] If not, the scheduling parameters are adjusted to obtain the scheduling result again and re-evaluate, and when the scheduling result is evaluated to meet the output condition, the current scheduling result is output.
[0051] The above technical solution has the following advantages or beneficial effects:
[0052] 1. Improve the accuracy of scheduling: Through the combination of hydraulic models and neural network algorithms, the system can more accurately predict and respond to actual water demand and reduce scheduling errors caused by human factors.
[0053] 2. Optimize resource allocation: The system can dynamically adjust scheduling parameters such as pump operation frequency based on real-time monitoring data and prediction models, optimize resource allocation, and improve the economy and reliability of the water supply system.
[0054] 3. Automation and intelligence: The system reduces the reliance on the professional knowledge and experience of dispatchers, realizes the automation and intelligence of the dispatch process, reduces labor costs and improves work efficiency. The system can adapt to water supply networks of different sizes and complexities, and respond to the ever-changing water supply environment and needs through continuous learning and adjustment. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 It is a structural schematic diagram of a pipe network optimization scheduling system based on a hydraulic model and a neural network algorithm in a preferred embodiment of the present invention;
[0056] Figure 2 The figure is a flow chart of a pipe network optimization scheduling method based on a hydraulic model and a neural network algorithm in a preferred embodiment of the present invention. DETAILED DESCRIPTION
[0057] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. The present invention is not limited to this embodiment, and other embodiments may also fall within the scope of the present invention as long as they conform to the gist of the present invention.
[0058] In a preferred embodiment of the present invention, based on the above problems existing in the prior art, a pipe network optimization scheduling system based on a hydraulic model and a neural network algorithm is provided. Figure 1 As shown, including:
[0059] A hydraulic model building module 1 is used to build a hydraulic model of the water supply network based on the collected water supply network structure data;
[0060] The scheduling model building module 2 is used to train the scheduling model based on the collected historical pipe network water supply data;
[0061] The pipeline network scheduling module 3 is respectively connected to the hydraulic model construction module 1 and the scheduling model construction module 2, and is used to input the scheduling parameters into the scheduling model to obtain the scheduling results, and use the pipeline network hydraulic model to evaluate the scheduling results. When the scheduling results do not meet the output conditions, the scheduling parameters are adjusted to re-obtain the scheduling results and re-evaluate them. When the scheduling results meet the output conditions, the current scheduling results are output.
[0062] Specifically, in this embodiment, three modules are used to implement the optimal dispatching of the pipe network based on the hydraulic model and the neural network algorithm, including:
[0063] 1. Hydraulic model construction module 1: This module constructs a hydraulic model of the water supply network based on the collected water supply network structure data. This helps to accurately simulate and analyze the dynamic behavior of water flow in the network and provide accurate hydraulic basis for scheduling decisions.
[0064] 2. Scheduling model construction module 2: Utilize the historical pipe network water supply data collected from the SCADA system (Supervisory Control and Data Acquisition, a monitoring and data acquisition system widely used in industrial control systems for real-time monitoring and control of various geographically dispersed equipment and processes) to obtain the scheduling model through neural network algorithm training. The neural network algorithm can learn from historical data and predict future water demand and water supply patterns, thereby improving the accuracy and efficiency of scheduling, making full use of historical data such as pressure, flow, pump station energy consumption, and pump operation frequency accumulated at monitoring points in the historical pipe network water supply data, and using artificial intelligence technology to establish a learnable and adaptive scheduling model, converting manual scheduling experience into machine learning experience. Fully realize automated scheduling and reduce human intervention and judgment of scheduling personnel.
[0065] 3. Pipeline network dispatch module 3: This module combines the hydraulic model and the dispatch model, inputs the dispatch parameters to obtain the dispatch results, and evaluates these results through the hydraulic model. If the dispatch results do not meet the preset output conditions, the system will adjust the dispatch parameters and re-evaluate until the optimal dispatch solution that meets the conditions is found.
[0066] It effectively solves the low efficiency of scheduling solutions based on statistical data and manual calculations, assists and reduces the workload of scheduling staff, and can quickly and automatically generate the most appropriate scheduling results.
[0067] In a preferred embodiment of the present invention, the water supply network structure data includes multiple nodes and network topology relationships and network equipment attributes. Figure 1 As shown, the hydraulic model building module 1 includes:
[0068] A model building unit 11 is used to establish an initial pipe network model of the head loss between each of the nodes and the continuity of the node flow according to the pipe network topology relationship and the pipe network equipment attributes;
[0069] The calibration unit 12 is connected to the model building unit 11, and is used to calibrate the initial model of the pipeline network when it is judged that there is an error based on the monitoring data of each node at the current moment and the model calculation value of the initial model of the pipeline network, so as to obtain the pipeline network hydraulic model whose simulation value and monitoring value meet the preset accuracy requirements.
[0070] In a preferred embodiment of the present invention, the water supply network structure data includes the first curve coefficient of the water pump, the second curve coefficient of the water pump, the relative speed of the water pump, the virtual total head of the water pump and the water demand of multiple nodes, and the initial network model in the model building unit is:
[0071] H i -H j =h ij
[0072] Among them, H i is the water head at node i, H j is the water head at node j, h ij is the head loss between node i and node j, h ij Satisfies the following formula:
[0073]
[0074] Among them, r is the first curve coefficient of the water pump, n is the second curve coefficient of the water pump, ω is the relative speed of the water pump, h0 is the virtual total head of the water pump, Q ij is the traffic between node i and node j, Q ij Satisfies the following formula:
[0075]
[0076] Among them, D i is the water demand of node i.
[0077] Specifically, in this embodiment, we collect water supply network drawing data to establish a hydraulic model. The hydraulic model principle is to simulate the pressure, flow, flow rate and water quality of the entire network based on the network node head loss equation and node flow equation and reaction dynamics;
[0078] In this embodiment, the content of the collected water supply network drawing data has a relatively complete water supply network topology structure (point-line connection relationship), which can specifically include information such as pipelines (pipe length, pipe diameter, pipe material), nodes (ground elevation), valves, water plants, water pumps, reservoirs, fire hydrants, etc. It can also include technical parameter data of pump station pumps, valve types and parameter information. Pipeline network monitoring equipment information related to model verification, and the accurate geographical location of the monitoring equipment, and historical data of the monitoring equipment.
[0079] We constructed the initial pipe network model based on the hydraulic model principle. The model formula is:
[0080] H i -H j =h ij
[0081] Among them, H i is the water head at node i, H j is the water head at node j, h ij is the head loss between node i and node j. In hydraulic engineering and water supply network analysis, "head" is an important concept, which represents the energy of a unit weight of fluid. Head is usually used to describe the sum of pressure energy, potential energy and kinetic energy of the fluid in the pipe network system, and is a measure of the energy state of the fluid. In water supply network analysis, head loss is a key calculation parameter, which represents the energy lost due to friction and other resistances when the fluid flows from one end of the pipe network to the other. The calculation of head loss is usually based on the Bernoulli'sequation, which takes into account the conservation of energy when the fluid flows in the pipe network.
[0082] In the hydraulic model mentioned in the present invention, the water head H at node i is i and the water head H at node j j The difference between the two, and the associated head loss h ij , which is the basis for calculating fluid flow and energy changes in pipe networks. These calculations are critical for simulating and optimizing the performance of water supply pipe networks.
[0083] h ij Satisfies the following formula:
[0084]
[0085] Among them, r is the first curve coefficient of the water pump, n is the second curve coefficient of the water pump, ω is the relative speed of the water pump, and h0 is the apparent total head of the water pump; the apparent total head (Apparent Total Head) is a concept in hydraulic engineering and pump station design. It refers to the sum of all resistances that the pump needs to overcome when transporting fluid, including all pressure changes experienced by the fluid from the pump inlet to the outlet, changes in the kinetic energy of the fluid flow, and changes in the fluid potential energy.
[0086] The virtual total head includes not only the actual physical height difference (potential energy change) of the fluid from the pump inlet to the outlet, but also the pressure loss caused by the fluid in the pipeline system due to friction and other resistances (such as elbows, valves, etc.). This concept is very important in pump selection and pipe network design because it determines how much energy the pump needs to provide to overcome these resistances to ensure that the fluid can be effectively transported from one place to another.
[0087] In the performance curve of the pump, the virtual total head is usually associated with the flow rate and efficiency of the pump, helping engineers determine the working point of the pump and the required power. In the water supply network optimization scheduling system, the concept of virtual total head can be used to evaluate the energy consumption and operating efficiency of the pump station, thereby optimizing the operating frequency and scheduling plan of the pump.
[0088] Q ij is the traffic between node i and node j, Q ij The following (node flow continuity equation) formula is satisfied:
[0089]
[0090] Among them, D i is the water demand at node i, which is a known quantity and, by convention, is positive if it flows into the node.
[0091] The node flow continuity equation is an application of the law of conservation of mass in hydraulic network analysis. It is used to ensure that the sum of the inflow and outflow flows at each node (i.e., the connection point in the pipe network) in the hydraulic system is equal. This equation is essential for understanding and analyzing flow characteristics in hydraulic networks such as water supply networks, drainage systems, and thermal networks. The node flow continuity equation can help determine the flow distribution at each node in the pipe network. For example, in the analysis of water supply networks, by applying this equation, the pressure and flow at each node can be calculated, which is essential for designing the pipe network, evaluating system performance, optimizing pump station operation, and ensuring water supply security.
[0092] Therefore, the hydraulic model constructed in this embodiment helps to accurately simulate and analyze the dynamic behavior of water flow in the pipe network, and provides an accurate hydraulic basis for scheduling decisions.
[0093] In a preferred embodiment of the present invention, Figure 1 As shown, the calibration unit 12 includes:
[0094] The correction value calculation subunit 121 is used to obtain the monitoring data of each node at the current moment and the model calculation value of the initial model of the pipe network, and to construct an objective function and a gradient vector for each node to optimize the parameters of the initial hydraulic model when the difference between the monitoring data and the model calculation value is greater than a preset difference threshold, and to calculate the corresponding correction value, and to calculate the correction value of the next node when the L2 norm of the correction value of the current node is less than a preset norm threshold, and to generate a correction signal when the L2 norm of the correction value of the current node is not less than the norm threshold, and to terminate the calculation of the correction value when the L2 norm of the correction value of all observed nodes is less than the preset norm threshold or the number of calculation iterations exceeds the set number, otherwise, the correction value calculation for verification is continued iteratively;
[0095] The correction subunit 122 is connected to the correction value calculation subunit 121, and is used to correct the flow at the next moment according to the correction value of the current node at the current moment and calculate the Jacobian matrix when receiving the correction signal, adjust the gradient vector of the current node according to the Jacobian matrix and recalculate the correction value, calculate the correction value of the next node when the L2 norm of the correction value of the current node is less than a preset norm threshold, and generate a correction signal when the L2 norm of the correction value of the current node is not less than the norm threshold;
[0096] Specifically, in this embodiment, there are various factors that affect the calculation accuracy of the hydraulic model, mainly including two aspects. On the one hand, the data collection process of the pipe network will produce errors with the actual situation. On the other hand, water supply is a dynamic change process, including the prediction of water supply flow of the pipe network water source, the statistics of water use rules of pipe network water users, the prediction of hourly water consumption, the allocation of water consumption, etc. Each link will have an impact on the accuracy of the hydraulic model. Therefore, the model establishment process needs to repeatedly adjust the calculation parameters to improve the model accuracy, so that the model conforms to the actual operation results of the water supply pipe network.
[0097] Specifically, in this embodiment, in the process of calibrating the hydraulic model of the pipeline network, we first monitor the monitoring values of each node of the pipeline network and use the initial hydraulic model to calculate the model value of each node. If the difference between the monitoring value and the model count value is too large, it means that the constructed initial hydraulic model needs to be calibrated. At this time, we construct the objective function of the initial hydraulic model and construct a gradient vector. In the process of constructing the objective function and constructing the gradient vector to calculate the correction value when there is a problem that does not meet the model accuracy requirements, the correction value is usually a vector.
[0098] The objective function is a mathematical expression used to describe the performance or error of a hydraulic model. It may include parameters such as flow, pressure, and water level, and reflects the difference between the model prediction and actual observation.
[0099] The gradient vector is a vector of partial derivatives of the objective function with respect to the model parameters. It indicates the direction and rate of change of the objective function in the parameter space. By calculating the gradient vector, we can determine how to adjust the model parameters to minimize the value of the objective function, that is, to reduce the difference between the model prediction and the actual observation.
[0100] The process of constructing the objective function and the gradient vector is a mature technology in model training technology and can be implemented using existing technologies for parameter optimization of the hydraulic model. It will not be described in detail here.
[0101] The correction value is calculated based on the gradient vector and used to update the value of the model parameters. Since the model parameters are usually multi-dimensional (for example, pipe diameter, roughness, node requirements, etc.), the correction value is also a vector with the same dimension as the model parameters. Each correction value component corresponds to a model parameter and indicates how to adjust the parameter to improve model performance.
[0102] By iteratively calculating the gradient vector and the correction value And updating the model parameters can gradually reduce the value of the objective function, thereby calibrating the hydraulic model and reducing the impact of leakage on model performance.
[0103] Represents the correction value vector The L2-norm of , which is the Euclidean norm.
[0104] Mathematically, for any vector A = [a1, a2, ..., an], its L2-norm (Euclidean norm) is defined as:
[0105]
[0106] This norm measures the length or size of a vector in Euclidean space. It represents the "length" or "size" of the correction value vector in multidimensional space. This quantity is very important in the optimization algorithm because it tells us the total magnitude of the adjustment required for the model parameters.
[0107] In the iterative optimization process, by minimizing The optimal model parameters can be gradually found, thereby improving the performance of the hydraulic model.
[0108] when When the value of becomes very small or no longer changes significantly, it means that the optimization process has converged and the model parameters have been adjusted to a relatively stable state. In this embodiment, Whether it is less than 0.01 is used to judge whether the model parameters are stable:
[0109] If it is stable, the parameters of the hydraulic model are optimized according to the monitoring value of the next node and the model calculation value;
[0110] If it is unstable, is the correction value at the current moment, Represents the flow of the Nth node at time K; then calculate the Jacobian matrix of the network at the current moment, extract the Jacobian matrix elements and combine them into the process of constructing the gradient vector to optimize the model parameters, and then recalculate the correction value Determine whether the model is stable;
[0111] As described above, the hydraulic model is optimized according to the monitoring value and model count value of each node (a total of n nodes, the process of constructing the objective function and the process of constructing the gradient vector are executed for each node, and the process of determining the optimal value is executed once). Is it less than the norm threshold 0.01), when the L2 norm of the correction value of all nodes is less than the preset norm threshold, it means that the calibration of the initial model of the pipe network is completed, and the hydraulic model of the pipe network is obtained;
[0112] In a preferred embodiment of the present invention, the historical pipe network water supply data includes the hourly average pressure of the pipe network pressure monitoring point and the hourly operation frequency data of the pump station. Figure 1 As shown, the scheduling model building module 2 includes
[0113] The initial model building unit 21 is used to construct an initial model by using a neural network algorithm, taking the hourly average pressure of the pipe network pressure monitoring point as an input value and taking the hourly operation frequency data of the pump station as an output value;
[0114] The model training unit 22 is connected to the initial model building unit 21 and is used to train the initial model using the historical pipe network water supply data of the past year as a training set to obtain a scheduling model.
[0115] Specifically, in this embodiment, the scheduling model is obtained by training a neural network algorithm.
[0116] The establishment of the dispatching model requires the collection of historical water supply data from the water company's pipe network, including: frequency data and energy consumption data of water pump operation at the hour or minute level, water plant outlet pressure, outlet flow data, pipe network pressure monitoring points, and flow monitoring point data. These data are processed and standardized to generate training data sets.
[0117] In this embodiment, the BP neural network algorithm is preferably used, with the hourly average pressure of the SCADA system pressure monitoring point as the input value and the hourly operation frequency data of the pump station as the output value to build a multi-input and multi-output initial model. The initial model uses the calendar data of the past year to train the initial model to obtain the scheduling model, which will be updated regularly and push the new model to the server on a weekly or monthly basis.
[0118] In a preferred embodiment of the present invention, Figure 1 As shown, the pipe network scheduling module 3 includes:
[0119] The first scheduling unit 31 is used to input the scheduling parameters into the scheduling model to obtain the scheduling result;
[0120] The second scheduling unit 32 is connected to the first scheduling unit 31 and is used to input the scheduling result into the pipe network hydraulic model to obtain the scheduling node simulation value;
[0121] The accuracy evaluation unit 33 is connected to the second scheduling unit 32 and is used to calculate the error between the scheduling node simulation value and the pre-configured scheduling expected value to obtain a scheduling accuracy evaluation result;
[0122] The judgment unit 34 is connected to the accuracy evaluation unit 33, and is used to start timing and adjust the scheduling parameters to re-obtain the scheduling result and re-evaluate when the scheduling accuracy evaluation result is not less than the preset scheduling accuracy, indicating that the output conditions are not met. When the scheduling accuracy evaluation result is less than the preset scheduling accuracy or the timing times out, it indicates that the output conditions are met and the current scheduling result is output.
[0123] Specifically, in this embodiment, a request is made to obtain the dispatching parameters, the dispatching model is called to obtain the dispatching results according to the dispatching parameters, and then the pipe network hydraulic model is called to obtain the dispatching node simulation value according to the dispatching results, and then the accuracy evaluation algorithm is used to calculate the error between the dispatching node simulation value and the pre-configured dispatching expected value to obtain the dispatching accuracy evaluation result, and it is judged whether it meets the required dispatching accuracy. If it meets the dispatching accuracy, the dispatching result is directly outputted. If it does not meet the requirements, the dispatching parameters need to be adjusted to recalculate the dispatching results and the dispatching node simulation value, and then judge whether the dispatching accuracy is met.
[0124] We also introduce a timeout mechanism so that even in extreme situations (for example, after multiple scheduling cycles, the optimal solution cannot be obtained or a dead loop occurs), we can still obtain a suboptimal scheduling result output that is close to the optimal solution.
[0125] In a preferred embodiment of the present invention, the scheduling node simulation value includes node simulation values of multiple nodes, and each node is associated with a corresponding node expected value. Figure 1 As shown, the accuracy evaluation unit 33 includes:
[0126] The first error calculation subunit 331 is used to calculate the average error between the node simulation value and the node expected value of all nodes;
[0127] The second error calculation subunit 332 is used to calculate the root mean square error according to the node simulation values and node expected values of all nodes;
[0128] The third error calculation subunit 333 is used to calculate the error standard deviation according to the node simulation values and node expected values of all nodes;
[0129] The accuracy evaluation subunit 334 is respectively connected to the first error calculation subunit 331, the second error calculation subunit 332 and the third error calculation subunit 333, and is used to obtain a scheduling accuracy evaluation result by weighted averaging the error mean, the root mean square error and the error standard deviation.
[0130] Specifically, in this embodiment, the scheduling accuracy evaluation algorithm calculates the difference between the node expected value of the observed node in the pipe network and the node simulation value calculated by the actual hydraulic model. The error between the expected value and the calculated value of each measured node is calculated, and the square error, root mean square error, error fluctuation and other error statistical methods are comprehensively evaluated in a weighted form. Each error response is different, and using any single method to evaluate accuracy will have its shortcomings. The following is a brief explanation of the role and principle of various statistical errors.
[0131] (1) MAE is the average value of absolute error, which can better reflect the overall situation of prediction value error and cannot reflect the error impact caused by individual abnormal points.
[0132]
[0133] in, It represents the average error between the node simulation value and the node expected value of a certain observation node, and μ represents the average error of all measurement points.
[0134] (2) Root mean square error (RMSE), which is the square root of the ratio of the square of the deviation between the predicted value and the true value to the number of observations, measures the deviation between the predicted value and the true value and is more sensitive to outliers in the data.
[0135]
[0136] Where: n is the total number of observed nodes, i represents the sequence number of the observed node, X obj,i represents the node expected value of a certain observation node, X model,i Represents the node simulation value of a certain observation node.
[0137] (3) Error fluctuation, i.e. error standard deviation. The standard deviation is usually determined relative to the mean value of the sample data, indicating how far a certain data observation value of the sample is from the mean value. The standard deviation indicates the degree of dispersion of the error data, reflecting the amplitude of the error fluctuation within a certain period of time.
[0138]
[0139] Where: x i represents the error of a certain observation node, μ represents the average error of all observation nodes, σ represents the error fluctuation, and N represents the total number of observation nodes.
[0140] The weighted average of multiple error results is used as the accuracy evaluation result after comprehensive consideration.
[0141] In a preferred embodiment of the present invention, the water supply network structure data includes the pump coordinates of multiple water pumps and the node coordinates of multiple nodes, the scheduling parameters include the frequency of each water pump, the scheduling node simulation value includes the node simulation value of each node, and each node is associated with a node expected value. Figure 1 As shown, the judging unit 34 includes:
[0142] An association subunit 341 is used to calculate the distance between each node and each water pump according to the node coordinates and the water pump coordinates, and associate each node with the nearest water pump according to each distance;
[0143] The parameter adjustment subunit 342 is connected to the associated subunit 31, and is used to screen out the nodes whose difference between the node simulation value and the associated node expected value exceeds the threshold as the nodes to be adjusted. Then, for each node to be adjusted, when the node simulation value is greater than the node expected value, the frequency of the corresponding water pump is reduced by a preset step size, and when the node simulation value is less than the node expected value, the frequency of the corresponding water pump is increased by a preset step size.
[0144] Specifically, in this embodiment, when the scheduling accuracy is not met, we need to adjust the scheduling parameters, and in this embodiment, the frequency of each water pump is adjusted.
[0145] The area with the greatest pressure regulation impact of each water pump satisfies a locality principle, that is, the area closer to the water pump is the first and most affected. Based on this consideration, we first use a clustering algorithm similar to kmeans to cluster the pipe network nodes with the water pump as the center. The parameter adjustment logic is as follows:
[0146] (1) With the water pump as the center, each node is classified by water pump; the distance from each node to each water pump needs to be calculated based on the node coordinates. For example, if there are three water pumps ABC and three nodes abc, then Aa, Ab, Ac, Ba, Bb, Bc, Ca, Cb, and Cc are calculated. Each node is associated with the water pump closest to it. One node corresponds to one water pump, and one water pump corresponds to multiple nodes, which is equivalent to classifying each node by water pump.
[0147] (2) Obtain the node simulation value of the measured node, compare it with the node expected value of the measured node, filter out the points whose distance to the expected value exceeds the threshold (the difference between the node simulation value and the node expected value of a certain measured node is greater than the set threshold), and then query which water pump these filtered points belong to;
[0148] If the node simulation value of the node under test is greater than the node expected value, then the operating frequency of the water pump is reduced according to the preset frequency step (preferably 1HZ in this embodiment); if the node simulation value of the node under test is less than the node expected value, then the operating frequency of the water pump is increased according to the preset frequency step (preferably 1HZ in this embodiment) to adjust the scheduling parameters and obtain a scheduling result output that meets the scheduling accuracy.
[0149] In a preferred embodiment of the present invention, the judging unit comprises:
[0150] A first timeout subunit is used to initialize the number of adjustments when the output condition is not met for the first time, and increase the number of adjustments each time the scheduling parameters are adjusted to obtain a new scheduling result, and indicate a timing timeout when the number of adjustments exceeds a preset upper limit;
[0151] or
[0152] The second timeout subunit is used to initialize the adjustment time when the output condition is not met for the first time. If the scheduling accuracy evaluation result of the re-obtained scheduling result is still not less than the preset scheduling accuracy before the adjustment time reaches the preset time upper limit, it indicates a timing timeout.
[0153] Specifically, as mentioned above, a timeout mechanism is introduced. In this embodiment, two timeout judgment methods are provided. One is to judge according to the number of times the scheduling parameters are adjusted. The number of times the scheduling parameters are adjusted from the beginning is recorded (in another embodiment, it can also be the number of times the scheduling results are calculated). If the number exceeds a certain upper limit, the scheduling is stopped and the best scheduling result output generated at the current position is returned. At the same time, it is necessary to mark the reliability of the solution.
[0154] The other is to judge by time, using a timer. When the scheduling result does not meet the scheduling accuracy, the scheduling parameters are adjusted repeatedly and the scheduling time exceeds the upper limit, the scheduling is terminated and the scheduling result at this time is immediately returned as the suboptimal scheduling result. This system uses the first solution by default and supports the second solution at the same time. Users can switch dynamically according to actual needs.
[0155] The present invention also provides a pipe network optimization scheduling method based on a hydraulic model and a neural network algorithm, which is applied to the above-mentioned pipe network optimization scheduling system, such as Figure 2 As shown, including:
[0156] Step S1, the pipe network optimization scheduling system constructs a pipe network hydraulic model according to the collected water supply pipe network structure data;
[0157] Step S2, the pipe network optimization scheduling system obtains a scheduling model by training based on the collected historical pipe network water supply data;
[0158] Step S3, the pipe network optimization dispatching system inputs the dispatching parameters into the dispatching model to obtain the dispatching results, and uses the pipe network hydraulic model to evaluate the dispatching results, and evaluates whether the dispatching results meet the output conditions:
[0159] If so, output the current scheduling result;
[0160] If not, adjust the scheduling parameters to obtain the scheduling result again and re-evaluate it. When the scheduling result meets the output conditions, output the current scheduling result.
[0161] The above are only preferred embodiments of the present invention, and are not intended to limit the implementation methods and protection scope of the present invention. Those skilled in the art should be aware that all solutions obtained by equivalent substitutions and obvious changes made using the contents of this specification and illustrations should be included in the protection scope of the present invention.
Claims
1. A pipe network optimization dispatching system based on hydraulic model and neural network algorithm, characterized in that: include: A hydraulic model building module is used to build a hydraulic model of the water supply network based on the collected water supply network structure data; The scheduling model building module is used to train the scheduling model based on the collected historical pipe network water supply data; The pipeline network scheduling module is respectively connected to the pipeline network hydraulic model construction module and the scheduling model construction module, and is used to input scheduling parameters into the scheduling model to obtain scheduling results, use the pipeline network hydraulic model to evaluate the scheduling results, and when it is evaluated that the scheduling results do not meet the output conditions, adjust the scheduling parameters to re-obtain the scheduling results and re-evaluate them, and when it is evaluated that the scheduling results meet the output conditions, output the current scheduling results.
2. The pipe network optimization and dispatching system according to claim 1, characterized in that: The water supply network structure data includes multiple nodes, network topology relationships, and network equipment attributes, and the hydraulic model building module includes: A model building unit, used to establish an initial pipe network model of the head loss between each of the nodes and the continuity of the node flow according to the pipe network topology relationship and the pipe network equipment properties; A calibration unit is connected to the model building unit and is used to calibrate the initial model of the pipeline network to obtain the pipeline network hydraulic model whose simulation value and monitoring value meet the preset accuracy requirements when it is judged that there is an error based on the monitoring data of each node at the current moment and the model calculation value of the initial model of the pipeline network.
3. The pipe network optimization and dispatching system according to claim 2, characterized in that: The water supply network structure data includes the first curve coefficient of the water pump, the second curve coefficient of the water pump, the relative speed of the water pump, the virtual total head of the water pump and the water demand of multiple nodes. The initial network model in the model building unit is: H i -H j =h ij Among them, H i is the water head at node i, H j is the water head at node j, h ij is the head loss between node i and node j, h ij Satisfies the following formula: Among them, r is the first curve coefficient of the water pump, n is the second curve coefficient of the water pump, ω is the relative speed of the water pump, h0 is the virtual total head of the water pump, Q ij is the traffic between node i and node j, Q ij Satisfies the following formula: Among them, D i is the water demand of node i.
4. The pipe network optimization scheduling system according to claim 2, characterized in that: The calibration unit comprises: A correction value calculation subunit is used to obtain the monitoring data of each node at the current moment and the model calculation value of the initial model of the pipe network, to construct an objective function and a gradient vector for each node when the difference between the monitoring data and the model calculation value is greater than a preset difference threshold value to optimize the parameters of the initial hydraulic model, and to calculate the corresponding correction value, to calculate the correction value of the next node when the L2 norm of the correction value of the current node is less than a preset norm threshold value, and to generate a correction signal when the L2 norm of the correction value of the current node is not less than the norm threshold value, to terminate the calculation of the correction value when the L2 norm of the correction value of all observed nodes is less than the preset norm threshold value or the number of calculation iterations exceeds the set number, otherwise, the correction value calculation for verification is continued by iteration; a correction subunit, connected to the correction value calculation subunit, for correcting the flow at the next moment according to the correction value of the current node at the current moment and calculating the Jacobian matrix when receiving the correction signal, adjusting the gradient vector of the current node according to the Jacobian matrix and recalculating the correction value, calculating the correction value of the next node when the L2 norm of the correction value of the current node is less than a preset norm threshold, and generating a correction signal when the L2 norm of the correction value of the current node is not less than the norm threshold; The leakage point finding subunit is respectively connected to the correction value calculation subunit and the correction subunit, and is used to indicate that the calibration of the parameters of the initial model of the pipeline network is completed when the L2 norm of the correction values of all the nodes is less than the preset norm threshold, so as to obtain the hydraulic model of the pipeline network.
5. The pipe network optimization scheduling system according to claim 1, characterized in that: The historical pipe network water supply data includes the hourly average pressure of the pipe network pressure monitoring point and the hourly operation frequency data of the pump station. The scheduling model building module includes An initial model building unit is used to construct an initial model by using a neural network algorithm, taking the hourly average pressure of the pipe network pressure monitoring point as an input value and taking the hourly operation frequency data of the pump station as an output value; A model training unit is connected to the initial model building unit and is used to train the initial model using the historical pipe network water supply data of the past year as a training set to obtain the scheduling model.
6. The pipe network optimization and dispatching system according to claim 1, characterized in that: The pipe network scheduling module includes: A first scheduling unit, used for inputting the scheduling parameters into the scheduling model to obtain a scheduling result; A second scheduling unit, connected to the first scheduling unit, is used to input the scheduling result into the pipe network hydraulic model to obtain a scheduling node simulation value; An accuracy evaluation unit, connected to the second scheduling unit, and used to calculate the error between the scheduling node simulation value and the pre-configured scheduling expected value to obtain a scheduling accuracy evaluation result; A judgment unit is connected to the accuracy evaluation unit and is used to start timing and adjust the scheduling parameters to re-obtain the scheduling result and re-evaluate when the scheduling accuracy evaluation result is not less than the preset scheduling accuracy, indicating that the output condition is not met. When the scheduling accuracy evaluation result is less than the preset scheduling accuracy or the timing times out, it indicates that the output condition is met and the current scheduling result is output.
7. The pipe network optimization and dispatching system according to claim 6, characterized in that: The scheduling node simulation value includes node simulation values of multiple nodes, each node is associated with a corresponding node expected value, and the accuracy evaluation unit includes: A first error calculation subunit, used for calculating an average value of errors between the node simulation values and the node expected values of all the nodes; A second error calculation subunit, configured to calculate a root mean square error according to the node simulation values and the node expected values of all the nodes; A third error calculation subunit, configured to calculate an error standard deviation according to the node simulation values and the node expected values of all the nodes; The accuracy evaluation subunit is respectively connected to the first error calculation subunit, the second error calculation subunit and the third error calculation subunit, and is used to obtain the scheduling accuracy evaluation result by weighted averaging the error mean value, the root mean square error and the error standard deviation.
8. The pipe network optimization and dispatching system according to claim 6, characterized in that: The water supply network structure data includes the pump coordinates of multiple water pumps and the node coordinates of multiple nodes, the scheduling parameters include the frequency of each of the water pumps, the scheduling node simulation value includes the node simulation value of each of the nodes, and each of the nodes is associated with a node expected value, then the judgment unit includes: An association subunit, used for calculating the distance between each node and each water pump according to the node coordinates and the water pump coordinates, and associating each node with the nearest water pump according to each distance; A parameter adjustment subunit is connected to the association subunit and is used to screen out each of the nodes whose difference between the node simulation value and the associated node expected value exceeds a threshold as a node to be adjusted, and then for each of the nodes to be adjusted, when the node simulation value is greater than the node expected value, the frequency of the corresponding water pump is reduced by a preset step size, and when the node simulation value is less than the node expected value, the frequency of the corresponding water pump is increased by a preset step size.
9. The pipe network optimization scheduling system according to claim 6, characterized in that: The judging unit comprises: A first timeout subunit is used to initialize the adjustment times when the output condition is not met for the first time, and increase the adjustment times by one each time the scheduling parameter is adjusted to obtain the scheduling result again, and indicates a timing timeout when the adjustment times exceed a preset upper limit; or The second timeout sub-unit is used to initialize the adjustment time when the output condition is not met for the first time. If the scheduling accuracy evaluation result of the re-obtained scheduling result is still not less than the preset scheduling accuracy before the adjustment time reaches the preset time upper limit, it indicates a timing timeout.
10. A pipe network optimization scheduling method based on hydraulic model and neural network algorithm, characterized in that: The pipe network optimization dispatching system according to any one of claims 1 to 9 comprises: Step S1, the pipe network optimization scheduling system constructs a pipe network hydraulic model according to the collected water supply pipe network structure data; Step S2, the pipe network optimization scheduling system is trained to obtain a scheduling model based on the collected historical pipe network water supply data; Step S3, the pipe network optimization scheduling system inputs the scheduling parameters into the scheduling model to obtain the scheduling results, uses the pipe network hydraulic model to evaluate the scheduling results, and evaluates whether the scheduling results meet the output conditions: If yes, output the current scheduling result; If not, the scheduling parameters are adjusted to obtain the scheduling result again and re-evaluate, and when the scheduling result is evaluated to meet the output condition, the current scheduling result is output.
Citation Information
Cited By
Pressurized water supply control and regulation system for booster pump of water purifier
CN119717549A
Water supply pipe network optimization scheduling method and system based on multi-model coupling
CN120146323A
A water supply network optimization scheduling method and system based on multi-model coupling
CN120146323B
Multi-field coupling inversion analysis method for water-rich characteristics of karst disaster source
CN121659688A
Multi-field Coupled Inversion Analysis Method for Water-Rich Characteristics of Karst Disaster Sources
CN121659688B
