Wind power prediction method based on WRF-CFD simulation and attention mechanism architecture model

Through the WRF-CFD simulation and attention mechanism architectural model wind power prediction method, the problem of high calculation cost and insufficient accuracy of stroke power prediction in the prior art is solved, and more efficient and widely applicable wind power prediction is achieved, which significantly improves the Prediction accuracy and comprehensiveness.

CN119168416AActive Publication Date: 2024-12-20CHONGQING UNIV

Patent Information

Application Number
CN202411264240.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2024-12-20
Estimated Expiration
2044-09-10

AI Technical Summary

Technical Problem

The existing wind power prediction methods rely on the output of the WRF model to cause high computational costs and insufficient accuracy, and limited applicability in different situations.

Method used

The wind power prediction method based on WRF-CFD simulation and attention mechanism architecture model is adopted. By collecting wind farm data, RF-VMD-PCA model is established for feature preprocessing, and the error correction model of attention mechanism architecture is used to improve prediction accuracy. Error correction is performed by combining time convolution network and bidirectional long and short-term memory network.

Benefits of technology

It significantly improves the accuracy and comprehensiveness of wind power prediction, reduces the problem of low downscale coupling efficiency, and provides more reliable and widely applicable wind power prediction support, suitable for various situations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119168416A_ABST
    Figure CN119168416A_ABST
Patent Text Reader

Abstract

The invention discloses a wind power prediction method based on WRF-CFD simulation and an attention mechanism architecture model. The method comprises the following steps: 1) collecting information of a wind power plant; 2) using a WRF model to predict output; 3) establishing a CFD micro-scale terrain model, and establishing a database from the wind speed and the wind direction of the anemometer tower to the power of each fan; 4) establishing an RF-VMD-PCA model and carrying out feature pretreatment on the meteorological element data; 5) establishing an error correction model based on an attention mechanism architecture, and correcting the meteorological element data in the step 2); 6) utilizing the wind speed of the anemometer tower corrected in the step 5) and the wind direction data predicted by the WRF model, and combining the CFD database obtained in the step 3) to predict the power of the wind power plant; and 7) performing performance evaluation on the prediction result. According to the scheme, the accuracy of wind power prediction can be remarkably improved by using the wind speed error correction model of the medium-micro scale coupling method and the attention mechanism architecture, so that more reliable support is provided for power grid integration and power dispatching and adjustment.
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 based on WRF-CFD simulation and attention mechanism architecture model. Background Art

[0002] With the widespread application and continuous development of renewable energy, wind energy has been widely used in the field of power generation as a clean and renewable energy. A wind farm is a facility that uses wind turbines (referred to as wind turbines) to convert wind energy into electrical energy. A wind farm generally includes multiple wind turbines, wind towers, towers, converters, control systems, etc. The wind turbine is the core part of a wind farm and usually consists of three main parts: blades, hubs, and generators. The wind tower is mainly used to collect wind energy resource data in the target wind farm. These data are essential for analyzing the wind energy potential of the wind farm, wind turbine selection, layout plans, and annual power generation calculations. However, due to the randomness, volatility, intermittency, and uncertainty of wind power, this poses a major challenge to grid integration, power dispatching, and regulation. Therefore, accurate and reliable wind power forecasting is essential for grid dispatching and energy management.

[0003] Currently, coupling WRF and CFD models is seen as a better way to solve microscale wind farm problems. However, existing methods mainly rely on using WRF output as boundary conditions for downscaling simulations, which leads to a lot of computational costs and time overhead. At the same time, the accuracy and reliability of the WRF model face challenges in terms of model input, parameter selection, and uncertainty. Most of the current research on improving the prediction accuracy of the WRF model is based on complex physical principles. However, it should be noted that these models are built for specific situations, so there may be certain applicability limitations in other situations. Summary of the invention

[0004] In view of the above-mentioned deficiencies in the prior art, the technical problem to be solved by the present invention is: how to provide a wind power prediction method based on WRF-CFD simulation and attention mechanism architecture model that effectively improves the accuracy of wind power prediction and improves the mesoscale WRF prediction wind speed error

[0005] In order to solve the above technical problems, the present invention adopts the following technical solutions:

[0006] A wind power prediction method based on WRF-CFD simulation and attention mechanism architecture model includes the following steps:

[0007] Step 1) Collecting wind farm information, including wind speed, wind direction, wind turbine power, and terrain data;

[0008] Step 2) using the WRF Weather Research and Forecasting Model to predict and output the meteorological element data of the wind farm for the target location of the wind farm;

[0009] Step 3) Based on the terrain data of the target location of the wind farm, the location information of the wind tower and each wind turbine, a CFD micro-scale terrain model of the target location of the wind farm is established, and a CFD wind farm simulation of 16 wind directions is performed. At the same time, a database from the wind speed and wind direction of the wind tower to the power of each wind turbine is established in combination with the power curve of each wind turbine;

[0010] Step 4) establishing an RF-VMD-PCA model, and using the RF-VMD-PCA model to perform feature pre-processing on the meteorological element data predicted in step 2);

[0011] Step 5) establishing an error correction model based on the attention mechanism architecture, using the meteorological element data after feature pre-processing in step 4) as the input of the error correction model to correct the predicted meteorological element data in step 2);

[0012] Step 6) using the wind speed of the wind tower corrected in step 5) and the wind direction data predicted by the WRF model, combined with the CFD database obtained in step 3), to predict the wind farm power;

[0013] Step 7) evaluating the performance of the revised forecast results of the wind speed of the wind tower and the wind farm power.

[0014] Preferably, in step 1), linear interpolation is used to fill in missing and outlier data of wind speed and wind direction of the wind farm;

[0015] For missing and abnormal value data of wind turbine power, linear interpolation of wind speed is performed and then estimated and filled using the wind turbine power curve.

[0016] Preferably, in step 2), the target location of the wind farm is the wind farm's wind tower, and the global forecast system model output is used as the initial boundary condition and lateral boundary condition for the operation of the WRF weather research and forecasting model. The WRF weather research and forecasting model predicts and outputs the meteorological element data of the wind farm for the target location of the wind farm, and the meteorological element data include wind speed, wind direction, air pressure, temperature, and humidity.

[0017] Preferably, in step 3), the simulation input of the CFD micro-scale terrain model is the wind profile of Class B landform, and the Realizable k-ε turbulence model is used. The inlet wind speed at the height of the wind turbine hub is set to 3m / s, 5m / s, 7m / s, 9m / s, 11m / s, 15m / s and 19m / s, respectively, and the wind direction is divided into 16 intervals, each interval is 22.5 degrees, and a total of 112 simulated working conditions are created; the simulation output of the CFD micro-scale terrain model includes the wind speed of the wind tower, the wind direction of the wind tower and the wind speed at the height of each wind turbine hub, and the wind turbine power curve is used to calculate the power of each wind turbine.

[0018] Preferably, step 4) comprises the following steps:

[0019] Step 4.1) Use the random forest algorithm to select meteorological element data closely related to the historical measured wind speed from the meteorological element data predicted by the WRF Weather Research and Forecasting Model as input meteorological element data;

[0020] Step 4.2) Decompose the wind speed error in the input meteorological element data using a variational mode decomposition algorithm to obtain a prediction error subsequence;

[0021] Step 4.3) Use the principal component analysis method to extract the principal components of the prediction error subsequence, enrich the characteristics of the prediction sequence, and complete the feature preprocessing of the meteorological element data.

[0022] Preferably, step 4.1) comprises the following steps:

[0023] Step 4.1.1) randomly extracting subsets from the original meteorological element data by bootstrapping, and creating decision trees based on these subsets to construct a random forest model;

[0024] Step 4.1.2) When constructing each decision tree, the meteorological element data is repeatedly sampled to train the decision tree, and a set amount of meteorological element data is reserved as out-of-bag data OOB. For each decision tree, the out-of-bag error rate ERR of the model is calculated. OOB1 To evaluate the performance of decision trees;

[0025] Step 4.1.3) Randomly add noise interference to the meteorological element data X in the out-of-bag data OOB, and then recalculate the out-of-bag error rate ERR OOB2 ;

[0026] Step 4.1.4) Assume that there are N trees in the random forest, then the importance of each meteorological element data X is imp X It is expressed by the following formula:

[0027] imp X =∑(ERR OOB2 -ERROOB1 ) / N;

[0028] Step 4.1.5) Select the importance imp X Meteorological element data greater than 1.5% are used as input meteorological element data.

[0029] Preferably, step 4.2) includes the following steps:

[0030] Step 4.2.1) Using the VMD constrained variational model, the relevant frequency scales are adaptively determined and the corresponding modal functions are estimated by establishing and solving the variational problem. The VMD constrained variational model is as follows:

[0031]

[0032] Where: k is the total number of modes after decomposition, f is the original signal, u k ={u1,u2,…,u k} are the modal functions, ω k ={ω1,ω2,…,ω k} is the center frequency of each mode, is the partial differential with respect to time t, δ(t) is the Dirac delta function, which usually takes the value of 1 at time 0 and 0 at other times, j is an imaginary unit, and t is time; u k (t) is the variation of the kth mode function with time t, and s is the constraint condition;

[0033] The augmented Lagrangian function is introduced for constrained optimization:

[0034]

[0035] Where: α is the penalty parameter, λ is the Lagrange multiplier, f(t) is the original signal, and λ(t) is the Lagrange multiplier used to introduce constraints;

[0036] Step 4.2.2) Update the modal function u using the alternating direction method of multipliers k , center frequency ω k and the Lagrange multiplier λ:

[0037]

[0038] Where: τ is the noise rate, ω is the frequency, is the estimate of the frequency ω of the kth mode function in the n+1th iteration, f(ω) is the frequency domain of the original signal, is the estimate of the frequency ω of the ith mode function in the n+1th iteration, is the estimate of the Lagrange multiplier for frequency ω in the nth iteration, is the update of the center frequency of the kth mode function at the n+1th iteration, is the frequency domain of the original signal;

[0039] Step 4.2.3) Repeat step 4.2.2) until the modal function u k , center frequency ω k When the accuracy of the Lagrange multiplier λ meets the set conditions, the update is stopped to realize the decomposition of the wind speed error predicted by the WRF Weather Research and Forecasting Model by the variational mode decomposition algorithm;

[0040]

[0041] Where: ε is the tolerance of the convergence criterion. Repeatedly update the mode function, center frequency and Lagrange multiplier until the tolerance ε of the convergence criterion is met and then stop updating. The tolerance indicates the condition for stopping the update;

[0042] Step 4.2.4) decomposes into 12 prediction error subsequences.

[0043] Preferably, step 4.3) includes the following steps:

[0044] Step 4.3.1) Center all samples, that is, each sample x (i) Subtract the mean of the sample set.

[0045] Step 4.3.2) Calculate the sample covariance matrix XX T ;

[0046] Step 4.3.3) For the covariance matrix XX T Perform eigenvalue decomposition;

[0047] Step 4.3.4) Determine the number of principal components n′ after dimensionality reduction. By setting the weight threshold t∈(0,1], the number of principal components is determined according to the weight of the eigenvalues. For example, if n eigenvalues ​​are λ1≥λ2≥…≥λ n , then n′ is determined as follows:

[0048]

[0049] Step 4.3.5) Obtain the eigenvectors (w1, w2, …, w n′ ), and normalize it to form the eigenvector matrix W;

[0050] Step 4.3.6) For each sample x in the sample set (i) , perform the following transformation:

[0051] z (i) =W T x (i)

[0052] The sample set D′ after dimensionality reduction is obtained (1) ,z (2) ,…,z (m) );

[0053] Where: W T is the transpose of the eigenvector matrix W;

[0054] Step 4.3.7) Take the principal components of the first five error subsequences from the sample set D′ after dimensionality reduction as the input features of the subsequent error correction model.

[0055] Preferably, in step 5), a TCN-SENet-BiLSTM-GAM error correction model based on the attention mechanism architecture is established, which specifically includes the following steps:

[0056] Step 5.1) Use a series of temporal convolutional layers of the temporal convolutional network (TCN) to capture sequence patterns at different time scales, and introduce the channel attention mechanism SENet module into the output of the temporal convolutional network (TCN) to adaptively adjust the weights of channel features, which helps to extract spatial features related to the predicted target in multi-feature sequences;

[0057] Step 5.2) The forward and backward models of the sequence are simultaneously performed through the bidirectional long short-term memory network BiLSTM to capture the dependencies in the sequence. At the same time, the global attention mechanism GAM is applied to weight the output of the bidirectional long short-term memory network BiLSTM to extract the global time domain features related to the prediction target in the multi-feature sequence;

[0058] Step 5.3) stacks and fuses the spatial features and global time domain features extracted in steps 5.1) and 5.2), and then these fused features are passed to the fully connected layer for processing, thereby completing the construction of the TCN-SENet-BiLSTM-GAM error correction model.

[0059] Step 5.4) All the features after feature pre-processing in step 4) are used as the input of the TCN-SENet-BiLSTM-GAM error correction model to obtain the WRF error subsequence after variational mode decomposition, which are added to obtain the prediction error of the WRF Weather Research and Forecasting Model, and combined with the prediction data of the WRF Weather Research and Forecasting Model to reversely correct the prediction error of the WRF Weather Research and Forecasting Model.

[0060] Preferably, in step 7), the root mean square error RMSE, the mean absolute error MAE and the mean absolute percentage error MAPE are used as performance evaluation indicators to evaluate the error-corrected results of the wind speed of the wind tower and the wind farm power prediction results. The calculation formulas of these indicators are as follows:

[0061]

[0062]

[0063] Where: N represents the number of samples, y i represents the true value at the i-th moment, Represents the predicted value at the i-th moment.

[0064] Compared with the prior art, the present invention has the following advantages:

[0065] 1. The method of coupling WRF-CFD simulation in this scheme comprehensively considers atmospheric dynamics and fluid mechanics phenomena, which can more comprehensively describe the situation of wind farms and improve the comprehensiveness and reliability of predictions. At the same time, the mesoscale and microscale simulation method proposed effectively solves the problem of low downscaling coupling efficiency and improves the efficiency and practicality of the prediction model.

[0066] 2. Compared with relying solely on physical principles, prediction errors are inevitable in wind energy forecasting. This solution improves the prediction accuracy of the mesoscale WRF model by combining machine learning methods. This method has wide applicability and can provide reliable and accurate wind power forecasting support in various scenarios.

[0067] 3. This scheme realizes efficient feature pre-processing of meteorological element data through the RF-VMD-PCA model combined with multiple algorithms such as random forest, variational mode decomposition and principal component analysis. It selects meteorological element data closely related to the historical measured wind speed from the meteorological element data predicted by the WRF Weather Research and Forecasting Model, and extracts the principal components of the prediction error subsequence, thereby fully enriching the characteristics of the prediction sequence and effectively improving the accuracy and comprehensiveness of the prediction model.

[0068] 4. The error correction model based on the attention mechanism architecture of this scheme is based on the temporal convolutional network TCN and the bidirectional long short-term memory network BiLSTM, combined with the channel attention mechanism SENet and the global attention mechanism Global Attention. It can comprehensively model the spatiotemporal characteristics of multi-feature sequences and realize efficient processing of complex sequence data. Its adaptive feature weight adjustment and comprehensive feature fusion enable the model to pay more attention to important features related to the prediction target, and fully integrate the information of different features in the prediction model, thereby improving the model's perception ability, prediction effect and accuracy.

[0069] 5. This scheme can significantly improve the accuracy of wind power prediction by utilizing the meso-microscale coupling method and the wind speed error correction model with the attention mechanism architecture, thereby providing more reliable support for grid integration, power dispatching and regulation. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] Attached Figure 1 It is a flow chart of a wind power prediction method based on WRF-CFD simulation and attention mechanism architecture model of the present invention;

[0071] Attached Figure 2 The wind tower location, altitude and model domain range of the wind farm in the wind power prediction method based on WRF-CFD simulation and attention mechanism architecture model of the present invention;

[0072] Attached Figure 3 It is an error correction model based on the attention mechanism TCN-SENet-BiLSTM-GAM in the wind power prediction method based on WRF-CFD simulation and attention mechanism architecture model of the present invention. DETAILED DESCRIPTION

[0073] In order to make the purpose, technical scheme and advantages of the embodiments of the present invention clearer, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work belong to the scope of protection of the present invention.

[0074] It should be noted that similar numbers and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings. In the description of the present invention, it should be noted that the orientation or position relationship indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inside", "outside", etc. is based on the orientation or position relationship shown in the drawings, or the orientation or position relationship in which the invention product is usually placed when used, which is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present invention. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance. In addition, the terms "horizontal", "vertical", etc. do not mean that the components are absolutely horizontal or suspended, but can be slightly tilted. For example, "horizontal" only means that its direction is more horizontal than "vertical", and does not mean that the structure must be completely horizontal, but can be slightly tilted. In the description of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0075] As attached Figure 1 As shown, a wind power prediction method based on WRF-CFD simulation and attention mechanism architecture model includes the following steps:

[0076] Step 1) Collect wind farm information, including wind speed, wind direction, wind turbine power, and terrain data; specifically, linear interpolation is used to fill in missing and abnormal value data of wind speed and wind direction of the wind farm; for missing and abnormal value data of wind turbine power, after linear interpolation of wind speed is filled, it is estimated and filled by wind turbine power curve.

[0077] Step 2) Use the WRF Weather Research and Forecasting model to predict and output the meteorological element data of the wind farm for the target location of the wind farm; the target location of the wind farm is the wind tower of the wind farm, and the global forecast system model output is used as the initial boundary condition and lateral boundary condition for the operation of the WRF Weather Research and Forecasting model. The WRF Weather Research and Forecasting model predicts and outputs the meteorological element data of the wind farm for the target location of the wind farm, and the meteorological element data include wind speed, wind direction, air pressure, temperature, and humidity.

[0078] Specifically, the WRF Weather Research and Forecast Model uses three layers of nesting, as shown in the attached Figure 2 As shown, D01 has 121×121 grid points and a horizontal resolution of 3 km, while D02 and D03 have 1 km (109×109 grid points) and 333 m (91×91 grid points), respectively. Table 1 shows the detailed information of the physical parameterization scheme of the WRF Weather Research and Forecasting Model.

[0079] Table 1: WRF Weather Research and Forecasting Model model physics options

[0080]

[0081] The GFS (Global Numerical Weather Forecast Model) cycle is initialized at 12:00 UTC, with 30 hours of daily GFS forecast (all time zones below are provided in UTC format), excluding the first 6 hours of model startup time, and the simulation time is from February 4 to March 4, 2023, with a resolution of 15 minutes. Meteorological elements are extracted from the innermost area of ​​WRF, including 16 parameters, sea level pressure (PRES), total radiation (RAD), precipitation every 15 minutes (PRE_15), surface pressure (PRS) and air pressure at 70m (P_70), relative humidity at 70m and 2m (RH_70, RH_2), temperature at 70m and 2m (T_70, T_2), dew point temperature at 2m (D_2), wind direction and wind speed at 10m (WD_10, WS_10), and longitudinal and latitudinal winds at 70m (U_70, V_70), wind speed (WS_70) and wind direction (WD_70).

[0082] Step 3) According to the terrain data of the target location of the wind farm, the location information of the wind tower and each wind turbine, a CFD micro-scale terrain model of the target location of the wind farm is established, and a CFD wind field simulation of 16 wind directions is performed. At the same time, a database from the wind speed and wind direction of the wind tower to the power of each wind turbine is established in combination with the power curve of each wind turbine; specifically, the simulation input of the CFD micro-scale terrain model is the wind profile of Class B landform (the wind shear coefficient obtained by fitting the wind speed at different heights of the historically measured wind tower and wind turbine is 0.15), and Realizable In the k-ε turbulence model, the inlet wind speed at the hub height of the fan is set to 3m / s, 5m / s, 7m / s, 9m / s, 11m / s, 15m / s and 19m / s, respectively. The wind direction is divided into 16 intervals, each with 22.5 degrees, namely 0-22.5°, 22.5-45°, 45-67.5°, 67.5-90°, 90-112.5°, 112.5-135°, 135-157.5°, 157 .5~180°, 202.5~225°, 225~247.5°, 247.5~270°, 270~292.5°, 292.5~315°, 315~337.5°, and 337.5~360°, creating a total of 112 simulation conditions; the simulation output of the CFD micro-scale terrain model includes the wind speed of the wind tower, the wind direction of the wind tower and the wind speed at the hub height of each wind turbine, and the wind turbine power curve is used to calculate the power of each wind turbine.

[0083] Specifically, the CFD simulation results include the wind speed and wind direction information at 70m of the wind tower, as well as the wind speed at the hub height of the 13 wind turbines in the wind farm. The power generation of the 13 wind turbines is calculated using the wind turbine factory power curve. After obtaining the correlation between the wind speed at the wind tower and the wind turbine power generation under different wind directions, a database of wind speed at 70m of the wind tower, wind direction at 70m of the wind tower, and wind turbine power generation is established. In this database, the step sizes of wind speed and wind direction of the wind tower are 0.1 and 1, respectively, and the data are obtained by linear interpolation.

[0084] Step 4) establishing an RF-VMD-PCA model (RVP), and using the RF-VMD-PCA model to perform feature pre-processing on the 16 meteorological element data predicted in step 2);

[0085] Step 4.1) Use the Random Forest (RF) algorithm to select meteorological element data closely related to the historical measured wind speed from the meteorological element data predicted by the WRF Weather Research and Forecasting Model as input meteorological element data;

[0086] Step 4.1.1) randomly extract subsets from the original meteorological element data by bootstrapping, and create decision trees based on these subsets to build a random forest model;

[0087] Step 4.1.2) When constructing each decision tree, the meteorological element data is repeatedly sampled to train the decision tree, and a set amount of meteorological element data is reserved as out-of-bag data OOB. For each decision tree, the out-of-bag error rate ERR of the model is calculated. OOB1 To evaluate the performance of decision trees;

[0088] Step 4.1.3) Randomly add noise interference to the meteorological element data X in the out-of-bag data OOB, and then recalculate the out-of-bag error rate ERR OOB2 ;

[0089] Step 4.1.4) Assume that there are N trees in the random forest, then the importance of each meteorological element data X is imp X It is expressed by the following formula:

[0090] imp X =∑(ERr OOB2 -ERR OOB1 ) / N;

[0091] Step 4.1.5) Select the importance imp X Meteorological element data greater than 1.5% are used as input meteorological element data.

[0092] Step 4.2) Decompose the wind speed error in the input meteorological element data using the variational mode decomposition (VMD) algorithm to obtain a prediction error subsequence;

[0093] Step 4.2.1) Using the VMD constrained variational model, the relevant frequency scales are adaptively determined and the corresponding modal functions are estimated by establishing and solving the variational problem. The VMD constrained variational model is as follows:

[0094]

[0095] Where: k is the total number of modes after decomposition, f is the original signal, u k ={u1,u2,…,u k} are the modal functions, ω k ={ω1,ω2,…,ω k} is the center frequency of each mode, is the partial differential with respect to time t, δ(t) is the Dirac delta function, which usually takes the value of 1 at time 0 and 0 at other times, j is an imaginary unit, and t is time; u k (t) is the variation of the kth mode function with time t, and s is the constraint condition;

[0096] Aiming to transform the constrained problem into an unconstrained variational problem, the augmented Lagrangian function is introduced to solve the constrained optimization problem, as shown below:

[0097]

[0098] Where: α is the penalty parameter, λ is the Lagrange multiplier, f(t) is the original signal, and λ(t) is the Lagrange multiplier used to introduce constraints;

[0099] Step 4.2.2) Update the modal function u using the alternating direction method of multipliers k , center frequency ω k and the Lagrange multiplier λ:

[0100]

[0101] Where: τ is the noise rate, ω is the frequency, is the estimate of the frequency ω of the kth mode function in the n+1th iteration, f(ω) is the frequency domain of the original signal, is the estimate of the frequency ω of the ith mode function in the n+1th iteration, is the estimate of the Lagrange multiplier for frequency ω in the nth iteration, is the update of the center frequency of the kth mode function at the n+1th iteration, is the frequency domain of the original signal;

[0102] Step 4.2.3) Repeat step 4.2.2) until the modal function u k , center frequency ω k When the accuracy of the Lagrange multiplier λ meets the set conditions, the update is stopped to realize the decomposition of the wind speed and wind direction errors predicted by the WRF Weather Research and Forecasting Model by the variational mode decomposition algorithm;

[0103]

[0104] Where: ε is the tolerance of the convergence criterion;

[0105] Step 4.2.4) decomposes the resulting 12 prediction error subsequences, which are used as subsequent input features.

[0106] Step 4.3) Use the principal component analysis method (PCA) to extract the principal components of the prediction error subsequence, enrich the characteristics of the prediction sequence, and complete the feature preprocessing of the meteorological element data.

[0107] Step 4.3.1) Center all samples, that is, each sample x (i) Subtract the mean of the sample set.

[0108] Step 4.3.2) Calculate the sample covariance matrix XX T ;

[0109] Step 4.3.3) For the covariance matrix XX T Perform eigenvalue decomposition;

[0110] Step 4.3.4) Determine the number of principal components n′ after dimensionality reduction. By setting the weight threshold t∈(0,1], the number of principal components is determined according to the weight of the eigenvalues. For example, if n eigenvalues ​​are λ1≥λ2≥…≥λ n , then n′ is determined as follows:

[0111]

[0112] Step 4.3.5) Obtain the eigenvectors (w1, w2, …, w n′ ), and normalize it to form the eigenvector matrix W;

[0113] Step 4.3.6) For each sample x in the sample set (i) , perform the following transformation:

[0114] z (i) =W t x (i)

[0115] The sample set D′ after dimensionality reduction is obtained (1) ,z (2) ,…,z (m) );

[0116] Where: W T is the transpose of the eigenvector matrix W;

[0117] Step 4.3.7) Take the principal components of the first five error subsequences from the sample set D′ after dimensionality reduction as the input features of the subsequent error correction model.

[0118] Step 5) Establish a TCN-SENet-BiLSTM-GAM error correction model based on the attention mechanism architecture, as shown in the attached Figure 3 As shown, the meteorological element data after feature pre-processing in step 4) is used as the input of the error correction model to correct the predicted meteorological element data in step 2).

[0119] Step 5.1) Use a series of temporal convolutional layers of the temporal convolutional network (TCN) to capture sequence patterns at different time scales, and introduce the channel attention mechanism SENet module into the output of the temporal convolutional network (TCN) to adaptively adjust the weights of channel features, which helps to extract spatial features related to the predicted target in multi-feature sequences;

[0120] Step 5.2) The forward and backward models of the sequence are simultaneously performed through the bidirectional long short-term memory network BiLSTM to capture the dependencies in the sequence. At the same time, the global attention mechanism GAM is applied to weight the output of the bidirectional long short-term memory network BiLSTM, so that the model focuses on the most important part of the sequence, improves the model's perception of the time domain features of the multi-feature sequence, and extracts the global time domain features related to the prediction target in the multi-feature sequence;

[0121] Step 5.3) The spatial features and global time domain features extracted in step 5.1) and step 5.2) are stacked and fused. Subsequently, these fused features are passed to the fully connected layer for processing, thereby completing the construction of the TCN-SENet-BiLSTM-GAM error correction model to achieve a more accurate model prediction effect;

[0122] Step 5.4) All the features after feature pre-processing in step 4) are used as the input of the TCN-SENet-BiLSTM-GAM error correction model to obtain the WRF error subsequence after VMD decomposition, which are added to obtain the prediction error of the WRF Weather Research and Forecasting Model, and combined with the prediction data of the WRF Weather Research and Forecasting Model to reversely correct the prediction error of the WRF Weather Research and Forecasting Model.

[0123] Step 6) using the wind speed of the wind tower corrected in step 5) and the wind direction data predicted by WRF, combined with the CFD database obtained in step 3), to predict the wind farm power;

[0124] Step 7) evaluating the performance of the revised forecast results of the wind speed of the wind tower and the wind farm power.

[0125] In step 7), the root mean square error RMSE, mean absolute error MAE and mean absolute percentage error MAPE are used as performance evaluation indicators to evaluate the error-corrected results of the wind speed of the wind tower and the wind farm power prediction results. The calculation formulas of these indicators are as follows:

[0126]

[0127] Where: N represents the number of samples, y i represents the true value at the i-th moment, Represents the predicted value at the i-th moment.

[0128] Tables 2 and 3 show the performance comparison results of different models for wind speed and power prediction, respectively. Compared with directly using the WRF model output, the proposed wind speed correction model performs well in wind speed prediction and power prediction. For example, during the test, the wind speed prediction performance of the RVP-TCN-SENet-BiLSTM-GAM model was better than that of the WRF model, with root mean square error (RMSE), mean absolute error (MAE) and mean absolute percentage error (MAPE) of 0.91m / s, 0.74m / s and 14.18% respectively, which were 0.61m / s, 0.48m / s and 8.24% lower than those of the WRF model; the power prediction of the RVP-TCN-SENet-BiLSTM-GAM-CFD model also performed well, with root mean square error (RMSE), mean absolute error (MAE) and mean absolute percentage error (MAPE) of 6.64MW, 5.19MW and 55.17% respectively, which were 4.29MW, 3.51MW and 25.47% lower than those of the WRF model. This shows that the proposed wind speed correction and meso-microscale WRF-CFD coupling strategy significantly improves the accuracy of wind farm power prediction.

[0129] Table 2: Comparison of wind speed prediction performance of different models

[0130]

[0131]

[0132] Table 3: Comparison of power prediction performance of different models

[0133]

[0134] This embodiment aims to improve the accuracy of wind power prediction. The micro wind farm is simulated by introducing the mesoscale WRF-CFD coupling method, and the error correction of the original WRF predicted wind speed is performed. First, the meteorological data at the location of the wind tower is obtained by using the Weather Research and Forecasting WRF model, and the wind speed prediction accuracy is statistically analyzed. Then, the RF-VMD-PCA (RVP) model is introduced to perform feature preprocessing on the meteorological data. Then, a TCN-SENet-BiLSTM-GAM error correction model with an attention mechanism architecture is established to correct the error of the original WRF predicted wind speed. Finally, the wind farm in the study area is simulated at a microscale using the CFD model, and a database from the wind speed and wind direction at the wind tower location to the wind turbine power is established. The corrected WRF wind speed is used as a database input for power prediction of the entire wind farm. The experimental results show that the error correction algorithm significantly improves the wind speed prediction accuracy, and after correction, the accuracy of the ultra-short-term wind power prediction is also significantly improved. At the same time, the mesoscale WRF-CFD coupling method also significantly improves the accuracy of power prediction.

[0135] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit the technical solution. Those skilled in the art should understand that those modifications or equivalent substitutions of the technical solution of the present invention that do not depart from the purpose and scope of the technical solution should be included in the scope of the claims of the present invention.

Claims

1. A wind power prediction method based on WRF-CFD simulation and attention mechanism architecture model, characterized in that: The following steps are involved: Step 1) Collecting wind farm information, including wind speed, wind direction, wind turbine power, and terrain data; Step 2) using the WRF Weather Research and Forecasting Model to predict and output the meteorological element data of the wind farm for the target location of the wind farm; Step 3) Based on the terrain data of the target location of the wind farm, the location information of the wind tower and each wind turbine, a CFD micro-scale terrain model of the target location of the wind farm is established, and a CFD wind farm simulation of 16 wind directions is performed. At the same time, a database from the wind speed and wind direction of the wind tower to the power of each wind turbine is established in combination with the power curve of each wind turbine; Step 4) establishing an RF-VMD-PCA model, and using the RF-VMD-PCA model to perform feature pre-processing on the meteorological element data predicted in step 2); Step 5) establishing an error correction model based on the attention mechanism architecture, using the meteorological element data after feature pre-processing in step 4) as the input of the error correction model to correct the predicted meteorological element data in step 2); Step 6) using the wind speed of the wind tower corrected in step 5) and the wind direction data predicted by the WRF model, combined with the CFD database obtained in step 3), to predict the wind farm power; Step 7) evaluating the performance of the revised forecast results of the wind speed of the wind tower and the wind farm power.

2. The wind power prediction method based on WRF-CFD simulation and attention mechanism architecture model according to claim 1 is characterized in that: In step 1), linear interpolation is used to fill in the missing and outlier data of wind speed and wind direction of the wind farm; For missing and abnormal value data of wind turbine power, linear interpolation of wind speed is performed and then estimated and filled using the wind turbine power curve.

3. The wind power prediction method based on WRF-CFD simulation and attention mechanism architecture model according to claim 1 is characterized in that: In step 2), the target location of the wind farm is the wind farm's wind tower, and the global forecast system model output is used as the initial boundary condition and lateral boundary condition for the operation of the WRF Weather Research and Forecasting Model. The WRF Weather Research and Forecasting Model predicts and outputs the meteorological element data of the wind farm for the target location of the wind farm. The meteorological element data include wind speed, wind direction, air pressure, temperature, and humidity.

4. The wind power prediction method based on WRF-CFD simulation and attention mechanism architecture model according to claim 1, characterized in that: In step 3), the simulation input of the CFD micro-scale terrain model is the wind profile of Class B landform. The Realizable k-ε turbulence model is used. The inlet wind speed at the hub height of the wind turbine is set to 3m / s, 5m / s, 7m / s, 9m / s, 11m / s, 15m / s and 19m / s, respectively. The wind direction is divided into 16 intervals, each with 22.5 degrees, and a total of 112 simulation conditions are created; the simulation output of the CFD micro-scale terrain model includes the wind speed of the wind tower, the wind direction of the wind tower and the wind speed at the hub height of each wind turbine, and the power of each wind turbine is calculated using the wind turbine power curve.

5. The wind power prediction method based on WRF-CFD simulation and attention mechanism architecture model according to claim 1, characterized in that: Step 4) includes the following steps: Step 4.1) Use the random forest algorithm to select meteorological element data closely related to the historical measured wind speed from the meteorological element data predicted by the WRF Weather Research and Forecasting Model as input meteorological element data; Step 4.2) Decompose the wind speed error in the input meteorological element data using a variational mode decomposition algorithm to obtain a prediction error subsequence; Step 4.3) Use the principal component analysis method to extract the principal components of the prediction error subsequence, enrich the characteristics of the prediction sequence, and complete the feature preprocessing of the meteorological element data.

6. The wind power prediction method based on WRF-CFD simulation and attention mechanism architecture model according to claim 5 is characterized in that: Step 4.1) includes the following steps: Step 4.1.1) randomly extracting subsets from the original meteorological element data by bootstrapping, and creating decision trees based on these subsets to construct a random forest model; Step 4.1.2) When constructing each decision tree, the meteorological element data is repeatedly sampled to train the decision tree, and a set amount of meteorological element data is reserved as out-of-bag data OOB. For each decision tree, the out-of-bag error rate ERR of the random forest model is calculated. OOB1 To evaluate the performance of decision trees; Step 4.1.3) Randomly add noise interference to the meteorological element data X in the out-of-bag data OOB, and then recalculate the out-of-bag error rate ERR OOB2 ; Step 4.1.4) Assume that there are N trees in the random forest, then the importance of each meteorological element data X is imp X It is expressed by the following formula: imp X =∑(ERR OOB2 -ERR OOB1 ) / N; Step 4.1.5) Select the importance imp X Meteorological element data greater than 1.5% are used as input meteorological element data.

7. The wind power prediction method based on WRF-CFD simulation and attention mechanism architecture model according to claim 5, characterized in that: Step 4.2) includes the following steps: Step 4.2.1) Using the VMD constrained variational model, the relevant frequency scales are adaptively determined and the corresponding modal functions are estimated by establishing and solving the variational problem. The VMD constrained variational model is as follows: Where: k is the total number of modes after decomposition, f is the original signal, u k ={u1,u2,…,u k } are the modal functions, ω k ={ω1,ω2,…,ω k } is the center frequency of each mode, is the partial differential with respect to time t, δ(t) is the Dirac delta function, which usually takes the value of 1 at time 0 and 0 at other times, j is an imaginary unit, and t is time; u k (t) is the variation of the kth mode function with time t, and s is the constraint condition; The augmented Lagrangian function is introduced for constrained optimization: Where: α is the penalty parameter, λ is the Lagrange multiplier, f(t) is the original signal, and λ(t) is the Lagrange multiplier used to introduce constraints; Step 4.2.2) Update the modal function u using the alternating direction method of multipliers k , center frequency ω k and the Lagrange multiplier λ: Where: τ is the noise rate, ω is the frequency, is the estimate of the frequency ω of the kth mode function in the n+1th iteration, f(ω) is the frequency domain of the original signal, is the estimate of the frequency ω of the ith mode function in the n+1th iteration, is the estimate of the Lagrange multiplier for frequency ω in the nth iteration, is the update of the center frequency of the kth mode function at the n+1th iteration, is the signal component in the frequency domain of the original signal; Step 4.2.3) Repeat step 4.2.2) until the modal function u k , center frequency ω k When the accuracy of the Lagrange multiplier λ meets the set conditions, the update is stopped to realize the decomposition of the wind speed error predicted by the WRF Weather Research and Forecasting Model by the variational mode decomposition algorithm; Where: ε is the tolerance of the convergence criterion; Step 4.2.4) decomposes into 12 prediction error subsequences.

8. The wind power prediction method based on WRF-CFD simulation and attention mechanism architecture model according to claim 5 is characterized in that: Step 4.3) includes the following steps: Step 4.3.1) Center all samples, that is, each sample x (i) Subtract the mean of the sample set; Step 4.3.2) Calculate the sample covariance matrix XX T ; Step 4.3.3) For the covariance matrix XX T Perform eigenvalue decomposition; Step 4.3.4) Determine the number of principal components n′ after dimensionality reduction. By setting the weight threshold t∈(0,1], the number of principal components is determined according to the weight of the eigenvalues. For example, if n eigenvalues ​​are λ1≥λ2≥…≥λ n , then n′ is determined as follows: Step 4.3.5) Obtain the eigenvectors (w1, w2, …, w n′ ), and normalize it to form the eigenvector matrix W; Step 4.3.6) For each sample x in the sample set (i) , perform the following transformation: z (i) =W T x (i) The sample set D′ after dimensionality reduction is obtained (1) ,z (2) ,…,z (m) ); Where: W T is the transpose of the eigenvector matrix W; Step 4.3.7) Take the principal components of the first five error subsequences from the sample set D′ after dimensionality reduction as the input features of the subsequent error correction model.

9. The wind power prediction method based on WRF-CFD simulation and attention mechanism architecture model according to claim 1, characterized in that: In step 5), a TCN-SENet-BiLSTM-GAM error correction model based on the attention mechanism architecture is established, which specifically includes the following steps: Step 5.1) Use a series of temporal convolutional layers of the temporal convolutional network (TCN) to capture sequence patterns at different time scales, and introduce the channel attention mechanism SENet module into the output of the temporal convolutional network (TCN) to adaptively adjust the weights of channel features, which helps to extract spatial features related to the predicted target in multi-feature sequences; Step 5.2) The forward and backward models of the sequence are simultaneously performed through the bidirectional long short-term memory network BiLSTM to capture the dependencies in the sequence. At the same time, the global attention mechanism GAM is applied to weight the output of the bidirectional long short-term memory network BiLSTM to extract the global time domain features related to the prediction target in the multi-feature sequence; Step 5.3) stacks and fuses the spatial features and global time domain features extracted in steps 5.1) and 5.2), and then these fused features are passed to the fully connected layer for processing, thereby completing the construction of the TCN-SENet-BiLSTM-GAM error correction model. Step 5.4) All the features after feature pre-processing in step 4) are used as the input of the TCN-SENet-BiLSTM-GAM error correction model to obtain the WRF error subsequence after variational mode decomposition, which are added to obtain the prediction error of the WRF Weather Research and Forecasting Model, and combined with the prediction data of the WRF Weather Research and Forecasting Model to reversely correct the prediction error of the WRF Weather Research and Forecasting Model.

10. The wind power prediction method based on WRF-CFD simulation and attention mechanism architecture model according to claim 1, characterized in that: In step 7), the root mean square error RMSE, mean absolute error MAE and mean absolute percentage error MAPE are used as performance evaluation indicators to evaluate the error-corrected results of the wind speed of the wind tower and the wind farm power prediction results. The calculation formulas of these indicators are as follows: Where: N represents the number of samples, y i represents the true value at the i-th moment, Represents the predicted value at the i-th moment.

Citation Information

Patent Citations

  • Photovoltaic power generation prediction method based on Gaussian modeling attention mechanism and LSTM

    CN117293818A

  • Ultra-short-term wind power prediction method and system based on low-wind-speed power correction

    CN117424229A

  • Prediction error distribution estimation method for frequency modulation potential of wind turbines

    WO2022021470A1

Cited By

  • Mesoscale-microscale dynamics-based wind power prediction method and system

    CN120145873A

  • Wind power prediction method and device, computer equipment and storage medium

    CN120433202A

  • Wind power prediction method and device, computer device and storage medium

    CN120433202B