Abstract
With the exponential growth in electricity demand, a renewable energy resource comes with the best alternate especially solar cells. The penetration of these resources, interconnection with the grid, the accurate and precise forecasting of next hour electricity generation is the most important factor to manage the grid. This paper discusses the comparative study of two deep learning models: long short term memory (LSTM) network and gated recurrent unit (GRU) network for the forecasting of global solar irradiance (GHI). The meteorological parameters: wind direction, dew point, pressure, temperature, solar zenith angle, relative humidity, wind speed and precipitation are considered to train these deep learning networks. The study used the clear sky index (CSI) calculation to stationarize the data. The models are trained using the one year of hourly datasets, while the testing is performed for one hour ahead monthly solar irradiation forecast. The experimental results of GRU and LSTM networks are compared to the naïve model (benchmark model) in terms of root mean square error (RMSE), mean absolute percentage error (MAPE) and coefficient of determination (R2). The result shows that the GRU network outperform LSTM network and benchmark model with annual average RMSE of 69.8117 (w/m2), annual average MAPE of 71.777(w/m2) and R2 of 0.86.
Access provided by Autonomous University of Puebla. Download conference paper PDF
Similar content being viewed by others
Keywords
- Long short term memory
- Gated recurrent unit
- Deep learning
- Solar global horizontal irradiance
- Solar forecasting
- Clear sky Index
1 Introduction
Owing to the setting up of large numbers of new industrial and residential sectors, electricity demand is rising day by day [1]. In 2019, Marsal-Pomianowska et al. reported 40–50% electricity consumption only from the buildings which were only 16% in 2013 [2]. However, the use of renewable energy sources will meet this rising demand, which is becoming a promising solution to this issue [3]. In addition, solar energy is one of the popular and eco-friendly solutions among all renewable sources which generate electricity by converting solar radiations received from sun [4, 5]. Nowadays, the solar plants are used as a power generation source not only in standalone mode but also in grid interconnected mode [6]. In fact, the scale and numbers of these solar plants are also growing at an exponential rate [7]. Despite this growth, the uncertainty and randomness of power generation by PV panels is still a major challenge. Therefore, the forecasting of the next step electricity generation is necessary to manage the grid planning, maintenance and operation in case of grid interconnected plants [8]. A precise and accurate forecast of solar irradiation helps not only in grid management but also prevents penalty.
Generally, there are two methods to forecast the solar GHI: direct and indirect methods [9]. Direct methods are the methods which only consider the historical variables as input features whereas the meteorological variables are considered in indirect method of forecasting [3]. Numerous studies have been published in the literature to forecast the solar GHI using artificial neural network (ANN), support vector machine (SVM), regression method, etc. K. Mohammadi et al. developed a forecasting model based on SVM. This study utilized the wavelet transform (WT) decomposition to make the model hybrid and showed WT + SVM performed better than single SVM [10]. Likewise, SVM along with k-means clustering was used by the Bae et al. This combination again outperforms to backpropagation neural network (BPNN) [11]. In addition to this, wavelet combination with the neural network was also performed by Sharma et al. [12]. The comparative study of regression-based model and SVM was conducted by Sharika et al. in their study [13]. The ability of deep learning to manage large data has made it popular in recent years in the field of forecasting. But very few studies are available for forecasting solar GHI using deep learning networks. Sharadga H. et al. predicted the PV power output using the bidirectional long short term memory (Bi-LSTM) network [14]. Whereas Srivastava S. et al. forecasted the solar GHI using the LSTM model [1]. In addition to this, Gao M. et al. proposed the LSTM network to forecast the PV power of a plant. However, for a smooth dataset, this study used the meteorological variables as inputs, whereas the time series data has been considered for non-ideal weather condition [3]. Moreover, solar GHI has also been forecasted by Aslam M et al. In their paper, GRU deep learning network was used to forecast hourly solar GHI for a year. The developed model was also compared with the benchmark model: SVM feed-forward neural network (FFNN) [15].
Therefore, motivated from the power of deep learning, the paper developed two deep learning networks to forecast one hour ahead solar GHI. The research contributions to the paper are:
-
(i)
A brief literature of the deep leaning for solar GHI forecast.
-
(ii)
A theoretical overview of LSTM network and GRU network.
-
(iii)
Calculation of CSI to stationarize the meteorological data.
-
(iv)
Simulation of naïve model (benchmark model), LSTM network and GRU network for solar GHI forecast.
-
(v)
Performance evaluation of developed model using RMSE, MAPE and R2.
The paper organization is as follows: Section 2 describes the theoretical background of LSTM and GRU deep learning techniques. Section 3 discusses the experimental setup of this paper. This section discusses the data description along with the developed forecasting model and error metrics. The result and analysis are provided in Sect. 4. Finally, the study is concluded in Sect. 5.
2 Theoretical Background
This section provides the theoretical background of LSTM and GRU networks in brief.
2.1 Long-Short Term Memory Network
Generally, the vanishing gradient problem is generated in the simple recurrent neural network (RNN) due to its limited memory [16]. This problem is solved in case of LSTM network. In LSTM, the memory blocks are presents instead of summation unit like in RNN [1]. The gate ‘gi’ collects the previous time step output say ‘ht−1.’ However, the data in context of present time is also input to the gate of the cell. The outputs of four gates are depicts as input ‘it,’ output ‘Ot,’ update ‘gi’ and forget ‘ft.’ The information passed to the cell is decided by the input gate as:
The amount of previous state information that has to pass is decided by forget gate and expressed as:
whereas the amount of information of internal state that has to pass is decided by output gate.
So, the internal memory state ‘Ct’ will be updated as:
2.2 Gated Recurrent Unit (GRU)
Similar to LSTM, the GRU has reset gate and update gate as a gating unit. The purpose of gating unit is to modulate the information passage in the unit [17]. The reset gate for a GRU cell is expressed as:
Similarly, update gate,
The current hidden state of the cell can be finally expressed as (Fig. 1):
3 Materials and Methodology
3.1 Data Description
In order to compare LSTM and GRU network performance, the dataset of an ‘Ahmadabad, Gujarat’ has been considered. The location is a city of Gujarat state of India located at latitude longitude of 23° 0.05′/72° 0.35′ having climatic condition of extreme type. The entire year is divided into three different climatic seasons: summer, winter and monsoon [18]. The dataset for the study was collected from the database of National energy renewable laboratory on hourly basis. Eight different meteorological variables have been collected as: wind direction, dew point, pressure, temperature, solar zenith angle, relative humidity, wind speed and precipitation. The model was trained using the data of one year and one step ahead forecasting is performed for month basis.
3.2 Forecasting Process
Figure 2 represents the flow graph of process used to perform the forecasting using the LSTM and GRU.
At stage-I, the meteorological data was collected for the targeted site. The data collected is often in raw form as well as some missing and incorrect vales are included. So, the data quality check was performed to remove the night hours as well as missing and false observations. The night hours were removed due to the non-availability of GHI in the night. Once the quality of the data has been checked, the clear sky index was calculated to make the data stationary. The clear sky index can be calculated as:
where, \(Y_{CS} = E_{o} \exp^{{ - \frac{\tau }{{{\text{Sin}}^{a(\mu (t))} }}}} {\text{Sin}} (\mu (t))\).
where, Y is the solar irradiation, µ(t) is the height of panel in degree, Eo is the extraterrestrial irradiation, and a is the fitting parameter.
However, the normalization techniques can be used in place of finding the clear sky index. The correlation coefficient of each variable was performed in the next step with the target variable. The variable with a strong correlation has been selected, while the weaker correlated variable has been removed. The next and important step is the selection of the hyperparameters for deep learning networks. There is, however, no particular rule provided in the literature for selecting these hyperparameters. For the same method, only the error and trail method must be practiced. This study conducted various experiments to select proper hypermeter. The hidden units were varied from ‘20–100’ with a learning rate of ‘0.2. 0.02, 0.002, 0.0007.’ But, hidden units of ‘70’ with ‘500’ epochs, performed best for both of the networks with an initial learning rate of ‘0.02.’ The ‘Adam’ function was used as an optimizer as prescribed in the literature also. The learning rate drop factor was ‘0.2’ with a drop period of ‘125.’ Both the models were trained with one year of meteorological data, while one step ahead monthly GHI was forecasted. After completing the training and testing, the error metrics were calculated. If the results are satisfactory then finalize the model otherwise reselect the hyperparameters and repeat the process.
3.3 Evaluation Metrics
where, ‘GHIp,I’ is predicted/forecasted irradiation, and ‘GHIa,I’ is real/actual irradiation.
4 Results and Analysis
Table 1 presents the observations of RMSE (w/m2), MAPE (%) and R2 for the benchmark model, LSTM and GRU network for different months, respectively.
According to Table 1, the RMSE for GRU network is better than LSTM network except for three months: April, august and October. The minimum RMSE obtained from GRU network is 34.59 (w/m2) in month of March, whereas maximum RMSE is 158.83 (w/m2) in the month of September. On the other hand, the minimum RMSE obtained from LSTM network is 28.77 (w/m2) in month of April, whereas it is at maximum in the month of September with 155.66 (w/m2). In addition, the benchmark mode obtained minimum RMSE [134.01 (w/m2)] in month of December and maximum RMSE [169 (w/m2)] in month of August. As far as MAPE is concern, the minimum MAPE obtained from LSTM network is 3.09% in month of April, whereas it is maximum in month of September with value of 35.88%. The GRU network achieved the minimum MAPE in month of March with 3.59% and maximum in month of September with value of 29.97%. Whereas the benchmark model obtained minimum MAPE (20.77%) in month of April and maximum MAPE (37.09%) in the month of January. However, the overall performance on the basis of annual average RMSE and MAPE, GRU still a good choice over the LSTM for forecasting using climatic variables. The higher RMSE and MAPE in the months June, July, August, September and October are due to the presence of uncertainty in the data due to rainy and cloudy days.
The accuracy parameter R2 statistics is also observed for these models to evaluate the curve fitting progress of the model. From the results, it also shows that the overall maximum R2 (0.86) is obtained by model GRU model, while the benchmark model and LSTM network obtained R2 equal to 0.52 and 0.85, respectively. For more analysis, Fig. 3a, b shows the actual GHI tracing by the GRU model for one week data of ‘May’ and ’September’ month, respectively. The figure plot clearly shows that the month ‘May’ have smooth data set which can be traced by LSTM and GRU properly. But the month ‘September’ has larger variations or randomness and the uncertainty in the data which is not traced by LSTM model and GRU model properly. Only GRU model traced this GHI much precisely than LSTM model. In addition, Fig. 4a, b represents the annual GHI plot for LSTM model and GRU model, respectively.
Therefore, the GRU model achieved annual average RMSE of 69.8117 (w/m2), whereas it was 148.94 (w/m2) and 71.7772 (w/m2) for benchmark model and LSTM network, respectively. Moreover, the MAPE obtained from GRU, LSTM network and benchmark model was 11.5205%, 11.8521% and 28.64%, respectively. In addition to this, the LSTM, GRU and benchmark model obtained annual R2 is equal to 0.85, 0.86 and 0.52, respectively. Table 2 shows the comparative results of the performed experiments with the other study also.
This study used the clear sky index as a calculation to make the data stationary instead of simple normalization. The results mentioned in Table 2 show that both of the networks performed well with the clear sky index calculation. Among both of the networks, GRU is better in terms of RMSE from LSTM for meteorological data. This study achieved RMSE of 69.8117 (w/m2) which was 122.45 (w/m2) in Ref. [17] and 127.3 (w/m2) in Ref. [19].
5 Conclusion
This paper studies the LSTM and GRU network using meteorological variables to forecast the GHI for ‘Ahmadabad, Gujarat’ area. On the basis of the intensity of their correlation with the target variable, the metrological variables are chosen. The research used the clear sky index calculation to stationarize the data to enhance the model's efficiency. In the analysis, one step ahead monthly forecast was carried out to compare the performance of LSTM and GRU network with benchmark model using RMSE, MAPE and R2 statistics. The model configuration was selected from the variations of different hyperparameters where an initial learning rate of 0.02 with 70 hidden layers performed best. The GRU and LSTM network obtained 69.8117 (w/m2) and 71.777(w/m2) of RMSE, whereas 11.5205 and 11.8521% of MAPE. Moreover, the LSTM and GRU network obtained R2 statistics equal to the 0.85 and 0.86, respectively. These comparative results show that the GRU network is better than LSTM network by considering the meteorological variables as input features.
References
Srivastava S, Lessmann S (2018) A comparative study of LSTM neural networks in forecasting day-ahead global horizontal irradiance with satellite data. Sol Energy 162:232–247. https://doi.org/10.1016/j.solener.2018.01.005
Radwan A, Ookawara S, Ahmed M (2016) Analysis and simulation of concentrating photovoltaic systems with a microchannel heat sink. Sol Energy 136:35–48. https://doi.org/10.1016/j.solener.2016.06.070
Gao M, Li J, Hong F, Long D (2019) Day-ahead power forecasting in a large-scale photovoltaic plant based on weather classification using LSTM. Energy 187:115838. https://doi.org/10.1016/j.energy.2019.07.168
Lai JP, Chang YM, Chen CH, Pai PF (2020) A survey of machine learning models in renewable energy predictions. Appl Sci 10. https://doi.org/10.3390/app10175975
Wan C, Zhao J, Song Y, Xu Z, Lin J, Hu Z (2016) Photovoltaic and solar power forecasting for smart grid energy management. CSEE J Power Energy Syst 1:38–46. https://doi.org/10.17775/cseejpes.2015.00046
Ismail AM, Ramirez-Iniguez R, Asif M, Munir AB, Muhammad-Sukki F (2015) Progress of solar photovoltaic in ASEAN countries: a review.https://doi.org/10.1016/j.rser.2015.04.010
Sobri S, Koohi-Kamali S, Rahim NA (2018) Solar photovoltaic generation forecasting methods: a review. https://doi.org/10.1016/j.enconman.2017.11.019
Singla P, Duhan M, Saroha S (2021) A comprehensive review and analysis of solar forecasting techniques. Front Energy:1–37. https://doi.org/10.1007/s11708-021-0722-7
Paulescu M, Brabec M, Boata R, Badescu V (2017) Structured, physically inspired (gray box) models versus black box modeling for forecasting the output power of photovoltaic plants. Energy 121:792–802. https://doi.org/10.1016/j.energy.2017.01.015
Mohammadi K, Shamshirband S, Tong CW, Arif M, Petković D, Sudheer C (2015) A new hybrid support vector machine-wavelet transform approach for estimation of horizontal global solar radiation. Energy Convers Manage 92:162–171. https://doi.org/10.1016/j.enconman.2014.12.050
Bae KY, Jang HS, Sung DK (2017) Hourly solar irradiance prediction based on support vector machine and its error analysis. IEEE Trans Power Syst 32:935–945. https://doi.org/10.1109/TPWRS.2016.2569608
Sharma V, Yang D, Walsh W, Reindl T (2016) Short term solar irradiance forecasting using a mixed wavelet neural network. Renew Energy 90:481–492. https://doi.org/10.1016/j.renene.2016.01.020
Sharika W, Fernando L, Kanagasundaram A, Valluvan R, Kaneswaran A (2018) Long-term solar irradiance forecasting approaches—a comparative study. In: 2018 IEEE 9th international conference on information and automation for sustainability, ICIAfS 2018. Institute of Electrical and Electronics Engineers Inc. https://doi.org/10.1109/ICIAFS.2018.8913381
Sharadga H, Hajimirza S, Balog RS (2020) Time series forecasting of solar power generation for large-scale photovoltaic plants. Renew Energy 150:797–807. https://doi.org/10.1016/j.renene.2019.12.131
Aslam M, Lee JM, Kim HS, Lee SJ, Hong S (2019) Deep learning models for long-term solar radiation forecasting considering microgrid installation: a comparative study. Energies 13. https://doi.org/10.3390/en13010147
Heidari A, Khovalyg D (2020) Short-term energy use prediction of solar-assisted water heating system: application case of combined attention-based LSTM and time-series decomposition. Sol Energy 207:626–639. https://doi.org/10.1016/j.solener.2020.07.008
Gao B, Huang X, Shi J, Tai Y, Xiao R (2019) Predicting day-ahead solar irradiance through gated recurrent unit using weather forecasting data. J Renew Sustain Energy. 11:043705. https://doi.org/10.1063/1.5110223
Ahmedabad climate: average temperature, weather by month, Ahmedabad weather averages. Climate-Data.org. https://en.climate-data.org/asia/india/gujarat/ahmedabad-2828/. Last accessed 2020/04/24
Lan H, Zhang C, Hong YY, He Y, Wen S (2019) Day-ahead spatiotemporal solar irradiation forecasting using frequency-based hybrid principal component analysis and neural network. Appl Energy 247:389–402. https://doi.org/10.1016/j.apenergy.2019.04.056
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd.
About this paper
Cite this paper
Singla, P., Duhan, M., Saroha, S. (2022). One Hour Ahead Solar Irradiation Forecast by Deep Learning Network Using Meteorological Variables. In: Suhag, S., Mahanta, C., Mishra, S. (eds) Control and Measurement Applications for Smart Grid. Lecture Notes in Electrical Engineering, vol 822. Springer, Singapore. https://doi.org/10.1007/978-981-16-7664-2_9
Download citation
DOI: https://doi.org/10.1007/978-981-16-7664-2_9
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-16-7663-5
Online ISBN: 978-981-16-7664-2
eBook Packages: EnergyEnergy (R0)