RDPG wind speed correction method considering NWP wind speed horizontal and vertical errors

By adopting the RDPG wind speed correction method in NWP wind speed correction, the horizontal and vertical error of the wind speed sequence is considered, and the model is constructed through SHAP theory and Actor-Critic network, the problem of insufficient adaptability and universality of traditional algorithms is solved, and the accuracy of wind power prediction is improved.

CN115049115BActive Publication Date: 2025-04-04NORTHEAST DIANLI UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210606635.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-31
Publication Date
2025-04-04
Estimated Expiration
2042-05-31

AI Technical Summary

Technical Problem

Traditional machine learning algorithms lack adaptability and poor model versatility, resulting in insufficient NWP wind speed error correction capabilities, affecting the prediction accuracy of wind power at multiple time scales.

Method used

The RDPG wind speed correction method that calculates the transverse and longitudinal error of NWP wind speed is adopted, and the timing interval is divided by weighted European distance similarity, and the features that have negative effects on NWP wind speed correction are eliminated, and an RDPG wind speed correction model based on SHAP theory and Actor-Critic network is constructed.

Benefits of technology

The convergence and stability of the model are improved, the adaptability and versatility of NWP wind speed correction are enhanced, and the prediction accuracy of wind power at multiple time scales is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115049115B_ABST
    Figure CN115049115B_ABST
Patent Text Reader

Abstract

The present invention discloses an RDPG wind speed correction method taking into account the lateral and longitudinal errors of NWP wind speed. Based on the weighted Euclidean distance similarity, the method divides the differentiated optimal leading / lagging time series correlation intervals of each NWP wind speed to-be-corrected point, reflecting the potential influence of the lateral error on the NWP wind speed correction. The interval statistical characteristics are used instead of the NWP original meteorological characteristics as the model input, and the NWP meteorological characteristics evaluation of the non-consistent time series interval is realized based on the SHAP theory, so as to obtain the characteristics with positive gain for the model and reduce the complexity of the model. The NWP wind speed correction model based on RDPG reduces the lateral and longitudinal errors of the predicted wind speed under different NWP wind speed fluctuation levels, and enhances the generalization ability of the model and the ability to process nonlinear data. The method solves the problem that the traditional machine learning algorithm lacks the adaptive ability, resulting in the insufficient correction ability of the NWP wind speed error under different fluctuation levels, and affects the wind power prediction accuracy under multiple time scales.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of wind power prediction, and in particular relates to an RDPG wind speed correction method taking into account the lateral and longitudinal errors of NWP wind speed. Background Art

[0002] Wind power is gradually transitioning from a small-scale, supplementary power source to a main power source. However, affected by the time-varying characteristics of wind resources, wind power has strong volatility, intermittency and uncertainty. With the continuous expansion of wind power installed capacity, high-proportion wind power access has brought challenges to grid dispatching, the safety and stability of power system operation, etc. Accurate wind speed prediction can enable power dispatching agencies to optimize wind farm operations in a timely manner. It is an effective way to reduce the adverse effects of wind power grid connection and is of great significance to improving the accuracy of wind power prediction and the stable operation of the power grid.

[0003] NWP meteorological data is the key input of the wind power prediction model, among which NWP wind speed is an important basis for NWP to be applied to wind power prediction. Zhang et al. used a multivariate time series clustering algorithm and a Seq2Seq deep learning algorithm to predict wind power by inputting NWP data and historical measured data of wind farms. Lu et al. used feature extraction technology to mine the nonlinear characteristics of NWP and historical wind power data, and established a combined wind power prediction model based on a variance weight allocation strategy. Wang et al. considered the differential fluctuations of NWP wind speed in each wind farm in the wind power cluster in the time series, and proposed to predict wind power for each sub-cluster based on a bidirectional long short-term memory algorithm. However, if there is an error in the NWP wind speed prediction, it will significantly affect the prediction accuracy. Therefore, it is necessary to correct the NWP wind speed prediction error and improve the accuracy of the NWP wind speed forecast.

[0004] The NWP wind speed prediction error is divided into horizontal / longitudinal errors. The horizontal error is the time misalignment between the NWP wind speed sequence and the actual wind speed sequence, and the longitudinal error is the amplitude deviation between the two. At present, the NWP wind speed correction method is mainly based on the prior statistical law of the NWP longitudinal error to establish a point-to-point mapping relationship between the NWP wind speed and the actual wind speed at the same time. Pearre et al. used statistical methods to explore the trend characteristics between the amplitude of the NWP wind speed longitudinal error and weather conditions. Ding et al. extracted the standard deviation of the NWP wind speed longitudinal error as a weight to obtain the NWP wind speed weight time series and established a short-term wind power NWP wind speed error correction model based on a gated neural network. Sun et al. used ANN / SVM to learn the mapping relationship between the NWP wind speed and the actual wind speed at the same time point to correct the wind speed longitudinal error. However, the above method does not consider the impact of the lateral error of the NWP wind speed sequence on the NWP wind speed correction and the differences at each time point in the NWP, resulting in a certain random uncertainty in the mapping relationship between the NWP wind speed and the actual wind speed. At the same time, due to the actual demand of power dispatching agencies for reporting wind power output, the NWP wind speed correction results need to be given 12 hours in advance, which further increases the difficulty of NWP wind speed correction and affects the correction accuracy of the existing statistical model.

[0005] Existing research on NWP wind speed correction mainly focuses on NWP data feature mining, but lacks adaptive capabilities and the model is not universal. Deep reinforcement learning (DRL) integrates the perception ability of deep learning (DR) and the decision-making ability of reinforcement learning (RL), and can perform end-to-end perception and decision-making in complex and high-dimensional state-action space. Zhang et al. proposed a new asynchronous deep reinforcement learning model for short-term load forecasting, which has higher prediction accuracy and more stable convergence than traditional machine learning algorithms. Meng et al. established a hybrid model for short-term wind speed forecasting based on data adaptive decomposition, reinforcement learning integration and error correction. Yang et al. used the Q-learning algorithm of reinforcement learning to optimize the weights of the combined model and improve the prediction performance of the combined model. Lillicrap et al. proposed a deep deterministic policy gradient algorithm (DDPG) based on the Actor-Critic framework, which is aimed at solving the DRL algorithm on the continuous action space. Liu et al. proposed that DDPG can be effectively applied to the field of wind speed forecast correction. However, NWP data has strong nonlinearity. The multilayer perceptron (MLP) in the DDPG algorithm, as a critic network, is not accurate enough in evaluating the target Q value when processing complex nonlinear data, and cannot effectively update the Actor network parameters, making it difficult to ensure the convergence and stability of the NWP wind speed correction model. Summary of the invention

[0006] The purpose of the present invention is to provide an RDPG wind speed correction method taking into account the lateral and longitudinal errors of NWP wind speed, which solves the problem that traditional machine learning algorithms lack adaptive ability and the model is not universal, resulting in insufficient NWP wind speed error correction ability under different fluctuation levels, affecting the accuracy of wind power prediction under multiple time scales.

[0007] The technical solution adopted by the present invention is a RDPG wind speed correction method taking into account the lateral and longitudinal errors of NWP wind speed, which is specifically implemented according to the following steps:

[0008] Step 1: Calculate the weighted Euclidean distance similarity based on the NWP meteorological data and the historical meteorological data, divide the NWP meteorological data into multiple time series intervals by weighted Euclidean distance similarity, and use each time series interval as the input feature extraction interval;

[0009] Step 2: Construct the RDPG wind speed correction model. Based on the SHAP theory, determine the importance ranking of meteorological features in the input feature extraction interval, remove features that have a negative impact on the NWP wind speed correction, and obtain the training NWP meteorological data composed of the remaining meteorological features;

[0010] Step 3: Use the long short-term memory algorithm to represent the Critic network in the RDPG wind speed correction model, establish the RDPG wind speed correction model based on cyclic deterministic policy gradient, train the NWP wind speed correction model by training NWP meteorological data and historical meteorological data, and obtain a complete RDPG wind speed correction model;

[0011] Step 4: Input the NWP interval statistical characteristics and historical meteorological data of the point to be corrected into the trained NWP wind speed correction model, and output the corrected wind speed.

[0012] The present invention is also characterized in that:

[0013] The specific process of step 1 is:

[0014] Step 1.1, suppose that the NWP meteorological data is the meteorological parameter characteristic vector X=[V, D, T, H, P] of the NWP wind speed point to be corrected, where V, D, T, H, P are the wind speed, wind direction, temperature, humidity, and pressure of the point respectively, and the meteorological parameter characteristic vector of the NWP wind speed at different times is taken as a sample point;

[0015] Step 1.2, normalize the meteorological parameter characteristic vector of NWP wind speed, and assume that the meteorological parameter characteristic vector of the i-th sample point after processing is Xi = [V(i), T(i), D(i), H(i), P(i)], then the normalized meteorological parameter characteristic vector of the NWP wind speed point to be corrected is X0 = [V0(i), T0(i), D0(i), H0(i), P0(i)], and calculate the weighted Euclidean distance similarity between the normalized meteorological parameter characteristic vector of the i-th NWP wind speed sample point and the point to be corrected:

[0016]

[0017] Where: m is the number of meteorological parameters; ω j is the weight of the jth meteorological parameter; j is the sequence number of the meteorological parameter; n is the number of sample points;

[0018] Step 1.3: The value range of weighted Euclidean distance similarity is (0,1). The closer to 1, the stronger the correlation between the two points. Set the threshold D of the boundary point of the optimal time series interval of the sample. 0 is 0.8;

[0019] Step 1.4: Determine the weight of each meteorological parameter based on the entropy weight method. Suppose there are n historical daily sample data, each sample has m meteorological parameters, forming an n×m order data matrix A=[z ij ] n×m , where z ij represents the value of the jth meteorological parameter in the i-th historical day, and the entropy of the jth meteorological parameter is formula (2):

[0020]

[0021] Where:

[0022] When b ij = 0, let b ij lnb ij =0, then the weight of the jth meteorological parameter is:

[0023]

[0024] Where: j ∈[0,1], then

[0025] Step 1.5: Divide the NWP meteorological data by weighted Euclidean distance similarity to obtain the leading / lagging time series interval of the NWP wind speed to be corrected point, which is the input feature extraction interval.

[0026] The weighted Euclidean distance similarity S is expressed as:

[0027] S=S i ·ω i (4).

[0028] The meteorological features in the feature extraction interval input in step 2 include average wind speed, maximum wind speed, minimum wind speed, average wind direction, average temperature, average humidity, and average air pressure.

[0029] The specific process of step 2 is:

[0030] Step 2.1, construct the RDPG wind speed correction model, and calculate the marginal contribution of a meteorological feature added to the RDPG wind speed correction model;

[0031] Step 2.2, calculate the marginal contribution of the same meteorological feature in different input feature extraction intervals;

[0032] Step 2.3: Calculate the mean of all marginal contributions of the same meteorological feature, i.e., the corresponding Shapley value. The calculation method is shown in equations (4) and (5). Let f(x) be the RDPG wind speed correction model, g(x) be the additive function used to explain the model evaluation results, and take x i For a certain meteorological feature, the mean of the marginal contribution of a certain meteorological feature is calculated as:

[0033]

[0034]

[0035] Where: φ 0 is the model prediction benchmark value; i is the Shapley value of the i-th feature; n is the total number of features; {x 1 ,x 2 ,…,x n} is the set of all input features; S is the set {x 1 ,x 2 ,…,x n} does not contain x i The feature subset of |S| is the number of features contained in the subset S; f S (xS) is the RDPG wind speed correction model when the feature S is input, and the feature set {x 1 ,x 2 ,…,x n}Other features not included in subset S are set to zero;

[0036] Step 2.4: Sort the meteorological features from large to small according to the mean absolute value of the marginal contribution of each meteorological feature, remove the three meteorological features with larger mean marginal contribution, and obtain the training NWP meteorological data composed of the remaining meteorological features.

[0037] The specific process of step 3 is as follows:

[0038] Step 3.1, define the state value function V π (s) and the state-action value function Q π (s,a), as shown in formulas (6) and (7), V π (s) represents the cumulative discounted reward for executing strategy π starting from a certain state s, Q π (s,a) represents the cumulative discounted reward for executing action a in a state s and subsequently executing policy π;

[0039]

[0040]

[0041] Where: γ is the discount factor, k is the future time step, r t+k represents the immediate reward obtained by the agent at time step t+k;

[0042] Step 3.2: The Actor-Critic network is used as the basic framework to implement the policy gradient for the RDPG wind speed correction model. It mainly includes two neural networks, the Actor network and the Critic network. The parameter θ is used to evaluate the execution strategy π of the current Actor network, and the input state s is used to calculate the execution strategy π of the current Actor network. t , output action a t After receiving the action selected by the agent, the environment gives the agent corresponding reward and punishment signal feedback r t+1 , and transfer to the new environment state s t+1 , and then output a new action a t+1 , through the interaction between the agent and the environment, the transformation variable (s t ,a t ,s t+1 ,a t+1 ,r t+1 ) is input into the Critic network, and the loss function TD_error is calculated according to the temporal difference method. The loss function TD_error is represented by δ:

[0043] δ=τ t+1 +γQ(s t+1 ,a t+1 )-Q(s t ,a t ) (8)

[0044] Step 3.3: Both the Actor network and the Critic network use a dual network structure, including a valuation network with the same structure. And the target network (μ,Q):

[0045]

[0046]

[0047] Step 3.4, the RDPG wind speed correction model includes an experience replay mechanism. By constructing an experience pool, the state transition process is first stored in the experience pool before the agent learns; during learning, random sampling is performed from the experience pool, and exploration is performed in the continuous action space based on formula (11) to construct an experience replay buffer pool R:

[0048] a t =μ(s t |θ u )+ξ t (11)

[0049] Where: t is noise, used for random search action; R is composed of Composition, λ is the number of training steps of RDPG;

[0050] Step 3.5: Based on equations (7) and (8), Monte Carlo simulation is used to establish the Q network and μ The learning strategy of the network, as shown in formula (12) and formula (13), uses a randomly selected minibatch from R as input to train the estimation network (μ, Q):

[0051]

[0052]

[0053] Among them, {a i ,s i ,r i ,s i+1}~R;

[0054] Step 3.6: The parameters of the target network are updated by slowly tracking the original network. The update formula is:

[0055]

[0056] Step 3.7: The state in the RDPG wind speed correction model is extracted by s t The meteorological characteristics are used to represent it, and the training NWP meteorological data and historical meteorological data are used as training samples to input into the RDPG wind speed correction model to obtain a complete training RDPG wind speed correction model.

[0057] The beneficial effects of the present invention are:

[0058] The RDPG wind speed correction method of the present invention taking into account the lateral and longitudinal errors of the NWP wind speed solves the problem that the traditional machine learning algorithm lacks adaptive ability and the model is not universal, and further improves the convergence and stability of the model; the NWP wind speed correction method of the present invention provides a new and effective technical solution to the problem that the existing research on the insufficient correction ability of the NWP wind speed error at different fluctuation levels leads to low wind power prediction accuracy at multiple time scales. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 It is a flow chart of the RDPG wind speed correction method taking into account the lateral and longitudinal errors of NWP wind speed in the present invention;

[0060] Figure 2 It is the definition diagram of the NWP wind speed horizontal / vertical error of the present invention;

[0061] Figure 3 It is a diagram of the leading / lagging timing interval division process of the present invention;

[0062] Figure 4 It is a Shapley value sorting diagram of the lead / lag time series interval characteristics of the present invention;

[0063] Figure 5 It is the NWP multi-meteorological feature missing impact map of the present invention;

[0064] Figure 6 It is the NWP wind speed correction framework diagram based on RDPG of the present invention;

[0065] Figure 7 It is a diagram showing the distribution of leading / lagging time series intervals of each sample point of the present invention;

[0066] Figure 8 It is a diagram of the NWP wind speed correction results of different models in different seasons of the present invention. DETAILED DESCRIPTION

[0067] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0068] The RDPG wind speed correction method of the present invention taking into account the lateral and longitudinal errors of NWP wind speed is as follows: Figure 1 As shown, the specific implementation steps are as follows:

[0069] Step 1: The lateral error between the NWP wind speed sequence and the actual wind speed sequence, such as Figure 2As shown in Figure 1, it is necessary to consider the timing effect of the NWP wind speed series. The leading time series interval and the lagging time series interval are used to jointly constitute the time series interval range of the model input feature extraction. The mapping relationship between the NWP wind speed series time series interval and the NWP wind speed to be corrected point is established. Considering that different meteorological parameters have different importance in the similarity measurement, the weighted Euclidean distance similarity is calculated based on the NWP meteorological data and the historical meteorological data. The NWP meteorological data is divided into multiple time series intervals by weighted Euclidean distance similarity, and each time series interval is used as the input feature extraction interval, as shown in Figure 1. Figure 3 As shown in the figure, weight coefficients are assigned to different meteorological parameters according to the importance of attributes in the features to solve the influence of parameter difference importance on similarity measurement; the specific process is:

[0070] Step 1.1, suppose that the NWP meteorological data is the meteorological parameter characteristic vector X=[V, D, T, H, P] of the NWP wind speed point to be corrected, where V, D, T, H, P are the wind speed, wind direction, temperature, humidity, and pressure of the point respectively, and the meteorological parameter characteristic vector of the NWP wind speed at different times is taken as a sample point;

[0071] Step 1.2: Normalize the meteorological parameter characteristic vector of NWP wind speed. Let the meteorological parameter characteristic vector of the i-th sample point after normalization be X i =[V(i),T(i),D(i),H(i),P(i)], then the normalized NWP wind speed characteristic vector of the meteorological parameter at the point to be corrected is X 0 =[V 0 (i),T 0 (i),D 0 (i),H 0 (i),P 0 (i)], the weighted Euclidean distance similarity between the normalized i-th NWP wind speed sample point and the meteorological parameter feature vector of the point to be corrected is calculated as:

[0072]

[0073] Where: m is the number of meteorological parameters; ωj is the weight of the jth meteorological parameter; j is the sequence number of the meteorological parameter; n is the number of sample points;

[0074] Step 1.3: The value range of weighted Euclidean distance similarity is (0,1). The closer to 1, the stronger the correlation between the two points. Set the threshold D of the boundary point of the optimal time series interval of the sample. 0 is 0.8;

[0075] Step 1.4: Determine the weight of each meteorological parameter based on the entropy weight method. Suppose there are n historical daily sample data, each sample has m meteorological parameters, forming an n×m order data matrix A=[z ij ]n×m , where z ij represents the value of the jth meteorological parameter in the i-th historical day, and the entropy of the jth meteorological parameter is formula (2):

[0076]

[0077] Where:

[0078] When b ij = 0, let b ij lnb ij =0, then the weight of the jth meteorological parameter is:

[0079]

[0080] Where: j ∈[0,1], then

[0081] Step 1.5: Divide the NWP meteorological data by weighted Euclidean distance similarity to obtain the leading / lagging time series interval of the NWP wind speed to be corrected point, which is the input feature extraction interval.

[0082] The weighted Euclidean distance similarity S is expressed as:

[0083] S=S i ·ω i (4).

[0084] Step 2: Construct the RDPG wind speed correction model. Based on the SHAP theory, determine the importance ranking of meteorological features in the input feature extraction interval, eliminate the features that have a negative impact on the NWP wind speed correction, and obtain the training NWP meteorological data composed of the remaining meteorological features. In order to ensure the uniformity of the RDPG wind speed correction model structure in the non-consistent optimal time series correlation interval at each prediction time point, the seven types of interval statistical features in Table 1 are selected as the basic input features of the correction model. Due to the different degrees of influence of different meteorological statistical features on the NWP wind speed correction, the importance of the above features is evaluated based on the SHAP theory to quantify the contribution of each feature to the model prediction.

[0085] Table 1

[0086]

[0087]

[0088] The specific process of step 2 is:

[0089] The specific process is:

[0090] Step 2.1, construct the RDPG wind speed correction model, and calculate the marginal contribution of a meteorological feature added to the RDPG wind speed correction model;

[0091] Step 2.2, calculate the marginal contribution of the same meteorological feature in different input feature extraction intervals;

[0092] Step 2.3: Calculate the mean of all marginal contributions of the same meteorological feature, i.e., the corresponding Shapley value. The calculation method is shown in equations (4) and (5). Let f(x) be the RDPG wind speed correction model, g(x) be the additive function used to explain the model evaluation results, and take x i For a certain meteorological feature, the mean of the marginal contribution of a certain meteorological feature is calculated as:

[0093]

[0094]

[0095] Where: φ 0 is the model prediction benchmark value; i is the Shapley value of the i-th feature; n is the total number of features; {x 1 ,x 2 ,…,x n} is the set of all input features; S is the set {x 1 ,x 2 ,…,x n} does not contain x i The feature subset of |S| is the number of features contained in the subset S; f S (x S ) is the RDPG wind speed correction model when the feature S is input, and the feature set {x 1 ,x 2 ,…,x n}Other features not included in subset S are set to zero;

[0096] Step 2.4: Sort the meteorological features from large to small according to the mean absolute value of the marginal contribution of each meteorological feature, remove the three meteorological features with larger mean marginal contribution, and obtain the training NWP meteorological data composed of the remaining meteorological features.

[0097] like Figure 3 Each point represents the characteristics of a single sample. The ordinate is the NWP meteorological characteristics considered by the present invention. The importance of the characteristics decreases from top to bottom. The abscissa is the Shaply value of the characteristics. Figure 3 It can be seen that among all NWP meteorological characteristics, the characteristic importance from high to low is V mean 、V max , D mean 、Vmin , H mean , P mean , T mean . The present invention adopts |SHAP| mean It represents the average value of the sum of the absolute values ​​of the sample Shapley values. Table 2 shows the |SHAP| of different features. mean The value of V mean |SHAP| mean The value is 1.07, which has the greatest impact on the results of NWP wind speed correction.

[0098] Table 2

[0099]

[0100] To further evaluate whether a feature has a negative impact on model accuracy, all features are considered as model inputs; according to the feature |SHAP| mean According to the importance of the characteristics, the individual meteorological characteristic factors of NWP, such as wind speed, wind direction, humidity, air pressure, and temperature, are eliminated in order from high to low, and then the NWP wind speed correction is performed. The comparison results of the NWP wind speed correction effects of the above methods are shown in the figure. Figure 4 When the NWP wind speed feature is removed, the impact on the NWP wind speed correction is the greatest, followed by the removal of the NWP wind direction feature.

[0101] Table 3 shows the accuracy index of the model correction when different meteorological characteristics are missing. When the temperature, humidity, and air pressure characteristics of NWP are removed, compared with the case where all meteorological characteristics are considered, the values ​​of the performance indicators are improved, such as Figure 5 As shown, when the wind speed and wind direction characteristics of NWP are removed, the effect of the NWP wind speed correction model is reduced to varying degrees. Among them, the effect of removing the NWP wind speed correction is the worst. It can be seen that the NWP wind speed and wind direction characteristics have the greatest positive contribution to the NWP wind speed correction model, and the NWP temperature, humidity, and air pressure characteristics have a negative impact on the NWP wind speed correction. Therefore, combining different characteristics of |SHAP| mean The value is large or small, and 0.45 is determined as the threshold value, and V with a positive gain effect on the model is selected. mean 、V max , D mean 、V min Serves as NWP wind speed correction model input.

[0102] Table 3

[0103]

[0104] Step 3. Considering that NWP meteorological data and historical meteorological data have high-dimensional and strong nonlinear characteristics, the long short-term memory algorithm is used to represent the Critic network in the RDPG wind speed correction model, which can learn long-term dependent information and effectively update and utilize storage unit information. Using the long short-term memory algorithm as the Critic network, the TD_error evaluated by the state action value function is more accurate than that of DDPG, and the Actor network parameters are better updated, which improves the convergence and stability of the NWP wind speed correction model. An RDPG wind speed correction model based on cyclic deterministic policy gradient is established. The NWP wind speed correction model is trained by training NWP meteorological data and historical meteorological data to obtain a fully trained RDPG wind speed correction model. The specific process is as follows:

[0105] Step 3.1, define the state value function V π (s) and the state-action value function Q π (s,a), as shown in formulas (6) and (7), V π (s) represents the cumulative discounted reward for executing strategy π starting from a certain state s, Q π (s,a) represents the cumulative discounted reward for executing action a in a state s and subsequently executing policy π;

[0106]

[0107]

[0108] Where: γ is the discount factor, k is the future time step, r t+k represents the immediate reward obtained by the agent at time step t+k;

[0109] Step 3.2: Figure 6 As shown in the figure, the RDPG wind speed correction model uses the Actor-Critic network as the basic framework to implement the policy gradient, which mainly includes two neural networks, the Actor network and the Critic network. The parameter θ is used to evaluate the execution strategy π of the current Actor network, and the input state s is used to calculate the execution strategy π of the current Actor network. t , output action a t After receiving the action selected by the agent, the environment gives the agent corresponding reward and punishment signal feedback r t+1 , and transfer to the new environment state s t+1 , and then output a new action a t+1 , through the interaction between the agent and the environment, the transformation variable (s t ,a t ,s t+1 ,a t+1 ,r t+1) is input into the Critic network, and the loss function TD_error is calculated according to the temporal difference method. The loss function TD_error is represented by δ:

[0110] δ=τ t+1 +γQ(s t+1 ,a t+1 )-Q(s t ,a t ) (8)

[0111] Step 3.3: Both the Actor network and the Critic network use a dual network structure, including a valuation network with the same structure. And the target network (μ,Q):

[0112]

[0113]

[0114] Step 3.4, the RDPG wind speed correction model includes an experience replay mechanism. By constructing an experience pool, the state transition process is first stored in the experience pool before the agent learns; during learning, random sampling is performed from the experience pool, and exploration is performed in the continuous action space based on formula (11) to construct an experience replay buffer pool R:

[0115] a t =μ(s t |θ u )+ξ t (11)

[0116] Where: t is noise, used for random search action; R is composed of Composition, λ is the number of training steps of RDPG;

[0117] Step 3.5: Based on equations (7) and (8), Monte Carlo simulation is used to establish the Q network and μ The learning strategy of the network, as shown in formula (12) and formula (13), uses a randomly selected minibatch from R as input to train the estimation network (μ, Q):

[0118]

[0119]

[0120] Among them, {a i ,s i ,r i ,s i+1}~R;

[0121] Step 3.6: The parameters of the target network are updated by slowly tracking the original network. The update formula is:

[0122]

[0123] Step 3.7: The state in the RDPG wind speed correction model is extracted by s t The meteorological characteristics are used to represent it, and the training NWP meteorological data and historical meteorological data are used as training samples to input into the RDPG wind speed correction model to obtain a complete training RDPG wind speed correction model.

[0124] During the training process of the RDPG wind speed correction model, the RDPG wind speed correction model outputs the corresponding wind speed value from the action space according to the observed state, and determines whether the model output is accurate by setting a reward function. In the present invention, the reward function is defined as follows:

[0125] r t+1 =-|v t -a t | (15)

[0126] Where: v t represents the actual wind speed value at time point t, a t Indicates the action behavior of the model at time point t, that is, the corresponding output wind speed value. If the output action value, that is, the corrected NWP wind speed, is close to the actual wind speed, the reward will be close to 0, otherwise it will be far away from the negative direction of 0.

[0127] Step 4: Input the NWP interval statistical characteristics and historical meteorological data of the point to be corrected into the trained NWP wind speed correction model, and output the corrected wind speed.

[0128] Historical meteorological data mainly include data values ​​corresponding to wind speed, wind direction, temperature, humidity, and air pressure.

[0129] Example

[0130] The 2019 data set of the Keqi wind farm in Inner Mongolia (117.510593°N, 43.139382°E) is used for example analysis. The data set consists of historical wind speed, wind direction and corresponding NWP meteorological data measured at the station, with a time resolution of 15 minutes. Among them, the NWP meteorological data includes meteorological data such as wind speed, wind direction, temperature, humidity and air pressure of the wind farm. Considering that the wind speed has a seasonal variation law, the present invention uses 30 days of random seasons as the test data set of the model, and the remaining days of the four seasons as the training set.

[0131] The horizontal and vertical error indicators selected by the present invention are shown in Table 4. The vertical error evaluation indicators include mean absolute error (MAE), root mean squared error (RMSE), and mean absolute percentage error (MAPE). The indicator of the horizontal error is the correlation coefficient r, which can compare the similarity between the measured sequence and the predicted sequence and indirectly judge the size of the predicted horizontal error.

[0132] Table 4

[0133]

[0134] The present invention assumes that the selected NWP wind speed to be corrected point is d 0 , where the leading d 0 The NWP meteorological parameter characteristic vector X sequence can be expressed as [d t ,t=1,...,96], lag d 0 The NWP meteorological parameter characteristic vector sequence can be expressed as [d t ,t=-1,...,-96], where t represents the lead or lag d 0 The negative sign indicates that the interval sample point is lagged by d 0 , then the NWP wind speed correction point selected by the present invention is d 0 The basic time series interval range is [d t-96 ,d t+96 ], and contains d 0 Then calculate the relationship between each point in the basic time series interval and d 0 The weighted Euclidean distance similarity between them. Set the threshold D of the optimal time interval boundary point of the sample 0 is 0.8, and the strongly correlated time series intervals of each sample point are determined. The distribution of the leading / lagging time series intervals of each sample point is as follows Figure 7 As shown, the maximum range of the optimal lead / lag timing interval is [d t-40 ,d t+25 ], the minimum is [d t-17 ,d t+20 ], the time interval between the two is about 6 hours.

[0135] The present invention considers two types of time series interval forms: consistent intervals and inconsistent intervals. Interval consistency means that the time range of the leading / lagging time series intervals considered when extracting NWP meteorological data features for each sample is the same; interval inconsistency means that the optimal time series interval for each sample point is specifically constructed according to the meteorological feature vector of each sample point. The present invention selects 5 interval ranges with consistent time series intervals for experiments, namely 10% time series interval range, 20% time series interval range, 30% time series interval range, 40% time series interval range and 50% time series interval range. It can be seen from Table 5 that different time series interval selections have a certain impact on the NWP wind speed correction. The method used in the present invention to determine the optimal time series interval of each sample point based on weighted Euclidean distance has the best effect on the model correction of NWP wind speed, and the MAE, RMSE, MAPE, and r are 0.75m / s, 1.02m / s, 9.86% and 0.90 respectively.

[0136] Table 5

[0137]

[0138] The present invention selects typical days of each season as the result display, such as February 18 in spring, May 26 in summer, August 10 in autumn, and November 5 in winter. The NWP wind speed correction effect of considering the lead / lag time interval and only considering the lead time interval is compared and analyzed. The results of NWP wind speed correction on typical days of each season are shown in Figure 2. Figure 8 As shown in the figure, the wind speed in each season is not in a relatively stable state, but fluctuates to a certain extent. Among them, the wind speed fluctuation range and amplitude range in spring are the largest, resulting in the largest error in wind speed correction, followed by winter and autumn. The wind speed in summer is relatively small, and the error value of wind speed correction is also correspondingly smaller than that in other seasons.

[0139] Table 7 shows the NWP wind speed correction index of the selected test set in different seasons. The invention randomly selects 30 days in each season as the test data set of the model. Taking spring as an example, the MAE, RMSE, correlation coefficient r, and MAPE of the LLTI-RDPG model are 0.89m / s, 1.24m / s, 0.89, and 6.24%, respectively. By comparing the NWP wind speed correction effects of different models under two time series intervals, the lead / lag time series interval proposed by the present invention is used as the model feature extraction interval, which can effectively improve the prediction accuracy of the model. At the same time, compared with the original NWP data, the MAE based on the LLTI-RDPG model is increased by 2m / s, the RMSE is increased by 1.97m / s, the correlation coefficient r is increased by 0.2, and the MAPE is increased by 18.41%.

[0140] Table 7

[0141]

[0142] The present invention adopts a rolling correction method to correct the NWP wind speed, and compares the model correction effect under different prediction time lengths. Due to the rolling correction mode, the error of the NWP wind speed correction accumulates with the increase of the prediction time length, and the MAE and RMSE increase significantly before about 8 hours, but after more than 8 hours, the MAE and RMSE remain basically unchanged. Table 8 shows the situation of the model correcting the NWP wind speed index under different prediction time lengths. The present invention selects 1h, 4h, 12h and 24h to compare the correction results of the model. When the prediction time length is 1h, the MAE of the RDPG algorithm adopted by the present invention is 0.41m / s, the RMSE is 0.53m / s, the correlation coefficient r is 0.93, and the MAPE is 9.35%. Compared with the original NWP wind speed prediction accuracy, the correction accuracy of RDPG is significantly improved. At the same time, compared with the three benchmark algorithms of SVM, BPNN, and LSTM, the correction performance of RDPG is also improved to a certain extent. As the forecast time increases, the accuracy of NWP wind speed correction based on RDPG becomes more stable when the time scale is 4h, 12h and 24h. Therefore, the method proposed in the present invention can be applied to NWP wind speed correction in ultra-short-term and short-term time scales.

[0143] Table 8

[0144]

[0145] Through the comparison of experimental results, the present invention divides the differentiated optimal leading / lagging time series correlation intervals of each NWP wind speed to be corrected point based on weighted Euclidean distance similarity, reflects the potential impact of lateral errors on NWP wind speed correction, and effectively improves the model prediction effect; interval statistical features are used instead of NWP original meteorological features as model input, and the NWP meteorological feature evaluation of inconsistent time series intervals is realized based on SHAP theory, and features with positive gain for the model are obtained, which reduces the complexity of the model; the NWP wind speed correction model based on RDPG reduces the lateral and longitudinal errors of the predicted wind speed under different NWP wind speed fluctuation levels, and enhances the generalization ability of the model and the ability to process nonlinear data.

[0146] Experiments have proved that the RDPG wind speed correction method proposed in the present invention, which takes into account the bidirectional error characteristics of NWP wind speed, solves the problems existing in the prior art of not considering the potential impact of lateral errors caused by the lead or delay effect between the NWP wind speed sequence and the historical wind speed sequence on the NWP wind speed correction, the differences at various time points within the NWP, the lack of adaptive ability of traditional machine learning algorithms, and the low versatility of the model, which lead to insufficient NWP wind speed error correction ability under different fluctuation levels and affect the accuracy of wind power prediction under multiple time scales. The present invention provides an effective technical solution.

Claims

1. The RDPG wind speed correction method taking into account the lateral and longitudinal errors of NWP wind speed is characterized by: Follow the steps below to implement it: Step 1: Calculate the weighted Euclidean distance similarity based on the NWP meteorological data and the historical meteorological data, divide the NWP meteorological data into multiple time series intervals by weighted Euclidean distance similarity, and use each time series interval as the input feature extraction interval; Step 2: Construct the RDPG wind speed correction model. Based on the SHAP theory, determine the importance ranking of meteorological features in the input feature extraction interval, remove features that have a negative impact on the NWP wind speed correction, and obtain the training NWP meteorological data composed of the remaining meteorological features; Step 3: Use the long short-term memory algorithm to represent the Critic network in the RDPG wind speed correction model, establish the RDPG wind speed correction model based on cyclic deterministic policy gradient, train the NWP wind speed correction model by training NWP meteorological data and historical meteorological data, and obtain a complete RDPG wind speed correction model; Step 4: Input the NWP interval statistical characteristics and historical meteorological data of the point to be corrected into the trained NWP wind speed correction model, and output the corrected wind speed; The specific process of step 3 is as follows: Step 3.1: Define the state value function and the state-action-value function , as shown in formulas (6) and (7), Indicates that from a state Start executing the strategy Cumulative discount rewards, Indicates a state Execute an action And then execute the strategy Cumulative discount rewards; (6) (7) Where: is the discount factor, is the future time step, represents the agent at time step Instant rewards obtained on Step 3.2: The Actor-Critic network is used as the basic framework to implement the policy gradient for the RDPG wind speed correction model, which includes two neural networks, the Actor network and the Critic network. Evaluate the current Actor network's execution strategy , and according to the input state , output action After receiving the action selected by the agent, the environment gives the agent corresponding reward and punishment signal feedback , and transfer to a new environment state , and then output new actions , through the interaction between the agent and the environment, the transformation variable Input to the Critic network, and calculate the loss function TD_error according to the temporal difference method. The loss function TD_error adopts To express: (8) Step 3.3: Both the Actor network and the Critic network adopt a dual network structure, including a valuation network with the same structure. and target network : (9) (10); Step 3.4, the RDPG wind speed correction model includes an experience replay mechanism. By constructing an experience pool, the state transition process is first stored in the experience pool before the agent learns; during learning, random sampling is performed from the experience pool, and exploration is performed in the continuous action space based on formula (11) to construct an experience replay buffer pool R: (11) Where: is noise, used for random search action; R is composed of constitute, is the number of training steps of RDPG; Step 3.5: Based on equations (7) and (8), Monte Carlo simulation is used to establish Network and The learning strategy of the network, as shown in formula (12) and formula (13), uses a minibatch randomly selected from R as input to train the valuation network. : (12) (13) in, ; Step 3.6: The parameters of the target network are updated by slowly tracking the original network. The update formula is: (14) Step 3.7: The state in the RDPG wind speed correction model is extracted by The meteorological characteristics are used to represent it, and the training NWP meteorological data and historical meteorological data are used as training samples to input into the RDPG wind speed correction model to obtain a complete training RDPG wind speed correction model.

2. The RDPG wind speed correction method taking into account the lateral and longitudinal errors of NWP wind speed according to claim 1 is characterized in that: The specific process of step 1 is as follows: Step 1.1: Assume that the NWP meteorological data is the meteorological parameter characteristic vector of the NWP wind speed to be corrected point ,in , , , , They are the wind speed, wind direction, temperature, humidity, and pressure of the point, respectively, and the meteorological parameter characteristic vector of NWP wind speed at different times is taken as a sample point; Step 1.2: Normalize the meteorological parameter characteristic vector of NWP wind speed. i The characteristic vector of the meteorological parameters of the sample points is , then the normalized NWP wind speed meteorological parameter characteristic vector of the point to be corrected is , calculate the normalized i The weighted Euclidean distance similarity between the NWP wind speed sample point and the meteorological parameter feature vector of the point to be corrected is: (1) Where: is the number of meteorological parameters; For the The weight of each meteorological parameter; is the serial number of the meteorological parameter; is the number of sample points; Step 1.3: The value range of weighted Euclidean distance similarity is (0,1). The closer to 1, the stronger the correlation between the two points. Set the threshold of the boundary point of the optimal time series interval of the sample. D 0 is 0.8; Step 1.4: Determine the weight of each meteorological parameter based on the entropy weight method, assuming Historical daily sample data, each sample has The meteorological parameters form Order data matrix ,in Indicates History Day The value of the meteorological parameter, The entropy of a meteorological parameter is formula (2): (2) Where: , ; when =0, set , then The weights of the meteorological parameters are: (3) Where: ,but ; Step 1.5: Divide the NWP meteorological data by weighted Euclidean distance similarity to obtain the leading / lagging time series interval of the NWP wind speed to be corrected point, which is the input feature extraction interval.

3. The RDPG wind speed correction method taking into account the lateral and longitudinal errors of NWP wind speed according to claim 2 is characterized in that: The weighted Euclidean distance similarity S It is expressed as: (4)。 4. The RDPG wind speed correction method taking into account the lateral and longitudinal errors of NWP wind speed according to claim 1 is characterized in that: The meteorological features in the input feature extraction interval in step 2 include average wind speed, maximum wind speed, minimum wind speed, average wind direction, average temperature, average humidity, and average air pressure.

5. The RDPG wind speed correction method taking into account the lateral and longitudinal errors of NWP wind speed according to claim 1 is characterized in that: The specific process of step 2 is as follows: Step 2.1, construct the RDPG wind speed correction model, and calculate the marginal contribution of a meteorological feature added to the RDPG wind speed correction model; Step 2.2, calculate the marginal contribution of the same meteorological feature in different input feature extraction intervals; Step 2.3: Calculate the mean of all marginal contributions of the same meteorological feature, i.e. the corresponding Shapley value. The calculation method is shown in equations (4) and (5). Assume is the RDPG wind speed correction model, is the additive function used to interpret the model evaluation results, and x i For a certain meteorological feature, the mean of the marginal contribution of a certain meteorological feature is calculated as: (4) (5) Where: Predict baseline values ​​for the model; For the The Shapley value of the feature; is the total number of features; is the set of all input features; For collection Does not include A subset of features; For subset The number of features contained in ; For input features The RDPG wind speed correction model at , the feature set Not included in subset The other features of are set to zero; Step 2.4: Sort the meteorological features from large to small according to the mean absolute value of the marginal contribution of each meteorological feature, remove the three meteorological features with larger mean marginal contribution, and obtain the training NWP meteorological data composed of the remaining meteorological features.