# Predicting Energy Generation Using Forecasting Techniques in Catalan Reservoirs

^{*}

## Abstract

**:**

## 1. Introduction

- Analyze open data provided by governmental organizations.
- Compare state-of-the-art forecasting techniques.
- Predict reservoir water levels in longer periods of time series than literature.
- Predict reservoir water levels in higher accuracy than similar works in the state-of-the-art.

## 2. State of the Art

## 3. Data Processing

#### 3.1. Reservoirs

#### 3.2. Data Extraction and Feature Selection

#### 3.3. Statistic Analysis

## 4. Exploration of Forecasting Techniques

## 5. Methodology and Results

- Iterative strategy: A model which predicts the next one-step forecast and incorporates the predicted value to the model’s entry to predict the following. In this way, the following time steps are predicted, iteratively, one by one, updating the model with the values of the predictions.
- Direct strategy: It generates a model for each desired output. There will be a model predicting the next value of the time series ${y}_{t+1}$, another one that predicts ${y}_{t+2}$; but always based on real historical observations.
- MIMO strategy (multi-input multi-output): A single model that generates multiple outputs from multiple entries.

- Neural Networks
- -
- Multilayer perceptron (MLP)
- -
- Convolutional neural network (CNN)
- -
- Long short term memory (LSTM)

- Support vector machine (SVM)
- Random forest (RF)

- LSTM
- -
- Neuron LSTM layer: 5
- -
- Epochs: 1000
- -
- Learning rate: 0.0045
- -
- Batch size: 128
- -
- Optimizer: Adam
- -
- Activation function: sigmoid
- -
- Input days: 30

- MLP La Baells-Multi/La Baells-Uni/Sau-Multi
- -
- Neuron Hidden layer: 5/30/48
- -
- Epochs: 773/600/337
- -
- Learning rate: 0.001267/0.0006/0.00079
- -
- Batch size: 47/16/126
- -
- Optimizer: Adam/Adam/Adam
- -
- Activation function: sigmoid/sigmoid/sigmoid
- -
- Input days: 11/30/7

- SVM La Baells-Multi/La Baells-Uni/Sau-Multi/Sau-Uni
- -
- C: 85/124/25/24
- -
- Epsilon: 0.0115/0.0144/0.015/0.0127
- -
- Gamma: 0.0101/0.0852/0.010/0.2788
- -
- Input days: 10/24/11/17

- RF La Baells-Uni/La Baells-Multi/Sau-Uni/Sau-Multi/
- -
- Number of estimators: 120/303/362/140
- -
- Maximum number of features: 5/84/5/5
- -
- Maximum tree depth: 15/11/83/91
- -
- Minimum number of samples to split: 26/29/21/11
- -
- Minimum number of samples per leaf: 14/3/44/18
- -
- Input days: 5/11/5/5

## 6. Conclusions and Future Work

^{2}value, we can find how our worst case model, uni-variant random forest (global R

^{2}of 0.94) outperforms some works from Table 8. Comparing the first step prediction, we achieve an R

^{2}value of 0.99, which is higher than the values presented in literature.

## Author Contributions

## Funding

## Conflicts of Interest

## References

- Hanania, J.; Stenhouse, K.; Donev, J. Hydroelectric Reservoir, 2015. Available online: https://energyeducation.ca/encyclopedia/Hydroelectric_reservoir (accessed on 28 March 2019).
- Generalitat de Catalunya. Agència Catalana de l’Aigua, 2019. Available online: http://aca.gencat.cat/ca/inici (accessed on 28 March 2019).
- Üneş, F.; Demirci, M.; Kişi, O. Prediction of Millers Ferry Dam Reservoir Level in USA Using Artificial Neural Network. Period. Polytech. Civ. Eng.
**2015**, 59, 309–318. [Google Scholar] [CrossRef] [Green Version] - Jun-He, Y.; Ching-Hsue, C.; Chia-Pan, C. A Time-Series Water Level Forecasting Model Based on Imputation and Variable Selection Method. Comput. Intell. Neurosci.
**2017**, 2017, 11. [Google Scholar] - Nwobi-Okoye, C.; Igboanugo, A. Predicting water levels at Kainji Dam using artificial neural networks. Niger. J. Technol. (NIJOTECH)
**2013**, 32, 129–136. [Google Scholar] - Valipour, M.; Banihabib, M.E.; Behbahani, S.M.R. Comparison of the ARMA, ARIMA, and the autoregressive artificial neural network models in forecasting the monthly inflow of Dez dam reservoir. J. Hydrol.
**2013**, 476, 433–441. [Google Scholar] [CrossRef] - Pasupa, K.; Jungjareantrat, S. Water levels forecast in Thailand: A case study of Chao Phraya river. In Proceedings of the 2016 14th International Conference on Control, Automation, Robotics and Vision (ICARCV), Phuket, Thailand, 13–15 November 2016; pp. 1–6. [Google Scholar] [CrossRef]
- Mokhtar, S.A.; Ishak, W.H.W.; Norwawi, N.M. Modelling of Reservoir Water Release Decision Using Neural Network and Temporal Pattern of Reservoir Water Level. In Proceedings of the 2014 5th International Conference on Intelligent Systems, Modelling and Simulation, Langkawi, Malaysia, 27–29 January 2014; pp. 127–130. [Google Scholar] [CrossRef]
- Valizadeh, N.; El-Shafie, A. Forecasting the Level of Reservoirs Using Multiple Input Fuzzification in ANFIS. Water Resour. Manag.
**2013**, 27, 3319–3331. [Google Scholar] [CrossRef] - Chaves, P.; Kojiri, T. Deriving reservoir operational strategies considering water quantity and quality objectives by stochastic fuzzy neural networks. Adv. Water Resour.
**2007**, 30, 1329–1341. [Google Scholar] [CrossRef] - El-Shafie, A.; Jaafer, O.; Seyed, A. Adaptive neuro-fuzzy inference system based model for rainfall forecasting in Klang River, Malaysia. Int. J. Phys. Sci.
**2011**, 6, 2875–2888. [Google Scholar] - Wieland, R.; Mirschel, W.; Zbell, B.; Groth, K.; Pechenick, A.; Fukuda, K. A new library to combine artificial neural networks and support vector machines with statistics and a database engine for application in environmental modeling. Environ. Model. Softw.
**2010**, 25, 412–420. [Google Scholar] [CrossRef] - Kisi, O.; Nia, A.M.; Gosheh, M.G.; Tajabadi, M.R.J.; Ahmadi, A. Intermittent Streamflow Forecasting by Using Several Data Driven Techniques. Water Resour. Manag.
**2012**, 26, 457–474. [Google Scholar] [CrossRef] - Moeeni, H.; Bonakdari, H.; Fatemi, S.E.; Zaji, A.H. Assessment of Stochastic Models and a Hybrid Artificial Neural Network-Genetic Algorithm Method in Forecasting Monthly Reservoir Inflow. INAE Lett.
**2017**, 2, 13–23. [Google Scholar] [CrossRef] [Green Version] - Chang, F.J.; Chang, Y.T. Adaptive neuro-fuzzy inference system for prediction of water level in reservoir. Adv. Water Resour.
**2006**, 29, 1–10. [Google Scholar] [CrossRef] - Wang, A.; Liao, H.; Chang, T. Adaptive Neuro-fuzzy Inference System on Downstream Water Level Forecasting. In Proceedings of the 2008 Fifth International Conference on Fuzzy Systems and Knowledge Discovery, Jinan, China, 18–20 October 2008; Volume 3, pp. 503–507. [Google Scholar] [CrossRef]
- Hipni, A.; El-shafie, A.; Najah, A.; Karim, O.A.; Hussain, A.; Mukhlisin, M. Daily Forecasting of Dam Water Levels: Comparing a Support Vector Machine (SVM) Model With Adaptive Neuro Fuzzy Inference System (ANFIS). Water Resour. Manag.
**2013**, 27, 3803–3823. [Google Scholar] [CrossRef] - Jain, S.K.; Das, A.; Srivastava, D.K. Application of ANN for Reservoir Inflow Prediction and Operation. J. Water Resour. Plan. Manag.
**1999**, 125, 263–271. [Google Scholar] [CrossRef] - Ondimu, S.; Murase, H. Reservoir Level Forecasting using Neural Networks: Lake Naivasha. Biosyst. Eng.
**2007**, 96, 135–138. [Google Scholar] [CrossRef] - Generalitat de Catalunya. Servei Meteorològic de Catalunya, 2019. Available online: http://www.meteo.cat/wpweb/serveis/formularis/peticio-dinformes-i-dades-meteorologiques/peticio-de-dades-meteorologiques (accessed on 28 March 2019).
- Dickey, D.A.; Fuller, W.A. Distribution of the Estimators for Autoregressive Time Series with a Unit Root. J. Am. Stat. Assoc.
**1979**, 74, 427–431. [Google Scholar] - Rani, S.; Parekh, F. Predicting Reservoir Water Level Using Artificial Neural Network. Int. J. Innov. Res. Sci. Eng. Technol.
**2014**, 3, 14489–14496. [Google Scholar] - Maier, H.R.; Dandy, G.C. Neural networks for the prediction and forecasting of water resources variables: A review of modelling issues and applications. Environ. Model. Softw.
**2000**, 15, 101–124. [Google Scholar] [CrossRef] - Chatfield, C. Neural networks: Forecasting breakthrough or passing fad? Int. J. Forecast.
**1993**, 9, 1–3. [Google Scholar] [CrossRef] - Cybenko, G. Approximation by superpositions of a sigmoidal function. Math. Control. Signals Syst.
**1989**, 2, 303–314. [Google Scholar] [CrossRef] - Hornik, K.; Stinchcombe, M.; White, H. Multilayer feedforward networks are universal approximators. Neural Netw.
**1989**, 2, 359–366. [Google Scholar] [CrossRef] - Quiles, R.C.; Roma, J.C.; Roig, J.G.; Alfonso, J.M. Minería de datos: Modelos y Algoritmos; Editorial UOC: Barcelona, Spain, 2017. [Google Scholar]
- Şen, Z.; Kadioğlu, M.; Batur, E. Stochastic Modeling of the Van Lake Monthly Level Fluctuations in Turkey. Theor. Appl. Climatol.
**2000**, 65, 99–110. [Google Scholar] [CrossRef] - Kilinç, I.; Ciğizoğlu, K. Reservoir Management Using Artificial Neural Networks. 14th. Reg. Directorate of DSI (State Hydraulic Works). 2005. Available online: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.104.174 (accessed on 28 March 2019).
- Coulibaly, P.; Anctil, F.; Bobée, B. Prévision hydrologique par réseaux de neurones artificiels: État de l’art. Can. J. Civ. Eng.
**1999**, 26, 293–304. [Google Scholar] [CrossRef] - Doan, E.; Kocamaz, U.E.; Utkucu, M.; Yldrm, E. Modelling daily water level fluctuations of Lake Van (Eastern Turkey) using Artificial Neural Networks. Fundam. Appl. Limnol.
**2016**, 187, 177–189. [Google Scholar] [CrossRef] - Çimen, M.; Kisi, O. Comparison of two different data-driven techniques in modeling lake level fluctuations in Turkey. J. Hydrol.
**2009**, 378, 253–262. [Google Scholar] [CrossRef] - Ali, M.; Qamar, A.M.; Ali, B. Data Analysis, Discharge Classifications, and Predictions of Hydrological Parameters for the Management of Rawal Dam in Pakistan. In Proceedings of the 2013 12th International Conference on Machine Learning and Applications, Miami, FL, USA, 4–7 December 2013; Volume 1, pp. 382–385. [Google Scholar] [CrossRef]
- Öztürk, A.; Kayalıgil, S.; Özdemirel, N.E. Manufacturing lead time estimation using data mining. Eur. J. Oper. Res.
**2006**, 173, 683–700. [Google Scholar] [CrossRef] - Vathsala, H.; Koolagudi, S.G. Closed Item-Set Mining for Prediction of Indian Summer Monsoon Rainfall A Data Mining Model with Land and Ocean Variables as Predictors. Procedia Comput. Sci.
**2015**, 54, 271–280. [Google Scholar] [CrossRef] [Green Version] - Banerjee, S.; Anura, A.; Chakrabarty, J.; Sengupta, S.; Chatterjee, J. Identification and functional assessment of novel gene sets towards better understanding of dysplasia associated oral carcinogenesis. Gene Rep.
**2016**, 4, 131–138. [Google Scholar] [CrossRef] - Yahyaoui, H.; Al-Mutairi, A. A feature-based trust sequence classification algorithm. Inf. Sci.
**2016**, 328, 455–484. [Google Scholar] [CrossRef] - Borges, H.B.; Nievola, J.C. Comparing the Dimensionality Reduction Methods in Gene Expression Databases. Expert Syst. Appl.
**2012**, 39, 10780–10795. [Google Scholar] [CrossRef] - Charoenporn, P. Reservoir inflow forecasting using ID3 and C4.5 decision tree model. In Proceedings of the 2017 3rd IEEE International Conference on Control Science and Systems Engineering (ICCSSE), Beijing, China, 17–19 August 2017; pp. 698–701. [Google Scholar] [CrossRef]
- Bao, Y.; Xiong, T.; Hu, Z. Multi-step-ahead time series prediction using multiple-output support vector regression. Neurocomputing
**2014**, 129, 482–493. [Google Scholar] [CrossRef] [Green Version] - Baguena, J.G.; Estallo, A.J.G.; Escofet, C.R. Contraste de Dos Muestras; Editorial UOC: Barcelona, Spain, 2009. [Google Scholar]

**Figure 3.**Plots of the autocorrelation function and partial autocorrelation function of the volume of water from the Sau reservoir.

**Figure 6.**Plots of the autocorrelation function and partial autocorrelation function of the volume of water from the La Baells reservoir.

**Figure 7.**The multi-variant support vector machine (SVM) model returns the lowest root mean squared error (RSME) values from the third predicted day on Sau reservoir.

**Figure 8.**The multi-variant SVM model returns the lowest RSME values in overall along all predicted days on La Baells reservoir.

**Figure 9.**The multi-variant SVM model returns the lowest RSME values from all the models on Sau reservoir.

**Figure 10.**The multi-variant SVM model returns the lowest RSME values from the rest of models on La Baells reservoir.

Variable | Description | Unit |
---|---|---|

4165140 | E06_Vilanova Sau_Sau_Cabal output | m${}^{3}$/s |

4159510 | E06_Vilanova Sau_Sau_Volum reservoir | hm${}^{3}$ |

4165141 | E06_Vilanova Sau_Sau_Cabal input | m${}^{3}$/s |

4159509 | E06_Vilanvova Sau_Sau_Nivell reservoir | m.a.s.l. |

4159547 | Vilanova Sau_Sau_Percentatge reservoir volume | % |

3378678 | E06_Emb Sau_Total group volumes 1 + 2 | m${}^{3}$/s |

Variable | Description | Unit |
---|---|---|

TM | Average daily temperature | °C |

TX | Maximum daily temperature | °CC |

TN | Minimum daily temperature | °CC |

HRM | Average daily relative humidity | % |

PPT24h | Daily cumulative precipitation | mm |

PM | Average daily atmospheric pressure | hPa |

VVM2 | Average daily wind speed at 2 m high | m/s |

DVM2 | Average daily wind direction at 2 m high | °C |

VVX2 | Maximum daily wind gust at 2 m high | m/s |

DVVX2 | Direction of the maximum daily wind gust to 2 m high | °C |

VVM10 | Average daily wind speed at 10 m high | m/s |

DVM10 | Average daily wind direction at 10 m high | °C |

VVX10 | Maximum daily wind gust at 10 m high | m/s |

DVVX10 | Direction of the maximum daily wind gust to 10 m high | °C |

Attribute | Value |
---|---|

Test statistic | −5.612817 |

p-value | 0.000001 |

#Lags used | 37 |

Number of observations used | 11,923 |

Critical value (1%) | −3.430899 |

Critical value (5%) | −2.861782 |

Critical value (10%) | −2.566899 |

Attribute | Value |
---|---|

Test statistic | −5.526781 |

p-value | 0.000002 |

#Lags used | 40 |

Number of observations used | 11,920 |

Critical value (1%) | −3.430899 |

Critical value (5%) | −2.861783 |

Critical value (10%) | −2.566899 |

Reservoir | Model | Train | Test | n_steps_in | n_steps_out | Strategy |
---|---|---|---|---|---|---|

Sau | SVM-Multi | 3412 | 854 | 11 | 15 | MIMO |

MLP-Multi | 3416 | 854 | 7 | |||

SVM-Uni | 2823 | 706 | 17 | |||

LSTM-Uni | 2812 | 704 | 30 | |||

RF-Uni | 5463 | 1366 | 5 | |||

RF-Multi | 3417 | 855 | 5 | |||

La Baells | SVM-Multi | 3413 | 854 | 10 | ||

MLP-Multi | 3412 | 854 | 11 | |||

SVM-Uni | 2817 | 705 | 24 | |||

MLP-Uni | 2812 | 704 | 30 | |||

RF-Uni | 5463 | 1366 | 5 | |||

RF-Multi | 3412 | 854 | 11 |

**Table 6.**The multi-variant SVM model returns the lowest RMSE and mean absolute error (MAE) values on Sau reservoir.

Model | 15th Day | Global | ||||
---|---|---|---|---|---|---|

RMSE | MAE | ${\mathit{R}}^{2}$ | RMSE | MAE | ${\mathit{R}}^{2}$ | |

SVM-Multi | 7.6907 | 5.7391 | 0.9130 | 5.2961 | 3.6088 | 0.9581 |

MLP-Multi | 7.7908 | 5.9308 | 0.9107 | 5.4435 | 3.8811 | 0.9558 |

SVM-Uni | 8.3699 | 6.3386 | 0.9065 | 5.6627 | 3.7640 | 0.9568 |

LSTM-Uni | 8.6653 | 6.7872 | 0.8998 | 5.8064 | 3.9718 | 0.9546 |

RF-Multi | 8.5605 | 6.7438 | 0.8921 | 5.9549 | 4.3192 | 0.9470 |

RF-Uni | 9.1335 | 6.9229 | 0.8716 | 6.2832 | 4.2043 | 0.9662 |

Model | 15th Day | Global | ||||
---|---|---|---|---|---|---|

RMSE | MAE | ${\mathit{R}}^{2}$ | RMSE | MAE | ${\mathit{R}}^{2}$ | |

SVM-Multi | 4.0029 | 2.4098 | 0.9515 | 2.5085 | 1.3506 | 0.9811 |

MLP-Multi | 4.0330 | 2.7339 | 0.9508 | 2.6122 | 1.6148 | 0.9795 |

SVM-Uni | 4.0985 | 2.6003 | 0.9537 | 2.6198 | 1.4503 | 0.9812 |

MLP-Uni | 4.1279 | 2.8958 | 0.9531 | 2.6569 | 1.5905 | 0.9806 |

RF-Uni | 4.3563 | 2.7258 | 0.9243 | 2.8514 | 1.4887 | 0.9677 |

RF-Multi | 4.9869 | 3.5642 | 0.9248 | 3.3500 | 2.1372 | 0.9396 |

Work | Unit | Intervals | Timesteps | RMSE | ${\mathit{R}}^{2}$ | Others |
---|---|---|---|---|---|---|

Rani and Parekh [22] | MAMSL | 135–148 | 10 | 0.82 | 0.95 | |

Üneş et al. [3] | MAMSL | 23.5–24.6 | 1 | 0.057 | 0.893 | |

Onidmu and Murase [19] | MAMSL | 1886–1888 | 4 | 0.12 (%MSE) | ||

Kilinç and Cigizoglu [29] | Volume (hm${}^{3}$) | 47–153 | 1 | 7.63 | 0.86 | |

Dogan et al. [31] | MAMSL | 1647–1650 | 1 | 0.035 | 0.93 | |

Çimen and Kisi [32] | MAMSL | 1647–1650 | 1 | 0.073 | 0.985 |

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Parada, R.; Font, J.; Casas-Roma, J.
Predicting Energy Generation Using Forecasting Techniques in Catalan Reservoirs. *Energies* **2019**, *12*, 1832.
https://doi.org/10.3390/en12101832

**AMA Style**

Parada R, Font J, Casas-Roma J.
Predicting Energy Generation Using Forecasting Techniques in Catalan Reservoirs. *Energies*. 2019; 12(10):1832.
https://doi.org/10.3390/en12101832

**Chicago/Turabian Style**

Parada, Raúl, Jordi Font, and Jordi Casas-Roma.
2019. "Predicting Energy Generation Using Forecasting Techniques in Catalan Reservoirs" *Energies* 12, no. 10: 1832.
https://doi.org/10.3390/en12101832