Please login first
Applications of RNN, LSTM, and GRU in Solar Irradiance Prediction for Photovoltaic Systems
* ,
1  Department of Control and Automation, Federal University of Rio Grande do Norte (UFRN), Natal, 59078-970, Brazil
Academic Editor: Ramiro Barbosa

Abstract:

Introduction

The rigorous analysis of solar radiation data is fundamental to the advancement of renewable technologies and climate studies, particularly in Natal, Brazil, a strategic location characterized by an annual insolation of approximately 2,968.4 hours and an average daily irradiance of 5.0 kWh/m². This research aims to address a critical gap in the literature often limited by a scarcity of validated models for the high volatility of tropical regions and an overreliance on univariate approaches that neglect external environmental variables by investigating the application of Deep Learning architectures, such as Recurrent Neural Networks (RNN), Long Short-Term Memory (LSTM), and Gated Recurrent Units (GRU). By modeling complex temporal dependencies and dynamic patterns in multivariate series, this study seeks to validate the efficacy of these configurations in optimizing energy resource forecasting and enhancing grid reliability.

Methodology

The methodological framework commenced with comprehensive data pre-processing, employing spline interpolation techniques to handle missing values and z-score standardization for data normalization. To capture the temporal dynamics of the series, the data were segmented into sliding windows of 10 samples each, serving as input for the neural networks. The dataset was partitioned into training (90%) and testing (10%) sets, ensuring the preservation of sequential integrity for robust validation. The implementation was executed in Python using the TensorFlow and Keras frameworks. The evaluated architecture consisted of a four-layer deep structure (256, 128, 64, and 1 neuron in the output layer), utilizing ReLU activation for hidden layers and linear activation for the output. Hyperparameter optimization was conducted by systematically varying batch sizes (16, 32, and 64) and training durations (50 and 100 epochs) to identify the most efficient model configurations.

Results

In terms of practical application, the selection among these Deep Learning architectures depends on the specific energy system requirements: RNNs are ideal for rapid processing within short time windows; LSTMs are essential for systems requiring high reliability in long-term and seasonal forecasting, as their 'memory gates' prevent the loss of historical information; meanwhile, GRUs represent the most balanced solution for implementation in microcontrollers and low-cost embedded systems, offering the robustness of LSTMs with significantly lower memory and processing demands. Although all architectures converged toward a coefficient of determination (R2) of 0.94, the practical distinction between the models lies in the trade-off between statistical precision and structural complexity. The RNN 3 model achieved the lowest absolute errors, establishing itself as the most accurate configuration for this specific dataset. In contrast, the LSTM and GRU architectures demonstrated greater robustness in handling long-term temporal dependencies, effectively mitigating the vanishing gradient problem. Notably, GRU 3 offered performance equivalent to LSTM 3, but with a more simplified and efficient computational structure.

The error metrics for the top-performing configurations are summarized as follows:

  • RNN 3: RMSE of 291.92; MAE of 208.47; R2 of 0.94.
  • GRU 3: RMSE of 295.69; MAE of 211.90; R2 of 0.94.
  • LTM 3: RMSE of 296.14; MAE of 213.44; R2 of 0.94.

Conclusions

This study concludes that the LSTM model demonstrated the greatest robustness in solar radiation forecasting, exhibiting a high correlation with empirical data and superior stability in predicting peak events and seasonal patterns. The primary contribution of this work lies in the use of an unprecedented regional dataset, allowing for a rigorous performance evaluation of these architectures under the specific geoclimatic conditions of tropical regions. Notably, the LSTM architecture outperformed the conventional RNN by maintaining lower sensitivity to stochastic noise and modeling complex nonlinear relationships with higher precision, even in the presence of high local thermal and irradiance volatility. These findings validate the implementation of advanced recurrent architectures as a robust and contextualized tool for the sustainable management of solar energy systems in tropical environments.

Keywords: Deep learning; Irradiance forecasting; LSTM networks; Time series; Tropical climate.
Top