A Hybrid Forecasting Model Based on Bivariate Division and a Backpropagation Artificial Neural Network Optimized by Chaos Particle Swarm Optimization for Day-Ahead Electricity

and Applied Analysis 3 To validate the performance of a BP neural network, the sample data are usually divided into three parts: the training data, the validation data, and the testing data. If there are M input-output pairs in the training data in total and the number of the neurons in the output layer is K, then the objective function of the BPANN is given by E = 1 2M M ∑ i=1 K ∑ j=1 (doi j − aoi j ) 2 , (5) where do j and ao j are the desired and actual outputs, respectively, of the jth neuron obtained by the ith input-output pair. In the operation process of the BPANN, the weight is updated according to the gradient descent rules expressed as follows [22]: b k (i + 1) = b k (i) − η∂E ∂b k w ik (i + 1) = w ik (i) − η∂E ∂w ik , (6) where η is the learning rate parameter. In this paper, BPANN has three layers, the weights and thresholds of which are denoted by w 1 , b 1 and w 2 , b 2 . The activation function of first layer is a logistic sigmoid function, and that of the second layer is a linear function. 3. Bivariate Division BPANN (BD-BPANN) In Section 1, it is mentioned that electricity price and demand have a closed relationship. In addition, Singhal and Swarup obtained the result that the price forecasting values using the neural network model indicate that the electricity price in the deregulated markets is strongly dependent on the trend in the load demand and the clearing price [19]. Therefore, to promote the accuracy of price forecasting, a bivariate division model based on BPANN, the price databases, and the demand databases is proposed. This hybrid approach skillfully transforms both of the two variables, demand and price, into one, as denoted by DV, using the dividing principle. This principle can be shown as DV = Demand Price . (7) Next, a sample matrix of DV is used to obtain the parameters of BPANN, which will provide the forecasting values of DV. Meanwhile, the network of electricity demand is also obtained by training its BPANN. Eventually, the electricity price forecasting values can be calculated using the following simple formula: Priceforecasting = Demandforecasting DVforecasting . (8) Details of BD-BPANN can be shown by these steps. Step 1. Obtain the values of DV by using DV = Demand/ Price. Step 2. Performpreprocessing of the training set of electricity demand using the following formula: DataTraining Set = DataTraining Set −min (DataTraining Set) max (DataTraining Set) −min (DataTraining Set) . (9) In addition, the testing set will be mapped by DataTesting Set = DataTesting Set −min (DataTraining Set) max (DataTraining Set) −min (DataTraining Set) . (10) Note that the inputs and the outputs of the training sets and testing sets themselves are column vectors. Step 3. Use DataTraining Set to train the BPANN and obtain BPANNDemand. Step 4. Obtain the mapping values of the inputs of DataTesting Set through OutputBPANNDemand = BPANNDemand (inputs of the demand part of DataTesting Set) . (11) Step 5. Obtain the forecasting values by postprocessing of the output by DemandForecasting = OutputBPANNDemand × (max (DataTraining Set) −min (DataTraining Set)) +min (DataTraining Set) . (12) Step 6. Replace the electricity demand with DV values and repeat Steps 2–5 to obtain the forecasting values of the DVs. Step 7. Obtain the forecasting price by PriceForecasting = DemandForecasting DVForecasting . (13) Figure 1 shows the specific process of BD-BPANN. 4. Chaos Particle Swarm Optimization BD-BPANN (CPSO-BD-BPANN) The particle swarm optimization (PSO) algorithm was first developed by Kennedy and Eberhart [23] as a populationbased optimization approach. In a PSO system, there are multiple candidate solutions, and each solution is named a “particle.” Each particle is captured by two factors: the velocity and the position. 4 Abstract and Applied Analysis Forecasting demand Step 1. Get the values of DV by DV=Demand/Price Step 2. Pre-processing of training set of electricity demand through this below formula: Data_TrainingSet=(Data_TrainingSet–min (Data_TrainingSet ))/(max (Data_TrainingSet )-min (Data_TrainingSet ) ), (9) And the testing set will be mapped by Data_TestingSet=(Data_TestingSet–min (Data_TrainingSet ))/(max (Data_TrainingSet )-min (Data_TrainingSet ) ), (10) It must be pointed that inputs and outputs of training sets and testing sets are column vectors. Step 3. Using Data_TrainingSet to train the BPANN and obtainingBPANN_Demand. Step 4. Get mapping values of inputs of Data_TestingSetthrough: Output_(BPANN_Demand )=BPANN_Demand (inputs of Demand part of Data _TestingSet ) (11) Step 5. Get the forecasting values by post-processing of Output by: Demand_Forecasting= Output_(BPANN_Demand )×(max (Data_TrainingSet )min (Data_TrainingSet ) )+ min (Data_TrainingSet ) , (12) Step 6. Replacing the electricity demand with DV and re-doing step 2-5 to get the DV’s forecasting values. Step 7. Get the forecasting price by: Price_Forecasting=Demand_Forecasting/DV_Forecasting , (13) Training process Training process Actual price Dvision pocess Reconstruct Preprocess Reconstruct Electricity price Electricity demand Forecasting price Forecasting DV Testing set Training set Training set Input set of testing se t of demand Input set of testing set of DV DV Preprocess Reconstruct Preprocess Multiply BD-BPANN · · · · · · Figure 1: BD-BPANNmethod. 4.1. Chaos Particle Swarm Optimization (CPSO). In a standard PSO, at iteration t + 1, for the kth particle, its velocity (V k ) and the position (x k ) are updated by [24] Vt+1 k = wVt k + c 1 × rand1 × (P k − x t k ) + c 2 × rand2 × (P g − x t k ) , x t+1 k = x t k + Vt+1 k , (14) where w is the inertia weight, rand1 and rand2 are two independent random variables drawn from a uniform distribution with range [0, 1], and c 1 and c 2 are positive constant parameters that are known as the learning parameters. The remaining two variables P k and P g denote the personal best position of the kth particle in history and the current global best position, respectively; that is, by substituting these two values into the predetermined objective function, the optimal values of the kth particle and the whole particles can be obtained. Abstract and Applied Analysis 5 Although the standard PSO is widely applied in the parameter optimization field, it had disadvantages of easily remaining in the local optimization of the parameters, and its convergence speed is slow. As indicated by Singhal and Swarup [19], the use of the chaos will accelerate the convergence speed due to the nonrepetitive nature of chaos. Thus, the chaotic PSO (CPSO) algorithm is adopted in this paper to obtain the optimal parameter values with a higher convergence speed.The improvement of the CPSO algorithm over the standard PSO is that it initializes the position of the particles by the following formula: x i+1 = μx i (1 − x i ) , i = 1, 2, . . . , n, (15) where μ is the control variable located in the range (2, 4]. 4.2. CPSO-BD-BPANN. In the classical training process of an artificial neuron network, especially for that of BPANN, the initial parameters, w 1 and w 2 along with b 1 and b 2 , often, are random matrices or vectors and consequently easily fall into the local optimal solution [25]. Chaos particle swarm optimization (abbreviated as CPSO) is an effective artificial algorithm that has the ability to achieve global optimization. CPSO is based on the basic concept of particle swarm optimization and the theory of chaos. In this paper, CPSO is used to achieve the best initial parameters of the BPANN.The improved network outperforms the previous one and has an improved ability to determine the global optimal parameters, with a lower probability of overfitting and a higher forecasting accuracy. Main steps of this CPSO-BPANN are described as follows. Step 1. Reshape the parameters w 1 , w 2 and b 1 , b 2 of the BPANN to one vector and denote the length of the vector by n. Step 2. Perform the initialization of theCPSO’s swarm,whose length is n. Step 3. Choose the fitness evaluation of CPSO to be themean squared error (MSE): MSE = (VectorActual − VectorNetworkOutput) 2 LengthVectorActual . (16) Step 4. Execute the optimizing process of the CPSO and obtain the best swarm. Step 5. Reshape the best swarm into four parameters of the network, and then reconstruct the BPANN by using these optimal matrices and vectors. The resulting network is called CPSO-BPANN. Next, the BD-BPANN will replace the BPANN’s part of the CPSO-BPANN.The process of the new forecastingmodel is as follows. Step 1. Obtain the values of DV by using DV = Demand/ Price. Step 2. Perform the preprocessing of the training set of the electricity demand using the following formula: DataTraining Set = DataTraining Set −min (DataTraining Set) max (DataTraining Set) −min (DataTraining Set) . (17) And the testing set will be mapped by DataTesting Set = DataTesting Set −min (DataTraining Set) max (DataTraining Set) −min (DataTraining Set) . (18) Note that the inputs and outputs of the training sets and the testing sets are column vectors. Step 3. Construct the BPANN based on the structure of the data. Step 4. Reshape the parameters, w 1 , w 2 and b 1 , b 2 , of the BPANN into one vector, and denote the length of the vector as n. Step 5. Perform the initialization of theCPSO’s swarm,whose length is n. Step 6. Choose the fitness evaluation of CPSO as the mean squared error (MSE): MSE = (VectorActual − VectorNetworkOutput) 2 LengthVectorActual . (19) Step 7. Execute the optimization process of the CPSO and obtain the best swarm. Step 8. Reshape the best swarm into four parameters of the network, and then reconstruct the BPANN, consequently named as CPSO-BPANN, by using these optimal matrices and vectors. Step 9. Use DataTraining Set to train the CPSO-BPANN to obtain CPSO-BPANNDemand. Step 10. Obtain the mapping values of the inputs of DataTesting Set through OutputCPSO-BPANNDemand = CPSO-BPANNDemand (inputs of the demand part of DataTesting Set) . (20)and Applied A


Introduction
The price of electricity is not only related to the interests of the market participants but also affected by many aspects of the relevant society and the economy.Thus, the price of electricity has been the subject of considerable research.Accurate forecasting of electricity price is of great significance, both for government regulatory agencies and for public power companies.However, the electricity prices exhibit large fluctuations, and the characteristics of the electricity prices in various electricity markets are notably different.Therefore, it is notably difficult to predict all of the electricity prices using only one model.As indicated by Anbazhagan and Kumarappan, in general, the forecasting errors for the electricity price vary from approximately 5% to 36%, which are relatively high compared with the forecasting errors for the electricity load (usually in the range from 1% to 3%).Thus, there is still an urgent demand for exploiting new electricity price forecasting models to improve the electricity price forecasting accuracy [1].
Existing forecasting models for the electricity price can be categorized by different classification criteria.Two criteria are adopted frequently, that is, forecasting models based classification and forecasting horizons based classification.According to the former classification criterion, the electricity price forecasting models can be generally classified into three categories [2]: (i) the stochastic models, (ii) the causal forecasting approaches, and (iii) the artificial intelligence based methods.According to the latter criterion, forecasting models for electricity price consist of three types: the shortterm, the midterm, and the long-term models.However, as is known, most forecasting models cannot be sorted into 2 Abstract and Applied Analysis a single category by the forecasting models based classification rule because increasing numbers of hybrid or combined models are being developed to obtain electricity price results with superior performance.Therefore, this paper will survey and summarize the previous electricity price forecasting models according to their forecasting horizons.The shortterm electricity price forecasting is usually known as the day-ahead electricity price forecasting.During the recent few decades, a large number of day-ahead electricity price forecasting models have been exploited for their importance in establishing bidding strategies for the spot market [3].A two-stage model derived from panel cointegration and a particle filter was proposed by Li et al. [4] to forecast the day-ahead electricity data of Pennsylvania, New Jersey, Maryland (PJM).Zhang et al. [5] presented the performance of a hybrid approach composed of the wavelet transform (WT) method, the autoregressive integrated moving average (ARIMA) model, the least squares support vector machine (LSSVM), and the particle swarm optimization in forecasting the day-ahead electricity price of New South Wales, Australia.The WT and ARIMA algorithms were also used by Tan et al. [6] to build a hybrid model with the generalized autoregressive conditional heteroskedasticity to examine the day-ahead electricity price forecasting performance of PJM and Spain.A day-ahead price forecasting model, which was constructed by a feature selection approach and a cascaded neural network algorithm, was developed by Amjady and Keynia [7] to perform an electricity price survey in Spain and Australia.Several other day-ahead electricity price forecasting models can be found in [8][9][10][11][12][13][14][15].Accurate midterm electricity price forecasting is essential in assisting the market players to define their contracts and hedging policies.Horizons for midterm electricity price forecasting usually last from one month ahead to six months ahead.Yan and Chowdhury [16] presented a hybrid forecasting model of the midterm electricity clearing price on the basis of the LSSVM and autoregressive moving average with external input models.A multiple support vector machine approach was also applied by the same two authors [17] to the electricity market clearing price forecasting by using the PJM interconnection data.Compared to the short-term and midterm electricity price forecasting tasks, the long-term electricity price forecasting is conducted on a much wider horizon to provide the market players with the ability to make expansion plans.Pao [3] adopted an artificial neural network model to survey the long-term electricity price forecasting results on the European Energy Exchange market.However, studies regarding the long-term electricity price forecasting are relatively few compared to the number of studies on short-term and midterm electricity price forecasting due to the relatively long forecasting horizons required.
The accuracy of electricity price forecasting is affected by many factors, such as historical price, temperature, and load, among which the effect of load on electricity price forecasting is quite significant.Much of the relevant literature attempted to improve the accuracy of the electricity price by considering the impact of electricity load on the electricity price.For example, Lin et al. [18] regarded the load as one of the inputs to the enhanced probability neural network proposed in their paper to demonstrate its performance in the electricity price forecasting.Load was also contained in the input variables of the enhanced radial basis function network proposed by Lin et al. [15].Singhal and Swarup [19] also used the historical load and forecasted load as inputs to the artificial neural network models to obtain the electricity price forecasting results.Although the specific models used in these studies are different, these studies have one factor in common: the impact of the load on the electricity price in these studies was embodied by directly using the load as one of the input variables and the electricity price as the output variable, rather than to transform both electricity demand and price into a new variable.Based on this idea of transformation, a new hybrid electricity model is proposed in this paper.

Backpropagation Artificial Neuron Network (BPANN)
An artificial neural network is widely used to validate the underlying relationship between the relevant dependent and independent variables.The advantage of the use of neural networks compared to the traditional methods lies in their capacity to analyze complicated patterns quickly with a low error.In addition, in neural networks, no assumptions are required regarding the characteristics of the underlying distribution of the data [20].Among all of the neural networks, the backpropagation artificial neural network (BPANN) is the most frequently used neural network.The basic BPANN consists of three parts: the input layer part, the hidden layer part (or middle layer part, as one or more layers can be contained in this part), and the output layer part.Generally, the number of neurons in the input layer and in the output layer is determined according to the desired input variables and output variables, respectively, while there is no fixed rule to choose the number of the neurons in the hidden layer part.For a BPANN with  neurons  1 ,  2 , . . .,   in the current layer, the output   of the th neuron in the adjacent next layer is expressed as where   is the weight connection from the neuron  of the current layer to the neuron  of the adjacent next layer,   is the threshold of the th neuron, and (⋅) is the activation function, which usually consists of three types [21]: (i) (⋅) is the linear function defined as (ii) (⋅) is the logistic sigmoid (logsig) function defined as (iii) (⋅) is the hyperbolic sigmoid (tansig) function defined as To validate the performance of a BP neural network, the sample data are usually divided into three parts: the training data, the validation data, and the testing data.If there are  input-output pairs in the training data in total and the number of the neurons in the output layer is , then the objective function of the BPANN is given by where do   and ao   are the desired and actual outputs, respectively, of the th neuron obtained by the th input-output pair.
In the operation process of the BPANN, the weight is updated according to the gradient descent rules expressed as follows [22]: where  is the learning rate parameter.In this paper, BPANN has three layers, the weights and thresholds of which are denoted by  1 ,  1 and  2 ,  2 .The activation function of first layer is a logistic sigmoid function, and that of the second layer is a linear function.

Bivariate Division BPANN (BD-BPANN)
In Section 1, it is mentioned that electricity price and demand have a closed relationship.In addition, Singhal and Swarup obtained the result that the price forecasting values using the neural network model indicate that the electricity price in the deregulated markets is strongly dependent on the trend in the load demand and the clearing price [19].Therefore, to promote the accuracy of price forecasting, a bivariate division model based on BPANN, the price databases, and the demand databases is proposed.This hybrid approach skillfully transforms both of the two variables, demand and price, into one, as denoted by DV, using the dividing principle.This principle can be shown as Next, a sample matrix of DV is used to obtain the parameters of BPANN, which will provide the forecasting values of DV.Meanwhile, the network of electricity demand is also obtained by training its BPANN.Eventually, the electricity price forecasting values can be calculated using the following simple formula: Details of BD-BPANN can be shown by these steps.
Step 1. Obtain the values of DV by using DV = Demand/ Price.
Step 2. Perform preprocessing of the training set of electricity demand using the following formula: In addition, the testing set will be mapped by Note that the inputs and the outputs of the training sets and testing sets themselves are column vectors.
Step 3. Use Data Training Set to train the BPANN and obtain BPANN Demand . Step Step 6. Replace the electricity demand with DV values and repeat Steps 2-5 to obtain the forecasting values of the DVs.
Step 7. Obtain the forecasting price by Figure 1 shows the specific process of BD-BPANN.

Chaos Particle Swarm Optimization BD-BPANN (CPSO-BD-BPANN)
Forecasting demand Step 1. Get the values of DV by DV=Demand/Price Step 2. Pre-processing of training set of electricity demand through this below formula: And the testing set will be mapped by Data_TestingSet=(Data_TestingSet-min (Data_TrainingSet ))/(max (Data_TrainingSet )-min (Data_TrainingSet ) ), (10) It must be pointed that inputs and outputs of training sets and testing sets are column vectors.
Step 3. Using Data_TrainingSet to train the BPANN and obtainingBPANN_Demand.
Step 7. Get the forecasting price by:

Chaos Particle Swarm Optimization (CPSO).
In a standard PSO, at iteration  + 1, for the th particle, its velocity (V  ) and the position (  ) are updated by [24] V where  is the inertia weight, rand1 and rand2 are two independent random variables drawn from a uniform distribution with range [0, 1], and  1 and  2 are positive constant parameters that are known as the learning parameters.The remaining two variables   and   denote the personal best position of the th particle in history and the current global best position, respectively; that is, by substituting these two values into the predetermined objective function, the optimal values of the th particle and the whole particles can be obtained.
Although the standard PSO is widely applied in the parameter optimization field, it had disadvantages of easily remaining in the local optimization of the parameters, and its convergence speed is slow.As indicated by Singhal and Swarup [19], the use of the chaos will accelerate the convergence speed due to the nonrepetitive nature of chaos.Thus, the chaotic PSO (CPSO) algorithm is adopted in this paper to obtain the optimal parameter values with a higher convergence speed.The improvement of the CPSO algorithm over the standard PSO is that it initializes the position of the particles by the following formula: where  is the control variable located in the range (2,4].

CPSO-BD-BPANN.
In the classical training process of an artificial neuron network, especially for that of BPANN, the initial parameters,  1 and  2 along with  1 and  2 , often, are random matrices or vectors and consequently easily fall into the local optimal solution [25].Chaos particle swarm optimization (abbreviated as CPSO) is an effective artificial algorithm that has the ability to achieve global optimization.CPSO is based on the basic concept of particle swarm optimization and the theory of chaos.In this paper, CPSO is used to achieve the best initial parameters of the BPANN.The improved network outperforms the previous one and has an improved ability to determine the global optimal parameters, with a lower probability of overfitting and a higher forecasting accuracy.Main steps of this CPSO-BPANN are described as follows.
Step 1. Reshape the parameters  1 ,  2 and  1 ,  2 of the BPANN to one vector and denote the length of the vector by .
Step 2. Perform the initialization of the CPSO's swarm, whose length is .
Step 3. Choose the fitness evaluation of CPSO to be the mean squared error (MSE): Step 4. Execute the optimizing process of the CPSO and obtain the best swarm.
Step 5. Reshape the best swarm into four parameters of the network, and then reconstruct the BPANN by using these optimal matrices and vectors.The resulting network is called CPSO-BPANN.
Next, the BD-BPANN will replace the BPANN's part of the CPSO-BPANN.The process of the new forecasting model is as follows.
Step 1. Obtain the values of DV by using DV = Demand/ Price.
Step 2. Perform the preprocessing of the training set of the electricity demand using the following formula: Note that the inputs and outputs of the training sets and the testing sets are column vectors.
Step 3. Construct the BPANN based on the structure of the data.
Step 4. Reshape the parameters,  1 ,  2 and  1 ,  2 , of the BPANN into one vector, and denote the length of the vector as .
Step 5. Perform the initialization of the CPSO's swarm, whose length is .
Step 6. Choose the fitness evaluation of CPSO as the mean squared error (MSE): Step 7. Execute the optimization process of the CPSO and obtain the best swarm.
Step 8. Reshape the best swarm into four parameters of the network, and then reconstruct the BPANN, consequently named as CPSO-BPANN, by using these optimal matrices and vectors.
Step 9. Use Data Training Set to train the CPSO-BPANN to obtain CPSO-BPANN Demand . Step Step 12. Replace the electricity demand with DV and repeat Steps 2-11 to obtain the forecasted values of the DVs.
Step 13.Obtain the forecasted price by Figure 2 schematically shows the entire process of the new model.

Numerical Results
In this section, the electricity price and demand will be used to test the models of CPSO-BD-BPANN, BD-BPANN, CPSO-BPANN, and BPANN.To begin, the source of data, the forecasting principle, and the cases that must be studied are introduced.Next, cases 1 and 2 are researched specifically with data provided in tables and figures.Finally, the remaining cases are studied, and, consequently, evaluation of the models is performed by comparing the forecasting accuracy, calculation time, and stability.

Data Selection, Forecasting Principles, and Case Studies.
In Data Selection section, the source of the electricity data and certain properties of the data will be briefly introduced.Because a comparison is performed among these models, it is necessary to establish certain principles, which will be mentioned in the section Forecasting Principles.Eventually, to obtain the overall forecasting effectiveness of each model, this paper chooses five cases to illustrate the overall forecasting results calculated by the four models considered.

Data Selection.
The electricity price and demand of Victoria of Australia in 2008 are chosen as the database under consideration in this paper.In each day of this database, there are 48 observation points, each representing half-hours.Figure 3 shows the schematic diagram of the electricity price, and Figure 4 shows the schematic diagram of the demand.
It is obvious that demand data are more regular than the electricity price data.

Forecasting Principles
Principle 1.This new forecasting model, whose lifespan is one day, will be updated by reconstructing and training new samples when it has provided 48 forecasting values.Principle 5.In this paper, the forecasting result of the BPANN is the best result among the 10 times the forecasting results are obtained; this best BPANN is abbreviated as b-BPANN.

Study
And it must be pointed out that elements of all columns except the first column are MAPEs which is dimensionless in Tables 4, 5, 6, 7, and 8.The details of each case are presented in Table 1.

Study of Case 1.
In this case, each step, as mentioned in Section 4, will be clearly presented through figures and tables to understand the main concept of this proposed model.First, electricity price, demand, and the value of DV (as described in Section 3) are presented in Figure 6.
The electricity demand clearly has more regularity in the data than those of price and DV.In addition, the fact that the volatility of price and DV do not exhibit distinct differences is also observed.Next, the results of the BD-BPANN will be presented in Table 2 and Figure 7.
In Table 2, units of demand and price are Hmk/h and $/Mwh, respectively.The symbol " * " represents the time spots, a total of 27 points, for which BD-BPANN outperforms b-BPANN.The symbol " †" represents the reverse situation to that of the symbol " * ." The symbol " ‡" represents the results of the average and the variance of each column (except the first column).Specifically, in these 48 time spots, the best forecasting MAPE of demand is 0.05% at 10:30 of this day, and the worst MAPE is 6.06% at 1:00.The average value, the variance, and average forecasting MAPE of the electricity demand obtained through b-BPANN are 5645.0323,555.27757, and 1.38%, respectively.Similarly, the best forecasting value of the DV whose MAPE is 1.25% is at 11:30 of June 9 in 2008, and the worst performance of forecasting occurred at 2:30.The average value, variance, and average forecasting MAPE of the DV which b-BPANN calculates are 222.68,88.982, and 11.24%, respectively.To    make a comparison between b-BPANN and BD-BPANN, the output of b-BPANN, that is, the price forecasting values obtained by only using b-BPANN, is also presented in Table 2. 0.52% is the best MAPE of b-BPANN at 16:30, and 42.39% is the worst MAPE obtained when utilizing b-BPANN to forecast electricity price occurred at 2:30.In addition, the average value, variance, and average forecasting MAPE of the price are 30.903,16.482, and 15.30%, respectively.Furthermore, the best performance of BD-BPANN occurred at 20:30, with a forecasting MAPE of 0.56%; meanwhile, 39.00% is the worst MAPE of this new forecasting method.The average forecasting MAPE of the price calculated by BD-BPANN is 13.25%, which is less than that of the classical method.
Figure 7 shows the forecasting results of b-BPANN and BD-BPANN and the actual electricity price.It is clear that BD-BPANN is superior to BPANN because the green points (forecasted values of BD-BPANN) are closer to the blue curve (actual price) than the red rectangles.
Next, the consequence of using CPSO-BD-BPANN is described as follows.In Table 3, units of demand and price are Hmk/h and $/Mwh, respectively.The forecasting MAPE of the demand obtained by CPSO-BPANN ranges from 0.12% at 15:00 to 4.55% at 1:00, and the CPSO-BPANN's average forecasting MAPE of the demand is 1.23%, which is less than 1.38%, the result of the b-BPANN.At 22:30, the best DV forecasted value, whose MAPE is 0.009%, appears.The worst MAPE of DV reaches 41.94% at 8:30, with the average value of the MAPE of DV calculated by CPSO-BPANN of 10.79%, which is still less than the 11.24% obtained using b-BPANN only.In the end, the final model, CPSO-BD-BPANN, is used to forecast the electricity prices of June 9 in 2008.Additionally, to enable a comparison between CPSO-BPANN and CPSO-BD-BPANN, the results of CPSO-BPANN, that is, to calculate the forecasting values of price by only using CPSO-BPANN, are also presented in Table 2. 0.23% is the best MAPE of CPSO-BPANN at 8:00, and 42.64% is the worst  Abstract and Applied Analysis 13 MAPE of the CPSO-BPANN used to forecast electricity price, which occurred at 2:30.In addition, the average MAPE CPSO-BPANN is 14.18%, which is better than that of the b-BPANN of 15.30%.In the end, the final model in this paper is used to forecast the electricity price of June 9 in 2008.At 10:00 on this day, the new model yields the best forecasting MAPE, which is only 0.36%.On the contrary, at 2:30, the worst performance of CPSO-BD-BPANN, with a MAPE of 43.07%, arises.The average MAPE obtained by CPSO-BD-BPANN of this day is 12.31%, which is less than that calculated by CPSO-BPANN.However, there are 28 time spots, that is, the symbol " * " in Table 3, where the effectiveness of CPSO-BD-BPANN is better than that of CPSO-BPANN. Figure 8 graphically shows the results presented in Table 3. Overall, it is not difficult to determine that CPSO-BD-BPANN has the best effectiveness among the models of b-BPANN, BD-BPANN, CPSO-BPANN, and CPSO-BD-BPANN.Further, the fact that BD-BPANN outperforms CPSO-BPANN, whose calculating time is much longer than that of BD-BPANN, explains why BD-BPANN is more efficient than CPSO-BPANN, which is an optimal artificial neural network under the same conditions, including calculating capacity and language of debugging.

Study of Case 2.
The primary objective of this part is testing the effectiveness of models in spring, rather than explaining the details of the methods, as was performed in case 1.This section will present the effectiveness of each method, as measured by MAPE.Tables 4 and 5 present a comparison between the b-BPANN method and the CPSO-BD-BPANN and that between CPSO-BPANN and BD-BPANN.It is obvious that CPSO-BD-BPANN performs better than b-BPANN in all of the spring week except March 11.In March 10, March 13, March 14, and March 16, BD-BPANN is more efficient than CPSO-BPANN, and the overall effectiveness of BD-BPANN is still better than that of CPSO-BPANN in this randomly selected spring week.The results indicate that this sample transformation, named bivariate division, of the input of b-BPANN is more effective than a complex process using an artificial intelligent algorithm, CPSO in this paper, to obtain the best initial parameters of the network.

Results Analysis and Models Evaluation.
In this section, the results of the proposed models of cases 3-5 are presented in Tables 6, 7, and 8. Next, each season's average MAPE of CPSO-BD-BPANN, BD-BPANN, CPSO-BPANN, and b-BPANN is presented in Table 9. Simultaneously, the forecasting values of these approaches are also illustrated in pictures.Finally, each of the models will be evaluated through three aspects: forecasting accuracy, calculating time, and stability.6 collects the forecasting values calculated by CPSO-BD-BPANN and BD-BPANN.Each column refers to result of each method on different days of summer.For June 9, the lowest MAPE is 0.36% at 10:00 when using BD-BPANN, which also exhibited the highest MAPE, 43.70%, at 2:30 on this day.The forecasting MAPE of BD-BPANN on June 10 ranges from 0.02% at 3:00 to 44.62% at 8:30.On June 11, the MAPE values of BD-BPANN ranged   from 0.04% at 15:30 to 41.50% at 1:30.On June 12 of this summer week, CPSO-BD-BPANN has the best performance, whose MAPE is 0.04% at 16:00, while BD-BPANN has the worst one, whose MAPE is 35.42% at 6:00.The MAPE of the fifth day in this week, June 13, changes from 0.07% for CPSO-BD-BPANN at 15:30 to 32.36% for BD-BPANN at 17:00.On June 14, the lowest forecasting MAPE of 0.02% for BD-BPANN occurred at 14:00 and CPSO-BD-BPANN exhibited the worst forecasting effectiveness with a MAPE of 31.51% at 00:00.For the last day of this summer week, the MAPE ranges from 0.001% at 13:00 to 49.06% at 6:30, both of which are for BD-BPANN.

Results Analysis. Table
Table 7 shows the MAPE computed through using CPSO-BD-BPANN and BD-BPANN to forecast one week of autumn's electricity price.For September 15, the minimum MAPE is 0.14% at 13:00 when using BD-BPANN to forecast price, while CPSO-BD-BPANN exhibited the maximum MAPE of 35.03% at 11:30.The forecasting MAPE of September 16 changes from 0.12% obtained by CPSO-BD-BPANN at 10:00 to 45.48% obtained by BD-BPANN at 18:00.On September 17, the lowest MAPE value of 0.08% at 14:00 and the highest MAPE of 157.45% at 3:00 were both for BD-BPANN.On September 18 of this week, CPSO-BD-BPANN exhibited the lowest MAPE of 0.19% at 11:30, while its highest MAPE, 29.32% at 6:30, is also the highest in this day.The MAPE of the fifth day, September 19, in this autumn week ranges from 0.96% for CPSO-BD-BPANN at 5:00 to 27.53% for BD-BPANN at 22:00.On September 20, the lowest forecasting MAPE of 0.08% for CPSO-BD-BPANN was observed at 14:30, while the optimized BD-BPANN model exhibited the maximum MAPE of 45.91% at 9:00 of this day.For the last day of this week, the MAPE changes from 0.28% at 9:30 to 43.43% at 23:30, both for BD-BPANN.
Table 8 demonstrates the forecasting values calculated by CPSO-BD-BPANN and BD-BPANN.Each column refers to the result of each method on different days of winter.For December 8, the lowest MAPE is 0.06% at 0:00 when using CPSO-BD-BPANN, while BD-BPANN exhibits the highest MAPE of 35.00% at 5:00 on this day.The forecasting MAPE of December 9 ranges from 0.006% at 12:00 to 34.43% at 1:30 which are calculated through CPSO-BD-BPANN and BD-BPANN, respectively.On December 10, the MAPE of CPSO-BD-BPANN was 0.30% at 0:30 which is the lowest MAPE, while BD-BPANN exhibited the highest MAPE of 25.18% at 23:00.On December 11 of this winter week, CPSO-BD-BPANN has the best performance, whose MAPE is 0.26% at 10:30, while BD-BPANN exhibited the worst MAPE of   approach, multiplication of the forecasted DV and the demand is taken as the final forecasted price, which consequently improves the accuracy of forecasting price than that using the original BPANN.
(ii) The CPSO algorithm, BPANN, and the concept of bivariate division are combined to form the new models: BD-BPANN and CPSO-BD-BPANN.
(iii) This paper evaluated the models through three aspects: forecasting accuracy, calculating time, and stability.The evaluation indicated that CPSO-BD-BPANN is a relatively better model when only considering accuracy and that BD-BPANN is a comparatively better model when the cost of calculation should be low, while the accuracy remains high.

Conclusions
In this paper, the BD-BPANN method is creatively proposed by combining the concept of bivariate division with BPANN to forecast electricity price more accurately and stably than BPANN does.In four seasons of 2008, the average MAPE of BD-BPANN is 10.36%, which is less than those of BPANN and CPSO-BPANN.Note that BD-BPANN performs better than BPANN and CPSO-BPANN in each season.Next, the CPSO algorithm was applied to optimize the initial parameters of BD-BPANN to improve the forecasting accuracy.This optimized forecasting model, named CPSO-BD-BPANN, forecasted the price with an average MAPE, 10.02%, in the weeks of the four seasons considered.Additionally, the CPSO-BD-BPANN method outperforms the other approaches in forecasting accuracy.Finally, the evaluation of the models of BPANN, BD-BPANN, CPSO-BPANN, and CPSO-BD-BPANN was performed.This evaluation involved tests regarding accuracy, calculation time, and stability.For the aspect of accuracy, CPSO-BD-BPANN is the best model.The BPANN model, which exhibits an average calculation time of 3.34 seconds, has huge advantages compared with the other models regarding the calculation time.The last test, stability, indicated that the proposed methods, both of which have an index of stability of 0.25, are more stable than the original BPANN and the CPSO-BPANN models, with indices of stability of 3 and 1.5, respectively.These results illustrate that CPSO-BD-BPANN is a superior model to the others when only concerning accuracy.And BD-BPANN outperforms CPSO-BD-BPANN, CPSO-BPANN, and BPANN when calculation time is the crucial factor.

Highlights
The highlights of this paper are as follows: skillful transformation of the electricity price and demand into a new variable, known as DV, rather than only regarding both of them as inputs of the network; utilization of chaos particle swarm optimization to obtain the relatively improved weights and thresholds of the network, rather than the random ones; proposal of two different forecasting strategies for the user of the model.

Data
Testing Set = Data Testing Set − min (Data Training Set ) max (Data Training Set ) − min (Data Training Set ) .

4 . 11 ) 5 .
Obtain the mapping values of the inputs of Data Testing Set through Output BPANN Demand = BPANN Demand (inputs of the demand part of Data Testing Set ) .(Step Obtain the forecasting values by postprocessing of the output by Demand Forecasting = Output BPANN Demand × (max (Data Training Set ) − min (Data Training Set )) + min (Data Training Set ) .

=
Data Training Set − min (Data Training Set ) max (Data Training Set ) − min (Data Training Set ) .

( 17 )
And the testing set will be mapped by Data Testing Set = Data Testing Set − min (Data Training Set ) max (Data Training Set ) − min (Data Training Set ) .

Principle 2 .Principle 3 .Principle 4 .
The four-hour points will be used to forecast the price of the next half-hour.The number of neurons in the hidden layer of the CPSO-BPANN is 3.The points of the previous 21 days of the target day, a total of 1008 half-hour values, construct the training set.
h a p e d v e c t o r R e s h a p e d v e c t o r M u lt i p ly F o r e c a s t i n g p r i c

Figure 6 :Figure 7 :
Figure 6: Schematic diagram of the electricity price demand and DV.