A wind farm power prediction method based on data distribution fitting

By constructing a wind farm power prediction method based on data distribution fitting, and utilizing the PINN neural network and triple attention mechanism, the problems of low prediction accuracy and response lag under the scenario of sudden wind speed gradient are solved, and high-precision wind farm power prediction is achieved.

CN120657723BActive Publication Date: 2026-04-21INNER MONGOLIA UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INNER MONGOLIA UNIV OF TECH
Filing Date
2025-05-20
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing wind farm power prediction technologies have low prediction accuracy in scenarios with abrupt changes in wind speed gradients, and the model prediction response is lagging. Traditional methods cannot accurately capture the nonlinear and non-stationary characteristics of wind farm power generation.

Method used

A data distribution-based fitting method is adopted. By constructing a PINN neural network and introducing a bidirectional GRU layer, combined with a triple attention mechanism and a dynamic gradient weighting strategy, the mixture Gaussian distribution of wind turbine power generation is fitted, and the loss function is optimized to improve prediction accuracy.

Benefits of technology

It significantly improves the accuracy of wind farm power prediction and ultra-short-term prediction precision, especially during periods of sudden wind speed changes, reducing prediction errors and enhancing the dynamic feature representation of wind turbine characteristic data and the model's response capability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120657723B_ABST
    Figure CN120657723B_ABST
Patent Text Reader

Abstract

This invention provides a wind farm power prediction method based on data distribution fitting. When constructing a weighted triple attention mechanism bidirectional GRU neural network model, the method first estimates the mixture Gaussian distribution of the fitting error using maximum likelihood estimation. The error distribution parameter θ is then embedded into the error loss function of the PINN neural network model, enabling the PINN model to simultaneously learn data patterns and error distribution characteristics. This solves the problem of mismatch between distribution assumptions and actual wind farm data characteristics in traditional methods, improving the accuracy of wind farm power prediction. Then, the output layer of the triple attention mechanism model is connected to the bidirectional GRU layer of the PINN neural network. Based on triple attention-bidirectional GRU dynamic feature selection, dynamic feature enhancement of the input wind turbine characteristic data is achieved. The wind farm power prediction accuracy using the weighted triple attention mechanism bidirectional GRU neural network model constructed in this invention is high, and it solves the problem of model response lag during sudden wind speed changes in traditional methods.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of wind farm power prediction technology, specifically relating to a wind farm power prediction method based on data distribution fitting. Background Technology

[0002] With the widespread application of renewable energy, wind power, as a clean and sustainable energy source, has significantly increased its share in the power system. However, the intermittency and strong randomness of wind power result in significant non-stationary and nonlinear characteristics in its power generation, posing a severe challenge to the frequency stability, reliability, and economic operation of the power grid. Against this backdrop, high-precision wind power prediction (WPP) technology has become a core component in ensuring the safe operation of the power grid.

[0003] Currently, traditional power generation prediction methods are mainly divided into the following three categories, but all of them have technical limitations:

[0004] 1. Physical Model Approach: Based on Computational Fluid Dynamics (CFD) and meteorological principles. Traditional physical models rely on meteorological data and require high-precision parameters such as atmospheric density and terrain roughness. However, the spatial resolution of actual meteorological sensor networks is limited, leading to the accumulation of boundary condition input errors. Furthermore, in scenarios with abrupt changes in wind speed gradients, traditional physical models (Reynolds-averaged Navier-Stokes) cannot accurately understand turbulence effects, resulting in biased power predictions.

[0005] 2. Statistical modeling methods (such as Kalman filtering) assume that power generation data follows a linear stationary distribution. However, the actual power generation sequence exhibits significant non-Gaussian characteristics (right-skewed kurtosis, multimodal distribution), leading to a serious discrepancy between model assumptions and actual data characteristics. Furthermore, when wind speed changes abruptly, the Weibull distribution parameters in the statistical model drift, causing a lag in the response of statistical models trained on historical data.

[0006] 3. Intelligent learning methods utilize deep learning models (such as LSTM and CNN) to capture the nonlinear relationships in data, but they suffer from the vanishing gradient problem. Specifically, when the input sequence length exceeds 50 time steps, the memory decay rate of LSTM units for early wind speed features exceeds 60%, significantly affecting the accuracy of ultra-short-term predictions. Furthermore, the traditional mean squared error loss function (MSE) cannot constrain the shape of the error distribution, resulting in the inability to effectively suppress outlier predictions. Summary of the Invention

[0007] The purpose of this invention is to address the shortcomings of existing wind farm power prediction technologies, such as low prediction accuracy and lag in model prediction response during sudden changes in wind speed gradients, and to provide a wind farm power prediction method based on data distribution fitting.

[0008] To achieve the above objectives, the technical solution provided by this invention is:

[0009] A wind farm power prediction method based on data distribution fitting includes the following steps:

[0010] Step 1: Obtain historical sample data of the wind farm and perform data preprocessing. The historical sample data includes the power generation of all wind turbines in the entire wind farm and the corresponding characteristic data; wherein, the characteristic data includes wind speed, temperature and air pressure.

[0011] Step 2: Set the basic mean squared error loss function, construct the initial model of the PINN neural network and train it; use the wind turbine feature data obtained in Step 1 as input data to make predictions, and output the predicted power generation value and power generation prediction error for each wind turbine.

[0012] The PINN neural network is equipped with a bidirectional GRU layer;

[0013] The basic mean square error loss function is used to collect the wind turbine power generation prediction error.

[0014] Step 3: Determine the distribution fitting loss function, and weight the distribution fitting loss function with the basic mean squared error loss function to obtain the total loss function. Replace and update the basic mean squared error loss function of the initial PINN neural network model constructed in Step 2 with the total loss function; including the following sub-steps:

[0015] Step 3.1: Determine the optimal distribution and obtain the probability density function P(ε) of the power generation prediction error of each wind turbine on the optimal distribution using the least squares method; the optimal distribution is a Gaussian mixture distribution;

[0016] Step 3.2: Obtain the parameter values ​​P(ε|θ) of the probability density function of all wind turbines on the optimal distribution using the maximization function method:

[0017]

[0018] In the formula, L(θ|ε) is the maximization function, θ is the error distribution parameter, and n is the number of data points for each feature;

[0019] Step 3.3: Introduce the energy function E(x; θ) and the partition function Z(θ) into the parameter value P(ε|θ) to determine the probability distribution of the wind turbine power generation prediction error, then obtain... Z(θ)=∫e -E(x;θ) dx;

[0020] Wherein, the energy function E(x; θ) is the negative logarithmic form of the optimal distribution; the partition function Z(θ) is the global integral of the energy function, obtained through sampling;

[0021] Step 3.4: Fit the distribution to the loss function L E With the basic mean square error loss function L S The total loss function L is obtained by weighting, and the basic mean square error loss function described in step 2 is replaced with the total loss function.

[0022] The weighted calculation formula is:

[0023]

[0024] In the formula, This indicates that the power generation distribution error of the wind turbine takes the expected value under the optimal distribution;

[0025] λ is the dynamic weighting coefficient of the loss function, which is adjusted according to the KL divergence in the following formula:

[0026] λ(t)=σ(a·D KL (P(ε|θ)||P s ));

[0027] In the formula, σ is the Sigmoid function; a is the sensitivity coefficient; D KL The KL divergence is used to measure the actual distribution of the wind turbine power generation prediction error P. s The difference from P(ε|θ);

[0028] Step 4: Construct a triple attention mechanism model. This model is used to process the input wind turbine feature data using a triple attention mechanism, and outputs a refined triple attention weighted tensor.

[0029] The fine triple attention weighted tensor To reconstruct the wind turbine feature data, and to ensure that the reconstructed wind turbine feature data maintains the same shape C×H×W as the input wind turbine feature data, where C represents the number of feature channels, H represents the time series step size, and W represents the spatial dimension;

[0030] Step 5: Connect the output layer of the triple attention mechanism model to the bidirectional GRU layer of the PINN neural network model updated in Step 3 to obtain the fine-grained triple attention weighted tensor output by the triple attention mechanism model. The input is fed into the bidirectional GRU layer of the PINN neural network model to obtain a bidirectional GRU neural network model with a weighted triple attention mechanism;

[0031] Step 6: Use the wind farm sample data obtained in Step 1 to train the bidirectional GRU neural network model with the weighted triple attention mechanism. Update the model parameters during the training process and perform gradient updates at each time step.

[0032] Step 7: Use the bidirectional GRU neural network model with the weighted triple attention mechanism trained in Step 6 to predict wind farm power.

[0033] Furthermore, the data preprocessing in step 1 includes handling missing and outlier values.

[0034] Furthermore, step 2 includes the following sub-steps:

[0035] Step 2.1: Construct the initial model of the PINN neural network: Determine the dimension of the input feature channels, set up a bidirectional GRU layer, and add a basic mean squared error loss function;

[0036] Step 2.2: In the historical sample data of the wind farm obtained in Step 1, select the feature data of the wind turbine and the power generation data according to the set ratio to train the initial model of the PINN neural network, and retain the model parameters after iterating until the mean square error of the basic loss function is stable and unchanged.

[0037] Step 2.3: Input the feature data of all wind turbines obtained in Step 1 into the PINN neural network model trained in Step 2.2 to obtain the predicted power generation value and power generation prediction error of all wind turbines.

[0038] Furthermore, in step 3.1, the process of determining the optimal distribution as a Gaussian mixture distribution is as follows:

[0039] First, the power generation prediction error of each wind turbine obtained in step 2 is fitted according to different distribution methods to obtain the power generation error fitting distribution function;

[0040] The distribution patterns include normal distribution, exponential distribution, uniform distribution, gamma distribution, beta distribution, lognormal distribution, chi-square distribution, minimum Weibull distribution, t distribution, F distribution, Cauchy distribution, Laplace distribution, Rayleigh distribution, Pareto distribution, right-skewed Gumbel distribution, logistic distribution, Irish distribution, power-law distribution, Nakamura distribution, beta prime distribution, and Gaussian mixture distribution.

[0041] Then, the p-values ​​were calculated by performing the KS test under different distributions, and the Gaussian mixture distribution with the highest p-value was taken as the optimal distribution.

[0042] Furthermore, in step 3.3, the partition function Z(θ) is obtained through Monte Carlo importance sampling:

[0043]

[0044] In the formula, q represents the number of sampling points.

[0045] Furthermore, in step 6, gradient updates are performed at each time step during training in the following manner:

[0046]

[0047] In the formula: L(θ) represents all model parameters in a bidirectional GRU neural network model with a weighted triple attention mechanism at time step t, and all parameters are updated after each iteration; t ) is the loss function; λ is the dynamic weight coefficient of the loss function; η is the learning rate; m is the gradient of the loss function with respect to the error distribution parameter θ at time step t; t is the first moment estimate after bias correction, represents the exponentially weighted average of the gradient; l is a minimal constant to prevent the denominator from being zero in the formula, with a value of 0.01;

[0048] v t For the second moment estimate, β1 represents the exponentially weighted average of the squared gradients; β1 is the decay rate of the first moment, ranging from (0,1), used to control the influence of momentum; 1-β1 t β2 is the deviation correction term; β2 is the decay rate of the second moment, with a value range of (0,1), used to control the effect of the squared gradient.

[0049] The advantages of this invention are:

[0050] 1. In the method of the present invention, the mixture Gaussian distribution of the fitting error is estimated by maximum likelihood estimation, and the distribution parameter θ is embedded into the error loss function of the PINN neural network model. This enables the PINN neural network model to learn both the data patterns and error distribution characteristics at the same time, solving the problem of mismatch between the distribution assumptions and the actual data characteristics of wind farms in traditional methods, and improving the accuracy of wind farm power prediction.

[0051] 2. In the method of the present invention, based on triple attention-bidirectional GRU dynamic feature selection, a rotation tensor is introduced in the channel-space dimension. After compressing redundant information through Z-Pool, attention weights are calculated using a branch with a convolution kernel size of k=3. During periods of sudden wind speed changes, this mechanism can increase the local feature weights from time step t-10 to t+5, while reducing the weights to below 0.2 during stable periods, thereby achieving dynamic feature enhancement of wind turbine feature data.

[0052] 3. In the method of this invention, a gradient weighting strategy with dynamic distribution awareness is adopted. Based on the traditional Adam optimizer, the error distribution parameter θ is introduced as a dynamic adjustment factor for momentum decay rates β1 and β2, realizing real-time adjustment of momentum decay rates. This enables the constructed neural network model to reduce the weight of historical gradients (β1 decreases) when the error distribution changes drastically, and to prioritize responding to the current gradient information. This significantly improves the accuracy of ultra-short-term prediction and solves the problem that the momentum decay rates β1 and β2 of traditional optimizers (such as Adam) are fixed hyperparameters, which makes them unable to adapt to the non-stationarity of power generation prediction errors (such as the broadening of error distribution when wind speed changes suddenly).

[0053] 4. In the method of this invention, when determining the total loss function, an online automatic method for determining the weight coefficient λ of the loss function is designed.

[0054] An adaptive mechanism automatically increases the weight of the loss function when the power generation error distribution deviates from the set benchmark, forces the model to correct the distribution parameters, optimizes the wind turbine prediction power error distribution, ensures the absolute accuracy of the prediction value, and avoids overfitting the distribution while ignoring point prediction performance. Attached Figure Description

[0055] Figure 1 This is a flowchart of the bidirectional GRU neural network model with a weighted triple attention mechanism constructed in this invention for predicting wind farm power;

[0056] Figure 2 This is the bidirectional GRU layer configuration in the PINN neural network constructed in this invention;

[0057] Figure 3 This is a graph showing the variation of the fitting degree of the mixture Gaussian distribution with the number of groups in an embodiment of the present invention. The left graph shows the p-values ​​of the KS test corresponding to different group scores; the right graph shows the quantification values ​​of the Akaike Information Criterion corresponding to different group scores.

[0058] Figure 4 This is a diagram of a triple attention mechanism model;

[0059] Figure 5 This is a graph showing the change in the attention weight of the H channel in an embodiment of the present invention;

[0060] Figure 6 This is a comparison chart of the power prediction results based on the method of this invention during the wind speed change period in this embodiment of the invention and the prediction results of various traditional methods;

[0061] Figure 7 This is a comparison diagram of the power prediction error distribution of the method of the present invention and the power prediction error distribution of the initial model of the PINN neural network. Detailed Implementation

[0062] The embodiments of the present invention are described in detail below. These embodiments are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.

[0063] Reference Figure 1 This embodiment provides a wind farm power prediction method based on data distribution fitting, including the following steps:

[0064] Step 1: Obtain the power generation and characteristic data (n records for each of the N wind turbines in the entire wind farm) and preprocess them, including handling missing values ​​and outliers, to obtain the characteristic data set X = (x1, x2, ... x...). i ...x s And the power generation Y = (y1, y2...y) n ); where x i =(x i1 ,x i2 ,...x in ) T Where s is the number of feature dimensions, including wind speed, temperature, air pressure, etc., and n is the number of data points for each feature.

[0065] In this embodiment, meteorological and power data from a wind farm from January to December 2019 are used for prediction. Feature data includes: wind speed at 10m, 30m, 50m, and 70m of the wind measuring tower, wind speed at hub height, wind direction at 10m, 30m, 50m, and 70m of the wind measuring tower, wind direction at hub height, temperature, air pressure, and humidity. It should be noted that wind speed is in m / s and air pressure is in hPa. The target variable is the wind turbine output power, in kW. The sampling interval is 15 minutes, with a total of 35,041 data points.

[0066] The example was conducted on a Dell workstation, using Python 3.9 as the programming language, and the data was preprocessed using the TensorFlow library before being input into the initial PINN neural network.

[0067] Twenty wind power data points were randomly selected for outlier cleaning and normalization.

[0068] Step 2: Set the basic mean squared error loss function, construct the initial PINN neural network model and train it; use the wind turbine feature data obtained in Step 1 as input data for prediction, and output the predicted power generation value and power generation prediction error for each wind turbine. Specifically, this includes the following sub-steps:

[0069] Step 2.1: Construct the initial model of the PINN neural network: Determine the number of dimensions of the input features, which is equal to the number of feature dimensions s. Set up two bidirectional GRU layers, each with 256 neurons. The bidirectional GRU layers are as follows: Figure 2 As shown. The output layer consists of one neuron, used to output the predicted power generation. L2 regularization is added to prevent overfitting; the basic mean squared error loss function L is set. S It is used to collect the difference between predicted and actual power generation. The input data of the PINN neural network is a three-dimensional tensor χ∈R. C×H×W Where: C represents the number of feature channels, H represents the time series step size, and W represents the spatial dimension.

[0070] Specifically, in the PINN neural network model, the batch size is set to 512, the test set ratio is 0.15, the neuron inactivation rate is set to 0.3, and the fully connected layer dimension is set to 512. The Adam optimizer is used, with an initial learning rate η = 0.01.

[0071] Step 2.2: Randomly select 20% of the historical wind farm sample data obtained in Step 1 (including feature data and corresponding power generation) to train the initial model of the PINN neural network. Through continuous training, the PINN neural network model gradually acquires the ability to generate approximate results. After 200 iterations, the mean square error of the basic loss function stabilizes at 10. -5 The surrounding area remains unchanged; retain the model parameters and determine the model structure. Save the PINN neural network model as an h5 file in the TensorFlow environment.

[0072] Step 2.3: Input the historical feature data of all wind turbines in the wind farm obtained in Step 1 into the PINN neural network model trained in Step 2.2 to predict the power generation of all wind turbines, and output the predicted power generation value of all wind turbines, denoted as Y. 测 =(y 测1 ,y 测2 ...y 测n And obtain the power generation prediction error ε={ε1,ε2,...,ε n The discharge power error is calculated using the following formula.

[0073] ε=|YY 测 |

[0074] Where Y is the power generation capacity of the wind turbine obtained in step 1.

[0075] Specifically, in this embodiment, the PINN neural network model is used to predict the remaining 80% of the wind power sample data to obtain the predicted wind turbine power generation value. The absolute difference between the predicted value and the actual value is used as the calculation error ε={ε1,ε2,...,ε n}

[0076] Step 3: Use the optimal distribution to determine the distribution fitting loss function, and then weight the distribution fitting loss function with the basic mean squared error loss function to obtain the total loss function. Replace the basic mean squared error loss function in the initial PINN neural network model with the total loss function. This specifically includes the following steps:

[0077] Step 3.1: Use the maximum likelihood estimation method to estimate the power generation error ε1, ε2, ..., ε of all wind turbines in the wind farm obtained in Step 2.3. n Distribution fitting is performed, and the fitted distributions include normal distribution, exponential distribution, uniform distribution, gamma distribution, beta distribution, log-normal distribution, chi-square distribution, minimum Weibull distribution, t-distribution, F-distribution, Cauchy distribution, Laplace distribution, Rayleigh distribution, Pareto distribution, right-skewed Gumbel distribution, logistic distribution, Irish distribution, power-law distribution, Nakamura distribution, beta prime distribution, and Gaussian mixture distribution. KS tests are performed on all fitted distributions, and p-values ​​are calculated. The p-value reflects the similarity between the sample data and the specified fitted distribution. The distribution with the highest p-value is determined as the optimal distribution F.

[0078] Reference Figure 3 According to KS testing, Figure 3 This describes the fitting of the Gaussian density mixture model to the validation and torque margin under different component fractions. Figure 3 As shown in the left-middle figure, when the number of groups reaches 7, the p-value of the Gaussian mixture distribution is close to 0.6, while the p-values ​​of other distributions are all much less than 0.05. This indicates that the Gaussian mixture distribution fits the observed data better. The right-middle figure also shows a significant decrease in the AIC value. However, due to the multimodal nature of the group numbers, the Gaussian mixture distribution is determined to be the optimal distribution.

[0079] The probability density function P(ε) of the data on the optimal distribution is obtained by using the least squares method.

[0080] Step 3.2: Obtain the parameter value of the probability density distribution function P(ε) of each wind turbine on the optimal distribution using the following formula, denoted as P(ε|θ), where θ is the error distribution parameter.

[0081]

[0082] In the formula, L(θ|ε) is the maximization function, θ is the error distribution parameter, and n is the number of data points for each feature.

[0083] Step 3.3: Define the energy function E(x; θ) as the negative logarithmic form of the optimal distribution, used to quantify the likelihood of the power generation error ε. Define the partition function Z(θ) as the global integral of the energy function. When the power generation prediction error distribution drifts due to wind speed changes, the partition function Z(θ) automatically adjusts the scaling factor, making the total loss function in the neural network sensitive to changes in the shape of the power generation error distribution. The energy function and the partition function together determine the probability distribution of the wind turbine power prediction error data. The parameter values ​​of the probability density function P(ε) of the wind turbine on the optimal distribution are further expressed as:

[0084]

[0085] Z(θ)=∫e -E(x;θ) dx

[0086] It should be noted that the partition function Z(θ) cannot usually be calculated directly. In this embodiment, it is approximated by Monte Carlo importance sampling, i.e.

[0087]

[0088] Where q is the number of sampling points.

[0089] In this embodiment, energy functions corresponding to 7 sets of scores are established. The 7 Gaussian components can flexibly represent the multi-peak characteristics of the error distribution. The energy function is obtained by substituting the 7 sets of mixed Gaussian distribution parameter values ​​into the following formula.

[0090]

[0091] Step 3.4: Fit the distribution to the loss function L E With the basic mean square error loss function L S The total loss function L is obtained by weighting, and the basic mean squared error loss function in step 2 is replaced with the total loss function. The specific explanation is as follows:

[0092] The distribution-fitting loss function emphasizes the true distribution characteristics of the learning error of the neural network model. λ is defined as the dynamic weighting coefficient of the loss function. When the true distribution characteristics of the actual prediction error samples calculated in step 2.3 deviate significantly from the optimal distribution (Gaussian mixture distribution) determined in step 3.1, λ approaches 1, and the model prioritizes optimizing the distribution fit. The dynamic weighting coefficient of the loss function, KL divergence, is freely adjustable to ensure the absolute accuracy of the predicted values ​​and avoid overfitting the distribution while neglecting point prediction performance.

[0093] Total loss function

[0094] in, This represents the expected value of the wind turbine's power generation prediction error ε under the optimal distribution (Gaussian mixture distribution). σ is the Sigmoid function, a is the sensitivity coefficient, and D... KL The KL divergence is used to measure the actual distribution of the power generation prediction error P. s The difference from P(ε|θ).

[0095] Step 4: Construct a triple attention mechanism model. This model uses a triple attention mechanism to process the input raw feature data into tensors, establishing connections between the channel dimension of the PINN neural network and any spatial dimension of the triple attention mechanism model, generating a refined triple attention weighted tensor. The system outputs reconstructed wind turbine feature data, maintaining the same shape (C×H×W) as the original data. A triple attention mechanism model is used to enhance the spatiotemporal representation of the input wind turbine feature data, highlighting key information. The specific process of the triple attention model processing the input wind turbine feature data is as follows:

[0096] Step 4.1: Given an input tensor χ∈R C×H×W (Original characteristic data of the wind turbine), where C represents the number of characteristic channels (determined by the number of features from the original meteorological sensors, such as wind speed, temperature, and air pressure), H represents the time series step size, and W represents the spatial dimension. Set C=13, H=60, which is 60 consecutive time steps, and W=20, according to... Figure 4 The triple attention mechanism model was set up and the weights were fused.

[0097] Input tensor χ∈R C×H×W The three branches in the triple attention mechanism model are passed on:

[0098] Step 4.2: In the first branch, rotate 90° counterclockwise along the height axis (H-axis) to construct the interaction between the height dimension and the channel dimension. Specifically, rotate the input tensor χ 90° counterclockwise along the H-axis to obtain the rotated tensor χ1. By changing the tensor dimension arrangement (swapping the H-axis and C-axis), the feature channel C is aligned with the time series step size H, which facilitates the extraction of cross-dimensional spatiotemporal interaction features. The shape of the rotated tensor χ1 is C×H×W. Then, the shape of the rotated tensor χ1 is restored to 2×H×W through Z-pooling, generating two feature maps.

[0099] The rotated tensor χ1 is first passed through a standard convolutional layer with a kernel size of k in the triple attention mechanism model. This layer provides an intermediate output tensor with a dimension of 1×H×C. Then, the weights of the intermediate output tensor are normalized by the Sigmoid activation function. The weight matrix is ​​multiplied element-wise with the original rotated tensor. Finally, the tensor is rotated inversely to restore its original shape.

[0100] Step 4.3: For the second branch, the operation process is similar to that of the first branch, but there are two key differences: First, the input tensor χ2 of the second branch is rotated 90° counterclockwise along the W axis, and the shape of the rotated tensor is H×C×W; Second, in the Z-pool operation, the pooling dimension is changed from the W axis of the first branch to the H axis, generating a 2×C×W feature map.

[0101] Step 4.4: For the last branch, first apply the original input tensor χ to Z-pool to compress the channel dimension, compressing the input tensor channels into a simplified tensor with a shape of 2×H×W; then perform convolution and normalization processing on the simplified tensor through the standard convolutional layer and batch normalization layer defined by the kernel size k in the triple attention mechanism model; then generate attention weights through the sigmoid activation layer, and add the generated attention weights to the original input tensor χ.

[0102] The three branches above each independently output a refined tensor of shape C×H×W, and finally these three tensors are merged.

[0103] Step 4.5: Calculate a weighted average of the refined tensors from the three branches according to the channel dimension, and output a refined triple attention application tensor. (Reconstructed wind turbine characteristic data), expressed by the formula:

[0104]

[0105] Where σ represents the Sigmoid function; ψ1, ψ2 and ψ3 represent the standard two-dimensional convolutional layers in the three branches, defined by the kernel size k; and These represent the tensors after the first branch rotation and the second branch rotation, respectively, and are transformed after passing through the Z-Pool. and This shows the tensor of the third branch after Z-Pool transformation.

[0106] The output of the fine triple attention tensor This refers to the spatiotemporal feature representation after enhancement of the original input, using a fine-grained triple attention tensor. Retain the same dimensions C×H×W as the original feature data, but include enhanced spatiotemporal features. Apply tensors using refined triple attention. (Reconstructed wind turbine feature data) replaces the original feature data as input data for the PINN neural network model.

[0107] Figure 5 The three-fold attention mechanism setting and the dynamic changes of attention weights over time are presented.

[0108] Step 5: Connect the output layer of the triple attention mechanism model to the bidirectional GRU layer of the PINN neural network model updated in Step 3 to obtain the weighted triple attention mechanism bidirectional GRU neural network model.

[0109] The output layer of the triple attention mechanism model is connected to the bidirectional GRU layer of the PINN neural network model updated in step 3. The purpose is to apply the fine-grained triple attention tensor generated by the triple attention mechanism model. The bidirectional GRU layer of the PINN neural network is input, and the forward and backward hidden states are calculated separately. The bidirectional hidden states are then concatenated to form the final hidden state. Global average pooling is then performed on the concatenated features to achieve weighting at the feature level, thereby further highlighting the key features of the PINN neural network model in the task.

[0110] Specifically, first, the fine-grained triple attention-weighted tensor... The data is expanded into sequence data step by step, and 85% of the sequence data is randomly selected and input into the bidirectional GRU layer of the PINN neural network. The bidirectional GRU layer is used to extract time series features and for training. By processing bidirectionally, it considers contextual information, thereby enhancing the understanding of the sequence data. The output of the bidirectional GRU layer not only contains information from the current time step but also combines information from previous and subsequent time steps, which helps to capture long-term and short-term dependencies. The output of the intermediate layer of the PINN neural network is converted into the output of the PINN neural network model through two fully connected network layers.

[0111] Step 6: Input the wind farm sample data obtained in Step 1 into the bidirectional GRU neural network model with weighted triple attention mechanism obtained in Step 5 for training. During the training process, update the model parameters in the following way and perform gradient updates at each time step.

[0112] The updated formula is:

[0113]

[0114]

[0115] in, The model parameters (including learnable weights and biases directly involved in network computation) of the bidirectional GRU network model with a weighted triple attention mechanism are updated after each iteration, including the weights and biases of all neurons; L(θ) t ) is the loss function; λ is the dynamic weight coefficient of the loss function; η is the learning rate, used to control the update step size; m t For the first moment estimate after bias correction, represents the exponentially weighted average of the gradient (momentum); is the gradient of the loss function with respect to the error distribution parameter θ at time step t; l is a minimal constant to prevent the denominator in the formula from being zero, and in this embodiment, it is taken as 0.01.

[0116] v t β1 is the second moment estimate, representing the exponentially weighted average of the squared gradient. β2 is the decay rate of the first moment, typically between (0,1), used to control the influence of momentum; in this embodiment, it is set to 0.9. β3 is the decay rate of the second moment, typically between (0,1), used to control the influence of the squared gradient; in this embodiment, it is set to 0.6.

[0117] During training, the total loss function L updates the model parameters through backpropagation. In this embodiment, training is terminated when the loss shows no improvement after 50 consecutive epochs.

[0118] It should be noted that the neural network constructed in this invention calculates the wind speed difference in continuous time steps through triple attention-bidirectional GRU dynamic feature selection when the wind speed changes abruptly. When the gradient exceeds 15% / min, it triggers the adjustment of local feature weights, so that the decay rate of the first moment (momentum decay rate) β1 is reduced to 0.85 to reduce the dependence on historical gradients, and the decay rate of the second moment β2 is increased to 0.95 to enhance the current gradient response.

[0119] Step 7: Use the bidirectional GRU neural network model with weighted triple attention mechanism trained in Step 6 to predict wind farm power.

[0120] Specifically, this embodiment uses 15% of the wind turbine feature data that were not used in training for prediction, selects some results for visualization, and compares them with other traditional prediction methods. Figure 6 The results demonstrate the effectiveness of wind turbine power generation prediction during periods of abrupt wind speed changes. As shown in the figure, the prediction error of the method described in this invention is reduced by 37.2% compared to LSTM and by 22.4% compared to the traditional PINN neural network during periods of abrupt wind speed changes. Figure 7 The paper presents a comparison between the initial prediction error distribution of the PINN neural network and the final prediction error distribution of the method of the present invention. It can be seen that the method of the present invention can effectively control the prediction error to around 0.

[0121] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the scope of the technology disclosed in the present invention, and such modifications or substitutions should all be covered within the scope of protection of the present invention.

Claims

1. A wind farm power prediction method based on data distribution fitting, characterized in that: Includes the following steps: Step 1: Obtain historical sample data of the wind farm and perform data preprocessing. The historical sample data includes the power generation of all wind turbines in the entire wind farm and the corresponding characteristic data; wherein, the characteristic data includes wind speed, temperature and air pressure. Step 2: Set the basic mean squared error loss function, construct the initial model of the PINN neural network and train it; use the wind turbine feature data obtained in Step 1 as input data to make predictions, and output the predicted power generation value and power generation prediction error for each wind turbine. The PINN neural network is equipped with a bidirectional GRU layer; The basic mean square error loss function is used to collect the wind turbine power generation prediction error. Step 3: Determine the distribution fitting loss function, and weight the distribution fitting loss function with the basic mean squared error loss function to obtain the total loss function. Replace and update the basic mean squared error loss function of the initial PINN neural network model constructed in Step 2 with the total loss function; including the following sub-steps: Step 3.1: Determine the optimal distribution and obtain the probability density function P(ε) of the power generation prediction error of each wind turbine on the optimal distribution using the least squares method; the optimal distribution is a Gaussian mixture distribution; Step 3.2: Obtain the parameter values ​​P(ε|θ) of the probability density function of all wind turbines on the optimal distribution using the maximization function method: In the formula, L(θ|ε) is the maximization function, θ is the error distribution parameter, and n is the number of data points for each feature; Step 3.3: Introduce the energy function E(x; θ) and the partition function Z(θ) into the parameter value P(ε|θ) to determine the probability distribution of the wind turbine power generation prediction error, then obtain... Z(θ)=∫e -E(x;θ) dx; Wherein, the energy function E(x; θ) is the negative logarithmic form of the optimal distribution; the partition function Z(θ) is the global integral of the energy function, obtained through sampling; Step 3.4: Fit the distribution to the loss function L E With the basic mean square error loss function L S The total loss function L is obtained by weighting, and the basic mean square error loss function described in step 2 is replaced with the total loss function. The weighted calculation formula is: In the formula, This indicates that the power generation distribution error of the wind turbine takes the expected value under the optimal distribution; λ is the dynamic weighting coefficient of the loss function, which is adjusted according to the KL divergence in the following formula: λ(t)=σ(a·D KL (P(ε|θ)||P s )); In the formula, σ is the Sigmoid function; a is the sensitivity coefficient; D KL The KL divergence is used to measure the actual distribution of the wind turbine power generation prediction error P. s The difference from P(ε|θ); Step 4: Construct a triple attention mechanism model. This model is used to process the input wind turbine feature data using a triple attention mechanism, and outputs a refined triple attention weighted tensor. The fine triple attention weighted tensor To reconstruct the wind turbine feature data, and to ensure that the reconstructed wind turbine feature data maintains the same shape C×H×W as the input wind turbine feature data, where C represents the number of feature channels, H represents the time series step size, and W represents the spatial dimension; Step 5: Connect the output layer of the triple attention mechanism model to the bidirectional GRU layer of the PINN neural network model updated in Step 3 to obtain the fine-grained triple attention weighted tensor output by the triple attention mechanism model. The input is fed into the bidirectional GRU layer of the PINN neural network model to obtain a bidirectional GRU neural network model with a weighted triple attention mechanism; Step 6: Use the wind farm sample data obtained in Step 1 to train the bidirectional GRU neural network model with the weighted triple attention mechanism. Update the model parameters during the training process and perform gradient updates at each time step. Step 7: Use the bidirectional GRU neural network model with the weighted triple attention mechanism trained in Step 6 to predict wind farm power.

2. The wind farm power prediction method based on data distribution fitting according to claim 1, characterized in that: The data preprocessing in step 1 includes handling missing and outlier values.

3. The wind farm power prediction method based on data distribution fitting according to claim 1 or 2, characterized in that: Step 2 includes the following sub-steps: Step 2.1: Construct the initial model of the PINN neural network: Determine the dimension of the input feature channels, set up a bidirectional GRU layer, and add a basic mean squared error loss function; Step 2.2: In the historical sample data of the wind farm obtained in Step 1, select the feature data of the wind turbine and the power generation data according to the set ratio to train the initial model of the PINN neural network, and retain the model parameters after iterating until the mean square error of the basic loss function is stable and unchanged. Step 2.3: Input the feature data of all wind turbines obtained in Step 1 into the PINN neural network model trained in Step 2.2 to obtain the predicted power generation value and power generation prediction error of all wind turbines.

4. The wind farm power prediction method based on data distribution fitting according to claim 1, characterized in that: In step 3.1, the process of determining the optimal distribution as a Gaussian mixture distribution is as follows: First, the power generation prediction error of each wind turbine obtained in step 2 is fitted according to different distribution methods to obtain the power generation error fitting distribution function; The distribution patterns include normal distribution, exponential distribution, uniform distribution, gamma distribution, beta distribution, lognormal distribution, chi-square distribution, minimum Weibull distribution, t distribution, F distribution, Cauchy distribution, Laplace distribution, Rayleigh distribution, Pareto distribution, right-skewed Gumbel distribution, logistic distribution, Irish distribution, power-law distribution, Nakamura distribution, beta prime distribution, and Gaussian mixture distribution. Then, the p-values ​​were calculated by performing the KS test under different distributions, and the Gaussian mixture distribution with the highest p-value was taken as the optimal distribution.

5. The wind farm power prediction method based on data distribution fitting according to claim 4, characterized in that: In step 3.3, the partition function Z(θ) is obtained through Monte Carlo importance sampling: In the formula, q represents the number of sampling points.

6. The wind farm power prediction method based on data distribution fitting according to claim 1, characterized in that: In step 6, gradient updates are performed at each time step during training in the following manner: In the formula: L(θ) represents all model parameters in a bidirectional GRU neural network model with a weighted triple attention mechanism at time step t, and all parameters are updated after each iteration; t ) is the loss function; λ is the dynamic weighting coefficient of the loss function; η is the learning rate; m is the gradient of the loss function with respect to the error distribution parameter θ at time step t; t For the first moment estimate after bias correction, represents the exponentially weighted average of the gradient; To prevent extremely small constants with zero denominators in the formula, the value is set to 0.01; v t β1 is the second moment estimate, representing the exponentially weighted average of the squared gradient; β1 is the decay rate of the first moment, ranging from (0,1), used to control the influence of momentum. β2 is the deviation correction term; β2 is the decay rate of the second moment, with a value range of (0,1), used to control the effect of the squared gradient.

Citation Information

Patent Citations

  • Wind power wind speed prediction and optimization arrangement method, system and device

    CN119294234A

  • Methods, systems, and computer readable media for causal training of physics-informed neural networks

    US20250077875A1