A wind power prediction method and system based on multiple time scales

By performing multi-time scale decomposition and cross-scale fusion of wind farm data, a multi-scale graph structure and adaptive graph convolution model are constructed, which solves the problem of low prediction accuracy of wind power in the existing technology, and achieves higher prediction accuracy and robustness, meeting the scheduling needs of modern power systems.

CN119646636BActive Publication Date: 2025-04-25GUANGDONG UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510180695.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-19
Publication Date
2025-04-25
Estimated Expiration
2045-02-19

AI Technical Summary

Technical Problem

The prior art is difficult to effectively capture the complex changing characteristics of wind power on multiple time scales, resulting in low prediction accuracy of wind power power and unable to meet the refined scheduling and management requirements of modern power systems.

Method used

A wind power power prediction method based on multi-time scale is proposed. By acquiring wind farm data for preprocessing, multi-time scale decomposition is carried out, multi-scale graph structure is constructed, and cross-scale fusion is used to fusion with adaptive graph convolution units and multi-head attention mechanisms, and finally output the wind power power prediction result.

Benefits of technology

Through multi-time scale feature capture and cross-scale fusion, the accuracy and robustness of wind power power prediction are improved, which can better reflect the actual correlation of the time series and meet the refined scheduling needs of the power system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119646636B_ABST
    Figure CN119646636B_ABST
Patent Text Reader

Abstract

The present invention proposes a wind power prediction method and system based on multiple time scales, which relates to the technical field of wind power prediction. The method comprises preprocessing wind farm data to obtain historical time series data; performing multi-time scale decomposition on the historical time series data, inputting the multi-scale time decomposition result into a preset wind power prediction model, a multi-scale graph structure unit constructing a multi-scale graph structure according to the multi-scale time decomposition result, outputting a multi-hop neighbor set of a target node in the multi-scale graph structure, an adaptive graph convolution unit constructing an adaptive adjacency matrix according to the multi-hop neighbor set, updating the node representation using the adaptive adjacency matrix, and outputting the node representation feature; a cross-scale fusion unit cross-scales the node representation feature through a multi-head attention mechanism to obtain a cross-scale fusion result; and a prediction unit receiving the cross-scale fusion result and outputting a wind power prediction result. The present invention can effectively improve the wind power prediction accuracy of a wind farm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] As the global demand for clean energy continues to grow, wind energy, as a sustainable form of energy, accounts for an increasing proportion in the energy structure. The large-scale construction and grid-connected operation of wind farms have brought many challenges to the stable operation and scheduling of power systems. Therefore, wind power prediction has become one of the key technologies to ensure the reliability, economy and safety of power systems.

[0003] Wind power has significant intermittency, volatility and uncertainty. It is affected by many complex factors, including meteorological conditions (such as wind speed, wind direction, temperature, air pressure, etc.), topography and the characteristics of the wind turbine itself. The dynamic changes of these factors make wind power present various changing patterns at different time scales. For example, in the short-term time scale (such as minutes to hours), the rapid fluctuation of wind speed will lead to drastic changes in wind power; while in the medium and long-term time scale (such as days to weeks), seasonal changes, the movement of weather systems and other factors have a slower but continuous impact on wind power. Existing wind power prediction methods often find it difficult to fully capture the complex changing characteristics of wind power at multiple time scales. For example, some wind power prediction methods based on a single model or simple statistical methods have limited prediction accuracy when facing the nonlinearity and non-stationarity of wind power. They may perform well on a specific time scale, but cannot take into account the prediction needs of multiple different time scales at the same time, and it is difficult to meet the requirements of refined scheduling and management of modern power systems. In addition, with the continuous increase in wind power installed capacity, the power system has higher and higher requirements for the accuracy and timeliness of wind power forecasting. Inaccurate forecast results may lead to errors in power system dispatching decisions, such as insufficient spare capacity causing power supply tension, or excessive spare capacity causing resource waste. At the same time, improving the accuracy of wind power forecasting will also help reduce the cost of wind power grid connection, improve the competitiveness of wind power in the power market, and promote more efficient use of wind energy resources. Summary of the invention

[0004] In order to solve the problem of low wind power prediction accuracy in wind farms in the above-mentioned prior art, the present invention proposes a wind power prediction method and system based on multiple time scales, which can effectively improve the wind power prediction accuracy in wind farms.

[0005] In order to achieve the above technical effects, the technical solution of the present invention is as follows:

[0006] A wind power prediction method based on multiple time scales comprises the following steps:

[0007] S1. Acquire wind farm data, preprocess the wind farm data, and obtain historical time series data;

[0008] S2. performing multi-time scale decomposition on the historical time series data to obtain a multi-time scale decomposition result;

[0009] S3. Inputting the multi-scale time decomposition result into a preset wind power prediction model, wherein the wind power prediction model includes a multi-scale graph structure unit, an adaptive graph convolution unit, a cross-scale fusion unit and a prediction unit connected in sequence;

[0010] S4. The multi-scale graph structure unit constructs a multi-scale graph structure according to the multi-scale time decomposition result, and outputs a multi-hop neighbor set of the target node in the multi-scale graph structure. The adaptive graph convolution unit constructs an adaptive adjacency matrix according to the multi-hop neighbor set, updates the node representation using the adaptive adjacency matrix, and outputs the node representation features. The cross-scale fusion unit performs cross-scale fusion on the node representation features through a multi-head attention mechanism to obtain a cross-scale fusion result. The prediction unit receives the cross-scale fusion result and outputs a wind power prediction result.

[0011] Preferably, the wind farm data includes wind power, wind speed, wind direction, temperature, humidity and atmospheric pressure.

[0012] Preferably, the preprocessing of the wind farm data comprises:

[0013] S101. Remove outliers in the wind farm data, fill missing values ​​in the wind farm data, and obtain cleaned and filled data;

[0014] S102. The numerical data in the cleaned and filled data are mapped to the interval [0,1] using the min-max normalization method, and the wind direction data in the cleaned and filled data are cosine transformed to obtain historical time series data of the numerical data and the wind direction data.

[0015] Preferably, performing multi-time scale decomposition on the historical time series data to obtain a multi-time scale decomposition result includes:

[0016] S201. Concatenate the historical time series data to obtain a tensor with L time steps and M variables. , for the tensor Use one-dimensional convolution to embed the position and global timestamp to get the embedded time series data The calculation expression is as follows:

[0017]

[0018] in, Represents the weight ratio used to balance one-dimensional convolution and embedding, represents one-dimensional convolution, represents the first weight, represents the second weight, PE represents position embedding, Indicates global timestamp embedding;

[0019] S202. Embedding the time series data Perform fast Fourier transform to frequency domain and get frequency domain representation F as follows:

[0020]

[0021] in, represents Fourier transform;

[0022] S203. Based on the frequency domain representation F , calculate the significant frequency Corresponding to the smoothed amplitude spectrum The mathematical expression is as follows:

[0023]

[0024] Among them, Smooth() represents a sliding window filter, Indicates the amplitude, Represented in the frequency domain F Extract significant frequencies from The corresponding amplitude;

[0025] S204. The amplitude spectrum Normalized to a probability distribution The calculation expression is as follows:

[0026]

[0027] According to the probability distribution , capturing significant frequencies ;

[0028] S205. Based on the significant frequency , calculate the significant frequency The corresponding time scale s i The mathematical expression is as follows:

[0029]

[0030] in, represents the sequence length, k Indicates the number of significant frequencies.

[0031] Preferably, the multi-scale graph structure unit constructs a multi-scale graph structure according to the multi-scale time decomposition result, and outputs a multi-hop neighbor set of a target node in the multi-scale graph structure, including:

[0032] S401. embedding the time series data According to the time scale s i and the significant frequency Reshape to obtain a reshape result, and transform the reshape result according to the time scale s i Decompose into k Subsequence , each subsequence The calculation expression is as follows:

[0033]

[0034] Among them, the Seg() operation represents the window size of Slide to intercept the subsequence, Represents the reshaping result; for each subsequence Add frequency feature markers to get reshaped feature data X i The calculation expression is as follows:

[0035]

[0036] in, Indicates significant frequency distribution, ⊕ represents the feature connection operation;

[0037] S402. Reshape the feature data X i Setting the multi-scale graph structure , where V represents the node set and E represents the edge set;

[0038] The calculation expression of the node set V is as follows:

[0039]

[0040] in, Indicates time scale The node feature set, The calculation expression is as follows:

[0041]

[0042] in, Indicates i In the time scale, The time node feature matrix of each cycle;

[0043] S403. Establishing edges between nodes by using the Pearson correlation coefficient to obtain the edge set;

[0044] S404. Calculate the multi-hop neighbor set of the target node in the multi-scale graph structure by traversing the edge set, wherein the multi-hop neighbor set includes a one-hop neighbor set and the set of two-hop neighbors .

[0045] Preferably, the hop neighbor set is calculated The steps include: traversing the edge set E, finding all the edge sets E that satisfy The nodes form a one-hop neighbor set The mathematical expression is as follows:

[0046]

[0047] Calculate the two-hop neighbor set The steps include: Each node in traverses the edge set E again to find all nodes that satisfy and The nodes form a two-hop neighbor set The mathematical expression is as follows:

[0048]

[0049] in, Indicates different nodes.

[0050] Preferably, the adaptive graph convolution unit constructs an adaptive adjacency matrix according to the multi-hop neighbor set. The mathematical expression is as follows:

[0051]

[0052] Among them, ReLU() represents the first nonlinear activation function, Softmax() represents the second nonlinear activation function, T represents matrix transposition, represents a scalar parameter, and I represents the identity matrix;

[0053] Using the adaptive adjacency matrix Update node representation and output node representation features The calculation expression is as follows:

[0054]

[0055] in, represents a third nonlinear activation function, wherein the adaptive graph convolution unit includes several layers of adaptive graph convolution networks, represents the number of adaptive graph convolutional network layers, Indicates i The node feature matrix of the layer-adaptive graph convolutional network, Indicates j Weight matrix of layer-adaptive graph convolutional network.

[0056] Preferably, the cross-scale fusion unit performs cross-scale fusion on the node representation features through a multi-head attention mechanism to obtain a cross-scale fusion result, including:

[0057] S411. Characterize the node Perform linear transformation to obtain query ,key Sum Matrix The calculation expression is as follows:

[0058]

[0059] in, represents the first linear transformation matrix, represents the second linear transformation matrix, represents the third linear transformation matrix;

[0060] S412. Based on the query ,key Sum Matrix , the correlation between each time scale is calculated through the dot product attention mechanism, and the correlation is weighted summed to obtain the weighted sum feature The calculation expression is as follows:

[0061]

[0062] in, d att represents the dimension of the attention space;

[0063] S413. Based on the weighted sum feature , use the multi-head attention mechanism to calculate multiple attention heads in parallel, and concatenate multiple attention heads to obtain concatenated features The calculation expression is as follows:

[0064]

[0065] Among them, ∥ represents the concatenation operation on the feature dimension;

[0066] S414. For the splicing features Perform aggregation calculation to obtain cross-scale fusion results The calculation expression is as follows:

[0067]

[0068] in, ε i Indicates i The importance of time scale.

[0069] Preferably, the prediction unit includes an R-layer fully connected network, and the prediction unit outputs the wind power prediction result The calculation expression is as follows:

[0070]

[0071] Among them, W R represents the weight matrix of the R-th layer fully connected network, represents the output of the R-1th layer fully connected network, b R Represents the bias vector of the R-th layer fully connected network.

[0072] The present invention also proposes a wind power prediction system based on multiple time scales, comprising:

[0073] An acquisition module, used to acquire wind farm data;

[0074] A preprocessing module, used for preprocessing the wind farm data to obtain historical time series data;

[0075] A multi-time scale decomposition module is used to perform multi-time scale decomposition on the historical time series data to obtain a multi-time scale decomposition result;

[0076] An input module, used to input the multi-scale time decomposition result into a preset wind power prediction model, wherein the wind power prediction model includes a multi-scale graph structure unit, an adaptive graph convolution unit, a cross-scale fusion unit and a prediction unit connected in sequence;

[0077] A prediction module is used for a multi-scale graph structure unit to construct a multi-scale graph structure according to the multi-scale time decomposition result, output a multi-hop neighbor set of a target node in the multi-scale graph structure, an adaptive graph convolution unit to construct an adaptive adjacency matrix according to the multi-hop neighbor set, update the node representation using the adaptive adjacency matrix, and output the node representation feature; a cross-scale fusion unit to cross-scale fuse the node representation features through a multi-head attention mechanism to obtain a cross-scale fusion result; a prediction unit to receive the cross-scale fusion result and output a wind power prediction result.

[0078] Compared with the prior art, the technical solution of the present invention has the following beneficial effects:

[0079] The present invention proposes a wind power prediction method and system based on multiple time scales. First, the wind farm data is preprocessed to obtain historical time series data, and then the historical time series data is decomposed into multiple time scales. The multi-scale time decomposition result is input into a preset wind power prediction model. The purpose is to capture the complex relationship between time series at different time scales through multi-time scale features, so that the wind power prediction model can recognize and utilize dynamic changes at different time scales, thereby improving the accuracy and robustness of wind power prediction of the wind power prediction model; then the multi-scale graph structure unit outputs a multi-hop neighbor set, and the adaptive graph convolution The unit constructs an adaptive adjacency matrix according to the multi-hop neighbor set. By generating an adaptive adjacency matrix, it can effectively represent the relationship between time series, so that the wind power prediction model can dynamically adjust the connection weights between nodes, thereby better reflecting the actual correlation of the time series; further, the cross-scale fusion unit cross-scales the node representation features through a multi-head attention mechanism, with the aim of paying attention to information at different positions in the sequence through the multi-head attention mechanism, thereby enhancing the wind power prediction model's ability to understand the time series, and can further improve the prediction performance of the wind power prediction model under different multi-time scale periodic distributions. BRIEF DESCRIPTION OF THE DRAWINGS

[0080] Figure 1 A flowchart showing a wind power prediction method based on multiple time scales proposed in an embodiment of the present invention;

[0081] Figure 2 A wind power prediction effect diagram of multiple time scales proposed in an embodiment of the present invention is shown;

[0082] Figure 3 The figure shows a structural block diagram of a wind power prediction system based on multiple time scales proposed in an embodiment of the present invention. DETAILED DESCRIPTION

[0083] The drawings are for illustrative purposes only and should not be construed as limiting the present patent;

[0084] It is understandable to those skilled in the art that some well-known contents may be omitted in the drawings;

[0085] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments.

[0086] Example 1

[0087] like Figure 1 As shown, this embodiment proposes a wind power prediction method based on multiple time scales, including the following steps:

[0088] S1. Acquire wind farm data, preprocess the wind farm data, and obtain historical time series data;

[0089] In S1, the wind farm data includes wind power, wind speed, wind direction, temperature, humidity, and atmospheric pressure. The above wind farm data is only used for understanding of this embodiment and is not limited to the above wind power, wind speed, wind direction, temperature, humidity, and atmospheric pressure in actual use; wherein wind power is historical operation data, and wind speed, wind direction, temperature, humidity, atmospheric pressure, etc. are meteorological data;

[0090] Collect historical operating data (such as wind power) and meteorological data (such as wind speed, wind direction, temperature, etc.) of the target wind farm, as well as the location embedding and timestamp data of each time series. Remove outliers, fill missing values, and use the min-max normalization method to map numerical data to the [0,1] interval, and perform sine and cosine transformation on wind direction data.

[0091] The numerical data (wind speed, wind power, etc.) are mapped to the [0,1] interval using the min-max normalization method; the wind direction data is cosine transformed to retain the directional information;

[0092] The preprocessing of the wind farm data comprises:

[0093] S101. Remove outliers in the wind farm data, fill missing values ​​in the wind farm data, and obtain cleaned and filled data;

[0094] S102. The numerical data in the cleaned and filled data are mapped to the interval [0,1] using the min-max normalization method, and the wind direction data in the cleaned and filled data are cosine transformed to obtain the historical time series data of the numerical data and the wind direction data; the numerical data refers to wind power, wind speed, temperature, humidity, atmospheric pressure, etc.; the purpose of cosine transforming the wind direction data is to retain the directional information;

[0095] S2. performing multi-time scale decomposition on the historical time series data to obtain a multi-time scale decomposition result;

[0096] In S2, the historical time series data is subjected to multi-time scale decomposition to obtain a multi-time scale decomposition result, including:

[0097] S201. Concatenate the historical time series data to obtain a tensor with L time steps and M variables. , for the tensor Use one-dimensional convolution with a kernel width of 3 and a step size of 1 to embed the position and global timestamp to get the embedded time series data The calculation expression is as follows:

[0098]

[0099] in, Represents the weight ratio used to balance the one-dimensional convolution and embedding, and the weight ratio used to balance the one-dimensional convolution and embedding. represents one-dimensional convolution, represents the first weight, which is used to adjust the weight of position embedding; Represents the second weight, which is used to adjust the weight of timestamp embedding. PE Represents position embedding, position embedding PE It does this by mapping the index of each time point into a vector space of fixed dimension; Indicates global timestamp embedding, global timestamp embedding A vector representing the global time information of each time point in the time series;

[0100] S202. Embedding the time series data Perform fast Fourier transform to frequency domain and get frequency domain representation F as follows:

[0101]

[0102] in, represents Fourier transform;

[0103] The embedded time series data is transformed into the frequency domain by fast Fourier transform, and then the fast Fourier transform (FFT) result is decomposed into multiple scales based on the fast Fourier transform (FFT), dividing the data into subsequences of several scales at different frequencies and marking the frequency characteristics of each scale.

[0104] FFT The result is used to further calculate the amplitude:

[0105]

[0106] in, It means extracting the amplitude corresponding to the frequency f from the FFT result. Indicates the amplitude; P ( f ) represents the probability distribution of the amplitude results;

[0107] S203. Based on the frequency domain representation F , calculate the significant frequency Corresponding to the smoothed amplitude spectrum The mathematical expression is as follows:

[0108]

[0109] Among them, Smooth() represents a sliding window filter, which is used to smooth the amplitude spectrum, and uses smoothing optimization to reduce the interference of high-frequency noise in the frequency domain on the selection of significant frequencies; Indicates the amplitude, Represented in the frequency domain F Extract significant frequencies from The corresponding amplitude; the purpose is to reduce the interference of high-frequency noise on the selection of significant frequencies, and to Apply a sliding window filter to smooth:

[0110] S204. The amplitude spectrum Normalized to a probability distribution The calculation expression is as follows:

[0111]

[0112] Probability distribution Changing the scale selection from a fixed threshold to sampling based on frequency domain distribution reflects the importance of the frequency in the entire sequence;

[0113] According to the probability distribution , capturing significant frequencies , the specific operations are:

[0114] Use probability distribution to sample significant frequencies and select k Significant frequency .

[0115] S205. Based on the significant frequency , calculate the significant frequency The corresponding time scale s i The mathematical expression is as follows:

[0116]

[0117] in, represents the sequence length, k Indicates the number of significant frequencies.

[0118] S3. Inputting the multi-scale time decomposition result into a preset wind power prediction model, wherein the wind power prediction model includes a multi-scale graph structure unit, an adaptive graph convolution unit, a cross-scale fusion unit and a prediction unit connected in sequence;

[0119] S4. The multi-scale graph structure unit constructs a multi-scale graph structure according to the multi-scale time decomposition result, and outputs a multi-hop neighbor set of the target node in the multi-scale graph structure. The adaptive graph convolution unit constructs an adaptive adjacency matrix according to the multi-hop neighbor set, updates the node representation using the adaptive adjacency matrix, and outputs the node representation features. The cross-scale fusion unit performs cross-scale fusion on the node representation features through a multi-head attention mechanism to obtain a cross-scale fusion result. The prediction unit receives the cross-scale fusion result and outputs a wind power prediction result.

[0120] The multi-scale graph structure is constructed by treating each periodic time point of different scales as a node, and constructing a multi-scale graph structure connection relationship based on the correlation between subsequences of each scale. The multi-scale graph structure unit constructs a multi-scale graph structure according to the multi-scale time decomposition result, and outputs a multi-hop neighbor set of the target node in the multi-scale graph structure, including:

[0121] S401. embedding the time series data According to the time scale s i and the significant frequency Reshape to obtain a reshape result, and transform the reshape result according to the time scale s i Decompose into k Subsequence , each subsequence The calculation expression is as follows:

[0122]

[0123] Among them, the Seg() operation represents the window size of Slide to intercept the subsequence, Represents the reshaping results; by time scale Split the data into The length is subsequence, each subsequence corresponds to a period, if the sequence length L The time scale cannot be divided evenly , then the sequence is preceded by The data is cyclically supplemented to the tail, and circular shift padding is used during segmentation to ensure that the complete cycle information is retained.

[0124] For each subsequence Add frequency feature markers to get reshaped feature data X i The calculation expression is as follows:

[0125]

[0126] in, Indicates significant frequency Distribution, ⊕ represents feature connection operation; reshape feature data is a 3-dimensional tensor where M is the number of variables (i.e., the time series dimension).

[0127] S402. Reshape the feature data X i Setting the multi-scale graph structure , where V represents the node set and E represents the edge set;

[0128] The calculation expression of the node set V is as follows:

[0129]

[0130] in, Indicates time scale The node feature set, The calculation expression is as follows:

[0131]

[0132] in, Indicates i In the time scale, The time node feature matrix of each cycle;

[0133] S403. Establishing edges between nodes by using the Pearson correlation coefficient to obtain the edge set;

[0134] S404. Calculate the multi-hop neighbor set of the target node in the multi-scale graph structure by traversing the edge set, wherein the multi-hop neighbor set includes a one-hop neighbor set and the set of two-hop neighbors .

[0135] It should be noted that establishing an edge between nodes indicates that there is a strong correlation between them. By traversing all possible node pairs and performing correlation calculations and edge establishment, a dynamic multi-scale graph structure is finally constructed, in which nodes represent periodic time points of different scales, and edges represent the correlation connection relationship between the subsequences corresponding to the nodes. The similarity function of each edge uses the Pearson correlation coefficient It is expressed as follows:

[0136]

[0137] in, Indicates j The mean of the m-th node subsequence at the time scale, Indicates i The mth node subsequence at the time scale, No.j The mean of the n-th node subsequence at the time scale, Indicates i The nth node subsequence of the time scale;

[0138] For the target node in the multi-scale graph structure, calculate the hop neighbor set The steps include: traversing the edge set E, finding all the edge sets E that satisfy The nodes form a one-hop neighbor set The mathematical expression is as follows:

[0139]

[0140] Calculate the two-hop neighbor set The steps include: Each node in traverses the edge set E again to find all nodes that satisfy and The nodes form a two-hop neighbor set The mathematical expression is as follows:

[0141]

[0142] in, Indicates different nodes.

[0143] Will be with i This is achieved by projecting the tensor corresponding to the time scale back to a tensor with M variables, where N represents the number of time series. i The learnable weight matrix constructed at each time scale , mapping the tensor of each time scale to the same dimension; then the adaptive graph convolution unit is based on the multi-hop neighbor set through two sets of learnable parameters , Generate an adjacency matrix, normalize and regularize the adjacency matrix, and construct an adaptive adjacency matrix The mathematical expression is as follows:

[0144]

[0145] Among them, ReLU() represents the first nonlinear activation function, Softmax() represents the second nonlinear activation function, T represents matrix transposition, represents a scalar parameter, I represents the identity matrix; the above adaptive adjacency matrix The mathematical expression refers to applying the ReLU nonlinear activation function to the regularized matrix, performing a nonlinear transformation on each element in the matrix, retaining only the positive part and setting the negative part to zero. This step introduces nonlinear characteristics into the matrix operation.

[0146] The relationship information of neighbor nodes with different hop counts is aggregated by introducing multiple powers of the adjacency matrix. For each power, the power of the normalized adjacency matrix is ​​calculated. ,in yes The degree matrix of . Calculate the inverse square root of the degree matrix , and Perform matrix multiplication to obtain a matrix that aggregates neighbor information of different hop counts. Add the matrix obtained by the above calculation to the node feature matrix (Initial ) to perform matrix multiplication, that is , so that the feature information of neighbors with different hop counts is aggregated together according to the set power. All feature matrices obtained by aggregation according to different powers are spliced ​​together in the column direction, and the spliced ​​matrices are multiplied with the learnable weight matrix to obtain the updated node representation. The σ activation function is used to introduce nonlinear transformations to learn more complex deep cycle-related features, which can be expressed as:

[0147]

[0148] k are different powers, representing information aggregation with different hop counts, where k =1 mainly considers the direct neighbors of the node, k =2 Considering the two-hop neighbors of a node, the output of each layer As input to the next layer .

[0149] Using the adaptive adjacency matrix Update node representation and output node representation features The calculation expression is as follows:

[0150]

[0151] in, represents a third nonlinear activation function, wherein the adaptive graph convolution unit includes several layers of adaptive graph convolution networks, represents the number of adaptive graph convolutional network layers, Indicates i The node feature matrix of the layer-adaptive graph convolutional network, Indicates jThe weight matrix of the layer adaptive graph convolutional network; A 1 Refers to directly connected neighbors, indicating the local relevance of nodes. 2 Refers to two-hop neighbors, indicating indirect correlation, the time period sequence of indirect influence; j express j Hop neighbors are used to capture dependencies at longer distances.

[0152] The cross-scale fusion unit performs cross-scale fusion on the node representation features through a multi-head attention mechanism to obtain a cross-scale fusion result, including:

[0153] S411. Characterize the node Perform linear transformation to obtain query ,key Sum Matrix The calculation expression is as follows:

[0154]

[0155] in, represents the first linear transformation matrix, represents the second linear transformation matrix, represents the third linear transformation matrix;

[0156] S412. Based on the query ,key Sum Matrix , the correlation between each time scale is calculated through the dot product attention mechanism, and the correlation is weighted summed to obtain the weighted sum feature The calculation expression is as follows:

[0157]

[0158] in, d att represents the dimension of the attention space;

[0159] S413. Based on the weighted sum feature , use the multi-head attention mechanism to calculate multiple attention heads in parallel, and concatenate multiple attention heads to obtain concatenated features The calculation expression is as follows:

[0160]

[0161] Among them, ∥ represents the concatenation operation on the feature dimension;

[0162] S414. For the splicing features The cross-scale fusion result is obtained by aggregating the connection weights of cross-scale nodes and the amplitudes between significant frequencies. The calculation expression is as follows:

[0163]

[0164] in, ε i Indicates i The importance of each time scale; the larger the absolute value of the significant frequency amplitude, the greater the connection weight of the corresponding feature. ε i The larger the value, the greater the contribution of the time scale to the final prediction. The weighted sum is performed according to these weights to obtain the fused feature representation to achieve the dependency modeling of amplitude-frequency scales and make up for the lack of connections within the same scale.

[0165] Cross-scale fusion results Input prediction unit to make predictions,

[0166] The prediction unit includes an R-layer fully connected network, and the prediction unit outputs a wind power prediction result The calculation expression is as follows:

[0167]

[0168] Among them, W R Represents the weight matrix of the R-th layer fully connected network, where R is a positive integer. represents the output of the R-1th layer fully connected network, b R represents the bias vector of the Rth layer fully connected network, σ R represents the activation function;

[0169] The comprehensive feature vector obtained by splicing the fused k time scale features is input into the fully connected layer for prediction. Assume that the fully connected network has R layers, and the weight matrix of the Rth layer is W R , the bias vector is b, and the activation function is σ R , y predict is the final prediction result, with a size of T, which is the predicted value at T time points after the time point to be tested. After the multi-scale features are fused, the fused features are mapped to the prediction space through a fully connected network to generate the wind power prediction results for future time steps.

[0170] In this embodiment, since the prior art urgently needs a method that can effectively integrate multi-time scale information and accurately predict wind power changes to adapt to the rapid development of the wind power industry and the needs of stable operation of the power system, this embodiment proposes a wind power prediction method based on multiple time scales, which effectively reduces the prediction error caused by the uncertainty of wind power generation and improves the prediction accuracy of wind power in offshore wind farms. First, the wind farm data is preprocessed to obtain historical time series data, and then the historical time series data is decomposed into multiple time scales, and the multi-scale time decomposition result is input into the preset wind power prediction model, the purpose of which is to capture the complex relationship between time series at different time scales through multi-time scale features, so that the wind power prediction model can recognize and utilize dynamic changes at different time scales, thereby improving the accuracy and robustness of wind power prediction of the wind power prediction model; then the multi-scale graph structure unit outputs a multi-hop neighbor set, and the adaptive graph convolution unit constructs an adaptive adjacency matrix according to the multi-hop neighbor set. By generating an adaptive adjacency matrix, the mutual relationship between time series can be effectively represented, so that the wind power prediction model can dynamically adjust the connection weights between nodes, thereby better reflecting the actual correlation of the time series; further, the cross-scale fusion unit cross-scales the node representation features through a multi-head attention mechanism, the purpose of which is to pay attention to the information at different positions in the sequence through the multi-head attention mechanism, thereby enhancing the wind power prediction model's ability to understand the time series, and can further improve the prediction performance of the wind power prediction model under different multi-time scale periodic distributions.

[0171] Example 2

[0172] In this embodiment, a certain offshore wind farm is taken as an example to explain in detail the multi-time scale-based wind power prediction method proposed in the above embodiment.

[0173] 1. Data Collection and Preprocessing

[0174] Collect historical operating data (wind power, wind speed, wind direction, temperature, humidity, atmospheric pressure, etc.) of the target wind farm from 00:00 on January 1, 2021 to 23:59 on December 31, 2021.

[0175] The collected data is cleaned and filled to remove obvious outliers (such as negative wind speed, wind power exceeding the reasonable range, etc.), and the mean filling method is used to fill a small number of missing values. For numerical data (wind speed, wind power, etc.), the min-max normalization method is used to map it to the [0, 1] interval. For example, the original minimum value of wind speed data is 2m / s and the maximum value is 25m / s. After normalization, all wind speed values ​​are between [0,1]. Cosine transform is performed on wind direction data to retain its directional information.

[0176] 2. Time Series Data Processing

[0177] Data splicing and embedding: The processed historical time series data of each variable are spliced ​​to form a tensor containing 8760 historical time steps (365 days a year, 24 hours a day, and data recorded once every hour), and 7 variables (wind power, wind speed, wind direction, temperature, humidity, atmospheric pressure, and timestamp). Then, one-dimensional convolution is used with a kernel width of 3 and a step size of 1 to perform position embedding and global timestamp embedding. Position embedding maps the index of each time point to a 10-dimensional vector space, and global timestamp embedding uses a 5-dimensional vector to represent the global time information of each time point. The coefficient is set to 0.5 to balance the weight ratio of one-dimensional convolution and embedding.

[0178] Frequency domain conversion and multi-scale decomposition: Perform fast Fourier transform on the normalized and convolutionally embedded time series data and transform it into the frequency domain. After calculating the amplitude, use a sliding window with a width of 10 to smooth the amplitude spectrum, and normalize the smoothed amplitude to a probability distribution to capture the significant frequency. Select 5 significant frequencies, calculate the corresponding time scales through the significant frequencies, and obtain subsequences of multiple scales at different frequencies. For example, the time scales corresponding to the calculated significant frequencies are 1 hour, 3 hours, 6 hours, 12 hours, and 24 hours. Add frequency feature markers to each subsequence, and the reshaped data becomes a 3D tensor with dimensions (5 scales, number of subsequences at each scale, 7 variables).

[0179] 3. Multi-scale graph structure construction

[0180] Data reshaping and node construction: Based on the multi-scale decomposition results, the embedded time series data is reshaped according to different time scales and frequencies, and then decomposed into subsequences according to the time scale. For example, for the 1-hour scale, if the data length cannot divide the number of time steps corresponding to 1 hour, the data in the front part of the sequence is cyclically supplemented to the tail to ensure that the complete period information is retained. Add frequency feature markers to each subsequence, and use vectors to represent significant frequency distributions. Treat each periodic time point of different scales as a node, construct a node set, and the node set of the graph is the union of nodes of all scales.

[0181] Construct a dynamic graph: Set the graph structure, and the node feature matrix is ​​generated by the content of the corresponding subsequence for each node. The correlation between nodes is determined by calculating the Pearson correlation coefficient, so as to establish edges and construct a dynamic graph. For the target node, calculate its one-hop neighbor set and two-hop neighbor set. For example, for a node with a 1-hour scale, calculate the directly adjacent nodes (one-hop neighbors) with a strong correlation with it, and then find indirectly related nodes (two-hop neighbors) based on these one-hop neighbors.

[0182] 4. Adaptive adjacency matrix generation and node representation update

[0183] Tensor projection: The tensor corresponding to each scale is projected back into a tensor with 7 variables. Through linear transformation, a learnable weight matrix is ​​constructed for each scale to map tensors of different scales to the same dimension.

[0184] Adaptive adjacency matrix generation: Based on node features, two sets of learnable parameters are used to generate an adjacency matrix, which is then normalized and regularized to obtain an adaptive adjacency matrix. The ReLU nonlinear activation function is applied to the regularized matrix to perform a nonlinear transformation on each element in the matrix, retaining only the positive value and setting the negative value to zero.

[0185] Aggregate high-order neighborhood information: Introduce the power of the adjacency matrix (such as 1st power considers direct neighbors, 2nd power considers two-hop neighbors, etc.) to aggregate the relationship information of neighbor nodes with different hop counts. Calculate the power of the normalized adjacency matrix, and after operating with the degree matrix, obtain a matrix that aggregates neighbor information with different hop counts, and then multiply it with the node feature matrix. All feature matrices aggregated by different powers are spliced ​​in the column direction, and multiplied with the learnable weight matrix to obtain the updated node representation. Use the σ activation function to introduce nonlinear transformation to learn more complex deep cycle-related features.

[0186] 5. Cross-scale fusion

[0187] Multi-head attention calculation: First, the query, key, and value matrices of each time scale (1 hour, 3 hours, 6 hours, 12 hours, and 24 hours) are calculated through linear transformation, and the dimension of the attention space is set to 15.

[0188] Calculate correlation and feature fusion: Use the dot product attention mechanism to calculate the correlation between each time scale, and combine the information for normalized weighted summation. Use the multi-head attention mechanism to parallelly calculate multiple attention heads and splice them. The connection weights of cross-scale nodes are aggregated and calculated by the amplitude between significant frequencies. The larger the absolute value of the significant frequency amplitude, the larger the connection weight of the corresponding feature. According to these weights, weighted summation is performed to obtain the fused feature representation, realize the dependency modeling of amplitude-frequency scale, and make up for the lack of connection within the same scale.

[0189] 6. Prediction

[0190] The fused features of the five time scales are concatenated to obtain a comprehensive feature vector which is input into the fully connected layer for prediction. The fully connected network is set to 3 layers, and the weight matrix and bias vector of each layer are obtained through training and learning, and the activation function uses ReLU. After the forward propagation of the fully connected network, the wind power prediction results for the next 24 hours (one prediction value per hour) are obtained.

[0191] In this embodiment, data collection and preprocessing are first performed to collect historical operation and meteorological data of wind farms, remove outliers, fill missing values, normalize numerical data, and perform cosine transform on wind direction data; first, splice the processed variable time series into tensors, embed the position and timestamps with one-dimensional convolution, and then transform them to the frequency domain through fast Fourier transform. Sliding window is used to smooth the amplitude spectrum and normalize to capture significant frequencies, and multi-scale subsequences are divided and frequency features are marked accordingly. Based on multi-scale decomposition, the embedded data is reshaped into a three-dimensional tensor and decomposed into subsequences, frequency tags are added, and a dynamic graph is constructed based on the correlation of subsequences with periodic time points as nodes. The edges are calculated using the Pearson coefficient to clarify the one-hop and two-hop neighbor sets of nodes; each scale tensor is projected to the same dimension, and an adaptive adjacency matrix is ​​generated, normalized, regularized, and nonlinearly activated according to the node characteristics, and the node representation is updated by aggregating neighbor information by the adjacency matrix power. The cross-scale features are fused by weighted summation based on the significant frequency amplitude through the dot product and multi-head attention mechanism; the concatenated fusion feature vector is input into the fully connected layer, and the wind power in the future time step is predicted through multi-layer forward propagation, and accurate time series prediction is achieved by using multi-scale information. Figure 2 The method of the present invention can effectively integrate multi-time scale information, make a relatively accurate prediction of wind power, and provide strong support for the operation and scheduling of offshore wind farms.

[0192] Example 3

[0193] See also Figure 3 , this embodiment also proposes a wind power prediction system based on multiple time scales, including:

[0194] An acquisition module, used to acquire wind farm data;

[0195] A preprocessing module, used for preprocessing the wind farm data to obtain historical time series data;

[0196] A multi-time scale decomposition module is used to perform multi-time scale decomposition on the historical time series data to obtain a multi-time scale decomposition result;

[0197] An input module, used to input the multi-scale time decomposition result into a preset wind power prediction model, wherein the wind power prediction model includes a multi-scale graph structure unit, an adaptive graph convolution unit, a cross-scale fusion unit and a prediction unit connected in sequence;

[0198] A prediction module is used for a multi-scale graph structure unit to construct a multi-scale graph structure according to the multi-scale time decomposition result, output a multi-hop neighbor set of a target node in the multi-scale graph structure, an adaptive graph convolution unit to construct an adaptive adjacency matrix according to the multi-hop neighbor set, update the node representation using the adaptive adjacency matrix, and output the node representation feature; a cross-scale fusion unit to cross-scale fuse the node representation features through a multi-head attention mechanism to obtain a cross-scale fusion result; a prediction unit to receive the cross-scale fusion result and output a wind power prediction result.

[0199] In this embodiment, the wind farm data is first preprocessed to obtain historical time series data, and then the historical time series data is decomposed at multiple time scales, and the multi-scale time decomposition result is input into a preset wind power prediction model, the purpose of which is to capture the complex relationship between time series at different time scales through multi-time scale features, so that the wind power prediction model can recognize and utilize dynamic changes at different time scales, thereby improving the accuracy and robustness of wind power prediction of the wind power prediction model; then the multi-scale graph structure unit outputs a multi-hop neighbor set, and the adaptive graph convolution unit constructs an adaptive adjacency matrix according to the multi-hop neighbor set. By generating an adaptive adjacency matrix, the mutual relationship between time series can be effectively represented, so that the wind power prediction model can dynamically adjust the connection weights between nodes, thereby better reflecting the actual correlation of the time series; further, the cross-scale fusion unit cross-scales the node representation features through a multi-head attention mechanism, the purpose of which is to pay attention to the information at different positions in the sequence through the multi-head attention mechanism, thereby enhancing the wind power prediction model's ability to understand the time series, and can further improve the prediction performance of the wind power prediction model under different multi-time scale periodic distributions.

[0200] Obviously, the above embodiments of the present invention are only examples for clearly illustrating the present invention, and are not intended to limit the implementation methods of the present invention. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all implementation methods here. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the claims of the present invention.

Claims

1. A wind power prediction method based on multiple time scales, characterized in that: The following steps are involved: S1. Acquire wind farm data, preprocess the wind farm data, and obtain historical time series data; The wind farm data includes wind power, wind speed, wind direction, temperature, humidity, and atmospheric pressure. The preprocessing of the wind farm data includes: S101. Remove outliers in the wind farm data, fill missing values ​​in the wind farm data, and obtain cleaned and filled data; S102. Map the numerical data in the cleaned and filled data to the interval [0,1] using the min-max normalization method, and perform cosine transformation on the wind direction data in the cleaned and filled data to obtain historical time series data of the numerical data and the wind direction data; S2. performing multi-time scale decomposition on the historical time series data to obtain a multi-time scale decomposition result; S3. Inputting the multi-time scale decomposition result into a preset wind power prediction model, wherein the wind power prediction model comprises a multi-scale graph structure unit, an adaptive graph convolution unit, a cross-scale fusion unit and a prediction unit connected in sequence; S4. The multi-scale graph structure unit constructs a multi-scale graph structure according to the multi-time scale decomposition result, outputs a multi-hop neighbor set of the target node in the multi-scale graph structure, the adaptive graph convolution unit constructs an adaptive adjacency matrix according to the multi-hop neighbor set, updates the node representation using the adaptive adjacency matrix, and outputs the node representation feature; the cross-scale fusion unit performs cross-scale fusion on the node representation feature through a multi-head attention mechanism to obtain a cross-scale fusion result; the prediction unit receives the cross-scale fusion result and outputs a wind power prediction result; The multi-scale graph structure unit constructs a multi-scale graph structure according to the multi-time scale decomposition result, and outputs a multi-hop neighbor set of a target node in the multi-scale graph structure, including: S401. Embedding time series data According to the time scale s i and significant frequency Reshape to obtain a reshape result, and transform the reshape result according to the time scale s i Decompose into k Subsequence , each subsequence The calculation expression is as follows: Among them, the Seg() operation represents the window size of Slide to intercept the subsequence, Represents the reshaping result; for each subsequence Add frequency feature markers to get reshaped feature data X i The calculation expression is as follows: in, Indicates significant frequency distribution, ⊕ represents the feature connection operation; S402. Reshape the feature data X i Setting the multi-scale graph structure , where V represents the node set and E represents the edge set; The calculation expression of the node set V is as follows: in, Indicates time scale The node feature set, The calculation expression is as follows: in, Indicates i In the time scale, The time node feature matrix of the cycle; S403. Establishing edges between nodes by using the Pearson correlation coefficient to obtain the edge set; S404. Calculate the multi-hop neighbor set of the target node in the multi-scale graph structure by traversing the edge set, wherein the multi-hop neighbor set includes a one-hop neighbor set and the set of two-hop neighbors .

2. The wind power prediction method based on multiple time scales according to claim 1 is characterized in that: The multi-time scale decomposition of the historical time series data is performed to obtain a multi-time scale decomposition result, including: S201. Concatenate the historical time series data to obtain a tensor with L time steps and M variables. , for the tensor Use one-dimensional convolution to embed the position and global timestamp to get the embedded time series data The calculation expression is as follows: in, Represents the weight ratio used to balance one-dimensional convolution and embedding, represents one-dimensional convolution, represents the first weight, represents the second weight, PE represents position embedding, Indicates global timestamp embedding; S202. Embedding the time series data Perform fast Fourier transform to frequency domain and get frequency domain representation F as follows: in, represents Fourier transform; S203. Based on the frequency domain representation F , calculate the significant frequency Corresponding to the smoothed amplitude spectrum The mathematical expression is as follows: Among them, Smooth() represents a sliding window filter, Indicates the amplitude, Represented in the frequency domain F Extract significant frequencies from The corresponding amplitude; S204. The amplitude spectrum Normalized to a probability distribution The calculation expression is as follows: According to the probability distribution , capturing significant frequencies ; S205. Based on the significant frequency , calculate the significant frequency The corresponding time scale s i The mathematical expression is as follows: in, represents the sequence length, k Indicates the number of significant frequencies.

3. The wind power prediction method based on multiple time scales according to claim 2 is characterized in that: Calculate the hop neighbor set The steps include: traversing the edge set E, finding all the edge sets E that satisfy The nodes form a one-hop neighbor set The mathematical expression is as follows: Calculate the two-hop neighbor set The steps include: Each node in traverses the edge set E again, looking for all nodes that satisfy and The nodes form a two-hop neighbor set The mathematical expression is as follows: in, Indicates different nodes.

4. The wind power prediction method based on multiple time scales according to claim 3 is characterized in that: The adaptive graph convolution unit constructs an adaptive adjacency matrix according to the multi-hop neighbor set The mathematical expression is as follows: Among them, ReLU() represents the first nonlinear activation function, Softmax() represents the second nonlinear activation function, T represents matrix transposition, represents a scalar parameter, and I represents the identity matrix; Using the adaptive adjacency matrix Update node representation and output node representation features The calculation expression is as follows: in, represents a third nonlinear activation function, wherein the adaptive graph convolution unit includes several layers of adaptive graph convolution networks, represents the number of adaptive graph convolutional network layers, Indicates i The node feature matrix of the layer-adaptive graph convolutional network, Indicates j Weight matrix of layer-adaptive graph convolutional network.

5. The wind power prediction method based on multiple time scales according to claim 4 is characterized in that: The cross-scale fusion unit performs cross-scale fusion on the node representation features through a multi-head attention mechanism to obtain a cross-scale fusion result, including: S411. Characterize the node Perform linear transformation to obtain query ,key Sum Matrix The calculation expression is as follows: in, represents the first linear transformation matrix, represents the second linear transformation matrix, represents the third linear transformation matrix; S412. Based on the query ,key Sum Matrix , the correlation between each time scale is calculated through the dot product attention mechanism, and the correlation is weighted summed to obtain the weighted sum feature The calculation expression is as follows: in, d att represents the dimension of the attention space; S413. Based on the weighted sum feature , use the multi-head attention mechanism to calculate multiple attention heads in parallel, and concatenate multiple attention heads to obtain concatenated features The calculation expression is as follows: Among them, ∥ represents the concatenation operation on the feature dimension; S414. For the splicing features Perform aggregation calculation to obtain cross-scale fusion results The calculation expression is as follows: in, ε i Indicates i The importance of time scale.

6. The wind power prediction method based on multiple time scales according to claim 4 is characterized in that: The prediction unit includes an R-layer fully connected network, and the prediction unit outputs a wind power prediction result The calculation expression is as follows: Among them, W R represents the weight matrix of the R-th layer fully connected network, represents the output of the R-1th layer fully connected network, b R Represents the bias vector of the R-th layer fully connected network.

7. A wind power prediction system based on multiple time scales, the system being used to implement the wind power prediction method based on multiple time scales as claimed in any one of claims 1 to 6, characterized in that: include: An acquisition module, used to acquire wind farm data; A preprocessing module, used for preprocessing the wind farm data to obtain historical time series data; A multi-time scale decomposition module is used to perform multi-time scale decomposition on the historical time series data to obtain a multi-time scale decomposition result; An input module, used for inputting the multi-time scale decomposition result into a preset wind power prediction model, wherein the wind power prediction model comprises a multi-scale graph structure unit, an adaptive graph convolution unit, a cross-scale fusion unit and a prediction unit connected in sequence; A prediction module, wherein the multi-scale graph structure unit constructs a multi-scale graph structure according to the multi-time scale decomposition result, outputs a multi-hop neighbor set of the target node in the multi-scale graph structure, and the adaptive graph convolution unit constructs an adaptive adjacency matrix according to the multi-hop neighbor set, updates the node representation using the adaptive adjacency matrix, and outputs the node representation feature; The cross-scale fusion unit performs cross-scale fusion on the node representation features through a multi-head attention mechanism to obtain a cross-scale fusion result; the prediction unit receives the cross-scale fusion result and outputs a wind power prediction result.

Citation Information

Patent Citations

  • Offshore wind power prediction method and device based on multi-scale space-time diagram transformation network

    CN117114192A

  • Time series alignment using multiscale manifold learning

    US20220137930A1