Annual Energy Consumption Forecasting Based on PSOCA-GRNN Model

and Applied Analysis 3


Introduction
Energy supply is the important material basis of maintaining human survival and promoting social development.The exploration as well as utilization of energy is of crucial importance to a country's economic development and social stability.The energy issue is one of the most important issues that draw attention all over the world [1,2].With the rapid economic development and increasing human population, the worldwide energy consumption has increased rapidly.In China, the energy consumption has increased to 3617.32 million tons of standard coal in 2012 from 594.47 million tons of standard coal in 1981 with an annual growth rate of 5.63%.Nowadays, China has surpassed USA as the world's largest energy consumer.China's energy consumption will keep on extending for a few more years [3].Therefore, forecasting the energy consumption accurately is quite important, which can provide some reference for the energy development planning formulation and economic policy making.
In the past few years, the artificial intelligence forecasting (AIF) method has been applied to many forecasting issues due to its advantage of accurately showing the nonlinearity characteristic of data set, such as power load forecasting [11], probabilistic wind speed forecasting [12], stock market price forecasting [13], and sales forecasting [14].As a kind of AIF method, artificial neural networks (ANNs) are computational models inspired by animals' central nervous systems (in particular the brain) that are capable of machine learning and pattern recognition, which has been applied extensively in many fields, such as stock price forecasting [15], map wind speed profile [16], epileptic seizure detection [17], and electricity price forecasting [18].ANNs have the ability of elucidating the complex nonlinear relationship between input and output patterns without a priori assumptions, which is very difficult for conventional algorithms.As a kind of ANNs, the generalized regression neural network (GRNN) is a powerful regression tool with a dynamic network structure, which has the advantages of strong nonlinear mapping capability and high fault tolerance and robustness [19,20].Many researchers have employed GRNN to solve the practical engineering problems.Leung et al. [21] used GRNN model to forecast the exchange rates; Lee et al. [22] employed GRNN model to perform the on-line fault detection and diagnosis (FDD) in an Air-Handling Unit (AHU); Cigizoglu and Alp [23] used the GRNN model to model the river sediment yield; Nose-Filho et al. [24] used the GRNN methodology for short-term multinodal load forecasting; Orhan et al. [25] used the GRNN method to perform the tuberculosis disease diagnosis; Chen and Yu [26] used the GRNN to build a new motion control scheme with dead zone estimation and compensation for improving the control performance of the TWUSM drive system; Chelgani and Jorjani [27] used the GRNN model to predict the effects of operational parameters on coal desulfurization using peroxyacetic acid from microwave pretreated coal.As can be seen above, the GRNN method has not been applied to forecast energy consumption.Therefore, this paper employs the GRNN model to perform the energy consumption forecasting.Just as Li et al. [28] point out, selecting the spread parameter value properly is the biggest challenge when employing the GRNN model to solve the actual issues.Currently, majority of researchers determine the spread parameter value by a lot of experiments or experience, which is time-consuming and also cannot ensure the accuracy.Therefore, a proper algorithm should be proposed and applied to automatically determine the spread parameter value of GRNN model.Particle swarm optimization algorithm (PSO) is a swarmbased evolutionary computation technique that optimizes a problem by iteratively trying to improve a candidate solution (called particle) in the searching space according to mathematical formulae over the particle's location and velocity [29].PSO has the advantages of less individual number, calculation simplicity, and good robustness, which has been applied in many fields, such as economic dispatch problem [30], flow shop scheduling [31], and short-term load forecasting [32].However, PSO has the shortcoming of prematurity.Nowadays, enhancing the computational performance of PSO is the main goal pursued by related researchers.Cultural algorithm (CA) is a kind of bioinspired evolutionary algorithm which simulates the cultural evolution process.CA regards the evolutionary algorithm as the succession process at the macrolevel and microlevel, and it has two components, namely, population component and knowledge component (also called belief space).The main thought of CA is to save the acceptable knowledge of the group and to abandon the unacceptable knowledge.Therefore, employing the CA to solve global optimization problem means to guide the evolution of micro groups by acceptable global optimal point information.So, the PSO and CA are combined (called PSOCA) in this paper which can improve the evolution capacity of PSO and increase the diversity of PSO group by the genetic manipulation of CA.Then, the spread parameter value of GRNN model is automatically determined by PSOCA algorithm.In this paper, a hybrid PSOCA-GRNN model is proposed for annual energy consumption forecasting.

Generalized Regression Neural Network (GRNN)
Generalized regression neural network (GRNN), developed by American scholar Specht in 1991 [19], is a kind of radial basis function (RBF) network based on kernel regression statistical technique with a dynamic network structure.Due to the outstanding features such as strong nonlinear mapping capability and robustness, GRNN model has been employed in many fields [33][34][35].
The structure of GRNN model based on Matlab toolbox is shown in Figure 1.
The input and output variables of GRNN model are  and , respectively, and the number of training samples is .The structure of GRNN model based on Matlab toolbox includes two layers, namely, RBF hidden layer and linear output layer.
For the RBF hidden layer, the number of elements equals .The weight function of RBF hidden layer is dist, which is employed to calculate the distance between network input and weight value  11 of this layer, just as shown in Network product function netprod multiplies the threshold  1 in the hidden layer and ‖ dist ‖ output to get net input  1 , and then the net put  1 is passed to transfer function radbas.Generally, the Gaussian function is selected as the transfer function of GRNN model; namely,   where   is smoothing factor (also called "spread" parameter in Matlab program), which determines the shape of RBF in the th hidden layer.The higher the   value is, the smoother the RBF is.
For the linear output layer, the normalized weight product function is employed as the weight function (expressed in nprod in the Matlab program), which produces the output of former layer with the weight value  21 in this layer as the weight output.Then, the weight output is passed to transfer function purlin.The network output is For GRNN model, there is only one parameter that needs to be determined, namely, .The spread parameter () value has a great influence on the forecasting performance of GRNN model.Therefore, determining the appropriate spread parameter value is quite important for energy consumption forecasting by using GRNN model.

Cultural Algorithm (CA).
Cultural algorithm (CA) developed by American scholar Reynolds in 1994 is a kind of bioinspired evolutionary algorithm which simulates the cultural evolution process [36].To improve the search efficiency of global optimal solution, CA acquires the knowledge from the evolutionary population and then uses it to guide the iterative search process.The CA explicitly summarizes and describes the implicit evolutionary information and uses two major spaces (namely, population space and belief space) to implement the process of knowledge evolution.The doublelayer evolution structure of CA makes it away from the influence from the evolutionary algorithm strategies of population evolutionary space.
The CA employs double-layer evolution mechanism to simulate the cultural evolution of human society.Based on population evolutionary algorithm (population space), the belief space is constructed to extract various types of information in the hidden evolutionary process.Then, the extracted information is stored in the form of knowledge and eventually is used to guide the evolutionary process.The basic framework of cultural algorithm is shown in Figure 2.
Just as shown in Figure 2, CA includes three major components, namely, population space, belief space, and communication protocol.The population space, which includes the population to be developed and the mechanisms for its evaluation, selection and evolution, simulates the individual evolution according to a certain criterion from a microevolutionary view.The belief space, which represents the bias that is obtained by the population during its problemsolving process, simulates the culture evolutionary process of formation, transfer and comparison.The population space and belief space perform self-evolution, respectively, and the communication protocol is used to determine the interaction between these two spaces.The communication protocol includes three functions, namely, Accept function, Update function, and Influence function.
(1) Accept function transfers the individual knowledge acquired from the population space which satisfies the fitness value to the belief space.
(2) Update function adjusts the knowledge of belief space according to the individual knowledge transferred.
(3) Influence function transfers the knowledge of belief space to the population space and then guides population evolution by adjusting the individual knowledge of population space.
The details of CA are as follows.
Step 1 (initializing the population space and belief space).The initial parameters of population space and belief space are randomly generated.The population is an  ×  matrix, and  is the population size.
Step 2 (evaluating the individual fitness value).Firstly, construct the fitness function according to the study issue; secondly, substitute the sample data to the algorithm and the initial cost of each individual in the population can be obtained by simulation using the Objective function; thirdly, the fitness value of the population can be obtained.
Step 3 (selecting top individuals in the population space to belief space).Select top individuals in the population space by using the Accept function, which transfers the knowledge acquired from the individual evolutionary process in the population space to the belief space.How to select the top number of individuals in the population space is the key point for Accept function.Fixed-ratio Accept function only uses the information of top individuals in the population to update the belief space: The top % individuals will be chosen to impact the belief space in each generation.Generally set  = 20.Dynamicratio Accept function uses temporal information about the number of generations to determine the number of individuals accepted at time  (also called generation number).The selected number of individuals can be calculated by When dynamic-ratio Accept function is employed, the selected individual number will reduce as the evolutionary process, and more information will be pushed into the belief space at the first than at the end.
Step 4 (updating the belief space).The top individuals with less fitness value are acceptable for the belief space, and the belief space is updated using the Update function.Two types of knowledge will be taken into consideration, which are normative knowledge and situational knowledge.Situational knowledge, which was proposed by Chung in 1997, is used for recording the optimal individuals in the evolutionary process, and its structure is depicted as where  denotes the capacity of situational knowledge;   = {  | (  )} is the th top individual; (  ) is the fitness value of   .After finishing the evolutionary process of each generation in the population space, the Accept function will substitute the top individuals to the belief space, and the Update function chooses the optimal individuals for updating the situational knowledge.The updating procedure is where   () is the optimal individual of the th generation.
Normative knowledge is used for describing the feasible solution space of a certain problem, and its structure is depicted as where   and   represent the upper and lower boundary of the -dimensional variable, respectively;   and   represent the corresponding fitness values of the boundaries, respectively.The normative knowledge is updated with the change of feasible search space.With the deepening of the evolution, the search space will gradually narrow to the superior area.When the top individual exceeds the current search area, the normative knowledge will be updated by the following: where   ( + 1) represents upper limit of parameter  at generation +1, and   (+1) denotes its fitness value;   (+1) represents lower limit of parameter  at generation  + 1, and   ( + 1) denotes its fitness value.Equations ( 9) and ( 10) are the evolutionary processes of the upper and lower boundary of the -dimensional variable.Equations ( 11) and ( 12) are the evolutionary processes of the corresponding fitness values of the boundaries, respectively.
Step 5 (updating the population space).The population space is updated using the updated belief space, and then a new population is generated.In CA, the number of new-generated individuals is equal to the size of the population.So, the population size will be changed from  to 2 in this stage.This paper employs the normative and situational knowledge to update the population space.The normative and situational knowledge will also determine the step size and the direction, respectively, which are shown in where (  ) denotes the size of the belief interval for parameter  and    (0, 1) is a random number that obeys a normal distribution where the mean value and the standard deviation are 0 and 1, respectively;  = 1, 2, . . .,  and  = 1, 2, . . ., .
If the individual parameter value is less than that of the current best, the absolute value of the calculated step size(  ) will be added to the current parameter value.If the individual parameter value is greater than that of the current best, the absolute value of the step size(  ) will be deducted from the current parameter value.
After generating the new  individuals, the top  individuals will be saved according to the fitness value for each individual in this new population.At the same time, the population size becomes  from 2.
Step 6 (evaluating the fitness values of the new population space).Just like Step 2, the cost of each individual in the new population is calculated by simulation using the Objective function, and then the fitness value of the new population can be obtained.
Step 7 (stopping circulation).In this paper, reaching the max iterative number is considered as the circulation stop criteria.[29].PSO heads from the bird flock preying behavior, which has been proved to be a good iteration optimization method.The solution of each optimization problem for PSO is a bird in the search space, which is called "particle." The bird (particle) flies at a certain speed in the search space, and the speed is adjusted dynamically according to its own and companions' flying experiences.

Particle Swarm Optimization Algorithm (PSO). Particle swarm optimization algorithm (PSO) is a kind of evolutionary computation technique, which was proposed by Eberhart and Kennedy
Suppose   = ( 1 ,  2 , . . .,   ) is the location of particle , and   = (V 1 , V 2 , . . ., V  ) is the flying speed of particle .Each particle has a fitness value determined by the optimization object function.For particle , its best flying location is marked   = ( 1 ,  2 , . . .,   ), which is also called individual extreme value  best .Until now, the best location founded by all the particles is marked   = ( 1 ,  2 , . . .,   ), which is also called global extreme value  best .The particle will continuously adjust its own speed and location according to these two extreme values; namely, where  is the total number of particles,  = 1, 2, . . ., ,  = 1, 2, . . ., ,  represents the dimensionality of particle,  1 and  2 are random numbers between 0 and 1,  1 and  2 are acceleration factors, and  is the inertia weight function.
The calculation process of PSO is as follows.
Step 1 (parameter initialization).Set the initial random location and speed of particles.
Step 2 (calculate the fitness value of each particle).The fitness value can be calculated according to the studied issues.
Step 3.For each particle, compare its current fitness value and the fitness value of the best individual flying location   .If better, set this location as the current best individual flying location.
Step 4. For each particle, compare its current fitness value and the fitness value of the best global flying location   .If better, set this location as the current best global flying location.
Step 5. Adjust the speed and location of each particle according to (14).
Step 6. Stop condition.When the maximum iteration number is reached, the algorithm ends.Otherwise, go back to Step 2.

The Combination of CA and PSO (PSOCA).
During the evolutionary process of PSO, the particle tracks two objectives.One is the individual historical best solution, and the other is the global historical best solution.The global historical best solution is handed down from generation to generation, which will naturally form the track of global best solution.These optimal solutions can be regarded as the constant preservation of iterative-searching global knowledge information and the update of knowledge space, which evolves the knowledge solution and provides guidance for the further solution of PSO.By the double evolution and mutual effect of PSO space (main population space) and knowledge space, the global searching ability can be enhanced.The building process of combining CA and PSO (namely, PSOCA) is as follows.
(1) Design main group particle swarm: (a) determine the encoding scheme: a decimal encoding scheme is adopted; (b) determine the fitness value: in this paper, the fitness value is determined by the root-meansquare error (RMSE) between the actual value and forecasting value of annual energy consumption.
(2) Design knowledge space: (a) individual form of knowledge solution: a decimal encoding scheme is adopted, just like that of particle swarm, to preserve the main population   ; the gene-bit of knowledge individual coding equals 0 during initialization; (b) population size of knowledge solution: the population size of knowledge solution equals half of the particle population size in this paper; (c) evolution of knowledge solution: selection, cross, and mutation operators are selected; for the cross operator, two-point crossover is employed, and when the particle swarm traps in local optimum, the mutation is operated with a   probability to enlarge the search space, and the roulette wheel is employed to select and save better individuals.
(3) Acceptable operation: during the evolutionary process of particle swarm in the main population space, the worst individuals in the knowledge space will be substituted for   when running  generation each time.In this paper,  = 20.
(4) Influence operation: when running  generation each time during the evolutionary of particle swarm in the main population space, the individuals with better fitness value in the knowledge space will substitute for the same number of individuals with worse fitness value; namely, where EndStep is the maximum evolutionary generation of particle swarm,  is the current evolutionary generation of particle swarm, and  1 and  2 are constant.Set  1 = 20 and  2 = 100 in this paper.This means that the knowledge solution plays only a small role at the initial evolutionary stage of particle swarm which can ensure rapid evolution, and then the knowledge solution will play a big role at the later evolutionary stage which can make the particle swarm receive more guidance from the knowledge space and enlarge the search space.The flow chart of PSOCA algorithm is shown in Figure 3.

The Hybrid PSOCA-GRNN Model for Energy Consumption Forecasting
The proposed PSOCA-GRNN model for energy consumption forecasting is a hybrid forecasting model where the spread parameter of GRNN is automatically determined by PSOCA algorithm.The concrete steps of PSOCA-GRNN model are as follows.
Step 1 (parameters initialization).Firstly, the parameters should be initialized, which include population size , inertia weight factor , maximum iteration number  max , crossover probability cp, mutation probability mp, acceleration factors 1 and 2, acceptable proportion %, and spread value range.
Other parameters' values have been set at Section 2.
Step 2 (calculation initialization).According to the initialization values of parameters, train the sample data to obtain the initial results, and the initial parameter value of GRNN model can be determined.
Step 3 (iterative optimization).Compare the actual data and the test result from Step 2, and then calculate the fitness value.Make a judgment whether the fitness value reaches the prescribed accuracy or the maximal iteration number is reached or not.If satisfied, go to Step 8; otherwise, go to Step 4.
Step 4. Choose the best individuals with a certain proportion according to acceptance function Accept(), and update the belief space.
Step 5.According to the fitness values of individuals in the parent generation and the knowledge of belief space, perform the mutation on individuals in the parent generation in the population space to generate the offspring individuals by employing influence function influence().
Step 6. Perform the proper selection operation, and choose the best individuals from the current  + 1 generation population space.
Step 7. At the +1 generation population, calculate the spread parameter of GRNN model, and then turn to Step 3.
Step 8.The optimal spread parameter value of GRNN model can be obtained and then the energy consumption forecasting can be further performed.
The flowchart of the PSOCA-GRNN model is as shown in Figure 4.

Empirical Calculation and Analysis
The annual energy consumption of China between 1981 and 2010 is selected as the empirical example to demonstrate the effectiveness of the proposed PSOCA-GRNN forecasting model in this paper, and the data points are shown in Figure 5, of which the annual energy consumption from 1981 to 2004 is selected as the training data, and that from 2005 to 2010 is utilized as the testing data.According to the relative studies [37][38][39], GDP, population, and trade volume are important influence factors when forecasting the energy consumption.Therefore, GDP, population, and total export-import volume of China, which are shown in Figure 5, are selected as the input variables when the annual energy consumption is forecasted by PSOCA-GRNN model.Before the simulation, all the sample data (including annual energy consumption, GDP, population, and total export-import volume) should be normalized to make them in the range from 0 to 1 by using where  is the normalized value,  is the actual value, and  min and  max are the minimal and maximal value of each input factor, respectively.In the PSOCA-GRNN hybrid forecasting model, the spread parameter value of GRNN model is dynamically tuned by the PSOCA algorithm.Before performing the simulation, the initial relative parameters' values are set as follows: population size  = 50, maximum iteration number  max = 500, crossover probability cp = 0.9, mutation probability  = 0.1, acceleration factor  1 =  2 = 1.49, inertia weight factor  = 0.75, and spread value ∈ [0.0001, 1].The experimental environment includes Matlab 2010a, GRNN toolbox, selfwritten MATLAB programs.
According to the result of PSOCA algorithm tuning the spread parameter of GRNN model, the spread parameter value is determined as 0.0813 to further forecast China's annual energy consumption from 2005 to 2010.The forecasted annual energy consumption of China from 2005 to 2010 is listed in Table 1.
To compare the annual energy consumption forecasting results, several other forecasting models should be selected.The other energy consumption forecasting models for comparison with the PSOCA-GRNN model also make energy consumption forecasting based on the given sample data.In this paper, the single GRNN model, GRNN model optimized    Table 1 lists the forecasting results and relative errors of China's annual energy consumption from 2005 to 2010 by these five models.Figure 6 shows the annual energy consumption forecasting results with the PSOCA-GRNN, GRNN, PSO-GRNN, DGM (1, 1), and OLS LR models, and Figure 7 describes the relative errors of these five forecasting models.
From Figure 6, we can see that all of these five forecasting models capture the increasing trends of annual energy consumption, but the performance of PSOCA-GRNN, GRNN, PSO-GRNN, and OLS LR is better than DGM (1, 1).From Figure 7, it can be seen that deviations between the forecasting results of only PSOCA-GRNN model and the actual values are within the error range of [-3%, +3%], which is a standard to measure the performance of the forecasting model [28].the relative errors of some forecasting points of another four forecasting models exceed the error range of [-3%, +3%].For example, the relative errors of forecasting results of PSO-GRNN model at 2006 and 2009 go beyond the error range of [-3%, +3%].
In this paper, the mean absolute percentage error (MAPE) and mean square error (MSE) [11,28] are employed to measure the performance of different forecasting models in annual energy consumption forecasting.By calculation, the MAPE   and MSE values of PSOCA-GRNN, GRNN, PSO-GRNN, DGM (1, 1), and OLS LR models are listed in Table 2.It can be seen that the MAPE and MSE values of the proposed PSOCA-GRNN model are 1.296% and 2384.132,respectively, which are both the smallest among these five forecasting models.This implies that the proposed PSOCA-GRNN hybrid forecasting model has the best performance in

Figure 1 :
Figure 1: The structure of GRNN model based on Matlab toolbox.

Figure 3 :
Figure 3: The flow chart of PSOCA algorithm.
import volume GDP (billion Yuan) Population (million) Total export-import volume (billion Yuan) Energy consumption (million tons of standard coal)

Figure 5 :
Figure 5: Annual energy consumption, GDP, population, and total export-import volume of China between 1981 and 2010.