Next Article in Journal
Advanced Lime Mortars for Historical Architectural Structures
Previous Article in Journal
2,2,3,3,4,4,4-Heptafluorobutyl Acetate: Transesterification Reaction of 2,2,3,3,4,4,4-Heptafluoro-1-Butanol and Isopropyl Acetate—Side-Product Composition
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Proceeding Paper

Application of a Neural Network Model to Short-Term Water Demand Forecasting †

1
Department of Engineering, University of Exeter, Exeter EX4 4QF, UK
2
Department of Computer Science, University of Exeter, Exeter EX4 4QF, UK
3
Department of Agricultural Engineering, University of Zambia, Lusaka J84J+GMJ, Zambia
*
Author to whom correspondence should be addressed.
Presented at the 3rd International Joint Conference on Water Distribution Systems Analysis & Computing and Control for the Water Industry (WDSA/CCWI 2024), Ferrara, Italy, 1–4 July 2024.
Eng. Proc. 2024, 69(1), 123; https://doi.org/10.3390/engproc2024069123
Published: 12 September 2024

Abstract

:
Relationships between water demand, pressure, and leakage highlight the need for accurate supply to match demand. This study addresses the challenges of forecasting short-term water demand and was part of the Battle for Water Demand Forecasting competition involving 10 real-world District Metered Areas in Italy. A nine-layer convolutional neural network model was proposed that considers demand from previous time steps, time of the day, weather conditions, day type, and other deterministic temporal factors to predict water demand. Bayesian optimization was used for hyperparameter tuning. The model can predict and forecast short-term water demand with reasonable accuracy.

1. Introduction

Water demand forecasting plays a crucial role in sustainable water supply management. The relationship between water demand, system pressure, and leakage highlights the need to match supply to demand accurately [1]. Oversupply during periods of low demand increases physical water losses, while undersupply during high-demand periods results in consumer dissatisfaction due to inadequate water quantities and low system pressure [2]. In some countries such as the UK, customers can even claim compensation from water utilities for low-pressure incidents. Consequently, water utilities must not only meet profit and consumer demands but also optimize the use of limited and scarce water resources [3]. To achieve these objectives, it is essential to ensure that water supply quantities align with anticipated demand. However, forecasting short-term water demand poses challenges due to frequent variations in urban demand patterns. Successfully predicting water demand can aid in the maintenance and expansion of water systems and facilitate the development of efficient decision support systems based on predictive analytics [4,5].
There are several factors to consider when forecasting water demand. Factors such as previous demand patterns, time of day, season, weather conditions, workdays, weekends, and holidays can influence demand. Considering these variables can help capture the complex dynamics of water demand and improve the accuracy of forecasting models [1,6]. Various approaches, both machine learning- and non-machine learning-based, can be applied to forecast water demand. Within these, several methods are commonly used to forecast water demand, including neural networks, support vector machines, traditional time series, regression models, random forests, and dynamic systems [1]. Machine learning techniques, such as neural networks, have gained popularity due to their ability to handle complex patterns and relationships in large datasets [7,8].
This study was part of the Battle for Water Demand Forecast (BWDF) competition, focusing on forecasting water demand for ten real-life District Metered Areas (DMAs) in Italy. The main aim of the study was to develop a model to forecast hourly demand for an entire week. Forecasting this multi-step problem, where each prediction must estimate 168 values (hourly demand for one week), was challenging. The main objective of the application of a neural network model to short-term water demand forecasting is to improve supply–demand balance. Better matching water supply amounts to anticipated demand enables water utilities to ensure adequate water supply under different demand conditions. Overall, this helps to achieve sustainable water supply management.

2. Methodology

This study employs a Convolutional Neural Network (CNN) for forecasting water demand by integrating historical inflow, weather data, and deterministic temporal information. As shown in Figure 1, the proposed CNN architecture incorporates two input layers: the first analyzes 14 past time series variables (all features in Table 1), and the second assesses nine future temporal variables for deterministic forecasting (temporal features in Table 1). The nine-layer CNN model is a multi-step model which predicts all the hourly demand for the forecast week at once. The past time series variables and future temporal variables are kept separate in the nine convolutional layers before being combined for the final prediction in the output layer.
To imbue the model with a temporal awareness, thetrigonometric encoding techniques using sine and cosine functions were utilized. This method enables the model to recognize and adapt to inherent seasonality and cyclical patterns across daily, weekly, and yearly intervals. Due to the deterministic nature of this temporal data, it can be projected into the future, allowing the model to have some temporal awareness of the future. The inclusion of masking layers within the model plays a pivotal role in eliminating invalid inputs (e.g., missing data), a critical factor for achieving accurate demand forecasting. By concatenating features from various layers, the model is equipped to analyze both historical trends and future conditions effectively. Each convolutional layer has a kernel size of 1 and 256 filters, except the final linear convolutional layer which has a filter size of 1.
Hyperparameter tuning was conducted through Bayesian Optimization, which builds a probabilistic model of the hyperparameter search space, tests the set of hyperparameters that are most likely to be optimal, and updates the probabilistic model after each test. The optimization tested 180 hyperparameter configurations in total, with each training process capped at 250 epochs. An early stopping mechanism was introduced to prevent overfitting, enhancing the model’s generalizability. Figure 2 shows a training and validation loss example from prediction week W1 for DMA A. Early stopping restores the best parameters from the best epoch. However, training continues for 50 epochs after the last improvement in validation loss before terminating, which helps to overcome small local minima in the objective space, which can be seen around epoch 25 in Figure 2. For hyperparameter optimization, the dataset was divided into training, validation, and testing segments following a 7:2:1 ratio, ensuring a comprehensive evaluation of the model’s performance. Data were pre-processed using the mean and standard deviation of the training data. Performance metrics were tailored to three given performance indicators, focusing on the mean absolute error (MAE) and maximum absolute error for the initial 24 h, and subsequently concentrating on MAE for the remaining 144 h. For each prediction week in the competition, the model was retrained using the latest dataset. This dataset was split such that the training data encompasses all but the last 4 weeks before the required prediction week. The 4 weeks prior to the prediction week were used as the validation set for early stopping.

3. Results and Discussion

The proposed method achieved reasonable accuracy for each of the three performance indicators during hyperparameter tuning. The three metrics were weighted to give a single value to optimize, with the MAE for the last 144 h being worth 50% compared to the other two performance indicators. This was chosen because two metrics concern the first 24 h of the prediction week, and only one metric concerns the remaining hours of the week. Using the same train–validation–test split as the hyperparameter optimization, Table 2 shows the three performance indicators for the best model architecture retrained on ‘DMA D’ as an example.

4. Conclusions

This article has developed a convolutional neural network model for forecasting water demand in district-metered areas. The proposed methodology takes advantage of deterministic features of water demand such as time of day, time of year, and seasonality, which provide important information about the future. The methodology showed good results during Bayesian Optimization of the hyperparameters, and example results for a particular DMA from the competition demonstrate low error values for all three performance indicators on the test set.

Author Contributions

Conceptualization, F.A., M.H., M.K., T.K., K.S. and R.F.; methodology, M.H., F.A. and T.K.; software, M.H.; validation, M.H.; formal analysis, M.H.; investigation, M.H.; resources, M.H.; data curation, M.H.; writing—original draft preparation, F.A., M.H., M.K., T.K. and K.S.; writing—review and editing, F.A., M.H., M.K., T.K., K.S. and R.F.; visualization, M.H.; supervision, R.F.; project administration, F.A. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The original data presented in the study are openly available at https://wdsa-ccwi2024.it/battle-of-water-networks/ (accessed on 13 March 2024).

Acknowledgments

Faten Ayyash acknowledges the Faculty for the Future Program, Schlumberger Foundation, for funding her Ph.D. scholarship. Matthew Hayslep acknowledges South West Water Ltd. for funding his Ph.D. Studentship. Taegon Ko acknowledges Korea Water Resources Corporation for funding his Ph.D. scholarship.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Niknam, A.; Zare, H.K.; Hosseininasab, H.; Mostafaeipour, A.; Herrera, M. A Critical Review of Short-Term Water Demand Forecasting Tools—What Method Should I Use? Sustainability 2022, 14, 5412. [Google Scholar] [CrossRef]
  2. Babić, B.; Dukić, A.; Stanić, M. Managing water pressure for water savings in developing countries. Water SA 2014, 40, 221–232. [Google Scholar] [CrossRef]
  3. Bello, O.; Abu-Mahfouz, A.M.; Hamam, Y.; Page, P.R.; Adedeji, K.B.; Piller, O. Solving management problems in water distribution networks: A survey of approaches and mathematical models. Water 2019, 11, 562. [Google Scholar] [CrossRef]
  4. Li, Z.; Wang, G.; Lin, D.; Mashhadi, A. Hybrid approach for accurate water demand prediction using socio-economic and climatic factors with ELM optimization. Heliyon 2024, 10, e25028. [Google Scholar] [CrossRef] [PubMed]
  5. Koo, K.M.; Han, K.H.; Jun, K.S.; Lee, G.M.; Kim, J.S.; Yum, K.T. Performance assessment for short-term water demand forecasting models on distinctive water uses in Korea. Sustainability 2021, 13, 6056. [Google Scholar] [CrossRef]
  6. Shabani, S.; Candelieri, A.; Archetti, F.; Naser, G. Gene expression programming coupled with unsupervised learning: A two-stage learning process in multi-scale, short-term water demand forecasts. Water 2018, 10, 142. [Google Scholar] [CrossRef]
  7. Soori, M.; Arezoo, B.; Dastres, R. Artificial neural networks in supply chain management, a review. J. Econ. Technol. 2023, 1, 179–196. [Google Scholar] [CrossRef]
  8. Taye, M.M. Understanding of Machine Learning with Deep Learning: Architectures, Workflow, Applications and Future Directions. Computers 2023, 12, 91. [Google Scholar] [CrossRef]
Figure 1. Schematic architecture of the CNN model. Activation functions are shown below the convolutional layers.
Figure 1. Schematic architecture of the CNN model. Activation functions are shown below the convolutional layers.
Engproc 69 00123 g001
Figure 2. Example training and validation losses from week W1 and DMA A.
Figure 2. Example training and validation losses from week W1 and DMA A.
Engproc 69 00123 g002
Table 1. The input data of the proposed model.
Table 1. The input data of the proposed model.
CategoryFeature
Flow (1)Past flow
Weather (4)Rainfall, temperature, humidity, wind speed
Temporal (9)Hour, Day, Day sin and cos, Week sin and cos, Year sin and cos, Weekend
Table 2. Metrics for the best model found during Bayesian Optimization of the hyperparameters.
Table 2. Metrics for the best model found during Bayesian Optimization of the hyperparameters.
Performance IndicatorValidation ScoreTest Score
MAE of the first 24 h0.3140.428
Maximum absolute error of the first 24 h3.9671.758
MAE for the remaining 144 h0.3210.430
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Ayyash, F.; Hayslep, M.; Ko, T.; Kalumba, M.; Simukonda, K.; Farmani, R. Application of a Neural Network Model to Short-Term Water Demand Forecasting. Eng. Proc. 2024, 69, 123. https://doi.org/10.3390/engproc2024069123

AMA Style

Ayyash F, Hayslep M, Ko T, Kalumba M, Simukonda K, Farmani R. Application of a Neural Network Model to Short-Term Water Demand Forecasting. Engineering Proceedings. 2024; 69(1):123. https://doi.org/10.3390/engproc2024069123

Chicago/Turabian Style

Ayyash, Faten, Matthew Hayslep, Taegon Ko, Mulenga Kalumba, Kondwani Simukonda, and Raziyeh Farmani. 2024. "Application of a Neural Network Model to Short-Term Water Demand Forecasting" Engineering Proceedings 69, no. 1: 123. https://doi.org/10.3390/engproc2024069123

APA Style

Ayyash, F., Hayslep, M., Ko, T., Kalumba, M., Simukonda, K., & Farmani, R. (2024). Application of a Neural Network Model to Short-Term Water Demand Forecasting. Engineering Proceedings, 69(1), 123. https://doi.org/10.3390/engproc2024069123

Article Metrics

Back to TopTop