Wind power prediction method

By combining the dung beetle optimization algorithm and the LSTM model, adding an attention mechanism and optimizing the wind power prediction model, the problem of low wind power prediction accuracy in the existing technology has been solved, more efficient wind power prediction and load prediction have been achieved, and power generation has been improved. System stability and resource allocation efficiency.

CN118676907AInactive Publication Date: 2024-09-20SHANGHAI DIANJI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410762115.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-13
Publication Date
2024-09-20
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing wind power prediction models have limitations in the use of a single model, resulting in low accuracy of prediction results and affecting the stability of the power system and resource allocation efficiency.

Method used

The dung beetle optimization algorithm is combined with the LSTM model, and the attention mechanism is added to optimize the wind power prediction model. The parameters are optimized through the dung beetle optimization algorithm and input into the LSTM-Attention model for wind power prediction.

Benefits of technology

It improves the accuracy and stability of wind power prediction, enables multi-variable versus single-variable load prediction on the basis of ensuring the timing of historical load data, provides more accurate theoretical guidance, and improves the operational stability and economic efficiency of the power system. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118676907A
    Figure CN118676907A
Patent Text Reader

Abstract

The invention discloses a wind power prediction method. The wind power prediction method comprises the following steps: S1, collecting actually measured power data of a wind power plant; s2, preprocessing the collected data, and building a wind power prediction model; and S3, optimizing the wind power prediction model by using a dung beetle optimization algorithm and an LSTM model, and adding an attention mechanism to obtain a wind power prediction result. The method can effectively solve the problem that an existing method is not high in prediction result precision, a beneficial theoretical guidance reference can be provided for daily work and arrangement of a power system, in addition, the stability of historical load data can be improved on the basis that the time sequence of the historical load data is guaranteed through the model established through the scheme, meanwhile, input characteristic variables are screened, and the prediction accuracy is improved. And carrying out multivariate-to-univariate load prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of wind power prediction, and in particular to a wind power prediction method. Background Art

[0002] Wind energy has great potential in renewable energy, but the access to large-scale wind power also brings some challenges. First, the randomness and instability of wind power may cause fluctuations in the operating point of the power system, which in turn affects the stability of voltage and frequency. In extreme cases, it may also cause wind power grid disconnection accidents, which poses a great hidden danger to the safety of the power system. However, by accurately predicting wind power, these problems can be effectively alleviated, the allocation of power resources can be optimized, and the stability and economic efficiency of the power grid can be improved.

[0003] After searching, the Chinese patent with announcement number CN109167387A discloses a method for predicting wind power in a wind farm, which proposes a method for constructing a wind farm power prediction model and further evaluating the technical solution for the accuracy of wind farm power prediction;

[0004] The Chinese patent with announcement number CN109523077B discloses a wind power prediction method, which proposes a technical solution to predict the future wind power range by acquiring wind power data of wind farms and using neural network optimization;

[0005] However, in the existing wind power prediction model optimization methods, a single model often has usage limitations. Therefore, a wind power prediction method is urgently needed. Summary of the invention

[0006] The purpose of the present invention is to solve the defects in the prior art and to propose a wind power prediction method.

[0007] In order to achieve the above object, the present invention adopts the following technical solutions:

[0008] A wind power prediction method comprises the following steps:

[0009] Step S1: collecting measured power data of the wind farm;

[0010] Step S2: pre-processing the collected data and building a wind power prediction model;

[0011] Step S3: Use the dung beetle optimization algorithm and LSTM model to optimize the wind power prediction model, and add the attention mechanism to obtain the wind power prediction result.

[0012] Furthermore, in the dung beetle optimization algorithm, the steps are as follows:

[0013] Step 1: Initialize the population and parameters;

[0014] Step 2: Classify the population into dung beetle rolling, dung beetle breeding, dung beetle foraging, and dung beetle stealing;

[0015] Step 3: Update individual positions and population optimal positions;

[0016] Step 4: Calculate the objective function and determine whether the iteration conditions are met. If not, repeat steps 2-4. If met, output the optimal and optimal values.

[0017] Furthermore, the position is updated using the dung beetle rolling ball method, wherein:

[0018] When there are no obstacles in the dung beetle's rolling path, the position update formula when the dung beetle rolls the ball is:

[0019]

[0020]

[0021] in is the position of the i-th dung beetle at the t-th iteration, k∈(0,0.02] is the deflection coefficient, α is -1 or 1, b∈(0,1) is a random number, Δx is used to simulate the change of sunlight intensity, x worst represents the worst performing position in the dung beetle population;

[0022] When facing an obstacle, the tangent function is used to imitate the dancing behavior of the dung beetle to reposition its direction. The position update method is:

[0023]

[0024] Where tan(ω) is the deflection angle.

[0025] Furthermore, in step S3, the optimal solution and optimal value output by the dung beetle optimization algorithm are input into the LSTM-Attention model, where:

[0026] The model training is completed by inputting the training set into the LSTM-Attention with optimized parameters;

[0027] By inputting the test set into the trained model, the test set output is obtained;

[0028] The mean absolute error, root mean square error, mean absolute percentage error and determination coefficient are used as the basis for evaluating the performance of the model to determine the prediction performance of the model.

[0029] Compared with the prior art, the present invention has the following beneficial effects:

[0030] It can effectively solve the problem of low prediction accuracy of existing methods and provide useful theoretical guidance for the daily work and arrangement of the power system. In addition, the model established by this application scheme can improve the stability of historical load data while ensuring its time series, and at the same time screen the input characteristic variables to perform multi-variable load prediction for a single variable. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.

[0032] Figure 1 A schematic diagram of the implementation logic of wind power prediction in an embodiment of the present invention;

[0033] Figure 2 This is a schematic diagram of the prediction results of the BP model in an embodiment of the present invention;

[0034] Figure 3 This is a schematic diagram of the prediction results of the CNN model in an embodiment of the present invention;

[0035] Figure 4 This is a schematic diagram of the prediction results of the LSTM model in an embodiment of the present invention;

[0036] Figure 5 It is a schematic diagram of prediction results of the wind power prediction model in an embodiment of the present invention. DETAILED DESCRIPTION

[0037] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.

[0038] Reference Figure 1 , the wind power prediction method comprises the following steps:

[0039] Step S1: collecting measured power data of the wind farm;

[0040] Step S2: pre-processing the collected data and building a wind power prediction model;

[0041] Step S3: Use the dung beetle optimization algorithm and LSTM model to optimize the wind power prediction model, and add the attention mechanism to obtain the wind power prediction result.

[0042] In this embodiment, the optimal solution and optimal value output by the dung beetle optimization algorithm are input into the LSTM-Attention model to obtain the test set output and evaluation index.

[0043] Step 3 The specific steps are as follows:

[0044] Step 1: Initialize the dung beetle swarm and DBO algorithm parameters, and calculate the fitness value according to the objective function;

[0045] Step 2: Update the positions of the rolling dung beetle, breeding dung beetle, small dung beetle and stealing dung beetle, and determine whether each dung beetle is outside the boundary;

[0046] Step 3: Calculate the fitness value of each dung beetle, and update it if the current search position is better than the previous one;

[0047] Step 4: Update the current optimal solution and its fitness value;

[0048] Step 5: Repeat the above steps until t meets the termination condition, and output the global optimal solution and optimal value;

[0049] Step 6: Input the training set data into the LSTM-Attention model to complete model training;

[0050] Step 7: Input the trained model into the test set to obtain the test set output and evaluation indicators.

[0051] In a specific embodiment of the present application, in the dung beetle optimization algorithm, the steps are as follows:

[0052] Step 1: Initialize the population and parameters;

[0053] Step 2: Classify the population into dung beetle rolling, dung beetle breeding, dung beetle foraging, and dung beetle stealing;

[0054] Step 3: Update individual positions and population optimal positions;

[0055] Step 4: Calculate the objective function and determine whether the iteration conditions are met. If not, repeat steps 2-4. If met, output the optimal and optimal values.

[0056] As a preferred embodiment of the present application, the position is updated by using a dung beetle rolling ball method, wherein:

[0057] When there are no obstacles in the dung beetle's rolling path, the position update formula when the dung beetle rolls the ball is:

[0058]

[0059]

[0060] in is the position of the i-th dung beetle at the t-th iteration, k∈(0,0.02] is the deflection coefficient, α is -1 or 1, b∈(0,1) is a random number, Δx is used to simulate the change of sunlight intensity, x worstrepresents the worst performing position in the dung beetle population;

[0061] When facing an obstacle, the tangent function is used to imitate the dancing behavior of the dung beetle to reposition its direction. The position update method is:

[0062]

[0063] Where tan(ω) is the deflection angle.

[0064] In this example, for dung beetle reproduction:

[0065] The boundary selection strategy is

[0066]

[0067] in is the best position of the current population, Lb represents the lower bound of the search space, Ub represents the upper bound of the search space, and Lb * ,Ub * are the lower and upper bounds of the spawning area, and the inertia weight T is the maximum number of iterations, where the position of the egg ball will be adjusted continuously according to the iteration process.

[0068]

[0069] in is the position of the i-th egg ball at the t-th iteration, b1 and b2 are two independent random vectors of 1×D, and D is the dimension of the optimization problem.

[0070] For dung beetles foraging:

[0071] The optimal foraging area is

[0072]

[0073] in is the global optimal position, Lb l ,Ub l are the lower and upper bounds of the optimal foraging area. After the area is determined, the position update method of the dung beetle is defined as

[0074]

[0075] in represents the position of the i-th dung beetle at the t-th iteration, C1 is a random number following the normal distribution, and C2 is a random number belonging to (0,1).

[0076] For dung beetle stealing:

[0077] The position of the stealing dung beetle is updated as

[0078]

[0079] in is the position of the i-th stealing dung beetle at the t-th iteration, g is a 1×D random vector following a normal distribution, and S is a constant.

[0080] In step S3, by combining these characteristics of LSTM with wind power sequence analysis, a more accurate and reliable wind speed prediction model is constructed, providing strong support for the utilization of wind energy resources and the operation and management of wind farms.

[0081] The gate structure function of LSTM is described as follows:

[0082] (1) Input gate: determines which new input information should be stored in the cell state in the current time step. Its mathematical model is:

[0083] f t =σ(W f ·[h t-1 ,x t ]+b f )(9)

[0084] (2) Forget gate: Determine which old cell state information should be forgotten, that is, deleted from memory. Its mathematical model is:

[0085] i t =σ(W i ·[h t-1 ,x t ]+b i )(10)

[0086]

[0087] Before outputting, the updated information is determined and it is decided which information of the old state should be discarded, namely:

[0088]

[0089] (3) Output gate: controls how the information in the cell state is used to calculate the output of the current time step. Its mathematical model is:

[0090] o t =σ(W o ·[h t-1 ,x t ]+b o )(13)

[0091] h t =o t *tanh(C t ) (14)

[0092] Where f t 、i t , o t are the outputs of the forget gate, input gate, and output gate respectively. σ and tanh are activation functions with values ​​between [0,1]. t is the input at time t, h t is the output at time t, C t is the cell state at time t, W and b are parameter matrices.

[0093] An attention mechanism is also added to this model, and its calculation process is shown in formula (15).

[0094]

[0095] Where: Q is the query vector; K is the key vector; V is the value vector; d k is the dimension of K vector; softmax is the normalization function.

[0096] In order to better understand the technical solution of the present application, further explanation is given below with reference to examples.

[0097] A 200MW power plant in Northwest China was selected as the research object in January 2019, and the data collection frequency was once every 15 minutes, covering the entire month.

[0098] Four evaluation indicators are used to measure the model performance: mean absolute error (MAE), root mean square error (RMSE), mean absolute percentage error (MAPE) and coefficient of determination (R 2 );

[0099] in:

[0100] MAE calculates the average of the absolute values ​​of the differences between the predicted values ​​and the actual values, reflecting the average level of error;

[0101] RMSE is based on the average of the squared errors and takes the square root to measure the magnitude of the forecast fluctuations.

[0102] MAPE measures the average percentage of forecast error relative to the actual value, reflecting the relative error;

[0103] R 2 It indicates the degree to which the model explains the variability of the data. The closer the value is to 1, the better the model fit is. These indicators jointly evaluate the accuracy and fit of the model. The lower the MAE, RMSE and MAPE, the better the R 2 The closer it is to 1, the better the model performance is. The calculation formula is:

[0104]

[0105]

[0106]

[0107]

[0108] Where y j is the jth true value; is the jth predicted value, is the j-th mean; N is the number of samples.

[0109] The specific results are shown in Table 1, where the error distribution is shown in Figure 2-5 .

[0110] RMSE MAE MAPE <![CDATA[R 2 ]]> BP 4.2695 3.5162 0.0994 0.6974 CNN 4.6797 3.9453 0.1316 0.6365 LSTM 4.2524 3.5109 0.1159 0.6998 DBO-NGO-LSTM 4.0729 2.1159 0.0581 0.9831

[0111] Table 1

[0112] According to the experimental results, the prediction performance evaluation indexes of the DBO-LSTM-Attention coupling model are MAE 2.1159, MAPE 0.0581, and RMSE 4.0729, which are all lower than those of the other three models. The DBO-LSTM-Attention coupling model has good overall simulation effect, high accuracy, and the best overall performance. This fully demonstrates the feasibility and effectiveness of introducing the DBO algorithm based on the LSTM model.

[0113] From the above, it can be seen that compared with single prediction models such as BP, LSTM, and CNN, the DBO-LSTM-Attention model has a good prediction effect because it has a more sensitive perception of non-stationary and nonlinear load data in the time domain. At the same time, it is more sufficient in capturing the potential information between the input feature variables of historical load data and the feature variables, and can more efficiently fit the input and output. Therefore, the prediction performance of this model is better.

[0114] The combined model constructed in this application can improve the stability of historical load data on the basis of ensuring its time series, and at the same time screen the input characteristic variables to perform multi-variable load forecasting on a single variable. It can be seen that the combined model forecasting has more satisfactory results than the single forecasting model.

[0115] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A wind power prediction method, characterized in that: The following steps are involved: Step S1: collecting measured power data of the wind farm; Step S2: pre-processing the collected data and building a wind power prediction model; Step S3: Use the dung beetle optimization algorithm and LSTM model to optimize the wind power prediction model, and add the attention mechanism to obtain the wind power prediction result.

2. The wind power prediction method according to claim 1, characterized in that: In the dung beetle optimization algorithm, the steps are as follows: Step 1: Initialize the population and parameters; Step 2: Classify the population into dung beetle rolling, dung beetle breeding, dung beetle foraging, and dung beetle stealing; Step 3: Update individual positions and population optimal positions; Step 4: Calculate the objective function and determine whether the iteration conditions are met. If not, repeat steps 2-4. If met, output the optimal and optimal values.

3. The wind power prediction method according to claim 2, characterized in that: The position is updated using the dung beetle rolling ball method, where: When there are no obstacles in the dung beetle's rolling path, the position update formula when the dung beetle rolls the ball is: in is the position of the i-th dung beetle at the t-th iteration, k∈(0,0.02] is the deflection coefficient, α is -1 or 1, b∈(0,1) is a random number, Δx is used to simulate the change of sunlight intensity, x worst represents the worst performing position in the dung beetle population; When facing an obstacle, the tangent function is used to imitate the dancing behavior of the dung beetle to reposition its direction. The position update method is: Where tan(ω) is the deflection angle.

4. The wind power prediction method according to claim 3, characterized in that: In step S3, the optimal solution and optimal value output by the dung beetle optimization algorithm are input into the LSTM-Attention model, where: The model training is completed by inputting the training set into the LSTM-Attention with optimized parameters; By inputting the test set into the trained model, the test set output is obtained; The mean absolute error, root mean square error, mean absolute percentage error and determination coefficient were used as the basis for evaluating the performance of the model to determine the prediction performance of the model.