Ultra-short-term wind speed prediction method based on INGO-SWGMN hybrid model
By optimizing hyperparameters using improved SWGMN and INGO algorithms, the problems of long training time and low accuracy of LSTM in ultra-short-term wind speed prediction are solved, achieving more efficient wind speed prediction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-26
- Publication Date
- 2026-03-31
AI Technical Summary
Existing deep learning models such as LSTM have long training times in ultra-short-term wind speed prediction. Improper hyperparameter settings can lead to large differences in prediction results. Furthermore, existing optimization algorithms have slow convergence speeds, making it difficult to meet the real-time scheduling requirements of wind power systems.
The LSTM model is improved by adopting the Shared Weight Gated Memory Network (SWGMN) and combined with the improved Northern Eagle Optimization Algorithm (INGO). The hyperparameters of SWGMN are optimized through an optimization algorithm, which reduces training time and improves prediction accuracy.
It significantly reduces prediction training time, improves the accuracy and efficiency of ultra-short-term wind speed prediction, and is suitable for the real-time scheduling needs of wind power systems.
Smart Images

Figure CN115511177B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of wind power wind speed prediction technology, specifically to an ultra-short-term wind speed prediction method based on the INGO-SWGMN hybrid model. Background Technology
[0002] Wind power has gained worldwide popularity due to its low operating costs, low pollution, and renewable nature, and has become one of the most important development directions for many countries. However, wind power is characterized by intermittency, uncertainty, and volatility. Large-scale wind power grid connection can have a significant adverse impact on the safe and stable operation of the power system. Wind speed is the largest and most important influencing factor in wind power generation. Accurate ultra-short-term wind speed forecasting can provide crucial information for real-time power system dispatching, reducing the adverse effects of wind power grid connection on the power system and lowering operating costs. This has significant strategic importance for the development of wind power.
[0003] Currently, wind speed forecasting methods are mainly divided into two categories: physical model forecasting and statistical model forecasting. Physical model forecasting is more difficult to model and computationally intensive due to the influence of geographical and meteorological factors, resulting in poor timeliness and generally only suitable for medium- to long-term wind speed forecasts. Statistical model forecasting, on the other hand, analyzes large amounts of historical data to identify inherent nonlinear mapping relationships for prediction.
[0004] In recent years, with the rise of artificial intelligence, statistical model prediction methods have expanded beyond traditional time series analysis methods such as Autoregressive Differential Moving Average (ARIMA) to include intelligent statistical analysis methods like Artificial Neural Networks (ANNs). Deep learning algorithms, with their powerful learning capabilities and ability to handle nonlinear problems, have significantly improved the accuracy of wind speed prediction, thus attracting considerable attention from scholars. In particular, Long Short-Term Memory (LSTM) networks not only solve the gradient vanishing and exploding problems inherent in traditional Recurrent Neural Networks (RNNs) but also address the long-term dependency issues caused by excessively long datasets. While LSTMs offer numerous advantages and high prediction accuracy, their complex internal structure and numerous weight parameters result in a longer training time compared to other deep learning models, which is disadvantageous for ultra-short-term wind speed prediction. Furthermore, the selection of hyperparameters is crucial for any deep learning model; different hyperparameter settings lead to significant differences in the final results. Therefore, an efficient optimization algorithm is needed to optimize the model's predictive performance. Summary of the Invention
[0005] To overcome the shortcomings of existing technologies, this invention proposes an ultra-short-term wind speed prediction method based on the INGO-SWGMN hybrid model. This method proposes an improved network model based on the LSTM network, called the Shared Weight Gated Memory Network (SWGMN), to reduce the time required for prediction training. In addition, to improve the prediction performance of the model, an improved Northern Eagle Optimization Algorithm (INGO) is proposed to optimize the two hyperparameters of the SWGMN model, namely the initial learning rate and the number of hidden layer nodes, to obtain the optimal parameter combination, thereby maximizing the prediction accuracy of the SWGMN model.
[0006] The technical solution adopted in this invention is as follows:
[0007] The ultra-short-term wind speed prediction method based on the INGO-SWGMN hybrid model includes the following steps:
[0008] Step 1: Obtain historical wind speed data from the wind farm, preprocess the wind speed data to obtain a series of subsequences, and divide the processed data into three parts: training set, validation set, and test set.
[0009] Step 2: Improve the LSTM network by proposing a shared weight gated memory network (SWGMN) and build a prediction model for SWGMN using the training set;
[0010] Step 3: Improve the original Northern Goshawk optimization algorithm by applying a nonlinear reduction mechanism to its hunting radius and adding a perturbation stage to the position update of individual Northern Goshawks to obtain the improved Northern Goshawk optimization algorithm INGO;
[0011] Step 4: Using the improved Northern Eagle Optimization Algorithm (INGO) and validation set data, optimize the initial learning rate and the number of hidden layer nodes of the Shared Weight Gated Memory Network (SWGMN) to obtain the optimal hyperparameter combination of the hybrid model INGO-SWGMN.
[0012] Step 5: Input the optimized hyperparameters and test set data into the hybrid model INGO-SWGMN to obtain the prediction results of each subsequence in the test set;
[0013] Step 6: Sum the prediction results of each subsequence to obtain the final wind speed prediction result.
[0014] Step 7: Use the mean absolute error (MAE), root mean square error (RMSE), mean relative error (MAPE), and coefficient of determination (R²) 2 These four evaluation metrics are used to perform error analysis on the prediction results of the model in step 6.
[0015] Step 1 includes the following steps:
[0016] Step S1.1: Construct a variational problem, decomposing the wind speed signal into K intrinsic mode functions (IMFs) with finite bandwidths, and minimizing the sum of the estimated bandwidths of the K IMFs. The constructed variational constraint model is shown below:
[0017]
[0018]
[0019] In the formula: u k ω represents the Kth modal component obtained from the decomposition; k The center frequency of the Kth decomposed mode is represented by δ(t); δ(t) is the Dirac function; f(t) is the original wind speed signal; * indicates convolution operation; k represents the current iteration number; j represents u k The imaginary part of the analytic signal; t represents time;
[0020] Step S1.2: To obtain the optimal solution of the above variational constraint model, a quadratic penalty function α and a Lagrange multiplier λ are introduced, thus transforming the constrained problem into an unconstrained variational problem. The resulting Lagrange function is:
[0021]
[0022] In the formula: λ(t) represents the Lagrange multiplier; This represents the exponential adjustment factor, which modulates the spectrum of each mode function to the corresponding fundamental frequency band.
[0023] Step S1.3: Solve the unconstrained variational problem above using the alternating direction multiplier method, through alternating updates. Find the "saddle point" of the improved Lagrange expression, which is the optimal solution to the constrained variational problem in step S1.1, and obtain the final modal component u. k and center frequency ω k They are respectively:
[0024]
[0025]
[0026] In the formula: and f(t), respectively and Fourier transform; n is the number of iterations;
[0027] Step S1.4: Given a precision ε for determining whether the iteration has stopped, if If the iteration stops and the result is output, otherwise return to step S1.3 to continue the iteration operation, and finally K modal function components (IMFs) with different center frequencies can be obtained.
[0028] In step 2, for a one-dimensional subsequence x = {x} after VMD decomposition... i}, i = 1, 2, 3…n; its reconstruction result in the multidimensional phase space is as follows:
[0029]
[0030] If the input to the prediction model is X, then its corresponding output is:
[0031] Y = [x 1+h+(d-1)τ ,x i+h+(d -1)τ,…x n+1 ] T
[0032] In the formula: N is the reconstruction dimension of the phase space reconstruction matrix, N = n - (d - 1)τ - h; h represents the prediction step size; τ and d represent the delay time and embedding dimension, respectively; X1X2…X N These represent the N one-dimensional vectors in the reconstructed phase space matrix; x i x i+τ ...x i+(d-1)τ These represent the specific values of the i-th dimension vector in the phase space reconstruction matrix; x 1+h+(d-1)τ ,x i+h+(d -1)τ,…x n+1 These represent the output values that should be obtained after inputting each dimension of the vector.
[0033] In step 2, the construction of the SWGMN model includes the following steps:
[0034] Step S2.1: In order to reduce the training time of prediction, SWGMN changed the three gate structures of the original LSTM, and recombined the forget gate, input gate and output gate into a new gate structure called the shared gate;
[0035] Step S2.2: Calculate the output and information state of the shared gate, using the following formula:
[0036]
[0037] r t =σ(W·x t +b);
[0038] In the formula: Indicates the current state of the input information; r t Indicates the output of the shared gate; x tσ represents the input of the module at the current time step; W represents the weight; b represents the bias; σ represents a hidden layer with the sigmoid function as its activation function.
[0039] Step S2.3: Update the current module's state, using the following formula:
[0040]
[0041] In the formula: C t-1 Indicates the state of the module at the previous moment; C t Indicates the current state of the module;
[0042] Step S2.4: Calculate the output of the current module, using the following formula:
[0043] h t =r t *h t-1 +(1-r t )*tanh(C t )
[0044] Where: h t Indicates the output of the module at the current moment; h t-1 This represents the output of the module at the previous time step; tanh represents a tanh activation function layer.
[0045] Step 3 includes the following steps:
[0046] Step S3.1: For the hunting radius of the Northern Goshawk, a non-linear reduction strategy is adopted, and the specific formula is shown below:
[0047]
[0048] In the formula: R is the hunting radius; t is the current iteration number of the algorithm; T is the maximum number of iterations;
[0049] Step S3.2: Introduce a third stage: the perturbation stage, into the original two-stage position update process of the Northern Goshawk. In this stage, the Levy flight perturbation strategy is introduced into the position update process of the Northern Goshawk. The specific position update formula is as follows:
[0050]
[0051]
[0052] In the formula: X i Let i be the position of the i-th Northern Goshawk; For the new position of the i-th Northern Eagle in the third stage; F i F represents the objective function value of the i-th Northern Goshawk's own position before the position update; inew,P3 Let be the objective function value of the i-th Northern Eagle's own position after the third stage update; Levy(d) is the Levy flight perturbation; d is the dimension of the problem; Multiply the corresponding elements of the vectors;
[0053] Step S3.3: In the third stage, a perturbation factor r and a judgment factor p are introduced. During the algorithm's iteration process, if r > p, then Levy flight perturbation is required for that iteration; otherwise, it is not. r is a random number between (0,1) in each iteration, and p is a number that decreases non-linearly with the number of iterations, and its specific expression is:
[0054]
[0055] In the formula: t is the current iteration number; T is the maximum iteration number.
[0056] Step 4 includes the following steps:
[0057] Step S4.1: Initialize the INGO optimization algorithm by setting the population size of the Northern Goshawk, the maximum number of iterations, and the optimization range of the parameters. At the same time, the initial learning rate of SWGMN and the number of hidden layer nodes are used as two hyperparameters for the position of the Northern Goshawk in INGO.
[0058] Step S4.2: Randomly initialize the positions of individuals in the population, use the root mean square error (RMSE) as the fitness value of the Northern Goshawk individual, and calculate the fitness value of each individual at present.
[0059] Step S4.3: Update the position of each Northern Goshawk, use the updated position of each Northern Goshawk as the new initial learning rate and number of hidden layer nodes of SWGMN, and validate the SWGMN model based on the new hyperparameters and validation set data, and calculate the fitness value of each Northern Goshawk individual under the new parameters.
[0060] Step S4.4: Select the Northern Goshawk individual with the smallest fitness value as the optimal individual in the current iteration; Step S4.5: Determine whether the maximum number of iterations has been reached. If it has, output the position of the optimal individual in this iteration and use it as the optimal hyperparameter of SWGMN. If it has not been reached, jump to step S4.3 and increment the iteration count by 1.
[0061] Step S4.3 specifically includes the following steps:
[0062] Step S4.3.1: The location update of the Northern Goshawk consists of three stages. The first stage is the exploration stage, and the specific formula is as follows:
[0063] P i=X k ,i=1,2,..N,k=1,2,...i-1,i+1,...N;
[0064]
[0065]
[0066] In the formula: P i Let i be the location of the prey of the i-th northern eagle; Let i be the new position of the i-th Northern Eagle in the j-th dimension; X is the objective function value for the location of the i-th northern goshawk's prey; i Let F be the position of the i-th Northern Goshawk; i The objective function value is the position of the i-th Northern Eagle before updating its own position; For the new position of the i-th Northern Eagle in the first stage; F i new,P1 Let r be the objective function value of the i-th Northern Eagle's own position after the first stage update; r is a random number in the range [0,1]; I is a random integer with the value 1 or 2.
[0067] Step S4.3.2: The second stage is the development stage, and the specific formula is as follows:
[0068]
[0069]
[0070]
[0071] In the formula: R is the improved hunting radius of the Northern Goshawk; t is the current iteration number; T is the maximum iteration number; For the new position of the i-th Northern Eagle in the j-th dimension in the second stage; F i new,P2 The objective function value for the i-th Northern Eagle's own position after the second stage update;
[0072] Step S4.3.3: The third stage is the disturbance stage. In this stage, the present invention introduces the Levy flight disturbance strategy into the position update process of the Northern Goshawk. The specific process is shown in steps S3.2 and S3.3.
[0073] In step 7, the four evaluation indicators specifically include:
[0074]
[0075]
[0076]
[0077]
[0078] In the formula: n represents the number of predicted samples; y i This represents the actual value of the i-th sample; This represents the predicted value of the i-th sample; This represents the average of the actual values of n predicted samples.
[0079] This invention provides an ultra-short-term wind speed prediction method based on the INGO-SWGMN hybrid model, with the following advantages:
[0080] 1) This invention adds a nonlinear control strategy and a perturbation stage to the original Northern Eagle optimization algorithm. Compared with the original algorithm, the optimization algorithm proposed in this invention has a faster convergence speed and a stronger optimization ability. Furthermore, in the later stages of iteration, the algorithm has a strong ability to escape local optima.
[0081] 2) Based on the LSTM network, this invention proposes an improved model—Shared Weight Gated Memory Network (SWGMN). This improved network not only has the advantages of the LSTM network, such as the ability to control the discarding of useless historical information and the retention of current useful information, resulting in higher prediction accuracy, but also requires significantly less time for prediction training than LSTM, making it more suitable for ultra-short-term wind speed prediction.
[0082] 3) This invention combines the improved Northern Eagle Optimization Algorithm (INGO) with the Shared Weight Gated Memory Network (SWGMN). INGO is used to optimize the hyperparameters of SWGMN, so that the prediction performance of SWGMN reaches the optimal state, and the prediction accuracy of the SWGMN prediction model is further improved. Attached Figure Description
[0083] Figure 1 This is a flowchart of the present invention.
[0084] Figure 2 This is a unit structure diagram of SWGMN in this invention.
[0085] Figure 3 This is a comparison chart of the predicted values and actual values using the present invention. Detailed Implementation
[0086] The present invention will now be described in further detail with reference to the accompanying drawings:
[0087] This invention proposes an ultra-short-term wind speed prediction method based on the INGO-SWGMN hybrid model. First, VMD is used to decompose the original wind speed time series into a series of relatively stationary subsequences, reducing the difficulty of prediction. Then, the phase space of each subsequence component is reconstructed to extract its hidden regularity information, obtaining the corresponding phase space matrix. Next, an improved model based on LSTM, called Shared Weight Gated Memory Network (SWGMN), is proposed and used to build a prediction model for each subsequence component. Furthermore, an improved Northern Eagle Optimization Algorithm (INGO) is proposed to optimize the initial learning rate and the number of hidden layer nodes of the SWGMN model, obtaining the optimal parameter combination. This optimal parameter is then input into the model to improve the prediction accuracy of the SWGMN model. Finally, predictions are made for each subsequence, and the predicted values are superimposed to calculate the final wind speed prediction result. The prediction process is as follows: Figure 1 As shown, the specific steps include the following:
[0088] Step a: Historical wind speed data from the Sotavento Galicia (SG) wind farm in Spain were selected for experimental analysis. The selected time period was from May 12, 2022 to May 20, 2022, with a data recording interval of 10 minutes, resulting in a total of 1200 experimental data points. The data was preprocessed to obtain a series of subsequences, which were then divided into three parts: the first 750 experimental data points were assigned to the training set, the middle 150 to the validation set, and the last 300 to the test set.
[0089] Step a1: Use the VMD decomposition method to decompose the collected wind speed time series into a series of relatively stationary subsequences.
[0090] Step a1.1: The specific operation of VMD decomposition is to construct a variational problem, decomposing the wind speed signal into K intrinsic mode functions (IMFs) with finite bandwidth, and minimizing the sum of the estimated bandwidths of the K decomposed IMFs. The constructed variational constraint model is shown below:
[0091]
[0092]
[0093] In the formula: u k ω represents the Kth modal component obtained from the decomposition; k The center frequency of the Kth decomposed mode is represented by δ(t); δ(t) is the Dirac function; f(t) is the original wind speed signal; * indicates convolution operation; k represents the current iteration number; j represents u k The imaginary part of the analytic signal; t represents time;
[0094] Step a1.2: To obtain the optimal solution of the above variational constraint model, a quadratic penalty function α and a Lagrange multiplier λ are introduced, thus transforming the constrained problem into an unconstrained variational problem. The resulting Lagrange function is:
[0095]
[0096] In the formula: λ(t) represents the Lagrange multiplier; This represents the exponential adjustment factor, which modulates the spectrum of each mode function to the corresponding fundamental frequency band.
[0097] Step a1.3: Solve the unconstrained variational problem above using the alternating direction multiplier method, through alternating updates. Find the "saddle point" of the improved Lagrange expression, i.e., the optimal solution to the constrained variational problem in step a1.1, and obtain the final modal component u. k and center frequency ω k They are respectively:
[0098]
[0099]
[0100] In the formula: and f(t), respectively λ n (t) and Fourier transform; n is the number of iterations;
[0101] Step a1.4: Given a precision ε for determining whether the iteration has stopped, if If the iteration stops and the result is output, then return to step a1.3 to continue the iteration operation. Ultimately, K modal function components (IMFs) with different center frequencies can be obtained.
[0102] Step a2: Reconstruct the phase space of each decomposed subsequence to obtain useful information hidden in the wind speed sequence.
[0103] For a one-dimensional subsequence x = {x} after VMD decomposition, i The reconstruction results of} (i = 1, 2, 3…n) in the multidimensional phase space are as follows:
[0104]
[0105] If the input to the prediction model is X, then its corresponding output is:
[0106] Y = [x 1+h+(d-1)τ ,x i+h+(d-1)τ,…x n+1 ] T
[0107] In the formula: N is the reconstruction dimension of the phase space reconstruction matrix, N = n - (d - 1)τ - h; h represents the prediction step size; τ and d represent the delay time and embedding dimension, respectively; X1X2…X N These represent the N one-dimensional vectors in the reconstructed phase space matrix; x i x i+τ ...x i+(d-1)τ These represent the specific values of the i-th dimension vector in the phase space reconstruction matrix; x 1+h+(d-1)τ ,x i+h+(d -1)τ,…x n+1 These represent the output values that should be obtained after inputting each dimension of a vector.
[0108] Step b: Improve the LSTM network by proposing a new deep learning model called Shared Weight Gated Memory Network (SWGMN), and build the SWGMN prediction model using the training set. The unit structure of SWGMN is as follows: Figure 2 As shown, the specific improvement process is as follows:
[0109] Step b1: In order to reduce the training time of prediction, SWGMN changed the three gate structures of the original LSTM, and recombined the forget gate, input gate and output gate into a new gate structure called the shared gate;
[0110] Step b2: Calculate the output and information state of the shared gate, using the following formula:
[0111]
[0112] r t =σ(W·x t +b)
[0113] In the formula: Indicates the current state of the input information; r t Indicates the output of the shared gate; x t σ represents the input of the module at the current time step; W represents the weight; b represents the bias; σ represents a hidden layer with the sigmoid function as its activation function.
[0114] Step b3: Update the current module's state, using the following formula:
[0115]
[0116] In the formula: C t-1 Indicates the state of the module at the previous moment; C t Indicates the current state of the module;
[0117] Step b4: Calculate the output of the current module, using the following formula:
[0118] h t =r t *h t-1 +(1-r t )*tanh(C t )
[0119] Where: h t Indicates the output of the module at the current moment; h t-1 This represents the output of the module at the previous time step; tanh represents a tanh activation function layer.
[0120] Step b5: Input the reconstructed phase space training set data into the SWGMN model for training.
[0121] Step c: Improve the original Northern Goshawk optimization algorithm by applying a nonlinear reduction mechanism to its hunting radius and adding a perturbation stage to the position update of individual Northern Goshawks, resulting in the improved Northern Goshawk optimization algorithm INGO. The specific process is as follows:
[0122] Step c1: For the hunting radius of the Northern Goshawk, a non-linear reduction strategy is adopted to better reflect the actual situation when the Northern Goshawk is hunting, thereby accelerating the convergence speed of the algorithm. The specific formula is shown below:
[0123]
[0124] In the formula: R is the hunting radius; t is the current iteration number of the algorithm; T is the maximum number of iterations;
[0125] Step c2: To address the possibility of the algorithm getting stuck in local optima later in the process, a third stage—the perturbation stage—is introduced into the original two-stage position update process for the Northern Goshawk. In this stage, the Levy flight perturbation strategy is introduced into the Northern Goshawk's position update process. The Levy flight strategy is used to perturb and update the Northern Goshawk's position. The specific position update formula is shown below:
[0126]
[0127]
[0128] In the formula: X i Let i be the position of the i-th Northern Goshawk; For the new position of the i-th Northern Eagle in the third stage; F i F represents the objective function value of the i-th Northern Goshawk's own position before the position update; i new,P3Let be the objective function value of the i-th Northern Eagle's own position after the third stage update; Levy(d) is the Levy flight perturbation; d is the dimension of the problem; Multiply the corresponding elements of the vectors;
[0129] Step c3: In the third stage, a perturbation factor r and a judgment factor p are introduced. During the algorithm's iteration process, if r > p, then Levy flight perturbation is required for that iteration; otherwise, it is not. r is a random number between (0,1) in each iteration, and p is a number that decreases non-linearly with the number of iterations, and its specific expression is:
[0130]
[0131] In the formula: t is the current iteration number; T is the maximum iteration number.
[0132] Step d: Using the INGO and validation set data, optimize the initial learning rate and the number of hidden layer nodes of SWGMN to obtain the optimal hyperparameter combination for the hybrid model INGO-SWGMN. The specific steps are as follows:
[0133] Step d1: Initialize the INGO optimization algorithm by setting the population size of the Northern Goshawk, the maximum number of iterations, and the optimization range of the parameters. At the same time, the initial learning rate of SWGMN and the number of hidden layer nodes are used as two hyperparameters for the position of the Northern Goshawk in INGO.
[0134] Step d2: Randomly initialize the positions of individuals in the population, use the root mean square error (RMSE) as the fitness value of the Northern Goshawk individuals, and calculate the fitness value of each individual at present.
[0135] Step d3: Update the position of each Northern Goshawk, use the updated position of each Northern Goshawk as the new initial learning rate and number of hidden layer nodes of SWGMN, and validate the SWGMN model based on the new hyperparameters and validation set data, and calculate the fitness value of each Northern Goshawk individual under the new parameters.
[0136] Step d3.1: The Northern Goshawk's location update consists of three phases. The first phase is the exploration phase, in which the Northern Goshawk randomly selects the location of an individual as its prey and then quickly approaches it. The specific formula is as follows:
[0137] P i =X k ,i=1,2,..N,k=1,2,...i-1,i+1,...N
[0138]
[0139]
[0140] In the formula: P i Let i be the location of the prey of the i-th northern eagle; Let i be the new position of the i-th Northern Eagle in the j-th dimension; X is the objective function value for the location of the i-th northern goshawk's prey; i Let F be the position of the i-th Northern Goshawk; i The objective function value is the position of the i-th Northern Eagle before updating its own position; For the new position of the i-th Northern Eagle in the first stage; F i new,P1 Let r be the objective function value of the i-th Northern Eagle's own position after the first stage update; r is a random number in the range [0,1]; I is a random integer with the value 1 or 2.
[0141] Step d3.2: The second stage is the development stage. In this stage, after the Northern Goshawk attacks its prey, the prey will try to escape. Therefore, during the final chase, the Northern Goshawk needs to continue pursuing the prey. The specific formula is as follows:
[0142]
[0143]
[0144]
[0145] In the formula: R is the improved hunting radius of the Northern Goshawk; t is the current iteration number; T is the maximum iteration number; For the new position of the i-th Northern Eagle in the j-th dimension in the second stage; F i new,P2 The objective function value for the i-th Northern Eagle's own position after the second stage update;
[0146] Step d3.3: The third stage is the perturbation stage. In this stage, the Levy flight perturbation strategy is introduced into the position update process of the Northern Goshawk. By perturbing and updating the position of the Northern Goshawk through the Levy flight strategy, the algorithm has a strong ability to escape local optima in the later stages of iteration, thereby improving the algorithm's global search ability and convergence speed. See steps c2 and c3 for details;
[0147] Step d4: Select the Northern Goshawk individual with the smallest fitness value as the optimal individual in the current iteration.
[0148] Step d5: Determine if the maximum number of iterations has been reached. If it has, output the position of the best individual in this iteration and use it as the optimal hyperparameter of SWGMN. If it has not been reached, jump to step d3 and increment the iteration count by 1.
[0149] Step e: Input the optimized hyperparameters and test set data into the INGO-SWGMN model to obtain the prediction results of each subsequence in the test set;
[0150] Step f: Sum the prediction results of each subsequence to obtain the final wind speed prediction result, and use the mean absolute error (MAE), root mean square error (RMSE), mean relative error (MAPE), and coefficient of determination (R²) to calculate the final wind speed prediction result. 2 These four evaluation metrics are used to perform error analysis on the model's prediction results. The specific formulas for the evaluation metrics are as follows:
[0151]
[0152]
[0153]
[0154]
[0155] In the formula: n represents the number of predicted samples; y i This represents the actual value of the i-th sample; This represents the predicted value of the i-th sample; This represents the average of the actual values of n predicted samples.
[0156] To fully demonstrate the effectiveness of the proposed model, INGO-SWGMN was compared with four other models: LSTM, GRU, SWGMN, and NGO-SWGMN. The experimental results are as follows: Figure 3 As shown.
[0157] from Figure 3 As can be seen, the wind speed prediction curve of the hybrid model INGO-SWGMN proposed in this invention is largely consistent with the actual wind speed curve, demonstrating high prediction accuracy and proving the superiority and effectiveness of this invention.
[0158] Table 1. Error Analysis Evaluation Indicators for Different Models
[0159]
[0160] As shown in Table 1, the improved model SWGMN of this invention, compared with the original LSTM model and GRU model, has lower MAE, RMSE, MAPE, and R... 2All models show varying degrees of improvement, with the SWGMN model reducing prediction time by nearly 50% compared to LSTM, a significant improvement. Compared to GRU, it also shows a 32% improvement, indicating that the improved model of this invention has higher prediction accuracy and efficiency than other traditional models. Furthermore, after incorporating an optimization algorithm to optimize the hyperparameters of SWGMN, the prediction performance of the SWGMN model is further improved.
[0161] As can be clearly seen from the last two rows of Table 1, the error analysis evaluation index of the INGO-SWGMN model is significantly better than that of the NGO-SWGMN model. This indicates that the INGO optimization algorithm proposed in this invention has a stronger optimization capability than the original NGO optimization algorithm, and can find better hyperparameters for the SWGMN model, thereby further improving the prediction performance of the SWGMN model.
Claims
1. A method for ultra-short-term wind speed prediction based on an INGO-SWGMN hybrid model, characterized in that The method comprises the following steps: Step 1: obtaining historical wind speed data of a wind farm, preprocessing the wind speed data, obtaining a series of sub-sequences, and dividing the processed data into three parts of a training set, a validation set and a test set respectively; Step 2: improving the LSTM network, proposing a shared weight gated memory network SWGMN, and establishing a SWGMN prediction model using the training set; Step 3: improving the original northern hawk optimization algorithm, applying a nonlinear reduction mechanism to the hunting radius thereof, and adding a disturbance stage in the position update of the northern hawk individual to obtain an improved northern hawk optimization algorithm INGO; Step 4: using the improved northern hawk optimization algorithm INGO and the validation set data, optimizing the initial learning rate and the number of hidden layer nodes of the shared weight gated memory network SWGMN to obtain the optimal super parameter combination of the hybrid model INGO-SWGMN; Step 5: inputting the optimized super parameters and the test set data into the hybrid model INGO-SWGMN to obtain the prediction results of each sub-sequence in the test set; Step 6: accumulating and summing the prediction results of each sub-sequence to obtain the final wind speed prediction result; In the step 2, the construction of the SWGMN model comprises the following steps: Step S2.1: in order to reduce the length of the prediction training, the SWGMN changes the three gate structures of the original LSTM, and reorganizes the forget gate, the input gate and the output gate into a new gate structure, which is called a shared gate; Step S2.2: calculating the output and information state of the shared gate, and the specific formula is as follows: ; ; In the formula: represents the state of input information at the current moment; represents the output of the shared gate; represents the input of the module at the current moment; represents the weight; represents the bias; represents a hidden layer, and the activation function is a sigmoid function; Step S2.3: updating the state of the current module, and the specific formula is as follows: ; In the formula: represents the state of the module at the previous time; represents the state of the module at the current time; Step S2.4: calculating the output of the current module, and the specific formula is as follows: ; In the formula: denotes the output of the current time module; denotes the output of the previous time module; tanh denotes a tanh activation function layer; Inputting the training set data after phase space reconstruction into the SWGMN model for training; The step 3 comprises the following steps: Step S3.1: for the hunting radius of the northern hawk, a nonlinear reduction strategy is adopted, and the specific formula is as follows: ; In the formula: R is the hunting radius; t is the current iteration number of the algorithm; T is the maximum iteration number; Step S3.2: introducing a third stage, i.e., a disturbance stage, into the original two-stage position update process of the northern hawk; in this stage, the Levy flight disturbance strategy is introduced into the position update process of the northern hawk, and the specific position update formula is as follows: ; ; wherein: is the position of the first i Northern Goshawk; is the new position of the third i Northern Goshawk; is the objective function value of the position of the first i Northern Goshawk before position update; is the objective function value of the position of the third i Northern Goshawk after position update; is the Levy flight perturbation; is the dimension of the problem; is the element-wise multiplication of vectors. Step S3.3: In the third stage, a perturbation factor r and a judgment factor p are introduced; in the iteration process of the algorithm, if , then the iteration needs Levy flight perturbation, otherwise not; r is a random number between 0 and 1 in each iteration, p is a non-linearly decreasing number with the increase of iteration number, and its specific expression is: 。 2.The method of claim 1, wherein the method is characterized by: including step 7: using mean absolute error (MAE), root mean square error (RMSE), mean absolute percentage error (MAPE) and coefficient of determination (R) 2 These four evaluation indexes are used to analyze the error of the prediction results of the model in step 6. 3.The method of claim 1, wherein the method is characterized by: The step 1 comprises the following steps: Step S1.1: decompose the wind speed signal into K a number of intrinsic mode functions IMF with limited bandwidth, and make the sum of the estimated bandwidths of the decomposed K intrinsic mode functions IMF minimum, the constructed variational constraint model is as follows: ; ; wherein: represents the decomposed first K modal component; represents the center frequency of the decomposed first K modal component; is the Dirac function; is the original wind speed signal; represents the convolution operation; represents the current iteration number; represents the analytical signal imaginary part of represents the analytical signal real part of represents time; Step S1.2: To find the optimal solution of the above variational constrained model, a quadratic penalty function and a Lagrange multiplier are introduced, so that the constrained problem is changed into an unconstrained variational problem, and the resulting Lagrangian function is ; where: denotes the Lagrange multiplier; denotes an exponential adjustment factor which acts to modulate the spectrum of each modal function to the corresponding base frequency band.
4. The method of claim 3, wherein the method is based on an INGO-SWGMN hybrid model. Step S1.3: Solve the unconstrained variational problem above using the alternating direction method of multipliers, by alternating updates of , , The optimal solution to the constrained variational problem in step S1.1 is found, yielding final modal components and central frequency respectively: ; ; wherein: , , and denote the Fourier transform of , , and respectively; n is the number of iterations. Step S1.4: Given a precision to determine whether the iteration is stopped , if , the iteration is stopped and the result is output, otherwise go back to step S1.3 to continue the iteration operation, and finally the K modal function components IMFs with different center frequencies can be decomposed.
5. The method of claim 1, wherein the method is based on an INGO-SWGMN hybrid model. In step 2, for one one-dimensional sub-sequence decomposed by VMD The reconstruction result thereof in the multi-dimensional phase space is as follows: ; If the input of the prediction model is X then the corresponding output is: ; In the formula: N Let the reconstruction dimension be the phase space reconstruction matrix. ; h Indicates the prediction step size; and These represent the delay time and the embedding dimension, respectively. They respectively represent the phase space matrix after reconstruction. N A one-dimensional vector; , , They represent the first and second digits of the phase space reconstruction matrix, respectively. i The specific numerical value of the dimensional vector; These represent the output values that should be obtained after inputting each dimension of the vector. 6.The method of claim 1, wherein the method is characterized by: The step 4 comprises the following steps: Step S4.1: initializing the INGO optimization algorithm, setting the population size, the maximum number of iterations and the optimization range of parameters of the northern hawk, and setting the initial learning rate and the number of hidden layer nodes of the SWGMN as two dimensions of the position of the northern hawk in the INGO; Step S4.2: randomly initializing the position of each individual in the population, taking the root mean square error RMSE as the fitness value of the northern hawk individual, and calculating the fitness value of each individual. Step S4.3: updating the position of each northern goshawk, taking the updated position of each northern goshawk as the new initial learning rate and the number of hidden layer nodes of the SWGMN, verifying the SWGMN model based on the new hyperparameters and the validation set data, and calculating the fitness value of each northern goshawk individual under the new parameters; Step S4.4: selecting the northern goshawk individual with the minimum fitness value as the optimal individual in the current iteration number; Step S4.5: determining whether the maximum iteration number is reached, if yes, outputting the position of the optimal individual in this iteration, and taking it as the best hyperparameters of the SWGMN, if not, jumping to step S4.3, and performing the increment operation on the iteration number.
7. The method of claim 6, wherein the method is based on an INGO-SWGMN hybrid model. The step S4.3 specifically includes the following steps: Step S4.3.1: the position updating of the northern goshawk includes three stages, the first stage is the exploration stage, and the specific formula is as follows: ; ; ; In the formula: is the position of the prey for the i th northern goshawk; is the new position of the i th northern goshawk in the j th dimension; is the objective function value of the position of the prey for the i th northern goshawk; is the position of the i th northern goshawk; is the objective function value of the position of the i th northern goshawk before updating; is the new position of the i th northern goshawk in the first stage; is the objective function value of the position of the i th northern goshawk after updating in the first stage; r is a random number in the range of [0, 1]; I is a random integer with a numerical value of 1 or 2; Step S4.3.2: the second stage is the development stage, and the specific formula is as follows: ; ; ; wherein: to improve the hunting radius of the Northern Goshawk; is the current iteration number; is the maximum iteration number; is the new position of the i th Northern Goshawk in the j th dimension in the second stage; is the objective function value of the i th Northern Goshawk's own position after the update in the second stage; Step S4.3.3: the third stage is the perturbation stage, in which the Levy flight perturbation strategy is introduced into the position updating process of the northern goshawk. 8.The method of claim 2, wherein the method is characterized by: In the step 7, the four evaluation indexes specifically include: ; ; ; ; In the formulae: n denotes the number of prediction samples; denotes the actual value of the i th sample; denotes the prediction value of the i th sample; denotes n the average of the actual values of the prediction samples.