Enhanced Forecasting Accuracy of a Grid-Connected Photovoltaic Power Plant: A Novel Approach Using Hybrid Variational Mode Decomposition and a CNN-LSTM Model

: Renewable energies have become pivotal in the global energy landscape. Their adoption is crucial for phasing out fossil fuels and promoting environmentally friendly energy solutions. In recent years, the energy management system (EMS) concept has emerged to manage the power grid. EMS optimizes electric grid operations through advanced metering, automation, and communication technologies. A critical component of EMS is power forecasting, which facilitates precise energy grid scheduling. This research paper introduces a deep learning hybrid model employing convolutional neural network–long short-term memory (CNN-LSTM) for short-term photovoltaic (PV) solar energy forecasting. The proposed method integrates the variational mode decomposition (VMD) algorithm with the CNN-LSTM model to predict PV power output from a solar farm in Boussada, Algeria, spanning 1 January 2019, to 31 December 2020. The performance of the developed model is benchmarked against other deep learning models across various time horizons (15, 30, and 60 min): variational mode decomposition–convolutional neural network (VMD-CNN), variational mode decomposition–long short-term memory (VMD-LSTM), and convolutional neural network– long short-term memory (CNN-LSTM), which provide a comprehensive evaluation. Our findings demonstrate that the developed model outperforms other methods, offering promising results in solar power forecasting. This research contributes to the primary goal of enhancing EMS by providing accurate solar energy forecasts.


Introduction
Over the past few decades, the world has witnessed an increase in global energy needs, accompanied by an increase in the integration of renewable energy sources (RESs) into electric power grids.The increasing daily usage of RESs has limited the ability to manage traditional power systems effectively [1].To adapt to this challenge, a new concept called the energy management system (EMS) has emerged as a solution for managing the power grid.The EMS is crucial in guiding operational decisions within power grids, facilitating efficient energy supply and demand management between distributable generators and loads.By harnessing the benefits of economical energy storage [2], the EMS ensures fair compensation for adaptability while promoting the utilization of RESs.This strategic approach aligns with environmental and economic goals, emphasizing sustainability and optimal resource allocation.Within the framework of the research project that we seek to develop, the authors put forward an intelligent energy management system (IEMS) architecture that aims to manage energy from the demand side, considering renewable resources.An artificial intelligence (AI) approach is employed in the proposed architecture to predict the future energy output of each energy source.The IEMS negotiates the available power, and control actions are prioritized according to the device's consumer based on the predicted information.The main focus of the current study is to develop an AI approach for forecasting the output power of photovoltaic (PV) systems.This task is challenging due to its high dependence on meteorological conditions, which are subject to frequent fluctuations.Using new methods to overcome these challenges is essential for accurate results.Thus far, several researchers and developers have given AI approaches substantial consideration for forecasting solar systems' output power.
In recent decades, considerable focus has been placed on machine learning (ML)-based approaches, which have attracted significant attention.Various techniques, such as support vector machine (SVM) [3] and k-nearest neighbors (kNN) [4], have been implemented within the machine learning framework to achieve accurate predictions.Although these ML algorithms have several advantages, such as their reasonable and simple architecture, they still need to be more efficient than deep learning (DL) algorithms, which use a complex neural network structure to learn data and patterns [5].Recently, deep learning methods have increasingly become the focus for predicting time series data.Many works on various DL methods for forecasting solar power have been published in the literature.Some examples of these approaches include the gated recurrent unit (GRU) [6], the long shortterm memory network (LSTM) [7][8][9][10], and the convolutional neural network (CNN) [11][12][13].
The primary aim of this research is to explore the application of advanced ML techniques in developing and enhancing a DL model that integrates the variational mode decomposition method with the convolutional neural network-long short-term memory (CNN-LSTM) neural network.This model is specifically designed to predict the PV power output of a solar plant in Boussada City.
The key contributions of this study are outlined as follows: • Proposing a novel hybrid model combining the VMD algorithm with the CNN-LSTM architecture for PV power forecasting, marking the first initiative to explore such a hybrid model for these specific tasks.

•
Conducting a comparative analysis against various DL models, including VMD-CNN, VMD-LSTM, and CNN-LSTM, to assess the precision and performance enhancement attributed to the unique integration of CNN, LSTM, and VMD components.

•
Effectively utilizing actual data from the solar PV farm, ensuring the practical applicability of our forecasting approach to real-world applications in energy management systems.
The subsequent sections of the paper are organized in the following manner: Section 2 offers a comprehensive literature review, highlighting key studies and developments in solar power forecasting using DL techniques.Section 3 describes the dataset and elaborates on the data-processing techniques employed, alongside providing theoretical backgrounds for VMD, the hybrid CNN-LSTM model, and the proposed method's framework.Section 4 details the experimental results, comparing the performance of the developed VMD-CNN-LSTM neural network against the aforementioned models across different time horizons and seasons.Finally, Section 5 highlights the research findings and provides a comprehensive summary of the study results and valuable insights into the effectiveness of the hybrid VMD-CNN-LSTM model in accurately predicting solar power generation.

Literature Review
Deep learning (DL) algorithms have gained increasing attention in recent years due to their proficiency in handling complex datasets and the progress made in computational power.Unlike machine learning models, DL algorithms exhibit robustness when presented with novel datasets, as slight changes to the input will not impact the initial hypothesis learned by the model.Various architectures of artificial neural networks (ANNs) have proven effective for predicting renewable energy outputs.
Several studies have explored the application of ANN models for solar radiation and PV system forecasting.Abdelaziz Rabehi et al. [14] conducted a comparative study examining the effectiveness of the multi-layer perceptron (MLP), boosted decision tree (BDT), and a hybrid model integrating these with linear regression (LR) for daily global solar irradiation forecasts.Their analysis, focusing on key statistical measures, revealed that the MLP model outperformed the other models, demonstrating superior performance with a normalized root mean square error (nRMSE) of 0.033 and a coefficient of determination (R 2 ) value of 97.7%.In another study, Moreira et al. [15] utilized a novel approach by integrating experimental techniques with an ANN to forecast weekly output from photovoltaic systems.They applied the design of experiments (DOE) methodology to examine both the photovoltaic data series and the variables influencing the ANN, followed by a cluster analysis to pinpoint the most efficient network configuration.The outcomes of their study highlighted the model's precision, achieving an impressive forecast accuracy with a weekly average absolute percentage error of 4.7%.Jebli et al. [16] developed a multi-layer perceptron model integrated with the clear sky index for classifying environmental factors.They enhanced solar PV output power predictions by optimizing the MLP's weights using the artificial bee colony algorithm.This approach proved superior to linear models due to solar power output's intermittent and random nature, showcasing the effectiveness of nonlinear forecasting in this context.
While ANN algorithms are adept at modeling intricate relationships within data, they lag in leveraging long-term and short-term historical dependencies [5].These dependencies relate to the ANN's capability to recognize and retain behavioral patterns from the distant and recent past.Recurrent neural networks (RNNs) were introduced to address this issue.However, RNNs encountered a significant problem called the vanishing gradient, limiting their usefulness [17].Long short-term memory (LSTM)-type RNNs emerged in 1997 as a solution to this issue, owing to their memory units in network cells [17].Several studies have explored the application of LSTM neural networks and their variants for solar power and PV forecasting.In [7], Liu et al. presented a solar power forecasting technique that utilizes a simplified LSTM neural network on distributed energy resources.Their findings indicated that LSTM demonstrated superior accuracy compared to MLP models.Akhter et al. [8] developed a deep learning methodology employing RNN alongside LSTM frameworks for forecasting PV output power.This methodology was compared against established regression techniques, and the adaptive neuro-fuzzy inference system (ANFIS) was integrated with machine learning strategies, demonstrating improved forecasting precision.The research in [9] compared four LSTM architectural variants-vanilla, stacked, encoderdecoder, and bidirectional long short-term memory (BiLSTM) models-within the context of PV power prediction one hour in advance.This evaluation highlighted the superior accuracy of the BiLSTM architecture, affirming its efficacy over the other architectures.An innovative study [10] introduced a model combining LSTM and self-attention mechanisms to enhance PV power generation forecasting, utilizing actual data from a Japanese building.This model outperformed traditional methods by effectively leveraging weather forecast data, demonstrating significant improvements in prediction accuracy across various time frames, with a notable increase in the coefficient of determination for both short-term and long-term forecasts.
Convolutional neural networks (CNNs) have gained recognition as a key solution for addressing the challenge of PV energy prediction due to their strong nonlinear recognition abilities.Several studies have explored the application of CNNs in this domain.In [11], Suresh et al. proposed a CNN methodology for accurate short-term forecasting.The proposed approach contained two distinct architectures, namely multi-headed CNN and CNN-LSTM, which leveraged data-preprocessing techniques.The input variables utilized for forecasting included solar irradiance, PV module temperature, ambient temperature, and wind speed.The work published in [12] introduced SolarNet architecture, a deep CNN model designed to forecast one-hour-ahead global horizontal irradiance (GHI) using sky images, eliminating the need for numerical measurements.Through an end-to-end learning approach across 20 layers of convolutional, max-pooling, and fully connected layers, SolarNet, tested over six years of data, outperformed benchmark models, resulting in an nRMSE value of 8.85%, showcasing its superior performance across diverse weather conditions.In their research, Heo et al. [13] constructed a multi-channel CNN model to estimate PV output power, leveraging solar radiation data along with four other meteorological parameters, yielding accurate predictive outcomes.This approach assigned equal weighting to all five input parameters to forecast PV power despite the differing degrees of influence that solar radiation and other meteorological factors may exert.
To address the limitations of single LSTM or CNN models and leverage their respective strengths for improved prediction efficacy, many researchers have proposed integrating CNN and LSTM models for forecasting solar energy.A hybrid model presented in the study [18] incorporates both LSTM and CNN architectures, and the paper highlights the model's effectiveness by utilizing a dataset obtained from Rabat, Morocco, which represents real-world conditions.The CNN-LSTM architecture demonstrated superior performance compared to conventional ML techniques and single DL models in terms of prediction accuracy and stability, which was evidenced by the evaluation of error metrics such as mean absolute error (MAE), mean absolute percentage error (MAPE), and root mean square error (RMSE).The study referenced as [19] introduced two hybrid models, namely CNN-LSTM and convolutional LSTM (ConvLSTM), as improved approaches for power production prediction in a PV plant.These models were compared against an LSTM model, which served as the baseline for comparison.The model was trained using two datasets: one consisting of a single variable representing historical output power and another consisting of many variables, including weather-related factors.The hybrid models, spanning forecasting time horizons from one day to one week, demonstrated superior accuracy compared to the standard LSTM model.This underscores the advantages of incorporating diverse data features in PV power production forecasting, emphasizing the efficacy of hybrid approaches for achieving enhanced predictive performance.In a prominent study, Alharkan et al. [20] introduced a novel deep learning framework (DSCLANet), which integrates a dual-stream CNN-LSTM network with a self-attention mechanism.This model employs LSTM to extract temporal dynamics and CNN for spatial pattern recognition.The synthesized spatial and temporal feature vectors are subsequently merged, with the most informative features being selected through a selfattention technique for advanced analysis.In their research paper, BouHouran et al. [21] proposed a proficient method for short-term forecasting of wind and solar power, utilizing the coati optimization algorithm (COA) in conjunction with a CNN-LSTM architecture, based on data gathered from the Chinese State Grid in 2021.This COA-CNN-LSTM configuration reported an nRMSE of 3.9%, a normalized mean absolute error (nMAE) of 2.1%, and an R 2 of 0.9829 across eight locations.
As the field advances, cutting-edge research introduces even more advanced DL models for solar energy forecasting, leveraging complex architectures for increased accuracy.Phan et al. [22] proposed a transformer deep learning model for one-hour-ahead PV power generation forecasting, leveraging two years of numerical weather prediction (NWP) data from Taiwan's Central Weather Bureau and PV output from North Taiwan sites.This model notably surpasses traditional ANN, LSTM, and GRU models in accuracy metrics like nRMSE and normalized mean absolute percentage error (nMAPE), highlighting its effectiveness amidst the challenges posed by solar energy's dependency on fluctuating weather conditions and day/night cycles.Lopez Santos et al. [23] conducted an evaluative study contrasting the performance of the temporal fusion transformer (TFT) model against several predictive algorithms, including the autoregressive integrated moving average (ARIMA), LSTM, MLP, and extreme gradient boosting (XGBoost) algorithms, in forecasting hourly PV generation during daylight hours.The outcomes of their investigation highlighted the TFT model's superior predictive capability over the compared models.In their paper [24], Wu et al. proposed a hybrid model CNN-Informer for PV power prediction.This approach combines a CNN for feature extraction with the Informer model, a transformer-based architecture.The CNN extracts relevant features from the input data, and its outputs are then integrated with the inputs to the Informer model.The CNN-Informer model can capture temporal correlations within the historical data by exploiting information source modeling techniques, thus improving PV power forecasting accuracy.

Data Collection
The database used in this study is sourced from a photovoltaic (PV) plant located in Boussada, a central-eastern city in Algeria known for its partly desert climate.The PV plant has a capacity of 10 megawatts.Data collection spanned from 1 January 2019, to 31 December 2020, with measurements taken at fifteen-minute intervals, counting 69,195 data points.The dataset contains parameters such as PV panel temperature, tilt radiation, total radiation, direct radiation, humidity, and PV power, as listed in Table 1.

Parameters Values Range
Panel temperature ( evaluative study contrasting the performance of the temporal fusion transformer (TFT) model against several predictive algorithms, including the autoregressive integrated moving average (ARIMA), LSTM, MLP, and extreme gradient boosting (XGBoost) algorithms, in forecasting hourly PV generation during daylight hours.The outcomes of their investigation highlighted the TFT model's superior predictive capability over the compared models.In their paper [24], Wu et al. proposed a hybrid model CNN-Informer for PV power prediction.This approach combines a CNN for feature extraction with the Informer model, a transformer-based architecture.The CNN extracts relevant features from the input data, and its outputs are then integrated with the inputs to the Informer model.The CNN-Informer model can capture temporal correlations within the historical data by exploiting information source modeling techniques, thus improving PV power forecasting accuracy.

Data Collection
The database used in this study is sourced from a photovoltaic (PV) plant located in Boussada, a central-eastern city in Algeria known for its partly desert climate.The PV plant has a capacity of 10 megawa s.Data collection spanned from 1 January 2019, to 31 December 2020, with measurements taken at fifteen-minute intervals, counting 69,195 data points.The dataset contains parameters such as PV panel temperature, tilt radiation, total radiation, direct radiation, humidity, and PV power, as listed in Table 1.

Data Processing
The raw data derived from PV power databases often exhibit inconsistencies due to varied factors such as equipment degradation and system processing errors.Addressing these issues is essential to ensure the reliability of the predictive models built upon these data.In this work, we encountered missing values and outliers within the dataset.Two approaches were employed to address these issues.In most cases, missing values were replaced by the temporal average, derived from values recorded immediately before and after the missing values.In scenarios where the outliers skewed the dataset considerably, the data point was deleted to maintain the integrity of the analysis.For this study, power values were exclusively recorded during daytime hours, from 6 AM to 6 PM, because of the negligible power generation recorded during nighttime hours in PV systems.Considering the previous points, the database contains in final 33,465 samples.We employed the minmax normalization method to optimize the model's performance and ensure homogeneity within the dataset.This process transforms each data point, ensuring values range from 0 to 1.For a given value x, its normalized value x norm is calculated as follows: Such normalization serves multiple purposes: speeding up the optimization solution of the model, minimizing the disparity between the highest and lowest values, removing the influence dimensions, and reducing the calculation amount.

Variational Mode Decomposition (VMD)
The PV power output is subject to time-variant and often nonlinear variations.These fluctuations are primarily influenced by factors like solar irradiance, temperature, etc.For a deep analysis of these fluctuations, the time series data of PV power output can be decomposed into simpler components.The empirical mode decomposition (EMD) is a notable method for this purpose.Introduced in [25], EMD is widely applied for handling nonstationary and nonlinear time series.It decomposes a time series into a set of intrinsic mode functions (IMFs).However, EMD is known for limitations like sensitivity to noise and sampling [26].To address some of these limitations, VMD was proposed by Dragomiretskiy and Zosso in 2014 [26].This algorithm is designed explicitly for nonstationary and nonlinear time series.VMD optimizes the decomposition process using an alternating direction method of multipliers approach, significantly enhancing its performance in signal decomposition [26].Contrary to the EMD, VMD systematically decomposes the original signal into distinct IMFs, each representing different frequency components.This structured approach, particularly in reducing sensitivity to noise, makes VMD a more robust choice for analyzing complex time series data like PV power data.The VMD algorithm decomposes an original signal f (t) into K intrinsic mode functions, as represented by Equation (2): where variables A k (t) and ϕ k (t) represent the amplitude and phase functions of time t, respectively, and the computation in VMD involves solving a bandwidth-constrained problem, where all modes' number k and center frequency ω k are initialized. (3) where ∂ t represents the derivative with respect to the time variable t, and the function u k (t) denotes the k th mode associated with the center frequency ω k .The term corresponding to δ(t) is the real component of u k (t).An enhanced Lagrange multiplier, represented by λ, is utilized to mitigate the minimization of the objective function.This enables the integration of the constraint into a cohesive function L.
Energies 2024, 17, 1781 where α represents a penalty parameter that is utilized to guarantee the precision of the reconstructed signal; on the other hand, λ(t) denotes the time-varying Lagrange multiplier.The CNN is a specialized artificial neural network that is commonly utilized in image recognition and classification.One of its most important strengths is its sparse connectivity and weight-sharing characteristics [27].Unlike traditional neural networks, CNNs incorporate specialized layers such as convolutional and pooling layers.The convolutional layer applies convolution operations, extracting the spatial characteristics of features from the input.On the other hand, the pooling layers help reduce the spatial dimensions, keeping the essential information intact and aiding in computational efficiency.The extracted features are then fed into a fully connected layer, where the network predicts the final output values based on the learned representations, as shown in Figure 2.
denotes the kth mode associated with the center frequency ωk.The term corresponding to δ(t) is the real component of uk(t).
An enhanced Lagrange multiplier, represented by λ, is utilized to mitigate the minimization of the objective function.This enables the integration of the constraint into a cohesive function L.
where α represents a penalty parameter that is utilized to guarantee the precision of the reconstructed signal; on the other hand, λ(t) denotes the time-varying Lagrange multiplier.

Convolutional Neural
Network-Long Short-Term Memory (CNN-LSTM) The CNN is a specialized artificial neural network that is commonly utilized in image recognition and classification.One of its most important strengths is its sparse connectivity and weight-sharing characteristics [27].Unlike traditional neural networks, CNNs incorporate specialized layers such as convolutional and pooling layers.The convolutional layer applies convolution operations, extracting the spatial characteristics of features from the input.On the other hand, the pooling layers help reduce the spatial dimensions, keeping the essential information intact and aiding in computational efficiency.The extracted features are then fed into a fully connected layer, where the network predicts the final output values based on the learned representations, as shown in Figure 2. Transitioning to a variant, 1D-CNNs can also be effectively utilized for processing one-dimensional sequential data, making them suitable for tasks involving natural language processing, audio signal processing, and, notably, time series analysis.Within the architecture of a 1D-CNN, both the convolutional kernel and the input data sequence are one-dimensional.This design choice ensures the kernel moves along a singular dimension, efficiently capturing local pa erns and intricate dependencies within sequential data.The following equations summarize how the one-dimensional convolution layers work.Transitioning to a variant, 1D-CNNs can also be effectively utilized for processing one-dimensional sequential data, making them suitable for tasks involving natural language processing, audio signal processing, and, notably, time series analysis.Within the architecture of a 1D-CNN, both the convolutional kernel and the input data sequence are one-dimensional.This design choice ensures the kernel moves along a singular dimension, efficiently capturing local patterns and intricate dependencies within sequential data.The following equations summarize how the one-dimensional convolution layers work.
where y (l) j is the output of the j-th feature map at layer l. t l−1 i is the output from the i-th feature map at layer l−1 (i.e., the previous layer's output).w (l) j is the weight (or filter/kernel) associated with the j-th feature map at layer l. b (l) j is the bias term for the j-th feature map at layer l. ⊕ indicates the convolution operation.This process enables the network to extract essential elements, facilitating the development of important representations from the input sequence.One-dimensional convolutional neural networks (1D-CNNs) provide intrinsic efficiency in capturing temporal dependencies.This attribute is fundamental in several fields, such as predicting energy consumption and detecting faults in power systems.

Long Short-Term Memory (LSTM)
Recently, neural networks have become popular in time-series forecasting tasks due to their ability to model complex relationships.However, traditional neural networks struggle to handle dependencies in historical data efficiently.Recurrent neural networks (RNNs), which utilize network loops to incorporate information from previous time steps, were introduced to address this issue.While RNNs can handle short-term dependencies, they face challenges with long-term dependencies due to problems like gradient explosion and vanishing gradient.To overcome these challenges, Hochreiter and Schmidhuber initially proposed the LSTM network [18].This neural network has a specialized architecture that automatically stores and removes temporal state information.This capability allows them to capture complex relationships in short and long time-series while solving the vanishing gradient problem.
The LSTM model consists of memory cells, as depicted in Figure 3.The memory block comprises three primary components: the input gate, the forget gate, and the output gate.In essence, each of the gates has a specific function.
nel) associated with the j-th feature map at layer l.
( ) is the bias term for the j-th feature map at layer l. ⊕ indicates the convolution operation.
This process enables the network to extract essential elements, facilitating the development of important representations from the input sequence.One-dimensional convolutional neural networks (1D-CNNs) provide intrinsic efficiency in capturing temporal dependencies.This a ribute is fundamental in several fields, such as predicting energy consumption and detecting faults in power systems.

Long Short-Term Memory (LSTM)
Recently, neural networks have become popular in time-series forecasting tasks due to their ability to model complex relationships.However, traditional neural networks struggle to handle dependencies in historical data efficiently.Recurrent neural networks (RNNs), which utilize network loops to incorporate information from previous time steps, were introduced to address this issue.While RNNs can handle short-term dependencies, they face challenges with long-term dependencies due to problems like gradient explosion and vanishing gradient.To overcome these challenges, Hochreiter and Schmidhuber initially proposed the LSTM network [18].This neural network has a specialized architecture that automatically stores and removes temporal state information.This capability allows them to capture complex relationships in short and long time-series while solving the vanishing gradient problem.
The LSTM model consists of memory cells, as depicted in Figure 3.The memory block comprises three primary components: the input gate, the forget gate, and the output gate.In essence, each of the gates has a specific function.


The input gate controls which parts of the new information will be stored in the cell state.


The forget gate controls which parts of the cell state will be thrown away.


The output gate computes the cell's output and sends it to the next cell in the chain.The equations below represent the mathematical representation of the network layer's memory cell update at each time step t.The vector of the input sequence at time • The input gate controls which parts of the new information will be stored in the cell state.• The forget gate controls which parts of the cell state will be thrown away.
• The output gate computes the cell's output and sends it to the next cell in the chain.
The equations below represent the mathematical representation of the network layer's memory cell update at each time step t.The vector of the input sequence at time step t is denoted x t , whereas the hidden layer value of the memory cell at time step t is denoted h t .The candidate, current, and preceding cell states are denoted g t , c t , and c t−1 , respectively.Firstly, the input and forget vector gates are computed in the following manner: Energies 2024, 17, 1781 9 of 21 The computation of the candidate and current cell states is performed as follows: Ultimately, the computation of the output gate's value and the memory cell's output value is given as follows:

Framework of the Proposed Method
The proposed PV solar power forecasting method is based primarily on the CNN-LSTM hybrid model, as depicted in Figure 4.
The computation of the candidate and current cell states is performed as follows: Ultimately, the computation of the output gate's value and the memory cell's output value is given as follows:

Framework of the Proposed Method
The proposed PV solar power forecasting method is based primarily on the CNN-LSTM hybrid model, as depicted in Figure 4.The methodology is built upon three pivotal stages: (1) input data preparation, (2) forecasting model design, and (3) proposed model evaluation throughout a comprehensive comparison.To enhance forecasting precision, historical PV power data are decomposed using VMD, decomposing the data into diverse feature scales.This decomposition results in five intrinsic mode functions (IMFs), as illustrated in Figure 5.The methodology is built upon three pivotal stages: (1) input data preparation, (2) forecasting model design, and (3) proposed model evaluation throughout a comprehensive comparison.To enhance forecasting precision, historical PV power data are decomposed using VMD, decomposing the data into diverse feature scales.This decomposition results in five intrinsic mode functions (IMFs), as illustrated in Figure 5.
Upon completing this decomposition, these IMFs are combined with the meteorological parameters (panel temperature, tilt radiation, total radiation, direct radiation, and humidity), as listed in Table 1, to serve as input data.The sliding window technique is used on these combined data, alongside the target PV power variable, as demonstrated in Figure 6, where a fixed 24-step window slides over the time series, a value chosen based on trials.Each window's data become the input, while the subsequent PV power value is the target output.Upon completing this decomposition, these IMFs are combined with the meteorological parameters (panel temperature, tilt radiation, total radiation, direct radiation, and humidity), as listed in Table 1, to serve as input data.The sliding window technique is used on these combined data, alongside the target PV power variable, as demonstrated in Figure 6, where a fixed 24-step window slides over the time series, a value chosen based on trials.Each window's data become the input, while the subsequent PV power value is the target output.Upon completing this decomposition, these IMFs are combined with the meteorological parameters (panel temperature, tilt radiation, total radiation, direct radiation, and humidity), as listed in Table 1, to serve as input data.The sliding window technique is used on these combined data, alongside the target PV power variable, as demonstrated in Figure 6, where a fixed 24-step window slides over the time series, a value chosen based on trials.Each window's data become the input, while the subsequent PV power value is the target output.The core CNN-LSTM model, visualized in Figure 7, is a sequence of two CNN layers, one LSTM layer, and two fully connected layers.The model processes ten input variables, encompassing the five dataset features (panel temperature, tilt radiation, total radiation, direct radiation, and humidity) and the five IMFs.The dual convolutional layers in the model, with 96 and 128 kernels, respectively, focus on feature extraction, while the 60-neuron LSTM layer captures temporal dependencies.The architecture concludes with two fully connected layers of 128 and 1 output neuron, respectively.For model training, we utilized 30,094 data instances; in contrast, 3344 samples were reserved for model testing.
direct radiation, and humidity) and the five IMFs.The dual convolutional layers in the model, with 96 and 128 kernels, respectively, focus on feature extraction, while the 60neuron LSTM layer captures temporal dependencies.The architecture concludes with two fully connected layers of 128 and 1 output neuron, respectively.For model training, we utilized 30,094 data instances; in contrast, 3344 samples were reserved for model testing.

Case Study
Through this section, we seek to comprehensively evaluate the reliability of the developed VMD-CNN-LSTM model over different prediction time horizons, which include 15 min, 30 min, and 60 min.
The comparative analysis is designed to evaluate the performance of the VMD-CNN-LSTM model with three other neural network configurations: VMD-LSTM, VMD-CNN, and the standalone CNN-LSTM.This selection serves a twofold purpose.Firstly, it aims to unveil the impact of VMD in enhancing predictive decision making capabilities.This is achieved by comparing the performance of the VMD-CNN-LSTM model against the standalone CNN-LSTM model.The second objective is to explore the advantages of combining CNN and LSTM architectures in scenarios requiring accurate predictions.To this end, the analysis compares the results of the VMD-CNN-LSTM model with both the VMD-LSTM and VMD-CNN models.
The experiments were conducted using the Keras library in Python 3.9.13version, using a laptop equipped with a 2.70 GHz Intel Core i7-7500U CPU and 8 GB DDR4 RAM.The training approach employed the Huber loss function, optimized using the Adam optimizer.The most effective model configuration was obtained through a process of trial and error, ultimately resulting in a batch size of 128, a learning rate of 0.0001, and a maximum of 100 epochs.An early stopping technique was incorporated to enhance the model's generalization capabilities and prevent overfi ing.
To evaluate the models' forecasting performances, four distinct error metrics were used: mean absolute error (MAE) [28], root mean square error (RMSE) [28], normalized root mean square error (nRMSE) [29], and the coefficient of determination (R 2 ) [30].These metrics are crucial for a nuanced understanding of each model's strengths and weaknesses.

Case Study
Through this section, we seek to comprehensively evaluate the reliability of the developed VMD-CNN-LSTM model over different prediction time horizons, which include 15 min, 30 min, and 60 min.
The comparative analysis is designed to evaluate the performance of the VMD-CNN-LSTM model with three other neural network configurations: VMD-LSTM, VMD-CNN, and the standalone CNN-LSTM.This selection serves a twofold purpose.Firstly, it aims to unveil the impact of VMD in enhancing predictive decision making capabilities.This is achieved by comparing the performance of the VMD-CNN-LSTM model against the standalone CNN-LSTM model.The second objective is to explore the advantages of combining CNN and LSTM architectures in scenarios requiring accurate predictions.To this end, the analysis compares the results of the VMD-CNN-LSTM model with both the VMD-LSTM and VMD-CNN models.
The experiments were conducted using the Keras library in Python 3.9.13version, using a laptop equipped with a 2.70 GHz Intel Core i7-7500U CPU and 8 GB DDR4 RAM.The training approach employed the Huber loss function, optimized using the Adam optimizer.The most effective model configuration was obtained through a process of trial and error, ultimately resulting in a batch size of 128, a learning rate of 0.0001, and a maximum of 100 epochs.An early stopping technique was incorporated to enhance the model's generalization capabilities and prevent overfitting.
To evaluate the models' forecasting performances, four distinct error metrics were used: mean absolute error (MAE) [28], root mean square error (RMSE) [28], normalized root mean square error (nRMSE) [29], and the coefficient of determination (R 2 ) [30].These metrics are crucial for a nuanced understanding of each model's strengths and weaknesses.
In this context, the variable y i represents the current value of the observation, ŷi represents the predicted value, and y represents the mean of the current observed values.Additionally, n denotes the number of samples used for evaluation.

Experimental Studies and Results
This section presents and discusses the outcomes of four PV power forecasting models, namely (VMD-LSTM, VMD-CNN, VMD-CNN-LSTM, and CNN-LSTM).The experiments were conducted for different forecasting horizons: one step (15 min), two steps (30 min), and fourth steps ahead (60 min).Error metrics (RMSE, MAE, NRMSE, and R 2 ) for each model and time horizon are shown in Table 2.The 1-step-ahead forecasting results, as presented in Table 2, Figures 8 and 9, highlight the superior performance of the VMD-CNN-LSTM model when compared to the VMD-LSTM, VMD-CNN, and standalone CNN-LSTM models.In terms of prediction accuracy, the VMD-CNN-LSTM model achieved the lowest MAE value of 60.5 kW, outperforming the VMD-LSTM (115.26 kW), VMD-CNN (77.12 kW), and CNN-LSTM (160.36 kW) models.This superior accuracy is further underscored by the model's RMSE value of 96.04 kW and nRMSE of 2.2%, making it the most proficient among all models evaluated.Regarding the R 2 metric, the VMD-CNN-LSTM model slightly edged out the other algorithms with an R2 value of 99.8%, followed by VMD-CNN (99.7%),VMD-LSTM (99.2%), and CNN-LSTM (99.0%).These findings collectively highlight the VMD-CNN-LSTM model's capability of achieving accurate forecasting results and ensuring dependable outcomes for 1-step-ahead predictions.
Energies 2024, 17, x FOR PEER REVIEW 13 of 22 and CNN-LSTM (99.0%).These findings collectively highlight the VMD-CNN-LSTM model's capability of achieving accurate forecasting results and ensuring dependable outcomes for 1-step-ahead predictions.The results provided in Table 2, Figures 16 and 17, related to the 4-steps-ahead prediction again confirmed the effectiveness of the VMD-CNN-LSTM approach.In terms of the MAE metric, the VMD-CNN-LSTM model demonstrated superior performance with the lowest error value of 115.17 kW.In comparison, the CNN-LSTM model produced an error value of 276.41 kW, while the VMD-LSTM and VMD-CNN models reported error values of 138.29 kW and 156.26 kW, respectively.The effectiveness of VMD-CNN-LSTM remained evident in the assessment of RMSE and nRMSE, achieving errors of 160.31 kW and 3.7%, respectively.The results provided in Table 2, Figures 16 and 17, related to the 4-steps-ahead prediction again confirmed the effectiveness of the VMD-CNN-LSTM approach.In terms of the MAE metric, the VMD-CNN-LSTM model demonstrated superior performance with the lowest error value of 115.17        Regarding the R 2 metric, the VMD-CNN-LSTM model achieved a score of 99.6%, demonstrating exceptional performance, closely followed by the VMD-LSTM model with a value of 99.4%, the VMD-CNN model with a score of 99.2%, and the CNN-LSTM model with a value of 96.6%.Overall, the evaluation of the previous metrics confirms the superiority of VMD-CNN-LSTM in providing coherent and reliable forecasts for the 4-step horizon ahead.
Figures 18 and 19 illustrate the predictive capabilities of the four evaluated algorithms in forecasting solar power generation four steps ahead, focusing on two distinct days characterized by cloudy and sunny weather conditions, respectively.Regarding the R 2 metric, the VMD-CNN-LSTM model achieved a score of 99.6%, demonstrating exceptional performance, closely followed by the VMD-LSTM model with a value of 99.4%, the VMD-CNN model with a score of 99.2%, and the CNN-LSTM model with a value of 96.6%.Overall, the evaluation of the previous metrics confirms the superiority of VMD-CNN-LSTM in providing coherent and reliable forecasts for the 4-step horizon ahead.
Figures 18 and 19 illustrate the predictive capabilities of the four evaluated algorithms in forecasting solar power generation four steps ahead, focusing on two distinct days characterized by cloudy and sunny weather conditions, respectively.The preceding findings demonstrated a distinct advantage of the suggested approach compared to the other methods across all time horizons due to its reliance on a precise architecture that can deal with instantaneous fluctuations in solar energy data.The VMD-CNN-LSTM algorithm's superiority, put simply, can be a ributed to the following factors: Regarding the R 2 metric, the VMD-CNN-LSTM model achieved a score of 99.6%, demonstrating exceptional performance, closely followed by the VMD-LSTM model with a value of 99.4%, the VMD-CNN model with a score of 99.2%, and the CNN-LSTM model with a value of 96.6%.Overall, the evaluation of the previous metrics confirms the superiority of VMD-CNN-LSTM in providing coherent and reliable forecasts for the 4-step horizon ahead.
Figures 18 and 19 illustrate the predictive capabilities of the four evaluated algorithms in forecasting solar power generation four steps ahead, focusing on two distinct days characterized by cloudy and sunny weather conditions, respectively.The preceding findings demonstrated a distinct advantage of the suggested approach compared to the other methods across all time horizons due to its reliance on a precise architecture that can deal with instantaneous fluctuations in solar energy data.The VMD-CNN-LSTM algorithm's superiority, put simply, can be a ributed to the following factors:


VMD preprocessing: VMD is adept at extracting intrinsic modes in data.This be- The preceding findings demonstrated a distinct advantage of the suggested approach compared to the other methods across all time horizons due to its reliance on a precise architecture that can deal with instantaneous fluctuations in solar energy data.The VMD-CNN-LSTM algorithm's superiority, put simply, can be attributed to the following factors: • VMD preprocessing: VMD is adept at extracting intrinsic modes in data.This becomes especially important in solar energy predictions, where the input signals can be nonstationary or possess multiple modalities.VMD simplifies the task for the subsequent layers by addressing such complexities during preprocessing.• The 1D-CNN advantage: 1D-CNNs are fine-tuned for handling sequential data, per- fectly aligning with the time series nature of data.Their expertise rests in efficiently identifying specific temporal trends.In solar energy prediction, capturing short-term patterns, such as variations in solar irradiance, becomes pivotal.• The LSTM advantage: While LSTM models are widely recognized for effectively retaining and utilizing information related to long-term dependencies, their real strength is their proficiency in modeling sequential data.Even for short-term forecasts, the ability of LSTMs to incorporate information from previous time steps can be useful.
They capture the flow of data, which can be crucial for solar forecasts.
• The hybrid approach: The integration of VMD, 1D-CNN, and LSTM techniques allows their respective functionalities to be combined into a unified methodology.With the complexity simplified by VMD, 1D-CNN identification of local patterns, and LSTM's ability to incorporate information from past time steps, the model can address the diverse challenges inherent in solar forecasting.
To evaluate the performance and efficiency of the proposed deep learning architectures, various metrics were analyzed, including model complexity, as measured by the number of learnable parameters and prediction time.The comparative analysis is presented in Table 3.The proposed algorithm VMD-CNN-LSTM exhibited the lowest model complexity among the evaluated models, with 80,977 learnable parameters.Furthermore, it achieved the thirdlowest prediction time of 0.50 s.Conversely, the VMD-CNN neural network possessed the shortest prediction time of 0.11 s, albeit with the highest model complexity, with 224,545 learnable parameters.These findings suggest that the proposed approach strikes an optimal balance between prediction performance, model complexity, and prediction time, potentially offering a viable choice for practical applications.Furthermore, in addition to the abovementioned comparison, the different models were again evaluated in the context of the year's four seasons.This comparison provides empirical evidence supporting the suggested model's robustness and higher performance than alternative methods.The findings of this comparative analysis are displayed in Table 4 and Figure 20.Despite the inherent variability in seasonal data features, encompassing diverse environmental conditions, the proposed algorithm consistently demonstrated excellent levels of accuracy.The error rates across seasons exhibited a consistent pattern, suggesting no bias towards any particular seasonal data.These results, in conjunction with the forecast results illustrated in Figures 10, 11, 14, 15, 18 and 19, which were obtained under different climatic conditions (cloudy day/sunny day), confirm the robustness of the proposed VMD-CNN-LSTM approach.The consistent performance across varying seasonal and environmental conditions highlights the algorithm's ability to generalize effectively, which is essential for practical applications.

Conclusions
With the impressive implementation of solar power in modern grids, the main challenge is their unstable power generation, which is mainly affected by metrological conditions.Consequently, there is a growing demand for precise photovoltaic (PV) power generation prediction to enhance their seamless integration into a smart grid.
This paper introduces a hybrid convolutional neural network-long short-term memory (CNN-LSTM) model to forecast the PV power generation from a solar farm in Boussada, Algeria.The proposed approach leverages the strengths of both CNNs' and LSTMs' neural networks and the variational mode decomposition (VMD) algorithm to enhance forecasting accuracy.The PV output power data were initially decomposed using the VMD technique.This decomposition generated several frequency bands, each representing a power subseries within the historical time series.The power subseries were concatenated with the metrological parameters and fed as input to the hybrid CNN-LSTM neural network.The model performance is benchmarked against other deep learning models (VMD-CNN, VMD-LSTM, CNN-LSTM) across various time horizons to provide a comprehensive evaluation.
The experimental results were divided into prediction horizons of 15 min, 30 min, and 60 min ahead.The results showed the clear superiority of the proposed method, achieving the lowest RMSE and MAE values of 96.04 kW and 60.50 kW for the one-step forecast, followed by the VMD-CNN model with an RMSE and MAE value of 116.68 kW and 77.12 kW.The same scenario was also observed for the two-step and four-step pre-forecast horizons.When analyzing the seasonal results, it is evident that the VMD-CNN-LSTM model yielded appropriate outcomes across all seasons without exhibiting any bias towards a particular season.
Overall, the proposed hybrid model demonstrates enhanced precision in short-term PV power forecasting and can meet the requirements of real-world systems.The future contributions of this study will delve into the exploration of the following areas:

•
Investing in more robust data collection methods, including diverse metrological conditions and geographic locations, can improve model accuracy and applicability.

•
Practical incorporation into an existing energy management system by addressing real-world challenges such as variable data flows, system integration complexities, and operational constraints.

Figure 1
Figure 1 illustrates the seasonal distribution of PV power for 2019 and 2020.Winter shows the highest average photovoltaic energy production, peaking at 5265.0 kilowatts.Spring and summer also exhibit stable energy outputs, while autumn reflects consistent efficiency, indicating effective energy capture from the farm across all seasons.

Figure 1
Figure 1 illustrates the seasonal distribution of PV power for 2019 and 2020.Winter shows the highest average photovoltaic energy production, peaking at 5265.0 kilowa s.Spring and summer also exhibit stable energy outputs, while autumn reflects consistent efficiency, indicating effective energy capture from the farm across all seasons.

Figure 1 .
Figure 1.Seasonal distribution of the PV plant output power.Figure 1. Seasonal distribution of the PV plant output power.

Figure 1 .
Figure 1.Seasonal distribution of the PV plant output power.Figure 1. Seasonal distribution of the PV plant output power.

Figure 3 .
Figure 3.The internal architecture of an LSTM cell.

Figure 3 .
Figure 3.The internal architecture of an LSTM cell.

Figure 4 .
Figure 4.The overall architecture of the proposed forecasting method.

Figure 4 .
Figure 4.The overall architecture of the proposed forecasting method.

Figure 5 .
Figure 5.The five sub-power components obtained from the VMD.

Figure 6 .
Figure 6.Input and output data sequences.

Figure 5 .
Figure 5.The five sub-power components obtained from the VMD.

Figure 5 .
Figure 5.The five sub-power components obtained from the VMD.

Figure 6 .
Figure 6.Input and output data sequences.Figure 6. Input and output data sequences.

Figure 6 .
Figure 6.Input and output data sequences.Figure 6. Input and output data sequences.

FiguresFigure 10 .
Figures 10 and 11 illustrate the predictive capabilities of the four evaluated algorithms in forecasting solar power generation a single step ahead, focusing on two distinct days characterized by cloudy and sunny weather conditions, respectively.Energies 2024, 17, x FOR PEER REVIEW 14 of 22

Figures 14 and 15
Figures 14 and 15 illustrate the predictive capabilities of the four evaluated algorithms in forecasting solar power generation two steps ahead, focusing on two distinct days characterized by cloudy and sunny weather conditions, respectively.

Figures 14 and 15
Figures 14 and 15 illustrate the predictive capabilities of the four evaluated algorithms in forecasting solar power generation two steps ahead, focusing on two distinct days characterized by cloudy and sunny weather conditions, respectively.

Figures 14 and 15
Figures 14 and 15 illustrate the predictive capabilities of the four evaluated algorithms in forecasting solar power generation two steps ahead, focusing on two distinct days characterized by cloudy and sunny weather conditions, respectively.The results provided in Table2, Figures16 and 17, related to the 4-steps-ahead prediction again confirmed the effectiveness of the VMD-CNN-LSTM approach.In terms of the MAE metric, the VMD-CNN-LSTM model demonstrated superior performance with the lowest error value of 115.17 kW.In comparison, the CNN-LSTM model produced an error value of 276.41 kW, while the VMD-LSTM and VMD-CNN models reported error values of 138.29 kW

Figures 14 and 15
Figures 14 and 15 illustrate the predictive capabilities of the four evaluated algorithms in forecasting solar power generation two steps ahead, focusing on two distinct days characterized by cloudy and sunny weather conditions, respectively.
kW.In comparison, the CNN-LSTM model produced an error value of 276.41 kW, while the VMD-LSTM and VMD-CNN models reported error values of 138.29 kW and 156.26 kW, respectively.The effectiveness of VMD-CNN-LSTM remained evident in the assessment of RMSE and nRMSE, achieving errors of 160.31 kW and 3.7%, respectively.

Figure 20 .
Figure 20.Error metrics' comparison for 1-step-ahead forecasting in different seasons.(a) Winter; (b) spring; (c) summer; and (d) autumn.The comprehensive evaluation of RMSE, MAE, and nRMSE metrics yielded insightful results for each season.For autumn, the RMSE, MAE, and nRMSE were recorded at 110.82 kW, 72.72 kW, and 2.5%, respectively, indicating a precise predictive capability during this season.The winter season displayed similar precision, with RMSE and MAE values at 111.54 kW and 73.09 kW, while the nRMSE is 2.5%.For spring, the model sustained this level of accuracy, with an RMSE of 112.48 kW, MAE of 73.09 kW, and an nRMSE of 2.6%.The model excelled in the summer, demonstrating the lowest error

Table 3 .
Comparing the prediction times and complexities of models.

Table 4 .
Performance metric forecast results for the different seasons.