Particle Filter-Based Electricity Load Prediction for Grid-Connected Microgrid Day-Ahead Scheduling

This paper proposes a particle filter (PF)-based electricity load prediction method to improve the accuracy of the microgrid day-ahead scheduling. While most of the existing prediction methods assume electricity loads follow normal distributions, we consider it is a nonlinear and non-Gaussian process which is closer to the reality. To handle the nonlinear and non-Gaussian characteristics of electricity load profile, the PF-based method is implemented to improve the prediction accuracy. These load predictions are used to provide the microgrid day-ahead scheduling. The impact of load prediction error on the scheduling decision is analyzed based on actual data. Comparison results on a distribution system show that the estimation precision of electricity load based on the PF method is the highest among several conventional intelligent methods such as the Elman neural network (ENN) and support vector machine (SVM). Furthermore, the impact of the different parameter settings are analyzed for the proposed PF based load prediction. The management efficiency of microgrid is significantly improved by using the PF method.


Introduction
Since the increasing penetration level of renewable-based distributed generators (RE-DGs) such as photovoltaic-based (PV) arrays and wind turbines [1], the energy management and operation of a microgrid becomes more challenging. The uncertainty introduced by these RE-DGs and electricity loads emphasizes the importance of an accurate prediction method in the microgrid day-ahead scheduling [2,3]. The neural network method is a typical representative of data-driven forecasting methods. It is widely used in the predicting electricity load [4][5][6]. A variety of new neural network structures are produced by combining with other techniques in forecasting research, such as Elman neural network (ENN) [7][8][9], recurrent neural networks (RNN) [10][11][12][13], recurrent extreme learning machine (RELM) [14]. These new neural networks not only have the structural advantages of traditional neural networks, but also have some improvements in calculation efficiency and operating cost. Besides, some mature artificial intelligence algorithm models (such as support vector machines (SVM) [15][16][17][18], support vector regression (SVR) [19,20], and fuzzy logic [21,22]) that used to solve prediction problems with nonlinear characteristics, are applied to forecast electricity load. Due to the difference of the practical problems and the diversity of feature selection methods, there is no regular feature selection model method and various classifiers have different effects on the result of feature selection. It is difficult to determine which feature selection method can bring optimal estimated performance to the model for the first time when facing practical problems. Another important factor affecting data-driven method is data sampling.
In practice, the data provided to the power load system is affected by the operative mode of the equipment, and the operating environment, which are regularly non-linear and non-Gaussian as shown in Figure 1. It can not accurately predict for traditional intelligent forecasting models. To get more accurate prediction results, A hybrid model based on improved empirical mode decomposition, autoregressive integrated moving average, and wavelet neural network optimized by fruit fly optimization algorithm is presented by Zhang et al. [23]. The hybrid model divided the state information of power load into two parts: linear and nonlinear. The linear part is regarded as a definite linear time series, which changes steadily with time. The nonlinear part has high volatility and randomness, which is mainly affected by historical power load and future weather conditions (such as temperature). However, this disadvantage is to increase the calculation cost and accumulated error caused by the separate calculation. For addressing the issues in data-driven, the particle filter (PF) method is introduced to electricity load forecasting, and optimal assign power references to make better decisions in microgrid day-ahead scheduling. According to the literatures, PF-based method has been widely used in remaining useful life forecasting [24][25][26][27], filtering and state estimation for nonlinear systems [28][29][30]. Since the particle filter is on the basis of Bayesian sampling estimation, it is better suitable for solving nonlinear and non-Gaussian problem. As a sequential important sampling (SIS) filter algorithm, the probability density function (PDF) of the particle filter is represented by particles. The PDF will change with particles. Therefore, the prediction precision of the PF-based method is higher than the traditional function-driven method for electricity power load. To our knowledge, this is the first description in the literature of the using PF-based method for electricity load forecasting in day-ahead scheduling. Our work and innovation are emphasized in the rest of this paper which is organized as follows: Section 2 provides deterministic grid-connected microgrid day-ahead scheduling formulation is built. Section 3 is the description of the PF method. Comparison results on a distribution system with ENN-based method and SVM-based method are shown in Section 4. The analysis results of Day-ahead scheduling are also presented in this section. The influence factors and the number of particles for the PF method are discussed in Section 5. The final section concludes the paper.

Deterministic Grid-Connected Microgrid Day-Ahead Scheduling Formulation
As the same as most previous studies, the deterministic grid-connected microgrid day-ahead scheduling can be regarded as the nonlinear optimization problem Formula 1 [31]: All parameters and corresponding notations are shown in Table 1. Table 1. Nomenclature, reprint with permission [31], 2017, IET GTD.

Notations Denotation
P Ci,t (Q Ci,t ) Active (reactive) power output of the ith controllable DG at tth time interval c i,t Generation price of the ith controllable DG at tth time interval P Di,t Active (reactive) power demand of the i-th load at t-th time interval P Ni,t Active (reactive ) power of the i-th uncontrollable DG at t-th time interval P grid,t Active power injected from the grid at t-th time interval c grid,t Electricity price at tth time interval θ i,j,t Voltage angular difference between bus i and bus j at tth time interval G i,j,t , B i,j,t Elements of the admittance matrix at t-th time interval SL i,j,t Instantaneous power in the branch connecting bus i and bus j at t-th time interval V i,t Voltage at the i-th bus at t-th time interval θ i,j,min , θ i,j,max Lower and upper limits of the voltage angular difference SL min , SL max Minimum and maximum instantaneous power in the branch connecting bus i and bus j P Cimin ,P Cimax Minimum and maximum active power of controllable DG i Q Cimin ,Q Cimax Minimum and maximum reactive power of controllable DG i P Nimin ,P Nimax Minimum and maximum active power of uncontrollable DG i Q Nimin ,Q Nimax Minimum and maximum reactive power of uncontrollable DG i P Gridimin ,P Gridimax Minimum and maximum active power injected to or absorbed from the grid V imin ,V imax Minimum and maximum voltage at bus i For this microgrid day-ahead scheduling, the main objective is to obtain optimized cost by rationalizing the distribution which utilizes forecasted power production P Ni,t from uncontrollable DGs and loads demand P Di,t of power references P Di,t for all controllable DGs. It can be seen from the cost function as shown in formula 1, the P grid,t is an active power. It means that the P grid,t can be either positive or negative. When P grid,t is positive, it needs to be injected from the main grid. Because the power produced by the DGs is less than the consumed power by load. On the contrary, when P grid,t is negative, the power produced by the DGs is more than the consumed power by load, it can be transported to the main grid. As shown in Figure 2, the photovoltaic prediction data, the time of use (TOU) electricity price, and all-day prediction load data are the main input parameters for day-ahead optimal scheduling. Since the TOU is fixed, the PV is relatively stable and less fluctuation, the accuracy of OPF is mainly determined by the precision of the electricity power load prediction. Hence, it is imperative to accurately predict electricity power load demand. Since the variation of actual electricity load is drastic and non-Gaussian distribution, it is a huge challenge to predict electricity load by using the general prediction method. Moreover, OPF is not a linear system model due to it consisting of various kinds of noise distributions. Although we use the Modified Harr two-point model to estimate the variation ranges, it cannot accurately predict the electricity load. The estimation accuracy and efficiency of this method are easily infected by the number of input variables. In the past, the traditional Kalman filter (KF) was extensively used to load forecasts. However, the deficiency of KF-based method is that it is not suitable for the non-Gaussian and nonlinear system dynamics of electricity load. Furthermore, the calculation burden of the KF-based method is too heavy. Since the particle filter is on the basis of Bayesian sampling estimation, it is better suitable for solving nonlinear and non-Gaussian problem. As a sequential important sampling (SIS) filter algorithm, the probability density function (PDF) of the particle filter is represented by particles. The PDF will change with particles. Hence, satisfactory prediction results were achieved by utilizing PF-based method for electricity power load in grid-connected microgrid day-ahead scheduling.

Particle Filtering Based Prediction
As mentioned above, the actual electricity load system is nonlinear and non-Gaussian, so it is unsuitable to analyze the electricity load forecasting problem using analytic methods. Particle Filter which also called Bayesian Importance Sampling relies upon a sequential important sampling (SIS) filter algorithm. For nonlinear and non-Gaussian systems, it is often complicated to get an analytic solution. In order to avoid the problem, the integration is used to investigate the solution of nonlinear operator equation in the PF-based method. Furthermore, the integral calculations are substituted by a series of particles. According to their importance, the particles will be given different weights in the posterior probability density. The error between the distribution characteristics represented by particles and the posterior probability distribution of the system state gradually decreases as the number of particles increased. When the particles reached a certain scale, it is approximately equal to each other. TheP i D t represents active power demand. In the paper, it can be estimated by the probability density function which is constructed from measured active power. The details are as follows : The t and ∆T represent time step and sampling interval, respectively. The P i D t is the required power in the starting stage. According to iteration criteria, the value of P i D t can be calculated the P i D t−1 . In addition, theP i D t represents the measured value by sensor. The λ represents degradation or increasing rate, C represents discrete change with unusual demand active power. λ, C follow the complex Gaussian distribution with χ(0, ω 2 ), χ(µ, ω 2 ). The ν t is random noise at time step t .
Similar to other SIS algorithms, the posterior PDF p(x t |Z t ) can be represented by a set of random particles x i t (i = 1, 2, ..., N) with their associated weights w i t as follows: where i is the i-th particle, N is the number of particles. The weights w i t for each particles is variable and constantly updating. It is determined by the observed values of the system. For each particle, where, Z t is the observed value, x t is the unobserved system state, p(x t |x t−1 ) is the transition density function. and the q(x t |x t−1 , Z t ) is the optimal function. Since it is complicated to establish a suitable optimization function, it is common to select Substituting Equation (6) into Equation (5), the Equation (5) can be simplified into, The modified algorithm flow is described as shown in Figure 3.

Case Studies and Validations
To prove the effectiveness of the PF-based algorithm, an equivalent 44 kV distribution feeder system in the city of Ottawa (see Figure 4) is used to test load prediction for distribution system day-ahead scheduling. It can be seen from Figure 4, this system contains a 230 kV utility source, a 230/44 kV transformer, a 20 Mvar capacitor bank, two circuit breakers, a PV-DGs, a natural gas turbine and a diesel generator. There are six loads in the system. Readers can refer our previous paper [31] for detailed system parameters. According to [32], the PV power is calculated by solar irradiance, system load data and temperature. In this work, for the simplification, we assume that the measurements of solar irradiance and temperature are consistent with the actual value. Therefore, the accuracy of the distribution system day-ahead scheduling is only affected by the prediction accuracy of the system load. In the rest of this section, we will analyze the electricity load prediction based on the PF method. Then, the impact of load forecast errors on the microgrid day-ahead scheduling is investigated. Furthermore, we compare our proposed particle filter method with two typical artificial intelligence methods including SVM and ENN.

Electricity Load Prediction
The historical electricity load data of Ottawa, for two years (from 1 January 2004, 24:00 to 31 December 2005, 24:00) is utilized to confirm the accuracy and validity of our presented PF-based method. Furthermore, to validate the effectiveness and performance of PF-based method, we compare our proposed method with two maturely and commonly used electricity load intelligent predicting methods, i.e., SVM and ENN.
Firstly, the electricity load data set was divided into two categories. The data from 1 January The predicted results for electricity load in different moments are shown in Figure 5. The errors between predictions and actual values are also shown in these figures. It can be seen from Figure 5, comparing with SVM and ENN, the PF-based method predictions (represented in red star) is the most accurate. Furthermore, it can accurately represent the trend of the actual measured value (represented in black circle) by the sensor. Especially in the summer and winter, even when the electricity load vary more dramatically than other seasons, the PF-based method is more efficient and stable predictions than SVM and ENN. Note that the vertical bold black lines in the picture are the border lines of different data sets (training and testing, respectively). It is not difficult to find that the trend of electricity load in the two years is roughly the same. As for the moment of 10:00 in the morning, Figure 5 shows the comparisons of the different predicting method and actual electricity load. It is obvious that PF-based method is relatively better with an error less than 5% while the SVM-based and ENN-based are almost more than 10% and 20%, respectively. Hence, the prediction accuracy of electricity load was improved by around 50% by using our proposed PF-based method. Furthermore, the biggest error of SVM-based in autumn reached 75.6%. The worst predicted result in winter of ENN-based is 46.2%. However, the results of PF-based for four seasons are stable except for a few unusual results in the fall. Since the figure shows similar results for the moment of 15:00 in the afternoon and 21:00 in the evening, we do not give these figures in this paper. Comparing with SVM-based and ENN-based methods, the PF-based method achieved higher precision at the moment of 15:00 in the afternoon. The predicted curve almost coincides with the actual electricity load. The forecast error is less than 10% in spring and summer. The most of error in winter is below 5%. The mean absolute percentage error (MAPE) of the PF-based method is about 3%. There are also some poor predictions which are up to about 20% as the same as mentioned before. For the moment of 21:00 in the evening, all of these three method have relatively poor predicting behaviors. For the SVM-based and ENN-based methods, most errors are in the range of 10-30% in spring, summer and winter. In the fall, the performance of the SVM-based method is poor. The biggest error of this method is about 67.2%. Although the PF-based method also has some unusual results in four seasons, most of the results are satisfactory. Especially the largest error rate in fall of PF-based method is 17.6% which is also the biggest error in all seasons and all moments mentioned before. Therefore, we can come to the conclusion that the PF-based method is predicted to be more accurate than the other two methods.
Furthermore, due to the MAPE and standard deviation (SD) are easy to understand, the MAPE and (SD) is used to represent the accuracy of different algorithm. The detailed mathematical definition for MAPE and (SD) are as follows: where Z k is the actual measured value of electricity load for kth day, Z k is the prediction of electricity load for kth day, N is the number of days predicted, µ is the mean of actual electricity load. The performance indicators of SVM, ENN, and PF are given in Table 2. As shown in Table 2, all performance indicators of our proposed PF-based method are lower than ENN-based and SVM-based algorithms for four seasons at different moments. It is clear that the PF-based method is more accurate than the other two comparison methods. Specifically, the fluctuation range of MAPE values based on PF-based method is 1.01-3%. The SVM-based and ENN-based fluctuation ranges are 7.04-13.24%, 4.47-9.33%, respectively. The maxima and minima of MAE for PF-based method is 41.55 and 9.54. The maximum and minimum values for the other two methods are 171.47 and 68.03, which are several higher than the PF-based algorithm. For the performance metrics of RMSE, the PF-based method is in the range of 0.95-3.35. However, the SVM-based method and ENN-based method are in the range of 10.06-16.04, 6.38-13.91, respectively. Therefore, obviously, the prediction accuracy of the PF-based method is higher and more stable than SVM-based and ENN-based for electricity load predicted.

Impact of Prediction Errors on Microgrid Day-Ahead Scheduling
As mentioned in Section II, the microgrid day-ahead scheduling is used to optimize operation through accurately predicting power production from uncontrollable DGs and load demand to reasonably allocate the optimal reference power to all controllable DGs. This means when the load demand predictions have higher accuracy, then the reference power will be more suitable. So it can achieve optimal operation by reducing cost. After comparing and verifying the accuracy and stability of the PF-based method for electricity load which is utilized to discuss the scheduled DGs P * C . Similarly, we also compared the three different methods at 10:00, 15:00 and 21:00 for four seasons. The comparing results are presented in Figures 6-8. It is confirmed that the forecasted power by PF-based method fits active power more accurately than the other two methods at every moment in four seasons. Moreover, the PF-based method performs with better stability than SVM-based and ENN-based method for forecasting. The summary of calculating results of the scheduled DG power is presented in Table 3. As seen from Figure 6, the regression estimates for forecasting power using a different method at each active (actual) power along the regression line shown in these figures. The forecasting power by PF-based method was performed with actual power in every season at 10:00. It is obvious that the MAPE values of all seasons are not more than 1%. However, the MAPE values of ENN-based method and SVM-based method are both higher than 2%. The maximum error occurs at utlizing the SVM-based method whose MAPE value is 7.97 in the summer. Furthermore, it is not difficult to see that our proposed PF-based algorithm obtained more stable forecasting than others. Especially, the MAPE value of summer (0.41) is approximately equal to the value of autumn (0.42) for the PF-based method.
For the moment of 15:00 and 21:00, Figures 7 and 8 show the obtained regression lines of the comparison for the different methods. The results also demonstrate the superiority of the PF-based method. Specifically, all the MAPE values of our proposed PF-based algorithm is less than 1.5%. The maximum and minimum are 1.36% and 0.33%, respectively. The MAPE values of the other two methods are quite different. The maximum and minimum are 8.48% and 2.80%, respectively. It means that the PF-based method achieved nearly 7-8 times less MAPE than the other method. Therefore, this superiority is especially clear when comparing with the ENN-based and SVM-based method. Additionally, as shown in Tables 2 and 3, it is noticed that all evaluation criterion of the PF-based method for electricity load is better than SVM-based method and ENN-based method. Same as electricity load, the calculating results of scheduled DG power for PF-based method outperforms the other two methods. The reason is that prediction errors are inherently unavoidable. Since the PF-based method has better forecasting performance, is stable for all the testing electricity load data, the calculating results of scheduled DG power is also better beyond doubt.

Discussion
The testing results and comparisons confirmed that our proposed PF-based algorithm is powerful and stable for forecasting electricity load. Furthermore, due to more accurate predictions of electricity load, it will assign optimal power references active power for all controllable DGs, and make better operational decisions for microgrid day-ahead scheduling. This means that the management of microgrid day-ahead scheduling is greatly determined by the accuracy of the electricity load prediction.
Since the setting of relevant parameters of the particle filter algorithm is important to the accuracy of predictions, it is not trivial to find the optimal parameters. Firstly, the quantity of selected particles will have a direct impact on calculating time in the prediction process, large amounts of particles will lead to temporal redundancy in the computation, or the accuracy of the forecast is decreased. Next, the setting of system noise is also extremely important to the accuracy of the predicted result. The forecast data will have little variation when the system noise is too small. Otherwise, it will make the data change too violent and lead the forecasting data to deviate from the actual value. The selection of different parameter values for the particle filter algorithm on the prediction result has distinct effects, as shown in Figure 9. The comparison results of the particle filter algorithm within different parameters are carried out. Results obtained are shown in Table 4, where it can be clearly observed that the accuracy of the forecast results decreased significantly when the parameter is not getting properly selected. When the parameters of the PF algorithm are select to be sub-optimal, the accuracy of prediction results is still higher than other algorithms, but it is not the highest. It notes that improper parameters (for instance, particle leanness and strong noise) will result in higher prediction errors. The best prediction results came from only when the parameters are optimal. As for solving different practical problems, there is no fixed criterion for the selection of calculation parameters in the particle filter. Therefore, the process of particle filter optimal prediction becomes complicated. The setting of the number of particles in the particle filter algorithm will directly affect the computing time of the prediction process and the accuracy of the prediction results. Generally speaking, the more particles you set, the more accurate the prediction result will be. The computing time will increase accordingly. In order to reduce the computational cost under the premise of ensuring a certain prediction accuracy, we conduct preliminary comparison experiments to select the optimal number of particles. Through the comparative experiment of setting different particle numbers in three typical time periods in the spring of 2004 as shown in Table 5. It can be seen from the prediction results that when the number of particles is between 100 and 2500 and the number of set particles increases, the MAPE of the prediction results will gradually decrease while the computing time will gradually increase. When the number of particles set is increased to 3000, the computing time is still increasing, but the accuracy of the prediction results has no obvious change at this time. Compared with the setting of 2500 particles, the MAPE of the prediction results is only reduced by 0.1%. Therefore, in the actual prediction process of the particle filter, the optimal number of particles is set to 2500, so that the prediction results can achieve higher accuracy and reduce the computation quantity.

Conclusions
Due to the properties of nonlinear and non-Gaussian distributions, the issue of prediction has always been a difficult problem for electricity load. This also leads to the difficulty of obtaining accurate microgrid operation decisions. To provide accurate load prediction for the microgrid day-ahead scheduling, a PF-based method is proposed in this work. The historical electricity data of Ottawa, Ontario, Canada, for two years is used to certify the accuracy and validity of our proposed PF-based method. Testing and comparing results show that good performance and stability regardless of any time of any seasons. It is noticeable that this superiority is especially clear when compared with the ENN-based method and SVM-based method. Furthermore, an equivalent 44 kV distribution feeder system is utilized to prove the validity and accuracy of PF-based load prediction for distribution system day-ahead scheduling. The results confirmed that by accurately predicting electricity load and robustly providing the scheduled DG power for microgrid operation center, the PF-based predicted method can be an efficient and reliable tool to improve the accuracy and confidence for the decision making in microgrid energy management. Additionally, the performance metrics of particles and the influence of different numbers of particles are discussed. In future work, we will introduce the PF-based algorithm to island microgrids. .

Conflicts of Interest:
The authors declare no conflict of interest.