ABSTRACT
Hydraulic models of long-distance water supply systems are usually used to regulate valves and pumps to realize the expected water distribution. Establishing and calibrating the hydraulic model is time-consuming and requires many engineering parameters, which are usually uncertain. This paper proposes a metamodel based on artificial neural networks (ANNs) to replace the computationally costly hydraulic model. The metamodel is designed to bypass the modeling and calibration processes of the hydraulic model and directly estimate the target state of valves and pumps to realize real-time water distribution. The proposed approach uses the water levels of reservoirs and the flow demands of water plants as input data to the ANN. The metamodel's output prescribes the opening of regulating valves and the speed of pumps. A realistic case study is presented to validate the accuracy and efficiency of the approach. The results show that ANN is feasible as a state predictor to realize real-time water distribution in practical water supply projects.
HIGHLIGHTS
Introduces a novel method utilizing artificial neural networks (ANNs) to directly estimate valve and pump states.
Highlights the potential of ANNs to replace complex hydraulic models, enabling real-time water distribution.
INTRODUCTION
A long-distance water supply project is an effective method to reallocate and improve the utilization of water resources. However, the number of projects and their complexity is increasing (Wang et al. 2019; Shi et al. 2021). The traditional operation mode based on human experience needs operators to regulate valves and pumps repeatedly to make the actual flow equal to the desired flow. This adjustment process usually takes a long time to complete, so it cannot meet the demand for real-time water distribution. Current water distribution methods obtain the target state of equipment (including valve openings and pump speeds) through hydraulic simulation models. Although these models can realize nearly real-time water distribution, their input requires complete and accurate topographic data, including pipe length and diameter, pump and valve parameters, reservoir levels, etc. (Xue et al. 2022). In addition, a calibration process is required before using hydraulic models, which involves repeatedly adjusting the pipeline roughness, valve resistance coefficients, pump characteristic curves, etc., to minimize the error between the simulated and observed values (Meirelles et al. 2017; Lima et al. 2018). Because of this, these hydraulic simulation models are computationally expensive. Real-time water distribution needs an efficient method to evaluate the state of equipment multiple times and as fast as possible.
With the continuous progress of artificial intelligence technology and machine learning (ML) methods, water engineers and researchers have increasingly resorted to metamodels, which are also known as surrogate models (Razavi et al. 2012). The metamodels can replace computationally costly models once the correlations between inputs and outputs are established based on the available data (Broad et al. 2010). Initially, linear regression has been used to estimate this correlation. However, modern approaches use artificial neural networks (ANNs) and ML theory, because of their strong nonlinear expression ability (Romano & Kapelan 2014; LeCun et al. 2015). At present, the multi-layer perceptron (MLP) is the most widely used ANN model. The MLP is a specific ANN architecture that consists of a series of layers in which all the units of a layer are connected to all the neurons in the previous and next layers (Hu et al. 2019; Garzon et al. 2022).
The main application of metamodels is the reduction of the computational efforts required by the hydraulic models (Pasha & Lansey 2014; Dini & Tabesh 2019). For example, Rao & Salomons (2007) used an ANN to predict the consequences of different control settings to deliver a safe pump and valve setting while minimizing pumping costs. Sayers et al. (2019) proposed a deep-learning ANN to reduce the number of hydraulic simulations without compromising the level of optimization. ANNs are also used to estimate variables in hydraulic models. Meirelles et al. (2017) used limited monitoring data to estimate the pressures at all nodes in a water distribution network, which increases the number of available samples in the calibration procedure. Similarly, Lima et al. (2018) presented a metamodel based on an ANN for predicting the current pressures of the water distribution system in real time to identify abnormal events. Although ANNs have been widely employed for meta-modeling in urban water networks, related applications are rarely seen in long-distance water supply systems.
This paper proposes the use of ANN for real-time state estimation of hydraulic equipment to realize real-time flow regulation of water supply systems. This is the first time that ANN has been utilized to replace hydraulic models in long-distance water supply systems. The ANN-based real-time state predictor of the hydraulic equipment is an innovative approach since the hydraulic model is not required. The state predictor uses the current water levels of reservoirs and the flow demands of water plants as input and delivers the opening of regulating valves and the speed of pumps as output. The proposed approach is evaluated in a practical long-distance water supply system, which has two water supply modes: by gravity and by pumping. The obtained results show that, for the real-time control of pumps and valves, it is feasible to replace the hydraulic model simulation with the ANN-based metamodel. This bypasses the computationally expensive calibration process needed for the hydraulic model.
METHODOLOGY
Multi-layer perceptron network
The ANN is an architecture composed of a large number of neurons, which allows distributed parallel information processing by imitating the behavioral characteristics of animal neural networks. Similar to the neuron learning process, the ANN memorizes and learns the relationship between inputs and outputs, and then maps the new input signal with a certain rule to the output results (Garzon et al. 2022).
Artificial neural network architecture
The key to the ANN predictions is finding the proper number of layers and neurons in each layer for a particular problem. The flows and the pressures of the water supply system are determined by physical and operational conditions, such as pipe material, pipe diameter, pipe length, pump and valve curves, reservoir levels, pump and valve status, etc. For a water supply system with a known topology, its physical boundary is fixed. When a reservoir level or flow demand changes, the water supply system can achieve the expected flow by operating valves and pumps.
Once the type of neural network has been defined, trial and error analyses should be conducted to find its best architecture. In the case study, we changed the number of hidden layers and the number of neurons in each hidden layer. The number of neurons in the input layers is determined by the number of reservoirs and the number of water plants, and the number of neurons in the input layers is determined by the number of regulating valves. In addition, some neurons need to be added to the output layer when the pumps are put into operation. Generally, each pump should be represented by one neuron. However, when considering the pump station operation, in this paper, only one neuron is added to the output layer since these pumps have the same head and flow.
Artificial neural network training
CASE STUDY
Case description
Parameters . | S1 . | S2 . | S3 . | S4 . | S5 . | S6 . | S7 . | S8 . | S9 . | S10 . | S11 . |
---|---|---|---|---|---|---|---|---|---|---|---|
Design flow of water plant (m3/s) | 7.6 | 18.3 | 3.2 | 5.1 | 0.4 | 1.7 | 1.2 | 0.9 | 2.4 | 1.1 | 1.4 |
Water level of water plant (m) | 13.0 | 14.1 | 13.0 | 13.0 | 11.0 | 9.40 | 11.0 | 5.0 | 9.0 | 5.0 | 8.0 |
Pipe length (km) | 2.40 | 8.85 | 4.91 | 5.10 | 1.20 | 22.78 | 8.90 | 20.68 | 3.83 | 6.48 | 17.54 |
Pipe diameter (m) | 2.8 | 3.5 | 1.6 | 2.6 | 0.8 | 1.8 | 1.2 | 1.2 | 2.0 | 1.2 | 1.4 |
Parameters . | S1 . | S2 . | S3 . | S4 . | S5 . | S6 . | S7 . | S8 . | S9 . | S10 . | S11 . |
---|---|---|---|---|---|---|---|---|---|---|---|
Design flow of water plant (m3/s) | 7.6 | 18.3 | 3.2 | 5.1 | 0.4 | 1.7 | 1.2 | 0.9 | 2.4 | 1.1 | 1.4 |
Water level of water plant (m) | 13.0 | 14.1 | 13.0 | 13.0 | 11.0 | 9.40 | 11.0 | 5.0 | 9.0 | 5.0 | 8.0 |
Pipe length (km) | 2.40 | 8.85 | 4.91 | 5.10 | 1.20 | 22.78 | 8.90 | 20.68 | 3.83 | 6.48 | 17.54 |
Pipe diameter (m) | 2.8 | 3.5 | 1.6 | 2.6 | 0.8 | 1.8 | 1.2 | 1.2 | 2.0 | 1.2 | 1.4 |
Parameters . | M1 . | M2 . | M3 . | M4 . | M5 . | M6 . | M7 . | M8 . | M9 . | M10 . | M11 . |
---|---|---|---|---|---|---|---|---|---|---|---|
Pipe length (km) | 1.76 | 1.21 | 25.51 | 3.07 | 40.18 | 4.50 | 18.83 | 0.00 | 18.74 | 17.60 | 0.00 |
Pipe diameter (m) | 6.00 | 6.00 | 3.60 | 3.20 | 3.20 | 3.20 | 2.80 | 2.80 | 2.40 | 2.0 | 2.0 |
Parameters . | M1 . | M2 . | M3 . | M4 . | M5 . | M6 . | M7 . | M8 . | M9 . | M10 . | M11 . |
---|---|---|---|---|---|---|---|---|---|---|---|
Pipe length (km) | 1.76 | 1.21 | 25.51 | 3.07 | 40.18 | 4.50 | 18.83 | 0.00 | 18.74 | 17.60 | 0.00 |
Pipe diameter (m) | 6.00 | 6.00 | 3.60 | 3.20 | 3.20 | 3.20 | 2.80 | 2.80 | 2.40 | 2.0 | 2.0 |
Details of implement
To verify the performance of the ANN under the two different water supply modes, three different databases were created using the process depicted in Figure 2, where the flow of each water plant varied between 0 and the design value of 43.3 m3/s, and the water level of the reservoir varied between 61.2 and 70.0 m. Database 1 has 1,000 gravity-driven scenarios where the pumps do not participate in the operation. Database 2 has 1,000 pressurized water scenarios where the pumps add to gravity. Database 3 is composed of 1,000 scenarios randomly selected from Databases 1 and 2, that is, the operating state of the pump is not known in advance. The above databases were used to produce three differently trained neural networks. When training the ANN, 900 scenarios were randomly selected as training samples, and the remaining 100 scenarios were used as test samples.
The neural network is implemented on the MATLAB platform. According to the details provided in Section 2.2, the input layer of the ANN consists of 12 neurons, while the output layer comprises 12 neurons when the operating state of the pump is predetermined. To optimize performance while ensuring computational efficiency, various combinations of hidden layers and neurons were explored. Ultimately, it was determined that a single hidden layer with 18 neurons achieved satisfactory results. During the training process, a maximum of 1,000 iterations are executed. The target loss function is set with a minimum value of 10−5. In addition, the learning rate, which plays a crucial role in regulating the convergence speed of the neural network model, is empirically established at 0.01.
RESULTS AND DISCUSSION
Scenarios . | Gravity scenarios . | Pump scenarios . | Mixed scenarios . |
---|---|---|---|
TMRE (%) | 0.82 | 0.83 | 1.24 |
R2 | 0.9984 | 0.9982 | 0.9962 |
Scenarios . | Gravity scenarios . | Pump scenarios . | Mixed scenarios . |
---|---|---|---|
TMRE (%) | 0.82 | 0.83 | 1.24 |
R2 | 0.9984 | 0.9982 | 0.9962 |
For the water supply systems with fixed water supply modes (whether gravity flow or pump pressurization), the ANN has high accuracy as a state predictor, and the predicted data are in good agreement with the simulated data of the hydraulic model (R2 = 0.9984 for gravity flow and R2 = 0.9982 for pump pressurization). For the water supply systems with an unknown water supply mode in advance, although the predicted error increases slightly, the results are satisfactory considering the uncertainty level of the hydraulic components in the real operation (R2 = 0.9962). In summary, the above analysis results confirm the feasibility of using ANN as a target state predictor of hydraulic components in water supply systems to manage real-time water distribution.
The above results were verified against simulated data provided by the hydraulic model. To verify the generalization ability of the ANN and its application in practical projects, a set of monitored data in the case study was randomly selected for further testing. The ANN trained by Database 3 was used to estimate the real-time state of valves and pumps based on the monitored flow and reservoir level, as it contains all the possible operating conditions of the water supply system.
Table 4 shows the comparison results of hydraulic simulation, ANN prediction, and monitoring (measured) data. The TMRE between the simulation values of the hydraulic model and the monitored values is 1.69%, while the TMRE between the prediction results of the ANN and the monitored value is 2.13%. The prediction error of the ANN increases by 0.44% compared with the numerical simulation because the ANN was trained based on the hydraulic model results, and the prediction results have a superposition of errors. However, the TMRE between the prediction results of the ANN and the simulation values of the hydraulic model is only 0.88%. Hence, with the increasing abundance of monitored data and the gradual development of ANN model algorithms, the monitored data can be directly used for constructing ANNs in the future, such that more accurate estimation results will be obtained.
Number . | 1 . | 2 . | 3 . | 4 . | 5 . | 6 . | 7 . | 8 . | 9 . | 10 . | 11 . | 12 . | TMRE (%) . |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Demand flow (m3/s) | 6.84 | 16.47 | 2.88 | 4.59 | 0.36 | 1.53 | 1.08 | 0.81 | 2.16 | 1.1 | 1.4 | 2.5 | – |
Monitored data (MD) | 49.44 | 42.17 | 81.42 | 53.08 | 48.84 | 51.35 | 58.73 | 53.78 | 63.40 | 79.62 | 97.38 | 608.5 | – |
Simulated data (SD) | 49.02 | 42.38 | 82.86 | 51.66 | 50.07 | 52.56 | 59.99 | 54.86 | 62.94 | 79.27 | 100 | 598.8 | – |
Predicted data (PD) | 49.03 | 42.08 | 83.51 | 51.15 | 50.71 | 52.34 | 60.68 | 55.62 | 64.13 | 80.02 | 100.4 | 602.3 | – |
Error between MD and SD (%) | 0.84 | 0.50 | 1.76 | 2.69 | 2.51 | 2.37 | 2.15 | 2.00 | 0.73 | 0.44 | 2.69 | 1.59 | 1.69 |
Error between MD and PD (%) | 0.82 | 0.21 | 2.56 | 3.65 | 3.82 | 1.94 | 3.32 | 3.41 | 1.15 | 0.50 | 3.10 | 1.02 | 2.13 |
Error between SD and PD (%) | 0.02 | 0.71 | 0.78 | 0.99 | 1.28 | 0.42 | 1.15 | 1.39 | 1.89 | 0.95 | 0.40 | 0.58 | 0.88 |
Number . | 1 . | 2 . | 3 . | 4 . | 5 . | 6 . | 7 . | 8 . | 9 . | 10 . | 11 . | 12 . | TMRE (%) . |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Demand flow (m3/s) | 6.84 | 16.47 | 2.88 | 4.59 | 0.36 | 1.53 | 1.08 | 0.81 | 2.16 | 1.1 | 1.4 | 2.5 | – |
Monitored data (MD) | 49.44 | 42.17 | 81.42 | 53.08 | 48.84 | 51.35 | 58.73 | 53.78 | 63.40 | 79.62 | 97.38 | 608.5 | – |
Simulated data (SD) | 49.02 | 42.38 | 82.86 | 51.66 | 50.07 | 52.56 | 59.99 | 54.86 | 62.94 | 79.27 | 100 | 598.8 | – |
Predicted data (PD) | 49.03 | 42.08 | 83.51 | 51.15 | 50.71 | 52.34 | 60.68 | 55.62 | 64.13 | 80.02 | 100.4 | 602.3 | – |
Error between MD and SD (%) | 0.84 | 0.50 | 1.76 | 2.69 | 2.51 | 2.37 | 2.15 | 2.00 | 0.73 | 0.44 | 2.69 | 1.59 | 1.69 |
Error between MD and PD (%) | 0.82 | 0.21 | 2.56 | 3.65 | 3.82 | 1.94 | 3.32 | 3.41 | 1.15 | 0.50 | 3.10 | 1.02 | 2.13 |
Error between SD and PD (%) | 0.02 | 0.71 | 0.78 | 0.99 | 1.28 | 0.42 | 1.15 | 1.39 | 1.89 | 0.95 | 0.40 | 0.58 | 0.88 |
CONCLUSIONS
A metamodel based on ANN to estimate the target states of valves and pumps directly (without a hydraulic model) has been presented. The metamodel uses the water levels of reservoirs and the flow demands of water plants as input and delivers the opening of regulating valves and the speed of pumps as output. A case study showed that the results were satisfactory regardless of the water supply (gravity or pump), demonstrating the feasibility of the ANN as a state predictor. Therefore, if trained correctly, ANNs can be used for real-time water distribution of long-distance water supply systems. However, two notes before using this tool:
1. The ANN was trained with numerical data from a hydraulic model as samples. With the increasing abundance of monitored data in practical projects and the gradual development of ANN model algorithms, the actual state of the pumps and valves can be directly used to train ANNs in the future, without the need for hydraulic modeling and calibration.
2. The water levels of reservoirs and the flow demands of water plants should be within the range of ANN training; otherwise, the estimated results may be unreliable. In addition, any change in the layout of the water supply system, such as the replacement of valves and pumps, the addition of new branches, etc., requires new ANN training for the actual system.
ACKNOWLEDGEMENTS
This work was supported by the Postgraduate Research & Practice Innovation Program of Jiangsu Province (Grant number KYCX22_0648, the National Natural Science Foundation of China (Grant numbers 51879087 and 51839008), and the fund of National Key Laboratory of Water Disaster Prevention (5240152H2).
DATA AVAILABILITY STATEMENT
All relevant data are included in the paper or its Supplementary Information.
CONFLICT OF INTEREST
The authors declare there is no conflict.