Hybrid wind speed prediction method based on weight optimization

By combining LSTM and TCN and dynamically adjusting the weights using the Drosophila optimization algorithm, the problem of insufficient capture of wind speed data characteristics of a single wind speed prediction model is solved, and higher wind speed prediction accuracy and model performance are achieved.

CN119577377APending Publication Date: 2025-03-07HUNAN INSTITUTE OF ENGINEERING
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411667513.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

Existing single wind speed prediction models, such as LSTM and TCN, may have problems with insufficient capture of certain features of wind speed data, affecting the prediction accuracy.

Method used

A hybrid wind speed prediction method based on weight optimization is adopted, combining long and short-term memory network (LSTM) and timing convolutional network (TCN), and the model weight allocation is dynamically adjusted through the Drosophila optimization algorithm (FOA) to improve prediction accuracy.

Benefits of technology

It effectively makes up for the shortcomings of a single algorithm, improves the accuracy of wind speed prediction, and improves the prediction performance of the model through real-time weight optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119577377A_ABST
    Figure CN119577377A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of wind speed prediction methods, and discloses a weight optimization-based hybrid wind speed prediction method, which comprises the following steps of S1, performing time sequence analysis on original wind speed data by adopting a long short-term memory network; s2, performing spatial feature extraction on the original wind speed data by adopting a time sequence convolutional network; s3, dynamically adjusting weight distribution of the long short-term memory network and the time sequence convolution network in final prediction by applying a fruit fly optimization algorithm; and S4, combining prediction results of the long-short-term memory network and the time sequence convolutional network according to weights optimized by the fruit fly optimization algorithm to obtain a final wind speed prediction value, and due to the fact that the long-short-term memory network and the time sequence convolutional network have different capturing capabilities for different features of the wind speed, the method provided by the invention can effectively make up for the deficiency of a single algorithm, and can improve the prediction accuracy of the wind speed. And through fruit fly algorithm weight optimization, real-time updating can be carried out through a prediction effect, and the model prediction performance is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of wind speed prediction methods, and in particular to a hybrid wind speed prediction method based on weight optimization. Background Art

[0002] As a renewable and clean energy, wind energy has the characteristics of wide distribution, economic friendliness, and high power generation potential. However, the randomness and intermittency of wind speed will impact the stability of the power grid and seriously threaten the safe operation of the power grid. Accurate prediction of wind speed can not only improve the accuracy of real-time dispatching of the power grid, but also improve the stability of power grid operation, increase the utilization rate of wind power, and ensure the economic efficiency of energy utilization.

[0003] According to different modeling theories, prediction models can be divided into four types: physical models, traditional statistical models, models based on artificial intelligence (AI), and hybrid models. Physical models such as numerical weather prediction (NWP) and weather researcher forecast (WRF) usually consider various meteorological factors (such as air pressure, humidity, and temperature) to predict future wind speed. Studies have shown that physical models have better performance in medium- and long-term wind speed forecasts, which makes it possible to obtain wind power forecasts using the power curve of wind turbines at given wind speeds.

[0004] Traditional statistical models include autoregressive moving average (ARMA), autoregressive integrated moving average (ARIMA), fractional-ARIMA (f-ARIMA) and Hammerstein autoregressive models. Unlike physical models, these time series models are usually used to characterize the linear fluctuations of wind speed at different locations and usually perform well in ultra-short-term and short-term wind speed forecasts.

[0005] With the advancement of science and technology, AI-based models are also widely used in wind speed forecasting, such as kernel ELM (KELM), fuzzy logic methods, Kalman filtering, and different types of artificial neural networks (ANN). At present, with the development of deep learning technology, deep neural networks (DNNs) including long short-term memory, gated recurrent unit (GRU), bidirectional GRU (BiGRU), deep belief network (DBN) and autoencoder (AE) have attracted more and more attention in wind speed forecasting due to their superior ability to handle complex nonlinear problems. AI models show better wind speed forecasting performance than traditional statistical models.

[0006] Existing models such as long short-term memory network (LSTM) and time series convolution network (TCN) have shown good performance in wind speed prediction. The LSTM model can effectively capture the long-term dependencies in time series data through its unique gating mechanism; while the TCN model can efficiently extract local features of time series data through convolution operations and residual connections. However, when using only LSTM or TCN models for wind speed prediction, there may still be problems with insufficient capture of certain features of wind speed data, thus affecting the prediction accuracy. Based on LSTM, TCN and FOA, a hybrid wind speed prediction method based on weight optimization is proposed. Summary of the invention

[0007] The purpose of the present invention is to provide a hybrid wind speed prediction method based on weight optimization to solve the problems raised in the above background technology.

[0008] To achieve the above object, the present invention provides the following technical solution: a hybrid wind speed prediction method based on weight optimization, comprising the following steps:

[0009] S1. Use long short-term memory network to perform time series analysis on the original wind speed data;

[0010] S2, using temporal convolutional network to extract spatial features from the original wind speed data;

[0011] S3. Apply the fruit fly optimization algorithm to dynamically adjust the weight distribution of the long short-term memory network and the temporal convolutional network in the final prediction;

[0012] S4. Combine the prediction results of the long short-term memory network and the temporal convolutional network according to the weights optimized by the fruit fly optimization algorithm to obtain the final wind speed prediction value.

[0013] Preferably, in the above: in S1, the long short-term memory network adopts a gating mechanism, including an input gate, a forget gate and an output gate;

[0014] The calculation formula of the input gate is:

[0015] i t =σ(W ix x t +W ih h t-1 +b i )

[0016] Among them, x t is the input vector, σ is the gate activation function, h t-1 is the hidden state at time t, W ix is the current input signal parameter matrix, W ih is the input gate hidden layer parameter matrix, b i Adjust parameters for the input gate.

[0017] Preferably, in the above-mentioned input gate, the input signal has two states, 0 and 1, 0 means not processing the current signal, and 1 means calculating the current signal;

[0018] The calculation formula for the input signal 0 state and 1 state is as follows:

[0019]

[0020] Among them, W cx is the current input signal candidate value parameter matrix, W ch is the hidden layer candidate value parameter matrix, b c is the candidate value adjustment parameter (constant), f t is the forget gate value.

[0021] Preferably, the forget gate has two binary signals of different states 0 and 1;

[0022] The state is 0, which means that the forget gate does not move to the target c. t Emit any signal, and state 1 means signal c t-1 Transmitted to target c by forget gate t ;

[0023] The calculation formula of the forget gate is:

[0024] f t =σ(W fx x t +W fh h t-1 +b f )

[0025] Among them, W fx is the current forget gate parameter matrix, W fh is the parameter matrix of the hidden layer of the forget gate, b f Tune parameters for the forget gate.

[0026] Preferably, the above-mentioned final hidden layer calculation formula of the output gate is:

[0027] o t =σ(W ox x t +W oh h t-1 +b o )

[0028] h t =o t tanh(c t )

[0029] Among them, W oxis the current output gate parameter matrix, W oh is the output gate hidden layer parameter matrix, b o Adjust parameters for the output gate.

[0030] Preferably, in the above: in S2, the wind speed data is modeled by causal convolution and residual modules in the temporal convolution network;

[0031] The causal convolution uses x1 to x t t inputs, jointly predict the output at time t;

[0032] The calculation formula of the causal convolution is:

[0033]

[0034] Among them, y(t) is the output at time t, x(k) is the input at time k, and h(tk) is the value of the convolution kernel at time tk.

[0035] Preferably, the calculation formula of the residual module is:

[0036] x l+1 =F(x l ,w l )+x l

[0037] Among them, x l 、x l+1 are the input and output of the lth residual block in the residual module, F is the residual map, and w l is the weight parameter.

[0038] Preferably, in the above: in S3, the fruit fly optimization algorithm includes the following sub-steps:

[0039] S301, initializing the population: randomly generating a group of fruit fly individuals as the initial population;

[0040] S302, evaluating fitness: according to the specific situation of the problem, calculating the fitness of each fruit fly individual, that is, the value of the objective function;

[0041] S303, selecting a moving direction: each fruit fly selects a moving direction according to its own fitness and information of surrounding fruit flies;

[0042] S304, moving the fruit fly: updating the position of each individual fruit fly according to the selected direction;

[0043] S305, updating pheromones: updating pheromones in the environment according to the characteristics of the problem to better guide the search direction of the fruit fly;

[0044] S306, termination condition judgment: check whether the termination condition is met, if so, end; otherwise, return to step S302.

[0045] Preferably, in the above step S4, the calculation formula of the wind speed prediction value is:

[0046] y t =αy t-LSTM +(1-α)y t-TCN

[0047] Among them, y t is the wind speed prediction value of the combined neural network at time t, α is the weight of the long short-term memory network neural network, and 1-α is the weight of the temporal convolutional network neural network.

[0048] Compared with the prior art, the present invention adopts the above technical solution and has the following technical effects:

[0049] 1. The long short-term memory network and the temporal convolutional network have different abilities to capture different features of wind speed. The method proposed in the present invention can effectively make up for the shortcomings of a single algorithm and improve the accuracy of wind speed prediction.

[0050] Second, through the optimization of the fruit fly algorithm weights, the prediction effect can be updated in real time to improve the model prediction performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0052] Figure 1 It is a long short-term memory network structure diagram of the present invention;

[0053] Figure 2 It is a schematic diagram of the convolution structure diagram of the present invention;

[0054] Figure 3 is a structural diagram of the residual module of the present invention;

[0055] Figure 4 A line graph of wind speed data of a wind farm of the present invention;

[0056] Figure 5 A line graph comparing the predicted values ​​and actual values ​​of each model of the present invention;

[0057] Figure 6 It is a line graph of the model weight data of the present invention. DETAILED DESCRIPTION

[0058] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0059] It should be noted that the structures, proportions, sizes, etc. illustrated in the drawings of this specification are only used to match the contents disclosed in the specification for people familiar with this technology to understand and read, and are not used to limit the conditions under which this application can be implemented. Therefore, they have no substantive technical significance. Any structural modification, change in proportional relationship or adjustment of size should still fall within the scope of the technical content disclosed in this application without affecting the effects and purposes that can be achieved by this application.

[0060] Example

[0061] See also Figure 1-6 The present invention provides a technical solution: a hybrid wind speed prediction method based on weight optimization, comprising the following steps:

[0062] S1. Use long short-term memory network to perform time series analysis on the original wind speed data;

[0063] Long short-term memory network (LSTM), temporal convolutional network (TCN), fruit fly optimization algorithm (FOA);

[0064] The LSTM network uses a gating mechanism, including input gate, forget gate, and output gate; Figure 1 This is the structure diagram of the long short-term memory network;

[0065] The calculation formula of the input gate is:

[0066] i t =σ(W ix x t +W ih h t-1 +b i )

[0067] Among them, x t is the input vector, σ is the gate activation function, h t-1 is the hidden state at time t, W ix is the current input signal parameter matrix, W ih is the input gate hidden layer parameter matrix, b i Adjust parameters for the input gate.

[0068] In the input gate, the input signal has two states: 0 and 1. 0 means not processing the current signal, and 1 means calculating the current signal.

[0069] The calculation formula for input signal 0 state and 1 state is as follows:

[0070]

[0071] Among them, W cx is the current input signal candidate value parameter matrix, W ch is the hidden layer candidate value parameter matrix, b c is the candidate value adjustment parameter (constant), f t is the forget gate value.

[0072] The forget gate has two binary signals with different states 0 and 1;

[0073] The state is 0, which means that the forget gate does not move to the target c. t Emit any signal, and state 1 means signal c t-1 Transmitted to target c by forget gate t ;

[0074] The calculation formula of the forget gate is:

[0075] f t =σ(W fx x t +W fh h t-1 +b f )

[0076] Among them, W fx is the current forget gate parameter matrix, W fh is the parameter matrix of the hidden layer of the forget gate, b f Tune parameters for the forget gate.

[0077] The final hidden layer calculation formula of the output gate is:

[0078] o t =σ(W ox x t +W oh h t-1 +b o )

[0079] h t =o t tanh(c t )

[0080] Among them, W ox is the current output gate parameter matrix, W oh is the output gate hidden layer parameter matrix, b o Adjust parameters for the output gate.

[0081] S2, using temporal convolutional network to extract spatial features from the original wind speed data;

[0082] The wind speed data is modeled in the temporal convolutional network through causal convolution and residual modules; Figure 2 It is the convolution structure diagram; Figure 3 is the residual module structure diagram, ReLU() is the residual network activation function;

[0083] The temporal convolutional network adds structures such as causal convolution and residual modules, which can effectively capture the characteristics of temporal data and realize parallel computing, thereby improving computing efficiency.

[0084] Causal convolution uses x1 to x t t inputs, jointly predict the output at time t;

[0085] The calculation formula of causal convolution is:

[0086]

[0087] Among them, y(t) is the output at time t, x(k) is the input at time k, and h(tk) is the value of the convolution kernel at time tk.

[0088] The calculation formula of the residual module is:

[0089] x l+1 =F(x l ,w l )+x l

[0090] Among them, x l 、x l+1 are the input and output of the lth residual block in the residual module, F is the residual map, and w l is the weight parameter.

[0091] Neural networks are prone to gradient vanishing or exploding problems, so residual blocks are introduced to connect the layers of the neural network. Residual blocks contain main connections and cross-layer connections. In the main connection, the input data undergoes a series of nonlinear transformations. The cross-layer connection can directly pass the input data to the subsequent layers. The final output is obtained by superimposing the data after nonlinear transformation and the original data features.

[0092] Cross-layer connections allow the network to transmit information across layers, making it easy for shallow networks to expand to deep networks. At the same time, Dropout and batch normalization are added to prevent model overfitting and speed up training.

[0093] S3. Apply the fruit fly optimization algorithm to dynamically adjust the weight distribution of the long short-term memory network and the temporal convolutional network in the final prediction;

[0094] Wind speed changes quickly and fluctuates strongly. The fruit fly optimization algorithm has good adaptability and fast convergence and can meet the needs of real-time prediction. It can also dynamically adjust the prediction model according to wind speed changes to improve the accuracy and reliability of predictions. The fruit fly optimization algorithm finds the optimal solution by simulating the behavior of fruit fly populations. Based on the concentration of food smell, fruit flies can accurately judge the distance from the food and choose the appropriate direction to move forward. By constantly sensing and evaluating the concentration of smell, fruit flies can efficiently search and locate food sources.

[0095] Figure 6 Optimize the weight data change trend of the weight combination model for the fruit fly optimization algorithm;

[0096] The fruit fly optimization algorithm includes the following sub-steps:

[0097] S301, initializing the population: randomly generating a group of fruit fly individuals as the initial population;

[0098] S302, evaluating fitness: according to the specific situation of the problem, calculating the fitness of each fruit fly individual, that is, the value of the objective function;

[0099] S303, selecting a moving direction: each fruit fly selects a moving direction according to its own fitness and information of surrounding fruit flies;

[0100] S304, moving the fruit fly: updating the position of each individual fruit fly according to the selected direction;

[0101] S305, updating pheromones: updating pheromones in the environment according to the characteristics of the problem to better guide the search direction of the fruit fly;

[0102] S306, termination condition judgment: check whether the termination condition is met, if so, end; otherwise, return to step S302.

[0103] By continuously iterating the above steps, the fruit fly optimization algorithm conducts a global search in a swarm intelligence manner to find the optimal solution. The information exchange and collaboration in the algorithm enable the fruit flies to jointly explore the search space and gradually converge to the global optimal solution during the search process.

[0104] S4. Combine the prediction results of the long short-term memory network and the temporal convolutional network according to the weights optimized by the fruit fly optimization algorithm to obtain the final wind speed prediction value.

[0105] The strong randomness and volatility of wind speed make it more difficult to predict wind speed. In order to better capture the characteristics of wind speed data, the long short-term memory network and the time series convolution network are used to predict the original wind speed respectively to make up for the shortcomings of the single neural network prediction. -LSTMThe LSTM network is set to the wind speed prediction value yt at time t of the LSTM neural network. -TCN The time series convolutional network is set as the wind speed prediction value of the time series convolutional network neural network at time t. In order to combine the prediction results of the two sets of neural networks, the fruit fly optimization algorithm is used to optimize the model weight coefficient;

[0106] The calculation formula for the predicted wind speed is:

[0107] y t =αy t-LSTM +(1-α)y t-TCN

[0108] Among them, y t is the wind speed prediction value of the combined neural network at time t, α is the weight of the long short-term memory network neural network, and 1-α is the weight of the temporal convolutional network neural network.

[0109] A wind farm data set is simulated. The data set has a sampling interval of 10 minutes. 80% and 20% of the data are selected as training data set and test data set respectively in chronological order. Figure 4 This is a line graph of wind speed data for a wind farm.

[0110] Normalization can eliminate the impact of different feature data dimension differences. The normalized value Obtained by the following calculation formula:

[0111]

[0112] Among them, x ik is the actual value of the data, max(xi) and min(xi) are the maximum and minimum values ​​of the column where the data is located;

[0113] The simulation experiment is based on Windows 10 system with 4GB system memory and built with Python 3.8.13 operating environment. For the long short-term memory network, two hidden layers are set, each hidden unit is set to 100, and the batch size is set to 64. For the temporal convolutional network, four convolutional layers are set, the convolution kernel size is set to 5, and the number of filters is set to 64.

[0114] RMSE is sensitive to outliers and can better assess the deviation between the true value and the predicted value compared to MSE. The calculation formula of RMSE is as follows:

[0115]

[0116] MAPE uses the percentage of absolute error to the true value to characterize the prediction effect, provides a relative error evaluation, and is conducive to the comparison between different models. The calculation formula of MAPE is as follows:

[0117]

[0118] Where n is the number of wind speed sampling points, y is the actual wind speed value, is the predicted wind speed;

[0119] We established a long short-term memory network, a temporal convolutional network, an equal weight combination model, and a fruit fly optimization algorithm to optimize the weight combination model, and conducted error analysis and prediction effect comparison. Figure 5 As shown in the figure, the prediction effects of each model are compared. The prediction image of the fruit fly optimization algorithm optimized weight combination model is most consistent with the actual value. To further compare the model performance, the RMSE and MAPE values ​​of each model are calculated. The error comparison results of each model are as follows:

[0120]

[0121] In summary, through experimental analysis, the effect of the model in wind speed prediction is verified:

[0122] (1) The long short-term memory network and the temporal convolutional network have different abilities to capture different features of wind speed. The method proposed in this invention can effectively make up for the shortcomings of a single algorithm and improve the accuracy of wind speed prediction;

[0123] (2) The weight optimization of the fruit fly algorithm can be updated in real time through the prediction effect, thereby improving the model prediction performance.

[0124] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present invention may be combined and / or combined in various ways, even if such combinations and / or combinations are not explicitly described in the present invention. In particular, the features described in the various embodiments and / or claims of the present invention may be combined and / or combined in various ways without departing from the spirit and teachings of the present invention. All of these combinations and / or combinations fall within the scope of the present invention.

Claims

1. A hybrid wind speed prediction method based on weight optimization, characterized in that: The following steps are involved: S1. Use long short-term memory network to perform time series analysis on the original wind speed data; S2, using temporal convolutional network to extract spatial features from the original wind speed data; S3. Apply the fruit fly optimization algorithm to dynamically adjust the weight distribution of the long short-term memory network and the temporal convolutional network in the final prediction; S4. Combine the prediction results of the long short-term memory network and the temporal convolutional network according to the weights optimized by the fruit fly optimization algorithm to obtain the final wind speed prediction value.

2. The hybrid wind speed prediction method based on weight optimization according to claim 1 is characterized in that: In S1, the long short-term memory network adopts a gating mechanism, including an input gate, a forget gate and an output gate; The calculation formula of the input gate is: i t =σ(W ix x t +W ih h t-1 +b i ) Among them, x t is the input vector, σ is the gate activation function, h t-1 is the hidden state at time t, W ix is the current input signal parameter matrix, W ih is the input gate hidden layer parameter matrix, b i Adjust parameters for the input gate.

3. The hybrid wind speed prediction method based on weight optimization according to claim 2 is characterized in that: In the input gate, the input signal has two states, 0 and 1, 0 means not processing the current signal, and 1 means calculating the current signal; The calculation formula for the input signal 0 state and 1 state is as follows: Among them, W cx is the current input signal candidate value parameter matrix, W ch is the hidden layer candidate value parameter matrix, b c is the candidate value adjustment parameter (constant), f t is the forget gate value.

4. The hybrid wind speed prediction method based on weight optimization according to claim 2 is characterized in that: The forget gate has two binary signals of different states 0 and 1; The state is 0, which means that the forget gate does not move to the target c. t Emit any signal, and state 1 means signal c t-1 Transmitted to target c by forget gate t ; The calculation formula of the forget gate is: f t =σ(W fx x t +W fh h t-1 +b f ) Among them, W fx is the current forget gate parameter matrix, W fh is the parameter matrix of the hidden layer of the forget gate, b f Tune parameters for the forget gate.

5. The hybrid wind speed prediction method based on weight optimization according to claim 2 is characterized in that: The final hidden layer calculation formula of the output gate is: o t =σ(W ox x t +W oh h t-1 +b o ) h t =o t fishy t ) Among them, W ox is the current output gate parameter matrix, W oh is the output gate hidden layer parameter matrix, b o Adjust parameters for the output gate.

6. The hybrid wind speed prediction method based on weight optimization according to claim 1, characterized in that: In S2, the wind speed data is modeled in the temporal convolutional network through causal convolution and residual modules; The causal convolution uses x1 to x t t inputs, jointly predict the output at time t; The calculation formula of the causal convolution is: Among them, y(t) is the output at time t, x(k) is the input at time k, and h(tk) is the value of the convolution kernel at time tk.

7. The hybrid wind speed prediction method based on weight optimization according to claim 6 is characterized in that: The calculation formula of the residual module is: x l+1 =F(x l ,w l )+x l Among them, x l 、x l+1 are the input and output of the lth residual block in the residual module, F is the residual map, and w l is the weight parameter.

8. The hybrid wind speed prediction method based on weight optimization according to claim 1, characterized in that: In S3, the fruit fly optimization algorithm includes the following sub-steps: S301, initializing the population: randomly generating a group of fruit fly individuals as the initial population; S302, evaluating fitness: according to the specific situation of the problem, calculating the fitness of each fruit fly individual, that is, the value of the objective function; S303, selecting a moving direction: each fruit fly selects a moving direction according to its own fitness and information of surrounding fruit flies; S304, moving the fruit fly: updating the position of each individual fruit fly according to the selected direction; S305, updating pheromones: updating pheromones in the environment according to the characteristics of the problem to better guide the search direction of the fruit fly; S306, termination condition judgment: check whether the termination condition is met, if so, end; Otherwise, return to step S302.

9. The hybrid wind speed prediction method based on weight optimization according to claim 1, characterized in that: In S4, the calculation formula of the wind speed prediction value is: y t ay t-LSTM +(1-α)y t-TCN Among them, y t is the wind speed prediction value of the combined neural network at time t, α is the weight of the long short-term memory network neural network, and 1-α is the weight of the temporal convolutional network neural network.

Citation Information

Cited By

  • Method for predicting electrical parameters of lightning arrester

    CN120163477A

  • Advertisement putting optimization method, system, equipment and medium

    CN120317932A