Gray linear regression model based on adaptive particle swarm optimization power load forecasting method

Aiming at the trend of “S” growth in annual electricity consumption in Ningxia, the gray linear regression combined model (GLM) load forecasting method is adopted, which can improve the lack of exponential growth trend in linear regression model and the lack of linear factors in the GM(1,1) model. However, the traditional GLM model has theoretical defects in the process of solving parameters, and there are limitations in the application range. Therefore, this paper introduces an adaptive particle swarm optimization algorithm which is more efficient than the standard particle swarm optimization algorithm, and combines it with the gray linear regression combination model. The adaptive particle swarm optimization algorithm is used to solve the parameters of the GLM model, then carry out residual correction. Adaptive particle swarm optimization gray linear regression combination model (APSO-GLM) is proposed. The example analysis shows that the model overcomes the defects of the GM(1,1) model and the linear regression model. Compared with the single model, the prediction accuracy is higher and it has a wider application range than the traditional GLM model.


Introduction
Load forecasting is an important part of power system economic dispatch and an important module of an energy management system (EMS).Since the load forecast is based on the past and present of the power load to speculate its future value. Therefore, the object of the load forecasting work is the uncertainty event [1]. Methods of load forecasting are mainly divided into classical forecasting methods and modern forecasting methods [2][3][4][5]. Electric measurement is one of the important tasks of the power sector. Accurate load forecasting can be economically and reasonably arrange the start and stop of the internal generator set of the power grid, maintain the safety and stability of the power grid operation, reduce the unnecessary rotating reserve capacity, and arrange the unit maintenance plan reasonably, guarantee the normal production and life of society, effectively reduce the cost of power generation, and improve the economic and social benefits [6].
As the national economy enters the "new normal", as well as the adjustment of relevant national policies and the advancement of power system reform, many social and economic indicators in Ningxia are no longer exponentially growing, but have certain "S"-shaped curve characteristics [7]. At the same time, the factors affecting load changes are also complicated. These factors have strong uncertainties. It is not easy to find out all the factors. Therefore, the power load can be regarded as a gray system [8]. The gray prediction method requires less data and higher prediction accuracy [9], but the gray model is mainly applicable to a single exponential growth data sequence. The principle of linear regression prediction [10] is the continuity of things development and the correlation of things IOP Conf. Series: Earth and Environmental Science 218 (2019) 012144 IOP Publishing doi:10.1088/1755-1315/218/1/012144 2 causality. Considering the future as the current continuation, under the condition that the various conditions are relatively stable, the future development will be predicted, and the short-term forecast can achieve better results, but the long-term forecast is often not effective. In view of this, in order to predict the annual electricity consumption of Ningxia region with both linear trend and exponential trend, we adopts the gray linear regression combination model [11] constructed by combining the gray model GM (1,1) and the linear regression model in this paper. It can improve the lack of exponential growth trend in the linear regression model and the lack of linear factors in the GM(1,1) model, but the traditional GLM model has theoretical defects in the process of solving parameters.
Particle swarm optimization algorithm (PSO) is a cluster intelligent optimization algorithm developed in recent years. It has many advantages such as fewer parameters, faster convergence, and global search capability. It has been widely used in various fields [12]. In this paper, a more efficient adaptive particle swarm optimization algorithm is introduced. Combined with the GLM model, APSO-GLM is proposed. Then the residual correction is performed to further improve the prediction accuracy. Theoretical research and practice show that the proposed model has higher precision than a single prediction model and traditional GLM, can enhance the stability of prediction, and has higher ability to adapt to future environmental changes.

Gray linear regression combined model
(1) Generate a sequence of first order accumulation with 1-AGO Then: is the GLM model. Parameters v, C 1 , C 2 and C 3 are undetermined. In order to obtain the above parameters, set the parameter sequence ) 1 , Considering that m takes different values, the final fitting parameters v m (t) will also be different, so we can take m=1,2,…,n-3, v m (t) is calculated separately, and the mean value of all the obtained v m (t) is taken as the fitting value of the identified parameter v.
The estimated values of C 1 , C 2 and C 3 can be obtained by using the least square method The predicted value of the generated sequence is The prediction data can be obtained by reduction and reduction. )

Adaptive particle swarm optimization algorithm
The particle swarm optimization algorithm is a global optimization evolution algorithm proposed by Kennedy and Eberhart, which are derived from the simulation of bird predation behavior [13]. The specific process is as follows: Suppose that in a D-dimension target search space, there are N particles forming a community, where the ith particle position and velocity are respectively The optimal position so far searched by the first particle is called individual extremum, and the optimal position so far searched by the whole particles swarm is called global extremum, respectively ) , , ( (12) When these two extremums are found, the particles update their speed and position according to the following formula: Where w is the inertia factor, c 1 and c 2 are learning factors, usually c 1 =c 2 =2, r 1 and r 2 are uniform random numbers in the range [0,1], v id is the velocity of the particle. In the standard particle swarm algorithm, the inertia factor w is generally set to 1. Since the inertia factor is a variable that affects the current particle velocity, a larger value is advantageous for global search, and a smaller value is advantageous for local search, in order to better balance the algorithm. This paper proposes a linearly decreasing inertia weighting factor, as shown by equation (16).
Where, w max is the inertia weight maximum, generally set to 0.9; w min is the inertia weight minimum, generally set to 0.4; k is the current iteration number; k max is the maximum number of iterations.

Gray linear regression combined model based on APSO optimization
The use of GLM model for power load forecasting requires less load data, and does not need to consider the load distribution rule and trend. However, when the model predicts a faster-growing load, the prediction accuracy deteriorates. The reason is that in the process of solving the parameter v, the average value of v m at m different values is simply taken.
In order to avoid errors caused by improper parameter values, this paper uses the APSO algorithm to solve the parameters v, C 1 , C 2 , C 3 , so that accurate prediction can be made even when the load increases rapidly. According to the basic steps of the APSO model described above, set particle is 4dimension, and its position is [v, C 1 , C 2 , C 3 ]. The APSO algorithm is used to solve the parameters v, C 1 , C 2 , and C 3 . The basic steps are as follows: Step 1: Initialization: The initial position and velocity of particles are set according to formulas (9) and (10).
Step 2: The fitness value of each particle is calculated: The individual optimal position of the particle to the current position P best and the global optimal position g best are set to the position of the best particle in the initial particle population, and calculate the adaptation of each particle through the objective function f. The objective function f(Y i ) is Where, x (0) (t) and x (0) (t) are the kth actual and predicted values of the load respectively.
Step 3: Determine whether the convergence criterion of the algorithm is satisfied. If yes, execute step 6, end the iteration, and output the values of C 1 , C 2 , C 3 , and v; otherwise, execute step 4.
Step 4: Use the formulas (13) and (14) to update the velocity and position of each particle. If the particle fitness is better than the corresponding fitness of g best , g best is set to the new position.
Step 5: Determine whether convergence criterion of the algorithm is satisfied. If yes, execute step 6, and output values of C 1 , C 2 , C 3 , and v; otherwise, return to step 4 to iterate and continue to optimize.
Step 6: Output the global optimal position g best , and obtain the global optimal solution of the gray linear regression combined model parameters C 1 , C 2 , C 3 and v, and the algorithm runs.

Case analysis
In order to verify the validity and practicability of APSO-GLM proposed, annual electricity consumption in Ningxia region from 2011 to 2017 was used as sample data, and the original data is shown in table 1. It can be seen from table 1 that annual electricity consumption in Ningxia region shows an increasing trend, but there is obvious volatility. Linear regression model, GM(1,1) model, GLM model and APSO-GLM model proposed in this paper are used for fitting, and the model with the highest fitting precision is used to predict the annual electricity consumption from 2018-2020.

Gray model prediction
The original data is accumulated and generated immediately and the mean is generated. The accumulated gray model is an equation of the form x (1) (t)=ae vt +b. The equation is as follows by using MATLAB for curve fitting: = t x

Grey linear regression combined model prediction
According to formula (1) ~ (6) and MATLAB, the calculated value of v is: v=0.03; thus, the gray linear regression combination model is: (19) According to formula (7), MATALB is used to obtain the values of parameter C as C 1 =38929.08， C 2 = -443.33，C 3 = -38940.51 The gray linear regression combination model is obtained 51 . = t x

Comparative analysis of forecasting models
The predicted and actual values of the four models are fitted, and the fit is shown in the Figure 1. The prediction accuracy of the four models is tested. The error test of the model is shown in Table 2.  Through the comparison of the results of the above average relative error and the fitting of the actual value and the predicted value, it can be seen that although the four models can be used for power load forecasting, the APSO-GLM model proposed in this paper is more accuracy than the traditional GLM model, linear regression model and GM (1,1). Based on the effective synthesis of the GM(1,1) model and the linear regression model, the prediction results are optimized. The local large deviations that may occur in the prediction process of the single prediction model are avoided, and the prediction accuracy is improved.

Conclusion
This article has the following three main tasks: a. Aiming at the limitations of a single theoretical method, a GLM model that combines linear and exponential information and does not require typical distribution rules is proposed. It is superior to single gray model and linear regression model in prediction accuracy, improves the accuracy of the model, reduces the prediction error, and makes the prediction effect better.
b. In view of some theoretical problems of the traditional GLM model in solving the parameters, this paper uses the APSO algorithm to replace the traditional least squares method to solve the parameters of the GLM model, and proposes an APSO-GLM prediction model, which overcomes the limitations of the GLM model, has certain theoretical significance and application value.
c. The APSO-GLM model proposed is applied to power system load forecasting, and an experiment verifies that the model has certain feasibility and high prediction accuracy.