This paper represents a comprehensive study of dam water discharge prediction using various deep-learning models. The main aim of this paper is to provide a data-driven solution for effective water resource management and thereby controlling the effects of floods and droughts. The Malampuzha dam, which has a spillway, a right bank canal (RBC), and a left bank canal (LBC), is considered for the study. While the spillway helps to control the water level in the reservoir by allowing extra water to flow downstream during times of severe rainfall or high inflow, hence reducing the risk of floods, the LBC and RBC are intended to divert water for agriculture. Altogether, 10 years of consecutive meteorological and dam-related data are utilized for training and testing the models in forecasting water discharge through LBC, RBC, and the spillway. Different deep-learning models, namely, long short-term memory, bi-directional long-short term memory, recurrent neural network, gated recurrent unit, one-dimensional convolutional neural network (1D-CNN), deep neural network, autoencoder, and residual networks are explored in predicting the accuracy of dam water discharge. After testing eight deep-learning models, it was discovered that 1D-CNN performed well in predicting the discharge of water.

  • Accurate prediction of the dam water discharge through the left bank canal, right bank canal, and the spillway of the Malampuzha dam.

  • It facilitates the government authorities and related people to take suitable decisions in case of floods due to the sudden opening of the dam.

  • Eight deep-learning models were trained and tested using 14 meteorological and dam parameters to find the most efficient model.

  • Graph plots are used for visualization.

Dam management is crucial in mitigating floods as well as droughts, to promote the social and economic well-being of the society (Hong et al. 2021). Accurate prediction of dam water discharge assists authorities in making better decisions to alleviate the severity of disasters. Government authorities can make apt decisions if they have prior information about opening the emergency shutters of the dam during floods (Fluixá-Sanmartín et al. 2020). This facilitates the evacuation of the public residing along the banks of the water flow from the dams. During the summer season, dam shutters are opened for drinking, irrigation, and hydropower generation. Dam management authorities will be able to make better decisions about the amount of water to be discharged from the dam and can efficiently manage droughts. Meteorological characteristics have a direct impact on dam administration (Lauri et al. 2012), and accurate weather forecasting has always been a laborious task that depends on dam management.

The factors that affect a dam's ability to function, such as water level forecasting (Xiong et al. 2021), hydropower generation (Sattar Hanoon et al. 2023), safety control, surface water temperature (Vishwakarma et al. 2022; Wang et al. 2022a), inflow (Latif et al. 2021; Han et al. 2023) and discharge prediction, water quality monitoring (Baek et al. 2020; Nasir et al. 2022), and anomaly detection, have been the subject of numerous studies. Dams are typically opened during the rainy season, and if the water discharge is significantly higher than usual, a rapid opening of the dam may cause trouble to the public. Therefore, how much water should be released from the dam should be evident based on a number of factors, including inflow, temperature, and precipitation in the catchment area. To ensure that the dam maintains a standard water level during a drought, the amount of water released for agriculture, drinking, and hydropower generation must be decided.

There has not been much research done on dam water outflow prediction. Some of the research papers examined river stream flow using several machine-learning models, with very few factors taken into account and very few studies focused on dam discharge forecasting. For example, a paper by Lin et al. (2021) discusses about forecasting stream flow by joining the different algorithms, such as the differential method, the feed-forward neural network (FFNN), and the long short-term memory (LSTM). Seepage discharge in earth dams has been studied by Parsaie et al. (2021) using multi-layer perceptron neural network (MLPNN), support vector machine (SVM), genetic programming, the M5 algorithm, the group method of data management, and multivariate adaptive regression spline (MARS). MARS was demonstrated to be the best algorithm, while M5 was determined to be the weakest. The field of dam discharge prediction currently lacks extensive exploration of deep-learning algorithms.

To predict the Soyang River Dam's discharge and to manage water resources downstream, a machine-learning model was created by Li et al. (2021). Several algorithms were tested using precipitation and dam inflow/discharge data from 1980 to 2020. The recurrent neural network (RNN)–LSTM model produced the best accurate results, with a Nash–Sutcliffe efficiency value of 0.796 and showing promise for overcoming the constraints of conventional physical models. The research by Soria-Lopez et al. (2023) analyses three machine-learning techniques for reservoir outflow modelling utilizing historical, present, and future hydrological and meteorological data: random forest (RF), SVM, and artificial neural network (ANN). The findings indicate that although all three models can accurately represent reservoir outflow, SVM performs better overall in terms of accuracy than RF and ANN, despite exhibiting a bigger relative mean bias. Conversely, ANN outperforms SVM for Lake Shelbyville based on a variety of measures. The paper (Tan et al. 2022) introduces a three-step artificial intelligence (AI) model enhancement for stream flow forecasting, utilizing LSTM in Step 1, introducing a rate of change approach in Step 2, and optimizing further with the bat-LSTM hybrid algorithm in Step 3. The study, based on 14 years of rainfall data in Kuala Lumpur's project, demonstrates the effectiveness of these steps, with LSTM outperforming ANN, rates of change modelling excelling, and bat algorithms combined with LSTM providing additional improvements.

In the research conducted by Hong et al. (2021), a machine-learning approach was employed to forecast discharge from the Soyang River Dam in South Korea using precipitation and dam inflow/outflow data spanning from 1980 to 2020, with various algorithms yielding promising results, with notably the RNN–LSTM model achieving the highest accuracy metrics among them. This demonstrates the feasibility of predicting dam discharge using machine learning, overcoming constraints associated with traditional physical models like scheduling human activities and requiring diverse input datasets.

Different LSTM architectures such as sequence input and single output, sequence input and sequence output and synched sequence input and output (SSIO) are discussed in Li et al. (2021) and clearly reveal that the SSIO LSTM architecture is the perfect model for rainfall-runoff prediction and controlling flood risks. In the study conducted by Abbasimehr & Paki (2022), a hybrid model combining LSTM and multi-head attention was developed and compared with traditional methods, demonstrating superior performance across 16 public time series datasets. Additionally, attention mechanisms proved effective in capturing patterns, highlighting the potential for further optimization based on time series characteristics in future research.

The forecasting of stream flow and reservoir operation planning are using AI techniques, such as LSTM models, support vector regression, and back propagation neural networks (Zhang et al. 2018), etc. Several AI models are more or less suitable for learning reservoir operation rules and simulating various scenarios, according to this study that examines the effects of parameter settings on model performance. The LSTM model, in particular, shows promise for cutting down on processing time and accurately simulating low-flow conditions. For early warning systems and efficient water management to work, accurate discharge forecasts are necessary, as discussed in Soria-Lopez et al. (2023). In order to forecast 1-day-ahead outflow from eight dams in Galicia, Spain, this study uses machine-learning techniques such as RF, SVM, and ANN. It shows that these models – especially artificial neural networks – are effective under typical circumstances.

In order to assess reservoir releases, which is essential for comprehending how dams affect stream flow and water resource management, the paper by Han et al. (2020) suggests a satellite-based reservoir routing scheme (SBRS). When comparing SBRS to other global schemes, especially for specific reservoirs, it performed better at estimating reservoir releases since it combined hydrological modelling with satellite measurements. In order to effectively manage water resources in ungagged or transboundary river basins, the study emphasizes the potential of this strategy for promoting cooperation among stakeholders. Within continental-scale stream flow and flood inundation models, the work done by Tavakoly et al. (2021) addresses the limited examination of the time-specific and spatially explicit storage-release dynamics of dams and reservoirs. The research evaluates the effects of these limits on stream flow and flood inundation extents by using operational daily flow release data from 175 dam locations into a simulation that covers around 1.2 million river reaches in the Mississippi River Basin. The results show substantial improvements in continental-scale mapping, with improvements in the performance of the stream flow model ranging from 2 to 380% across different regions and a correlation between changes in stream flow and estimated flood inundation.

Since the research works conducted on forecasting the discharge of water is very less, the studies conducted on the prediction of water flow in rivers are also included. The research done by Costa Silva et al. (2021) proposes an ensemble strategy utilizing recurrent neural networks to forecast water flow at Jirau Hydroelectric Power Plant on the Madeira River in Brazil, crucial for energy production and management. By combining three LSTM networks modelling the Madeira River and its tributaries, Mamoré and Abunã rivers, historical data validation reveals low errors for both individual LSTM networks and the ensemble model, showing superior accuracy compared to operational forecasts in four out of five scenarios, suggesting a promising approach for water flow forecasting based on river tributaries. Three models, LSTM, Tree Boost (TB), and RF, were utilized to predict daily stream flow for the Kowmung River using historical data from 2008 to 2017 in the paper by Latif & Ahmed (2021). Through analysis, the LSTM model demonstrated superior performance with root mean square error (RMSE) and Nash-Sutcliffe Efficiency (NSE) values of 102.411 and 0.911, respectively, suggesting its potential adoption by hydrologists for precise daily stream flow forecasting, although TB outperformed the RF model in the study.

Existing research often employs a limited set of meteorological and dam-related parameters, hindering the accuracy of discharge forecasts. To address this gap in knowledge, we leverage a comprehensive dataset encompassing 14 relevant meteorological and dam-related parameters spanning a 10-year period. This comprehensive approach, encompassing a diverse set of algorithms and extensive data, aims to achieve demonstrably more accurate dam discharge predictions. The current research concentrates on the discharge prediction of water from the Malampuzha dam situated in the Kerala State in India. There are three main ways by which the outflow of water discharge occurs in the Malampuzha dam. The left bank canal (LBC), right bank canal (RBC), and spillway are the ways through which water outflow occurs. The LBC and RBC are mainly used for irrigation purposes. Apart from that, the reservoir is also a source for drinking water, fishing, and hydropower generation. The Malampuzha dam has four spillway shutters through which the stored excess water is discharged. The focus of the paper is to predict the water discharge through the LBC, RBC, and spillway by the effective use of deep-learning algorithms. In order to predict the accuracy of dam discharge predictions, a variety of deep-learning models are investigated, including autoencoders, residual networks (ResNets), one-dimensional convolutional neural networks (1D-CNNs), RNNs, gated recurrent units (GRUs), and LSTMs. Each of these deep-learning models was built and trained, with hyper parameter tuning performed upon 80% of the data and validated upon 20% of the data. Since the prediction of dam water discharge is a regression problem, we have utilized the different types of errors in statistics as the matrices for evaluation. Mean squared error (MSE), mean absolute error (MAE), RMSE, and coefficient of determination (R2) functions are used as evaluation matrices for the outcome of discharge prediction.

The structure of the paper is organized as follows. A few studies on forecasting water discharge using deep-learning and machine-learning models are covered in the introduction section. In section 2, the background of the research field, the several deep-learning architectures used for the study, and the experimental setup are explained in detail. With a comparison of error functions and graph plots, section 3 presents the findings from the various deep-learning models used to estimate the water discharge at LBC, RBC, and spillway. The discussion on the results obtained by the deep-learning models and the conclusion are represented in sections 4 and 5, respectively.

Study area

The Malampuzha dam, located in the Palakkad district, is the largest reservoir in the state of Kerala, India, as specified in Figure 1. It has been chosen for the study of dam discharge forecasting. The dam has a height of 115.06 m and is located on the Malampuzha River, which is a tributary of the Bharathapuzha River. The entire catchment area of the dam is 147.63 km2. It is located at the latitude of 10.830271 and the longitude of 76.684007. The capacity of the dam is 236.69 m3. The Malampuzha Dam is equipped with a spillway, an RBC, and an LBC. While the spillway, as shown in Figure 2, helps to control the water level in the reservoir by allowing extra water to flow downstream during times of severe rainfall or high inflow, hence reducing the risk of floods, the LBC and RBC are intended to divert water for agriculture. For the dam, four spillway shutters have been strategically installed.

On the left side of the main dam, three sluices of dimensions 1.50 × 1.83 m each are positioned, meticulously engineered to facilitate a maximum discharge of 21.24 m3/s, effectively irrigating an expansive area of 17,050 hectares. Similarly, a solitary sluice is situated on the right bank, specially designed to permit a maximum discharge of 4.05 cum/s, catering to an area of 4,299 hectares. Next to the sluices of the LBC, the Kerala State Electricity Board has implemented power generation facilities. Apart from its primary role in irrigation, the reservoir's water undergoes treatment and is distributed as drinking water by the water authority. Additionally, the Fisheries department conducts pisciculture activities within the reservoir.

Data collection

The dam-related data for the following attributes of the Malampuzha dam have been collected from the irrigation department for the span of 10 years, commencing from 1 January 2010 to 31 December 2020. The parameters and their units are specified in Table 1. The sample data is illustrated in Figure 3.
Table 1

Malampuzha dam-related parameters considered for the study

Water levelStorageRain fall in mmDischarge in Mm³Inflow
Metre Mm³ Today Total LBC RBC Spillway Total Mm³ 
Water levelStorageRain fall in mmDischarge in Mm³Inflow
Metre Mm³ Today Total LBC RBC Spillway Total Mm³ 
Table 2

Meteorological parameters taken for the study

TimeTemperatureDew pointHumidityWind speedPressurePrecipitation
January °C|°F °C|°F Kph|Mph Hg|Mb Total (mm/in) 
TimeTemperatureDew pointHumidityWind speedPressurePrecipitation
January °C|°F °C|°F Kph|Mph Hg|Mb Total (mm/in) 
Figure 1

Malampuzha dam location in Google Maps.

Figure 1

Malampuzha dam location in Google Maps.

Close modal
Figure 2

Malampuzha dam spillways from Wiki Commons.

Figure 2

Malampuzha dam spillways from Wiki Commons.

Close modal

The meteorological data of Palakkad, where the Malampuzha Dam is situated, were also collected from the tcktcktck.org site, which provides historical climate data for the same time span for the following parameters, as shown in Figure 4. Some of the parameters included data in units such as temperature and dew point in degrees Celsius and Fahrenheit, wind speed in kilometres per hour and miles per hour, atmospheric pressure in inches of mercury (Hg) and mill bars (Mb) and precipitation in millimetres and in inches, as shown in Table 2.

Preprocessing

The collected meteorological data are extracted with temperature in degrees Celsius, dew point in degree Celsius, humidity in percentage, wind speed in kilometre per hour, atmospheric pressure in mercury, and precipitation in millimetres. The meteorological, as well as dam data, are merged together and the excel file is converted into one single file with .csv extension as shown in Figures 5(a) and 5(b) respectively. The features taken for training the models were temperature, dew point, humidity, wind speed, atmospheric pressure, water level, storage, daily rain, total rain, and inflow. Based on that, three column values, namely, discharge at LBC, discharge at RBC, and discharge at spillway, are to be predicted.

Deep-learning architectures

The various deep-learning models adopted in the study on dam discharge forecasting are discussed in this section.

Recurrent neural network

Apart from the input layer, hidden layer, and output layer as in the FFNN, the RNN also contains a recurrent layer so that data persists even after several time steps and there exists a recurrent connection between data. RNNs are mainly considered for resolving consecutive data such as speech identification, textual data processing, and time sequence prediction (Torres et al. 2021). The paper discusses two types of RNNs that are suitable for time sequence prediction. The first one is many-to-many RNN, and another is Elman RNN, in which the context layer retains the values of the neuron activations in the hidden layer.

The hidden state and output produced in each cell are the foundation for how RNNs operate. The hidden state is denoted by ht, the input by xt, and the output by yt at time step t. Wxh, Whh, and Why are the input and output weight matrices, the bias vectors bh and by, and the activation function f used for the hidden state. The formula is used to calculate the hidden state at time t.
(1)
The output at time t is obtained using the following formula:
(2)

As mentioned previously, there are a variety of RNNS, such as the LSTM, Bi-LSTM, GRU, and attention mechanism of which LSTM, Bi-LSTM, and GRU are used in this study.

Long short-term memory

The LSTM model architecture, as the name suggests, consists of two separate lines, one for long-term memory (cell state) and another for short-term memory (hidden state) by which the vanishing gradient and exploding gradient problem of RNNs can be avoided. An LSTM consists of three gates, namely, a forget gate, an input gate, and an output gate, as seen in Figure 6. The forget gate determines whether the content is to be retained or discarded (Abbasimehr & Paki 2022). For that, the sigmoid function is applied to the input xt and output of the previous LSTM unit ht−1, both multiplied with weights and then added with a bias term. The sigmoid function generates an output between 0 and 1 so that if the value produced approaches zero, it is discarded and the value approaching 1 is passed through the long-term line (Torres et al. 2021). Actually, short-term memory is linked with the hidden state vector ht−1 at time t − 1 and long-term memory is associated with the cell state Ct−1 at time t1 (Mehedi et al. 2022). The output of the forget gate is calculated using the following formula, where ft represents the forget gate at time t, ht−1 is the previous hidden state, xt is the present input of the LSTM cell, Wf is the weight matrix for the forget gate, and bf is the bias term for the forget gate.
(3)
Information is added to the cell state through the input gate it consisting of two sections. The first part it is obtained as formulated in the output generation of the forget gate. The second part, the candidate cell vector (Ct) is designed by applying the hyperbolic tangent function to the previously hidden state and present input after multiplying with the weights and adding the bias term (Kwon et al. 2023).
(4)
(5)
Then the forget gate output (ft) multiplied by the previous cell state (Ct−1) is added with the product of the input gate output (it) and the candidate cell vector (Ct).
(6)
The output gate ot regulates the information that flows out from the LSTM cell and it is generated by adding the bias for the output gate with the product of weights with the previously hidden state (ht−1) and the current input xt, respectively, and applying a sigmoid function to it. The hyperbolic tangent function applied to the cell state output (Ct) is multiplied with the output gate determining the hidden state to be produced from the LSTM cell (Kwon et al. 2023).
(7)
(8)

Thus, the required long-term dependencies are forwarded to the next LSTM cell through the Ct cell state, and short-term dependencies through the hidden state ht.

Bi-directional long-short term memory

The bidirectional RNN was introduced by Graves and Schmidhuber in 2005 (Yu et al. 2019), and contains a forward LSTM network for processing previous information as well as a backward LSTM network for utilizing future information (Huang et al. 2023). The forward LSTM cell calculates the hidden state and updates the memory cell based on the current input and previous LSTM hidden states. The backward LSTM network processes the input from the last LSTM cell to the first. The hidden states from both the forward and backward passes are combined together after both passes are complete, enabling additional feature extraction to be performed (Jaseena & Kovoor 2021).

The formula for the forward pass of the Bi-LSTM network is similar to the formulas of the LSTM network. The architecture of Bi-LSTM network is represented in Figure 7. If the input gate is represented by it′, the forget gate is represented by ft′, the output gate by ot′, the candidate memory cell by ct′, the cell state by ct′, and the hidden state by ℎt
(9)
(10)
(11)
(12)
(13)
(14)

The combined output from both directions is the final output that can be utilized for a variety of tasks such as sequence labelling and classification, or it can be passed through further layers for extra processing.

Gated recurrent units

The GRU is a variation of LSTM and it comprises an update gate and reset gate. The reset gate is a combination of the forget gate and input gate of LSTM and decides how much of the previous knowledge is to be abandoned. The update gate is similar to the output gate of the LSTM and decides how much previous data is to be passed into the next cell. Contrary to LSTM, which has two states (cell state and hidden state), the GRU has only one state (hidden state). The reset gate determines the hidden state of the cell. To generate a new hidden state, the input and data from the previous cell are transferred through the tanh function, and a candidate hidden state is produced. If ht is the hidden state at time step t, xt is the input at time step t, σ is the sigmoid activation function, ⊙ denotes element-wise multiplication, Wz, Wr, W are weight matrices for update gate, reset gate, and candidate activation, and bz, br, b are bias vectors for the gates and candidate activation. Then the mathematical formulas for the working of GRU are as follows:
(15)
(16)
(17)
(18)

Long-term relations are detected by the update gate and short-term relations are discovered by the reset gate.

Deep neural network

Between the input and output layers of an ANN, there are several hidden layers that make up a deep neural network (DNN). In a DNN, each hidden layer is made up of neurons, or units, which process the incoming data. Natural language processing, speech recognition, picture recognition, and natural language processing can all greatly benefit from the use of DNNs since they can learn complicated patterns and representations from large and complex datasets. Activation functions and weighted connections are used by many neurons in each layer to carry out computations. During the training, DNNs modify the weights and biases of the connections between neurons to learn new information. Typically, gradient descent and other optimization algorithms are used for this.

The mathematical expression for the calculation of i + 1th layer is
(19)

Here, the output of the ith layer ai is multiplied with the weight matrix Wi, bias bi is added, and then the activation function σ is applied to it for the outcome of the i + 1th layer. It can be computationally demanding and data-intensive to train DNNs. But the performance and scalability of DNNs have been greatly enhanced by developments in hardware (such as graphics processing units (GPUs) and tensor processing units (TPUs)) and algorithms (such as regularization schemes and optimization approaches), opening up DNNs to a wider range of applications.

One-dimensional convolutional neural networks

Generally, convolutional neural networks (CNNs) are used in computer vision-related problems whereas 1D-CNN are implemented in areas such as automatic speech recognition, real-time electrocardiogram monitoring, detection of damages in civil manufacturing, fault diagnosis of bearings, and detection of an open-circuit anomaly in high-power modular multilevel converters (Kiranyaz et al. 2021). The implementation of 1D-CNN is due to its less computational complexity and training time over 2D-CNN avoiding the necessity of 1D–2D transformation. 1D-CNN has convolution layers in which inputs are multiplied with a one-dimensional kernel that moves in only one direction to produce a feature map. The ReLu activation function is applied on the feature map to avoid negative results and subsequently passed to pooling layers for reducing the spatial size of the input without losing information. Dropout layers are also used by avoiding some neurons to omit overfitting, i.e., network performing well during training time and badly on unseen data in testing time. Then a fully connected layer that flattens the output is passed to the output layer.

Residual network

ResNets, specified in Figure 8, follows a CNN architecture in which the vanishing gradient problem is diminished by skipping the convolution layers that do nothing and reusing preceding layer activations. The ResNet typically contains 152 layers and all the previous feature maps are added. Y = x + F(x) is the equation for finding output in ResNet. During skip connections, F(x) becomes 0 and y becomes x itself, and the gradients become large such that the vanishing gradient problem is solved. Residual network and residual block add a short-cut path to bypass the original path, which is known as skip connections. The ResNet architecture, as shown in Figure 8, first passes through the convolution layer in which a filter is applied to the input that passes through ReLu activation function. The pooling layer is applied to the output of the convolution layer to reduce the size of the input and fed into a fully connected layer.
Figure 3

Dam-related data for the month of January 2010.

Figure 3

Dam-related data for the month of January 2010.

Close modal

Autoencoder

Autoencoders are used in sequential data processing to identify patterns and temporal connections in the data. All data entering the network are encoded by autoencoders, which subsequently send them through numerous levels of covert processing and decoding them before sending them to the output or production layer (Alsaade & Al-Adhaileh 2023). The autoencoder learns to extract meaningful features or representations from the sequential data by encoding them into a lower-dimensional latent space. The encoder receives the sequential input data and compresses it into a latent-space representation. The key characteristics or trends in the sequential data are captured by the latent-space representation. The decoder network then decodes the latent representation to recreate the initial sequential data. To reduce the reconstruction error between the input and the reconstructed output, the autoencoder is trained by back propagation. This motivates the model to pick up a brief yet useful representation of the data.

Experimental setup

The overall experimentation steps are represented by a diagram given in Figure 9. The data processing steps are explained in the above sections. After that, a suitable model is selected, and that model is built and trained. If sufficient performance is not obtained after training, then the model is fine-tuned and epochs are generated so that the model performs with a consistent accuracy. Then the model is evaluated with metrics, and results are plotted with graphs.
Figure 4

Meteorological data of January 2010.

Figure 4

Meteorological data of January 2010.

Close modal

The dataset contains all the data of different parameters in a .csv file format from 01 January 2010 to 31 December 2020 pertaining to the Malampuzha dam. Python 3.9.13 is used in Jupyter Notebook IDE for training and testing the models. Numpy, pandas, matplotlib, sklearn, tensorflows, and keras are the library functions used in this study, which contain pre-defined functions that help in efficient code writing. The parameters considered are temperature, humidity, wind speed, atmospheric pressure, dew point, water level of the dam, inflow of water to the dam, precipitation, total rainfall, water discharge through the LBC, RBC, and spillway. The columns of water discharge through LBC, RBC, and spillway are taken as labels and the remaining nine columns are considered as features. Then min-max scaling is applied separately to features and labels using the MinMaxScaler from the scikitlearn library function to ensure that all variables are on a similar scale.

The meteorological data and dam related data are combined into single file and pre-processing is performed. After the normalization, the dataset is split so that 80% of the data is used for training and 20% of the data is used for testing using train_test_split from scikitlearn. Then reshaping of inputs is performed with a time step of 1 to deal with time series data. After reshaping the inputs, different models based on LSTM, Bi-LSTM, RNN, GRU, DNN, 1D-CNN, DNNs, and ResNets are built corresponding to the three discharge values (LBC, RBC, spillway). Then the models are compiled using the Adam optimizer and MSE loss function. All the models are trained on the training data for 50 epochs with a batch size of 32. Evaluation of the models are performed using validation data and with error functions such as MSE, MAE, RMSE, and R2. A regression model performs better when the MSE, MAE, RMSE values are nearly equal to zero and R2 value is nearly equal to one. The test set X_test is used for building predictions with the trained models. To attain the actual discharge values in the original scale, inverse transformation is performed on the scaled predictions. Graphs are plotted for each model and for each discharge type of LBC, RBC, and spillway for understanding how well the model captures the patterns in the discharge data.

The discharge predictions at LBC, RBC, and spillway are plotted for LSTM, Bi-LSTM, RNN, GRU, DNN, 1D-CNN, ResNets, and autoencoders against actual discharge are given as follows. The x-axis of the graph plots depicts the time series and the y-axis of the graph plots depicts the water discharge (million cubic metres (Mm3)). The actual water discharge is shown in blue lines and the predicted discharge is shown in orange lines. The discharge predictions at LBC, RBC, and the spillway by the eight deep learning models are plotted in Figures 10, 11, and 12, respectively.

Comparison of error generated by different deep-learning models

The performance of various deep-learning models is displayed in Table 3 with error functions. The table clearly indicates that 1D-CNN has the least MSE, MAE, and RMSE and the highest R2 value with the top performance in predicting the discharge of water from the dam. The autoencoder model performs the least in discharge predictions with the highest MSE, MAE, RMSE values, and least R2 value.

Dam water discharge prediction can be considered a wholesome example of a regression task, and unlike classification-type tasks, the accuracy of the model is not considered for measuring the performance of the model. In the case of regression tasks such as discharge prediction in the future with the previous data, the performance of the model can be evaluated using metrics such as MAE, MSE, RMSE, and R2. The lower limit of zero denoting a perfect fit and values gradually increasing to infinity show a worse performance of the models, in terms of MAE, MSE, and RMSE (Chicco et al. 2021). The paper also discusses R2 which can take negative values, which illustrates the poor performance of the model, with the values approaching 1 depicting the perfect prediction of the model. That is, the range of values for the coefficient of determination is from negative infinity to 1. From Table 3, we can see that all the models have values nearly equal to zero for MSE, MAE, and RMSE, which demonstrates the high performance of the models.

Table 3

Results of error functions of deep-learning models

Deep-learning modelMSEMAERMSER2
LSTM 0.2319 0.2309 0.4816 0.3861 
Bi-LSTM 0.2332 0.2161 0.4829 0.3961 
RNN 0.3020 0.3111 0.5496 0.1957 
GRU 0.2407 0.2392 0.4906 0.3702 
DNN 0.2593 0.2248 0.5092 0.4183 
Autoencoder 0.3297 0.2532 0.5742 0.2860 
1D-CNN 0.2110 0.2077 0.4594 0.5014 
ResNets 0.3219 0.2173 0.5673 0.3405 
Deep-learning modelMSEMAERMSER2
LSTM 0.2319 0.2309 0.4816 0.3861 
Bi-LSTM 0.2332 0.2161 0.4829 0.3961 
RNN 0.3020 0.3111 0.5496 0.1957 
GRU 0.2407 0.2392 0.4906 0.3702 
DNN 0.2593 0.2248 0.5092 0.4183 
Autoencoder 0.3297 0.2532 0.5742 0.2860 
1D-CNN 0.2110 0.2077 0.4594 0.5014 
ResNets 0.3219 0.2173 0.5673 0.3405 

The overall performance of all the models was found to be very satisfactory with low MSE, MAE, and RMSE values and the R2 value of all the models being positive. MSE is usually taken as an assessment metric and a lower value designates that the model accomplishes a good performance. The table shows that 1D-CNN has the lowest mean square error with a value of 0.2110, MAE with a value of 0.2077, and with an RMSE value of 0.4594 and performs better than other models with the highest coefficient of determination. Compared with the other seven models, the autoencoder has the least performance with the highest R2 value and the least MSE, MAE, and RMSE values. So these deep-learning models, especially 1D-CNN, can be effectively utilized for the forecasting of water discharge from the dam and assist dam authorities in decision-making.

Also, the graphs of discharge predictions at LBC, RBC, and the spillway are illustrated in Figures 1012, respectively. The actual discharge of water is indicated by blue lines and the predictions are indicated by orange lines. Usually, Mm3 is the unit of volume commonly used for representing the dam discharges and it is shown along the y-axis in the graphs. The x-axis represents the various time periods. Small scales (0.1, 0.25, 0.5, 2.5 Mm3) are used for displaying the discharge predictions for all the models through the three means of outflow (LBC, RBC, and spillway). Since very small scales are used, the discrepancies between the actual and predicted values of discharge of water in million cubic metres are very less in the graphs, showing the good performance of the models.
Figure 5

(a) Preprocessed data combined in one single file from January 2010. (b) Preprocessed data of December 2020.

Figure 5

(a) Preprocessed data combined in one single file from January 2010. (b) Preprocessed data of December 2020.

Close modal
Figure 6

LSTM architecture (Wang et al. 2022b).

Figure 7

Bi-LSTM architecture.

Figure 7

Bi-LSTM architecture.

Close modal
Figure 9

Processing steps of deep-learning models.

Figure 9

Processing steps of deep-learning models.

Close modal
Figure 10

Discharge prediction at LBC using (a) LSTM, (b) Bi-LSTM, (c) RNN, (d) GRU, (e) DNN, (f) 1D-CNN, (g) ResNets, and (h) Autoencoder

Figure 10

Discharge prediction at LBC using (a) LSTM, (b) Bi-LSTM, (c) RNN, (d) GRU, (e) DNN, (f) 1D-CNN, (g) ResNets, and (h) Autoencoder

Close modal
Figure 11

Discharge prediction at RBC using (a) LSTM, (b) Bi-LSTM, (c) RNN, (d) GRU, (e) DNN, (f) 1D-CNN, (g) Resnets, and (h) Autoencoder

Figure 11

Discharge prediction at RBC using (a) LSTM, (b) Bi-LSTM, (c) RNN, (d) GRU, (e) DNN, (f) 1D-CNN, (g) Resnets, and (h) Autoencoder

Close modal
Figure 12

Discharge prediction at spillway using (a) LSTM, (b) Bi-LSTM, (c) RNN, (d) GRU, (e) DNN, (f) 1D-CNN, (g) ResNets, and (h) Autoencoder original and encoded feature

Figure 12

Discharge prediction at spillway using (a) LSTM, (b) Bi-LSTM, (c) RNN, (d) GRU, (e) DNN, (f) 1D-CNN, (g) ResNets, and (h) Autoencoder original and encoded feature

Close modal

Furthermore, the research can be extended by implementing the Internet of Things (IOT)-enabled devices surrounding the dam to monitor water levels, temperature, and flow rates. Several government departments such as the meteorological department, dam management authorities, revenue department, disaster management department, and public information department can be linked together through IOT. The implementation of IOT using deep-learning models can be studied so as to determine whether fast and correct decision-making can be done. The real-time prediction of the discharge of water will help the government authorities to inform the public about the possibility of raising water levels across the water discharge ways. This will help both the authorities and the public to take preventive measures to face flood-related situations in advance.

Dam water is mainly used for irrigation and household activities, and the accurate prediction of the water discharge through the dam outlets will help in making better decisions about the quantity of water to be released from the dam. Accurate prediction of the dam water discharge facilitates the government authorities and people to take the most suitable decisions in the case of floods due to the outflow of dam water. This paper discusses about forecasting the outflow of water from the Malampuzha dam through the LBC, RBC, and spillway shutters. For this, meteorological and dam-related parameters – such as temperature, humidity, wind speed, atmospheric pressure, dew point, dam water level, inflow to the dam, precipitation, total rainfall, and water discharge through the LBC, RBC, and spillway – are considered, and 10 years of daily data have been collected. Eight deep-learning models are trained, and hyper parameter tuning is performed on the preprocessed data using 50 epochs with a batch size of 32.

Water discharge forecasting is a regression task and the three outlets of water outflow are plotted with the actual and predicted results. All the models successfully predicted the water outflow in million cubic metres, and the performance of the 1D-CNN was superior compared to LSTM, Bi-LSTM, RNN, GRU, DNN, autoencoder, and ResNet. The 1D-CNN has an MSE value of 0.2110, an MAE value of 0.2077, an RMSE value of 0.4594 (where the perfect value is 0 and the worst value is infinity), and an R² value of 0.5014 (where the perfect value is 1 and the worst value is infinity). Subsequently, this will help to discharge excess water and help the government authorities give warning signals to the public in the form of different alerts.

The authors would like to thank the Irrigation Department of the Malampuzha Division for providing access to data.

The authors declare that no funds, grants, or other support were received during the preparation of this paper.

N. C. M. rendered support in literature review, conceptualized the article, developed the methodology, results analysis, conclusion, and wrote the original manuscript. N. T. supervised and manuscript revision.

Data cannot be made publicly available; readers should contact the corresponding author for details.

The authors declare there is no conflict.

Abbasimehr
H.
&
Paki
R.
(
2022
)
Improving time series forecasting using LSTM and attention models
,
J. Ambient Intell. Hum. Comput.
,
13
,
673
691
.
https://doi.org/10.1007/s12652-020-02761-x
.
Alsaade
F. W.
&
Al-Adhaileh
M. H.
(
2023
)
Cyber attack detection for self-driving vehicle networks using deep autoencoder algorithms
,
Sensors
,
23
,
4086
.
https://doi.org/10.3390/s23084086
.
Baek
S.-S.
,
Pyo
J.
&
Chun
J. A.
(
2020
)
Prediction of water level and water quality using a CNN-LSTM combined deep learning approach
,
Water
,
12
,
3399
.
https://doi.org/10.3390/w12123399
.
Chicco
D.
,
Warrens
M. J.
&
Jurman
G.
(
2021
)
The coefficient of determination R-squared is more informative than SMAPE, MAE, MAPE, MSE and RMSE in regression analysis evaluation
,
PeerJ Comput. Sci.
,
7
,
e623
.
https://doi.org/10.7717/peerj-cs.623
.
Costa Silva
D. F.
,
Galvão Filho
A. R.
,
Carvalho
R. V.
,
De Souza L. Ribeiro
F.
&
Coelho
C. J.
(
2021
)
Water flow forecasting based on river tributaries using long short-term memory ensemble model
,
Energies
,
14
,
7707
.
https://doi.org/10.3390/en14227707
.
Fluixá-Sanmartín
J.
,
Escuder-Bueno
I.
,
Morales-Torres
A.
&
Castillo-Rodríguez
J. T.
(
2020
)
Comprehensive decision-making approach for managing time dependent dam risks
,
Reliab. Eng. Syst. Saf.
,
203
,
107100
.
https://doi.org/10.1016/j.ress.2020.107100
.
Han
Z.
,
Long
D.
,
Huang
Q.
,
Li
X.
,
Zhao
F.
&
Wang
J.
(
2020
)
Improving reservoir outflow estimation for ungauged basins using satellite observations and a hydrological model
,
Water Resour. Res.
,
56
,
e2020WR027590
.
https://doi.org/10.1029/2020WR027590
.
Han
H.
,
Kim
D.
,
Wang
W.
&
Kim
H. S.
(
2023
)
Dam inflow prediction using large-scale climate variability and deep learning approach: A case study in South Korea
,
Water Supply
,
23
,
934
947
.
https://doi.org/10.2166/ws.2023.012
.
Hong
J.
,
Lee
S.
,
Lee
G.
,
Yang
D.
,
Bae
J. H.
,
Kim
J.
,
Kim
K.
&
Lim
K. J.
(
2021
)
Comparison of machine learning algorithms for discharge prediction of multipurpose dam
,
Water
,
13
,
3369
.
https://doi.org/10.3390/w13233369
.
Huang
J.
,
Yang
S.
,
Li
J.
,
Oh
J.
&
Kang
H.
(
2023
)
Prediction model of sparse autoencoder-based bidirectional LSTM for wastewater flow rate
,
J. Supercomput.
,
79
,
4412
4435
.
https://doi.org/10.1007/s11227-022-04827-3
.
Jaseena
K. U.
&
Kovoor
B. C.
(
2021
)
Decomposition-based hybrid wind speed forecasting model using deep bidirectional LSTM networks
,
Energy Convers. Manage.
,
234
,
113944
.
https://doi.org/10.1016/j.enconman.2021.113944
.
Kiranyaz
S.
,
Avci
O.
,
Abdeljaber
O.
,
Ince
T.
,
Gabbouj
M.
&
Inman
D. J.
(
2021
)
1D convolutional neural networks and applications: A survey
,
Mech. Syst. Signal Process.
,
151
,
107398
.
https://doi.org/10.1016/j.ymssp.2020.107398
.
Kwon
Y.
,
Cha
Y.
,
Park
Y.
&
Lee
S.
(
2023
)
Assessing the impacts of dam/weir operation on streamflow predictions using LSTM across South Korea
,
Sci. Rep.
,
13
,
9296
.
https://doi.org/10.1038/s41598-023-36439-z
.
Latif
S. D.
&
Ahmed
A. N.
(
2021
)
Application of deep learning method for daily streamflow time-Series prediction: A case study of the Kowmung River at Cedar Ford, Australia
,
Int. J. Sustainable Dev. Plann.
,
16
,
497
501
.
https://doi.org/10.18280/ijsdp.160310
.
Latif
S. D.
,
Ahmed
A. N.
,
Sathiamurthy
E.
,
Huang
Y. F.
&
El-Shafie
A.
(
2021
)
Evaluation of deep learning algorithm for inflow forecasting: A case study of Durian Tunggal Reservoir, Peninsular Malaysia
,
Nat. Hazards
,
109
,
351
369
.
https://doi.org/10.1007/s11069-021-04839-x
.
Lauri
H.
,
De Moel
H.
,
Ward
P. J.
,
Räsänen
T. A.
,
Keskinen
M.
&
Kummu
M.
(
2012
)
Future changes in Mekong River hydrology: Impact of climate change and reservoir operation on discharge
,
Hydrol. Earth Syst. Sci.
,
16
,
4603
4619
.
https://doi.org/10.5194/hess-16-4603-2012
.
Li
W.
,
Kiaghadi
A.
&
Dawson
C.
(
2021
)
Exploring the best sequence LSTM modeling architecture for flood prediction
,
Neural Comput. Appl.
,
33
,
5571
5580
.
https://doi.org/10.1007/s00521-020-05334-3
.
Lin
Y.
,
Wang
D.
,
Wang
G.
,
Qiu
J.
,
Long
K.
,
Du
Y.
,
Xie
H.
,
Wei
Z.
,
Shangguan
W.
&
Dai
Y.
(
2021
)
A hybrid deep learning algorithm and its application to streamflow prediction
,
J. Hydrol.
,
601
,
126636
.
https://doi.org/10.1016/j.jhydrol.2021.126636
.
Mehedi
M. A. A.
,
Khosravi
M.
,
Yazdan
M. M. S.
&
Shabanian
H.
(
2022
)
Exploring temporal dynamics of river discharge using univariate long short-term memory (LSTM) recurrent neural network at east branch of Delaware River
,
Hydrology
,
9
,
202
.
https://doi.org/10.3390/hydrology9110202
.
Nasir
N.
,
Kansal
A.
,
Alshaltone
O.
,
Barneih
F.
,
Sameer
M.
,
Shanableh
A.
&
Al-Shamma'a
A.
(
2022
)
Water quality classification using machine learning algorithms
,
J. Water Process Eng.
,
48
,
102920
.
https://doi.org/10.1016/j.jwpe.2022.102920
.
Parsaie, A., Haghiabi, A. H., Latif, S. D. & Tripathi, R. P. (2021) Predictive modelling of piezometric head and seepage discharge in earth dam using soft computational models. Environ. Sci. Pollut. Res. 28, 60842–60856.
https://doi.org/10.1007/s11356-021-15029-4
.
Sattar Hanoon
M.
,
Najah Ahmed
A.
,
Razzaq
A.
,
Oudah
A. Y.
,
Alkhayyat
A.
,
Feng Huang
Y.
,
Kumar
P.
&
El-Shafie
A.
(
2023
)
Prediction of hydropower generation via machine learning algorithms at three Gorges Dam, China
,
Ain Shams Eng. J.
,
14
,
101919
.
https://doi.org/10.1016/j.asej.2022.101919
.
Soria-Lopez
A.
,
Sobrido-Pouso
C.
,
Mejuto
J. C.
&
Astray
G.
(
2023
)
Assessment of different machine learning methods for reservoir outflow forecasting
,
Water
,
15
,
3380
.
https://doi.org/10.3390/w15193380
.
Tan
W. Y.
,
Lai
S. H.
,
Teo
F. Y.
,
Armaghani
D. J.
,
Pavitra
K.
&
El-Shafie
A.
(
2022
)
Three steps towards better forecasting for streamflow deep learning
,
Appl. Sci.
,
12
,
12567
.
https://doi.org/10.3390/app122412567
.
Tavakoly
A. A.
,
Gutenson
J. L.
,
Lewis
J. W.
,
Follum
M. L.
,
Rajib
A.
,
LaHatte
W. C.
&
Hamilton
C. O.
(
2021
)
Direct integration of numerous dams and reservoirs outflow in continental scale hydrologic modeling
,
Water Resour. Res.
,
57
,
e2020WR029544
.
https://doi.org/10.1029/2020WR029544
.
Torres
J. F.
,
Hadjout
D.
,
Sebaa
A.
,
Martínez-Álvarez
F.
&
Troncoso
A.
(
2021
)
Deep learning for time series forecasting: A survey
,
Big Data
,
9
,
3
21
.
https://doi.org/10.1089/big.2020.0159
.
Vishwakarma
D. K.
,
Ali
R.
,
Bhat
S. A.
,
Elbeltagi
A.
,
Kushwaha
N. L.
,
Kumar
R.
,
Rajput
J.
,
Heddam
S.
&
Kuriqi
A.
(
2022
)
Pre- and post-dam river water temperature alteration prediction using advanced machine learning models
,
Environ. Sci. Pollut. Res.
,
29
,
83321
83346
.
https://doi.org/10.1007/s11356-022-21596-x
.
Wang
L.
,
Xu
B.
,
Zhang
C.
,
Fu
G.
,
Chen
X.
,
Zheng
Y.
&
Zhang
J.
(
2022a
)
Surface water temperature prediction in large-deep reservoirs using a long short-term memory model
,
Ecol. Indic.
,
134
,
108491
.
https://doi.org/10.1016/j.ecolind.2021.108491
.
Wang
S.
,
Yang
B.
,
Chen
H.
,
Fang
W.
&
Yu
T.
(
2022b
)
LSTM-based deformation prediction model of the embankment dam of the Danjiangkou hydropower station
,
Water
,
14
,
2464
.
https://doi.org/10.3390/w14162464
.
Xiong
B.
,
Li
R.
,
Ren
D.
,
Liu
H.
,
Xu
T.
&
Huang
Y.
(
2021
)
Prediction of flooding in the downstream of the three Gorges reservoir based on a back propagation neural network optimized using the AdaBoost algorithm
,
Nat. Hazards
,
107
,
1559
1575
.
https://doi.org/10.1007/s11069-021-04646-4
.
Yu
Y.
,
Si
X.
,
Hu
C.
&
Zhang
J.
(
2019
)
A review of recurrent neural networks: lSTM cells and network architectures
,
Neural Comput.
,
31
,
1235
1270
.
https://doi.org/10.1162/neco_a_01199
.
Zhang
D.
,
Lin
J.
,
Peng
Q.
,
Wang
D.
,
Yang
T.
,
Sorooshian
S.
,
Liu
X.
&
Zhuang
J.
(
2018
)
Modeling and simulating of reservoir operation using the artificial neural network, support vector regression, deep learning algorithm
,
J. Hydrol.
,
565
,
720
736
.
https://doi.org/10.1016/j.jhydrol.2018.08.050
.
This is an Open Access article distributed under the terms of the Creative Commons Attribution Licence (CC BY 4.0), which permits copying, adaptation and redistribution, provided the original work is properly cited (http://creativecommons.org/licenses/by/4.0/).