Next Article in Journal
Exploring the Impact of the NULL Class on In-the-Wild Human Activity Recognition
Next Article in Special Issue
Photovoltaic Power Injection Control Based on a Virtual Synchronous Machine Strategy
Previous Article in Journal
Dynamic Validation of Calibration Accuracy and Structural Robustness of a Multi-Sensor Mobile Robot
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Forecasting a Short-Term Photovoltaic Power Model Based on Improved Snake Optimization, Convolutional Neural Network, and Bidirectional Long Short-Term Memory Network

College of Information and Electrical Engineering, Shenyang Agricultural University, Shenyang 110866, China
*
Author to whom correspondence should be addressed.
Sensors 2024, 24(12), 3897; https://doi.org/10.3390/s24123897
Submission received: 21 May 2024 / Revised: 12 June 2024 / Accepted: 14 June 2024 / Published: 16 June 2024
(This article belongs to the Special Issue Advances in Sensor Technologies for Microgrid and Energy Storage)

Abstract

:
The precision of short-term photovoltaic power forecasts is of utmost importance for the planning and operation of the electrical grid system. To enhance the precision of short-term output power prediction in photovoltaic systems, this paper proposes a method integrating K-means clustering: an improved snake optimization algorithm with a convolutional neural network–bidirectional long short-term memory network to predict short-term photovoltaic power. Firstly, K-means clustering is utilized to categorize weather scenarios into three categories: sunny, cloudy, and rainy. The Pearson correlation coefficient method is then utilized to determine the inputs of the model. Secondly, the snake optimization algorithm is improved by introducing Tent chaotic map**, lens imaging backward learning, and an optimal individual adaptive perturbation strategy to enhance its optimization ability. Then, the multi-strategy improved snake optimization algorithm is employed to optimize the parameters of the convolutional neural network–bidirectional long short-term memory network model, thereby augmenting the predictive precision of the model. Finally, the model established in this paper is utilized to forecast photovoltaic power in diverse weather scenarios. The simulation findings indicate that the regression coefficients of this method can reach 0.99216, 0.95772, and 0.93163 on sunny, cloudy, and rainy days, which has better prediction precision and adaptability under various weather conditions.

1. Introduction

The excessive extraction and consumption of fossil fuels have led to dire environmental pollution. Renewable energy sources, encompassing solar power, biomass energy, wind energy, and hydropower, have witnessed extensive development and utilization. Among numerous renewable energy sources, photovoltaic (PV) power generation holds great importance in ensuring the security, stability, and cost-effective functioning of the electricity system. However, PV power generation exhibits strong randomness and fluctuations that have the potential to significantly disrupt the power grid during large-scale grid integration, ultimately affecting the stability and safety of the power system [1]. Accurate PV power forecasting can mitigate its impact on the electrical grid. Therefore, enhancing the precision of PV forecasting is vital for bolstering the reliability of solar power generation and develo** grid scheduling plans.
On the basis of distinct time scales, PV power output forecasting is primarily categorized as long-term, medium-term, and short-term predictions [2]. The long-term forecast can be utilized to evaluate the quarterly and annual power generation indicators of power plants and the tasks of power generation, transmission, and power system distribution [3]; medium-term forecasts are mainly used for the maintenance of electrical systems and PV power plants [4]; and short-term prediction is beneficial for power sector staff to make generation plans quickly and arrange grid dispatching reasonably [5]. Due to the significant importance of short-term solar PV power prediction in providing daily power generation planning decisions for the power industry, and achieving efficient and economic dispatch, it has emerged as a focal point of current research.
Currently, the primary research methodologies for PV power forecasting can be classified into physical methods, statistical methods, and hybrid methods [6,7,8]. The physical method calculates the process and principle of PV power generation through physical formulas such as the solar radiation transfer equation. It involves building a physical model and utilizing environmental information, component parameters, and solar irradiance of PV power stations to predict PV power. However, the modeling process using a physics-based approach is complex and cost-intensive, making it unsuitable for short-term forecasting [9]. Compared to physics methods, statistical approaches employ simpler modeling without requiring complex experimental measurements, thereby possessing better accuracy. The statistical method can be classified into two types: traditional statistical models and artificial intelligence approaches. Traditional statistical models comprise time series analysis [10], grey theory [11], regression analysis [12], etc. Prema and Rao used the time series algorithm to forecast solar power generation, tested the data with different durations, and finally compared the error of the experimental results [13]. Zhong et al. proposed a multidimensional grey prediction algorithm, exhibiting better predictive accuracy compared to conventional grey models [14]. Reikard successfully employed an autoregressive model to predict PV power generation, achieving remarkable performance [15]. The aforementioned approach has demonstrated satisfactory performance in predicting stationary time series. However, solar irradiance is influenced by clouds and seasons, resulting in non-stationary behavior in time series data. Therefore, these models fail to accurately capture the nonlinearity present in the data, leading to subpar predictive capabilities [16].
To address the aforementioned problems, many researchers have commenced employing artificial intelligence approaches [17], for instance, support vector machines [18], extreme learning machines [19], and neural networks [20] for PV power forecasting. Li et al. employed the SVM model for short-term PV power forecasting [21]. Nevertheless, the SVM relies on quadratic programming to determine the support vectors, leading to prolonged training time when dealing with a large number of samples. Al-Dahidi et al. utilized the ELM model to predict PV power [22]. Although this method achieves satisfactory prediction results, the random initialization of weights and biases for hidden layer nodes in the ELM algorithm led to instability and overfitting issues [23]. Kim et al. utilized LSTM to predict ultra-short-term PV power [24]. This approach demonstrates excellent prediction accuracy when applied to large-scale temporal data sequences. However, determining the parameters of the LSTM model can be problematic, as it may not achieve the desired results when applied to other real-world prediction problems.
The hybrid method can leverage the advantages of different single prediction models, ultimately resulting in better predictive efficacy when compared to utilizing a single forecasting method [25,26]. Liu et al. used LSTM to predict PV power and built a LSTM prediction model combined with the dragonfly algorithm (DA) [27]. The experimental outcomes demonstrate that the DA–LSTM model exhibits better predictive accuracy compared to both conventional predictive models and the LSTM model. Zheng et al. established a model for PV power prediction [28]. This innovative approach harnessed particle swarm optimization (PSO) to effectively optimize LSTM networks. The experimental results indicate a noteworthy enhancement in the forecasting precision of the LSTM model after it was optimized with the PSO algorithm. Tuerxun et al. posited an improved condor search (MBES) algorithm to address the issue of selecting the best hyperparameters for LSTM and established an innovative MBES–LSTM model for predicting short-term power [29]. The empirical findings indicate that the MBES–LSTM model surpasses the LSTM model in prediction precision. These documents primarily combine LSTM models with swarm intelligence optimization algorithms to form hybrid models to enhance the precision of power prediction.
Recently, an escalating multitude of scholars have amalgamated multiple deep learning models into a hybridized model with the intent of augmenting the precision of model predictions. For instance, Lim et al. established a hybrid approach composed of a convolutional neural network (CNN) and LSTM [30]. The simulation findings demonstrate that the CNN–LSTM model exhibits favorable predictive performance. When the input temporal sequence expands in length, the information in the sequence is prone to loss, resulting in low prediction precision of the model. He et al. contemplated the bidirectional flow of information and employed a bidirectional long short-term memory network (BiLSTM) for prediction [31]. By integrating the advantages of both the CNN and BiLSTM, a CNN–BiLSTM solar power prediction model is constructed. The CNN was utilized to extract influential factors’ features, while BiLSTM was employed for chronological prediction. The outcomes demonstrate that this approach effectively reduced training time and outperformed traditional forecasting models.
Through a review of the existing literature, it can be found that the current mainstream method is to combine different models to build a hybrid prediction model, but there is a scarcity of literature focusing on leveraging intelligent optimization algorithms to ascertain the optimal parameters of the hybrid model. Taking the CNN–BiLSTM model as an example, this model improves prediction precision, but it has excessive internal parameters and improper selection may lead to potential overfitting issues. The setting of the learning rate, regularization coefficient, and number of hidden layer neurons directly affects the accuracy of PV power prediction results. The learning rate exerts a significant influence on the training effectiveness of the model, while the regularization coefficient is employed to regulate the complexity of the model, thus preventing overfitting. The number of hidden layer neurons plays a pivotal role in the model’s fitting degree, and these parameters have great randomness. Relying solely on human professional knowledge and historical experience to select parameters cannot guarantee the predictive efficacy of the model. Therefore, it is necessary to choose an appropriate optimization algorithm to combine with the CNN–BiLSTM model to acquire the optimal parameters of the CNN–BiLSTM model. Hence, the snake optimization algorithm is introduced to optimize the parameters of the CNN–BiLSTM prediction model, thereby building a novel short-term PV forecasting model.
The snake optimization (SO) algorithm, motivated by principles of biomimetics, was proposed by Hashim and Hussien in 2022 [32]. The SO algorithm possesses advantages such as fast convergence, strong exploitation capability, and minimal parameter adjustments, making it suitable for optimizing the CNN–BiLSTM model. However, the SO algorithm also suffers from the drawback of getting trapped in local optima, which affects its optimization effectiveness. Therefore, this study proposes a multi-strategy improved snake optimization (MISO) algorithm, aiming to avoid the algorithm getting trapped in local optima, bolstering its exploratory capacity, enhancing solution accuracy, and effectively tackling the drawbacks of the original algorithm. In addition, the MISO algorithm proposed in this article is applied to optimize the parameters of the CNN–BiLSTM model and the application of the MISO–CNN–BiLSTM model for predicting PV power. The main contributions of this study are as follows:
(1)
K-means clustering is employed to categorize weather patterns into sunny, cloudy, and rainy for the reduction of the impact of data fluctuations on forecasts. Then, a Pearson correlation analysis is conducted on the historical PV data and meteorological factors that exhibit a high correlation with the power sequence are selected as input data for the predictive model.
(2)
This study proposes a multi-strategy improved snake optimization (MISO) algorithm, which incorporates multiple optimization strategies to overcome the limitations of the original algorithm. The primary innovations of this approach encompass the subsequent elements: firstly, introducing Tent chaotic map** to augment the initial population quality of the algorithm; secondly, improving the food quantity threshold to enhance the algorithm’s convergence speed; then, introducing the lens imaging backward learning strategy to enable the algorithm to obtain dynamic and inverse solutions in lens backward learning, further augmenting the algorithm’s optimization prowess; and finally, introducing the optimal individual adaptive disturbance strategy to reduce the possibility of the algorithm getting trapped in local optima.
(3)
The optimization performance of the MISO algorithm is evaluated utilizing six classic test functions and compared with the grey wolf optimizer (GWO), whale optimization algorithm (WOA), and SO algorithms. The simulation findings indicate that the MISO algorithm outperforms other basic algorithms in convergence and solution precision. Next, the MISO algorithm and CNN–BiLSTM model are combined to establish the MISO–CNN–BiLSTM PV prediction model. Validated with real historical data from a specific location in Ningxia, China, the proposed method exhibits good precision under sunny, cloudy, and rainy scenarios.
The remaining sections of this paper are as follows: Section 2 introduces the PV power prediction model and multi-strategy improved snake optimization algorithm. Section 3 elucidates the principles of the K-means clustering algorithm, analyzes the factors influencing PV power generation, and identifies model inputs. Section 4 provides an analysis and discussion of the findings from the simulation experiment. Finally, Section 5 provides the conclusion of this study.

2. Prediction Model of Photovoltaic Power

2.1. Convolutional Neural Network–Bidirectional Long Short-Term Memory Network

2.1.1. Convolutional Neural Network

A CNN is primarily utilized for image processing but can also be employed for time series analysis [33]. The CNN mainly consists of convolutional layers and pooling layers, as depicted in Figure 1.
The convolutional layer plays a pivotal role in the architecture of a CNN. It convolves input data with multiple different convolution kernels and extracts features through convolution operation. The convolution process can be expressed as Equation (1).
C i = f ( x w i + b i )
where x represents the input of the CNN; C i refers to the i-th local feature of the convolutional layer output; symbolizes the convolutional operation; and w i and b i are the weight matrix of the i-th layer and the bias matrix, respectively.
In order to prevent overfitting, this study adopts the Relu activation function, as depicted in Equation (2).
f z = R e L u z = 0 ,       i f   z 0 z ,     i f   z > 0

2.1.2. Long Short-Term Memory Network

An LSTM network effectively mitigates the issues of gradient vanishing and explosion that plague traditional RNNs during the training of lengthy sequences. As illustrated in Figure 2, the storage unit of an LSTM network is composed of forget gates, input gates, and output gates. The precise computational procedures of LSTM can be elucidated by the subsequent equation [34].
f t = σ w f · h t 1 , x t + b f
i t = σ w i · h t 1 , x t + b i
g t = t a n h w g · h t 1 , x t + b g
c t = f t · c t 1 + i t · g t
o t = σ w o · h t 1 , x t + b 0
h t = o t · t a n h ( c t )
where σ indicates the activation function; w and b indicate the weight matrix and bias vector of the control gate, respectively; and h t represents the final output result.

2.1.3. Bidirectional Long Short-Term Memory Network

LSTM neural networks can only train input sequences in one direction and can only consider historical information, resulting in relatively limited data features. However, BiLSTM neural networks can analyze PV data in both directions, comprehensively considering both historical and future information of the data [35]. This improves the comprehensiveness of the forecasting process and enhances the precision of PV power forecasting. The BiLSTM schematic diagram is delineated in Figure 3, while the computation equation is presented below:
h t = L S T M ( h t 1 , x t , c t 1 )
h t = L S T M ( h t + 1 , x t , c t + 1 )
h t = α h t + β h t
where x t represents the input data at time t, h t and h t represent the output of the forward LSTM and backward LSTM hidden layers, respectively, and α and β are constants which denote the weight values for h t and h t .

2.1.4. Convolutional Neural Network–Bidirectional Long Short-Term Memory Network

Figure 4 illustrates the concrete structure of the CNN–BiLSTM prediction model. The model structure includes two main parts. Firstly, the CNN applies its unique structure to complete the convolutional pooling operation of input data, achieving data information mining and dimension reduction. Then, special gating units of the BiLSTM network handle the processed data, leveraging a large amount of information to conduct self-iterative training. During this process, the network learns and establishes a bidirectional temporal fitting relationship from previous data. The predicted values of the CNN–BiLSTM model are ultimately output by the output layer. This entire process encompasses the establishment of a predictive model for PV data.

2.2. Snake Optimization Algorithm

The snake optimization (SO) algorithm is a novel heuristic algorithm. This algorithm emulates the process of foraging, mating, and fighting of male and female snakes under conditions of food availability and temperature variations. Taking into account the snakes’ behavioral patterns, it is classified into two stages: the exploration phase and the exploitation phase [32].

2.2.1. Initializing the Population

Similar to other heuristic algorithms, the optimization process of SO commences by creating a population that is uniformly distributed randomly. The initial population is calculated as follows:
X i = X m i n + r × ( X m a x X m i n )
where X i indicates the location of the i-th individual, X m i n and X m a x indicate the lower and upper bounds of the population, respectively, and r is a random number between 0 and 1.

2.2.2. Divide the Snakes into Equal Female and Male Groups

The SO algorithm splits the population equally into two main groups, male and female cohorts, as depicted by the following equation:
N m = N / 2
N f = N N m
where N indicates the collective count of individuals within the population and N m and N f indicate the number of males and females in the population, respectively.

2.2.3. Assess Each Group and Determine the Temperature and Amount of Food

Pick out the optimal individuals within every group and obtain the best male ( f b e s t , m ) and best female ( f b e s t , f ) as well as the location of food ( f f o o d ). Temperature (Temp) and food quantity (Q) are calculated as follows:
T e m p = e x p ( t T )
Q = c 1 e x p ( t T T )
where t symbolizes the current iterations, while T indicates the maximum number of iterations, and c 1 = 0.5.

2.2.4. Exploration Phase (No Food)

If Q < Threshold (0.25), the formula for updating the location of individual male and female snakes is as follows:
X i , m t + 1 = X r a n d , m ( t ) ± c 2 × A m × ( ( X m a x X m i n ) × r a n d + X m i n )
X i , f t + 1 = X r a n d , f ( t ) ± c 2 × A f × ( ( X m a x X m i n ) × r a n d + X m i n )
where X i , m and X i , f represent the locations of the ith male and female snakes, while X r a n d , m and X r a n d , f denote the positions of any randomly selected individual from the male and female snake populations, respectively, rand is a random number between 0 to 1, and c 2 = 0.05. The symbol “±” indicates the positive or negative sign, which is randomly determined in the calculation. A m and A f represent the hunting abilities of males and females for food, as shown in the following equation:
A m = e x p ( f r a n d , m f i , m )
A f = e x p ( f r a n d , f f i , f )
where f r a n d , m and f r a n d , f , respectively, represent the fitness of X r a n d , m and X r a n d , f , while f i , m and f i , f represent the fitness values of the i-th male snake and female snake.

2.2.5. Exploitation Phase (Food Exists)

If Q > Threshold;
If the temperature > Threshold (0.6) (hot);
Snakes only move towards food:
X i , j t + 1 = X f o o d ± c 3 × T e m p × r a n d × ( X f o o d X i , j t )
where X i , j represents the location of either a male or female individual, while X f o o d represents the optimal position for an individual, and c 3 = 2.
If the temperature < Threshold (0.6) (cold);
The snake will be in either a fight or mating mode.
Fight Mode:
X i , m t + 1 = X i , m t + c 3 × F M × r a n d × ( Q × X b e s t , f X i , m t )
X i , f t + 1 = X i , f t + c 3 × M M × r a n d × ( Q × X b e s t , m X i , f t )
where X i , m and X i , f represent the positions of the ith male and female individuals, respectively, while X b e s t , m and X b e s t , f denote the positions of the best individuals in the male and female populations. FM and MM refer to the combat abilities of male and female individuals, respectively, as shown by the following equation.
F M = e x p ( f b e s t , f f i )
M M = e x p ( f b e s t , m f i )
where f b e s t , m and f b e s t , f respectively, refer to the fitness values of the top individuals in the male and female populations, while f i represents the target fitness.
Mating Mode:
X i , m t + 1 = X i , m t + c 3 × M m × r a n d × ( Q × X i , f ( t ) X i , m t )
X i , f t + 1 = X i , f t + c 3 × M f × r a n d × ( Q × X i , m ( t ) X i , f t )
where M m and M f represent the mating competence of male and female individuals, respectively, as shown by the subsequent equation.
M m = e x p ( f i , f f i , m )
M f = e x p ( f i , m f i , f )
If the eggs hatch, they replace the lowest fitness male and female individuals.
X w o r s t , m = X m i n + r a n d × ( X m a x X m i n )
X w o r s t , f = X m i n + r a n d × ( X m a x X m i n )
where X w o r s t , m and X w o r s t , f indicate the location of the worst individual in the male group and female group, respectively.

2.3. Improved Snake Optimization Algorithm

This section will present the improvement methods of SO. This study improved the snake optimization algorithm in four aspects. Firstly, the initialization of snake populations utilizes the Tent chaotic map** method to enhance randomness and diversity, thereby reducing uncertainty in the population initialization process. Secondly, by adjusting the food quantity threshold, the algorithm’s convergence speed can be improved by reducing the time spent in the exploration phase. Then, a lens imaging backward learning strategy is introduced to enable the algorithm to obtain dynamic and inverse solutions in lens backward learning, enhancing the global search ability. Finally, the optimal individual adaptive perturbation strategy is introduced to randomly perturb the position of the current optimal solution, preventing the algorithm from getting trapped in local optima.

2.3.1. Tent Map** Initialization

The quality of the population during the initialization phase directly determines the excellence of the algorithm, thus making it crucial for the algorithm [36,37]. The basic snake optimization algorithm usually employs a random initialization method to generate the initial population during the initialization phase. However, this method possesses a high degree of randomness and lacks diversity, resulting in the population being unable to evenly distribute within the search space. The Tent map** is incorporated into the optimization procedure to elevate the performance of the snake optimization algorithm. The equation for the Tent map** is presented below:
z i + 1 = z i ε ,         0 z i ε   1 z i 1 ε ,       ε < z i 1     ( i = 1,2 , · · · )
where z i indicates the i-th chaotic value of the chaotic sequence, with z i ranging from 0 to 1. The control parameter “ε” ranges from 0 to 1, with a specific value of 0.6 selected in this article based on the simulation experiment results.
Based on Equation (32), the initial positions of individuals in the snake swarm based on the Tent chaotic map can be obtained as follows:
X i = X m i n + z i X m a x X m i n ( i = 1,2 , · · · , N p )
where X m i n is the lower limit of the solution and X m a x is the upper limit of the solution.

2.3.2. Improvement of Food Quantity Threshold

The convergence rate of SO is greatly affected by the food threshold. Figure 5 illustrates the correlation between the amount of food and the total number of iterations, assuming the maximum number for iterations is set at 200 in Equation (16).
It can be observed from Figure 5 that the amount of food is positively correlated with the number of iterations. Reducing the threshold Q for food can diminish the number of iterations required for global optimization search, thereby accelerating the convergence rate of the optimization process. To enhance the precision of PV power generation prediction without significantly affecting the algorithm’s global exploration capability, the food quantity threshold in the snake optimization algorithm has been adjusted from 0.25 to 0.2 through multiple experiments and adjustments.

2.3.3. Lens Imaging Backward Learning Strategy

Employing the strategy of backward learning in swarm intelligence, optimization algorithms can enhance the algorithm’s ability to achieve optimal solutions to a certain extent [38,39]. However, the backward solution obtained through backward learning is fixed. If an individual is already trapped in a local optimum and its backward solution is inferior to the current solution, the backward learning strategy cannot help the individual escape the local optimum. On the other hand, lens imaging backward learning can effectively address the aforementioned issue. The backward learning strategy for lens imaging is depicted in Figure 6.
Taking the one-dimensional space as an example, the search range for the solution is represented by [a, b], with the y-axis denoting the convex lens. This assumes the presence of an object P with a height of h, and its projection on the x-axis is denoted as x. When this object passes through a convex lens, it forms an inverted real image P * with a height of h * on the opposite side of the convex lens, and its projection on the x-axis is denoted as x * . From the principles of convex lens imaging, it can be derived that:
( a + b ) / 2 x x * ( a + b ) / 2 = h h *
When k is equal to h / h * , Equation (34) can be rewritten as:
x * = a + b 2 + a + b 2 k x k
Equation (35) is the inverse solution formula for the convex lens backward learning strategy. Equation (35) can be simplified as follows when k = 1:
x * = a + b x
This equation represents the solving formula for backward learning.
From the aforementioned, it is evident that backward learning is a peculiar lens imaging backward learning, where a fixed backward solution is attained through backward learning. By adjusting the magnitude of k, dynamic variation of backward solutions can be achieved in lens backward learning, thereby further enhancing the algorithm’s optimization capability. The equation employed for calculating the value of k in this article is as follows:
k = 1 + t T 0.5 10

2.3.4. The Most Optimal Individual Adaptive Perturbation Strategy

This article introduces a variable mutation factor based on the number of iterations t as a system parameter to perform adaptive mutation on the optimal individual. The adaptive t distribution combines the advantages of the Gaussian distribution and the Cauchy distribution. When used as a mutation factor for adaptive perturbation on the optimal individual, it enhances the algorithm’s search capability and reduces the probability of getting trapped in local optima [40]. The specific equation is as follows:
B e s t i = B e s t i + B e s t i · t r n d ( t )
where t r n d ( t ) represents the t-distribution and B e s t i represents the mutated optimal individual position. When implementing adaptive perturbation, it is difficult to directly determine if the mutated individual is superior to the original individual. Hence, a greedy strategy is used to compare their fitness and select the optimal individual. The specific equation is:
B e s t n e w = B e s t i       i f   f ( B e s t i ) f ( B e s t i ) B e s t i       o t h e r w i s e                        
where B e s t n e w refers to the optimized position of the selected individuals, and f ( · ) refers to the value of their fitness.

2.4. Multi-Strategy Improved Snake Optimization Algorithm Run Procedure

The running procedure of the MISO algorithm unfolds in the subsequent manner, and the optimization flowchart is presented in Figure 7.
(1)
Set the number of populations and the number of iterations.
(2)
Initiate the population by generating initial solutions using the Tent chaotic map** method.
(3)
The population is classified into two categories, male and female, according to Equations (13) and (14). A fitness function is established, and the corresponding fitness values are calculated to identify the present optimal male and female individuals.
(4)
The ambient temperature, denoted as Temp, and the quantity of food, denoted as Q, are defined according to Equations (15) and (16).
(5)
It is determined whether the snake is foraging or engaged in fighting and mating based on the amount of food Q available. If food is scarce, the snake will search for it and update its individual position according to Equations (17) and (18).
(6)
If food is plentiful and Temp > 0.6, the snake will only seek out food and consume existing food, updating its position according to (21).
(7)
The snake individuals switch between combat mode and mating mode based on a random number Rand. During fight mode, their positions are updated using Equations (22) and (23), while during mating mode, their positions are updated using Equations (26) and (27). After the snake individuals engage in mating and their eggs hatch, the worst individuals are selected and replaced.
(8)
Using a backward learning strategy based on lens imaging, the individual’s position is updated, and a new fitness value based on the updated position is calculated. Furthermore, the fitness values of the current male and female populations, as well as the global optimum, undergo updates.
(9)
According to Equations (38) and (39), perform self-adaptive perturbation on the optimal individual.
(10)
Determine whether the maximum number of iterations has been achieved. If so, terminate the iterative process and output the fitness value and position of the optimal individual. If not, proceed to the next iteration.

2.5. Establishment of Multi-Strategy Improved Snake Optimization Algorithm–Convolutional Neural Network–Bidirectional Long Short-Term Memory Network Prediction Model

MISO can optimize the main parameters of CNN–BiLSTM, including learning rate, regularization coefficient, and number of hidden layer neurons, with good robustness and easy convergence. This article proposes a new PV power generation prediction model, MISO–CNN–BiLSTM. Figure 8 depicts the predictive procedure of the MISO–CNN–BiLSTM model and is displayed below:
(1)
Determine the sample of PV output power.
(2)
Normalize the sample data.
(3)
Initialize the parameters of the MISO algorithm.
(4)
The location update strategy of the MISO algorithm is utilized to update the locations of individual snakes.
(5)
The hyperparameters of the CNN–BiLSTM model are optimized by the MISO algorithm.
(6)
The trained MISO–CNN–BiLSTM model is employed to forecast PV power.
(7)
Evaluate the predictive effect.

3. Analysis of Influencing Factors of Photovoltaic Output Power

3.1. Study of Power Output Curves of Photovoltaic Power under Different Weather Scenarios

Weather conditions possess a significant influence over PV power generation. To conduct a more comprehensive investigation into the influence of diverse weather scenarios on PV output power, actual output power data under three weather patterns—sunny, cloudy, and rainy—were chosen and analyzed from the collected sample data of PV power stations. The power output variations for the three weather conditions are depicted in Figure 9.
From Figure 9, it can be noticed that the PV output curves vary significantly among different weather patterns. During sunny days, the output power varies relatively smoothly throughout the day with few fluctuations, thus achieving the most optimal PV output. However, during cloudy weather, the unstable illumination leads to large fluctuations in output power throughout the day, resulting in an overall lower output power compared to sunny days. During rainy weather, the PV output efficiency reaches its minimum as the output power fluctuates significantly throughout the day, leading to an inadequate power generation effect.

3.2. K-Means Weather Clustering

In short-term PV power forecasting, the effectiveness of neural network prediction models can be greatly affected by significant differences between trained and predicted data, resulting in inaccurate predictions. Therefore, this study introduces the K-means clustering algorithm to categorize the weather and improve the forecast accuracy. The flowchart of the K-means clustering algorithm is depicted in Figure 10.
In the k-means clustering process, the data are first imported into the clustering model and divided into K categories according to the requirements of the dataset. The initial center points are then determined as K data points. Subsequently, the distances between the remaining data and the initial centers are computed and match every data point to the closest category. After computing the new clustering center points, the procedure is repeated until the objective function converges. The distance measure used for K-means clustering is the commonly used Euclidean distance, which is expressed as Equation (40).
d = ( x i x i 1 ) 2 ( y i y i 1 ) 2
where x i and x i 1 represent the abscissa values of two randomly chosen points, while y i and y i 1 denote the ordinate values of the same two points, and d denotes the Euclidean distance between these two points.
In this study, the average daily solar irradiance is set as the primary data for the clustering algorithm, with a value of K equal to 3. After iterative processing, we obtained three different weather categories, recorded as sunny, cloudy, and rainy based on the magnitude of irradiance. The range of average daily solar irradiance for sunny days is [222.968, 345.927] W / m 2 , for cloudy days is [105.512, 216.937] W / m 2 , and for rainy days is [5.452, 102.049] W / m 2 .

3.3. The Influence of Different Meteorological Elements on Photovoltaic Power Output

PV power is subject to numerous factors, which can be mainly classified into the internal parameters of the equipment in the PV power generation system and the external meteorological factors. Because the internal parameters of the PV system components are determined by the manufacturer, these parameters remain relatively stable once the PV power plant is installed. Hence, the solar power output is predominantly influenced by external environmental factors [41]. Based on historical data from 24 April 2020, the relationship curve between output power and irradiance, relative humidity, temperature, and pressure is plotted, as shown in Figure 11. The irradiance refers to the total solar radiation, including both direct and diffuse radiation. Direct irradiation is the radiant energy from the sun that directly reaches the ground, while diffused irradiation is the radiant energy from the sun that reaches the ground after being scattered by particles, molecules, etc. in the atmosphere. Under the obstructive effect of the atmosphere, the total radiation received by the ground will vary due to the influence of direct and diffused irradiation. Therefore, the irradiance studied in this paper refers to all the radiant energy from the sun.
From Figure 11, it is apparent that there is a strong and positive relationship between irradiance and the corresponding power output, where the strength of PV power increases as the irradiance rises and decreases with the reduction of irradiance. There exists a clear correlation between temperature and power, with the overall variation curve of PV output power showing consistency with temperature. Relative humidity and pressure, on the other hand, exhibit almost no correlation with power.
The aforementioned analysis has explored the diverse levels of correlation amid PV power output and several meteorological variables, including radiation intensity and pressure. However, these relationships are purely descriptive in nature. This study uses the Pearson correlation coefficient method to perform a quantitative analysis of the effect of meteorological factors on PV power, with the equation presented as follows:
ρ x , y = n x y x y n x 2 ( x ) 2 n y 2 ( y ) 2
where x and y are correlated variables, with n being the total sample size. x represents weather factors and y represents the output power of PV cells. ρ x , y denotes the correlation coefficient.
Table 1 illustrates the implications of Pearson’s coefficient [42]. When ρ x , y is greater than 0, it denotes a positive correlation. When ρ x , y is equal to 0, it signifies no linear correlation. Conversely, when ρ x , y is less than 0, it indicates a negative correlation.
Pearson correlation analysis was conducted using the data from the entire month of April, 2020, and the results are listed in Table 2.
From Table 2, it is apparent that the correlation coefficient between PV power and radiation intensity reaches 0.978, indicating a strong positive relationship. Additionally, there exists a moderate positive correlation with temperature, encompassing both environmental and component temperatures. Conversely, the correlation between pressure and relative humidity is relatively weak. Therefore, this study selects irradiance, ambient temperature, and component temperature as the inputs for the model, with PV output power as the output.

4. Simulation Experiment Analysis

4.1. Optimizer Performance Analysis

To verify the correctness of the strategy selection for the MISO algorithm optimization, six classic benchmark test functions were selected to assess the optimization performance of MISO, as listed in Table 3. Among the six test functions, f 1 x f 3 ( x ) are unimodal test functions employed to examine the algorithm’s convergence ability and solution accuracy; f 4 x f 6 ( x ) are multimodal test functions, which can effectively test the algorithm’s global exploration capability. By utilizing these different types of test functions, the optimization performance of the MISO algorithm can be thoroughly validated.
To comprehensively validate the efficacy of the MISO algorithm put forth in this study, we selected the GWO algorithm, WOA, and SO algorithm for comparison. These algorithms have been proven to possess excellent optimization capabilities. To accurately assess the performance of the MISO algorithm versus the contrastive algorithms, a unified population size of 30, a function dimension of 30, and a maximum of 500 iterations were set for all algorithms. Each algorithm was independently executed 30 times. Table 4 shows the parameter settings of the comparison algorithm, and Table 5 shows the experimental results.
Table 5 indicates that MISO exhibits remarkable performance advantages for unimodal test functions. When solving functions f 1 x , f 2 x , and f 3 x , the MISO algorithm achieves the theoretical optimum, which is far superior to SO and other compared algorithms. Furthermore, compared with the three algorithms, the MISO algorithm has the smallest standard deviation, indicating that MISO algorithm has the best exploration ability and stability.
Regarding the multimodal test functions, the MISO algorithm achieved the theoretically optimal value when solving for function f 4 x . Meanwhile, for functions f 5 x and f 6 x , none of the algorithms reached the theoretical optimal value. However, the MISO algorithm still had the highest search precision compared to other algorithms. These results indicate that the MISO algorithm possesses both strong global exploration and local optima avoidance abilities, as well as high optimization stability.

4.2. Predictive Result Analysis

The data for this study were from the Taiyangshan PV Power Station in Ningxia, China, in 2020, and samples were taken every 15 min. To assess the predictive precision of the established model, this study used k-means clustering to divide weather scenarios into three small sample datasets: sunny, cloudy, and rainy, based on the size of irradiance. Then, from January to June, 30 days of data were selected for simulation analysis for each weather type, and 2784 samples were allocated as the training set and 96 samples as the testing set.
The MISO–CNN–BiLSTM model was utilized to predict PV power. Additionally, the comparison models employed were BP, LSTM, BiLSTM, CNN–BiLSTM, and SO–CNN–BiLSTM. Furthermore, within this study, the error evaluation metrics selected were mean absolute error (MAE), root mean squared error (RMSE), and coefficient of determination ( R 2 ). The computation expressions are as follows:
M A E = 1 n i = 1 n y i y i *
R M S E = 1 n i = 1 n ( y i y i * ) 2
R 2 = 1 i = 1 n ( y i y i * ) 2 i = 1 n ( y i y i ¯ )
where n refers to the number of test sets, y i refers to the actual PV power value, y i * refers to the predicted value of the model, and y i ¯ denotes the average value of the PV power data set.

4.2.1. Prediction Results in Sunny Weather

The MISO–CNN–BiLSTM model was validated using solar power output data on a sunny day, specifically on 13 June 2020. The training set consisted of sunny day power output data from the previous 29 days leading up to June 13, while the solar power output on June 13 itself served as the test set. The predicted outcomes of the MISO–CNN–BiLSTM and the comparison models can be seen in Figure 12.
From Figure 12, it can be observed that during sunny weather, the general trend of the PV output power curve was stable, exhibiting remarkable regularity. This was due to the steady variation of various meteorological factors, resulting in a slow change in PV output power with variance in solar irradiance and temperature under sunny circumstances. The changing trends of the five predicted curves were generally consistent with the actual values. Among them, the MISO–CNN–BiLSTM model provided the closest prediction results to the actual values, indicating its superior predictive performance. Compared to the other models, the BP model’s output power curve deviated the most from the actual values, highlighting its poor predictive capability.
In order to observe the prediction outcomes more directly, MAE, RMSE, and R 2 were utilized to assess the predictive precision of the six models. The evaluation findings are listed in Table 6 and Figure 13. The MAE for the MISO–CNN–BiLSTM method is 1.4269, the RMSE is 2.213, and R 2 is 0.99216. All evaluation metrics outperformed those of the other comparative models. In general, the MISO–CNN–BiLSTM model produced the most optimal prediction results, thus confirming the efficacy of the established prediction model.

4.2.2. Prediction Results in Cloudy Weather

The MISO–CNN–BiLSTM model was evaluated using cloudy power output data on 23 June 2020. The training set consisted of cloudy power output data from the previous 29 days leading up to 23 June 2020, while the PV power output on 23 June 2020 was used as the test set. The predictive outcomes of the MISO–CNN–BiLSTM and the comparison models are depicted in Figure 14.
From Figure 14, it is evident that during cloudy conditions, there was significant volatility in the PV output curve. Moreover, there were noticeable variations in the predictions of different forecasting models during certain time periods, indicating distinct discrepancies. In terms of overall prediction accuracy, the MISO–CNN–BiLSTM model outperformed other models, as its curve closely aligned with the actual values.
Table 7 and Figure 15 present the evaluation metrics for six weather forecasting models under cloudy conditions. The MAE for the MISO–CNN–BiLSTM model is 1.7877, the RMSE is 3.1595, and the R 2 is 0.95772. All these evaluation metrics outperformed other comparative models, thereby substantiating the efficacy of the established forecasting model.

4.2.3. Prediction Results in Rainy Weather

The MISO–CNN–BiLSTM model was evaluated using power output data on a rainy day, specifically on 24 June 2020. The training set consisted of power output data from the preceding 29 days, while the test set included the PV power output on 24 June 2020. The predictive outcomes of the MISO–CNN–BiLSTM and the comparison models are displayed in Figure 16.
From Figure 16, it is apparent that during rainy weather, the PV power curve fluctuated greatly and had weaker regularity, leading to less satisfactory prediction results of the model and lower accuracy compared to sunny and cloudy days. However, the MISO–CNN–BiLSTM model showed the closest proximity between its forecasts and the factual measurements for all the models, which demonstrated the validity of the established model under cloudy and rainy conditions.
Table 8 and Figure 17 present the evaluation metrics of six weather models for rainy days. The MAE for the MISO–CNN–BiLSTM model is 1.3374, the RMSE is 2.4689, and the R 2 is 0.93163. The assessment indicators of the MISO–CNN–BiLSTM model surpassed those of the other comparative models, thereby validating the efficacy of the established predictive model in this paper.

5. Conclusions

Due to the inherent uncertainty in PV power forecasting, particularly in situations with unpredictable weather changes, the precision of electricity predictions has become a significant technical challenge. This article employs K-means clustering to classify historical PV data, resulting in three distinct subsets: sunny, cloudy, and rainy. Based on these subsets, the corresponding PV power generation for distinct weather scenarios is forecasted. To enhance the precision of PV power prediction under varying weather types, this study utilizes the MISO–CNN–BiLSTM model. The empirical findings evince that the MISO–CNN–BiLSTM model surpasses the SO–CNN–BiLSTM, CNN–BiLSTM, BiLSTM, LSTM, and BP models in predicting performance. The conclusions of this research are as follows:
(1)
Combining multiple enhancement techniques enhances the optimization performance of SO. The integration of the original SO with the Tent chaotic initialization, lens imaging reverse learning strategy, and optimal individual adaptive perturbation strategy significantly improves the overall performance of MISO.
(2)
The simulation findings demonstrate that the established model has excellent predictive prowess. In various weather conditions, the MISO–CNN–BiLSTM model demonstrates significantly lower MAE and RMSE values in comparison to the other models presented in this research, providing evidence of its high prediction accuracy. Furthermore, the R 2 values of the MISO–CNN–BiLSTM model surpass those of other models mentioned in this paper, substantiating its superiority and reliability.
(3)
The MISO–CNN–BiLSTM model can accurately forecast PV power, which is helpful for power grid system planning and dispatching and reduces the dispatching cost of the power system.
The MISO–CNN–BiLSTM PV power prediction model proposed by this research can achieve accurate prediction of PV output power under different weather scenarios. This contributes to enhancing the utilization efficiency of renewable energy generation, ensuring the security of renewable energy power systems. Moreover, it plays a decisive role in advancing the growth of the renewable energy sector. In addition to PV prediction, the model can also be used for power prediction of other similar renewable energy sources and may become a universal renewable energy power prediction method, which can promote the wider use of renewable energy.
This study has limitations. Although this study provides forecasts for short-term PV generation across three distinct weather conditions, it overlooks the consideration of numerous extreme weather phenomena such as rainstorms, snowstorms, sandstorms, haze, etc. In the future, research should be conducted on the power prediction of PV generation under inclement meteorological conditions, so as to enhance the dependability of the prediction model.

Author Contributions

Y.W.: conceptualization, investigation, supervision, validation, writing—review and editing. Y.Y.: investigation, software, validation, writing—original draft, writing—review and editing. Q.Z.: supervision, validation. K.Z.: software, investigation. Y.H.: validation. All authors have read and agreed to the published version of the manuscript.

Funding

This project was supported by the National Natural Science Foundation of China (NSFC) (61673281) and the Basic Scientific Project of Educational Committee of Liaoning Province (LJKZ0682).

Data Availability Statement

The data presented in this study are available on request from the corresponding author. The data are not publicly available due to privacy.

Acknowledgments

The authors would like to express their sincere gratitude to the National Natural Science Foundation of China for providing financial support for this research.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

PVphotovoltaic
SVMsupport vector machine
ELMextreme learning machine
LSTMlong short-term memory
DAdragonfly algorithm
PSOparticle swarm optimization
MBESimproved condor search algorithm
CNNconvolutional neural network
BiLSTMbidirectional long short-term memory
SOsnake optimization
MISOmulti-strategy improved snake optimization
GWOgrey wolf optimizer
WOAwhale optimization algorithm
RNNrecurrent neural network
BPback propagation
MAEmean absolute error
RMSEroot mean squared error
R 2coefficient of determination

References

  1. Jiang, J.; Hu, S.; Xu, L.; Wang, T. Short-Term PV Power Prediction Based on VMD-CNN-IPSO-LSSVM Hybrid Model. Int. J. Low-Carbon Technol. 2024, 19, 1160–1167. [Google Scholar] [CrossRef]
  2. Assaf, A.M.; Haron, H.; Abdull Hamed, H.N.; Ghaleb, F.A.; Qasem, S.N.; Albarrak, A.M. A Review on Neural Network Based Models for Short Term Solar Irradiance Forecasting. Appl. Sci. 2023, 13, 8332. [Google Scholar] [CrossRef]
  3. Jung, Y.; Jung, J.; Kim, B.; Han, S. Long Short-Term Memory Recurrent Neural Network for Modeling Temporal Patterns in Long-Term Power Forecasting for Solar PV Facilities: Case Study of South Korea. J. Clean. Prod. 2020, 250, 119476. [Google Scholar] [CrossRef]
  4. Wang, F.; Xuan, Z.; Zhen, Z.; Li, K.; Wang, T.; Shi, M. A Day-Ahead PV Power Forecasting Method Based on LSTM-RNN Model and Time Correlation Modification under Partial Daily Pattern Prediction Framework. Energy Convers. Manag. 2020, 212, 112766. [Google Scholar] [CrossRef]
  5. Gao, Y.; Wang, J.; Guo, L.; Peng, H. Short-Term Photovoltaic Power Prediction Using Nonlinear Spiking Neural P Systems. Sustainability 2024, 16, 1709. [Google Scholar] [CrossRef]
  6. Salamanis, A.I.; Xanthopoulou, G.; Bezas, N.; Timplalexis, C.; Bintoudi, A.D.; Zyglakis, L.; Tsolakis, A.C.; Ioannidis, D.; Kehagias, D.; Tzovaras, D. Benchmark Comparison of Analytical, Data-Based and Hybrid Models for Multi-Step Short-Term Photovoltaic Power Generation Forecasting. Energies 2020, 13, 5978. [Google Scholar] [CrossRef]
  7. Feng, C.; Liu, Y.; Zhang, J. A Taxonomical Review on Recent Artificial Intelligence Applications to PV Integration into Power Grids. Int. J. Electr. Power Energy Syst. 2021, 132, 107176. [Google Scholar] [CrossRef]
  8. Mayer, M.J.; Gróf, G. Extensive Comparison of Physical Models for Photovoltaic Power Forecasting. Appl. Energy 2021, 283, 116239. [Google Scholar] [CrossRef]
  9. Pan, M.; Li, C.; Gao, R.; Huang, Y.; You, H.; Gu, T.; Qin, F. Photovoltaic Power Forecasting Based on a Support Vector Machine with Improved Ant Colony Optimization. J. Clean. Prod. 2020, 277, 123948. [Google Scholar] [CrossRef]
  10. Sharadga, H.; Hajimirza, S.; Balog, R.S. Time Series Forecasting of Solar Power Generation for Large-Scale Photovoltaic Plants. Renew. Energy 2020, 150, 797–807. [Google Scholar] [CrossRef]
  11. Han, X.J.; Zhang, X.L.; Chen, Y.Y.; Meng, F.Y. Wind Power Prediction Model Based on the Combination of Gray Theory and Time Series Forecasting Methods. Appl. Mech. Mater. 2013, 448–453, 1721–1726. [Google Scholar] [CrossRef]
  12. Sarper, H.; Melnykov, I.; Martínez, L.A. Prediction of Daily Photovoltaic Energy Production Using Weather Data and Re-gression. J. Sol. Energy Eng. 2021, 143, 064502. [Google Scholar] [CrossRef]
  13. Prema, V.; Rao, K.U. Development of Statistical Time Series Models for Solar Power Prediction. Renew. Energy 2015, 83, 100–109. [Google Scholar] [CrossRef]
  14. Zhong, Z.; Yang, C.; Cao, W.; Yan, C. Short-Term Photovoltaic Power Generation Forecasting Based on Multivariable Grey Theory Model with Parameter Optimization. Math. Probl. Eng. 2017, 2017, 1–9. [Google Scholar] [CrossRef]
  15. Reikard, G. Predicting Solar Radiation at High Resolutions: A Comparison of Time Series Forecasts. Sol. Energy 2009, 83, 342–349. [Google Scholar] [CrossRef]
  16. Sharma, V.; Yang, D.; Walsh, W.; Reindl, T. Short Term Solar Irradiance Forecasting Using a Mixed Wavelet Neural Network. Renew. Energy 2016, 90, 481–492. [Google Scholar] [CrossRef]
  17. Lee, D.; Kim, K. PV Power Prediction in a Peak Zone Using Recurrent Neural Networks in the Absence of Future Meteor-ological Information. Renew. Energy 2021, 173, 1098–1110. [Google Scholar] [CrossRef]
  18. Sheng, W.; Li, R.; Shi, L.; Lu, T. Distributed Photovoltaic Short-Term Power Forecasting Using Hybrid Competitive Particle Swarm Optimization Support Vector Machines Based on Spatial Correlation Analysis. IET Renew. Power Gener. 2023, 17, 3624–3637. [Google Scholar] [CrossRef]
  19. Wang, Q.; Lin, H. Ultra-Short-Term PV Power Prediction Using Optimal ELM and Improved Variational Mode Decomposition. Front. Energy Res. 2023, 11, 1140443. [Google Scholar] [CrossRef]
  20. Zhang, Y.; Wang, Y. A Hybrid Neural Network-Based Intelligent Forecasting Approach for Capacity of Photovoltaic Elec-tricity Generation. J. Circuit Syst. Comp. 2023, 32, 2350172. [Google Scholar] [CrossRef]
  21. Li, L.-L.; Sun, J.; Tseng, M.-L.; Li, Z.-G. Extreme Learning Machine Optimized by Whale Optimization Algorithm Using Insulated Gate Bipolar Transistor Module Aging Degree Evaluation. Expert Syst. Appl. 2019, 127, 58–67. [Google Scholar] [CrossRef]
  22. Al-Dahidi, S.; Ayadi, O.; Adeeb, J.; Alrbai, M.; Qawasmeh, B.R. Extreme Learning Machines for Solar Photovoltaic Power Predictions. Energies 2018, 11, 2725. [Google Scholar] [CrossRef]
  23. Behera, M.K.; Majumder, I.; Nayak, N. Solar Photovoltaic Power Forecasting Using Optimized Modified Extreme Learning Machine Technique. Eng. Sci. Technol. Int. J. 2018, 21, 428–438. [Google Scholar] [CrossRef]
  24. Kim, D.; Kwon, D.; Park, L.; Kim, J.; Cho, S. Multiscale LSTM-Based Deep Learning for Very-Short-Term Photovoltaic Power Generation Forecasting in Smart City Energy Management. IEEE Syst. J. 2021, 15, 346–354. [Google Scholar] [CrossRef]
  25. Li, Q.; Zhang, D.; Yan, K. A Solar Irradiance Forecasting Framework Based on the CEE-WGAN-LSTM Model. Sensors 2023, 23, 2799. [Google Scholar] [CrossRef]
  26. Lee, J.; Kang, J.; Lee, S.; Oh, H.-M. Ultra-Short Term Photovoltaic Generation Forecasting Based on Data Decomposition and Customized Hybrid Model Architecture. IEEE Access 2024, 12, 20840–20853. [Google Scholar] [CrossRef]
  27. Liu, H.; Chen, D.; Lin, F.; Wan, Z. Wind Power Short-Term Forecasting Based on LSTM Neural Network With Dragonfly Algorithm. J. Phys. Conf. Ser. 2021, 1748, 032015. [Google Scholar] [CrossRef]
  28. Zheng, J.; Zhang, H.; Dai, Y.; Wang, B.; Zheng, T.; Liao, Q.; Liang, Y.; Zhang, F.; Song, X. Time Series Prediction for Output of Multi-Region Solar Power Plants. Appl. Energy 2020, 257, 114001. [Google Scholar] [CrossRef]
  29. Tuerxun, W.; Xu, C.; Guo, H.; Guo, L.; Zeng, N.; Gao, Y. A Wind Power Forecasting Model Using LSTM Optimized by the Modified Bald Eagle Search Algorithm. Energies 2022, 15, 2031. [Google Scholar] [CrossRef]
  30. Lim, S.-C.; Huh, J.-H.; Hong, S.-H.; Park, C.-Y.; Kim, J.-C. Solar Power Forecasting Using CNN-LSTM Hybrid Model. Energies 2022, 15, 8233. [Google Scholar] [CrossRef]
  31. He, Y.; Gao, Q.; **, Y.; Liu, F. Short-Term Photovoltaic Power Forecasting Method Based on Convolutional Neural Network. Energy Rep. 2022, 8, 54–62. [Google Scholar] [CrossRef]
  32. Hashim, F.A.; Hussien, A.G. Snake Optimizer: A Novel Meta-Heuristic Optimization Algorithm. Knowl. Based Syst. 2022, 242, 108320. [Google Scholar] [CrossRef]
  33. Li, S.; Yang, J.; Wu, F.; Li, R.; Rashed, G.I. Combined Prediction of Photovoltaic Power Based on Sparrow Search Algorithm Optimized Convolution Long and Short-Term Memory Hybrid Neural Network. Electronics 2022, 11, 1654. [Google Scholar] [CrossRef]
  34. Alharkan, H.; Habib, S.; Islam, M. Solar Power Prediction Using Dual Stream CNN-LSTM Architecture. Sensors 2023, 23, 945. [Google Scholar] [CrossRef]
  35. Liu, Q.; Li, Y.; Jiang, H.; Chen, Y.; Zhang, J. Short-Term Photovoltaic Power Forecasting Based on Multiple Mode Decomposition and Parallel Bidirectional Long Short Term Combined with Convolutional Neural Networks. Energy 2024, 286, 129580. [Google Scholar] [CrossRef]
  36. Zhao, M.; Zhou, X. Multi-Step Short-Term Wind Power Prediction Model Based on CEEMD and Improved Snake Optimization Algorithm. IEEE Access 2024, 12, 50755–50778. [Google Scholar] [CrossRef]
  37. Wang, J.; Guo, H.; Song, A. Photovoltaic Power Combination Prediction System Based on Improved Multi-objective Optimization Algorithm and Nonlinear Weighting Strategy. Expert Syst. 2023, 40, e13209. [Google Scholar] [CrossRef]
  38. Qu, C.; Lu, Z.; Peng, X.; Lin, G. A Hunter-Prey Algorithm Coordinating Mutual Benefit and Sharing and Interactive Learning for High-Efficiency Design of Photovoltaic Models. Int. J. Intell. Syst. 2023, 2023, 4831209. [Google Scholar] [CrossRef]
  39. Ma, G.; Yue, X.; Zhu, J.; Liu, Z.; Lu, S. Deep Learning Network Based on Improved Sparrow Search Algorithm Optimization for Rolling Bearing Fault Diagnosis. Mathematics 2023, 11, 4634. [Google Scholar] [CrossRef]
  40. Wang, H.; Mo, Y. Adaptive Hybrid Optimization Algorithm for Numerical Computing in Engineering Applications. Eng. Optim. 2024, 1–39. [Google Scholar] [CrossRef]
  41. Wang, F.; Zhang, Z.; Liu, C.; Yu, Y.; Pang, S.; Duić, N.; Shafie-khah, M.; Catalão, J.P.S. Generative Adversarial Networks and Convolutional Neural Networks Based Weather Classification Model for Day Ahead Short-Term Photovoltaic Power Forecasting. Energy Convers. Manag. 2019, 181, 443–462. [Google Scholar] [CrossRef]
  42. Xue, Q.; Shen, S.; Li, G.; Zhang, Y.; Chen, Z.; Liu, Y. Remaining Useful Life Prediction for Lithium-Ion Batteries Based on Capacity Estimation and Box-Cox Transformation. IEEE Trans. Veh. Technol. 2020, 69, 14765–14779. [Google Scholar] [CrossRef]
Figure 1. The structure of CNN.
Figure 1. The structure of CNN.
Sensors 24 03897 g001
Figure 2. The construction of the LSTM network.
Figure 2. The construction of the LSTM network.
Sensors 24 03897 g002
Figure 3. The schematic diagram of BiLSTM neural network.
Figure 3. The schematic diagram of BiLSTM neural network.
Sensors 24 03897 g003
Figure 4. The structure of CNN–BiLSTM neural network.
Figure 4. The structure of CNN–BiLSTM neural network.
Sensors 24 03897 g004
Figure 5. The curve of food quantity fluctuates with each iteration.
Figure 5. The curve of food quantity fluctuates with each iteration.
Sensors 24 03897 g005
Figure 6. The schematic diagram of the lens imaging backward learning strategy.
Figure 6. The schematic diagram of the lens imaging backward learning strategy.
Sensors 24 03897 g006
Figure 7. MISO flow chart.
Figure 7. MISO flow chart.
Sensors 24 03897 g007
Figure 8. The optimization process of MISO–CNN–BiLSTM.
Figure 8. The optimization process of MISO–CNN–BiLSTM.
Sensors 24 03897 g008
Figure 9. PV output power curve of three weather types.
Figure 9. PV output power curve of three weather types.
Sensors 24 03897 g009
Figure 10. The flowchart of the K-means clustering algorithm.
Figure 10. The flowchart of the K-means clustering algorithm.
Sensors 24 03897 g010
Figure 11. Relationship curves. (a) Irradiance and PV output power change curve; (b) temperature and PV output power change curve; (c) pressure and PV output power change curve; (d) relative humidity and PV output power change curve.
Figure 11. Relationship curves. (a) Irradiance and PV output power change curve; (b) temperature and PV output power change curve; (c) pressure and PV output power change curve; (d) relative humidity and PV output power change curve.
Sensors 24 03897 g011
Figure 12. Predicted power output curves on a sunny day.
Figure 12. Predicted power output curves on a sunny day.
Sensors 24 03897 g012
Figure 13. Comparison of models for sunny weather.
Figure 13. Comparison of models for sunny weather.
Sensors 24 03897 g013
Figure 14. Predicted power output curves on cloudy day.
Figure 14. Predicted power output curves on cloudy day.
Sensors 24 03897 g014
Figure 15. Comparison of models for cloudy weather.
Figure 15. Comparison of models for cloudy weather.
Sensors 24 03897 g015
Figure 16. Predicted power output curves on rainy day.
Figure 16. Predicted power output curves on rainy day.
Sensors 24 03897 g016
Figure 17. Comparison of models for rainy weather.
Figure 17. Comparison of models for rainy weather.
Sensors 24 03897 g017
Table 1. Correlation coefficient corresponds to the degree of correlation.
Table 1. Correlation coefficient corresponds to the degree of correlation.
| ρ x , y | Degree of Correlation
0.0–0.2Exceedingly less or no correlation
0.2–0.4Weak correlation
0.4–0.6Moderate correlation
0.6–0.8Strong correlation
0.8–1.0Extremely strong correlation
Table 2. Pearson correlation analysis results.
Table 2. Pearson correlation analysis results.
Attributes ρ x , y
Radiation intensity0.978
Component temperature0.484
Ambient temperature0.518
Pressure−0.094
Relative humidity0.075
Table 3. Test functions.
Table 3. Test functions.
FunctionsDimensionRangeOptimum
f 1 ( x ) = i = 1 n x i 2 30[−100, 100]0
f 2 ( x ) = i = 1 n x i + i = 1 n x i 30[−10, 10]0
f 3 ( x ) = i = 1 n ( j = 1 i x j ) 2 30[−100, 100]0
f 4 ( x ) = i = 1 n [ x i 2 10 cos ( 2 π x i ) + 10 ] 30[−5.12, 5.12]0
f 5 ( x ) = 20 exp ( 0.2 1 n i = 1 n x i 2 ) exp ( 1 n i = 1 n cos ( 2 π x i ) ) + 20 + e 30[−32, 32]0
f 6 ( x ) = π n 10 sin ( π y 1 ) + i = 1 n 1 ( y i 1 ) 2 [ 1 + 10 sin 2 ( π y i + 1 ) ] + ( y n 1 ) 2 + i = 1 n u ( x i , 10 , 100 , 4 ) y i = 1 + x i + 1 4 , u ( x i , a , k , m ) = k ( x i a ) m , x i > a 0 , a < x i < a k ( x i a ) m , x i < a 30[−50, 50]0
Table 4. Setting parameters of GWO, WOA, SO, and MISO.
Table 4. Setting parameters of GWO, WOA, SO, and MISO.
AlgorithmParameters
GWOa = 2 ~ 0
WOAa = 2 ~ 0 , b = 1
SOc1 = 0.5, c2 = 0.05, c3 = 2
MISOc1 = 0.5, c2 = 0.05, c3 = 2
Table 5. Test results.
Table 5. Test results.
FunctionsAlgorithmsOptimalWorst ValueAverageStandard Deviation
f 1 x GWO3.99 × 10−291.34 × 10−274.12 × 10−285.52 × 10−28
WOA2.10 × 10−811.45 × 10−722.91 × 10−736.50 × 10−73
SO6.07 × 10−991.14 × 10−942.54 × 10−954.95 × 10−95
MISO0000
f 2 x GWO3.55 × 10−171.27 × 10−166.71 × 10−174.06 × 10−17
WOA3.16 × 10−553.10 × 10−496.21 × 10−501.39 × 10−49
SO7.55 × 10−451.06 × 10−424.39 × 10−435.53 × 10−43
MISO0000
f 3 x GWO4.84 × 10−74.70 × 10−41.69 × 10−42.32 × 10−4
WOA2.70 × 1046.10 × 1044.14 × 1041.33 × 104
SO1.26 × 10−642.61 × 10−595.85 × 10−601.14 × 10−59
MISO0000
f 4 x GWO5.68 × 10−1413.853.806.04
WOA0000
SO45.3378.7866.2513.24
MISO0000
f 5 x GWO6.84 × 10−141.25 × 10−139.82 × 10−142.36 × 10−14
WOA8.88 × 10−167.99 × 10−155.86 × 10−13.18 × 10−15
SO4.44 × 10−152.900.581.30
MISO8.88 × 10−168.88 × 10−168.88 × 10−160
f 6 x GWO0.037.91 × 10−24.84 × 10−22.07 × 10−2
WOA7.40 × 10−34.93 × 10−22.12 × 10−21.76 × 10−2
SO8.34 × 10−18.684.203.61
MISO1.53 × 10−52.75 × 10−41.15 × 10−51.00 × 10−4
Table 6. Predicted results table under sunny weather conditions.
Table 6. Predicted results table under sunny weather conditions.
ModelsMAERMSER2
BP2.44063.63910.97881
LSTM2.02543.57090.9796
BiLSTM1.90342.97280.98586
CNN–BiLSTM1.8132.62780.98895
SO–CNN–BiLSTM1.60912.37730.99096
MISO–CNN–BiLSTM1.42692.2130.99216
Table 7. Predicted results table under cloudy weather conditions.
Table 7. Predicted results table under cloudy weather conditions.
ModelsMAERMSER2
BP2.5344.46290.91139
LSTM2.33063.82530.93802
BiLSTM2.22993.75370.94032
CNN–BiLSTM2.11013.46320.9492
SO–CNN–BiLSTM2.01593.43320.95007
MISO–CNN–BiLSTM1.78773.15950.95772
Table 8. Predicted results table under rainy weather conditions.
Table 8. Predicted results table under rainy weather conditions.
ModelsMAERMSER2
BP1.66083.07520.89392
LSTM1.59292.70630.91785
BiLSTM1.51732.61980.92301
CNN–BiLSTM1.41192.48730.9306
SO–CNN–BiLSTM1.37282.47420.93133
MISO–CNN–BiLSTM1.33742.46890.93163
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Wang, Y.; Yao, Y.; Zou, Q.; Zhao, K.; Hao, Y. Forecasting a Short-Term Photovoltaic Power Model Based on Improved Snake Optimization, Convolutional Neural Network, and Bidirectional Long Short-Term Memory Network. Sensors 2024, 24, 3897. https://doi.org/10.3390/s24123897

AMA Style

Wang Y, Yao Y, Zou Q, Zhao K, Hao Y. Forecasting a Short-Term Photovoltaic Power Model Based on Improved Snake Optimization, Convolutional Neural Network, and Bidirectional Long Short-Term Memory Network. Sensors. 2024; 24(12):3897. https://doi.org/10.3390/s24123897

Chicago/Turabian Style

Wang, Yonggang, Yilin Yao, Qiuying Zou, Kaixing Zhao, and Yue Hao. 2024. "Forecasting a Short-Term Photovoltaic Power Model Based on Improved Snake Optimization, Convolutional Neural Network, and Bidirectional Long Short-Term Memory Network" Sensors 24, no. 12: 3897. https://doi.org/10.3390/s24123897

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop