Ultra-short-term Photovoltaic Power Prediction Based on VMD-LSTM-RVM Model

Aiming at the randomness and obvious fluctuation of photovoltaic power, this paper proposes a method that combines Variational Modal Decomposition (VMD), Long Short-Term Memory (LSTM) network and Relevance Vector Machine (RVM) to achieve ultra-short-term photovoltaic power prediction. Firstly, the VMD decomposition technology is used to decompose the historical photovoltaic power sequence into different modes to reduce the non-stationarity of the data; then an LSTM prediction model is established for each mode, and the modal prediction values are reconstructed to obtain the power prediction value; in order to further improve the prediction accuracy of the model, the error sequence is modeled and predicted by RVM; finally, the prediction power value and the prediction error value are superimposed to obtain the final prediction result. Simulation results show that this method effectively improves the accuracy of photovoltaic power prediction.


Introduction
Solar power generation can not only reduce environmental pollution, but also improve the energy structure. However, with the popularity of solar power generation, it also brings difficulties to the dispatch of the grid. Photovoltaic power generation completely relies on random and uncontrollable solar irradiance and other measurement factors, such as the influence of atmospheric temperature, photovoltaic module temperature, wind speed, wind direction, humidity, etc., so the power generation also fluctuates randomly. Therefore, it is of great significance to accurately predict photovoltaic power generation [1].
At present, domestic and foreign scholars have proposed a lot of methods for photovoltaic power prediction. These methods can be divided into direct forecasting and indirect forecasting [2]. The direct prediction is to establish a model based on weather conditions to directly predict the output power; while indirect prediction requires first to predict the solar irradiance, and then use the irradiance to predict the photovoltaic power [3].Commonly used direct forecasts can be mainly divided into:neural network [4][5], Time series method [6], Support Vector Machines [7][8] And extreme learning machine [9][10]. Yang  [11] By weather classification, select similar days. The empirical decomposition method (EMD) is used to decompose the historical actual power into multiple eigenmode function (IMF) components, and a least square support vector machine (LSSVM) prediction model is established to predict the various moments of each component. Finally, each predicted component is reconstructed to obtain the predicted power. In [12], for the periodicity of the load, frequency domain decomposition is used to extract the periodicity of the load. And the remaining high frequency components continue to use Mallat algorithm for secondary decomposition, and decompose them into high frequency and low frequency. According to the characteristics of each component, different methods are selected for modeling, and each component is reconstructed to obtain the load forecast. For short-term load forecasting of photovoltaic power, isolated forests are used for data cleaning, and an LSTM prediction model is established to predict short-term photovoltaic power generation. In [13], a photovoltaic power prediction method based on Recurrent Neural Network (RNN) neural network is proposed. RNN is used to extract the non-linear characteristics of adjacent day and intraday data, and power prediction is based on this.In [14], the wavelet decomposition technology is used to decompose the original wind power data, and then the least squares support vector machine is used to predict the decomposed signal, and the LSSVM model is used to model and predict the error sequence.In [15], the back propagation neural network (GSA-BP) optimized by the gravity search algorithm is used as the basic prediction method for prediction, and the corresponding wind power error correction model is established for different fluctuation processes, and the linear model and the GSA-BP nonlinear model are combined. Correct the prediction error, and use the sum of the error prediction value and the power prediction value as the final power prediction value.
In this paper,VMD decomposition technology is used to decompose the photovoltaic power sequence to reduce the complexity and non-stationarity of the original data. For each component, a LSTM prediction model is established, and the predicted value of each component is superimposed and summed to obtain a preliminary power prediction value. Due to the limitation of the prediction model, there will be fixed errors when predicting photovoltaic power. In order to further improve the prediction accuracy of the model, by analyzing the characteristics of the error sequence, the RVM model is used to model and train the error sequence to obtain the error prediction. The final prediction result is the sum of the prediction error and the prediction power. The experimental results show that the prediction model proposed in this paper has a better prediction effect.

Variational Mode Decomposition (VMD)
Variational Mode Decomposition (VMD) as a new signal decomposition technology, mainly decomposes the initial signal into multiple sub-modal signals, each corresponding to a center frequency. VMD obtains the center frequency and modal bandwidth by constructing a constrained variational model. The constrained variational model is: In order to solve the optimal solution of equation (1), the above equation is transformed into an unconstrained variational problem by introducing a secondary penalty factor α and Lagrangian multiplier λ: Where:α Is the penalty parameter, λLagrange multiplier. The ADMM algorithm is used for iterative calculation to obtain the (2) saddle point, and the modal component is solved k u And center frequency k w : Where: fourier transform, n is the number of iterations.

Long short-term memory network (LSTM)
LSTM neural network belongs to recurrent neural network (RNN). But LSTM overcomes the problem of long-term dependence of RNN by creating a special type of structure (called memory unit and gate unit), and at the same time can overcome the problem of "gradient explosion". Figure 1 shows the first layer of the LSTM at time t.  Figure 1 that when the sequence input is, the output of the three thresholds and the memory cell is as follows [16]: is the bias term, σ is the sigmoid activation function, tanh is the hyperbolic tangent activation function, "  "is scalar multiplication.

Relevance Vector Machine, RVM
RVM is a method proposed based on the sparse Bayesian learning theory. Suitable for nonlinear classification and prediction, with advantages such as automatic parameter setting and arbitrary use of kernel functions [17]. Where,

Short-term photovoltaic power prediction modeling based on VMD-LSTM-RVM model
Suppose the historical photovoltaic power sequence is P, through VMD decomposition, the subsequences with different center frequencies can be obtained, which are respectively set as 1 u , 2 u , …, k u , where the K value can be determined by the center frequency.The methods of modeling and forecasting time series mainly include neural network and support vector machine method. As a deep learning algorithm, LSTM neural network has strong learning ability and nonlinear fitting ability. The prediction model it constructs has strong adaptability in time series data analysis, and can effectively use photovoltaic historical power series [18].The time series of each mode of photovoltaic power can be expressed as  By analyzing the error curve, it can be obtained that for dates with similar actual output power curves, the error curve obtained is also approximately the same. Therefore, when the forecast day and the historical day have similar weather conditions, the error sequence obtained will also be similar. Consider the establishment of a non-linear model between weather conditions and errors. Through training, the prediction error of the prediction day can be obtained. Since the correlation vector machine (RVM) has a better fitting ability for non-linear prediction, RVM is used to adjust the error sequence E Carry out modeling prediction. Because the output of photovoltaic power is affected by irradiance, temperature, humidity, scattering, wind speed and wind direction, etc., this paper selects the relatively high irradiance, temperature, humidity and scattering as the RVM model Input, the output of the model is E. The  (2) The historical power sequence P is decomposed by VMD, and K sub-sequences of different modes are obtained, respectively denoted as 1 2 , ,..., k u u u , and K is the number of modes.
(3) Use LSTM to train and predict the decomposed i u .
(4) Reconstruct and sum the predicted values of each mode to obtain the preliminary predicted power

Experiment and Analysis
This paper selects data from the Australian DKA Solar Centre site from January to March 2017, from 08:00 to 18:00 every day for simulation verification. For the system to collect data every 5 minutes, this paper selects photovoltaic data with a time period of 10 minutes for simulation. Analysis. A total of 5 100 sampling points in the first 85 days (January 1 to March 26) are used as the training set, and a total of 300 sampling points in the next 5 days (March 27 to March 31) are used as the test set. VMD decomposition needs to select the appropriate modal number K value in advance, usually the value range of K is usually 2-8 [19]. Set different K values to test, determine the K value with similar frequency for the first time, and get the modulus The number of state decomposition is K-1. It can be seen from the table that when the value of K is 8, there are two modes with similar center frequencies of 90.2915 and 208.9128. Therefore, the value of K in this paper is 7. When the value of K is 7, VMD is used the decomposed sequence diagrams are shown in Figure 3. When LSTM is used for training and prediction for each mode, select the time data points of the previous 2 hours (12 in total) to predict the value of the next time point, and obtain the value by summing and reconstructing the predicted value of each mode Predicted value of photovoltaic power. Due to the error in the decomposition and prediction of VMD, consider analyzing the error, as shown in Figure 4 for the resulting error sequence diagram. Figure 5 is a partial error sequence diagram of Figure 4, and Figure 6 is a diagram 5 Actual power graph of some sunny days corresponding to historical days.   Figure 5 and Figure 6, it can be seen that for weather days with similar actual output power in historical days, the error sequence obtained is also approximately the same. Because the power output is mainly affected by irradiance, temperature, humidity and scattering Therefore, the four influence shadows are used as the input of the RVM model, and the error sequence is used as the output of the RVM model for training and prediction. The error prediction value and the photovoltaic power prediction value are added to obtain the final power prediction value.

Fig. 3 VMD decomposition result
In order to verify the effect of the model, LSTM, VMD-LSTM and VMD-LSTM-RVM were used to compare the photovoltaic power prediction results. Figure 7 shows 6 different models at 08:00-18 March 27th-March 31st: 00 time forecast curve, Table 2 lists the average absolute percentage error (MAPE) and root mean square error (RMSE) of different models from March 27th to March 31st from 08:00 to 18:00.  From the comparison of the prediction curves of the six models in Figure 5 and the prediction errors in Table 2show: (1) For weather with small actual power fluctuations (as shown in Figure 7(b) and Figure 7(d)), the predicted power curve of the LSTM model is closer to the original power curve than the SVM model. Similarly, for the figure In several different weathers, after the actual output power is decomposed and noise-reduced by EMD, the predicted power curve obtained is closer to the actual output power curve. And the prediction accuracy of the EMD-LSTM model is higher, and the overall fluctuation is smaller.
(2) For weather with small actual power fluctuations (as shown in Figure 7(b) and Figure 7(d)), several models can achieve better predictions. But after EMD and VMD decomposition, the EMD-LSTM model and Compared with the LSTM model, the VMD-LSTM model has reduced prediction errors, indicating that the LSTM network has a better fitting ability in the prediction of stable time series.
(3) For weather with large fluctuations in actual output power and sudden power changes (as shown in Figure 7(a) and Figure 7(c)), although the prediction error is reduced after EMD decomposition, the error and fluctuation are still large. Since VMD decomposition can avoid aliasing in sub-modes, the prediction accuracy of the VMD-LSTM model is improved by 2.5%-30.06% compared to the EMD-LSTM model.
(4) Due to the memory characteristics of the LSTM network, the LSTM network has strong modeling capabilities for time series. Therefore, the VMD-LSTM model has good prediction accuracy for the above types of output power, especially fluctuations The prediction accuracy of smaller weather (as shown in Figure 7(d)) can reach 1.88%. Using the RVM model to predict the error, the prediction accuracy can be improved by 0.54%-2.18%. For the VMD-LSTM-RVM prediction model mentioned in this article, both the overall accuracy MAPE and the error fluctuation RMSE are improved compared to other models. The average 5-day MAPE and RMSE are 5.12% and 4.80.

Conclusions
This paper uses VMD to decompose the original sequence, and uses the LSTM model to train the decomposed sequence. The following conclusions can be drawn through simulation experiments: (1) The LSTM network has strong modeling capabilities for time series. Therefore, for stable time series, the LSTM prediction model has higher prediction accuracy and relatively small overall fluctuations than the SVM model.
(2) In view of the randomness of photovoltaic power, the time series of the original photovoltaic power is decomposed into multiple sub-modes using EMD or VMD decomposition technology, which can reduce the complexity of the time series and obtain a relatively stable time series.
(3) Since VMD can avoid aliasing in sub-modes, better prediction results can be obtained after VMD decomposition.
(4) By analyzing the error curve between the original power and the predicted power of the VMD-LSTM model, for weather with similar actual output power, the error curve obtained is also approximately the same. Therefore, using the RVM model to predict the error can be further Improve prediction accuracy.