Wind power prediction method and device fusing time dynamic characteristics and causal mechanism

By integrating time dynamic characteristics and causal mechanisms, using deep neural network models to predict wind power, the problems of low efficiency and low accuracy in the existing technology are solved, and more efficient and accurate wind power prediction is achieved.

CN119090062APending Publication Date: 2024-12-06CHANGAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411130395.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-16
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The existing technology of stroke power prediction efficiency is low and the accuracy is low. It is mainly because the hybrid model does not support parallel computing. The traditional position encoding layer is not conducive to timing modeling. The dot-generating algorithm of the multi-head attention mechanism lacks perception of local features, resulting in local environmental prediction. Insensitive.

Method used

Using the method of fusion time dynamic features and causal mechanism, the wind farm historical data is obtained for preprocessing and decomposition, multi-scale features are extracted, and the deep neural network model is trained for prediction using the time sequence encoding layer and the expanded causal convolution layer, overcoming the tradition Disadvantages of the method.

Benefits of technology

It improves the efficiency and accuracy of wind power prediction, can capture timing dynamic characteristics and local environmental information more accurately, and improves the prediction sensitivity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119090062A_ABST
    Figure CN119090062A_ABST
Patent Text Reader

Abstract

The invention provides a wind power prediction method fusing time dynamic characteristics and a causal mechanism, and relates to the technical field of renewable energy and time sequence prediction. The method comprises the following steps: preprocessing historical wind power data to obtain related variables of wind power, decomposing the historical wind power data, and splicing the decomposed historical wind power data with the related variables of the wind power to obtain multi-scale features; dividing the multi-scale features according to a time sliding window to obtain time multi-scale dynamic features; and inputting the first time multi-scale dynamic features into the trained wind power deep neural network prediction model to output a predicted value of the wind power. Thus, the historical wind power data are decomposed and spliced with the related variables of the wind power, parallel splicing processing is achieved, and the wind power prediction efficiency is improved; the prediction value of the wind power uses an improved Transformer model, and a time sequence coding layer and an expansion causal convolution layer are adopted, so that the wind power prediction precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of renewable energy and time series prediction, and in particular to a wind power prediction method integrating time dynamic characteristics and causal mechanisms. Background Art

[0002] With the continuous increase of wind power installed capacity around the world, the uncertainty and volatility of wind energy have brought challenges to grid dispatching and stable operation. However, accurate wind power forecasting can effectively solve the problems of grid dispatching and stable operation, and provide valuable reference information for grid operators. First, accurate wind power forecasting can help grid operators better coordinate traditional power generation operations and energy storage equipment. By accurately predicting the future short-term wind power generation, grid operators can reasonably arrange the input and output of traditional power generation equipment and flexibly adjust the use strategy of energy storage equipment according to actual conditions. This can not only ensure reliable and stable supply, but also maximize the use of wind energy resources. Secondly, by accurately predicting the trend of wind power changes in the future short-term, the corresponding number of wind turbines can be started or stopped at the appropriate time, which can better grasp the opportunity that is conducive to maximizing power generation benefits and avoid unnecessary losses. In addition, accurate wind power forecasting can also help reduce operating costs, help to timely monitor and make corresponding adjustments to possible abnormal situations, and save costs in rationally planning transmission and distribution systems and optimizing storage systems.

[0003] At present, the short-term wind power forecast is realized by using a hybrid model based on signal decomposition. The signal decomposition algorithm is used to decompose the complex wind power time series into several subsequences; the attention-based hybrid model is used to predict each subsequence, and the attention mechanism is introduced to optimize the weight distribution of the hybrid model; the weight distribution is dynamically adjusted according to the importance of the feature and the historical value, and each predicted value is added. However, the hybrid model does not support parallel computing, which makes the computational complexity high and the training efficiency low, resulting in low efficiency of wind power forecasting; the traditional position encoding layer is not conducive to time series modeling, and its multi-head attention mechanism dot product algorithm can only learn the dependency between time points in the sequence, lacks a good perception of the local features of the sequence, and is insensitive to the prediction of the local environment, resulting in low accuracy of wind power forecasting. Summary of the invention

[0004] The purpose of the embodiment of the present invention is to provide a wind power prediction method integrating time dynamic characteristics and causal mechanism, so as to solve the problems of low efficiency and low accuracy of wind power prediction.

[0005] To solve the above technical problems, the embodiments of the present invention provide the following technical solutions:

[0006] A first aspect of the present invention provides a wind power prediction method integrating time dynamic characteristics and causal mechanisms, the wind power prediction method comprising:

[0007] Obtain historical wind power data of wind farms;

[0008] Preprocess the historical wind power data to obtain relevant variables of wind power;

[0009] Decompose historical wind power data and combine them with relevant variables of wind power to obtain multi-scale features;

[0010] The multi-scale features are divided according to the time sliding window to obtain the time multi-scale dynamic features, which include the first time multi-scale dynamic features and the second time multi-scale dynamic features;

[0011] The first time multi-scale dynamic feature is input into the trained wind power deep neural network prediction model so that the trained wind power deep neural network prediction model outputs the predicted value of wind power. The trained wind power deep neural network prediction model includes a sequentially connected timing coding layer and a time convolutional network layer, and the time convolutional network layer includes an expanded causal convolutional layer. The trained wind power deep neural network prediction model is obtained by training the wind power deep neural network prediction model using the second time multi-scale dynamic feature.

[0012] A second aspect of the present invention provides a wind power prediction device integrating time dynamic characteristics and causal mechanisms, the wind power prediction device comprising:

[0013] An acquisition module is used to acquire historical wind power data of a wind farm;

[0014] A preprocessing module is used to preprocess historical wind power data to obtain relevant variables of wind power;

[0015] Decomposition and splicing module, used to decompose historical wind power data and splice it with relevant variables of wind power to obtain multi-scale features;

[0016] A division module is used to divide the multi-scale features according to the time sliding window to obtain the time multi-scale dynamic features, where the time multi-scale dynamic features include the first time multi-scale dynamic features and the second time multi-scale dynamic features;

[0017] The output module is used to input the first time multi-scale dynamic feature into the trained wind power deep neural network prediction model so that the trained wind power deep neural network prediction model outputs the predicted value of wind power. The trained wind power deep neural network prediction model includes a sequentially connected temporal coding layer and a temporal convolutional network layer, and the temporal convolutional network layer includes an expanded causal convolutional layer. The trained wind power deep neural network prediction model is obtained by training the wind power deep neural network prediction model using the second time multi-scale dynamic feature.

[0018] Compared with the prior art, the wind power prediction method and device provided by the present invention integrate time dynamic features and causal mechanisms, obtain historical wind power data of wind farms; preprocess the historical wind power data to obtain relevant variables of wind power; decompose the historical wind power data and splice them with relevant variables of wind power to obtain multi-scale features; divide the multi-scale features according to the time sliding window to obtain time multi-scale dynamic features; input the first time multi-scale dynamic features into the trained wind power deep neural network prediction model so that the trained wind power deep neural network prediction model outputs the predicted value of wind power, the trained wind power deep neural network prediction model includes a sequentially connected temporal coding layer and a time convolutional network layer, the time convolutional network layer includes an expanded causal convolutional layer, and the trained wind power deep neural network prediction model is obtained by training the wind power deep neural network prediction model using the second time multi-scale dynamic features. In this way, the historical wind power data is decomposed and spliced ​​with the relevant variables of wind power, which can realize parallel splicing processing and improve the efficiency of wind power prediction. The output wind power prediction value uses the trained wind power deep neural network prediction model. The trained wind power deep neural network prediction model adopts the time series coding layer and the dilated causal convolution layer, which overcomes the shortcomings of the traditional Transformer position coding layer that is not conducive to time series modeling and cannot capture the dynamic characteristics of time series, and its multi-head attention mechanism dot product algorithm can only learn the dependency between time points in the sequence, lacks good perception of local features, and is insensitive to local environmental predictions, thereby improving the accuracy of wind power prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] By reading the detailed description below with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0020] Figure 1 Schematic diagram of the process of wind power forecasting method integrating time dynamic characteristics and causal mechanism Figure 1 ;

[0021] Figure 2Schematic diagram of the process of wind power forecasting method integrating time dynamic characteristics and causal mechanism Figure 2 ;

[0022] Figure 3 The structure diagram of a wind power prediction device integrating temporal dynamic characteristics and causal mechanisms is schematically shown. DETAILED DESCRIPTION

[0023] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.

[0024] It should be noted that, unless otherwise specified, the technical terms or scientific terms used in the present invention should have the common meanings understood by those skilled in the art to which the present invention belongs.

[0025] The method in the embodiment of the present invention is described in detail below.

[0026] Figure 1 The flowchart of the wind power prediction method for integrating time dynamic characteristics and causal mechanism in the embodiment of the present invention is schematically shown. Figure 1 As shown, the wind power prediction method integrating time dynamic characteristics and causal mechanism may include:

[0027] S101. Obtain historical wind power data of a wind farm.

[0028] The historical wind power data of a wind farm includes wind power, as well as wind speed and direction at different heights, and climate factors such as temperature, humidity, and air pressure.

[0029] S102: Preprocess historical wind power data to obtain relevant variables of wind power.

[0030] Preprocessing of historical wind power data can screen outliers and missing values ​​to ensure the temporal integrity and high-quality predictability of wind power data.

[0031] S103, decomposing the historical wind power data, and concatenating the data with relevant variables of wind power to obtain multi-scale features.

[0032] The historical wind power data are decomposed and spliced ​​with relevant variables of wind power to represent the historical wind power data with multi-scale features.

[0033] S104. Divide the multi-scale features according to the time sliding window to obtain the time multi-scale dynamic features.

[0034] Among them, the time multi-scale dynamic features include first time multi-scale dynamic features and second time multi-scale dynamic features.

[0035] The multi-scale features are divided according to the time sliding window, and the features with historical time steps are used to predict the wind power in future time steps.

[0036] S105. Input the first time multi-scale dynamic features into the trained wind power deep neural network prediction model, so that the trained wind power deep neural network prediction model outputs the predicted value of wind power.

[0037] Among them, the trained wind power deep neural network prediction model includes a sequentially connected timing coding layer and a time convolutional network layer, the time convolutional network layer includes an expanded causal convolutional layer, and the trained wind power deep neural network prediction model is obtained by training the wind power deep neural network prediction model using the second time multi-scale dynamic characteristics.

[0038] The predicted value of wind power output by the trained wind power deep neural network prediction model is the predicted value of wind power at the predicted future moment.

[0039] Based on the above Figure 1 It can be seen from the implementation method that the embodiment of the present invention obtains historical wind power data of a wind farm; preprocesses the historical wind power data to obtain relevant variables of wind power; decomposes the historical wind power data and splices it with relevant variables of wind power to obtain multi-scale features; divides the multi-scale features according to the time sliding window to obtain time multi-scale dynamic features; inputs the first time multi-scale dynamic features into the trained wind power deep neural network prediction model, so that the trained wind power deep neural network prediction model outputs the predicted value of wind power, the trained wind power deep neural network prediction model includes a sequentially connected temporal coding layer and a time convolutional network layer, the time convolutional network layer includes an expanded causal convolutional layer, and the trained wind power deep neural network prediction model is obtained by training the wind power deep neural network prediction model using the second time multi-scale dynamic features. In this way, the historical wind power data is decomposed and spliced ​​with the relevant variables of wind power, which can realize parallel splicing processing and improve the efficiency of wind power prediction. The output wind power prediction value uses the trained wind power deep neural network prediction model. The trained wind power deep neural network prediction model adopts the time series coding layer and the dilated causal convolution layer, which overcomes the shortcomings of the traditional Transformer position coding layer that is not conducive to time series modeling and cannot capture the dynamic characteristics of time series, and its multi-head attention mechanism dot product algorithm can only learn the dependency between time points in the sequence, lacks good perception of local features, and is insensitive to local environmental predictions, thereby improving the accuracy of wind power prediction.

[0040] As a refinement and expansion of the above embodiment, Figure 2 The process of a wind power prediction method integrating time dynamic characteristics and causal mechanism in an embodiment of the present invention is as follows Figure 2 , see Figure 2 As shown, a wind power prediction method integrating time dynamic characteristics and causal mechanism provided by an embodiment of the present invention may include:

[0041] S201. Obtain historical wind power data of a wind farm.

[0042] The historical wind power data of a wind farm includes wind power, as well as wind speed and direction at different heights, and climate factors such as temperature, humidity, and air pressure.

[0043] The following steps S202 to S203 are specific operations for preprocessing historical wind power data to obtain relevant variables of wind power.

[0044] S202: Clean the historical wind power data to obtain cleaned historical wind power data.

[0045] The historical wind power data is cleaned to screen outliers, identify missing values, and complete the data with the most recent values ​​to obtain the cleaned historical wind power data, ensuring the time series integrity and high-quality predictability of the wind power data.

[0046] Specifically, the historical wind power data is divided into four categories of seasonal wind power data according to the preset time, namely spring, summer, autumn and winter. For each category of seasonal wind power data, the Z-score is calculated using the following formula:

[0047]

[0048] Among them, Z i is the Z score, x i is the wind power data at the ith moment in each category of seasonal wind power data, μ is the mean of all wind power data in each category of seasonal wind power data, and σ is the standard deviation of all wind power data in each category of seasonal wind power data.

[0049] Determine whether the Z score is within the preset interval. If so, the wind power data in the seasonal wind power data of each category corresponding to the Z score is an outlier, and the outlier is replaced by the median of the seasonal wind power data of each category; if not, the wind power data in the seasonal wind power data of each category corresponding to the Z score is a normal value. The preset interval can be [-2,2], and the preset interval is not specifically limited here.

[0050] The missing values ​​are determined in the seasonal wind power data of each category through the Pandas library in Python; when the missing value is a single missing value, the forward propagation method is used to fill the missing value with the previous normal value adjacent to the missing value;

[0051] When the missing values ​​are continuous missing values, the continuous missing values ​​are preliminarily estimated according to the linear interpolation and Lagrange interpolation algorithms to obtain the corresponding first interpolation data and second interpolation data; the first interpolation data and the second interpolation data are weighted averaged to obtain the final interpolation data; and the missing values ​​are filled with the final interpolation data.

[0052] The cleaned historical wind power data obtained by filling in the missing values ​​can also be called the filled historical wind power data. Filling in the missing values ​​not only maintains the temporal continuity of the data, but also takes into account the stability of seasonal wind power data of various categories.

[0053] S203. Based on the Pearson correlation coefficient, feature screening is performed on the cleaned historical wind power data to screen out relevant variables of wind power.

[0054] The selected wind power related variables are the variables most related to wind power, and the wind power related variables are used as the features of splicing.

[0055] The following steps S204 to S205 are specific operations for sequentially decomposing and splicing the historical wind power data to obtain multi-scale features.

[0056] S204. Decompose the historical wind power data according to the variational mode decomposition algorithm to obtain multi-scale sub-sequences.

[0057] Specifically, the historical wind power data is decomposed into k multi-scale subsequences using the variational mode decomposition algorithm, that is, into k subsequences of different frequency components {IMF1,IMF2,…,IMF k}, realize multi-scale characterization of historical wind power data, IMF k is the kth multi-scale subsequence.

[0058] S205: Concatenate the multi-scale subsequences with relevant variables of wind power to obtain multi-scale features.

[0059] Specifically, the multi-scale subsequence {IMF1,IMF2,…,IMF k} and the wind power related variable I to form a multi-scale feature, which is expressed as X = {IMF1,IMF2,…,IMF k ,I}.

[0060] S206: Divide the multi-scale features according to the time sliding window to obtain the time multi-scale dynamic features.

[0061] Before dividing the multi-scale features according to the time sliding window to obtain the time multi-scale dynamic features, the method further includes:

[0062] Step A1: Normalize the multi-scale features to obtain normalized multi-scale features.

[0063] Specifically, the multi-scale features are normalized using the following formula to obtain normalized multi-scale features:

[0064]

[0065] Among them, X norm is the normalized multi-scale feature, X is the multi-scale feature, X min is the minimum value of multi-scale features, X max is the maximum value of multi-scale features.

[0066] Step A2: Divide the normalized multi-scale features into training sets and test sets according to a preset ratio.

[0067] The training set is a set of multi-scale features including the second normalization, and the test set is a set of multi-scale features including the first normalization.

[0068] The preset ratio may be 7:3. There may be multiple preset ratios, and no specific limitation is made here.

[0069] For example, the normalized multi-scale feature X norm , divided into training set X according to 7:3 train and the test set X test .

[0070] Correspondingly, the multi-scale features are divided according to the time sliding window to obtain the time multi-scale dynamic features, including:

[0071] The training set and test set are divided according to the time sliding window to obtain the target training set and target test set.

[0072] Among them, the target training set is a set containing the second time multi-scale dynamic features, and the target test set is a set containing the first time multi-scale dynamic features.

[0073] The training set containing the second normalized multi-scale features is divided according to the time sliding window to obtain a target training set containing the second time multi-scale dynamic features; the test set containing the first normalized multi-scale features is divided according to the time sliding window to obtain a target test set containing the first time multi-scale dynamic features.

[0074] The training set and test set are divided according to the time sliding window to obtain the target training set and the target test set. The features of the historical time step can be used to predict the wind power of the future time step.

[0075] S207. Construct a wind power deep neural network prediction model.

[0076] Among them, the wind power deep neural network prediction model includes a sequentially connected temporal coding layer, a temporal convolutional network layer, a linear layer, a multi-head attention mechanism layer, a normalization layer, a 2-layer linear layer, a normalization layer and a linear layer.

[0077] The temporal convolutional network layer includes 2 dilated causal convolutional layers, 2 weight normalization layers, 2 ReLU activation function layers and 2 Dropout layers. The multi-head attention mechanism layer includes multiple self-attention mechanism layers, Softmax function layers and linear layers.

[0078] The temporal convolutional network layer includes a dilated causal convolution layer, a weight normalization layer, a ReLU activation function layer, a Dropout layer, a dilated causal convolution layer, a weight normalization layer, a ReLU activation function layer, and a Dropout layer, which are connected in sequence.

[0079] S208. Use the target training set to train the wind power deep neural network prediction model to obtain a trained wind power deep neural network prediction model.

[0080] Specifically, the target training set is input into the wind power deep neural network prediction model for training, the mean square error is used as the error loss of training, and after iterative training, the optimal wind power deep neural network prediction model, that is, the trained wind power deep neural network prediction model, is saved.

[0081] Specifically, the target training set is used to train the wind power deep neural network prediction model to obtain a trained wind power deep neural network prediction model, including:

[0082] Step S1: input the target training set into the time series coding layer to perform time series information coding and dynamic feature extraction, so that the time series coding layer outputs non-periodic components and periodic components.

[0083] Specifically, the target training set is input into the time coding layer (Learning a Vector Representation of Time, Time2Vec) to encode the time information and extract the dynamic features, and the second time multi-scale dynamic features in the target training set are decomposed into non-periodic components and periodic components, so that the time coding layer outputs non-periodic components and periodic components.

[0084] Step S2: Input the non-periodic component and the periodic component into the temporal convolutional network layer respectively to generate the corresponding query matrix and key matrix.

[0085] Specifically, the non-periodic component and the periodic component are respectively input into the temporal convolutional network layer (TCN) to generate the corresponding query matrix Q and key matrix K, including:

[0086] Step B1: Input the non-periodic component and the periodic component into the dilated causal convolution layer, the weight normalization layer, the ReLU activation function layer, the Dropout layer, the dilated causal convolution layer, the weight normalization layer, the ReLU activation function layer and the Dropout layer respectively, to output the corresponding first intermediate matrix and second intermediate matrix.

[0087] The convolution kernels of the two dilated causal convolution layers are of different sizes. The non-periodic components and periodic components are input into the dilated causal convolution layers with different convolution kernel sizes, respectively, gradually expanding the perception range of the historical target training set input into the previous layer, i.e., the time series encoding layer. By selecting convolution kernels of different sizes, the wind power deep neural network prediction model can flexibly focus on local time series information of different time scales.

[0088] Step B2: Add the first intermediate matrix and the non-periodic component to obtain a query matrix, and add the second intermediate matrix and the periodic component to obtain a key matrix.

[0089] Adding the first intermediate matrix and the non-periodic component to obtain the query matrix, and adding the second intermediate matrix and the periodic component to obtain the key matrix can eliminate the vanishing gradient and the exploding gradient to a certain extent.

[0090] Step S3: Input the non-periodic component and the periodic component into the linear layer to generate a value matrix.

[0091] The non-periodic components and the periodic components are input into the temporal convolutional network layer to generate the corresponding query matrix and key matrix, and the non-periodic components and the periodicity are input into the linear layer to generate the value matrix V, which maintains the original features of the non-periodic components and periodicity output by the temporal coding layer and ensures the integrity of the sequence information. Since the query matrix Q and the key matrix K are the outputs of TCN, their sensitivity to local time series features is enhanced, and the relationship between nodes is captured more accurately.

[0092] Step S4: input the query matrix, the key matrix, and the value matrix into the multi-head attention mechanism layer so that the multi-head attention mechanism layer outputs the first intermediate feature.

[0093] Specifically, the query matrix Q, the key matrix K, and the value matrix V are input into the multi-head attention mechanism layer so that the multi-head attention mechanism layer outputs the first intermediate feature, including:

[0094] Step C1: Input the query matrix Q, key matrix K and value matrix V into multiple self-attention mechanism layers respectively to calculate the inner product of each row vector in the query matrix Q and the key matrix K, and divide the inner product by the square root of the key matrix K to output the corresponding fifth intermediate feature, sixth intermediate feature and seventh intermediate feature.

[0095] In order to prevent the inner product from being too large, the inner product is divided by the square root of the key matrix K. The number of self-attention mechanism layers can be 4.

[0096] Step C2: Input the fifth intermediate feature, the sixth intermediate feature and the seventh intermediate feature into the Softmax function layer respectively to calculate the corresponding first attention coefficient, the second attention coefficient and the third attention coefficient, and multiply the first attention coefficient, the second attention coefficient and the third attention coefficient by the value matrix V respectively to obtain the corresponding eighth intermediate feature, the ninth intermediate feature and the tenth intermediate feature.

[0097] Step C3: concatenate the eighth intermediate feature, the ninth intermediate feature, and the tenth intermediate feature, and input the concatenated features into the linear layer so that the linear layer outputs the first intermediate feature.

[0098] Step S5: Add the non-periodic component and the periodic component to the first intermediate feature respectively, and input them into a normalization layer so that the normalization layer outputs a second intermediate feature.

[0099] Step S6: input the second intermediate feature into two linear layers so that the two linear layers output a third intermediate feature, add the third intermediate feature to the second intermediate feature, and pass the added feature through a normalization layer so that the normalization layer outputs a fourth intermediate feature.

[0100] One of the two linear layers contains a ReLU activation function.

[0101] Step S7: input the fourth intermediate feature into the linear layer so that the linear layer outputs a preset wind power.

[0102] The linear layer is a linear layer with an output dimension of 1.

[0103] Step S8, repeat the above steps S1 to S7 to train the wind power deep neural network prediction model until the number of iterations meets the preset number, and stop the iteration to obtain the trained wind power deep neural network prediction model.

[0104] The preset number of times can be determined according to the prediction conditions. There can be multiple preset numbers, and no specific limitation is made here.

[0105] S209: Input the first time multi-scale dynamic features into the trained wind power deep neural network prediction model, so that the trained wind power deep neural network prediction model outputs the predicted value of wind power.

[0106] The trained wind power deep neural network prediction model has the same structure as the wind power deep neural network prediction model. The trained wind power deep neural network prediction model includes a sequentially connected temporal coding layer, a temporal convolutional network layer, a linear layer, a multi-head attention mechanism layer, a normalization layer, two linear layers, a normalization layer, and a linear layer. The temporal convolutional network layer includes two dilated causal convolutional layers, two weight normalization layers, two ReLU activation function layers, and two Dropout layers. The multi-head attention mechanism layer includes multiple self-attention mechanism layers, a Softmax function layer, and a linear layer.

[0107] The predicted value of wind power can be used in the field of grid dispatch and management, such as grid operators effectively coordinating traditional power generation operations and energy storage equipment.

[0108] The effect of the present invention can be further illustrated by the following simulation experiment.

[0109] Simulation conditions: The present invention uses the deep learning framework Tensorflow-GPU 2.6 to conduct experiments on a 12th Gen Intel(R) Core(TM) i7-12650H CPU, an NVIDIA GeForce RTX 4060 Laptop GPU, and a Windows 11 operating system. The wind power data uses the 2019 wind power data of an onshore wind farm in Xinjiang, China.

[0110] The methods compared in the experiment are as follows: one is based on the classic Transformer prediction method, which is recorded as the first method in the experiment; the other is a hybrid model prediction method based on the self-attention mechanism, which is recorded as the second method in the experiment; the last one is a hybrid model prediction method based on signal decomposition, which is marked as the third method in the experiment.

[0111] Simulation content: According to a specific implementation of the present invention, the wind power prediction accuracy for the next 6 hours is calculated and evaluated with the accuracy of the first method, the second method and the third method.

[0112] The mean absolute error (MAE), root mean square error (RMSE) and R square (R 2 ). The specific formula is as follows:

[0113]

[0114]

[0115] Among them, P t is the actual wind force at time step t, is the predicted wind force at time step t, is the average wind speed value; is the total count of all wind power prediction values.

[0116] Table 1 Prediction and evaluation indicators of wind power

[0117] method RMSE MAE <![CDATA[R 2 ]]> First method 22.5976 17.4587 0.8794 Second method 11.4807 8.9471 0.9691 The third method 11.1912 7.1716 0.9710 Method of the present invention 8.8152 6.2658 0.9819

[0118] As can be seen from Table 1, since the wind power prediction method that integrates time dynamic characteristics and causal mechanisms adopted by the present invention fully exploits the time information of wind power time series, a higher wind power prediction effect can be achieved, which verifies the advancement of the present invention.

[0119] The method of the present invention improves the prediction accuracy and efficiency because the input integrates the time multi-scale dynamic feature decomposition and the trained wind power deep neural network prediction model. Compared with the existing methods, the method of the present invention has higher prediction accuracy and reduces the computational complexity. At the same time, the present invention uses a time series coding layer (Time2vec) and a causal attention mechanism, namely an expanded causal convolution layer, to update and optimize the wind power deep neural network prediction model, overcoming the shortcomings of the traditional Transformer position coding layer that is not conducive to time series modeling and cannot capture time series dynamic features, and its multi-head attention mechanism dot product algorithm can only learn the dependencies between time points in the sequence, lacks good perception of local features, and is insensitive to local environmental predictions, thereby improving the prediction accuracy.

[0120] The method of the present invention mainly realizes accurate prediction of future short-term wind power of a wind farm based on climate variables such as wind speed of the wind farm and historical power, and can be used in the field of power grid dispatching and management. For example, power grid operators can effectively coordinate traditional power generation operations and energy storage equipment, improve wind energy utilization, reduce operating costs, make full use of wind energy potential, and promote the sustainable development of the renewable energy industry.

[0121] Based on the same inventive concept, as an implementation of the above-mentioned wind power prediction method integrating time dynamic characteristics and causal mechanism, an embodiment of the present invention further provides a wind power prediction device integrating time dynamic characteristics and causal mechanism. Figure 3 is a structural diagram of the device in the embodiment of the present invention, see Figure 3 As shown, the device may include:

[0122] An acquisition module 301 is used to acquire historical wind power data of a wind farm;

[0123] A preprocessing module 302 is used to preprocess historical wind power data to obtain relevant variables of wind power;

[0124] A decomposition and splicing module 303 is used to decompose the historical wind power data and splice it with relevant variables of wind power to obtain multi-scale features;

[0125] A division module 304 is used to divide the multi-scale features according to the time sliding window to obtain a time multi-scale dynamic feature, where the time multi-scale dynamic feature includes a first time multi-scale dynamic feature and a second time multi-scale dynamic feature;

[0126] The output module 305 is used to input the first time multi-scale dynamic feature into the trained wind power deep neural network prediction model so that the trained wind power deep neural network prediction model outputs the predicted value of wind power. The trained wind power deep neural network prediction model includes a sequentially connected timing coding layer and a time convolutional network layer, and the time convolutional network layer includes an expanded causal convolutional layer. The trained wind power deep neural network prediction model is obtained by training the wind power deep neural network prediction model using the second time multi-scale dynamic feature.

[0127] Among them, before dividing the multi-scale features according to the time sliding window to obtain the time multi-scale dynamic features, it also includes: normalizing the multi-scale features to obtain normalized multi-scale features; dividing the normalized multi-scale features into a training set and a test set according to a preset ratio, the training set is a set containing the second normalized multi-scale features, and the test set is a set containing the first normalized multi-scale features; accordingly, dividing the multi-scale features according to the time sliding window to obtain the time multi-scale dynamic features, including: dividing the training set and the test set according to the time sliding window respectively to obtain a target training set and a target test set, the target training set is a set containing the second time multi-scale dynamic features, and the target test sets are all sets containing the first time multi-scale dynamic features.

[0128] Among them, before the first time multi-scale dynamic features are input into the trained wind power deep neural network prediction model so that the trained wind power deep neural network prediction model outputs the predicted value of wind power, it also includes: constructing a wind power deep neural network prediction model, the wind power deep neural network prediction model includes a sequentially connected temporal coding layer, a temporal convolutional network layer, a linear layer, a multi-head attention mechanism layer, a normalization layer, a 2-layer linear layer, a normalization layer and a linear layer; using the target training set to train the wind power deep neural network prediction model to obtain a trained wind power deep neural network prediction model.

[0129] Among them, the wind power deep neural network prediction model is trained by using the target training set to obtain the trained wind power deep neural network prediction model, including: step S1, inputting the target training set into the time series coding layer to perform time series information encoding and dynamic feature extraction, so that the time series coding layer outputs non-periodic components and periodic components; step S2, inputting the non-periodic components and periodic components into the time convolution network layer respectively to generate corresponding query matrices and key matrices; step S3, inputting the non-periodic components and periodic components into the linear layer to generate a value matrix; step S4, inputting the query matrix, the key matrix and the value matrix into the multi-head attention mechanism layer, so that the multi-head attention mechanism layer outputs the first intermediate feature; step S5, The non-periodic component and the periodic component are respectively added to the first intermediate feature and input into the normalization layer so that the normalization layer outputs the second intermediate feature; step S6, the second intermediate feature is input into the two-layer linear layer so that the two-layer linear layer outputs the third intermediate feature, the third intermediate feature is added to the second intermediate feature, and the added feature is passed through the normalization layer so that the normalization layer outputs the fourth intermediate feature; step S7, the fourth intermediate feature is input into the linear layer so that the linear layer outputs the preset wind power; step S8, repeat the above steps S1 to S7 to train the wind power deep neural network prediction model until the number of iterations meets the preset number, and stop the iteration to obtain the trained wind power deep neural network prediction model.

[0130] Among them, the temporal convolutional network layer includes 2 dilated causal convolutional layers, 2 weight normalization layers, 2 ReLU activation function layers and 2 Dropout layers, and the multi-head attention mechanism layer includes multiple self-attention mechanism layers, Softmax function layers and linear layers.

[0131] Among them, in step S2, the non-periodic component and the periodic component are respectively input into the temporal convolutional network layer to generate the corresponding query matrix and key matrix, including: the non-periodic component and the periodic component are respectively input into the dilated causal convolution layer, the weight normalization layer, the ReLU activation function layer, the Dropout layer, the dilated causal convolution layer, the weight normalization layer, the ReLU activation function layer and the Dropout layer in sequence to output the corresponding first intermediate matrix and the second intermediate matrix; the first intermediate matrix and the non-periodic component are added to obtain the query matrix, and the second intermediate matrix and the periodic component are added to obtain the key matrix.

[0132] Among them, in step S4, the query matrix, the key matrix and the value matrix are input into the multi-head attention mechanism layer so that the multi-head attention mechanism layer outputs the first intermediate feature, including: the query matrix, the key matrix and the value matrix are respectively input into multiple self-attention mechanism layers to calculate the inner product of each row vector in the query matrix and the key matrix, and the inner product is divided by the square root of the key matrix to output the corresponding fifth intermediate feature, sixth intermediate feature and seventh intermediate feature; the fifth intermediate feature, the sixth intermediate feature and the seventh intermediate feature are respectively input into the Softmax function layer to calculate the corresponding first attention coefficient, the second attention coefficient and the third attention coefficient, and the first attention coefficient, the second attention coefficient and the third attention coefficient are respectively multiplied by the value matrix to obtain the corresponding eighth intermediate feature, the ninth intermediate feature and the tenth intermediate feature; the eighth intermediate feature, the ninth intermediate feature and the tenth intermediate feature are spliced, and the spliced ​​features are input into the linear layer so that the linear layer outputs the first intermediate feature.

[0133] The preprocessing module 302 is specifically used to clean the historical wind power data to obtain cleaned historical wind power data; and perform feature screening on the cleaned historical wind power data according to the Pearson correlation coefficient to screen out relevant variables of wind power.

[0134] The decomposition and splicing module 303 is specifically used to decompose the historical wind power data according to the variational mode decomposition algorithm to obtain multi-scale sub-sequences; and splice the multi-scale sub-sequences with relevant variables of wind power to obtain multi-scale features.

[0135] It should be pointed out here that the above description of the embodiment of the wind power prediction device integrating time dynamic characteristics and causal mechanisms is similar to the description of the embodiment of the wind power prediction method integrating time dynamic characteristics and causal mechanisms, and has similar beneficial effects as the embodiment of the wind power prediction method integrating time dynamic characteristics and causal mechanisms. For technical details not disclosed in the embodiment of the wind power prediction device integrating time dynamic characteristics and causal mechanisms in the embodiment of the present invention, please refer to the description of the embodiment of the wind power prediction method integrating time dynamic characteristics and causal mechanisms in the present invention for understanding.

[0136] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A wind power prediction method integrating time dynamic characteristics and causal mechanism, characterized in that: The wind power prediction method comprises: Obtain historical wind power data of wind farms; Preprocessing the historical wind power data to obtain relevant variables of wind power; Decomposing the historical wind power data and concatenating the data with variables related to the wind power to obtain multi-scale features; The multi-scale features are divided according to the time sliding window to obtain time multi-scale dynamic features, wherein the time multi-scale dynamic features include a first time multi-scale dynamic feature and a second time multi-scale dynamic feature; The first time multi-scale dynamic feature is input into a trained wind power deep neural network prediction model so that the trained wind power deep neural network prediction model outputs the predicted value of the wind power, the trained wind power deep neural network prediction model includes a sequentially connected timing coding layer and a time convolutional network layer, the time convolutional network layer includes an expanded causal convolutional layer, and the trained wind power deep neural network prediction model is obtained by training a wind power deep neural network prediction model using the second time multi-scale dynamic feature.

2. The wind power prediction method according to claim 1, characterized in that: The preprocessing of the historical wind power data to obtain wind power related variables includes: Performing data cleaning on the historical wind power data to obtain cleaned historical wind power data; According to the Pearson correlation coefficient, feature screening is performed on the cleaned historical wind power data to screen out relevant variables of the wind power.

3. The wind power prediction method according to claim 1, characterized in that: The historical wind power data is decomposed and combined with the relevant variables of the wind power to obtain multi-scale features, including: Decomposing the historical wind power data according to a variational mode decomposition algorithm to obtain a multi-scale subsequence; The multi-scale subsequences are concatenated with the wind power related variables to obtain the multi-scale features.

4. The wind power prediction method according to claim 1, characterized in that: Before dividing the multi-scale features according to the time sliding window to obtain the time multi-scale dynamic features, the method further includes: Normalizing the multi-scale features to obtain normalized multi-scale features; Dividing the normalized multi-scale features into a training set and a test set according to a preset ratio, wherein the training set is a set including the second normalized multi-scale features, and the test set is a set including the first normalized multi-scale features; Accordingly, the multi-scale features are divided according to the time sliding window to obtain the time multi-scale dynamic features, including: The training set and the test set are divided according to the time sliding window to obtain a target training set and a target test set, respectively. The target training set is a set containing the second time multi-scale dynamic features, and the target test set is a set containing the first time multi-scale dynamic features.

5. The wind power prediction method according to claim 4, characterized in that: Before inputting the first time multi-scale dynamic feature into a trained wind power deep neural network prediction model so that the trained wind power deep neural network prediction model outputs the predicted value of the wind power, the method further includes: Constructing a wind power deep neural network prediction model, the wind power deep neural network prediction model includes the sequentially connected temporal coding layer, the temporal convolutional network layer, the linear layer, the multi-head attention mechanism layer, the normalization layer, the 2-layer linear layer, the normalization layer and the linear layer; The wind power deep neural network prediction model is trained using the target training set to obtain the trained wind power deep neural network prediction model.

6. The wind power prediction method according to claim 5, characterized in that: The step of training the wind power deep neural network prediction model using the target training set to obtain the trained wind power deep neural network prediction model includes: Step S1, inputting the target training set into the temporal coding layer to perform temporal information coding and dynamic feature extraction, so that the temporal coding layer outputs a non-periodic component and a periodic component; Step S2, inputting the non-periodic component and the periodic component into the temporal convolutional network layer respectively to generate a corresponding query matrix and a key matrix; Step S3, inputting the non-periodic component and the periodic component into the linear layer to generate a value matrix; Step S4: input the query matrix, the key matrix and the value matrix into the multi-head attention mechanism layer, so that the multi-head attention mechanism layer outputs a first intermediate feature; Step S5, adding the non-periodic component and the periodic component to the first intermediate feature respectively, and inputting the results into the normalization layer, so that the normalization layer outputs a second intermediate feature; Step S6: input the second intermediate feature into the two-layer linear layer so that the two-layer linear layer outputs a third intermediate feature, add the third intermediate feature to the second intermediate feature, and pass the added feature through the normalization layer so that the normalization layer outputs a fourth intermediate feature; Step S7, inputting the fourth intermediate feature into the linear layer, so that the linear layer outputs a preset wind power; Step S8, repeat the above steps S1 to S7 to train the wind power deep neural network prediction model until the number of iterations meets the preset number, and stop the iteration to obtain the trained wind power deep neural network prediction model.

7. The wind power prediction method according to claim 6, characterized in that: The temporal convolutional network layer includes 2 dilated causal convolutional layers, 2 weight normalization layers, 2 ReLU activation function layers and 2 Dropout layers, and the multi-head attention mechanism layer includes multiple self-attention mechanism layers, a Softmax function layer and a linear layer.

8. The wind power prediction method according to claim 7, characterized in that: In step S2, the non-periodic component and the periodic component are respectively input into the temporal convolutional network layer to generate a corresponding query matrix and a key matrix, including: Inputting the non-periodic component and the periodic component into the dilated causal convolution layer, the weight normalization layer, the ReLU activation function layer, the Dropout layer, the dilated causal convolution layer, the weight normalization layer, the ReLU activation function layer and the Dropout layer in sequence, respectively, to output a corresponding first intermediate matrix and a second intermediate matrix; The first intermediate matrix and the non-periodic component are added to obtain the query matrix, and the second intermediate matrix and the periodic component are added to obtain the key matrix.

9. The wind power prediction method according to claim 7, characterized in that: In step S4, inputting the query matrix, the key matrix and the value matrix into the multi-head attention mechanism layer so that the multi-head attention mechanism layer outputs a first intermediate feature includes: Inputting the query matrix, the key matrix, and the value matrix into the multiple self-attention mechanism layers respectively to calculate the inner product of each row vector in the query matrix and the key matrix, and dividing the inner product by the square root of the key matrix, and outputting the corresponding fifth intermediate feature, sixth intermediate feature, and seventh intermediate feature; Inputting the fifth intermediate feature, the sixth intermediate feature, and the seventh intermediate feature into the Softmax function layer respectively to calculate the corresponding first attention coefficient, the second attention coefficient, and the third attention coefficient, and multiplying the first attention coefficient, the second attention coefficient, and the third attention coefficient by the value matrix respectively to obtain the corresponding eighth intermediate feature, the ninth intermediate feature, and the tenth intermediate feature; The eighth intermediate feature, the ninth intermediate feature and the tenth intermediate feature are concatenated, and the concatenated features are input into the linear layer, so that the linear layer outputs the first intermediate feature.

10. A wind power prediction device integrating time dynamic characteristics and causal mechanism, characterized in that: The wind power prediction device comprises: An acquisition module is used to acquire historical wind power data of a wind farm; A preprocessing module, used for preprocessing the historical wind power data to obtain relevant variables of wind power; A decomposition and splicing module, used for decomposing the historical wind power data and splicing it with the relevant variables of the wind power to obtain multi-scale features; A division module, used for dividing the multi-scale features according to the time sliding window to obtain a time multi-scale dynamic feature, wherein the time multi-scale dynamic feature includes a first time multi-scale dynamic feature and a second time multi-scale dynamic feature; An output module is used to input the first time multi-scale dynamic feature into a trained wind power deep neural network prediction model so that the trained wind power deep neural network prediction model outputs the predicted value of the wind power, the trained wind power deep neural network prediction model includes a sequentially connected timing coding layer and a time convolutional network layer, the time convolutional network layer includes an expanded causal convolutional layer, and the trained wind power deep neural network prediction model is obtained by training the wind power deep neural network prediction model using the second time multi-scale dynamic feature.