Next Article in Journal
Comparative Analysis of TF–IDF and Hashing Vectorizer for Fake News Detection in Sindhi: A Machine Learning and Deep Learning Approach
Previous Article in Journal
Line Current Estimation Using Deep Neural Network—A Generalized Approach
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Proceeding Paper

Solar Irradiance Forecasting Using Deep Learning Techniques †

Department of Electrical Engineering, N.E.D University of Engineering & Technology, Karachi 75270, Pakistan
*
Author to whom correspondence should be addressed.
Presented at the 8th International Electrical Engineering Conference, Karachi, Pakistan, 25–26 August 2023.
Eng. Proc. 2023, 46(1), 15; https://doi.org/10.3390/engproc2023046015
Published: 20 September 2023
(This article belongs to the Proceedings of The 8th International Electrical Engineering Conference)

Abstract

:
Solar irradiance, the power of sunlight received on a given surface area during a specific time, is crucial in determining the efficiency and performance of solar power systems, as it directly influences the electricity units generated by photovoltaic (PV) cells. In recent years, deep learning and machine learning techniques have been leveraged to enhance the accuracy of solar adsorption and wind power forecasting. In this context, this study presents a comparative study of various deep learning models for very short term solar irradiance forecasting, aiming to find the most effective model for this specific purpose for our local city Karachi. The key findings indicate that the LSTM model outperforms the other architectures, achieving the highest R-squared value and the lowest RMSE. These results emphasize the importance of accurate forecasting models in optimizing renewable energy generation and grid management and their potential applications in various sectors.

1. Introduction

The increasing awareness of the need to find alternative means of electric power generation without depleting the Earth’s natural resources has led to the rise of alternative energy [1]. Alternative energy encompasses various fuel sources that do not rely on fossil fuels, some of which may not necessarily be renewable. Renewable energy sources, a subset of alternative energy, exhibit a relatively lower carbon footprint [2]. One such renewable energy source is solar power, which harnesses sunlight to generate electricity, serving as a clean and sustainable alternative to finite fossil fuels [3].
Photovoltaic (PV) cells play a key role in generating solar power by converting sunlight into electricity. Solar irradiance, the power of sunlight received on a given surface area during a specific time, is crucial in determining the efficiency and performance of solar power systems [2,3]. Accurate forecasting of solar irradiance holds great significance in various applications; it aids in optimizing the use of solar energy and managing its integration into power grids [4]. In recent years, deep learning and machine learning techniques have been leveraged to enhance the accuracy of solar irradiance forecasting [5,6,7,8]. Advanced models such as deep recurrent neural networks (DRNNs) and multilayer perceptron regression (MLP) have resulted in significant advancements in forecasting accuracy [9,10].
In this context, our research presents a comparative study of various deep learning models—recurrent neural network (RNN), gated recurrent unit (GRU), long short-term memory (LSTM), and temporal convolution network (TCN)—for solar irradiance forecasting, aiming to identify the most effective model for this specific purpose. Notably, our work involves conducting a comparative analysis of these models on the Karachi dataset. Enhanced relevance and applicability are held by our findings when a locally specific dataset from the city of Karachi is focused on.

2. Literature Review

Solar irradiance forecasting is one of the most widely studied fields [11]. In [12], a combination of wavelet transforms and neural networks for accurate solar irradiance prediction were utilized, and multiple hybrid models are employed for this task; in [12], the LSTM, GRU, and GRU-Attention models were employed, which gave the result of 5.33%.

2.1. Recurrent Neural Network (RNN)

A recurrent neural network (RNN) is a powerful neural network architecture that incorporates the memory of past data points through recurrence. RNNs are particularly effective for time series forecasting [5]. In summary, an RNN uses its hidden layer to capture and remember information from previous data points, making it effective for tasks involving sequences. The internal cell structure of RNN is shown in Figure 1 below.

2.2. Gated Recurrent Unit (GRU)

One challenge with recurrent neural networks (RNNs) is that the recurrence of data points can introduce errors in the computation of weights and biases. The (GRU) is a specialized type of RNN designed for sequential data [6]. It tries to solve the issue of exploding and vanishing gradients by incorporating two gate mechanisms: the first is the update gate ( z t ), and the second is the reset gate ( r t ). Using these gates, it remembers relevant information that is needed and discards the rest The internal cell structure of GRU is shown in Figure 2 below.

2.3. Long Short-Term Memory Networks (LSTMs)

Long Short-Term Memory (LSTM) networks are a type of recurrent neural network (RNN) architecture that has gained popularity for their ability to learn long-term dependencies in sequential data, making them particularly well suited for complex time series forecasting and natural language processing tasks [8] (pp. 5929–5955). The LSTM architecture is a more complex form of RNNs as compared to GRUs, and that is why they tend to remember more complex information. They consist of forget gate f t , candidate layer C ¯ t , input gate i t , output gate o t , hidden state (represented by letter h ) and memory state (represented by letter c ). The internal cell structure of LSTM is shown in Figure 3 below.

2.4. Temporal Convolution Network (TCN)

A temporal convolutional network (TCN) is an advanced type of neural architecture that has evolved from the 1-D convolutional neural network (CNN) [13].
This method uses stacked convolutions with causal padding, dilation, and residual or skip connections to obtain a much larger receptive field. This TCN architecture has been shown to outperform traditional RNNs and vanilla CNNs in numerous tasks such as segmentation of some action and network anomaly detection. TCN has demonstrated superiority over LSTM in several domains such as traffic prediction, audio processing, machine translation, and human motion detection [5,9,10,11]. The internal cell structure of TCN is shown in Figure 4 below.

3. Methodology

The methodology section outlines the experimental setup, including details about the dataset, model architectures, and parameters. It also describes the experiment setup and training process for each model.

3.1. Dataset

The Karachi dataset of 2019, acquired from the NSRDB, provides solar irradiance readings at a time resolution of 15 min. The dataset covers a period of one year, consisting of 35,040 samples. For experimental purposes, the dataset we used was split into training and testing sets. And the last ten days of data were used exclusively for testing, while the remaining dataset served as the training data. Notably, no portion of the dataset was allocated for validation.

3.2. Model Architectures and Parameters

The simple RNN model features a single hidden layer with 64 neurons, a default t a n h activation function, a s i g m o i d activation for the dense layer, and the A d a m W optimizer. The GRU model, also utilizing a default t a n h   a c t i v a t i o n function with a dense layer featuring s i g m o i d activation and the A d a m W optimizer, comprises two hidden layers with a distribution of 2:32 + 32 neurons. Similarly, the LSTM model employs a s i g m o i d activation function with a dense layer, an A d a m W optimizer, and two hidden layers with a distribution of 2:64 + 64 neurons. The TCN model incorporates a R e L U activation function, with s i g m o i d activation for the dense layer, the A d a m W optimizer, a stack of 2 layers with a kernel size of 15 and 15 no. of filters, causal padding, batch normalization, no skip connection in our selected architecture, and dilation layers with dilation factors of 1, 2, 4, and 8. The simple RNN, GRU Model, LSTM Model, and TCN models have 4737, 10,401, 51,777, and 53,776 total parameters, respectively, making TCN the largest model among them all.

3.3. Experiment Setup

The experiment was conducted using a window length of 3 days, and all models were trained using a fixed learning rate of 0.001, except for the TCN, which had a learning rate of 0.01 and a weight decay factor equal to 0.001. The loss metric applied consistently across all models was the mean absolute error (MAE), while the metric we used for evaluation was the root mean square error (RMSE). The training process involved iteratively optimizing model parameters over a predetermined number of epochs. All models were trained for 500 epochs.

3.4. Results and Discussion

Figure 5 shows the models’ prediction plots, illustrating their performance and differences in the context of very short term solar irradiance forecasting. These plots clearly demonstrate the superiority in terms of forecasting of the LSTM model when comparing it to the other neural network models.
The training and inference time taken by each model are shown in Figure 6, which shows that RNNs took the least amount of time to train but also took the most time for inference, and for TCN, the opposite happened: it took the most amount of time to train, but during inference, it was the fastest among them all:
After training the models on the entire year’s data, excluding the last 10 days designated as the test set, the model’s accuracy was assessed. The LSTM model achieved the highest R-squared value equal to 0.993406, indicating it outperformed the others. The GRU model ranked second with an R-squared value equal to 0.992509, followed by the TCN model with an R-squared value equal to 0.992405 and the simple RNN model with an R-squared value equal to 0.991935.
All model’s RMSE values are shown in Table 1:

4. Conclusions

This study presents a comparative analysis of various neural network models for very short term solar irradiance and wind power forecasting using the Karachi dataset. The key findings indicate that the LSTM model outperforms the other models, achieving the highest and lowest R-squared value and RMSE value, respectively. These results emphasize the importance of accurate forecasting models in optimizing renewable energy generation and grid management and their potential applications in various sectors.

Future Work

Future work could explore feature extraction techniques like time series decomposition to further enhance forecasting model performance. Additionally, the exploration of liquid neural networks, which aim to achieve powerful predictions with fewer neurons and connections inspired by C. Elegans, shows promise. These approaches have the potential to offer more efficient and effective forecasting models.
Examining these techniques and alternative architectures can expand and enhance the proposed forecasting models’ applicability and generalizability.

Author Contributions

H.A.K. contributed to the overall concept development, experimental work, and modeling, whereas M.A. took charge of the writing and formatting tasks. H.A.R. provided valuable assistance with the introduction. A.M. conducted a comprehensive literature review and played a pivotal role in shaping the idea behind this study. M.A. and H.A.R. were responsible for writing the final results. All authors have read and agreed to the published version of the manuscript.

Funding

The research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data used to support the findings of this study are available at: https://nsrdb.nrel.gov/data-viewer (accessed on 19 May 2023).

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Föste, S.; Ehrmann, N.; Giovannetti, F.; Rockendorf, G. Basics for the development of a high efficiency flat-plate collector with a selectively coated double glazing. In Proceedings of the ISES Solar World Congress, Kassel, Germany, 28 August–2 September 2011. [Google Scholar]
  2. Hanan, J.J. Greenhouses: Advanced Technology for Protected Horticulture; CRC Press: Boca Raton, FL, USA, 1997. [Google Scholar]
  3. Myers, D.; Emery, K.; Gueymard, C. Terrestrial solar spectral modeling tools and applications for photovoltaic devices. In Proceedings of the Conference Record of the Twenty-Ninth IEEE Photovoltaic Specialists Conference, Hyatt Regency, New Orleans, LA, USA, 19–20 May 2002; pp. 1683–1686. [Google Scholar]
  4. Sinha, S.; Hodge, B.-M.; Monteleoni, C. Week-ahead solar irradiance forecasting with deep sequence learning. Environ. Data Sci. 2022, 1, e28. [Google Scholar] [CrossRef]
  5. Salehinejad, H.; Sankar, S.; Barfett, J.; Colak, E.; Valaee, S. Recent advances in recurrent neural networks. arXiv 2017, arXiv:1801.01078. [Google Scholar]
  6. Chung, J.; Gulcehre, C.; Cho, K.; Bengio, Y. Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv 2014, arXiv:1412.3555. [Google Scholar]
  7. Dey, R.; Salem, F.M. Gate-variants of gated recurrent unit (GRU) neural networks. In Proceedings of the 2017 IEEE 60th International Midwest Symposium on Circuits and Systems (MWSCAS), Boston, MA, USA, 6–9 August 2017; pp. 1597–1600. [Google Scholar]
  8. Van Houdt, G.; Mosquera, C.; Nápoles, G. A review on the long short-term memory model. Artif. Intell. Rev. 2020, 53, 5929–5955. [Google Scholar] [CrossRef]
  9. Mezina, A.; Burget, R.; Travieso-González, C.M. Network anomaly detection with temporal convolutional network and U-Net model. IEEE Access 2021, 9, 143608–143622. [Google Scholar] [CrossRef]
  10. Boulanger-Lewandowski, N.; Bengio, Y.; Vincent, P. Modeling temporal dependencies in high-dimensional sequences: Application to polyphonic music generation and transcription. arXiv 2012, arXiv:1206.6392. [Google Scholar]
  11. Zhou, H.; Zhang, Y.; Yang, L.; Liu, Q.; Yan, K.; Du, Y. Short-term photovoltaic power forecasting based on long short term memory neural network and attention mechanism. IEEE Access 2019, 7, 78063–78074. [Google Scholar] [CrossRef]
  12. Hu, M.; Li, W.; Yan, K.; Ji, Z.; Hu, H. Modern machine learning techniques for univariate tunnel settlement forecasting: A comparative study. Math. Probl. Eng. 2019, 2019, 7057612. [Google Scholar] [CrossRef]
  13. Borovykh, A.; Bohte, S.; Oosterlee, C.W. Dilated convolutional neural networks for time series forecasting. J. Comput. Financ. 2018, 22, 73–101. [Google Scholar] [CrossRef]
Figure 1. Recurrent neural network (RNN) internal cell structure.
Figure 1. Recurrent neural network (RNN) internal cell structure.
Engproc 46 00015 g001
Figure 2. Gated recurrent unit (GRU) internal cell structure.
Figure 2. Gated recurrent unit (GRU) internal cell structure.
Engproc 46 00015 g002
Figure 3. Long short-term memory (LSTM) internal cell structure.
Figure 3. Long short-term memory (LSTM) internal cell structure.
Engproc 46 00015 g003
Figure 4. Overall complete TCN model architecture.
Figure 4. Overall complete TCN model architecture.
Engproc 46 00015 g004
Figure 5. RNN, GRU, LSTM, and TCN models’ prediction plots with ground truth.
Figure 5. RNN, GRU, LSTM, and TCN models’ prediction plots with ground truth.
Engproc 46 00015 g005
Figure 6. Bar plots showing the training time taken by models to train for 500 epochs (left) and the inference time taken by models for forecasting the last 10 days (right).
Figure 6. Bar plots showing the training time taken by models to train for 500 epochs (left) and the inference time taken by models for forecasting the last 10 days (right).
Engproc 46 00015 g006
Table 1. RMSE Values of Models.
Table 1. RMSE Values of Models.
ModelRMSE Value
LSTM0.020051
GRU0.021371
TCN0.021519
RNN0.022175
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

Khan, H.A.; Alam, M.; Rizvi, H.A.; Munir, A. Solar Irradiance Forecasting Using Deep Learning Techniques. Eng. Proc. 2023, 46, 15. https://doi.org/10.3390/engproc2023046015

AMA Style

Khan HA, Alam M, Rizvi HA, Munir A. Solar Irradiance Forecasting Using Deep Learning Techniques. Engineering Proceedings. 2023; 46(1):15. https://doi.org/10.3390/engproc2023046015

Chicago/Turabian Style

Khan, Hammad Ali, Moeed Alam, Hassan Ali Rizvi, and Abdullah Munir. 2023. "Solar Irradiance Forecasting Using Deep Learning Techniques" Engineering Proceedings 46, no. 1: 15. https://doi.org/10.3390/engproc2023046015

Article Metrics

Back to TopTop