Accurate photovoltaic (PV) power prediction can effectively help the power sector to make rational energy planning and dispatching decisions, promote PV consumption, make full use of renewable energy and alleviate energy problems. To address this research objective, this paper proposes a prediction model based on kernel principal component analysis (KPCA), modified cuckoo search algorithm (MCS) and deep convolutional neural networks (DCNN). Firstly, KPCA is utilized to reduce the dimension of the feature, which aims to reduce the redundant input vectors. Then using MCS to optimize the parameters of DCNN. Finally, the photovoltaic power forecasting method of KPCA-MCS-DCNN is established. In order to verify the prediction performance of the proposed model, this paper selects a photovoltaic power station in China for example analysis. The results show that the new hybrid KPCA-MCS-DCNN model has higher prediction accuracy and better robustness.
With the world's energy crisis becoming increasingly serious and the environmental pollution caused by the burning of fossil fuels intensifying, the development of clean and renewable energy has become the consensus of the entire human race [
Photovoltaic power is affected by real-time weather and diurnal alternation, and is significantly volatile, random and intermittent. Fluctuations in the total amount of PV power on the grid will have a significant impact on the safety and stability of the power system, as well as on the scheduling of the power system, the marketing of power and the bidding of the power generation companies for the grid [
In terms of PV power prediction, there have been related studies at home and abroad, in which the prediction methods are mainly divided into two categories: physical methods and statistical methods [
Statistical methods refer to the employment of historical data to find the intrinsic laws between data changes and data relationships, and thus to accomplish forecasting [
The true computational power of neural networks came into play in 2006 when Professor Hinton of the University of Toronto pioneered the “multi-layer structure, layer-by-layer learning” deep neural network [
Although DCNN has shown good prediction performance, it still suffers from the problem of blind parameter selection and therefore needs to be optimized by choosing a suitable intelligent algorithm [
Furthermore, there are many factors affecting PV power that are coupled with each other, and if all the influencing factors are used as input indicators for the prediction model, there will be a large amount of redundant data, so feature selection is also important [
To sum up, this paper constructs a PV power prediction model based on a modified CS algorithm to optimize DCNN, and applies KPCA to reduce PV power influencing factors. The remainder of the article is organized as follows. The second part introduces the algorithms used in paper, which include KPCA, modified cuckoo search algorithm and DCNN model. The third section constructs a complete framework for PV power prediction. The accuracy and robustness of the proposed models are tested and analyzed in the fourth section using practical examples. The fifth section summarizes the research results of paper.
PCA, as a multivariate statistical method that combines multiple variables into a few, has a good treatment when dealing with individual indicators that have a strong linear relationship [
Kernel principal component analysis is a non-linear principal component model that maps the initial input variables to a high-dimensional feature space through a non-linear transformation, reducing the dimensionality of the input variables while retaining the non-linear information between them, in order to accurately extract the important information features between the variables to obtain the main input indicators. This methodology can compress information contained in a large number of indicator variables into a small number of composite variable indicators that reflect the original information characteristics, and deal with the non-linear relationships between variables through the analysis of the composite variable indicators, while ensuring that the loss of information in the original data is minimized. The underlying steps are as follows [
Set a group of random vectors
The covariance matrix is obtained as follows:
The eigenvalue and eigenvector can be obtained as follows:
As a result, the kernel principal component can be calculated by referring to extraction technique of traditional PCA.
Cuckoo search algorithm is a novel heuristic algorithm proposed by Professor Xinshen Yang and S. DEB of Cambridge University in 2009 [
The core idea of CS is the breeding pattern of cuckoo and Levy flight [ Breeding pattern of cuckoo
According to the long-term observation and research of entomologists, cuckoos do not raise their offspring, but secretly put their nestling birds in the nests of other birds. If they are not found by the owner of the nest, the offspring will be raised. All along, cuckoo does not build nests or hatch young eggs. It will search for birds which have similar shapes and sizes of eggs. These birds also have similar breeding period and similar feeding habits. Cuckoo will watch other birds. When they leave the nest, cuckoo will quickly lay eggs in Orioles, skylarks and other birds’ nests, and let them hatch on their own behalf. Because the color and size of the eggs are very similar, cuckoo will remove one egg from its original nest before laying eggs, and at the same time they give birth to one of its own, so that its young can enjoy the care of other birds. The cuckoo's characteristic is to find a nest, parasitize and incubate. CS is a simulation of this behavior. The core idea is to regard the nest selected by cuckoo as the distribution of solution in space, and whether the nest location is good or not symbolizes the fitness value of the solution to the problem. The series of proceedings of the cuckoo searching and deciding on a nest represents the whole process of optimization performed by the algorithm.
Levy flight
CS adopts Levy flight search method, which satisfies random distribution of heavy tail. The walking step length is short distance and long distance, which will show up alternately. Employing Levy flight mode can increase search space, expand population diversity and jump out of local optimum. Several important parameters in Levy distribution are characteristic index
The probability density function of Levy flight distribution is shown below:
The jump distribution probability density function of Levy flight is presented in the following formula:
Since Levy flight is a function of second-order divergence, its jumping in motion is very large.
CS has been successfully applied to the field of nonlinear optimization, and has obtained good optimization results. It has excellent local and global convergence, and it needs fewer parameters. Consequently, it has a strong robustness and high search efficiency. However, in the process of optimization, it has been found that Cuckoo search algorithm emerges with some drawbacks such as slow convergence speed and long operation time [
Random weight is a dynamic approach to select weights from Gaussian distribution. This method can avoid CS falling into local optimum in the initial stage of search, and the random appearance of large and small weights can also improve the slow convergence speed and low precision of the algorithm in the later stage.
The random weight obeys Gaussian distribution,
Step 1: Determine the optimization function
Step 2: Calculate objective function
Step 3: Keep the optimal position of the previous nest
Step 4: Compare the updated nest position
Step 5: Compare the random number of the possibility of the nest owner to discover the eggs of foreign birds compared with the probability of discovery (the parameter value has been determined in the parameter setting). If
Step 6: Output the global optimal solution which satisfies the above conditions, including
A deep convolutional neural network is an artificial neural network with deep learning capability, mainly characterized by locally connected and shared weights of neurons in the same layer. Convolutional neural networks are generally composed of multiple feature extraction layers and a fully connected layer at the end, with each feature extraction layer consisting of a convolutional layer and a sub-sampling layer. The neuron nodes between layers in deep convolutional neural networks are no longer in the form of full connectivity, but rather the neuron nodes of each adjacent layer are linked to only the upper layer neuron nodes that are close to it exploiting the layer space correlation. In other words, local connectivity is achieved, which greatly reduces the parameter size of the network [
A classic DCNN structure mainly consists of the input layer, the convolutional layer, the subsampling layer and the fully connected layer. The convolutional layer is mainly utilized for feature extraction through convolutional kernels to achieve feature vector extraction and enhancement [
The subsampling layer is mainly employed to subsample the features of the convolutional layer by performing a “pool averaging” or “pool maximization” operation [
The data obtained after the above convolutional and subsampling layers will eventually be connected to the fully connected layer [
In the aforementioned calculation process, each convolutional kernel is repeatedly applied to all the input data by sliding, and multiple sets of output data are obtained by convolving several different convolutional kernels, with the same convolutional kernel having the same weight, and the output data of different sets are combined and then output to the sub-sampling layer. The sub-sampling layer takes the output data of the previous convolutional layer as input data, first sets the range of value locations, then fills the range with the average or maximum value of the range by sliding, and finally combines these data to obtain the reduced dimensional data and outputs the result through the fully connected layer [
The application of DCNN for PV power prediction has two major advantages: firstly, it allows for the existence of malformed data; secondly, it reduces the number of some parameters through local connectivity and weight sharing, which improves the efficiency and accuracy of PV power prediction. However, the number of parameters that need to be trained in the prediction application needs to be determined subjectively, which affects the stability of the prediction results. To further improve the operational efficiency and prediction accuracy, this paper will adopt the MCS algorithm to optimize the parameters of DCNN.
Based on the aforementioned theory, the KPCA-MCS-DCNN prediction model is constructed in this paper.
As depicted in Select initial input variables (xi) and process data. By analyzing the PV power characteristics, generate the initial set of input variables X={xi,i = 1,2,… n}, and standardize data of each input factor (xi). Extract features via KPCA. After Step (1), the original input variable matrix X is generated, and the Gaussian kernel function is selected for the non-linear mapping function. After the non-linear transformation of Initialize parameters. Initialize the weights Optimize DCNN with MCS. If the conditions are met, the optimal parameters are obtained; if the conditions are not met, the MCS optimization algorithm is executed again until the set of solutions that meet the conditions is obtained. Simulation prediction. The prediction model obtained from the above optimization training is employed to predict PV power, and the proposed model is compared with MCS-DCNN, CS-DCNN, DCNN and BPNN. Furthermore, the results are analyzed and evaluated by adopting root mean square error (RMSE), mean absolute percentage error (MAPE) and mean absolute error (MAE). These three indicators are calculated as follows [
where
The data used for the calculations in this section is from a PV farm in China. In this paper, weather data and PV power data are selected as the initial input features for the model. In particular, weather data contains 12 independent variables: total precipitation, cloud ice content, surface air pressure, relative humidity, total cloud cover, horizontal wind speed, vertical wind speed, atmospheric temperature, surface solar radiation, ground thermal radiation, extra-atmospheric solar radiation and sediment amount. In addition to these factors, the PV power data at
The variance contribution and cumulative contribution of the 18 indicators are illustrated in
Ingredients | PCA | KPCA | ||
---|---|---|---|---|
Contribution of variance/% | Cumulative variance contribution/% | Contribution of variance/% | Cumulative variance contribution/% | |
1 | 32.56 | 32.56 | 70.39 | 70.39 |
2 | 25.29 | 57.85 | 16.29 | 86.68 |
3 | 16.15 | 74 | 8.92 | 95.6 |
4 | 9.57 | 83.57 | 3.16 | 98.76 |
5 | 5.95 | 89.52 | 0.77 | 99.53 |
6 | 3.28 | 92.8 | 0.35 | 99.88 |
7 | 2.25 | 95.05 | 0.06 | 99.94 |
8 | 2.08 | 97.13 | 0.05 | 99.99 |
9 | 1.22 | 98.35 | 0.01 | 100 |
10 | 0.99 | 99.34 | 0 | 100 |
11 | 0.35 | 99.69 | 0 | 100 |
12 | 0.19 | 99.88 | 0 | 100 |
13 | 0.09 | 99.97 | 0 | 100 |
14 | 0.02 | 99.99 | 0 | 100 |
15 | 0.01 | 100 | 0 | 100 |
16 | 0 | 100 | 0 | 100 |
17 | 0 | 100 | 0 | 100 |
18 | 0 | 100 | 0 | 100 |
As can be seen from
The coefficients of the selected principal components are found by dividing each autonomous component loading vector by the arithmetic square root of the eigenvalues of each autonomous component, and the output component matrix is calculated as displayed in
Factor | Component | ||
---|---|---|---|
1 | 2 | 3 | |
x1 | −0.770 | −0.072 | −0.744 |
x2 | 0.683 | 0.262 | 0.310 |
x3 | −0.454 | 0.243 | 0.756 |
x4 | −0.290 | 0.575 | −0.798 |
x5 | 0.471 | −0.010 | 0.464 |
x6 | 0.429 | −0.637 | 0.416 |
x7 | −0.734 | 0.803 | −0.849 |
x8 | −0.789 | −0.085 | −0.523 |
x9 | −0.121 | 0.672 | −0.837 |
x10 | −0.092 | −0.171 | 0.805 |
x11 | 0.303 | 0.560 | −0.433 |
x12 | −0.217 | −0.544 | 0.664 |
x13 | −0.795 | −0.766 | −0.188 |
x14 | 0.733 | 0.003 | −0.262 |
x15 | −0.466 | 0.012 | −0.363 |
x16 | 0.470 | 0.419 | −0.578 |
x17 | 0.023 | −0.481 | 0.778 |
x18 | −0.109 | 0.864 | 0.991 |
This section compares the different forecast effects for the spring, summer, autumn and winter. April 2019, July 2019, October 2019 and January 2020 are taken as representatives of the spring, summer, autumn and winter respectively for forecasting. Eight days are selected as the test sample, and the remaining data are employed as the training sample.
As can be seen in
Parameters | Spring | Summer | Autumn | Winter |
---|---|---|---|---|
RMSE | 1.236 | 1.119 | 1.333 | 1.556 |
MAPE | 1.820 | 1.568 | 1.894 | 2.015 |
MAE | 0.798 | 0.673 | 0.951 | 1.167 |
To demonstrate the prediction performance of KPCA-MCS-DCNN, four models, namely MCS-DCNN, CS-DCNN, DCNN and BPNN, are selected for comparison in this paper. The spring test sample is discussed below as an example.
First, the maximum and minimum relative distances between the actual power values and the predicted values can be seen in
As can be seen from
Parameters | KPCA-MCS-DCNN | MCS-DCNN | CS-DCNN | DCNN | BPNN |
---|---|---|---|---|---|
RMSE | 1.236 | 1.738 | 2.059 | 2.825 | 3.354 |
MAPE | 1.820 | 2.685 | 3.672 | 4.053 | 5.773 |
MAE | 0.798 | 1.281 | 1.711 | 2.002 | 2.822 |
In conclusion, the proposed model can effectively reduce the PV power prediction error by optimizing the DCNN model with the MCS algorithm. KPCA model can not only reduce the noise data of the input variables and improve the validity of the input information, but also ensure the integrity of the input information, thus improving the accuracy and robustness of PV power prediction. The effectiveness of the proposed PV power prediction model is demonstrated by the data calculation results.
Solar energy, as a low operating cost, wide range of applications, inexhaustible, environmentally friendly and harmless renewable energy, has a broad development prospect in the field of electricity. However, the power output of photovoltaic power generation utilizing solar energy as the energy source is greatly influenced by the weather and fluctuates significantly. The instability of PV power has a large impact on the power grid, making it very difficult to plan and control the power system. Consequently, achieving more accurate PV power prediction can effectively help the power sector to make reasonable energy planning and dispatching decisions and promote PV consumption. In this paper, a novel approach for PV power prediction based on KPCA-MCS-DCNN is proposed, in which the key factors are extracted employing KPCA. These key factors are brought into DCNN for learning and training, and MCS is applied to optimize the parameters in DCNN, thereby enhancing its prediction accuracy. An empirical analysis is carried out on a PV plant in China as an example, and MCS-DCNN, CS-DCNN, DCNN and BPNN are selected for comparison with the proposed model. The experimental results verify that the proposed model has better prediction accuracy than the comparison model and can achieve good prediction results, thus providing a new idea and reference for PV power prediction. The main conclusions are summarized as follows:
The input indexes of the PV power prediction model are downscaled and analyzed by KPCA, while PCA is selected for comparison. It can be concluded that the dimensionality reduction of KPCA is significantly stronger than that of PCA, and KPCA ensures sufficient information of the original data even with fewer principal components. The innovative KPCA-MCS-DCNN model is proposed and applied to PV power prediction with RMSE of 1.236, MAPE of 1.820, and MAE of 0.798 in the spring test dataset. On the basis of KPCA to extract principal components, this hybrid model optimizes the DCNN model employing the MCS algorithm. Hence, a complex relationship between input data and PV power is constructed to predict short-term PV power. MCS-DCNN, CS-DCNN, DCNN and BPNN are selected for comparison and it is concluded that the proposed power prediction model has higher prediction accuracy and more satisfactory robustness. The different prediction results of spring, summer, autumn and winter seasons are obtained utilizing KPCA-MCS-DCNN and excellent prediction results are all achieved. All of these indicate that the robustness of the proposed model in this paper is better.
In brief, this paper starts from dimensionality reduction of PV power prediction impact factors, and then proposes a hybrid deep learning model based on MCS-DCNN to predict short-term PV power and compares it with other four intelligent prediction models. In future research, more advanced deep learning models can be employed for PV power prediction to obtain more accurate PV power prediction results. In addition, there is room to improve the prediction speed of deep learning models.
Autoregressive integrated moving average model
Autoregressive moving average model
Autoregressive moving average model with exogenous inputs model
Autoregressive model with exogenous input
Back propagation neural network
Convolutional neural networks
Cuckoo search algorithm
Deep convolutional neural networks
Genetic algorithm
Kernel principal component analysis
Mean absolute error
Mean absolute percentage error
Modified cuckoo search algorithm
Principal component analysis
Particle swarm optimization
Photovoltaic
Root mean square error
Support vector machine