Research On Wind Speed Prediction Model of Least Squares Support Vector Machine Through Genetic Algorithm Optimization

Wind energy has become the fastest-growing new energy source due to its environmentally friendly sustainability and has been widely used in wind power generation. Wind speed prediction is crucial to the stable operation of the power generation system. Accurately obtaining the change trend of wind speed can effectively reduce the adverse effects of wind farms on the operation of the power system. In recent years, big data technologies such as data mining and artificial intelligence have gradually become a research trend, and they have good solutions to complex nonlinear regression and classification problems. Therefore, based on machine learning and optimization algorithms, this paper combines genetic algorithm with LS-SVM, and proposes a genetic algorithm to optimize the prediction model of LS-SVM. The simulation results show that: compared with a single LS-SVM prediction model, the genetic algorithm optimized LS-SVM prediction model error is smaller and has higher prediction accuracy. This prediction method has certain practical significance.


Introduction
As a pollution-free and renewable energy, wind energy has been highly valued by countries all over the world. With the rapid development of technology, the total capacity of wind power generation has also been rapidly increased. Accurate prediction of wind speed can reduce the cost of power grid operation, and is also of great significance for power grid dispatching and resource allocation, and it can also improve the competitiveness of wind farms in the power market.
Due to the many factors affecting wind speed and large random volatility, wind power also has intermittent and random volatility, this affects the stable operation of the power system to a certain extent. Therefore, how to solve the related problems of wind power generation is particularly important. Based on this, many scholars have carried out comprehensive research on these problems. Literature [1] used the empirical model decomposition method to process the data, and modeled and predicted the two groups of components separately. According to the simulation results of the model, it can be known that this method is more accurate than the neural network model and reduces the influence of wind speed unsteadiness on the prediction model. In the literature [2], for the relatively large wind speed volatility, in this paper, the principal component analysis method is used to obtain the relevant information of the wind speed, and then the simplified SVM (RSVM) is used, and then the PSO algorithm is used to optimize the parameters of the RSVM parameter uncertainty problem. Using the real-time data of the wind turbines for simulation verification, which proves that the accuracy of the RSVM model is relatively high. Literature [3] proposed a LS-SVM prediction method based on particle swarm parameter optimization in the literature, the embedding dimension d, time delay τ and model parameters (regularization parameter γ, kernel function width σ) are regarded as the objects to be optimized. The above four parameters are optimized by the particle swarm algorithm to establish a LS-SVM wind speed prediction model, which greatly improves the accuracy of the prediction results.
The LS-SVM has the only global optimal solution, but also has the problem of parameter selection. Compared with traditional algorithms, genetic algorithm can make the population reach the global optimal convergence without prior knowledge, and it is not sensitive to the initial parameters, so it will not fall into a local minimum. Based on this, this paper introduces genetic algorithm to optimize the parameters of the least squares support vector machine model, and uses the LS-SVM model after parameter optimization to predict the wind speed of the wind farm, the results show that the convergence speed and prediction accuracy of the optimized model have been improved, and better prediction accuracy has been achieved.

Basic Principles of Least Squares Support Vector Machine
The basic idea of LS-SVM is to combine the least square method and SVM, which effectively overcomes the shortcomings of the support vector machine algorithm, improves the prediction accuracy and convergence speed of the algorithm model, it can effectively avoid the local optimal value problem caused by the BP neural network method. The basic method is to use the nonlinear refraction method to convert the low-dimensional nonlinear refraction problem into a high-latitude problem. Given a training set ( )( ) , , , , , the regression formula of the LS-SVM is as follows.
In this formula (1): ω is the weight vector; φ(x) is a non-linear mapping to high dimensions; b is a bias.
Combining the basic principles of structural risk minimization, the optimization goal of LS-SVM is shown in formula 2.
In formula (2): ω 2 is the second norm of the weight vector ω ; γ is the penalty factor; i e is the slack variable.
Introducing the Lagrange multiplier i α , then the Lagrange polynomial of the dual problem of equation (2) is According to the above analysis, the optimization problem solved in this paper can be converted into a linear equation system, as shown in formula 5.
In.formula (5): Finally, the LS-SVM regression model is shown in formula 6.
In formula (6): ( ) , i K x x is the kernel function of the LS-SVM, which is often expressed by the radial basis function: In formula (7): According to the basic principle of the algorithm described above, it can be known that the prediction accuracy and convergence speed of the algorithm mainly depend on the penalty factor γ and the kernel parameter σ 2 under the premise of known kernel parameters and samples. Therefore, this paper uses genetic algorithm to optimize the parameters of the prediction model, and then obtains the global optimal solution of the parameters γ and σ 2 .

Basic principles of genetic algorithm
Genetic algorithm is a powerful search method, which has the characteristics of iterative, adaptive, and probabilistic. The core of the algorithm is to simulate the process of biological evolution and introduces concepts such as reproduction, mutation, hybridization, selection and competition into the algorithm. The genetic algorithm encodes the solution of the problem into a chromosome, and then creates a fitness function to select individuals with high fitness values according to the probability distribution of the fitness function value. Then, through genetic operations such as selection, crossover, and mutation, the chromosome information in the population is exchanged, and then the problem of getting into local extremes in the optimization process of traditional algorithms is solved. It is a global optimization algorithm. The basic process of the algorithm is as follows.
1) Initialize the population: randomly generate a group m n X × , it can be seen that the length of a single individual Where n is the length of the individual; r is the number of nodes in the input layer, s1 is the hidden layer, and s2 is the number of nodes in the output layer.
2) Fitness function: The function is an expression of the individual's ability to adapt to the environment, which is related to the objective function. This article uses the mean square error as the objective function. Since the genetic algorithm can only evolve in the direction of increasing the fitness value, the fitness function adopts the reciprocal form of the mean square error.
3) Selection operator: Selecting some data from a part of the regular data as the next set of data is the selection operator. Commonly used selection operators include: roulette method, tournament method, etc. This article uses roulette method, namely In formula 10 and formula 11: Fi represents the fitness value of individual i; Pi represents the selection probability of i. 4) Crossover operator: The crossover operator simulates the process of genetic recombination in order to transfer the current best gene to the next population and obtain new individuals. The specific steps of the crossover operator are: Step1: Randomly select objects; Step2: According to the length of the selected object, randomly select the cross position.
Step3: Define the cross probability, run the cross operator, change genes. The k-th chromosome ak, chromosome and akl are interleaved at position j as follows: ; the random number is r2; g is the current iteration number; Gmax is the maximum number of evolutions; the parameter r is any random number in the interval [0-1]. 6) Calculate the fitness function: According to the calculated function value, judge whether the algorithm meets the accuracy requirement of the model, otherwise return to step 2 to recalculate.

Establishment of prediction model of least square support vector machine
Given the wind speed time series as ( ), , , , , assuming that the wind speed ( ) X t at time t can be predicted by the historical wind speed value 2 , the prediction model can be expressed as.
In the formula, m is the embedding dimension. The determination of m adopts the growth method based on the principle of minimizing the root mean square error.
Equation 13 can construct a multiple-input single-output LS-SVM prediction model. According to the above method, the input and output matrices of the training samples of the l LS-SVM model are established. Use the data rolling method to train and predict the model, that is, the current predicted wind speed data value is regarded as the known data and rolled into the training sample set. At the same time, the data that is the farthest from the current time is deleted, and the network is retrained. Forecast the wind speed data for the next hour, and so on, until all wind speed forecasts are completed.

Establishment of prediction model of LS-SVM optimized by genetic algorithm
(1) Data normalization processing. Before using the LS-SVM model to predict, the historical wind speed time series data should be normalized to make the data normalized to the [0, 1] interval.
(2) The input and output matrix of the training sample is established by the sample data according to the genetic algorithm optimized LS-SVM modeling method.
(3) Use the steps of the above genetic algorithm to optimize the optimal combination of parameters γ and σ 2 of the genetic algorithm optimized LS-SVM model. Binary coding is used. Because the model needs to be optimized, there are two parameters (penalty factor γ, kernel Parameter σ 2 ), so the population dimension is 2, and other setting parameters of the genetic algorithm are shown in Table 1.

Simulation results
This paper selects 4*24 (sampling interval 1h) measured wind speeds of a wind farm from April 1 to 4 as the prediction samples, based on the LS-SVM prediction model optimized by genetic algorithm,and predict the 24 wind speed values of No. 5. Substituting the original data and the obtained optimized parameters into the LS-SVM prediction model, the specific results of the obtained prediction data are shown in Figure 1.  Fig. 1 The least square support vector machine wind speed prediction chart In order to illustrate the effectiveness of genetic algorithm in parameter optimization of l LS-SVM, this paper also uses the LS-SVM prediction model optimized by genetic algorithm to predict wind speed. The prediction result is shown in Figure 2.  Fig. 2 The wind speed forecast graph of LS-SVM optimized by genetic algorithm Among them, the wind speed measured value on April 5, the predicted value of the LS-SVM optimized by genetic algorithm, and the predicted value of the LS-SVM are shown in Table 2. In order to highlight the optimization effect of the genetic algorithm, this paper shows the measured value and the predicted value of the two methods together in Figure 3.

Conclusion
This paper uses genetic algorithm to optimize the LS-SVM to establish the wind speed prediction model of the wind farm. After training and predicting the model through the original data, we can get: 1) This paper verifies the establishment of a genetic algorithm to optimize the prediction model of