Wind speed prediction method based on improved Seagull optimization algorithm and multi-core extreme learning machine
By improving the Seagull optimization algorithm and multi-core extreme learning machine, combined with empirical wavelet transformation, problems such as poor globality and slow convergence speed in wind speed prediction are solved, and high-precision wind speed prediction is achieved.
Patent Information
- Application Number
- CN202211136881.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-19
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2042-09-19
AI Technical Summary
The existing wind speed prediction methods have problems such as poor globality, slow convergence speed, large data oscillation range and low accuracy.
The wind speed prediction method based on the improved Seagull optimization algorithm and multi-core limit learning machine is adopted, and the wind speed data is decomposed through empirical wavelet transformation, the Seagull optimization algorithm is improved to optimize the neural network hyperparameters, and the multi-core limit learning machine is used for prediction.
Global search optimization is realized, convergence speed and convergence accuracy are improved, convergence speed of neural networks is accelerated, and the accuracy of wind speed prediction is improved.
Smart Images

Figure CN115374710B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of wind speed prediction, and relates to a wind speed prediction method based on an improved seagull optimization algorithm and a multi-core extreme learning machine. Background Art
[0002] In today's society, due to the shortage of traditional petrochemical energy and the deteriorating environment, clean and renewable new energy sources are gaining more and more attention. Among them, wind energy has been widely developed and utilized due to its advantages of abundant resources, no pollution, renewable and low production cost. However, in the utilization of wind energy, due to the volatility and randomness of wind energy, it will have an adverse impact on the safe operation and dispatch of the power grid system with large-scale access to wind energy. Therefore, accurate wind speed prediction and power prediction are very necessary.
[0003] At present, most studies use machine learning algorithms to process wind speed. The kernel extreme learning machine has been widely used in the field of wind speed prediction due to its advantages such as fast learning speed and good generalization performance. However, most machine learning algorithms are sensitive to parameters. In previous studies, there are generally two ways to process machine learning parameters. One is the manual parameter adjustment method, which requires technicians to determine the given parameters based on experience and continuous attempts; the other is also a commonly used method in recent years, that is, using a swarm intelligence optimization algorithm to calculate the parameters of the machine learning model; this method does not require technicians to have rich parameter adjustment experience and has good generalization performance.
[0004] The standard seagull optimization algorithm is a new type of swarm intelligence optimization algorithm proposed by Gaurav Dhiman in 2019. It has a simple principle, is easy to implement, has few adjustable parameters, and has been widely used in practical engineering optimization problems. This algorithm mainly simulates the migration of seagulls in nature and their aggressive behavior during migration. In the optimization process, the individual seagulls first update their positions according to the migration stage formula, thereby converging to the global optimal value. The individual position update formula is D s (t) = |A×P S (t)+B×(P best (t)-P S (t))|, where: A = f c (1-t / Max iteration ), B = 2 × M 2 ×rand,P s (t) and P best (t) represent the individual position and the global optimal individual position at the tth iteration, respectively, and f c is a constant 2; then the population individuals update their individual positions according to the attack phase formula and perform local search. The specific form of individual position update is P s (t) = D s (t)×x×y×z+Pbest (t), where, x=r×sin(θ), y=r×cos(θ), z=r×θ, r=μ×e θυ Respectively represent the spiral shape and radius of the seagull's attack phase movement, θ represents the attack angle, which is a random number in [0,2π], μ and υ represent the spiral shape and the seagull's movement speed, both defined as constant 1. Therefore, the standard seagull optimization algorithm has the following problems in wind speed prediction: the initial population is randomly generated and lacks diversity; A decreases linearly from 2 to 0, B∈[0,8], which makes the step length of the individual approaching the global optimal individual too long, resulting in premature convergence of the algorithm in the early iteration, insufficient global search, and rapid decline in population diversity in the later iteration, and slow convergence speed; during testing, it was found that most individuals exceeded the feasible solution search boundary in the attack phase of each iteration, and the position dimension that exceeded the boundary was initialized as the feasible solution boundary value during boundary detection, resulting in most individual positions being searched on the boundary value of the search space, poor global search capability, and the problem of being easily trapped in the local optimum, resulting in poor globality and low accuracy of wind speed prediction.
[0005] At the same time, since wind speed has the characteristics of volatility, intermittency and nonlinearity, it is a typical non-stationary time series with high computational complexity. Using wind speed data directly as the input data of the neural network is likely to cause the convergence speed of the neural network to slow down and the accuracy of wind speed prediction to be low. Summary of the invention
[0006] In view of the technical problems of poor globality, slow convergence speed, larger data oscillation range and low accuracy in existing wind speed prediction, the present invention provides a wind speed prediction method based on an improved Seagull optimization algorithm and a multi-core extreme learning machine, which realizes global search optimization, improves the convergence speed and convergence accuracy, accelerates the convergence speed of the neural network, and improves the prediction accuracy.
[0007] In order to achieve the above object, the technical solution adopted by the present invention is:
[0008] A wind speed prediction method based on an improved seagull optimization algorithm and a multi-core extreme learning machine comprises the following steps:
[0009] 1) Obtain the historical wind speed data measured at the wind farm;
[0010] 2) using empirical wavelet transform to decompose the historical wind speed data in step 1) into multiple wind speed components with different frequencies;
[0011] 3) Divide each wind speed component data into training set, validation set and test set respectively;
[0012] 4) inputting each training set and each validation set in step 3) into a neural network to iteratively train the neural network, and optimizing the hyperparameters of the neural network using an improved Seagull optimization algorithm to obtain an optimized neural network; the neural network is a multi-core extreme learning machine;
[0013] 5) inputting each test set of step 3) into the neural network optimized in step 4) to obtain the predicted value of each wind speed component;
[0014] 6) Reconstruct the predicted values of each wind speed component in step 5) according to the empirical wavelet inverse transform to obtain the wind speed prediction result.
[0015] Furthermore, in step 3), the ratio of the training set, the validation set and the test set is 6:2:2.
[0016] Furthermore, the specific steps in step 4) are:
[0017] 4.1) Determine the hyperparameters of the neural network;
[0018] 4.2) Encode the hyperparameters in the neural network as the location information of the seagull population, and use the Tent chaotic mapping method to initialize the seagull population position, and set the initial seagull optimization algorithm parameters, including the population number M, the maximum number of iterations Max iteration , the dimension D of the search space, the upper limit vector ub and the lower limit vector lb of the feasible solution;
[0019] 4.3) Input the training set of wind speed components into the neural network, and start training the neural network using the hyperparameters represented by the position of each seagull. Then input the validation set into the trained neural network to obtain the wind speed prediction value corresponding to the validation set, and calculate the mean absolute error of the validation set prediction value, that is, the fitness value of the individual seagull.
[0020] 4.4) Update the global optimal seagull individual position P at the tth iteration best (t) and the corresponding global optimal fitness value F best (t);
[0021] 4.5) In the migration stage, the linear decreasing additional variable A is improved to a nonlinear one, and the position D of each seagull in the migration stage is updated at the tth iteration. S (t);
[0022] 4.6) In the attack phase, the cosine factor and 10 are introduced into the parameter μ. -2 Constant control factor, updates the position P of each seagull in the attack phase at the tth iteration s (t);
[0023] 4.7) Repeat steps 4.3) to 4.6) until the number of iterations t reaches the maximum number of iterations Max iteration , based on iterative training to verify the optimal individual position P of the seagull obtained by the neural network best And the corresponding optimal fitness value F best , determine the optimal neural network hyperparameters.
[0024] Furthermore, in step 4.1), the output f(x) of the multi-core extreme learning machine is as follows:
[0025]
[0026] Where: I is the identity matrix, C is the regularization coefficient, L is the expected output, K(·,·) represents the kernel function, Ω ELM is the kernel function matrix, x 1 ,…,x N is a given wind speed training sample; T is the matrix transpose;
[0027] The kernel function matrix Ω ELM The definition is as follows:
[0028]
[0029] Where: H is the hidden layer output matrix; h(x i ) indicates that the input wind speed is x i The output of the hidden layer when h(x j ) indicates that the input wind speed is x j The output of the hidden layer when Ω ELMi,j Represents the kernel matrix Ω ELM The element in row i and column j, x i ,x j is the experimental input vector, i.e., the wind speed training sample in the i-th row and the wind speed training sample in the j-th column; T is the matrix transpose;
[0030]
[0031] in:
[0032] K Poly (x,x i ) represents the polynomial kernel function; K RBF (x,x i ) represents the radial basis kernel function; λ is the weight coefficient of the polynomial kernel function; n and d are the kernel parameters of the polynomial kernel function, and σ is the kernel parameter of the radial basis kernel function;
[0033] Furthermore, in step 4.2), the Tent chaos is mapped to the D-dimensional solution space to obtain the initialized seagull population Z = {Z i,i=1,2,…,M}, the individuals in the population are represented as:
[0034] Z i =lb+(ub-lb)*z i ;
[0035] Where: ub is the upper limit vector of the feasible solution, lb is the lower limit vector of the feasible solution; Z i is the i-th seagull population, z i Generate chaotic sequence for Tent chaotic mapping D-dimensional space;
[0036] The expression of the Tent chaotic map is:
[0037]
[0038] Among them: α∈(0,2] is the chaos parameter, which is proportional to the chaos.
[0039] Furthermore, in step 4.3), the mean absolute error of the predicted values of the validation set is calculated based on the following relationship:
[0040]
[0041] Where: the mean absolute error of the MAE validation set prediction value is the fitness value of the seagull individual corresponding to the tth iteration; S is the number of prediction samples, i = 1, 2, ..., S; y i is the actual wind speed value of the ith value in the validation set, is the i-th predicted wind speed value in the validation set.
[0042] Further, in the step 4.5),
[0043] D s (t) = |A×P S (t-1)+B×(P best (t-1)-P S (t-1))|
[0044]
[0045] in:
[0046] D S (t) represents the position of each seagull during its migration phase, i.e., the distance between the seagull individual and the global optimal individual at the tth iteration;
[0047] B = 2 × A 2 ×rand(), rand represents a random number, and its value range is [0,1];
[0048] ×P S(t-1)+ is the position of the individual seagull at the t-1th iteration, (P best (t-1) is the global best individual position at the t-1th iteration;
[0049] A∈[-1,1], t is the current iteration number, abs means taking the absolute value; Max iteration is the maximum number of iterations.
[0050] Further, in the step 4.6),
[0051] P s (t) = D s (t)×x×y×z+P best (t-1);
[0052] Among them, x = r × sin (θ), y = r × cos (θ), z = r × θ represent the behavior of the seagull spiral motion in the x, y and z planes respectively; r = μ × e θυ represents the spiral motion radius of the seagull, θ represents the attack angle, which is a random number in [0,2π], μ is the spiral shape parameter, and υ represents the speed of the seagull;
[0053]
[0054] υ=rand()。
[0055] Among them: ub is the upper limit vector of the feasible solution; lb is the lower limit vector of the feasible solution.
[0056] Furthermore, in step 4), each component data is normalized before being input into the neural network.
[0057] Furthermore, the normalized processing formula is:
[0058]
[0059] Where: x min and x max They represent the minimum and maximum values of the time series that need to be normalized, respectively; x represents the actual wind speed value that needs to be normalized; and x* represents the normalized value corresponding to x.
[0060] The beneficial effects of the present invention are:
[0061] 1. The present invention uses empirical wavelets to preprocess the collected wind speed data, decomposes the data into multiple wind speed component data with approximately stable frequency characteristics, and provides a characteristic vector for input to the neural network, so that the oscillation range of the input data of the neural network becomes smaller and the convergence speed of the neural network is accelerated. At the same time, the optimal hyperparameters of the neural network are obtained through training with an improved seagull optimization algorithm, and the components of different frequencies are predicted respectively, so as to obtain the actual predicted value of the wind speed and improve the prediction accuracy.
[0062] 2. The present invention improves the standard Seagull optimization algorithm, adopts Tent chaotic mapping to initialize the individual population, increases the population diversity, and lays the foundation for global search; adopts a nonlinear decreasing strategy and improves the value interval to balance the global search capability and the local development capability; introduces cosine factors and constant control factors to control the phenomenon of a large number of individuals crossing the boundary, solves the problem that the standard Seagull optimization algorithm is prone to converge prematurely and fall into the local optimal value, and solves the problem that a large number of individuals exceed the search range in the attack phase and cannot find the global optimal solution, improves the convergence speed and convergence accuracy of the Seagull optimization algorithm, so that the optimal hyperparameters of the application network can be calculated quickly and accurately, and the accuracy of the prediction results is further improved.
[0063] 3. In the present invention, each component data is divided into a training set, a validation set and a test set according to the proportion. The training set is used to train the neural network, the validation set is used to optimize the neural network and update the hyperparameter values of the neural network, and the test set is used to predict and compare with the optimized neural network to obtain the test results. The wind speed prediction method is simple and has good accuracy.
[0064] 4. The present invention optimizes the neural network hyperparameters through an improved seagull optimization algorithm. All parameters to be optimized are encoded as the position of each seagull. During the training process, each seagull individual calculates the fitness value at each iteration, and the fitness value is used to judge the quality of the individual position, that is, the quality of the neural network hyperparameters. When the algorithm ends, the global extreme value is determined. This global extreme value is the optimal hyperparameter combination, which enables the wind speed to be accurately predicted at the sharp point position where the data fluctuates greatly, thereby improving the prediction accuracy of the wind speed.
[0065] 5. The present invention linearly combines the typical local kernel function radial basis kernel function RBF and the typical global kernel function polynomial kernel function Poly to form a hybrid kernel function to obtain a multi-core extreme learning machine MKELM model. The hybrid kernel function of this model combines the advantages of the RBF kernel function and the Poly kernel function to give it better learning and generalization capabilities. The multi-core extreme learning machine is used as a neural network, and the hyperparameters of the multi-core extreme learning machine are optimized through the Seagull algorithm to achieve high-precision prediction of wind speed. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] Figure 1 This is a flow chart of the wind speed prediction method of the present invention;
[0067] Figure 2 This is a schematic diagram of the operation of the neural network of the present invention to predict wind speed components;
[0068] Figure 3 Optimize algorithm logic diagram for Seagull;
[0069] Figure 4 is the encoding order between the hyperparameters in the multi-core extreme learning machine model and the individual positions of the seagulls;
[0070] Figure 5 is the distribution diagram of Tent chaotic sequence x(n);
[0071] Figure 6 It is a comparison chart before and after the improvement of additional variable A;
[0072] Figure 7 This is a comparison chart between the improved Seagull optimization algorithm and the traditional Seagull optimization algorithm under the unimodal function Sphere Model;
[0073] Figure 8 This is a comparison chart between the improved Seagull optimization algorithm and the traditional Seagull optimization algorithm under the multi-peak function Generalized Rastrigin's Function;
[0074] Fig. 9 This is a comparison chart between the improved Seagull optimization algorithm and the traditional Seagull optimization algorithm under the fixed-dimensional function BraninFunction;
[0075] Fig.10 This is a comparison chart of wind speed forecast and actual value. DETAILED DESCRIPTION
[0076] The technical solution provided by the present invention is now described in detail and clearly in conjunction with the embodiments and the accompanying drawings. However, the listed embodiments are only a part of the implementation methods of the present invention and are intended to explain the present invention, rather than all the implementation methods of the present invention, and cannot be understood as limiting the present invention.
[0077] The present invention provides a wind speed prediction method based on an improved Seagull optimization algorithm and a multi-core extreme learning machine. The improved Seagull optimization algorithm is mainly used for optimizing the hyperparameters of a neural network, and the collected wind speed data is preprocessed and then input into the optimized neural network for training to realize the prediction of short-term wind speed.
[0078] In the present invention, the wind speed data is used as the target state vector, and the wind speed is predicted by the nonlinear fitting ability of the neural network.
[0079] See also Figure 1 ,The wind speed prediction method based on the improved seagull optimization algorithm and ,multi-core extreme learning machine includes the following steps.
[0080] Step S1: Obtaining the measured historical wind speed data of a large wind farm.
[0081] Step S2: Decompose the data into multiple wind speed components with different frequencies using empirical wavelet transform.
[0082] In this step, since wind speed has the characteristics of volatility, intermittency and nonlinearity, it is a typical non-stationary time series. The empirical wavelet transform is a new processing method for non-stationary signals. It has a complete and reliable mathematical theoretical basis, low computational complexity, and can overcome the modal aliasing problem of the empirical mode decomposition (EMD) method. Therefore, the wind speed data is used as a signal, and the empirical wavelet transform (EWT) is used as a data preprocessing method to provide an input feature vector for the neural network; the wind speed data is decomposed into multiple wind speed component data with approximately stable frequency characteristics through the empirical wavelet transform, which makes the oscillation range of the input data of the neural network smaller and accelerates the convergence speed of the neural network. At the same time, the components of different frequencies are predicted separately to improve the prediction accuracy.
[0083] In this embodiment, the wind speed prediction software MATLAB R2018a, Windows 10 operating system. Since the wind speed data fluctuates greatly, the component data obtained by empirical wavelet decomposition are normalized before input into the neural network. The specific form of normalization is:
[0084]
[0085] Where: x min and x max Represent the minimum and maximum values of the normalized time series, respectively.
[0086] Step S3: Divide the wind speed component data into three parts: a training set, a validation set and a test set according to the proportion.
[0087] In this step, the ratio of training set, validation set and test set is 6:2:2. The training set is used to train the neural network, the validation set is used to optimize the neural network and update the hyperparameter values of the neural network, and the test set is used to predict wind speed using the optimized neural network.
[0088] Step S4: Input the above training set and verification set into the neural network, and use the improved Seagull optimization algorithm to train the neural network, optimize the hyperparameters of the neural network, and obtain an optimized neural network.
[0089] In this step, the neural network is a multi-core extreme learning machine (MKELM).
[0090] In this step, the improved Seagull optimization algorithm is used to optimize the hyperparameters of the neural network.
[0091] See also Figure 2 and Figure 3 , the specific process of using the improved Seagull optimization algorithm to optimize the neural network in the prediction method is explained.
[0092] 4.1) Determine the hyperparameters of the neural network.
[0093] Kernel Extreme Learning Machine (KELM) is an improved algorithm based on Extreme Learning Machine (ELM) and combined with kernel function. KELM can improve the prediction performance of the model while retaining the advantages of ELM. The network output of KELM can be expressed as:
[0094]
[0095] In the above formula, I is the unit matrix, C is the regularization coefficient, L is the expected output, K(·,·) represents the kernel function, and Ω ELM is the kernel function matrix; x 1 ,…,x N is a given wind speed training sample, T is the matrix transpose;
[0096] Among them: The kernel function matrix is defined as follows:
[0097]
[0098] Among them, H is the hidden layer output matrix; h(x i ) indicates that the input wind speed is x i The output of the hidden layer when h(x j ) indicates that the input wind speed is x j The output of the hidden layer when Ω ELM i,j Represents the kernel matrix Ω ELM The element in row i and column j, x i ,x j is the experimental input vector; T is the matrix transpose.
[0099] in:
[0100]
[0101] Where: x i is the i-th given wind speed training sample, i=1,,…,N; K Poly (x,x i ) represents the polynomial kernel function; K RBF (x,x i) represents the radial basis kernel function; λ is the weight coefficient of the polynomial kernel function; n and d are the kernel parameters of the polynomial kernel function, and σ is the kernel parameter of the radial basis kernel function.
[0102] From formula (1), we can see that kernel function is an important factor affecting the prediction performance of KELM model. According to existing literature, kernel function is divided into two categories: local kernel and global kernel. Local kernel function has strong local learning ability, but relatively weak generalization performance; on the contrary, global kernel function has average local learning ability, but strong generalization ability.
[0103] Different kernel functions have different recognition capabilities for sample data features. Wind speed is the result of the combined influence of meteorological factors and terrain factors, and has characteristics such as volatility and randomness. Therefore, it is difficult to use a single kernel function to predict wind speed with high accuracy. Based on this, the present invention linearly combines the typical local kernel function radial basis kernel function (RBF) and the typical global kernel function polynomial kernel function (Poly) to form a hybrid kernel function. The hybrid kernel function combines the advantages of the RBF kernel function and the Poly kernel function, so that it has better learning ability and generalization ability. The specific form of the hybrid kernel function is as follows:
[0104]
[0105] Where: K Poly (x,x i ) represents the Poly kernel function; K RBF (x,x i ) represents the RBF kernel function; λ is the weight coefficient of the Poly kernel function, which can adjust the recognition ability of the hybrid kernel function for the sample data features, n and d are the kernel parameters of the Poly kernel function, and σ is the kernel parameter of the RBF kernel function; according to Mercer theory, the linear combination of multiple single kernel functions is still a kernel function, so formula (3) is still a kernel function;
[0106] Combining formulas (1) and (3), we can get the multi-kernel extreme learning machine (MKELM) model. The parameters that need to be determined in the model are the regularization coefficient C, the RBF kernel parameter σ, the Poly kernel parameters c and d, and the kernel function weight coefficient λ.
[0107] The MKELM model is trained using the training sets of each component sample respectively. During this process, the improved Seagull optimization algorithm proposed in the present invention is used to synchronously optimize the parameters that need to be transferred in the MKELM model.
[0108] See also Figure 4 , the hyperparameters in the multi-core extreme learning machine (MKELM) model are sequentially encoded as the individual positions of the seagulls, and the hyperparameters in the multi-core extreme learning machine neural network model are optimized according to the improved seagull algorithm. Specifically, the regularization coefficient C, the RBF kernel parameter σ2 , polynomial kernel parameters n and d, and the weight coefficient λ of the kernel function are jointly encoded as the population position of the MOMSOA algorithm. During the training process, the fitness value of each seagull individual is calculated after each iteration. The fitness value is used to judge the quality of the individual position, that is, the quality of the neural network hyperparameters. When the algorithm ends, the global extreme value is determined, and this global extreme value is the best hyperparameter combination. Therefore, the training process is accompanied by the optimization process. During the training verification process, the average absolute error of the prediction value of the verification set is the fitness value of the seagull individual.
[0109] 4.2) Initialize the seagull population, encode the hyperparameters in the neural network into the location information of the seagull population, use the Tent chaotic mapping method to initialize the seagull population position, and set the initial seagull population parameters.
[0110] Set the parameters of the Seagull optimization algorithm to: population size M, maximum number of iterations Max iteration , the dimension D of the search space, the upper limit vector ub of the feasible solution and the lower limit vector lb of the feasible solution.
[0111] The Tent chaotic mapping algorithm is used to initialize a new seagull population. The Tent chaotic mapping algorithm with good distribution and uniformity is used to generate a chaotic sequence z in the D-dimensional space. i , the expression of Tent mapping is:
[0112]
[0113] Among them: α∈(0,2] is the chaos parameter, which is proportional to the chaos.
[0114] Map the chaotic sequence to the D-dimensional solution space and obtain the initialized seagull population Z = {Z i ,i=1,2,…,M}, the individuals in the population are represented as:
[0115] Z i =lb+(ub-lb)*z i
[0116] Where: ub is the upper limit vector of the feasible solution, lb is the lower limit vector of the feasible solution; Z i is the i-th seagull population, z i Generate chaotic sequences for Tent chaotic mapping in D-dimensional space.
[0117] See also Figure 5 ,The distribution diagram of Tent mapping in the search domain shows that it ,has uniformity and randomness in the entire search space, which can increase ,the diversity of the initial population and improve the global ,search capability of the algorithm.
[0118] 4.3) Input the training set of wind speed components into the neural network, and start training the neural network using the hyperparameters represented by the position of each seagull. Then input the validation set into the trained neural network to obtain the predicted value of wind speed in the validation set, and calculate the mean absolute error of the predicted value of the validation set, which is the fitness value of the individual seagull.
[0119]
[0120] Where: MAE is the fitness value of the seagull individual corresponding to the tth iteration; S is the number of prediction samples, i = 1, 2, ..., S; y i is the ith actual wind speed value, is the i-th predicted wind speed value.
[0121] 4.4) Update the global optimal seagull individual position P at the tth iteration best (t) and the corresponding global optimal fitness value F best (t);
[0122] 4.5) In the migration stage, the linear decreasing additional variable A is improved to a nonlinear one, and the position D of each seagull in the migration stage is updated at the tth iteration. S (t); wherein the update is performed according to the formula of the algorithm migration phase and the nonlinear decreasing additional variable A provided by the present invention.
[0123] Because the step length of the seagull individual approaching the optimal individual in the traditional seagull optimization algorithm is too large, the global search ability is poor. Update the position of the seagull individual according to the improved additional variable A:
[0124] D s (t) = |A×P S (t-1)+B×(P best (t-1)-P S (t-1))|
[0125] in:
[0126] D S (t) represents the position of each seagull in the migration stage at the tth iteration, that is, the distance between the seagull individual and the global optimal individual at the tth iteration;
[0127] B = 2 × A 2 ×rand(), rand represents a random number;
[0128] P S (t-1) is the position of the individual seagull at the t-1th iteration, P best (t-1) is the global best individual position at the t-1th iteration.
[0129] At each iteration, the position of each seagull is updated according to the migration stage formula. The linearly decreasing additional variable A is improved to a nonlinear decreasing one to balance the global exploration ability and the local development ability. In addition, A∈[0,2] in the traditional seagull optimization algorithm is improved to A∈[-1,1], which reduces the step length of the individual seagull approaching the best seagull, improves the global search ability, and solves the problem of premature convergence in the early stage of the algorithm. In this step, the specific form of the nonlinearly decreasing additional variable A is as follows:
[0130]
[0131] Where: A∈[-1,1], t is the current iteration number, abs means taking the absolute value; Max iteration is the maximum number of iterations.
[0132] See also Figure 6 , Comparison diagram of additional variable A before and after improvement. In the standard seagull optimization algorithm, additional variable A decreases linearly from 2 to 0 with the increase of iteration number, while the actual search process is nonlinear. Therefore, the additional variable A in the prior art cannot adapt to the complex nonlinear optimization process, resulting in premature convergence of the algorithm in the early stage of iteration, and slow convergence speed in the later stage of iteration due to the inability to gather in local search; the additional variable A in this embodiment is inverse S-shaped with the increase of iteration number. In the early stage of iteration, the value of variable A decreases slowly, and a full search is performed globally to find the optimal solution, and then it decreases rapidly. Local search is performed near the optimal solution found to find the global optimal solution, which solves the problem of low global search ability of the algorithm and the problem of slow convergence speed in the later stage of algorithm iteration. Variable B is used to control the speed of seagull individual approaching the optimal individual. When A∈[0,2], B∈[0,8], the step length of the seagull individual position moving to the optimal individual position during global search is too large, resulting in the problem of premature convergence of the algorithm in the early stage of iteration. Change the value range of variable A to A∈[-1,1], B∈[0,2], reduce the speed at which seagull individuals move toward the optimal individual, conduct a more thorough global search, and improve the global search capability.
[0133] 4.6) In the attack phase, the cosine factor and 10 are introduced into the parameter μ. -2 Constant control factor, updates the position P of each seagull in the attack phase at the tth iteration s (t).
[0134] In the attack phase, the position of each individual is updated according to the attack phase formula of the algorithm and the variables μ that introduce the cosine factor and the constant control factor and the variable υ that introduces the change characteristic provided by the present invention.
[0135] In this step, the position of the individual seagull is updated according to the attack phase formula, where the constants μ and υ are changed into variables, and the cosine factor and 10 are introduced into the parameter μ.-2 The constant control factor strategy controls the individual position to be too large to prevent a large number of individuals from crossing the boundary. The introduction of variable characteristics in the parameter υ shows that the flying speed of the seagull is not constant.
[0136] When implemented, the specific form of Seagull's position update during the attack phase is:
[0137] P s (t) = D s (t)×x×y×z+P best (t-1)
[0138] Among them, x = r × sin (θ), y = r × cos (θ), z = r × θ, respectively represent the position of the seagull spiral motion in the Cartesian coordinate system, that is, the trajectory coordinates (x, y, z) of the seagull spiral motion; r = μ × e θυ represents the radius of the seagull's spiral motion in the Cartesian coordinate system, and θ represents the attack angle, which is a random number in [0,2π].
[0139] In this step, μ and υ are parameters used to control the spiral shape, and υ also represents the speed of the seagull's movement.
[0140] Let Q = x × y × z, then P s (t) = D s (t) × Q + P best (t-1)
[0141] When θ∈[0,2π], Q∈[-1.0569 +8 ,7.0095 +5 ], this value is independent of the search range. Assuming the search range is [-1,1], the individual position is seriously beyond the feasible solution search range. Therefore, a constant control factor of 10 is introduced in the μ parameter. -2 Reconcile the upper and lower bounds of the solution space to ensure that most individuals do not exceed the search range.
[0142] In this step, the specific forms of μ and υ are as follows:
[0143]
[0144] υ=rand()
[0145] Among them: ub is the upper limit vector of the feasible solution; lb is the lower limit vector of the feasible solution.
[0146] The positions of individual seagulls are then updated according to the improved μ and υ.
[0147] 4.7) Repeat steps 4.3) to 4.6) until the number of iterations t reaches the maximum number of iterations Max iteration, based on iterative training to verify the optimal individual position P of the seagull obtained by the neural network best The corresponding optimal fitness value F best , determine the optimal neural network hyperparameters.
[0148] Specifically, determine whether the maximum number of iterations has been reached, otherwise return to step 3) until the maximum number of iterations has been reached.
[0149] Repeat steps 4.3) to 4.6) until the number of iterations t reaches the maximum number of iterations Max iteration .
[0150] According to the optimal individual position P of the seagull obtained by training and verification in each iteration, best And the corresponding optimal fitness value F best , and then determine the corresponding number of iterations. The training parameters corresponding to the number of iterations are the optimal neural network hyperparameters.
[0151] Since the neural network hyperparameters are optimized by the improved seagull optimization algorithm, all the parameters to be optimized are encoded as the position of each seagull. During the training process, each seagull individual calculates the fitness value at each iteration, and the fitness value is used to judge the quality of the individual position, that is, the quality of the neural network hyperparameters. When the algorithm ends, the global extreme value is determined, and this global extreme value is the best hyperparameter combination.
[0152] See also Fig.10 ,The comparison chart between the actual value and the predicted value of wind speed,the wind speed prediction method based on the improved Seagull optimization algorithm and the neural network,achieves good prediction results. The predicted value and the actual value almost coincide with each other,so that the cusp position with large data fluctuations can still be accurately predicted,with high prediction accuracy.
[0153] Step S5: Input the test set of step S3 into the neural network optimized by step S4 to obtain the predicted value of each wind speed component.
[0154] Step S6: Reconstruct the predicted values of each wind speed component in step S5 according to the inverse empirical wavelet transform to obtain the wind speed prediction result. Specifically, the predicted values of each component are denormalized and then reconstructed into the final wind speed prediction result through the inverse empirical wavelet transform.
[0155] In this embodiment, by training the neural network a limited number of times and updating the hyperparameters, a trained neural network is finally obtained, and then the wind speed is predicted. The wind speed prediction method based on the improved Seagull optimization algorithm can accurately predict the wind speed.
[0156] In order to illustrate the accuracy of the improved seagull optimization algorithm provided by the present invention in wind speed prediction, the following verification is performed.
[0157] Test 1
[0158] The improved Seagull optimization algorithm and the traditional Seagull optimization algorithm are run on the standard test function.
[0159] The standard test functions are the unimodal test function Sphere Model, the multimodal test function Generalized Rastrigin's Function, and the fixed-dimensional test function Branin Function. The results are shown in Figure 7-9 .
[0160] Figure 7 This is the running result on the single-peak test function Sphere Model. It can be seen that the improved Seagull optimization algorithm provided by the present invention improves the convergence speed and convergence accuracy compared with the traditional Seagull optimization algorithm, and the improvement is quite large.
[0161] Figure 8 It is the running result on the multi-peak test function Generalized Rastrigin's Function. Compared with the traditional Seagull optimization algorithm, the improved Seagull optimization algorithm has greatly improved both the convergence speed and the convergence accuracy.
[0162] Fig. 9 The results of the operation on the fixed-dimensional test function Branin Function are shown in Figure 2. Although the improvement of the improved Seagull optimization algorithm is much smaller than that of the unimodal test function and the multimodal test function, it is still superior to the traditional Seagull optimization algorithm in terms of convergence speed and convergence accuracy.
[0163] The above analysis shows that the Seagull optimization algorithm in the embodiment of the present invention is superior to the traditional Seagull optimization algorithm in terms of single-peak test function, multi-peak test function and fixed-dimensional test function.
[0164] Test 2
[0165] Control group 1: EWT-MKELM is a neural network model without the Seagull optimization algorithm
[0166] Control group 2: EWT-SOA-MKELM neural network model based on the traditional standard Seagull optimization algorithm
[0167] Experimental group: EWT-ISOA-MKELM neural network model based on the improved Seagull optimization algorithm of the present invention
[0168] According to the wind speed prediction method provided by the present invention, the collected historical wind speed data is preprocessed by empirical wavelet transform, and then in step 4), the optimization algorithms of control group 1, control group 2 and test group are respectively used (control group 1 does not use the optimization algorithm) to obtain the predicted wind speed value. The predicted value and the actual value are quantitatively analyzed, and the results are shown in Table 1.
[0169] Table 1 Quantitative analysis results of three different prediction methods
[0170]
[0171] From the data in Table 1, it can be seen that the prediction accuracy of the prediction model based on the optimization algorithm is significantly improved compared with the prediction accuracy of the prediction model without the optimization algorithm; the average absolute error and root mean square error of the prediction model based on the standard seagull optimization algorithm are very small and close to 0, and the average absolute percentage error is also very small, indicating that the prediction accuracy of the model is very high; and the wind speed prediction method based on the improved seagull optimization algorithm to optimize the neural network provided by the embodiment of the present invention is better than the model using the traditional seagull optimization algorithm in terms of average absolute error, root mean square error or average absolute percentage error, and the proposed wind speed prediction model has achieved the highest prediction accuracy. This shows that the improved seagull optimization algorithm provided by the present invention is not only better than the standard seagull optimization algorithm in standard test functions, but also better than the standard seagull optimization algorithm in practical engineering applications. The improved seagull optimization algorithm provided by the present invention has convergence speed and convergence accuracy, can balance global search, find the global optimal value, and the optimized neural network has higher accuracy.
[0172] The above prediction steps are only illustrative, and the technical content disclosed in the present invention can also be replaced and implemented in other ways. For example, the improved Seagull optimization algorithm can be used for the optimization of other nonlinear systems and the optimization problem of nonlinear functions. The wind speed prediction method can also integrate multiple steps into one processing unit or divide one step into several more detailed steps.
[0173] The above description is only a preferred embodiment of the present invention. It should be pointed out that for any technician familiar with the scope of this technology, any changes or modifications made to the technical solution provided by the present invention on the basis of the present invention, thereby obtaining a variety of replacement methods should be included in the protection scope of the claims of the present invention.
Claims
1. A wind speed prediction method based on improved seagull optimization algorithm and multi-core extreme learning machine, characterized in that: The following steps are involved: 1) Obtain the historical wind speed data measured at the wind farm; 2) using empirical wavelet transform to decompose the historical wind speed data in step 1) into multiple wind speed components with different frequencies; 3) Divide each wind speed component into training set, validation set and test set respectively; 4) inputting each training set and each validation set in step 3) into a neural network to iteratively train the neural network, and optimizing the hyperparameters of the neural network using an improved Seagull optimization algorithm to obtain an optimized neural network; the neural network is a multi-core extreme learning machine; 5) inputting each test set of step 3) into the neural network optimized in step 4) to obtain the predicted value of each wind speed component; 6) Reconstruct the predicted values of each wind speed component in step 5) according to the empirical wavelet inverse transform to obtain the wind speed prediction result; The specific steps in step 4) are: 4.1) Determine the hyperparameters of the neural network; 4.2) Encode the hyperparameters in the neural network as the location information of the seagull population, and use the Tent chaotic mapping method to initialize the location of the seagull population, and set the initial seagull optimization algorithm parameters, including the population number M, the maximum number of iterations Max iteration , the dimension D of the search space, the upper limit vector ub of the feasible solution and the lower limit vector lb of the feasible solution; 4.3) Input the training set of wind speed components into the neural network, and start training the neural network using the hyperparameters represented by the position of each seagull. Then input the validation set into the trained neural network to obtain the wind speed prediction value corresponding to the validation set, and calculate the mean absolute error of the validation set prediction value, that is, the fitness value of the individual seagull. 4.4) Update the global optimal seagull individual position P at the tth iteration best (t) and the corresponding global optimal fitness value F best (t); 4.5) In the migration stage, the linear decreasing additional variable A is improved to a nonlinear one, and the position D of each seagull in the migration stage is updated at the tth iteration. S (t); 4.6) In the attack phase, the cosine factor and 10 are introduced into the parameter μ. -2 Constant control factor, updates the position P of each seagull in the attack phase at the tth iteration s (t); 4.7) Repeat steps 4.3) to 4.6) until the number of iterations t reaches the maximum number of iterations Max iteration , based on iterative training to verify the optimal individual position P of the seagull obtained by the neural network best And the corresponding optimal fitness value F best , determine the optimal neural network hyperparameters.
2. The wind speed prediction method based on the improved seagull optimization algorithm and multi-core extreme learning machine according to claim 1 is characterized in that: In the step 3), the division ratio of the training set, the validation set and the test set is 6:2:
2.
3. The wind speed prediction method based on the improved seagull optimization algorithm and multi-core extreme learning machine according to claim 2 is characterized in that: In step 4.1), the output f(x) of the multi-core extreme learning machine is as follows: Where: I is the identity matrix, C is the regularization coefficient, L is the expected output, K(·,·) represents the kernel function, Ω ELM is the kernel function matrix, x1,…,x N is a given wind speed training sample; T is the matrix transpose; The kernel function matrix Ω ELM The definition is as follows: Where: H is the hidden layer output matrix; h(x i ) indicates that the input wind speed is x i The output of the hidden layer when h(x j ) indicates that the input wind speed is x j The output of the hidden layer when Ω ELMi,j Represents the kernel matrix Ω ELM The element in row i and column j, x i ,x j is the experimental input vector, i.e., the wind speed training sample in the i-th row and the wind speed training sample in the j-th column; T is the matrix transpose; in: K Poly (x,x i ) represents the polynomial kernel function; K RBF (x,x i ) represents the radial basis kernel function; λ is the weight coefficient of the polynomial kernel function; n and d are the kernel parameters of the polynomial kernel function, and σ is the kernel parameter of the radial basis kernel function.
4. The wind speed prediction method based on the improved seagull optimization algorithm and multi-core extreme learning machine according to claim 3 is characterized in that: In step 4.2), the Tent chaos is mapped to the D-dimensional solution space to obtain the initialized seagull population Z = {Z i ,i=1,2,…,M}, the individuals in the population are represented as: Z i =lb+(ub-lb)*z i ; Where: ub is the upper limit vector of the feasible solution, lb is the lower limit vector of the feasible solution; Z i is the i-th seagull population, z i Generate chaotic sequence for Tent chaotic mapping D-dimensional space; The expression of the Tent chaotic map is: Among them: α∈(0,2] is the chaos parameter, which is proportional to the chaos.
5. The wind speed prediction method based on the improved seagull optimization algorithm and multi-core extreme learning machine according to claim 4 is characterized in that: In step 4.3), the mean absolute error of the predicted values of the validation set is verified according to the following relationship: Where: the mean absolute error of the MAE validation set prediction value is the fitness value of the seagull individual corresponding to the tth iteration; S is the number of prediction samples, i = 1, 2, ..., S; y i is the actual wind speed value of the ith value in the validation set, is the i-th predicted wind speed value in the validation set.
6. The wind speed prediction method based on the improved seagull optimization algorithm and multi-core extreme learning machine according to claim 5 is characterized in that: In the step 4.5), D s (t)=|A×P S (t-1)+B×(P best (t-1)-P S (t-1))| in: D S (t) represents the position of each seagull during its migration phase, i.e., the distance between the seagull individual and the global optimal individual at the tth iteration; B = 2 × A 2 ×rand(), rand represents a random number, and its value range is [0,1]; ×P S (t-1)+ is the position of the individual seagull at the t-1th iteration, (P best (t-1) is the global best individual position at the t-1th iteration; A∈[-1,1], t is the current iteration number, abs means taking the absolute value; Max iteration is the maximum number of iterations.
7. The wind speed prediction method based on the improved seagull optimization algorithm and multi-core extreme learning machine according to claim 6 is characterized in that: In the step 4.6), P s (t)=D s (t)×x×y×z+P best (t-1); Among them, x = r × sin (θ), y = r × cos (θ), z = r × θ represent the behavior of the seagull spiral motion in the x, y and z planes respectively; r = μ × e θυ represents the spiral motion radius of the seagull, θ represents the attack angle, which is a random number in [0,2π], μ is the spiral shape parameter, and υ represents the speed of the seagull; υ=rand() Among them: ub is the upper limit vector of the feasible solution; lb is the lower limit vector of the feasible solution.
8. The wind speed prediction method based on the improved seagull optimization algorithm and multi-core extreme learning machine according to claim 7, characterized in that: In the step 4), each component data is normalized before being input into the neural network.
9. The wind speed prediction method based on the improved seagull optimization algorithm and multi-core extreme learning machine according to claim 8, characterized in that: The normalized processing formula is: Where: x min and x max They represent the minimum and maximum values of the time series that need to be normalized, respectively; x represents the actual wind speed value that needs to be normalized; and x* represents the normalized value corresponding to x.
Citation Information
Patent Citations
Prediction method and system based on improved seagull algorithm and back propagation neural network
CN116933948A