Thank you for visiting nature.com. You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.
Advertisement
Scientific Reports volume 15, Article number: 40045 (2025)
1266
Metrics details
As the integration of photovoltaic system into modern power grid continues to accelerate globally, accurate solar power forecasting becomes essential for optimizing energy dispatch, ensuring grid reliability, and sustaining large-scale renewable energy production. This study proposes a novel FHO-GRU-LSTM model, which sequentially combines Gated recurrent units (GRU) and Long short-term memory (LSTM) networks, with hyperparameters optimized through the Fire Hawk optimization (FHO) algorithm. This hybridization leverages the complementary learning strengths of GRU and LSTM while integrating a nature-inspired optimization strategy. The model is trained using time-based temporal indexing and employs a recursive forecasting strategy to effectively capture temporal dependencies.The proposed model is evaluated using two distinct photovoltaic technologies, Poly-crystalline (Array 1) and Mono-crystalline (Array 2) implemented within the PEARL system. Quantitative performance assessments based on standard error metrics and residual bias analysis reveal the superior accuracy and robustness of the FHO-optimized GRU-LSTM model. The model achieved R2 scores of 0.9964 and 0.9966 for Arrays 1 and Array 2, respectively, along with substantial reductions in root mean square error and mean absolute error at 12.67 and 23.40% for Array 1, and 23.29 and 24.52% for Array 2. These findings highlight the critical importance of advanced hyperparameter tuning in enhancing the generalization capability of deep learning models and reinforce their applicability in improving grid stability and promoting sustainable renewable energy integration.
The adoption of renewable energy (RE) sources, such as solar, wind, hydroelectric, and biomass, has increased significantly in recent decades due to growing concerns over environmental pollution, fossil fuel depletion, and rising global energy demand. Solar energy, in particular, is valued for its minimal environmental impact and essential role in both grid-connected and off-grid systems, particularly in developing countries1. Advances in solar technology have made solar energy (SE) more affordable, with decreasing installation and maintenance costs, expanding accessibility to a broader range of users2,3. This transition to SE enhances energy security by reducing dependence on non-renewable resources and fosters economic growth through job creation within the renewable energy sector4,5.
Recent technological advancements have led to the development of hybrid machine learning (ML) models that offer superior performance compared to conventional and common models such as physical and statistical methods. Methods such as numerical weather prediction (NWP), autoregressive integrated moving average (ARIMA), seasonal autoregressive and integrated moving average (SARIMA). These conventional methods rely heavily on weather conditions6, involve complex mathematical formulations7, and struggle with non-linear datasets, lacking the robustness of standalone artificial intelligent (AI) techniques8. To overcome these limitations, hybrid model have emerged as an optimal approach for enhancing solar power forecasting9,10.
The research conducted by Bouzerdoum et al.11 developed a hybrid SARIMA–SVM model, achieving a normalized root mean square (nRMSE) of 9.40% and coefficient of determination (R2) of 0.9908, outperforming standalone models. Konstantinou et al.12 employed a stacked long short-term memory (LSTM) network, achieving root mean square error (RMSE) of 0.11368 and nRMSE of 0.09394. Wang et al.13 introduced an Extremely Randomized Trees Classification (ETC) model combined with Support Vector Regression (SVR), yielding mean absolute percentage error (MAPE) of 11.80% and RMSE of 66.48 W. Guermoui et al.14 integrated iterative filtering (IF) with Extreme Learning Machine (ELM), obtaining an nRMSE below 10% and R2 above 98%. Agga et al.15 proposed a convolutional neural network and LSTM (CNN-LSTM) hybrid, improving MAPE by 5.55, 6.86, and 6.49% for 1-day, 3-day, and 7-day forecasts, respectively. Akhter et al.16 developed recurrent neural network and LSTM (RNN-LSTM) model, reducing RMSE by 11.21% for Poly-crystalline (PC), 7.04% for Mono-crystalline (MC), and 29.41% for thin-film (TF) PV technologies. Rai et al.17 introduced a CNN and bidirectional-LSTM (CNN-BiLSTM) multi-directed differential attention-based network, improving measn square error (MSE) by 72%. Wu et al.18 presents the integration of CEEMDAN and a hybrid CNN-GRU model. The research addresses the challenges posed by nonstationarity and volatility in PV power data by decomposing the data into subsequences and restructuring them based on complexity. The proposed CEEMDAN-sample entropy-CNN-GRU (CSCG) model demonstrated superior performance, achieving an average RMSE of 2.98 MW and 3.45 kW, and an average MAPE of 3.70 and 3.49% for two different PV stations.
Moreover, the application of hyperparameter tuning in optimization has expanded and begun to be recognized within the research, as the topology serve as a mechanism to further improve the model performance19. Commonly, meta-heuristic algorithms are employed in RE studies due to their capabilities to effectively explore large search spaces and effectively address complex comptimization problems20. Majumder et al.21 proposed a multi-kernel random vector functional link neural network (MK-RVFLN), which was subsequently optimized using an evaporation-based water cycle algorithm (EVWCA). The optimized model achieved MAPE of 1.06%, reflecting a 13.82% improvement in forecasting accuracy following the optimization. Tahir et al.22 utilized multiple range of ML algorithms, including Ensemble of Regression Trees (ERT), Support Vector Machine (SVM), Gaussian Process Regression (GPR), and Artificial Neural Networks (ANN). Among these, GPR exhibited the most favorable performance. When optimized using Bayesian Optimization, GPR achieved RMSE of 5.23% and mean absolute error (MAE) of 2.65%. In comparison, optimization via Random Search resulted in an RMSE of 5.64% and MAE of 3.14%. Aprillia et al.23 integrated CNN with the Sparrow Search Algorithm (SSA) for PV power prediction, improving MAPE by 48.46% and Mean Relative Error (MRE) by 14.05%. Netsanet et al.24 combined Ant Colony Optimization (ACO) with Variational Mode Decomposition (VMD) and ANN, achieving normalised mean square error (NMSE) of 0.0232 and R2 of 97.68%. Akhter et al.25 integrated the Salp Swarm Algorithm (SSA) with RNN-LSTM, reducing RMSE and MAE by 8.41% and 7.79% for PC, 4.85% and 4.11% for MC, and 17.52 and 13.99% for TF, respectively. Peng et al.26 employed enhanced Chaos Game Optimization (ECGO) demonstrating improvements in R2 by 1.73%, and reductions in mean square error (MSE), MAE, and RMSE by 38.85%, 13.40%, and 21.60%. Kothona et al.27 introduced a hybrid Adam-UPSO algorithm with LSTM, enhancing forecasting accuracy by 15.21% over Adam and 22.60% over the persistence model. Eseye et al.28 combined the Evolutionary Mating Algorithm (EMA) with Deep Neural Network (DNN) for power forecasting in India, achieving an RMSE of 374.40 kW. Ridha et al.29 presents a novel approach by integrating Improved Mountain Gazelle Optimizer (IMGO) with a multi-layer feedforward neural netwrok (MFFNN) and polynomial regression. The proposed model achieved RMSE of 0.0280 and R2 of 0.9951, respectively.
Although the potential of hybrid models, both with and without meta-heuristic algorithms, to enhance model performance is well recognized, their application for hyperparameter tuning in optimization remains underexplored. Research in tropical regions, which are characterized by high humidity and elevated sky indexes, is particularly limited. In these regions, factors such as cloud cover and atmospheric moisture introduce significant variability in solar irradiance, and by extension, in power generation. Moreover, studies on meta-heuristic algorithms for hyperparameter optimization in hybrid DL models are sparse, primarily due to the computational cost, architectural complexity, and the inherent variability and bias within the datasets. To optimize model performance in sustainable energy production, particularly in grid-connected systems across rural and urban areas, a comprehensive comparison of multiple meta-heuristic algorithms is urgently needed. Additionally, while hybrid models are increasingly adopted, there is insufficient research evaluating their performance across various PV technologies. This underscores the need for a robust assessment of their effectiveness across different solar technologies to improve prediction accuracy, particularly in the context of specific case study regions.
Addressing these gaps could enhance the development of robust and efficient hybrid DL models by fully leveraging meta-heuristic algorithms. Both GRU and LSTM excel in capturing short and long-term temporal dependencies, making them effective for variable time-series forecasting. Their recurrent structure allows for effective noise filtering and pattern extraction. Despite the increasing application of metaheuristic optimization in renewable energy forecasting, the integration of GRU and LSTM models with advanced metaheuristic algorithms remains markedly underexplored. Addressing this gap forms the core motivation of the present study.
This investigation draws on data collected in the tropical rainforest climates of Malaysia, where the deployment of solar energy constitutes both an environmental imperative and an infractured priority, particularly in rural area location. The study seeks to determine the most suitable photovoltaic technology for sustained operation under conditions of high humidity, persistent cloud cover, and variable irradiance. This geographic focus ensures that the results are directly relevant to national energy planning and rural electrification strategies. By anchoring the analysis in this context, the study contributes not only a technically robust forecasting framework but also one that is tailored to operational realities and aligned with regional energy policy needs. The main contributions of this work are outlined as follows:
Development of a baseline GRU-LSTM hybrid model using a serial (sequential) connection strategy, incorporating time-based framing and temporal indexing to support recursive solar power forecasting for an hour ahead solar power forecasting.
Integration of the Fire Hawk Optimization (FHO) algorithm for hyperparameter tuning to enhance the predictive accuracy and efficiency of the baseline hybrid model.
Comparative benchmarking of the FHO-enhanced model against other prominent meta-heuristic algorithms to assess the impact of different optimization strategies on hybrid model performance, including Particle Swarm Optimization (PSO), Grey Wolf Optimization (GWO), Whale Optimization Algorithm (WOA), and Owl Search Algorithm (OSA).
Comprehensive evaluation of all hybrid models using multiple error metrics to determine the most accurate and robust forecasting framework.
Implementation of residual and convergence analyses to investigate the stability and consistency of the forecasting outputs, with a focus on residual distribution characteristics and optimization trajectory behaviors.
The remaining sections of this paper are organized as follows. Section “Methodology” provides a comprehensive overview of the PEARL system, detailing the proposed study topology. It outlines the key steps in time-series ML forecasting, offering a thorough description of each stage. Section “Results and discussion” presents the results and discussion, summarizing the key findings and comparing them with related works. Finally, Section “Conclusion” concludes the paper and discusses future research directions.
This study outlines the methodology for the PEARL PV system, consisting of two subsystems. It details the preprocessing stage of solar power forecasting, including the baseline model and the chosen meta-heuristic algorithm, followed by the definition and formulation of performance evaluation parameters.
The grid-connected PEARL system, installed on the rooftop of the Tower’s Engineering Building at Universiti Malaya, Malaysia, integrates two distinct PV technologies: Poly-Crystalline (Array 1) and Mono-Crystalline (Array 2). The system is equipped with a sensor box that measures solar irradiation, module temperature, and wind speed. Data from these sensors are transmitted to the Sunny WebBox for daily storage, with the WebBox capable of retaining historical data for up to 12 months. Fig. 1 presents a schematic overview of the grid-connected PEARL system, and the specifications of the arrays are summarized in Table 1.
Diagrammatic overview of grid-connected PEARL system.
Array 1, which uses Poly-crystalline cells, has a peak power of 125 Wp, with a maximum current of 7.90 A and a maximum voltage of 17.30 V. The short-circuit current is 7.23 A, and the open-circuit voltage is 21.80 V, with a total of 16 modules. Array 2 utilizing Mono-crystalline cells, delivers a peak power of 75 Wp, with a current of 4.40 A and a voltage of 17 V at maximum performance. The short-circuit current is 4.80 A, and the open-circuit voltage is 21.70 V, comprising 25 modules.
The preprocessing phase was crucial to ensure the dataset’s readiness for robust forecasting. All operations were conducted in a Jupyter Notebook environment on a personal computer equipped with an Intel Core i7 processor and 64 GB of RAM. The proposed methodological framework is depicted in Fig. 2.
Overview flowchart of the proposed study.
The analysis draws on a 38-month historical dataset obtained from the PEARL archive, with measurements collected at 5-min intervals. Key variables include solar irradiation (Wh/m2), module temperature (°C), wind speed (m/s), and generated power (W) from Array 1 and Array 2. Within the assessment period, gaps in the dataset were identified, including a 24-day period of missing data in November 2022. Extended gaps approaching one month were addressed through temporal replacement, employing a forecasting model trained and tested exclusively on the corresponding seasonal window from the preceding year. The use of only two data subsets (training and test) was deemed sufficient given the single-year modeling window, balancing methodological simplicity with the need to preserve seasonal characteristics. In contrast, intermittent gaps shorter than 14 days were left unfilled to maintain the authenticity and integrity of the raw measurements. Compared with removal-based or signal decomposition imputation methods commonly reported in the literature, this temporal replacement strategy preserves seasonal dynamics, avoids unnecessary computational overhead, and maximizes retention of the dataset’s originality.
Fig. 3 presents the average power output of each array and the total average output over the entire period, highlighting long-term trends rather than short-term fluctuations. Meanwhile the correlation analysis in Fig. 4 reveals strong positive correlations between irradiation and both Poly-crystalline and Mono-crystalline outputs (0.98 and 0.96, respectively), a strong correlation between module temperature and irradiation (0.84), and moderate correlations between wind speed and power output (~ 0.33).
Average power output of Array 1, Array 2, and total generation over the 38-month dataset.
Correlation matrix of key meteorological and PV output parameters.
Table 2 provides a statistical summary of the PV dataset, including ranges, central tendencies, and zero-value occurrences. Irradiation spans 0 to 1,114 Wh/m2, module temperature 0 to 64 °C, and median power outputs are 512 W and 300 W for Poly-crystalline and Mono-crystalline arrays, respectively. The low proportion of zero values (< 3%) and physically consistent ranges confirm the dataset’s completeness and plausibility. Collectively, the temporal trends, correlations, summary statistics, and explicit treatment of missing data comprehensively validate the dataset for subsequent modeling and analysis.
Following the imputation of missing values, the dataset is divided into four subsets: Subset 1 (Train), Subset 2 (Validate), Subset 3 (Test), and Subset 4 (Forecasting), as illustrated in Fig. 5. This allocation strategy was based on observations during model development, where underfitting and overfitting were more evident in Array 2 due to suboptimal or imbalanced data partitioning, whereas Array 1 exhibited stable performance either under the chosen split or otherwise. Careful partitioning was essential for building a robust and generalizable model, with each subset serving a distinct role. The training set enabled the model to learn patterns, the validation set supported hyperparameter tuning and helped mitigate overfitting, and the test set provided an unbiased evaluation of predictive performance. The dedicated forecasting subset further supported forward-looking predictions beyond the training window. The dataset is normalized using Min–Max scaling, as defined in Eq. (1).
Period-based division of dataset for different stages.
The methodology was applied uniformly across all five optimization methods, with the ‘MSE’ serving as the objective function. The hyperparameters were standardized to improve comparability, including setting the population size and number of iterations to 10 and 30, respectively. Each model’s architecture consistently used neuron counts and layer configurations of (90, 120, 210) across the baseline and all meta-heuristic hybrid models, as the study focused on refining these candidate hyperparameters, detailed in Table 3.
The hyperparameters of the baseline model were initialized using the default settings from the Keras library. These hyperparameters and their corresponding range boundaries were specifically selected to minimize computational costs. The chosen lower and upper bounds were determined based on preliminary trials, where values beyond the upper limits did not yield significant performance gains but increased computational overhead. This justified the use of narrowed ranges that balanced efficiency and forecasting accuracy. Each model’s performance was evaluated using a baseline error metric, and any model that demonstrated a significant improvement, irrespective of whether the improvement was low, average, or high, had its results recorded immediately. Models that did not surpass the baseline performance were reset and retrained until superior results were achieved. Additionally, the training duration of each model was monitored to assess whether the training time was sufficient or if an extended period was required to achieve satisfactory results.
Model performance is assessed using residual analysis and performance metrics. The metrics, including RMSE, MAE, MSE, and R2, are calculated using Eq. (2) to Eq. (5)16,25. Residual analysis evaluates the patterns and distribution of errors (the differences between observed and predicted values) to identify biases, assess normality, and detect issues such as heteroscedasticity. Ideally, residuals should be centered around zero and randomly distributed without systematic trends. In this study, residual evaluation is based on the average residual ((overline{{e }_{t}})) and overall average residual ((overline{E })), computed using Eq. (6) and Eq. (7).
where (B_{i}), (widehat{{B_{i} }}) and ({overline{B}_{i} }) are the observed, predicted, and mean value, while (m), (n) and (i) represent the number of sampled days, the number of hours and the timestamp of the dataset.
This section provides an overview of the baseline model and meta-heuristic algorithms used in this study. The baseline model integrates GRU and LSTM networks into a hybrid DL architecture to improve forecasting accuracy. The meta-heuristic algorithms optimize hyperparameters to reduce forecasting errors and enhance model performance.
This study introduces a DL architecture that sequentially integrates a GRU and LSTM network. The proposed architecture incorporates time-based framing and temporal indexing for data preparation and employs a recursive forecasting strategy, where future predictions are generated iteratively across the forecasting horizon. This design enables the model to preserve and exploit temporal dependencies by leveraging historical time-stamped inputs along with previously generated outputs in a stepwise, temporally aligned manner.
The adoption of a serial GRU–LSTM architecture is grounded in its ability to capture both short-term fluctuations and long-term dependencies in solar PV time-series data. GRU units offer computational efficiency and fast convergence, making them well-suited for modeling immediate irradiance and temperature variations30. LSTM units, with their gated memory cells, provide stability and depth in learning extended temporal patterns30. By arranging the layers sequentially, the GRU serves as a first-stage filter that efficiently handles high-frequency variability, while the LSTM refines these representations to model diurnal and seasonal dependencies. This ordering directly addresses the dual forecasting challenges of short-term volatility and long-term trend preservation in solar PV datasets. This sequential integration enhances temporal coherence and mitigates vanishing gradient issues common in deep recurrent networks31. Unlike parallel hybrid configurations or standalone GRU/LSTM models, the serial connection enables recursive forecasting with improved error propagation control. Prior studies have primarily employed either single-unit architectures or ensemble models with direct forecasting strategies31,32. In contrast, the recursive approach offers greater adaptability for real-time deployment. This methodological design therefore represents a deliberate advancement tailored to the intermittency and nonstationarity of solar power data.
To further minimize cumulative error propagation, the model avoids directly refeeding predicted values into the input layer. Instead, it recursively updates the internal hidden states of the forecasting components at each step, maintaining consistency while reducing bias accumulation. The training procedure for the hybrid model is illustrated in Fig. 6. And a detailed schematic of the proposed framework is shown in Fig. 7.
The proposed forecasting dataflow framework.
Illustration of the baseline hybrid model process: (a) training at the initial epoch using historical data, and (b) continued training across subsequent timestamp.
The forecasting process on Subset 4 was initiated only after the model had been fully trained and validated using Subsets 1 to Subset 3, which collectively constituted the historical data. This ensured that the model had achieved stable learning performance prior to its application on unseen data. Subset 4 was then used as the final forecasting phase to objectively evaluate the model’s generalization capability under realistic deployment conditions. Forecasting began at the initial timestamp ((t=0)) and at initial/current epoch ((e)) of the reserved forecasting month (month 38), corresponding to the first hour of that month. Although the forecasting was initiated from this timestamp, the model relied on time-stamped historical data from the preceding 37 months to extract meaningful temporal patterns needed for generating the first forecast.
At the start of the forecasting process, illustrated in Fig. 7a, the internal hidden states of both the GRU and LSTM components were initialized to zero, ensuring that the forecasting began without influence from prior recursive steps. The model then applied a recursive forecasting strategy, where each forecasted value at timestamp ((t+1)) was generated based on the model’s updated internal state from the previous step. This process continued sequentially across the forecasting horizon (t+1, t+2, …, t+n,…, T), with no refeeding of predicted outputs into the input layer. Instead, the internal states were updated recursively at each step to maintain temporal continuity and minimize cumulative error propagation. The process then proceeds to the subsequent epoch ((e + 1)), continuing iteratively until the optimal MSE value is achieved, depicted in Fig. 7b. To prevent unnecessary training and reduce computational overhead, an early stopping mechanism is employed, thereby ensuring model convergence is reached efficiently without compromising forecasting performance.
Referring to Fig. 7, the GRU serves as the initial temporal, where it processes time-indexed input sequences (left( {X_{t} left( e right)} right)) consisting of historical data including solar irradiation, module temperature, and wind speed. Here, (t) represents the timestamp and (e) the training epoch. The GRU generates hidden states that encapsulate short-term temporal dependencies. These hidden states (h_{t}^{GRU} left( e right)) are recursively propagated across successive timestamps, allowing the model to maintain memory of previously observed temporal patterns without relying on the forecasted outputs as inputs at each step, thus mitigating error accumulation commonly associated with output-based recursive forecasting. In the GRU model, the Reset Gate ((r_{t})) decides the range to which prior information is disregarded, while the Update Gate ((Z_{t})) controls the extent of information retained for the future states. The output of Reset Gate, Update Gate, along with the Candidate Hidden State ((widetilde{{h_{t} }})) and Final Hidden State ((h_{t})), are computed in accordance with Eq. (8) to Eq. (11) 33.
where Wr, Wz and Wh are weight matrices and br, bz and bh are bias terms for Reset gate, Update gate and Candidate hidden state, respectively. (sigma) represent sigmoid activation.
On the other hand, the LSTM network excels at capturing long-term dependencies, making it well-suited for recursive-related tasks. The LSTM unit comprises three essential gates: the Forget Gate (left( {f_{t} } right)), the Input Gate (left( {i_{t} } right)), and the Output (left( {O_{t} } right)). The Forget Gate determines which components of the cell state (left( {{text{C}}_{{text{t}}} } right)), the new cell state (left( {C^{prime }_{t} } right)), the output in Input Gate (,) and the output at the Output Gate, were computed using Eq. (12) to Eq. (17)16,25. Finally, the output forecast, (text{Z}left(eright)) at each time-step and epoch is calculated by applying a linear transformation in Eq. (18).
where ({W}_{y}) and ({b}_{y}) are the weight matrix and bias vector of the output layer.
To address the complex challenge of hyperparameter tuning in the proposed hybrid forecasting framework, the FHO is employed. This selection is motivated by FHO’s demonstrated capacity to balance exploration and exploitation effectively, which is essential for navigating the nonlinear, high-dimensional optimization landscape inherent in machine learning applications. In contrast to conventional optimization methods, FHO enhances population diversity during the search process, thereby increasing the likelihood of locating globally optimal solutions and mitigating the risk of overfitting. FHO is part of a new generation of nature-inspired metaheuristic algorithms, including Harris Hawk Optimization and the Mayfly Algorithm, which have recently gained attention for their optimization potential. During the preliminary phase of this study, several of these emerging algorithms were assessed; FHO exhibited superior performance in terms of convergence rate, stability, and solution quality. Consequently, it was selected as the most appropriate optimization strategy for this application. Notably, the utilization of FHO in time series forecasting, particularly within the energy domain remains limited in the current body of literature.
The FHO is an innovative meta-heuristic algorithm inspired by the foraging behavior of predatory birds, specifically whistling kites, black kites, and brown falcons, as developed by34. These birds, collectively referred to as Fire Hawks (FH), employ a unique hunting strategy wherein they intentionally spread fires to flush out prey. By transporting burning sticks from existing fires and dropping them in unburned areas, they initiate small fires that cause prey, such as rodents and snakes, to flee into open spaces, making them more vulnerable to capture35. The FHO algorithm replicates this strategy by exploring new regions within the search space, effectively avoiding local optima and facilitating the identification of the global optimum solution36. The flowchart process of the FHO algorithm is presented in Fig. 2, with each step and corresponding Eq.s referenced from34.
To provide a comprehensive understanding of the FHO operational mechanism, the subsequent section details the step-by-step algorithmic procedure, including the mathematical formulations governing its search and update rules. This explicit description facilitates reproducibility and clarifies how FHO explores the solution space to optimize the hyperparameters of the forecasting model.
Step 1: Candidate solutions (fire Hawks) are initialized randomly within the predefined lower and upper bounds of the hyperparameter search space (Eq. 19). Here, d denotes the problem dimension (number of hyperparameters), and N is the population size.
where (d) and (N) represent the accumulative number of candidates solution within the search space ((i)) and the dimension ((j)) of the considered problem, (FH_{i,min}^{j}) and (FH_{i,max}^{j}) indicated the lower and upper bounds.
Step 2: The algorithm computes the Euclidean distance between each fire Hawk and the prey within the search space to identify the nearest prey for effective territory management (Eq. 20).
where (m) and (n) represent the total number of PR and FH within the search space, (left( {y_{1} ,x_{1} } right)) and (left( {y_{2} ,x_{2} } right)) denoted as the coordinates of fire Hawks and the prey.
Step 3: In this phase, the FH update procedure ((FH_{l}^{new})) for the vector (l^{th}), within the main search loop is computed in Eq. (21) The FH collects burning sticks to ignite fires in its territory, forcing prey to flee. Concurrently, some birds may utilize burning sticks from other FH territories. The global best (GB) solution in the search space is represented by the main fire, which serves as the starting point.
where ({FH}_{near}) is one of the other fire Hawks, and ({r}_{1}) and ({r}_{2}) are uniformly distributed random number of (0,1).
Step 4: Two outcomes are possible: the prey (PR) may either hide, flee, or inadvertently move toward the Fire Hawk (FH) within its territory, with positional updates governed by Eq. (22). Alternatively, the PR may escape into adjacent FH territories, encountering other ambush points or seeking refuge, with position updates based on Eq. (24).
where (PR_{q}^{new}) is the new vector position of (q^{th}) prey surrounded by (l^{th}) fire Hawks, (FH_{Alter}) represent one of the other fire Hawks, (SP_{in}) and (SP_{out}) are the safe place for prey within and outside of fire Hawk territory, ({r}_{3}) to ({r}_{6}) are the uniformly distributed random number of (0,1).
Step 5: Upon reaching the maximum number of iterations, the procedure terminates. The optimized hyperparameters and their corresponfing MSE values are reported and integrated into the baseline model for subsequent processes.
A comprehensive assessment was conducted to evaluate the performance of hour-ahead solar power forecasting using proposed integration between baseline model and meta-heuristic hybrid algorithm based on two distinct PV arrays within the PEARL system. This section presents the findings on the optimized hyperparameter and includes a visual analysis performed to assess model behavior. The analysis consisted of 1) residual analysis and 2) the objective function curve.
The results confirm that meta-heuristic optimization techniques significantly enhance the forecasting performance compared to the baseline. In particular, improvements are consistent across both PV technologies, though the magnitude of enhancement varies. Comprehensive results for Array 1 and Array 2 are presented in Table 4, while Fig. 8 depicted the alignment between predicted and observed solar power outputs. Subset 4 comprises 310 samples (1 sample = 1 h). For clarity of presentation, the primary plot illustrates a representative 40-sample hourly segment that best demonstrates the model’s predictive capability, while a zoomed-in view of approximately 7 samples is provided to highlight fine-grained forecasting accuracy and deviation patterns.
The comparison between the prediction and the actual value for (a) Array 1 and (b) Array 2.
In Array 1, the FHO-GRU-LSTM model emerged as the most effective configuration among all evaluated approaches, demonstrating superior forecasting accuracy through optimized hyperparameter tuning, achieving the lowest MAE (28.13 W), MSE (791.07 W) and RMSE (19.36 W), alongside the highest R2 (0.9964), highlighting the strength of the FHO algorithm in refining model parameters to yield more accurate and stable predictions. The GWO-GRU-LSTM model ranked second, also exhibiting substantial improvements across all error metrics, which reflects the GWO strong global search capability and convergence reliability. Althought the PSO-GRU-LSTM and WOA-GRU-LSTM produced comparable R2 values, deeper evaluation of their respective MAE, MSE, and RMSE revealed that the PSO-GRU-LSTM outperformed the WOA-GRU-LSTM. This suggests that PSO’s swarm-based search dynamics provided a more effective balance between exploration and exploitation in the solution space. In contrast, the OSA-GRU-LSTM model offered only marginal improvements over the baseline, achieving an MAE of 32.01 W, MSE of 1024.52 W, RMSE of 24.66 W, and R2 of 0.9954. This relatively limited enhancement is likely attributable to the One-Slot Algorithm’s constrained exploratory behavior, which may cause premature convergence to suboptimal hyperparameter configurations.
In Array 2, the baseline GRU-LSTM model without optimization achieved an RMSE of 16.23 W, MAE of 12.44 W, MSE of 263.50 W, and R2 of 0.9942. Following meta-heuristic tuning, the FHO-GRU-LSTM model once again outperformed all others, recording the lowest RMSE (9.39 W), MSE (154.88 W), and the highest R2 (0.9966), while maintaining a comparable MAE (12.45 W). These outcomes demonstrate the model’s robust generalization capability across different PV arrays and reinforce FHO’s efficiency in navigating the hyperparameter space. The GWO-GRU-LSTM, WOA-GRU-LSTM, and OSA-GRU-LSTM models followed in descending order of performance, while the PSO-GRU-LSTM model, despite its effectiveness in Array 1, showed the least improvement in Array 2, with an RMSE of 12.15 W, MAE of 15.13 W, MSE of 229.04 W, and R2 of 0.9950. This inconsistency suggests that the efficacy of PSO may be sensitive to data variability and structure, limiting its adaptability across different PV datasets.
To systematically quantify the enhancement achieved through meta-heuristic integration, the percentage reductions in RMSE and MAE were calculated relative to the baseline model. This metric provides a normalized framework for evaluating model improvements across both arrays. As shown in Fig. 9, which compares “Model-1” (Array 1) and “Model-2” (Array 2), and summarized in Table 5, the comparative percentage reductions in RMSE and MAE highlight performance differences. The FHO-GRU-LSTM model consistently demonstrates the largest error reductions, underscoring its effectiveness in optimizing forecasting performance through efficient hyperparameter exploration and convergence.
Illustration of error reduction in both Array 1 and Array 2.
The integration of meta-heuristic algorithms with the GRU-LSTM model yields marked improvements in forecasting accuracy, with the FHO-GRU-LSTM architecture consistently outperforming all other configurations across both PV arrays. In Array 1, the FHO-GRU-LSTM-1 model achieves notable 12.67% reduction in RMSE, surpassing GWO-GRU-LSTM-1 (9.41%), PSO-GRU-LSTM-1 (2.11%), WOA-GRU-LSTM-1 (1.40%), and OSA-GRU-LSTM-1 (0.62%). This trend is even more pronounced in Array 2, where FHO-GRU-LSTM-2 exhibits 23.29% RMSE reduction, outperforming GWO-GRU-LSTM-2 (14.66%), PSO-GRU-LSTM-2 (12.14%), OSA-GRU-LSTM-2 (10.10%), and WOA-GRU-LSTM-2 (6.78%).
In terms of MAE, FHO-GRU-LSTM again leads with reductions of 22.37% in Array 1 and 24.52% in Array 2. The next best performing model, GWO-GRU-LSTM, shows improvements of 13.15 and 17.93%, respectively. PSO-GRU-LSTM achieves 5.41and 13.99%, OSA-GRU-LSTM attains 1.12 and 10.21%, while WOA-GRU-LSTM lags with the lowest reductions of 2.13 and 2.33%. These results clearly demonstrate the superior optimization capacity of the FHO algorithm in discovering highly effective hyperparameter combinations that enhance both average and squared error performance metrics. The disparity between RMSE and MAE reductions observed in certain models indicates varying degrees of influence on the distribution of forecast errors. Specifically, models like PSO-GRU-LSTM and OSA-GRU-LSTM, which deliver greater RMSE reductions relative to MAE, may be more effective at mitigating large, infrequent errors but less efficient in minimizing average deviations. This suggests that while these algorithms exhibit some capacity for error suppression, their overall consistency in generalization remains suboptimal.
The robust performance of FHO-GRU-LSTM in Array 2 can be attributed to the FHO algorithm’s hierarchical and fitness-aware search mechanism, which allows for dynamic adaptation to the complex and potentially nonlinear relationships present in the dataset. Conversely, the marginal improvements observed in OSA-GRU-LSTM in Array 1 and WOA-GRU-LSTM in Array 2 highlight the limitations of their search behavior, particularly a tendency toward premature convergence or lack of adaptive exploration, which restricts their effectiveness in uncovering optimal hyperparameter solutions. Collectively, these findings reinforce the critical role of hyperparameter tuning via advanced meta-heuristic optimization in elevating forecasting performance. The FHO algorithm in particular, emerges as the most reliable and generalizable strategy for enhancing GRU-LSTM model accuracy across diverse operational conditions.
A central objective of this study is to rigorously evaluate model performance by examining the congruence between predicted and observed values through detailed residual analysis. Fig. 10a and Fig. 10b illustrate the residual distribution patterns for Array 1 and Array 2, respectively, while the corresponding statistical box plots are provided in Fig. 10c and Fig. 10d. These visualizations enable the identification of systematic bias, temporal error patterns, and variability in forecasting accuracy across the hybrid models.
Analysis of the meta-heuristic hybrid models: (a) Average residuals in Array 1, (b) Average residuals in Array 2, (c) Box plot for Array 1, and (d) Box plot for Array 2.
These visualizations enable a comprehensive assessment of model performance by capturing both systematic and stochastic error characteristics. The residual distribution plots reveal temporal patterns of overestimation (positive residuals) and underestimation (negative residuals) across the forecasting horizon, with values near zero indicating periods of accurate prediction. The error box plots complement this analysis by summarizing the overall error distribution: the interquartile range reflects consistency of forecasting accuracy, the median indicates central tendency, and the whiskers and outliers highlight the magnitude of extreme deviations where models underperform.
In Array 1, the residual analysis presented in Fig. 10a and Fig. 10c reveals notable disparities among the hybrid models. The FHO-GRU-LSTM model records the lowest average residual (overline{E} left( {2.48} right)) and the lowest (overline{{e_{t} }} left( {0.98 , W} right)), suggesting a stable and robust prediction capability with minimal variance. The residuals remain well-contained throughout the forecasting window, except for a localized deviation at 16:00, peaking at (overline{{e_{t} }} = 27.55 , W)s, indicating a temporary lag in dynamic adjustment to late-day solar fluctuations. In contrast, OSA-GRU-LSTM exhibits the poorest performance, with the highest (overline{E}) of 8.37 and a median of 4.25 W. This model registers extreme residuals at 8:00 (left( {overline{{e_{t} }} = 29.44 , W} right)) and 16:00 (left( {overline{{e_{t} }} = 29.70 , W} right)), indicative of persistent overestimation and a lack of adaptive learning capacity, particularly during rapid irradiance transitions. PSO-GRU-LSTM presents moderate predictive ability ((overline{E} = 6.74 , W), median = 4.73 W), although it still suffers from high variance, evidenced by notable spikes at both 8:00 (left( {overline{{e_{t} }} = 31.05 , W} right)) and 16:00 (left( {overline{{e_{t} }} = 31.37 , W} right)). GWO-GRU-LSTM and WOA-GRU-LSTM demonstrate intermediate performance, with (overline{{e_{t} }}) of 3.60 W and 3.92 W, respectively. However, GWO-GRU-LSTM encounters a pronounced deviation at 16:00 (left( {overline{{e_{t} }} = 28.97 , W} right)) , while WOA-GRU-LSTM displays instability at 8:00 (left( {overline{{e_{t} }} = 31.80 , W} right)) and an anomalous negative residual at 10:00 (left( {overline{{e_{t} }} = – 26.65 , W} right)). Interestingly, WOA-GRU-LSTM is negative (left( {overline{{e_{t} }} = – 0.63 , W} right)), suggesting an overall central tendency toward mild underestimation, despite the presence of high-magnitude outliers. Overall, FHO-GRU-LSTM is the most consistent and reliable performer in Array 1, with the least residual spread and deviation, while OSA-GRU-LSTM and PSO-GRU-LSTM demonstrate marked inconsistencies, particularly during transitional irradiance periods.
For Array 2, the residual analysis depicted in Fig. 10b and Fig. 10d unveils distinct forecasting behaviors among the hybrid models. FHO-GRU-LSTM maintains an impressively low average residual (left( {overline{E} = 0.82 , W} right)) and a median of 0.98 W, reflecting its superior ability to align forecasts with observed values. The model demonstrates tight clustering of residuals, with a moderate peak at 16:00 (left( {overline{{e_{t} }} = 10.72 , W} right)), indicating marginal overestimation toward the end of the prediction horizon. GWO-GRU-LSTM, although exhibiting slightly lower (overline{E} left( {0.71 , W} right)) and median residual (0.42 W), suffers from notable underestimations at 10:00 (left( {overline{{e_{t} }} = – 10.83 , W} right)) and 15:00 (left( {overline{{e_{t} }} = – 5.89 , W} right)), suggesting erratic error distribution despite overall balance. OSA-GRU-LSTM continues its trend of overestimation, recording the highest residuals among all models (left( {overline{E} = 4.79 , W} right)), median = 4.33 W), with large deviations at 16:00 (left( {overline{{e_{t} }} = 13.50 , W} right)) and 17:00 (left( {overline{{e_{t} }} = 8.68 , W} right)), reflecting its inefficacy in adapting to late-afternoon irradiance declines. PSO-GRU-LSTM exhibits a strong bias toward underestimation, as evidenced by a negative average residual (left( {overline{{e_{t} }} = – 0.84 , W} right)) and a negative median (− 1.18 W), with the most significant errors occurring at 10:00 (left( {overline{{e_{t} }} = – 11.97 , W} right)) , 11:00 (left( {overline{{e_{t} }} = – 8.36 , W} right)), and 15:00 (left( {overline{{e_{t} }} = – 8.19 , W} right)). The residuals gradually transition into overestimation in the late afternoon, highlighting an imbalanced temporal response. Meanwhile, WOA-GRU-LSTM maintains relatively consistent performance (left( {overline{E} = – 0.33 , W} right)), median = − 0.64 W), characterized by small-magnitude underestimations at 9:00 (left( {overline{{e_{t} }} = – 9.03 , W} right)) and 10:00 (left( {overline{{e_{t} }} = – 9.86 , W} right)), and overall demonstrates a controlled residual profile with reduced volatility.
The residual analysis reveals distinct temporal error patterns across both arrays. In Array 1, the highest residual values were consistently recorded at 8:00 and 16:00, with WOA-GRU-LSTM peaking at 31.80 W and PSO-GRU-LSTM reaching 31.37 W, respectively. These spikes coincide with transitional irradiance periods (early morning ramp-up and late-day decline), where prediction volatility is most pronounced. In Array 2, although residuals are generally lower, 10:00 and 16:00 emerge as common error peaks, with OSA-GRU-LSTM reaching 13.50 W at 16:00. These findings underscore the influence of temporal irradiance dynamics on model performance and suggest that monocrystalline panels offer greater electrical stability under fluctuating solar conditions. Across both arrays, the FHO-GRU-LSTM model demonstrates superior forecasting reliability, particularly when residual consistency and central tendency are prioritized. However, its relative underperformance in Array 2 during high-variance periods indicates that local irradiance dynamics may impact optimization efficacy. WOA-GRU-LSTM, despite lower average accuracy in Array 1, proves more resilient in Array 2, likely due to its adaptive balance between exploration and exploitation within the optimization landscape. Notably, Array 2 exhibits a more uniform and lower residual distribution, which aligns with its superior RMSE and MAE values across models. The hybrid models reveal unique error signatures shaped by their respective optimization algorithms.
Table 6 presents a comprehensive summary of the optimized hyperparameter configurations for each hybrid model across two different PV arrays, highlighting the role of meta-heuristic algorithms in tuning critical parameters such as dropout rates, learning rates, batch sizes, and training epochs for both GRU and LSTM components.
In Array 1, the FHO-GRU-LSTM model demonstrated the most balanced and effective parameter configuration. It converged at 57 and 231 epochs for GRU and LSTM, respectively, with dropout rates of 0.1794 for GRU and 0.0953 for LSTM. These values suggest a well-calibrated regularization scheme that preserves model generalization while mitigating overfitting. Additionally, the model employed a consistent learning rate of 0.04546 for both GRU and LSTM, enabling stable and efficient optimization. A moderate batch size of 58 and a validation epoch count of only 39 further underscore the model’s convergence efficiency, suggesting it reached an optimal state with minimal computational overhead. In contrast, the GWO-GRU-LSTM model required the longest training duration, with 400 epochs for LSTM convergence. While the dropout rate of 0.0982 introduced a reasonable level of regularization, the extended training cycle reflects the global search behavior characteristic of the GWO, which prioritizes exploration over rapid convergence.
The OSA-GRU-LSTM model achieved convergence at 320 epochs for LSTM but utilized an exceptionally low dropout rate of 0.0040, indicating a configuration geared toward minimizing training error at the expense of regularization. This approach could potentially increase the risk of overfitting, particularly under volatile data conditions. Meanwhile, the PSO-GRU-LSTM model converged efficiently at 83 epochs for GRU and 286 epochs for LSTM, with an extremely low dropout rate of 0.0010. This combination reflects a highly stable yet potentially rigid learning dynamic that may not generalize well across more complex datasets. Notably, the WOA-GRU-LSTM model exhibited the fastest convergence, requiring only 200 epochs for LSTM while utilizing minimal dropout rates of 0.0100 (GRU) and 0.0060 (LSTM). While this suggests a highly optimized training process, the minimal use of dropout raises concerns regarding its ability to generalize beyond the training set.
In Array 2, the models exhibited greater variability in optimization dynamics, likely due to differences in PV array characteristics. The GWO-GRU-LSTM and OSA-GRU-LSTM models applied notably higher dropout rates to LSTM units (0.23933 and 0.23112, respectively), enforcing strong regularization but necessitating prolonged training durations of 400 and 282 epochs. These configurations reflect an attempt to combat potential overfitting arising from more complex or noisy input signals but at the cost of extended training. The PSO-GRU-LSTM maintained a moderate dropout rate (0.1000 for LSTM) and adopted a higher batch size of 65, indicating a relatively stable training regime. However, its moderate performance in Array 2 suggests that such conservative settings may limit adaptability to different PV environments. In the case of WOA-GRU-LSTM, the GRU component was configured with a zero dropout rate, an atypical decision that may accelerate convergence (310 epochs) but raises significant overfitting concerns. The lack of GRU regularization could impair the model’s performance when subjected to unseen data, undermining its reliability. The FHO-GRU-LSTM model once again achieved a balanced configuration in Array 2, preserving the consistent learning rate of 0.04546 across both GRU and LSTM. This reflects the optimizer’s robustness and its capacity to adapt effectively across varying input conditions. In contrast, the GWO-GRU-LSTM and OSA-GRU-LSTM models applied exceptionally small learning rates for GRU (0.00240 and 0.02714, respectively), suggesting overly cautious gradient updates that may prolong convergence and reduce sensitivity to new patterns in the input data.
Several overarching trends emerge across both PV arrays. While learning rates and batch sizes remained relatively stable, dropout rates varied considerably and were key determinants of model behavior, influencing convergence duration and generalization strength. The FHO and GWO algorithms introduced stronger regularization effects in Array 2, with GWO achieving the greatest reduction in overfitting via LSTM dropout. OSA demonstrated adaptive tuning of GRU dropout, PSO consistently maintained convergence stability, and WOA offered the most rapid convergence but at the cost of potentially compromised generalization due to minimal regularization.
Overall, the FHO-GRU-LSTM model consistently outperformed the other configurations across all error metrics in both arrays, demonstrating its effectiveness in balancing convergence speed, stability, and prediction accuracy. Although it is regarded as the best-performing approach, its optimization performance remains sensitive to the defined hyperparameter search range, which, if inadequately specified, may lead to suboptimal results. This dependency underscores a potential limitation in the model’s adaptability to different datasets or operational conditions without careful tuning. These findings reinforce the strategic importance of selecting optimization algorithms that are well-aligned with the structural complexity and data characteristics of hybrid DL models.
The optimization trajectories of the five meta-heuristic algorithms (FHO, GWO, OSA, PSO, and WOA) are depicted in Fig. 11a and Fig. 11b for PV Arrays 1 and 2, respectively. These objective function curves capture the dynamic progression of error minimization over 40 iterations, providing critical insights into each algorithm’s convergence behavior, search efficacy, and robustness in navigating the solution space of the hybrid GRU-LSTM model.
Plotting of objective function curve for (a) Array 1 and (b) Array 2.
In the case of Array 1, depicted in Fig. 11a, the FHO algorithm demonstrates the most efficient and consistent convergence pattern. The objective function value declines steadily from an initial 2.5722 × 103 to a final 2.5191 × 103 by iteration 39, reflecting not only rapid convergence but also minimal fluctuations throughout the process. This trend indicates FHO’s strong exploitation capability and its ability to maintain focus on a promising region of the solution space once identified. Furthermore, the smooth and monotonic descent in the error curve highlights the stability and reliability of FHO in tuning hyperparameters effectively without suffering from premature convergence or oscillations. The GWO also exhibits commendable convergence characteristics, initiating at 2.6191 × 103 and gradually minimizing the objective value to 2.5288 × 103. Although GWO descent is marginally slower than that of FHO, it maintains a relatively consistent decline with limited volatility, suggesting a balance between exploration and exploitation that aids in reaching near-optimal solutions.
In contrast, the OSA begins at a relatively high and stagnant plateau (~ 2.5450 × 103) with a near-flat error curve through the early iterations, only showing meaningful reduction towards iteration 40, ultimately reaching 2.5727 × 103. This slow decline suggests that OSA may exhibit inertia in the early search phase, requiring a longer adaptation period to identify promising regions of the search space. The PSO algorithm, characterized by social learning and velocity-based position updates, displays early convergence, stabilizing around 2.5202 × 103. Despite its fast stabilization, the PSO-GRU-LSTM model maintains an error level slightly above that of FHO and GWO, indicating that while PSO effectively exploits its initial solution neighborhood, it may converge prematurely and lack the global search strength necessary to discover superior optima in later stages. The WOA demonstrates a distinctive trend. Though WOA records the lowest error across most of the iteration range (~ 2.5390 × 103), it does so with minimal oscillation, suggesting consistent optimization pressure. However, the modest reduction in the objective function indicates a more gradual convergence pace. WOA’s ability to sustain low error levels throughout the iterations reflects a stable optimization pattern, likely attributed to its spiral updating mechanism, which emphasizes local search while maintaining diversity.
Objective curve depicted in Fig. 11b for Array 2, the convergence dynamics become more pronounced due to increased input variability and the complexity of forecasting patterns associated with a different PV configuration. FHO-GRU-LSTM again shows a solid downward trajectory, reducing the objective function from 2.7835 × 103 to 2.7321 × 103 by iteration 37, then stabilizing. This pattern display clear indication of convergence and reliable performance under changing data conditions. Its adaptability across both arrays confirms the robustness of the FHO strategy in different forecast contexts. GWO-GRU-LSTM exhibits an even sharper convergence in Array 2, starting at 2.7207 × 103 and reducing the error to 2.6865 × 103 by iteration 29, after which it maintains a flat trend. This accelerated decline compared to Array 1 suggests improved exploitation in response to the problem’s complexity and confirms the optimizer’s flexibility and learning capacity.
The OSA-GRU-LSTM initially underperformed in Array 1, shows better gradient responsiveness in Array 2 by reducing the error from 2.7440 × 103 to 2.6760 × 103 by iteration 36. This improvement indicates that OSA search efficiency may be context-sensitive, gaining advantage under different data distributions or hyperparameter landscapes. PSO-GRU-LSTM achieves rapid convergence, minimizing the error from 2.7080 × 103 to 2.7052 × 103 by iteration 4 and then plateauing early. While this swift convergence highlights strong local search capacity, the negligible improvement afterward implies premature convergence and limited global search potential, making it less effective in scenarios requiring deeper exploration. WOA-GRU-LSTM, beginning at 2.7740 × 103, reduces to 2.6830 × 103 by iteration 36, maintaining a steady decline similar to OSA but achieving lower final error values. This reflects WOA’s methodical search pattern and reliable convergence, albeit at a slower pace compared to more aggressive optimizers like GWO.
Collectively, these optimization curves elucidate critical performance distinctions among the algorithms. FHO consistently achieves the best trade-off between convergence speed, error minimization, and stability across both arrays, reinforcing its suitability for hybrid model tuning in solar power forecasting. GWO exhibits strong convergence and generalization capability, particularly in dynamic data settings. OSA and WOA display moderate but consistent performance, with better adaptation in later iterations. PSO offers fast convergence but is constrained by early stagnation, which may hinder performance in more complex or irregular search landscapes. These findings underscore the pivotal role of algorithm-specific dynamics in hyperparameter tuning for hybrid DL models. The interplay between convergence speed, solution quality, and error stability must be carefully balanced, and the superior performance of FHO across distinct PV arrays positions it as a highly effective optimization strategy for temporal forecasting models in renewable energy domains.
In addition to validating the optimization strategy under constrained settings, the findings emphasize its operational relevance. The FHO-GRU-LSTM model’s ability to maintain high accuracy and stable convergence with minimal computational overhead highlights its suitability for deployment in real-time energy management systems, smart inverters, and edge computing platforms. Its consistent performance across both PV arrays reinforces its adaptability to diverse system configurations and environmental conditions. By demonstrating robust forecasting under limited resource settings, the proposed framework offers a scalable and practical solution for solar power prediction in both urban and rural grid-connected applications.
Table 7 summarizes the validation of the proposed FHO-GRU-LSTM model against several state-of-the-art solar power forecasting approaches.
Lin et al.37 proposed a hybrid, serial/sequential model for PV power forecasting, using Improved Moth-Flame Optimization (IMFO) to tune SVM parameters. Despite achieving a high R2 of 0.9962, the lack of MAE reporting limits precision assessment, and the Cauchy mutation led to premature convergence. The study used Time-based Framing, but the forecasting Technique was not specified, leaving gaps in temporal modeling clarity. Zhou et al.38 employed a hybrid EMD–SCA–LSTM framework, achieving an R2 of 0.9210, RMSE of 528.30 W, and MAE of 306.30 W. The forecasting strategy follows a recursive technique, and optimization was explicitly handled via the Sine Cosine Algorithm (SCA). Despite leveraging signal decomposition and meta-heuristics, the substantial residual errors suggest limited capacity to model nonlinear temporal dependencies, likely due to suboptimal LSTM architecture or insufficient tuning of recursive dynamics.
Abou Houran et al.39 introduced a hybrid serial CNN–LSTM architecture, optimized via the Cuckoo Optimization Algorithm (COA). Employing sequence framing and a recursive forecasting strategy, the model achieved an R2 of 0.9832, RMSE of 14.00 kW, and MAE of 17.40 kW. While COA facilitated robust hyperparameter exploration, the elevated error metrics observed in larger-scale systems suggest susceptibility to overfitting and limited convergence refinement, underscoring the need for enhanced generalization strategies. Herrera et al.40 implemented a Bayesian Optimization Algorithm (BOA) to calibrate a standalone LSTM architecture, yielding highly competitive performance metrics with an R2 of 0.9945, RMSE of 14.50 kW, and MAE of 11.70 kW. The model leveraged a sliding window strategy during data preprocessing and adopted a direct forecasting approach for day-ahead photovoltaic power prediction. While BOA facilitated efficient hyperparameter tuning, the method’s dependence on surrogate modeling and prior distributional assumptions may compromise generalizability under noisy or non-stationary temporal regimes.
In comparison, the FHO-GRU-LSTM model demonstrated superior forecasting accuracy across all evaluated metrics and system configurations. For the Poly-crystalline system, the model achieved an R2 of 0.9964, RMSE of 28.13 W, and MAE of 19.36 W, corresponding to reductions of approximately 47% in RMSE and 45 percent in MAE relative to COA-CNN-LSTM, and dramatic improvements compared to EMD-SCA-LSTM. For the Mono-crystalline system, the R2 increased to 0.9966, while RMSE and MAE were further reduced to 12.45 W and 9.39 W, respectively, representing reductions of 14% in RMSE and 20% in MAE compared to the BOA-optimized model. These results highlight not only superior predictive accuracy but also a remarkable ability to generalize to different PV system types, despite the smaller system scale of 3.175 kW.
The performance gains of FHO-GRU-LSTM can be attributed to the strategic incorporation of the FHO algorithm for hyperparameter optimization. Unlike conventional optimizers, FHO dynamically balances exploration and exploitation through adaptive step sizes and stochastic prey evasion mechanisms, enabling the model to avoid local minima and converge efficiently. Consequently, the proposed framework captures nonlinear and temporal dependencies more effectively than IMFO, SCA, COA, or BOA-based approaches. Overall, this comparative analysis demonstrates that FHO-GRU-LSTM not only achieves higher accuracy but also provides greater robustness, scalability, and practical applicability, establishing a clear methodological and performance advantage over existing solar power forecasting models.
This study addresses a significant gap in solar power forecasting by introducing a novel hybrid DL framework optimized via the FHO metaheuristic algorithm. The model employs a sequential hybrid architecture, where training is guided by time-based temporal indexing and incorporates a recursive forecasting strategy. In constrast to conventional hybrid models and standard optimization techniques, this approach leverages the synergistic capabilities of a GRU-LSTM hybrid model and the FHO’s enhanced global search efficiency, effectively addressing the complex non-linearities inherent in solar energy data collected from the tropical rainforest climate of Malaysia.
The findings reveal that the proposed model achieves exceptional predictive performance, with R2 exceeding 0.996 for multiple PV arrays. Notably, the model yielded substantial error reductions, including a 22.37% decrease in MAE and a 12.67% reduction in RMSE for Array 1, alongside 24.52 and 23.29% reductions in MAE and RMSE, respectively, for Array 2. These results underscore the critical role of hyperparameter optimization in enhancing the robustness and generalization capacity of DL models, particularly when integrated with advanced metaheuristic algorithms such as FHO.
The proposed FHO-GRU-LSTM framework significantly enhances solar power forecasting by combining a sequential GRU–LSTM architecture with the global search efficiency of the FHO metaheuristic. Designed to capture complex non-linear patterns in tropical irradiance data, the model demonstrates strong predictive performance and architectural synergy, making it suitable for broader energy forecasting applications. Beyond its technical merits, the framework shows promise for integration into both utility-scale and distributed grid systems. Its modular design and high accuracy support potential extension to multi-source environments, including wind and hybrid PV–storage systems. These capabilities align with global efforts to improve grid reliability, accelerate renewable energy adoption, and strengthen system resilience under variable climatic conditions.
While the results are encouraging, several limitations remain. The model was validated using data from a tropical rainforest climate, which may limit generalizability to other regions. Its sensitivity to hyperparameter tuning could also pose challenges for operational deployment. Although the simulations were successfully executed on a standard personal computer, higher-specification systems may be required for large-scale or real-time applications to ensure consistent performance. Real-time feasibility at utility scale has yet to be validated. Furthermore, the framework currently operates independently of SCADA or EMS platforms, and future work could explore integration pathways with grid management systems to enhance scalability and operational relevance.
Future research will extend validation across diverse climatic contexts and PV system configurations to systematically evaluate robustness and scalability. Efforts will also focus on integrating the optimized framework into real-time energy management systems to support dynamic grid scheduling and demand-response capabilities. To mitigate residual spikes observed during transitional irradiance periods, future work may explore adaptive temporal weighting and auxiliary meteorological inputs to enhance model responsiveness. Additionally, adaptive hyperparameter tuning strategies such as dynamic search ranges, Bayesian optimization, or hybrid metaheuristic–probabilistic methods have been reported in the broader optimization literature as effective for improving convergence efficiency. While not implemented in this study, such approaches may offer complementary perspectives for advancing solar forecasting optimization. Longer-term directions may include assessing deployment feasibility in grid-connected scenarios, exploring responsible AI safeguards, and conducting techno-economic evaluations to support sustainable, region-specific energy planning.
The datasets used and/or analysed during the current study available from the corresponding author on reasonable request.
Ant colony optimization
Artificial intelligent
Artificial neural networks
Autoregressive integrated moving average
Bidirectional-long short-term memory
Bayesian optimization algorithm
Complete ensemble empirical mode decomposition with adaptive noise
Convolutional neural network
Cuckoo optimization algorithm
Deep learning
Deep neural network
Chaos game optimization
Extreme learning machine
Evolutionary mating algorithm
Ensemble of regression trees
Extremely randomized trees classification
Evaporation-based water cycle algorithm
Fire Hawks
Fire Hawk optimization
Gaussian process regression
Gated recurrent unit
Grey wolf optimization
Integrated iterative filtering
Improved moth firefly optimization
Improved mountain gazelle optimizer
Long short-term memory
Mean absolute percentage error
Mono-crystalline
Multi-layer feedforward neural network
Multi-kernel
Machine learning
Multi-layer perceptron
Mean relative error
Mean square error
Normalised mean square error
Normalized root mean square
Numerical weather prediction
Owl search algorithm
Poly-crystalline
Power electronic and renewable energy laboratory
Particle swarm optimization
Coefficient of determination
Renewable energy
Root mean square error
Recurrent neural network
Random vector functional link neural network
Sine cosine algorithm
Solar energy
Sparrow search algorithm
Salp swarm algorithm
Support vector machine
Support vector regression
Thin-film
Variational mode decomposition
Whale optimization algorithm
Extreme gradient boosting
Wen, L., Zhou, K., Yang, S. & Lu, X. Optimal load dispatch of community microgrid with deep learning based solar power and load forecasting. Energy 171, 1053–1065. https://doi.org/10.1016/j.energy.2019.01.075 (2019).
Article Google Scholar
Alami, A. H. et al. Management of potential challenges of PV technology proliferation. Sustain. Energy Technol. Assess. 51, 101942. https://doi.org/10.1016/j.seta.2021.101942 (2022).
Article Google Scholar
Liu, L., Xiao, Y. & Yang, J. Daily optimization of maintenance routing and scheduling in a large-scale photovoltaic power plant with time-varying output power. Appl. Energy 360, 122793. https://doi.org/10.1016/j.apenergy.2024.122793 (2024).
Article Google Scholar
Tian, J., Ooka, R. & Lee, D. Multi-scale solar radiation and photovoltaic power forecasting with machine learning algorithms in urban environment: A state-of-the-art review. J. Clean. Prod. 426, 139040. https://doi.org/10.1016/j.jclepro.2023.139040 (2023).
Article Google Scholar
Saini, K. K., Sharma, P., Mathur, H. D., Gautam, A. R. & Bansal, R. C. Techno-economic and reliability assessment of an off-grid solar-powered energy system. Appl. Energy 371, 123579. https://doi.org/10.1016/j.apenergy.2024.123579 (2024).
Article Google Scholar
Chen, L. et al. Machine learning methods in weather and climate applications: A survey. Appl. Sci. 13, 12019. https://doi.org/10.3390/app132112019 (2023).
Article CAS Google Scholar
Zhou, Y., Liu, Y., Wang, D., Liu, X. & Wang, Y. A review on global solar radiation prediction with machine learning models in a comprehensive perspective. Energy Convers. Manage. 235, 113960. https://doi.org/10.1016/j.enconman.2021.113960 (2021).
Article Google Scholar
Marweni, M. et al. Forecasting of solar irradiance and power in uncertain photovoltaic systems using BiLSTM and Bayesian optimization. Arab. J. Sci. Eng. https://doi.org/10.1007/s13369-024-09818-5 (2024).
Article Google Scholar
Zhu, C. et al. Innovative approaches to solar energy forecasting: unveiling the power of hybrid models and machine learning algorithms for photovoltaic power optimization. J. Supercomput. 81, 20. https://doi.org/10.1007/s11227-024-06504-z (2024).
Article Google Scholar
Heidari, A. A. et al. Harris Hawks optimization: Algorithm and applications. Futur. Gener. Comput. Syst. 97, 849–872. https://doi.org/10.1016/j.future.2019.02.028 (2019).
Article Google Scholar
Bouzerdoum, M., Mellit, A. & Massi Pavan, A. A hybrid model (SARIMA–SVM) for short-term power forecasting of a small-scale grid-connected photovoltaic plant. Solar Energy 98, 226–235 (2013). https://doi.org/10.1016/j.solener.2013.10.002.
Konstantinou, M., Peratikou, S. & Charalambides, A. G. Solar photovoltaic forecasting of power output using LSTM networks. Atmosphere 12, 124. https://doi.org/10.3390/atmos12010124 (2021).
Article ADS Google Scholar
Wang, X., Sun, Y., Luo, D. & Peng, J. Comparative study of machine learning approaches for predicting short-term photovoltaic power output based on weather type classification. Energy 240, 122733. https://doi.org/10.1016/j.energy.2021.122733 (2022).
Article Google Scholar
Guermoui, M., Bouchouicha, K., Bailek, N. & Boland, J. W. Forecasting intra-hour variance of photovoltaic power using a new integrated model. Energy Convers. Manag. 245, 114569. https://doi.org/10.1016/j.enconman.2021.114569 (2021).
Article Google Scholar
Agga, A., Abbou, A., Labbadi, M. & El Houm, Y. Short-term self consumption PV plant power production forecasts based on hybrid CNN-LSTM ConvLSTM models. Renew. Energy 177, 101–112. https://doi.org/10.1016/j.renene.2021.05.095 (2021).
Article Google Scholar
Akhter, M. N. et al. An hour-ahead PV power forecasting method based on an RNN-LSTM model for three different PV plants. Energies 15, 2243. https://doi.org/10.3390/en15062243 (2022).
Article Google Scholar
Rai, A., Shrivastava, A. & Jana, K. C. Differential attention net: Multi-directed differential attention based hybrid deep learning model for solar power forecasting. Energy 263, 125746. https://doi.org/10.1016/j.energy.2022.125746 (2023).
Article Google Scholar
Wu, S., Guo, H., Zhang, X. & Wang, F. Short-term photovoltaic power prediction based on CEEMDAN and hybrid neural networks. IEEE J. Photovoltaics 14, 960–969. https://doi.org/10.1109/JPHOTOV.2024.3453651 (2024).
Article Google Scholar
Stoean, C. et al. Metaheuristic-based hyperparameter tuning for recurrent deep learning: application to the prediction of solar energy generation. Axioms 12, 266. https://doi.org/10.3390/axioms12030266 (2023).
Article Google Scholar
Sanjari, M. J., Gooi, H. B. & Nair, N. K. C. Power generation forecast of hybrid PV–wind system. IEEE Trans. Sustain. Energy 11, 703–712. https://doi.org/10.1109/TSTE.2019.2903900 (2020).
Article ADS Google Scholar
Majumder, I., Dash, P. K. & Bisoi, R. Short-term solar power prediction using multi-kernel-based random vector functional link with water cycle algorithm-based parameter optimization. Neural Comput. Appl. 32, 8011–8029. https://doi.org/10.1007/s00521-019-04290-x (2020).
Article Google Scholar
Tahir, M. F., Yousaf, M. Z., Tzes, A., El Moursi, M. S. & El-Fouly, T. H. M. Enhanced solar photovoltaic power prediction using diverse machine learning algorithms with hyperparameter optimization. Renew. Sustain. Energy Rev. 200, 114581. https://doi.org/10.1016/j.rser.2024.114581 (2024).
Article Google Scholar
Aprillia, H., Yang, H.-T. & Huang, C.-M. Short-term photovoltaic power forecasting using a convolutional neural network-salp swarm algorithm. Energies 13, 1879. https://doi.org/10.3390/en13081879 (2020).
Article Google Scholar
Netsanet, S., Zheng, D., Zhang, W. & Teshager, G. Short-term PV power forecasting using variational mode decomposition integrated with Ant colony optimization and neural network. Energy Rep. 8, 2022–2035. https://doi.org/10.1016/j.egyr.2022.01.120 (2022).
Article Google Scholar
Akhter, M. N. et al. A hybrid deep learning method for an hour ahead power output forecasting of three different photovoltaic systems. Appl. Energy 307, 118185. https://doi.org/10.1016/j.apenergy.2021.118185 (2022).
Article Google Scholar
Peng, T. et al. An intelligent hybrid approach for photovoltaic power forecasting using enhanced chaos game optimization algorithm and Locality sensitive hashing based Informer model. J. Build. Eng. 78, 107635. https://doi.org/10.1016/j.jobe.2023.107635 (2023).
Article ADS Google Scholar
Kothona, D., Panapakidis, I. P. & Christoforidis, G. C. Day-ahead photovoltaic power prediction based on a hybrid gradient descent and metaheuristic optimizer. Sustain. Energy Technol. Assess. 57, 103309. https://doi.org/10.1016/j.seta.2023.103309 (2023).
Article Google Scholar
Eseye, A. T., Zhang, J. & Zheng, D. Short-term photovoltaic solar power forecasting using a hybrid Wavelet-PSO-SVM model based on SCADA and Meteorological information. Renew. Energy 118, 357–367. https://doi.org/10.1016/j.renene.2017.11.011 (2018).
Article Google Scholar
Ridha, H. M. et al. A novel prediction of the PV system output current based on integration of optimized hyperparameters of multi-layer neural networks and polynomial regression models. Next Energy 8, 100256. https://doi.org/10.1016/j.nxener.2025.100256 (2025).
Article Google Scholar
Souhe, F. G. Y., Mbey, C. F., Kakeu, V. J. F., Meyo, A. E. & Boum, A. T. Optimized forecasting of photovoltaic power generation using hybrid deep learning model based on GRU and SVM. Electr. Eng. 106, 7879–7898. https://doi.org/10.1007/s00202-024-02492-8 (2024).
Article Google Scholar
Zameer, A. et al. Short-term solar energy forecasting: Integrated computational intelligence of LSTMs and GRU. PLoS ONE 18, e0285410. https://doi.org/10.1371/journal.pone.0285410 (2023).
Article PubMed PubMed Central CAS Google Scholar
Khan, S. et al. Comparative analysis of deep neural network architectures for renewable energy forecasting: enhancing accuracy with meteorological and time-based features. Discover Sustain. 5, 533. https://doi.org/10.1007/s43621-024-00783-5 (2024).
Article ADS Google Scholar
Mishra, M., Byomakesha Dash, P., Nayak, J., Naik, B. & Kumar Swain, S. Deep learning and wavelet transform integrated approach for short-term solar PV power prediction. Measurement 166, 108250. https://doi.org/10.1016/j.measurement.2020.108250 (2020).
Article Google Scholar
Azizi, M., Talatahari, S. & Gandomi, A. H. Fire Hawk Optimizer: a novel metaheuristic algorithm. Artificial Intelligence Review 56, 287–363 (2023). https://doi.org/10.1007/s10462-022-10173-w
Mudhsh, M. et al. Modelling of thermo-hydraulic behavior of a helical heat exchanger using machine learning model and fire Hawk optimizer. Case Stud. Ther. Eng. 49, 103294. https://doi.org/10.1016/j.csite.2023.103294 (2023).
Article Google Scholar
K․ K․, N., N․ S․, J. & Jadoun, V. Risk-based dynamic pricing by metaheuristic optimization approach for electric vehicle charging infrastructure powered by grid integrated microgrid system. Electric Power Systems Research 230, 110250 (2024). https://doi.org/10.1016/j.epsr.2024.110250.
Lin, G.-Q. et al. An improved moth-flame optimization algorithm for support vector machine prediction of photovoltaic power generation. J. Clean. Prod. 253, 119966. https://doi.org/10.1016/j.jclepro.2020.119966 (2020).
Article Google Scholar
Zhou, N.-R., Zhou, Y., Gong, L.-H. & Jiang, M.-L. Accurate prediction of photovoltaic power output based on long short-term memory network. IET Optoelectron. 14, 399–405. https://doi.org/10.1049/iet-opt.2020.0021 (2020).
Article Google Scholar
Abou Houran, M., Salman Bukhari, S. M., Zafar, M. H., Mansoor, M. & Chen, W. COA-CNN-LSTM: Coati optimization algorithm-based hybrid deep learning model for PV/wind power forecasting in smart grid applications. Appl. Energy 349, 121638. https://doi.org/10.1016/j.apenergy.2023.121638 (2023).
Article Google Scholar
Herrera Casanova, R. & Conde, A. Enhancement of LSTM models based on data pre-processing and optimization of Bayesian hyperparameters for day-ahead photovoltaic generation prediction. Comput. Electr. Eng. 116, 109162. https://doi.org/10.1016/j.compeleceng.2024.109162 (2024).
Article Google Scholar
Download references
Power Electronics and Renewable Energy Research Laboratory (PEARL), Department of Electrical Engineering, Faculty of Engineering, Universiti Malaya, 50603, Kuala Lumpur, Malaysia
Putri Nor Liyana Mohamad Radzi & Saad Mekhilef
School of Engineering, Swinburne University of Technology, Hawthorn, VIC, 3122, Australia
Saad Mekhilef & Mehdi Seyedmahmoudian
Department of Electrical Engineering, Faculty of Engineering, Universiti Malaya, 50603, Kuala Lumpur, Malaysia
Noraisyah Mohamed Shah
Department of Electrical Engineering, Rachna College of Engineering and Technology (A Constituent College of University of Engineering and Technology Lahore), Gujranwala, 52250, Pakistan
Muhammad Naveed Akhter
Curtin Singapore, Curtin University, Singapore, Singapore
Alex Stojcevski
PubMed Google Scholar
PubMed Google Scholar
PubMed Google Scholar
PubMed Google Scholar
PubMed Google Scholar
PubMed Google Scholar
Conceptualization, Putri Nor Liyana Mohamad Radzi,; Methodology, Putri Nor Liyana Mohamad Radzi, and Muhammad Naveed Akhter,; Software, Putri Nor Liyana Mohamad Radzi,; Validation, Putri Nor Liyana Mohamad Radzi, Saad Mekhilef., Noraisyah Mohamed Shah, and Muhammad Naveed Akhter, ; Formal analysis, Putri Nor Liyana Mohamad Radzi,; Investigation, Putri Nor Liyana Mohamad Radzi,; Resources, Saad Mekhilef,; Data curation, Putri Nor Liyana Mohamad Radzi,; Writing—original draft preparation, Putri Nor Liyana Mohamad Radzi,; Writing— review and editing, Putri Nor Liyana Mohamad Radzi, Saad Mekhilef, Noraisyah Mohamed Shah, Muhammad Naveed Akhter, Mehdi Seyedmahmoudian, and Alex Stojcevski,; Visualization, Putri Nor Liyana Mohamad Radzi,; Supervision, Saad Mekhilef, and Noraisyah Mohamed Shah; Project administration, Saad Mekhilef.
Correspondence to Putri Nor Liyana Mohamad Radzi or Alex Stojcevski.
The authors declare no competing interests.
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
Reprints and permissions
Mohamad Radzi, P., Mekhilef, S., Mohamed Shah, N. et al. Optimizing solar power forecasting with metaheuristic algorithms and deep learning models for photovoltaic grid connected systems. Sci Rep 15, 40045 (2025). https://doi.org/10.1038/s41598-025-23822-1
Download citation
Received:
Accepted:
Published:
Version of record:
DOI: https://doi.org/10.1038/s41598-025-23822-1
Anyone you share the following link with will be able to read this content:
Sorry, a shareable link is not currently available for this article.
Provided by the Springer Nature SharedIt content-sharing initiative
Advertisement
Scientific Reports (Sci Rep)
ISSN 2045-2322 (online)
© 2026 Springer Nature Limited
Sign up for the Nature Briefing: AI and Robotics newsletter — what matters in AI and robotics research, free to your inbox weekly.