# Annual Energy Consumption Forecasting Based on PSOCA-GRNN Model

Authors: Huiru Zhao; Sen Guo
Journal: Abstract and Applied Analysis
 (2014)

---

## Abstract

Accurate energy consumption forecasting can provide reliable guidance for energy planners and policy makers, which can also recognize the economic and industrial development trends of a country. In this paper, a hybrid PSOCA-GRNN model was proposed for the annual energy consumption forecasting. The generalized regression neural network (GRNN) model was employed to forecast the annual energy consumption due to its good ability of dealing with the nonlinear problems. Meanwhile, the spread parameter of GRNN model was automatically determined by PSOCA algorithm (the combination of particle swarm optimization algorithm and cultural algorithm). Taking China’s annual energy consumption as the empirical example, the effectiveness of this proposed PSOCA-GRNN model was proved. The calculation result shows that this proposed hybrid model outperforms the single GRNN model, GRNN model optimized by PSO (PSO-GRNN), discrete grey model (DGM (1, 1)), and ordinary least squares linear regression (OLS_LR) model.


---

## Body

## 1. 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.Many energy consumption/demand forecasting models have been built by the scholars and practitioners, such as ARMA model [4], grey forecasting model [5, 6], LEAP model [7], and artificial intelligence forecasting model [8–10]. 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 swarm-based 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 bio-inspired 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.


## 2. 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–35].The structure of GRNN model based on Matlab toolbox is shown in Figure1.Figure 1
The structure of GRNN model based on Matlab toolbox.The input and output variables of GRNN model areX and Y, respectively, and the number of training samples is M. 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 equalsM. The weight function of RBF hidden layer is dist, which is employed to calculate the distance between network input and weight value IW11 of this layer, just as shown in
(1)∥dist⁡∥j=∑i=1R(xi-IWji)2,(j=1,2,…,M).Network product functionnetprod multiplies the threshold b1 in the hidden layer and ∥dist⁡∥ output to get net input n1, and then the net put n1 is passed to transfer functionradbas. Generally, the Gaussian function is selected as the transfer function of GRNN model; namely,
(2)aj1=radbas(netprod(∥dist⁡∥jb1.j))=exp⁡|-(nj1)22σj2|=exp⁡|-(∥dist⁡∥jb1.j)22σj2|(j=1,2,…,M),
where σj is smoothing factor (also called “spread” parameter in Matlab program), which determines the shape of RBF in the jth hidden layer. The higher the σj value is, the smoother the RBF is.For the linear output layer, the normalized weight product function is employed as the weight function (expressed innprod in the Matlab program), which produces the output of former layer with the weight value IW21 in this layer as the weight output. Then, the weight output is passed to transfer functionpurlin. The network output is
(3)yk=∑j=1mIWkjaj1(k=1,2,…,S).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.


## 3. Basic Principle of PSOCA

### 3.1. Cultural Algorithm (CA)

Cultural algorithm (CA) developed by American scholar Reynolds in 1994 is a kind of bio-inspired 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 double-layer 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 Figure2.Basic framework of cultural algorithm (CA).
(a)
(b)Just as shown in Figure2, 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 problem-solving 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, andInfluence 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 ann×n matrix, and n 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 theObjective 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 theAccept 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 forAccept function. Fixed-ratioAccept function only uses the information of top individuals in the population to update the belief space:
(4)accept()=p%.
The top p%n individuals will be chosen to impact the belief space in each generation. Generally set p=20. Dynamic-ratioAccept function uses temporal information about the number of generations to determine the number of individuals accepted at time t (also called generation number). The selected number of individuals can be calculated by
(5)k=accept()×n=(p%+p%t)×n.
When dynamic-ratioAccept 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 theUpdate 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
(6)〈E1,E2,…,Es〉,
where s denotes the capacity of situational knowledge; Ei={xi∣f(xi)} is the ith top individual; f(xi) is the fitness value of xi.
After finishing the evolutionary process of each generation in the population space, theAccept function will substitute the top individuals to the belief space, and theUpdate function chooses the optimal individuals for updating the situational knowledge. The updating procedure is
(7)〈E1(t+1),E2(t+1),…,El(t+1)〉={〈xb(t),E1(t),…,El(t)〉,iff(xb(t))>f(E1(t)),l<s〈xb(t),E1(t),…,El-1(t)〉,iff(xb(t))>f(E1(t)),l=s〈E1(t),…,El(t)〉,otherwise,
where xb(t) is the optimal individual of the tth generation.
Normative knowledge is used for describing the feasible solution space of a certain problem, and its structure is depicted as(8)〈V1,V2,…,Vn〉Vi=|(li,ui),(Li,Ui)|,i≤n,
where ui and li represent the upper and lower boundary of the i-dimensional variable, respectively; Ui and Li 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:(9)uj(t+1)={xji(t),ifxji(t)>ui(t)orf(xj(t))<Ui(t)ui(t),otherwise,(10)Uj(t+1)={f(xj(t)),ifxji(t)>ui(t)orf(xj(t))<Ui(t)Ui(t),otherwise,(11)lj(t+1)={xji(t),ifxji(t)<li(t)orf(xj(t))<Li(t)li(t),otherwise,(12)Lj(t+1)={f(xj(t)),ifxji(t)<li(t)orf(xj(t))<Li(t)li(t),otherwise,
where uj(t+1) represents upper limit of parameter j at generation t+1, and Uj(t+1) denotes its fitness value; lj(t+1) represents lower limit of parameter j at generation t+1, and Lj(t+1) denotes its fitness value. Equations (9) and (10) are the evolutionary processes of the upper and lower boundary of the i-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 fromn to 2n 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
(13)xjp+i{xji+|size(Ij)·Nji(0,1)|ifxji<Ejxji-|size(Ij)·Nji(0,1)|ifxji>Ejxji+size|(Ij)·Nji(0,1)|otherwise,
where (Ij) denotes the size of the belief interval for parameter j and Nji(0,1) is a random number that obeys a normal distribution where the mean value and the standard deviation are 0 and 1, respectively; i=1,2,…,p and j=1,2,…,n.
If the individual parameter value is less than that of the current best, the absolute value of the calculated stepsize(Ij) 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(Ij) will be deducted from the current parameter value.
After generating the newn individuals, the top n individuals will be saved according to the fitness value for each individual in this new population. At the same time, the population size becomes n from 2n.Step 6 (evaluating the fitness values of the new population space).
Just like Step2, the cost of each individual in the new population is calculated by simulation using theObjective 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.


### 3.2. Particle Swarm Optimization Algorithm (PSO)

Particle swarm optimization algorithm (PSO) is a kind of evolutionary computation technique, which was proposed by Eberhart and Kennedy [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.SupposeXi=(xi1,xi2,…,xiD) is the location of particle i, and Vi=(vi1,vi2,…,viD) is the flying speed of particle i. Each particle has a fitness value determined by the optimization object function. For particle i, its best flying location is marked Pi=(pi1,pi2,…,piD), which is also called individual extreme value pbest. Until now, the best location founded by all the particles is marked Pg=(g1,g2,…,gD), which is also called global extreme value gbest. The particle will continuously adjust its own speed and location according to these two extreme values; namely,
(14)vij(k+1)=wvij(k)+r1c1(pij-xij(k))+r2c2(gj-xij(k)),xij(k+1)=xij+vij(k+1),
where m is the total number of particles, i=1,2,…,m, j=1,2,…,D, D represents the dimensionality of particle, r1 and r2 are random numbers between 0 and 1, c1 and c2 are acceleration factors, and w 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 locationPi. 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 locationPg. 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 Step2.


### 3.3. 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-mean-square 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 populationgb; 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 apm 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 forgb when running N generation each time. In this paper, N=20.(4)
Influence operation: when runningN 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,
(15)N=N1+EndStep-kEndStep×N2,whereEndStep is the maximum evolutionary generation of particle swarm, k is the current evolutionary generation of particle swarm, and N1 and N2 are constant. Set N1=20 and N2=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 Figure3.Figure 3
The flow chart of PSOCA algorithm.


## 3.1. Cultural Algorithm (CA)

Cultural algorithm (CA) developed by American scholar Reynolds in 1994 is a kind of bio-inspired 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 double-layer 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 Figure2.Basic framework of cultural algorithm (CA).
(a)
(b)Just as shown in Figure2, 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 problem-solving 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, andInfluence 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 ann×n matrix, and n 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 theObjective 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 theAccept 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 forAccept function. Fixed-ratioAccept function only uses the information of top individuals in the population to update the belief space:
(4)accept()=p%.
The top p%n individuals will be chosen to impact the belief space in each generation. Generally set p=20. Dynamic-ratioAccept function uses temporal information about the number of generations to determine the number of individuals accepted at time t (also called generation number). The selected number of individuals can be calculated by
(5)k=accept()×n=(p%+p%t)×n.
When dynamic-ratioAccept 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 theUpdate 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
(6)〈E1,E2,…,Es〉,
where s denotes the capacity of situational knowledge; Ei={xi∣f(xi)} is the ith top individual; f(xi) is the fitness value of xi.
After finishing the evolutionary process of each generation in the population space, theAccept function will substitute the top individuals to the belief space, and theUpdate function chooses the optimal individuals for updating the situational knowledge. The updating procedure is
(7)〈E1(t+1),E2(t+1),…,El(t+1)〉={〈xb(t),E1(t),…,El(t)〉,iff(xb(t))>f(E1(t)),l<s〈xb(t),E1(t),…,El-1(t)〉,iff(xb(t))>f(E1(t)),l=s〈E1(t),…,El(t)〉,otherwise,
where xb(t) is the optimal individual of the tth generation.
Normative knowledge is used for describing the feasible solution space of a certain problem, and its structure is depicted as(8)〈V1,V2,…,Vn〉Vi=|(li,ui),(Li,Ui)|,i≤n,
where ui and li represent the upper and lower boundary of the i-dimensional variable, respectively; Ui and Li 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:(9)uj(t+1)={xji(t),ifxji(t)>ui(t)orf(xj(t))<Ui(t)ui(t),otherwise,(10)Uj(t+1)={f(xj(t)),ifxji(t)>ui(t)orf(xj(t))<Ui(t)Ui(t),otherwise,(11)lj(t+1)={xji(t),ifxji(t)<li(t)orf(xj(t))<Li(t)li(t),otherwise,(12)Lj(t+1)={f(xj(t)),ifxji(t)<li(t)orf(xj(t))<Li(t)li(t),otherwise,
where uj(t+1) represents upper limit of parameter j at generation t+1, and Uj(t+1) denotes its fitness value; lj(t+1) represents lower limit of parameter j at generation t+1, and Lj(t+1) denotes its fitness value. Equations (9) and (10) are the evolutionary processes of the upper and lower boundary of the i-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 fromn to 2n 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
(13)xjp+i{xji+|size(Ij)·Nji(0,1)|ifxji<Ejxji-|size(Ij)·Nji(0,1)|ifxji>Ejxji+size|(Ij)·Nji(0,1)|otherwise,
where (Ij) denotes the size of the belief interval for parameter j and Nji(0,1) is a random number that obeys a normal distribution where the mean value and the standard deviation are 0 and 1, respectively; i=1,2,…,p and j=1,2,…,n.
If the individual parameter value is less than that of the current best, the absolute value of the calculated stepsize(Ij) 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(Ij) will be deducted from the current parameter value.
After generating the newn individuals, the top n individuals will be saved according to the fitness value for each individual in this new population. At the same time, the population size becomes n from 2n.Step 6 (evaluating the fitness values of the new population space).
Just like Step2, the cost of each individual in the new population is calculated by simulation using theObjective 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.


## 3.2. Particle Swarm Optimization Algorithm (PSO)

Particle swarm optimization algorithm (PSO) is a kind of evolutionary computation technique, which was proposed by Eberhart and Kennedy [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.SupposeXi=(xi1,xi2,…,xiD) is the location of particle i, and Vi=(vi1,vi2,…,viD) is the flying speed of particle i. Each particle has a fitness value determined by the optimization object function. For particle i, its best flying location is marked Pi=(pi1,pi2,…,piD), which is also called individual extreme value pbest. Until now, the best location founded by all the particles is marked Pg=(g1,g2,…,gD), which is also called global extreme value gbest. The particle will continuously adjust its own speed and location according to these two extreme values; namely,
(14)vij(k+1)=wvij(k)+r1c1(pij-xij(k))+r2c2(gj-xij(k)),xij(k+1)=xij+vij(k+1),
where m is the total number of particles, i=1,2,…,m, j=1,2,…,D, D represents the dimensionality of particle, r1 and r2 are random numbers between 0 and 1, c1 and c2 are acceleration factors, and w 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 locationPi. 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 locationPg. 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 Step2.


## 3.3. 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-mean-square 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 populationgb; 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 apm 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 forgb when running N generation each time. In this paper, N=20.(4)
Influence operation: when runningN 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,
(15)N=N1+EndStep-kEndStep×N2,whereEndStep is the maximum evolutionary generation of particle swarm, k is the current evolutionary generation of particle swarm, and N1 and N2 are constant. Set N1=20 and N2=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 Figure3.Figure 3
The flow chart of PSOCA algorithm.


## 4. 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 sizen, inertia weight factor w, maximum iteration number Nmax⁡, crossover probability cp, mutation probability mp, acceleration factors c1 and c2, acceptable proportion p%, 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 Step2, 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 functionAccept(), 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 functioninfluence().Step 6.
Perform the proper selection operation, and choose the best individuals from the currentg+1 generation population space.Step 7.
At theg+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 Figure4.Figure 4
The flowchart of the PSOCA-GRNN model.


## 5. 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 Figure5, 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–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.Figure 5
Annual energy consumption, GDP, population, and total export-import volume of China between 1981 and 2010.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(16)z=x-xmin⁡xmax⁡-xmin⁡,
where z is the normalized value, x is the actual value, and xmin⁡ and xmax⁡ 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 sizen=50, maximum iteration number Nmax⁡=500, crossover probability cp=0.9, mutation probability mp=0.1, acceleration factor c1=c2=1.49, inertia weight factor w=0.75, and spread value ∈[0.0001,1]. The experimental environment includes Matlab 2010a, GRNN toolbox, self-written 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 Table1.Table 1
Forecasting results of China’s annual energy consumption from 2005 to 2010 by PSOCA-GRNN, GRNN, PSO-GRNN, DGM (1, 1), and OLS_LR models.
Year
Actual value
PSOCA-GRNN
GRNN
PSO-GRNN
DGM (1, 1)
OLS_LR
Forecasting value
Relative error(%)
Forecasting value
Relative error(%)
Forecasting value
Relative error(%)
Forecasting value
Relative error(%)
Forecasting value
Relative error(%)
2005
2359.97
2368.83
0.376
2364.76
0.203
2364.35
0.186
2256.48
−4.385
2416.80
2.408
2006
2586.76
2531.02
−2.155
2488.45
−3.801
2488.69
−3.791
2362.46
−8.671
2527.70
−2.283
2007
2805.08
2743.11
−2.209
2657.41
−5.264
2835.58
1.087
2473.41
−11.824
2851.23
1.645
2008
2914.48
2921.98
0.257
2744.65
−5.827
2860.33
−1.858
2589.58
−11.148
3053.78
4.779
2009
3066.47
2981.48
−2.772
2929.51
−4.466
2927.90
−4.519
2711.21
−11.585
3189.39
4.009
2010
3249.39
3249.11
−0.009
3240.49
−0.274
3222.71
−0.821
2838.54
−12.644
3332.16
2.547To 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 by PSO (PSO-GRNN), discrete grey model (DGM (1, 1)), and ordinary least squares linear regression (OLS_LR) model are selected as the comparison forecasting models. The GRNN, PSO-GRNN, and OLS_LR models employ the sample data of GDP, population, total export-import volume, and annual energy consumption, while DGM (1, 1) only uses the sample data of annual energy consumption.Table1 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.Figure 6
Annual energy consumption forecasting results with the PSOCA-GRNN, GRNN, PSO-GRNN, DGM (1, 1), and OLS_LR models.Figure 7
Relative error of forecasting results of PSOCA-GRNN, GRNN, PSO-GRNN, DGM (1, 1), and OLS_LR models.From Figure6, 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 the annual energy consumption forecasting. The forecasting performance of PSO-GRNN model is in second place, and the MAPE and MSE are 2.044% and 5568.734, respectively, which are bigger than that of PSOCA-GRNN and smaller than that of the remaining three models. For the remaining three models, namely, GRNN, DGM (1, 1), and OLS_LR, the forecasting performance of OLS_LR is better than single GRNN and DGM (1, 1), which has smaller MAPE and MSE values, and the DGM (1, 1) model shows the worst forecasting performance with the biggest MAPE and MSE values.Table 2
The calculation results of MAPE and MSE of PSOCA-GRNN, GRNN, PSO-GRNN, DGM (1, 1), and OLS_LR models.
Index
PSOCA-GRNN
GRNN
PSO-GRNN
DGM (1, 1)
OLS_LR
MAPE (%)
1.296
3.306
2.044
10.043
2.945
MSE
2384.132
13195.363
5568.734
95265.510
8368.450From the above analysis, we can see that the proposed PSOCA-GRNN model has the best forecasting performance, where the forecasting relative errors are all within the range of [–3%, +3%] and the MAPE and MSE values are both the smallest. On the whole, the intelligence forecasting models, especially the models optimized by meta-heuristic algorithms such as PSOCA-GRNN and PSO-GRNN, have better forecasting ability than traditional linear forecasting model in terms of energy consumption forecasting.


## 6. Conclusions

Energy consumption of a country is affected by many factors such as GDP, population, and political stability, which makes the energy consumption forecasting difficult. However, forecasting the energy consumption accurately is quite important because it can reflect economic and industrial development of a nation, which can also provide reference for energy planners and policy makers. In this paper, the annual energy consumption is forecasted by hybrid PSOCA-GRNN model, where the spread parameter of GRNN model is optimized by PSOCA algorithm (the combination of PSO and CA). Meanwhile, another four models, namely, single GRNN, PSO-GRNN, DGM (1, 1), and OLS_LR models, are selected as the comparison models. Taking the annual energy consumption of China as the empirical sample, the forecasting is performed by these five models. The calculation result shows that the proposed PSOCA-GRNN model has the best forecasting performance, the forecasting relative errors of which are all within the range of [–3%, +3%] and the MAPE and MSE values are both the smallest compared to other forecasting models. This means the proposed PSOCA-GRNN model which uses the PSOCA algorithm to automatically determine the spread parameter value of GRNN model can effectively improve the annual energy consumption forecasting accuracy.



---

*Source: 217630-2014-08-06.xml*