Short Time Solar Power Forecasting Using Persistence Extreme Learning Machine Approach

Solar energy in nature is irregular, so photovoltaic (PV) power performance is intermittent, and highly dependent on solar radiation, temperature and other meteorological parameters. Accurately predicting solar power to ensure the economic operation of micro-grids (MG) and smart grids is an important challenge to improve the large-scale application of PV to traditional power systems. In this paper, a hybrid machine learning algorithm is proposed to predict solar power accurately, and Persistence Extreme Learning Machine(P-ELM) algorithm is used to train the system. The input parameters are the temperature, sunshine and solar power output at the time of i, and the output parameters are the temperature, sunshine and solar power output at the time i+1. The proposed method can realize the prediction of solar power output 20 minutes in advance. Mean absolute error (MAE) and root-mean-square error (RMSE) are used to characterize the performance of P-ELM algorithm, and compared with ELM algorithm. The results show that the accuracy of P-ELM algorithm is better in short-term prediction, and P-ELM algorithm is very suitable for real-time solar energy prediction accuracy and reliability.


Introduction
With the penetration of renewable energy into the traditional power grid, the safety of power grid operation system is brought about. Therefore, it is necessary to predict the power of renewable energy such as solar energy and wind energy accurately. Due to the uncertainties of different meteorological parameters, temperature, humidity, sunshine, cloud cover, etc., accurate solar power prediction becomes a difficult task.
In the past, there has been a lot of research on solar power prediction. Mainly through the use of statistical analysis based on data-driven formula, using historical measurement data to predict solar energy time series [1,2]. Statistical forecasting first requires mathematical relationships between changes in various factors, such as load, time consumption, and the share of total industrial output in total electricity output, before a mathematical model can be used to predict it. The process takes a long time to complete and is often used to calibrate and adjust mathematical models. Artificial intelligence technologies such as BP neural network algorithms [3], Multi-layred Perceptron Neural Network (MLPNN) models, Recurrent Back-Propagation Neural Network (RBFNN), Recurrent Neural Network (RNN) [4], Support Vector Machines (SVM) and Genetic Algorithm-Adaptive Network Based Fuzzy Inference System (GA-ANFIS) hybrid models [5]. The ELM algorithm is also used for short-term power prediction [6]. Particle swarm optimization (PSO) technique is used to update the weights and biases of the ELM model, with better performance than the BP prediction model [7]. Basic ELM models are randomly selected weights and offset matrices. Improved ELM algorithms are used to obtain better predictive results [8]. There are also studies using numerical weather forecasts or satellite imagery to build physical models to predict solar radiation intensity and PV power generation [9,10]. In practice, in order to meet the needs of decision-making, different forecasting scopes need to be considered to choose the appropriate forecasting method [11].
Since the output power of solar energy mainly depends on meteorological factors, the output power is very uncertain. The aim of this paper is to improve the accuracy of solar power prediction by machine learning. A hybrid P-ELM algorithm is used to predict the power with the persistence method and the characteristics of ELM. The temperature, daily illumination and solar output power are taken as output parameters, and the temperature, daily illumination and solar output power at the next moment are taken as output. Data collection takes 20 minutes as the interval, and 57 sets of temperature ， and the daily illumination and output power of PV a day in a certain place are collected as sample data. The proposed method has some advantages of both persistence and ELM algorithm in short time. The performance of the P-ELM algorithm is evaluated by MAE and the RMSE. The simulation results show that the P-ELM algorithm can provide the temperature, daily illumination and solar output power at the next moment, that is, are predicted 15 minutes in advance. The error performance is better than the persistence method and ELM algorithm, and it is more suitable for the practical application of solar power prediction. It can avoid the uncertainty caused by meteorological factors and effectively improve the security and stability of the power system.

Extreme Learning Machine Algorithm
The Extreme Learning Machine(ELM) algorithm is a single hidden layer feed-forward neural network (SLFN) [12]. The hidden layer does not need to be adjusted, the input weights and offsets are arbitrarily specified, and the output weights are calculated by analysis [13]. Different from the traditional single hidden layer neural network, ELM not only expects to achieve the minimum training error, but also obtains the minimum norm of the output weights.
Firstly, the weight matrix i w and bias matrix i b connecting the input layer to the hidden layer are initialized, and the number of neurons in the hidden layer is selected as L.
Then, the activation function is selected to calculate the hidden layer output. In this study, Sigmoid function is used as the activation function, and the ELM output model is shown in Formula (1).
Where, i w is the parameters of the input weight vector are arbitrarily selected to connect the input node to the ith hidden layer node, i  is the output weight vector connecting the ith hidden layer node and the output node, i b is the threshold value of the ith hidden layer node. Different from traditional learning algorithms, ELM can not only achieve the minimum training error, but also obtain the minimum norm of output weights. For feedforward neural network, it can achieve smaller training error, smaller weight norm and better network generalization performance. ELM minimizes training errors and the norm of output weights.

Persistence method
The persistence method assumes that the value at time t+x is consistent with the value at time t. In other words, the persistence technique is based on an assumption that the current value is highly correlated with the future value [14].The accuracy of short-term and very shortterm forecasting is higher than other forecasting methods, but with the increase of prediction time scale, the accuracy of continuous method will decrease rapidly [15].The model of this method is shown in Equation (2) [16].

Proposed P-ELM algorithm
The proposed P-ELM algorithm obtained by combining the persistence method and ELM algorithm has the characteristics of simple and accurate prediction of the persistence method, as well as the ability of fast learning and minimum error of ELM algorithm, whose structure is shown in Figure 1. The mathematical model of P-ELM algorithm is expressed as Equation (3) .
Where Xj represents the input vector for the j moment, Xj+1 represents the predictive output vector at time j+1, i  represents a weight matrix connecting hidden layer to the output layer,

Materials and methods
In the present work, short term Solar Power forecasting has been done in the western area of Hunan, China. The data is obtained from the Maotuping Photovoltaic Power Station in Yongshun County on the Green Power Network website. The installed capacity of the power station is 6000kW [17]. For the convenience of calculation, the relevant environment and power data of the photovoltaic module with good operation were selected. The data collected are from January 1 to January 16, 2019. From 4: 00 a.m. to 11: 00 p.m. each day, three sets of data were collected every hour, with an interval of 20 minutes. There were 57 sets of data in one day and a total of 912, of which the first 627 were used as training data and the last 285 are used for testing purpose.
The input parameters for P-ELM structure are photovoltaic power in kW, irradiance in W/m 2 , environment temperature in ℃and wind speed in m/s at tth instant, the output parameter are photovoltaic power in kW, irradiance in W/m 2 , environment temperature in ℃and wind speed in m/s at (t+1)th instant. AME and RMSE are calculated for P-ELM approach and compared with the Persistent and ELM algorithms.

Simulation and results
The forecasting methods Persistent, ELM and P-ELM are compared is shown in Figure2. In the diagram, the solar power is a normalized value. The processor of predictive simulation test environment is Intel (R) Core (TM) i7-7700HQ CPU 2.8GHz, 16G memory, win10-64-bit system, and the simulation tool is MATLAB 2018a version.  As shown in the figure 3 and 4, P-ELM has a better fitting effect than ELM algorithm. In the case of severe power variation, P-ELM can effectively reduce the power fluctuation error in the case of large weather variation.

Fig. 4. The training results and prediction results of P-ELM.
The metrics MAE and RMSE using Persistent, ELM and P-ELM are shown in Table 1. It can be seen from Table 1 that the MAE and RMSE errors obtained by using P-ELM algorithm are smaller than those obtained by the other two algorithms. The MAE error of P-ELM is 0.0221, the ELM is 0.0297, and the Persistent is 0.1210.Similarly, the RMSE error with P-ELM is 0.0615, the RMSE with ELM is 0.0854, and the Persistent error is 0.1558. In real-time simulation system, P-ELM predicts the running time of 0.0156s, excluding the time of training and determining the output weights. While it is 0.0313s and 0.0166s for the Persistence and ELM respectively. The results show that the proposed P-ELM algorithm can ensure the reliability and effectiveness of the real-time prediction system when applied to solar power prediction.

Conclusion
In the present paper, a novel hybrid P-ELM algorithm has been applied P-ELM to solar power prediction. The temperature, radiance and the output power of the current time are taken as the input conditions of the next step, and the high correlation of the data is preserved. The prediction of temperature, radiance and output power is achieved 20 minutes in advance. The prediction of ultrashort time by persistence method is very accurate, however, the prediction accuracy will decrease with the increase of sampling time interval. Therefore, this method is only suitable for short and ultra-short time power prediction applications. P-ELM algorithm combines the characteristics of high-speed training of ELM algorithm, and can be applied to short-term realtime prediction of solar output power.
Science and Technology Innovation Program of Xiangxi Autonomous Prefecture 2018SF5019