You are on page 1of 4

Price Forecasting Based on PSO Train BP Neural Network

Yong Gui He
Department of Economy Management, North China Electric Power University, Baoding 071003, Hebei, China

Li Bo
Department of Economy Management, North China Electric Power University, Baoding 071003, Hebei, China

Abstract: In this paper, the basic idea is to use percent of reserve capacity, the historical load and price to forecast short-term electricity price .The paper provides an example of bidding model to forecast market clear price using BP neural network trained by PSO. To compare with the result of traditional BP neural network, the proposed method has better forecasting precision and can convergence to global optimal solution at all times. Key words: back propagation network; particle swarm optimization; electricity market; market clear price



The electricity market is the development trend of the world's electric power industry. In the power market, the generation electricity companies participate in the bidding for connecting to network, and the resources are collocated by the market. In the electric power trading and bidding, if the generation electricity companies can get the information of price in advance, they can pre-arrange the production planning and the bidding strategies, so they can obtain greater proceeds. Therefore, with the continuous deepening of the electricity market, the generation electricity companies will pay more and more attention to the price forecasting. The Domestic and foreign scholars have done a great deal of research on the issue, and brought forward a lot of forecasting methods, which can be summed up mainly four categories as follows: the analysis methods based on the timing, such as the time series analysis, the grey forecasting, and mean generation function; the methods based on factor analysis, such as linear regression equation, artificial neural networks, fuzzy clustering and synthetic evaluation methods; the price forecasting methods based on econometrics, such as the three times model, the Markov economical forecasting theory; the forecasting methods based on the combination idea. In recent years, many scholars have explored the neural network forecasting methods actively. They have done

short-term price forecasts for the attempt, which separately used the regression neural network, RBF neural network, adaptive neural network, recurrent neural networks, and module neural network, and CMAC joint control neural networks [3] and so on, and they have received some harvest. While using neural network models to do forecasting, the emphases of studying are how to form the forecasting samples, and how to make the data of input layer. The structure of model has some disadvantages, such as the layers of network and the numbers of neurons in each layer are chosen by right of experience mostly, or it adopts tentative method when have not any experience knowledge, in other words, it chooses the data whose forecasting error is less relatively. So the problems of neural network lead to the restriction of precision and convergence, which are the difficulty to determine a reasonable structure and convergence to local solution. While investigating how to use BP neural networks to forecasting MCP, this paper focuses on the problem of weak search capabilities of BP neural network. This paper trains BP neural network forecasting model by using PSO algorithm, by which we can enhance the convergent velocity and the forecasting precision. The forecasting result of example shows that, the method is superior to conventional BP neural networks, which has rapid convergence and good scalability. II. PSO ALGORITHM AND BP NEURAL NETWORK

2.1 PSO algorithm PSO algorithm is a stochastic search optimization based on swarm intelligence, which operates at the basis of draw near theory, the particles in group learn from one anothet, and based on the knowledge they move to the neighborhood area which simple to them and better, the particles update themselves by pursuing individual extremum best and global extremum best .According to the following formulas, they update their velocity and location:



978-1-4244-2487-0/09/$25.00 ©2009 IEEE

c1 . we compare PSOalgorithm trainning No pbest with Meet ending condition? gbest . the most evolution algebra is Tmax . pbest as initial gbest is the optimal solution of pbest . this paper import PSO algorithm to optimize the weight of BP network. xid is pbest is the optimal solution to the particle. (5) According to the equations on velocity and position update.: δ algorithm). wij (k ) = wij (k − 1) + vi (k ) III. value with (4)According to each particle. the BP algorithm is used to confirm the weight modulus. and can not guarantee that convergence to the global minimum point. the formula is: xid = xid + vid in the formulas : the position, (2) vid is the velocity of particle.the current algebra is t=1 . the reverse spread is satisfied.the pbest is reinstalled as gbest . calculate the objective function according to each particle.e. In addition. and define the position. and has lots of advantages. (2) Evaluate the fitness value of each particle.if better than pbest .if better than gbest . commonly =2. Training BP neural network by using PSO algorithm, the Elements of position vector x .which belongs to defined particle swarm is all connection weight and Threshold of BP neural network。At first initialize position vector x , then use PSO algorithm search optimum placement。 the optimization flow chart of using the PSO algorithm to train BP neural network as follows: begin The process of the basic PSO algorithm as follows: (1)Initialize a flock of particles. ALGORITHM gbest is the optimal solution to the whole group. which realizes the abstract and predigestionof cerebroid form microstructure and function. (6)Stop rule (reach the most iteration times or the best fitness value) or the optimal solution stagnate.and we set the initial position and the velocity. (3)According to each particle. it will not change any more.the fitness is the p current optimal position best . According to the above problems. This method has achieved great success in Select optimal particle valuation to BP neural network weight and threshold value BP neural network trainning No Meet condition? yes end GRAPH 1 FORECASTING FLOW CHART OF USING THE TRAIN BP NEURAL NETWORK PSO ALGORITHM TO . BP network is multi-layer and feedback.vid = vid + c1rand () × ( pbest − xid ) + c2 rand () × ( g best − xid ) (1) various fields. but it has the potential to a local minimum. and BP algorithm is composed of two parts: the information passes forward and the error spreads in reverse.2 BP Neural Network Artificial neural network is the network formed by artificial nerve cell interconnecting. the mountain climbing is used to do weight training (i. Traditionally. 2. we adjust the velocity and position of particles. Loop to step (2) until the criterion is met. namely. In back-propagation algorithm. define the accelerated constants are c1 and c2 . rand () is the random in (0,1), (3) c2 TRAINING BP NEURAL NETWORK BY USING PSO c1 c 2 = are learn factors. we compare the fitness initialize all parameters of PSO pbest .

42s when traditional BP network is used。 obviously,the method which use PSO to train BP neural network to forecast is superior to using BP network to forecast singly.By tested some times . the deviation of predictive value will be greater. h ) 40 20 0 0 50 periods 100 150 GRAPH 2 CURVE OF ACTUAL VALUE AND PREDICTIVE VALUE OF MCP n+m + a (4) in the formulas: n is input nodes、 m is output nodes, n 1 = constant a=1~10 。there is only one node in output layer ,that is forecast periods MCP。 4. one is individual maximum relative error σ i .Input nodes includes MCP. 1 the model of forecasting data In order to inspection the effectiveness of the model . In addition. the comparison about forecast result and error curve between the method which use PSO to train BP neural network to forecast and the method which use typical BP neural network is given.94 %.the other is average relative error σ MAPE : when analysis prediction results statistically ,it is found that the single-period maximum relative error is 8.1998 to march 1st 1998.which come to 14 input nodes 。 the determination of the number of hidden nodes use formula as follow: 60 pso train bp predictive value bp predictive value pso train bp prediction error bp prediction error MCP / ( $/MW . this method can convergent well each time. It is also found from the graph 2 that , the trend forecasted by MCP and the actual price curve are basically identical. from january 1st. pi is the actual value of MCP、 pi is the predictive value of MCP; N is the number of periods . while traditional BP network can not reached presumptive convergence value sometimes 。Therefore.If the changing trend of load and MCP in each periods and holiday are considered.the forecast result will be better. .this paper using the load、the percentage of system surplus capacity and the marginal price data of PJM electricity market of is satisfied that use the method which use PSO to train BP neural network to forecast. V. APPLICATION EXAMPLE actual value 4.when MCP is forecasted 。 in graph2. 2 prediction result In order to measure prediction result.21%, average relative error is 2.average relative error is 7. using the data from march 23rd to march 29 th to inspection forecasting result。The training model use Multi-layered BP Neural Network.two statistical indexes are used .when the method which use PSO to train BP neural network to forecast is used. but in the periods when load change greatly. to train the forecasting network .38%.This paper use the method which use PSO to train BP neural network to forecast MCP. or the peak of MCP appeares.when traditional BP network is used. The average using time is 11. The algorithm of particle swarm optimization find optimal regions of complex search space through the interaction of σi= pi − pi 1 p i (5) (6) σ M APE = σ i N in the formulas.63%. when MCP is forecasted. the single-period maximum relative error is 18.76s when the method which use PSO to train BP neural network to forecast is used , while the average using time is18.IV. CONCLUSION The prediction of MCP is one of basic data that is used to structure optimal bidding strategy by generation company in electricity market. the percentage of system surplus capacity(the index is mainly used measure the effect about the spinning reserve to bidding behavior of market participants in electricity market)of the first two periods of forecast day、the day before forecast day andthe same periods of last week and system's actual load and the percentage of system surplus capacity of the periods in forecast day .system load . input nodes which are selected are mainly historical data in the same periods.

so the method has high accuracy. International Journal Hydroelectric Energy. WEI De Hua. On the other hand , the result is not very perfect.the composition of training set that is used to training BP neural network affect prediction results directly. so select the data of the similar historical days and the adjacent days to carried out the training . Price Forecasting Based on Generic Algorithm and BP Neural Network [J]. RELAY.Forecasting market-clearing price in zhejiang generation market using neural network [J]. Short-Term Electricity Price Forecast Using Neural Network [J]. International Journal Hydroelectric Energy.Guo.GAO Fu Ying. Multi-Layer forward BP Artificial Neural Networks [M]. and doesn't have the disadvantages of the BP algorithm such as slow convergence and local minimum. 21(2) : 71274 DONG Zhao Xia. By establishing simulation and forecast model with neural network toolbox in Matlab6. HU Hao Yun. the yellow river and water resources. The method utilizes the PSO algorithm to speed up the learning of the neural network. ZHOU Hao. 34 (11) : 4897 ZHAO Lin Ming. LIU. Automation of Electric Power Systems. REFERENCE [1] YANG Pu. 26 (9) : 49252 XIE Pei Yuan. 20(1) : 71274 CHEN Si Jie.which has something to do with the bidding strategy of generation company.FU Xiang Ming.It is problem that remains to be solved.Zheng. Study on Integrated Short Term Load Forecasting Model in Power System [J]. 2002.5 , and forecasting PJM electricity market in USA,the average relative error can be controlled within 10%. 2003. CHAN Qing Hua. XIE Pei Yuan. ZENG Ci Ling.YOU Da Hai.individuals in a population of particles.2002. Hunan Electric Power 2004. Electricity price forecast methods of electricity market [J]. 2004. By forecasting and analysising. GAO Jian Jun. 1999. 24 (2) : 0198 [2] [3] [4] [5] [6] .