#### Abstract

Considering the randomness and volatility of wind, a method based on B-spline neural network optimized by particle swarm optimization is proposed to predict the short-term wind speed. The B-spline neural network can change the division of input space and the definition of basis function flexibly. For any input, only a few outputs of hidden layers are nonzero, the outputs are simple, and the convergence speed is fast, but it is easy to fall into local minimum. The traditional method to divide the input space is thoughtless and it will influence the final prediction accuracy. Particle swarm optimization is adopted to solve the problem by optimizing the nodes. Simulated results show that it has higher prediction accuracy than traditional B-spline neural network and BP neural network.

#### 1. Introduction

Wind power is a kind of clean, free, and renewable natural resource. In wind power generation systems, the randomness and volatility of wind will affect the quality of power and the reliability of power system. Improving the prediction accuracy of short-term wind speed is of great significance for the real-time scheduling of power, reliability improving of power supply, and cost lowering of the wind power generation [1–3].

The common methods of wind speed forecasting include time series method, support vector machine (SVM) method, and wavelet analysis method. Time series method is adopted in [4, 5], making full use of the sample data and the prediction model is simple which can reduce the calculation time, but it does not take the correlation among the sample data into account, and the estimation of model orders is quite complicated. In [6, 7] SVM is adopted, SVM can make indivisible vector in low dimension space map into divided function in high dimension space by choosing appropriate kernel function, the generalizing ability is improved and the local minimization problem is solved, and it has higher prediction accuracy than time series method. The multiresolution analysis character of wavelet transform and the generalizing ability of SVM are combined to realize the short-term wind speed forecasting in [8]. The method can change the nonlinear phenomenon very well and improve the prediction accuracy, but the design process is rather complex.

In view of the various defects of prediction methods above in practical application, a prediction method based on B-spline neural network optimized by particle swarm optimization (PSO-BSNN) is proposed. Firstly, the wind speed data are used to calculate correlation integral function [9, 10] and prove that the discrete time series is chaotic. By phase space reconstruction [11, 12], the high dimension chaotic attractors are recovered. BSNN can change the division of input space and the definition of basis function flexibly [13, 14]. For any input, only a few outputs of the hidden layers are nonzero, so the outputs are simple and convergence speed is fast, but traditional method which divides the input space into linear space is thoughtless and will influence the final prediction accuracy. PSO is an intelligent search method. It has strong global search ability and is also easy to be realized [15–20]. It is used to optimize the nodes of BSNN. Simulated results show that PSO-BSNN has higher prediction accuracy than BSNN and BPNN.

#### 2. Phase-Space Reconstruction

A series of continuous sample data are collected from a field of wind farm in Colorado State. Set the sample interval of wind speed as 10 min; there will be 6 sample data in each hour. Let the 6 data be averaged; then the mean value of each hour is got. The discrete sample data of 10 days are recorded as . For better usage of nonlinear nature of neural network transfer function, the sample data are normalized into the interval , and the normalization formula can be expressed as follows:where is sample data, is minimum of all sample data, is the maximum of all sample data, is normalization data in the interval , and is the length of time sequence. The normalized wind speed is displayed in Figure 1.

##### 2.1. Takens Theorem

Takens has proved that an appropriate embedding dimension can be found which satisfies , and is the dimension of dynamic system. The principle of the dynamic system can be recovered by phase-space reconstruction. If is the delay time and is embedding dimension, then can be described as , after phase-space reconstruction. is phase point of the restructured time series, which can be described as follows:where is the number of phase point.

##### 2.2. Parameter Selection

The selection of embedding dimension and delay time is very important for the time series to be reconstructed, which will influence the final prediction accuracy. The saturation correlation dimension method is given to calculate embedding dimension , and the correlation integral function can be stated as follows:where is searching radius, , and is Heaviside unit function:

For a proper scope of , the attractor dimension is ; the relation curve between and is obtained as in Figure 2. The relation curve between and is obtained as in Figure 3.

It can be seen from Figure 3 that when , the attractor dimension reaches the maximum, so is the saturation correlation dimension. The logarithm value of correlation integral function is less than zero; namely, and then the change trend of is decay exponentially, which indicates that the time series is chaotic rather than noise series.

Mutual information method is used to determine the delay time . The information analysis of time series can be defined as the entropy function:where is entropy function and is probability density function.

If and are discrete random variables, its joint entropy function can be expressed as follows:

Mutual information function is

The relation curve between and is displayed in Figure 4.

Mutual information function signifies the correlation between and . If , they are completely irrelevant, and when reaches the minimum for the first time, the value is the delay time required. It can be seen from Figure 4, and .

#### 3. B-Spline Neural Network

BSNN is designed based on spline interpolation theory and it can change the division of input space and definition of the basis function flexibly. For any input, only a few outputs of the hidden layers are nonzero so that the outputs are simple and convergence speed is faster. It can be used to realize the nonlinear function approximation with high precision.

##### 3.1. Basis Function of BSNN

According to (2), BSNN prediction model is structured as shown in Figure 5, where is the input vector and is the output of the network and corresponds to the mean value of wind speed in the next hour.

*(**1) The Division of Input Space*. The input space has to be divided before the basis function being defined. is a finite interval for :

Then interval can be divided as follows:where is the th internal node, and the external node can be defined as follows:

The interval can be divided into subinterval by all of the nodes as follows:

*(**2) The Multivariable Basis Function of BSNN*. Let indicate -order basis function for , its th basis function is which is defined by , is expansion factor, and the recurrence relations can be expressed as follows:

If the number of internal nodes is 2 and expansion factor , the basis function graph of 3 degrees BSNN for single variable is shown in Figure 6.

The number of basis function for is

The basis function of is got as the result that single variable basis functions combine with each other:

##### 3.2. The Mapping of BSNN

The network from input to output can be divided into two parts.(1). In this section, it realizes the nonlinear mapping from input layer to hidden layer and set , where is output value of the th basis function for . According to the positivity and tightness of basis function, the number of output nonzero values is , belongs to the interval , and the other output values are zero. If we let , is got.(2). In this section, it realizes linear mapping from hidden layer to output layer:where is the weight value of the network. The weight value can be updated as follows:where is the number of iteration, is the expected value, is the actual value, and is learning rate and ensures that the iterative algorithm can converge. The verification is as follows.

Set ; then

Set the Lyapunov function as ; then

Since , then , and the parameters can converge.

#### 4. B-Spline Neural Network Optimized by PSO

The internal nodes of BSNN have a great relationship with the prediction accuracy. The traditional method which divides the input space into linear space is thoughtless and it is difficult to get higher approximation accuracy. PSO is used to optimize the parameters, which can improve the accuracy and avoid falling into local minimum.

##### 4.1. The Basic Principle of PSO

PSO stems from the enlightenment of birds foraging behavior, which is mainly used to solve the optimization problem. Each particle is a point with a certain speed in the solution space and it also has the related individual fitness which corresponds to the objective function; the effectiveness of the solution is determined by the fitness function that is defined on the basis of optimized goals. Particles are following the current optimum particles in solution space and finding the optimal solution by iteration.

Set the current position as , the current speed as , and the best position that the particle has experienced as in dimension search space. Set the number of all particles as ; the best position of all the particles experienced is . The particles can update themselves by tracking individual extremum and global extremum during each iteration. In the process of finding the two extremums, the particles update their own speed and position as follows:where are acceleration constant; is the speed of the th particle; is the position of the th particle; are random number and they belong to the interval ; is weight value and is used to balance global searching and local searching, and can update itself as follows:where is the maximum of and is the minimum of ; is the current number of iteration and is the maximum of iteration.

In order to prevent the particle far from the search space, the speed of each particle will be limited in a maximum ; if the updated speed exceeds the specified speed, then set the speed of the particle as , , where belongs to the interval and is the maximum of .

##### 4.2. PSO-BSNN Algorithm Implementation

The traditional method for BSNN to divide the internal nodes of input space is thoughtless. If the internal nodes cannot be determined accurately, the BSNN is easy to fall into local minimum and then the prediction accuracy is influenced. PSO is a kind of intelligent search method; the internal nodes can be optimized by using PSO algorithm and then get the optimal location. The dimension of each particle vector is , and each vector is composed of internal and external nodes of BSNN. For the single input variable , the number of internal nodes is 2 and the external nodes is 4; then the vector dimension . The optimization process is as follows.

(1) Initialization: the basic initial parameters include the position , speed of each particle , the population of particles , the largest iteration number , and the acceleration constants .

(2) Fitness Evaluation: the error between expected value and actual value is selected as objective function which is used to measure the effectiveness of optimization. The mean square error is adopted as the fitness function:where is the number of sample date, is the expected value for the th particle, and is the actual output value for the th particle.

(3) Update the parameters according to formula (17) and limit the speed according to .

(4) Calculate the fitness evaluation value, comparing it with the optimal fitness evaluation value; if better, update the particle location; otherwise do not change.

(5) Judge whether the result satisfies the termination condition. The termination condition is whether it reaches the maximum number of iterations or satisfies mean square error. If it does, then it is over, or return to step (2).

#### 5. Simulation Results and Analysis

Let the largest iteration number , the acceleration constant , and the population of particles , and let , , and the initial position and speed of each particle are got randomly in the defined interval. Adopting 3 orders B-spline neural network, the number of neural network input is 5. The internal node number of each input variable is 2 and expansion factor is 1; then the nodes number of hidden layer units is and the nonzero output nodes number of hidden layer is . There is only one output unit.

Three kinds of prediction error are adopted as criteria for evaluation:where is root mean square error and it is used to measure the deviation between prediction value and real value, is mean absolute error that reflects the error of prediction value deviating from real value, and is mean relative error that reflects the reliability of mean absolute error value.

According to the wind speed date of 10 days in Figure 1 that is provided from the wind form in Colorado State, the first data of 7 days is used as training sample to train neural network and the last date of 3 days is used as test sample to examine the results of prediction. Simulation results based on PSO-BSNN, BSNN, and BPNN are displayed in Figure 7. They all adopt 3-layer network structures.

The prediction error is listed in Table 1.

It can be seen from Table 1 that the prediction model based on BSNN has better performance than the prediction model based on BPNN, and have fallen by 0.2455 m/s and 0.2614 m/s, respectively, has fallen by 14.54%, and the prediction effects have some improvements. Comparing with the prediction model based on BSNN, the prediction model based on PSO-BSNN enhances the prediction performance largely, because the input space of BSNN has been optimized by particle swarm. It gets higher prediction accuracy than the prediction model based on BPNN, and have fallen by 0.4198 m/s and 0.4233 m/s, respectively, and has fallen by 36.50%.

Now BPNN is set 4-layer network structures, and the simulation result is shown in Figure 8.

The prediction error is listed in Table 2.

It can be seen from Table 2 that the simulation result based on 4-layer BPNN structure is very similar to BSNN, but still poorer than the prediction result based on PSO-BSNN.

The prediction of 3-day wind speed date belongs to short-term wind speed prediction. Now, the wind speed date of 10 hours from Sinkiang in China is used in prediction. The first data of 7 hours is used as training sample and last wind speed date of 3 hours is used as test sample. It belongs to super short-term wind speed prediction. The sample interval of wind speed is still set as 10 min, there will be 6 sample data in each hour, and the number of sample dates of 3 hours is 18. The simulation result is shown in Figure 9.

The prediction error is listed in Table 3.

It can be seen from Table 3 that comparing with BPNN, in the simulation results based on BSNN, and have fallen by 0.0465 m/s and 0.0346 m/s, respectively, and has fallen by 8.76%. Comparing with BSNN, in the simulation results based on PSO-BSNN, and have fallen by 0.0493 m/s and 0.0616 m/s, respectively, and has fallen by 6.29%.

Very short-term wind speed prediction results based on 4-layer BP neural network structure are shown in Figure 10.

The prediction error is listed in Table 4.

It can be seen from Table 4 that the super short-term wind speed prediction based on 4-layer BPNN is very similar to BSNN, but still poorer than the prediction result based on PSO-BSNN.

According to the simulation results of short-term and super short-term wind speed prediction, the prediction model based on PSO-BSNN always gets better results than BSNN and BPNN.

#### 6. Conclusions

A prediction model based on BSNN optimized by PSO is present in this paper. BSNN is designed based on B-spline interpolation theory, it can change the input space division flexibly, and the traditional method to divide the input space into linear space is thoughtless which will influence the final prediction accuracy. PSO is adopted to solve the problem. Simulation results show that the PSO-BSNN has better performance than BSNN and BPNN, and the forecasting accuracy is improved effectively.

#### Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.