2017 Embedded Applications of MS-PSO-BP on Wind/Storage Power

jh.zhu@ntu.edu.cn Abstract Higher proportion wind power penetration has great impact on grid operation and dispatching, intelligent hybrid algorithm is proposed to cope with inaccurate schedule forecast. Firstly, hybrid algorithm of MS-PSO-BP (Mathematical Statistics, Particle Swarm Optimization, Back Propagation neural network) is proposed to improve the wind power system prediction accuracy. MS is used to optimize artificial neural network training sample, PSO-BP (particle swarm combined with back propagation neural network) is employed on prediction error dynamic revision. From the angle of root mean square error (RMSE), the mean absolute error (MAE) and convergence rate, analysis and comparison of several intelligent algorithms (BP, RBP, PSO-BP, MS-BP, MS-RBP, MS-PSO-BP) are done to verify the availability of the proposed prediction method. Further, due to the physical function of energy storage in improving accuracy of schedule pre-fabrication, a mathematical statistical method is proposed to determine the optimal capacity of the storage batteries in power forecasting based on the historical statistical data of wind farm. Algorithm feasibility is validated by application of experiment simulation and comparative


Introduction
Due to instability generation and inaccurate scheduling forecast of wind power, high proportion grid affects the stability of power system operation, it should maintain an optimal balance between the power and the load from time to time [1]. Hence, wind power prediction systems are developed based on the numerical weather prediction, incorporated with statistical model or some other advanced research methods, such as the artificial neural network, support vector machines, Kalman filter, grey relational analysis, fuzzy logic methods, wavelet transformation, as well as physical methods [2][3][4][5][6][7][8][9]. Rasit Ata affirmed artificial neural network on wind power prediction and schedule forecast by comparing with other intelligent algorithms within 30 years [10]. However, due to the randomness of wind power fluctuations, the existing prediction algorithms are difficult to reflect the characteristics of the power fluctuations perfectly [11].
In addition, European countries, such as Germany, Denmark and Spain, punishment mechanism is drawn up to deal with the overrun error of schedule forecast. Northern Europe, for example, may be subject to an average tariff of 12% penalty for poor schedule forecast. Indian government also issued a decree in 2013 that wind power projects of installed capacity higher than 10MW must provide ultra-short-term wind power prediction. If the difference between actual output and schedule forecast is more than 30%, the wind farm is required to pay the fine. Hence, some researchers are still working on the hybrid optimization algorithm to improve the accuracy of wind power prediction.
In practical application, the accuracy improvement of schedule forecast can also be achieved by external means, such as releasing positive or absorbing negative estimated energy errors, which can be realized by an energy buffer device [12]. Batteries have flexible chargedischarge characteristic and relative mature energy storage technology, which can be used to absorb the redundant power, correct unforeseen owed power supply, reduce wind power schedule forecast errors and improve the accuracy of wind power schedule forecast. At the 1611 same time, it may achieve a fast power regulation to improve the stability of the wind power system and the reliability of the power supply by a small storage capacity [13][14][15][16][17][18].
In this paper, a wind power schedule forecast error correction method is proposed by means of a hybrid algorithm integrated with a physical technique. Firstly, back propagation (BP) neural network in power pre-fabrication is proposed not only containing Mathematical statistics (MS), but also considering artificial neural network integrated with particle swarm algorithm (PSO-BP). Secondly, analysis and comparison of several intelligent algorithms (BP, RBP, PSO-BP, MS-BP, MS-RBP, MS-PSO-BP) are done to verify the availability of the proposed prediction method. Finally, an improved wind power schedule forecast correction system based on storage batteries is used to improve schedule forecast accuracy, optimal capacity of the storage battery is studied, practical operating data are used in MATLAB simulation.

Power Prediction Technique Based on MS-PSO-BP 2.1. Mathematical statistics (MS) sample data pretreatment
In theory, a single wind turbine output power can be obtained by formula (1) [19], while in actual wind farm, because of the influence of the external environment and different wind turbines characteristics, error exists on the actual power curve distribution, as shown in Figure 1. Due to numerical weather prediction error, wind farm actual power output does not quite coincide with the prediction. In neural network training and prediction process, numerical weather prediction data are essential, so it is necessary to study the relationship between numerical weather forecast and the actual power output.
In this paper, the sampling period used for numerical weather forecast is 10 min, mainly including wind speed, wind direction and temperature data. According to the formula (1), the wind speed is the most important factor that influences the turbine power output, so the research is mainly on the relationship between wind speed and wind power. Figure 2 is shown the relationship between wind farm power output and the forecast wind speed.
It is seen from which that relationship is not accord completely with the wind power curve in Figure 1. To the same forecast wind speed，the actual power output may be different. The training sample of neural network as such historical statistical data will influence the training effect, lower convergence rate. For large amount data, mathematical statistics is an effective analysis method. To analyze and predict the relationship more precisely between the actual output power and wind speed of wind farm, probability statistics method is used. Wind speed partition is done to realize convenient analysis, partition statistics is referred to IEC61400-12 standard. The wind speed data collected should cover range from -1m/s (cut into the wind , wind speed range collected is adopted 2 m/s to 20 m/s, divided by 1 m/s，the center value of each bin is the integer times of 1 m/s, each bin will contain a lot of wind speed scatters. By this means, the wind speed data from the numerical weather prediction are divided into several partitions. In each BIN interval, wind farm actual power output are more dispersed. To get a detailed analysis of each BIN range of power distribution, taking the 9.5 m/s ~ 10.5 m/s wind speed range as an example, kernel density estimation algorithm is used to compute density distribution characteristics of the power output [21], the calculation formula is shown in formula (2), where f is probability density correspond to i P , P is power output point of BIN range(9.5 m/s ~ 10.5 m/s). According to the formula (2), wind farm output power distribution can be calculated among the wind speed range, as shown in Figure 3.
At first, the power output probability distribution of each BIN interval is concentrated on the peak probability density, and decreased symmetrically on both sides. Next, along with the increased wind speed BIN ranges, probability distribution curve correspond to the peak also increases gradually, moving to left. To revise small probability power output, bin estimation theory is used to construct an estimated interval Ndown P and Nup P is the confidence low limit.
Upper limit of parameters P in the Nth interval, no longer labeled N in the following, down P and up P represents same meaning as Ndown P and Nup P . Some BINs probability distribution in the interval [0，100000] are not symmetrical completely in Figure 4, divided mainly into three conditions in Figure 5, peak to the left (a), peak center (b), peak to the right (c). To guarantee larger probability of power points appeared in the estimates range, considering the probability symmetry distribution on both sides of the peak, the formula (4) (5) (6) are adopted to estimate intervals of above three conditions respectively.
When probability integral of left half of peak is less than   .Once the confidence level is selected, the confidence lower limit and the confidence upper limit of each BIN can be obtained, using these values as midpoints of each BIN interval, confidence lower limit curve downcurve P and confidence upper limit curve upcurve P can be fitted by the interpolation algorithm, as shown in Figure 6.
According to the above curves, neural network training data are revised, smaller probability data points beyond confidence curve are amended as formula (7).Where * P is the actual output power of wind farm, P is the corrected power output, which will be served as the

Revised BP Neural Network model
At present, the representative models of the neural network are BP (back propagation) neural network and RBF (radial basis function) neural network [22 ,23]. They have some advantages, such as strong robustness and fault tolerance, self -learning, selforganization, adaptability, and can approach to arbitrary complex nonlinear relationship. The paper used them in wind power prediction, and prediction effects are compared and analyzed with each other.

BP neural network model
The typical BP neural network shows three layers structure, including the input layer, middle layer and output layer. Middle layer can be designed as single hidden layer or multihidden layers structure. The core of the algorithm is forward information dissemination and error back propagation, the process is done again and again, and the weights of each layer and threshold is adjusted continuously, finally the error is reduced to an acceptable level. Assume number of input layer nodes is n, the middle layer number p, output layer m, so : nm f R R  is completed. The input and output topology structure is as shown in Figure 7. The output of the node j of middle layer is as formula (8).Where i along to [1 ,n], j along to [1 ,p], the output of the node k is as formula (9).
Among formula (8)(9), the k [1 ,m], 1 f is the transfer function of hidden layer, 2 f is the transfer function of output layer, i x represents each neuron input of the input layer, ij w is the weight of the input layer to the middle layer, j  is the middle layer node threshold, jk v is the connection weight from the middle layer to output layer, k  is the output layer thresholds, the initializations of weights and thresholds are produced by random, and the random initial value tends to reduce the convergence speed, easy to make the training results fall into local minimum value.

RBF neural network model
The Radial Basis Function Neural Network (Radial Basis Function Neural Network, the RBFNN) is a kind of feed forward Neural Networks. Compared with the BP neural network, RBF neural network not only has a physiological basis, but a simple structure, concise training and fast convergent speed. RBF neural network also has the three layers structure. The weight between input layer and hidden layer is fixed to 1, only the weight between hidden layer and output layer is adjustable. Number of input layer nodes is n, middle layer p, output layer m, so The input and output model is as shown in Figure 8.The output of the j hidden node is as formula (10).  .It can be seen that the key to establish a RBF network model is determining the number of hidden layer of RBF network h and data center j c , the width of the radial basis function σ ,the connection weight from output neurons to the hidden layer neurons is ij w .Like BP neural network, the RBF neural network, for key parameters, initialization is generated randomly, these random initialization values affect the neural network training in a certain extent.

Improved Neural Network under adaptive mutation Particle Swarm Optimization (PSO)
RBF neural network and BP neural network are used widely, also having some deficiencies, such as long training time, easy falling into local minimum value, and so on. Although RBF neural network is better due to its convergence speed and local minimum value problem, but parameter initialization value is generated randomly, so the neural network training is affected in a certain extent. In order to be able to solve these problems, the PSO algorithm is introduced to improve neural network algorithm.
PSO basic idea is inspired by the birds swarm behavior regularity, a simplified model of swarm intelligence is then established. It is an optimization algorithm based on iterative process. The first is to initialize a group of particles, each particle has two characteristics, position and velocity. The position of each particle is representative for a possible solution of optimization problem, and the velocity of the particle is expressed on the direction and distance of flight. Then optimal particle in the solution space is searched through iteration. For each iteration, the particle individual position is updated by tracking individual extremum best P and group extremum best G , until the optimal particle is found. Setting a group consisted of m particles and fly at a certain speed in D dimensional search space, then the particle swarm can be expressed on 12 ,, i X represents the ith particle's position, also represents a possible solution of problem, it can be expressed with matrices 12 ,, The fitness value of the each position of particle can be calculated by the substitution of i X into the objective function. best P represents the ith particle speed, it can be expressed on 1 2 , , Particles update speed and position according to formula (12) (13).
Among formula (12) (13), j = 1, 2,..., d, represents particle dimension, t is the times of iteration, 1 C and 2 C are learning factors, 1 R and 2 R represent random number between 0~1,  as In order to avoid the 'precocity' and low iterative efficiency of PSO algorithm, the mutation is introduced to PSO algorithm, the principle is that the population is initialized at certain probability after each updating, so expanding search space of the dwindling population during the process of iteration, ensure the optimal location be searched before jumping out, thus improving the global convergence of the algorithm.

BP Neural Network combined with PSO on prediction model
The improved PSO algorithm is used to optimize parameters of neural network prediction model [24]. The steps are as following.
Step 1 Building particle swarm, a neural network topology structure is established according to the input and output sample. The parameters be to optimize are coded to the individual particles of real vector population.
Step 2 The initialization of particle swarm parameters, mainly including the size of the population, learning factor, particle position and velocity interval, number of iterations, etc.
Step 3 Calculating the particle fitness value, according to the input and output sample, the fitness function value of each particle is calculated, the current position is set to itself optimal location, the position of optimal particle in initialization population is set to the global optimal position.
Step 4 Loop iteration, PSO algorithm formula (12) (13) are used to update particle velocity and position.

Wind/Storage Dynamic Correction of Schedule Forecast
It can be seen from literatures that prediction error exists inevitably in theoretical prediction algorithms due to various complex factors. The storage system can be used to absorb the redundant energy, correct unforeseen owed power supply, lower prediction errors and improve the accuracy of wind power forecast due to flexible charge-discharge characteristic. In Figure 9, the wind/storage system is mainly composed of wind turbines and vanadium battery package. The power relationship is as shown in formula (15). Where, a P is the actual power output of the wind farm, b P is charging and discharging power of battery energy storage system， d P is the whole Wind/Storage system output. The key is how to determine b P dynamically. From the foregoing description, MS-PSO-BP neural networks has been used to give modified predicted power ' ) ( P Pt firstly, once the actual power output is greater than the predicted wind farm output (

Simulation and Analysis 4.1. BP/RBP/PSO-BP prediction without training sample pretreatment
In order to verify the effectiveness of the proposed method, a real wind farm data samples are used to test the validity of the algorithm, the wind farm is located in the coastal areas of Jiangsu, and installed capacity is 100 MW. Full-year data of 2014 are used in mathematical statistics, the first two months date of 2015 are used as training sample, the data of March are used in test, data sampling period is 10 min, mainly including wind speed, wind direction, temperature and wind power data, all mathematical operation are performed by normalized process. To distinguish the pros and cons of the different algorithms, root mean square error (RMSE)and mean absolute error(MAE) are used to measure wind power prediction error, and the calculation formula is as (16) (17) (17) Mi P is the real power of the moment i, Pi P is the prediction power of the moment i, C is power capacity of the field wind farm, n is as the number of sample. Taking wind power on March 1, 2015 as prediction object, using BP neural network, PSO-BP neural network, RBF neural network respectively to predict 96 wind power points from 0:00 to 24:00. Prediction results are shown in Figure 11. The RMSE and MAE results are as shown in Table 1. It can be seen that prediction results of three neural network algorithms are improved compared with existing wind farm forecast accuracy.  BP neural network prediction results are similar to RBF neural network, but the prediction accuracy of BP neural network algorithm is improved obviously through amendment of PSO algorithm. RMSE is reduced by 10.40%, and MAE is reduced by 2.89% compared with existing prediction. Considering uncertainty of the neural network algorithm, the above methods are tested repeatedly, prediction results are analyzed. The wind farm power output are predicted  Table 1 and Appendix Table 2. It can be seen that RBF neural network, BP neural network and PSO-BP neural network prediction results are uncertain for single prediction, so the average prediction error are analyzed overall, average prediction error of the 20 days ago on the March are as shown in Figure 12. Prediction error of RBF neural network prediction system is similar to existing wind power prediction. BP neural network overall training effect is better than RBF neural. Its average RMSE is reduced by 8.59% compared with RBF neural network and reduced by 7.13% compared with existing prediction system of wind farm. Furthermore, PSO-BP neural network is 2.7% lower than the average RMSE, the same for the MAE, reduced by 8.44% compared with the existing wind power prediction system, reduced by 2.83% and 2.83% respectively compared with the BP and RBF prediction algorithms.

BP/RBP/PSO-BP prediction with training sample pretreatment
To verify effectiveness of training data pretreatment for prediction precision and convergence speed for the neural network algorithm, the proposed mathematical statistics method is used to modify neural network training samples. Selecting confidence level , according to formula (4) (5) (6), the corresponding confidence lower limit curve downcurve P and confidence upper limit curve upcurve P are obtained. Using the formula (7) to correct training data, the diagram is shown in Fig 13. After correction, data points of small probability have been processed, preventing the "mixed" from affecting on neural network training. The results of average RMSE and MAE are shown in Table 2.  Data show that prediction errors of three algorithms after sample pretreatment are decline in various degrees, RMSE of RBF, BP, PSO-BP reduced by 2.90%, 2.82% and 6.34% respectively, and the MAE just reduced by 0.4%, 2.90% and 0.4% respectively, it can be seen that the accuracy after pretreatment is improved effectively. Another advantage is the training speed, some "special points" are prevented from slow convergence or even not convergence. Figure 14 and Figure 15 show training effects of the BP neural network and RBF neural network under pretreatment or no. It can be seen from Figure 14, under the condition of the same training target, training with data pretreatment has better training effect on training speed and precision compared with that untreated. RMSE reaches steady state (0.019) only after 28 times. Figure 14. BP neural network training with and without data pretreatment Figure 15. RBF neural network training with and without data pretreatment While without data pretreatment, it needs 46 times training and RMSE reaches the steady state (0.024). It can also be seen from the Figure 15, under the condition of the same training target, RBF neural network training after data pretreatment need only 23 times to reach the target value of 0.01. Without pretreatment, no training goals can be arrived even after a maximum of 200 times. Comparing Figure 14 with Figure 15, it can also be seen that algorithms convergence speed and convergence results of BP are all inferior to that of RBF, showing feasibility and effectiveness of the experimental results.

Wind/storage system physical amending for schedule forecast
The simulation experiment is done in a wind farm of 100000 kilowatts in eastern coastal of China. The historical statistical data are concluded within 4 consecutive days in June, such as wind speed, the wind field actual output power. The data during previous two days are adopted as training samples for prediction model. The measured data in the next two days are regarded as the calibration data, which are used to verify the accuracy and yet the validity of the algorithm.
The results of simulation are shown in Figure 16. Prediction errors simulation are as the basis to determine the battery capacity needed. In order to prevent the prediction process from the occasional error, experiments are conducted 1000 times, each maximum capacity m ax C of battery charge or discharge is stated, and a high level of confidence m ax C is selected for referenced battery capacity. When certain capacity is supplied in the wind power system, the  Figure 17 and Figure 18. As can be seen from Figure 17, the power output P d of the wind farm is smooth more with battery energy storage system, and is close to the prediction curve of wind power. Figure 18 shows that the battery capacity can also meet the needs of short-term wind power correction. Meanwhile, it is concluded from the experiments that RMSE of wind power forecast has been reduced to 9.3535e+003W, 10 minutes predictive error integration is reduced to 2.1941e+004Ah, the battery energy storage system can minify wind power prediction error effectively.

Conclusion
This paper combines the mathematical statistics and BP neural network on wind power prediction, PSO algorithm is used to improve prediction precision. Based on which, Wind/Storage system is used to amend wind farm power forecast. Simulation results show that the proposed pretreatment (mathematical statistics method) can improve the neural network training speed and precision. In addition, the PSO algorithm can also improve the prediction precision of the BP neural network effectively. Compared with the current wind farm forecasting strategy, RMSE of PSO-BP can be reduced by 6.34%, and the MAE reduced by 0.4%. Moreover, the schedule forecast accuracy can be improved effectively by physical Wind/Storage dynamical correction, and experiments show that RMSE of wind power forecast has been reduced to 9.3535e+003W, the energy storage system can minify wind power prediction error effectively. However, limited by the technical conditions, the battery capacity is still an important bottleneck in application all along. The battery capacity can be insufficient for big share on the access of large wind farms, but it can be used as a power fine-tuning in large wind power.