A wind speed prediction method and system based on time-space correlation
By introducing spatiotemporal correlation processing methods into the wind speed prediction model, using the graph attention mechanism and autocorrelation weight matrix, the accuracy and efficiency problems of the existing models when processing complex spatiotemporal data are solved, and more efficient and accurate wind speed prediction is achieved.
Patent Information
- Application Number
- CN202411822574.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2044-12-12
AI Technical Summary
When existing wind speed prediction models process large-scale, high-dimensional meteorological data, it is difficult to capture complex space-time dependencies, resulting in limited accuracy and efficiency of prediction results.
A wind speed prediction method based on space-time correlation is adopted. By collecting wind speed data and wind direction data, and converting them into angle functions and features, combining the graph attention mechanism and autocorrelation weight matrix, the weights between nodes in the graph structure are dynamically adjusted, spatial and temporal features are extracted, and the wind speed prediction results are finally obtained.
It significantly improves the accuracy and efficiency of wind speed prediction, can better capture the spatial and temporal characteristics of wind speed changes, and improves the model's response ability and prediction accuracy.
Smart Images

Figure CN119291227B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of wind speed prediction and artificial intelligence technology, and in particular to a wind speed prediction method. Background Art
[0002] In the field of modern wind speed forecasting, although traditional statistical methods and machine learning techniques have been widely used in wind speed forecasting, they often show limitations when facing large-scale, high-dimensional meteorological data. Especially when dealing with data with complex spatial and temporal dependencies, these methods often find it difficult to capture the deep patterns therein, thus affecting the accuracy and efficiency of the forecast results.
[0003] With the rapid development of computing power, deep learning techniques, especially models that can process both time series and graph data, have begun to show their potential in wind speed forecasting. These models can learn complex relationships that are difficult to observe intuitively from historical meteorological data, improving the accuracy of forecasts. However, existing deep learning methods still face challenges in practical applications, and the performance of the models is often limited.
[0004] In addition, the existing models need to be improved in terms of integrating temporal and spatial information processing. Especially in scenarios that require highly dynamic responses, such as wind farm operation and management, traditional models are difficult to effectively utilize spatial correlation and temporal dynamics, thus failing to maximize prediction performance and effectively predict wind speed. Summary of the invention
[0005] The present invention provides a wind speed prediction method and system based on time-space correlation to solve the problem that the existing wind speed prediction model has limited performance and cannot effectively predict the wind speed.
[0006] In order to achieve the above object, the present invention is implemented by the following technical solutions:
[0007] In a first aspect, the present invention provides a wind speed prediction method based on spatiotemporal correlation, comprising the following steps:
[0008] Step 1: Collect wind speed data and wind direction data at several wind speed measurement points, and obtain geographical location information of several wind speed measurement points;
[0009] Step 2: Convert several wind direction data into angle functions and fuse the angle functions to obtain several wind direction features;
[0010] Step 2 includes: converting a plurality of wind direction data into a plurality of corresponding pairs of cosine values and sine values, and fusing the plurality of pairs of cosine values and sine values to obtain a plurality of wind direction features;
[0011] The fusing of a plurality of pairs of cosine values and sine values to obtain a plurality of wind direction features comprises: dynamically fusing a plurality of pairs of cosine values and sine values through a weighted matrix to obtain a plurality of wind direction features;
[0012] Step 3: Input the wind speed data into the autocorrelation weight matrix in time series form to obtain the time characteristics of the wind speed data;
[0013] Step 4: Construct a graph structure based on the geographic location information, wind direction characteristics, and time characteristics of wind speed data of several wind speed measurement points. Dynamically adjust the weights between nodes in the graph structure through the graph attention mechanism, extract spatial features, and then obtain wind speed prediction results based on wind direction characteristics, time characteristics of wind speed data, and spatial characteristics.
[0014] Furthermore, in step 1, the collected wind speed data and wind direction data are collected in a continuous time, and the samples are divided according to the time window, and the wind speed data and wind direction data after the sample division are preprocessed;
[0015] The preprocessing includes data cleaning and standardization.
[0016] Furthermore, in step 3, the wind speed data in time series form is input into the autocorrelation weight matrix after adaptive time coding to obtain the time characteristics of the wind speed data.
[0017] Furthermore, the wind speed data in time series form is adaptively time-coded and then the time series of the wind speed data is subjected to trend decomposition and seasonal decomposition through the series_decomp function and input into the autocorrelation weight matrix to obtain the time characteristics of the wind speed data.
[0018] Furthermore, the method of constructing a graph structure based on the geographic location information, wind direction characteristics and time characteristics of wind speed data of several wind speed measurement points includes: constructing graph structure nodes and edges between graph structure nodes based on the geographic location information of the wind speed measurement points, and using wind direction characteristics and time characteristics of wind speed data as node characteristics of graph structure nodes.
[0019] Furthermore, constructing the graph structure nodes and the edges between the graph structure nodes according to the geographical location information of the wind speed measurement points includes: taking the geographical location information of each wind speed measurement point as a graph structure node, and reducing the geographical distance between each wind speed measurement point year on year as the edges between the graph structure nodes.
[0020] Furthermore, the graph attention mechanism processes nonlinear features through the LeakyReLu function and dynamically adjusts the weights between nodes in the graph structure in combination with the discard layer.
[0021] In a second aspect, the present invention also provides a wind speed prediction system based on spatiotemporal correlation, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the above-mentioned methods when executing the computer program.
[0022] Beneficial effects:
[0023] The present invention provides a wind speed prediction method and system based on spatiotemporal correlation, which optimizes the fusion mode of time series and spatial structure information to provide more accurate, efficient and stable wind speed prediction, and significantly improves the model's responsiveness to wind speed changes and prediction accuracy through advanced feature conversion and dynamic information processing. A deep learning architecture is introduced to optimize the performance of the wind speed prediction model. After converting wind direction data into an angle function and then dynamically fusing the angle function with a weighted matrix, it is able to accurately capture subtle changes in wind direction, provide key directional indicators for wind speed prediction, and predict future wind speed trends by analyzing wind speed data in time series form. The graph structure analyzes the spatial distribution of wind speed data to enhance the model's ability to understand the impact of the surrounding environment and improve prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 A flow chart of a wind speed prediction method based on spatiotemporal correlation according to the present invention;
[0025] Figure 2 Schematic diagram of fans arranged in a rectangular grid in an embodiment of the present invention. DETAILED DESCRIPTION
[0026] The technical solution of the present invention is described clearly and completely below. Obviously, the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0027] Unless otherwise defined, the technical terms or scientific terms used in the present invention shall have the usual meanings understood by persons with ordinary skills in the field to which the present invention belongs. The words "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, words such as "one" or "one" do not indicate quantity restrictions, but indicate the existence of at least one. Words such as "connect" or "connected" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the object being described changes, the relative positional relationship also changes accordingly.
[0028] See also Figure 1 The present application provides a wind speed prediction method based on spatiotemporal correlation, comprising the following steps:
[0029] Step 1: Collect wind speed data and wind direction data at several wind speed measurement points, and obtain geographical location information of several wind speed measurement points;
[0030] Specifically, the collected wind speed data and wind direction data are collected in a continuous time, and the samples are divided according to the time window, and the wind speed data and wind direction data after the sample division are cleaned and standardized;
[0031] See also Figure 2 ,In this embodiment, a wind energy data set collected in a certain area over a continuous time period is sampled, in which wind speed and wind direction information of multiple detection sites are collected, 25 wind turbines and the corresponding data are selected for study, and these wind turbines are arranged in a 2km×2km high regular rectangular grid;
[0032] After collecting wind speed and direction data, data cleaning is first performed to remove outliers and fill in missing data. Next, data standardization is performed to ensure the consistency and comparability of model input. The entire data set is then divided into training set, validation set, and test set according to the chronological order of the data, accounting for 70%, 15%, and 15% of the total data volume, respectively. This allocation ratio allows the model to have enough data for learning during the training phase, while also ensuring that there is an independent data set for model verification and testing, ensuring the generalization ability and reliability of the prediction results.
[0033] Step 2: Convert several wind direction data into angle functions and dynamically fuse the angle functions with a weighted matrix to obtain several wind direction features;
[0034] In this embodiment, the wind direction feature is extracted by a wind direction extraction model; a plurality of wind direction data are converted into a corresponding plurality of pairs of cosine values and sine values based on angle decomposition, and the plurality of pairs of cosine values and sine values are input into a wind direction feature extraction module to be fused to obtain a plurality of wind direction features;
[0035] Among them, the wind direction feature extraction module is constructed based on the weighted matrix. Specifically, the wind direction feature extraction module includes an initial convolution layer, a feature enhancement layer, a feature aggregation layer, and a fully connected layer;
[0036] The initial convolution layer uses 25 input channels, corresponding to 25 wind turbine data, uses a 1×1 convolution kernel for preliminary feature extraction, and sets the output channel to 256; the feature enhancement layer further maps and enhances the output features of the initial convolution layer through multiple 1×1 convolution units. Each unit is responsible for outputting a set of feature representations. The feature aggregation layer receives the output of the feature enhancement layer and further refines and strengthens these features through an attention-based weight update mechanism. This layer includes a preset number of units, each of which performs comprehensive processing on the input features to form a set of aggregated feature outputs. Finally, the output of this module is serialized through a fully connected layer;
[0037] The initial features obtained by the initial convolutional layer are expressed as follows:
[0038] ;
[0039] in, Indicates passing The characteristic matrix after the function, Represents the weight of the convolutional layer, which is learned through network training. represents the input features, Represents the bias term of the convolutional layer, which is learned through the network.
[0040] In the feature enhancement layer, the wind direction features represented by each node are enhanced by adaptive weighting. This ensures that node features with similar directions are easier to cluster, while node features with large differences can be distinguished. The task of the feature enhancement layer is to adaptively weight in multiple input dimensions and dynamically adjust the influence of each feature. When calculating the attention weight, cosine similarity is used to measure the correlation between different wind direction features. The weighting mechanism based on cosine similarity can better capture the periodic relationship between wind direction features. The formula is as follows:
[0041] ;
[0042] in, represents the adaptive weighting matrix, The query matrix representing the features, Representation Node The query vector is represents the key matrix of features, Representation Node The key vector of .
[0043] Through adaptive weighting matrix , each feature can be strengthened, the formula is as follows:
[0044] ;
[0045] in, is a matrix of values representing features, Representation Node The value vector of Represents the enhanced feature matrix.
[0046] So after the feature enhancement layer, we can get , and input it into the subsequent feature aggregation layer.
[0047] The feature aggregation layer first initializes the weight matrix between nodes , and dynamically updates the weights in each iteration through an adaptive adjustment mechanism. Initial weights It is set according to the degree of wind direction change between nodes. The greater the wind direction change between nodes, the higher the initial weight. The larger the value, the greater the weight. The purpose of this is to ensure that important nodes can obtain higher weights in the early stage. The formula is as follows:
[0048] ;
[0049] in, Representation Node The wind direction angle, Representation Node The wind direction angle, represents the initial weight of the iteration, is a learnable hyperparameter.
[0050] In the formula, the greater the difference in wind direction, the greater the difference between the cosine and sine values, and the exponential part of the formula will become smaller, making the initial weight Smaller. Through the exponential function, a larger wind direction difference can be converted into a smaller initial weight, and conversely, nodes with a small wind direction difference will have a larger initial weight to each other.
[0051] The core of the weight update mechanism is that in each iteration, the feature weighting between nodes is adaptive, combining the enhanced features in the previous step. To gradually optimize the weights between nodes. The iterative formula is as follows:
[0052] ;
[0053] in, Representation Node The enhanced feature vector of
[0054] The module aggregates the features between nodes according to the adaptive weights. The optimal feature representation is obtained by weighted summation of multiple iteration results. The formula is as follows:
[0055] ;
[0056] in, Representation Node The output feature vector of
[0057] The feature vector completed by the final iteration It is passed to the fully connected layer, and the output layer is adjusted to the predetermined output size for subsequent prediction tasks. The output dimension is adjusted to match the prediction target.
[0058] Step 3: Input the wind speed data into the autocorrelation weight matrix in time series form to obtain the time characteristics of the wind speed data;
[0059] Specifically, the wind speed data in time series form is adaptively time-coded and then the trend decomposition and seasonal decomposition of the time series of the wind speed data are performed through the series_decomp function and input into the autocorrelation weight matrix to obtain the time characteristics of the wind speed data.
[0060] The time series data is first processed through an embedding layer's adaptive time encoding and converted into a format suitable for model processing. The data is then passed through the series_decomp function to achieve trend and seasonal decomposition of the time series data. The formula is as follows:
[0061] ;
[0062] ;
[0063] Where x is the input time series data, the result after data embedding. MovingAvg is a technique used for smoothing time series data, which can reduce the impact of fluctuations and highlight more obvious trends. Trend represents the trend component extracted from the original time series. Seasonal represents the part after removing the trend, which usually contains seasonal fluctuations and other irregular changes.
[0064] The autocorrelation processing layer calculates the autocorrelation of the time series in order to capture the dependencies in the time series data. In particular, in the wind speed prediction task, the wind speed data has a strong temporal correlation, that is, the wind speed at the current moment is significantly correlated with the previous moment. Autocorrelation describes the correlation of a time series at different time lags. It can be calculated using the following formula:
[0065] ;
[0066] in, Indicates time Characteristics and time The degree of correlation between the features of Represents a sequence in time The characteristics of time, Represents a sequence in time The characteristics of time, represents the total length of the time series, Represents the characteristic mean of the series.
[0067] Autocorrelation weights are used to adjust the dependencies between different time steps of the time series. These weights are applied to the input features of the time series so that the model pays more attention to the historical information related to the wind speed at the current moment. The formula is as follows:
[0068] ;
[0069] in, Represents a sequence in time The characteristics of time, Represents a sequence in time The new value after calculation, represents the total length of the time series, Indicates time Characteristics and time The degree of correlation between the features.
[0070] The input features adjusted by autocorrelation weights are passed to LSTM to capture the long-term and short-term temporal dependencies in wind speed data. The time series features after decomposition and context analysis are passed to the fully connected layer to obtain the final time series related features.
[0071] Step 4: Based on the geographical location information, wind direction characteristics, and time characteristics of wind speed data of several wind speed measurement points, a graph structure is constructed. The weights between nodes in the graph structure are dynamically adjusted through the graph attention mechanism to extract spatial features. Then, the wind speed prediction results are obtained based on the wind direction characteristics, time characteristics of wind speed data, and spatial characteristics.
[0072] The geographical location information of each wind speed measurement point is used as a graph structure node. The geographical distance between each wind speed measurement point is reduced year-on-year as the edge between the graph structure nodes. The wind direction characteristics and the time characteristics of the wind speed data are used as the node features of the graph structure nodes.
[0073] Among them, the graph attention mechanism processes nonlinear features through the LeakyReLu function and dynamically adjusts the weights between nodes in the graph structure in combination with the discard layer.
[0074] The wind direction features extracted by the wind direction feature extraction module, the time series features extracted by the time feature extraction module, and the geographical location information of each measuring point are input into the graph attention module. The graph attention module analyzes the spatial correlation between different measuring points, dynamically adjusts the mutual influence weights between the measuring points, extracts wind speed correlation information, and directly outputs the wind speed prediction value of each measuring point based on these features.
[0075] The graph structure is constructed based on the geographical location information of each measuring point. Each measuring point is a node in the graph, and the edges between nodes are determined based on geographical proximity. The formula for constructing the graph structure is:
[0076] ;
[0077] in is a node representing a location, represents the edge, The weights representing the spatial relationships between nodes. Elements in Based on the node and nodes The distance between To calculate:
[0078] ;
[0079] The node feature conversion layer receives the wind direction features and wind speed features of each measuring point. After preprocessing by the first two modules (wind direction feature extraction and time feature extraction modules), these data are converted into an input format suitable for graph attention network processing. This layer maps the original input features to a higher-dimensional feature space through a fully connected layer (linear transformation) to extract and enhance the key information in the initial wind direction data and wind speed features. The ReLU activation function introduces nonlinearity to enhance the model's ability to capture complex patterns. The node feature transformation formula is as follows:
[0080] ;
[0081] in, represents the weight of the forehead protection segment feature conversion layer, which is learned through network training. represents the input node feature matrix, Represents the bias term of the node feature conversion layer, which is learned through the network.
[0082] The role of the edge feature embedding layer is to process the edge attributes between nodes. This layer converts the edge features into the same dimension as the node features so that they can be jointly processed in the graph attention layer. The embedding of edge features helps capture the relationship between measurement points and the spatial correlation between different measurement points. The edge feature embedding formula is as follows:
[0083] ;
[0084] in, represents the weight of the edge feature embedding layer, which is learned through network training. represents the input edge features, Represents the bias term of the variable feature embedding layer, which is learned through the network.
[0085] The importance weight calculation layer is used to calculate the importance of each node based on the wind speed variance of the node. For each node, the change in its wind speed data is calculated. The greater the change, the greater the impact of the wind speed data of the node on the entire wind farm area, and thus a higher weight is assigned. The calculation formula for importance weight is as follows:
[0086] ;
[0087] in Representation Node The formula for calculating the importance weight between two nodes is as follows:
[0088] ;
[0089] The first layer of GAT uses a multi-head attention mechanism to extract complex spatial information from processed node features and edge features. The multi-head attention mechanism enables the model to capture information dependencies of different dimensions between nodes by performing parallel calculations on multiple different subspaces. The second layer of GAT is configured as a single head, which further aggregates the features output by the first layer. The purpose of the single-head attention mechanism is to compress multi-dimensional feature information into a final prediction output, that is, the wind speed prediction value of each node.
[0090] Through the above description, the wind speed prediction method based on spatiotemporal correlation provided by the embodiment of the present application is used to construct a model for comparison with a common wind speed prediction model, and the data are shown in Table 1:
[0091] Table 1: Comparison data between the model constructed in this application and common prediction models
[0092]
[0093] In Table 1, represents a model constructed by a wind speed prediction method based on spatiotemporal correlation in the present application, represents the long short-term memory network, represents the long short-term memory network based on the attention mechanism, represents a gated recurrent unit, represents the attention-based gated recurrent unit, represents a recurrent neural network, represents a multi-layer perceptron network;
[0094] represents the mean absolute error, represents the mean absolute percentage error, represents the root mean square error, represents the coefficient of determination.
[0095] It can be seen from Table 1 that the model constructed by the wind speed prediction method based on spatiotemporal correlation in this application is , as well as All indicators show lower error values, which indicates that the model can predict wind speed more accurately. The improvement indicates that the model constructed by the wind speed prediction method based on spatiotemporal correlation in the present application has a stronger ability in capturing the law of wind speed changes.
[0096] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.
Claims
1. A wind speed prediction method based on spatiotemporal correlation, characterized in that: The steps include: Step 1: Collect wind speed data and wind direction data at several wind speed measurement points, and obtain geographical location information of several wind speed measurement points; Step 2: Convert several wind direction data into angle functions and fuse the angle functions to obtain several wind direction features; Step 2 includes: converting a plurality of wind direction data into a plurality of corresponding pairs of cosine values and sine values, and fusing the plurality of pairs of cosine values and sine values to obtain a plurality of wind direction features; The fusing of a plurality of pairs of cosine values and sine values to obtain a plurality of wind direction features comprises: dynamically fusing a plurality of pairs of cosine values and sine values through a weighted matrix to obtain a plurality of wind direction features; Step 3: Input the wind speed data into the autocorrelation weight matrix in time series form to obtain the time characteristics of the wind speed data; Step 4: Construct a graph structure based on the geographic location information, wind direction characteristics, and time characteristics of wind speed data of several wind speed measurement points. Dynamically adjust the weights between nodes in the graph structure through the graph attention mechanism, extract spatial features, and then obtain wind speed prediction results based on wind direction characteristics, time characteristics of wind speed data, and spatial characteristics.
2. The wind speed prediction method based on spatiotemporal correlation according to claim 1, characterized in that: In step 1, the collected wind speed data and wind direction data are collected in a continuous time, and the samples are divided according to the time window, and the wind speed data and wind direction data after the sample division are preprocessed; The preprocessing includes data cleaning and standardization.
3. The wind speed prediction method based on spatiotemporal correlation according to any one of claims 1 to 2, characterized in that: In step 3, the wind speed data in time series form is input into the autocorrelation weight matrix after adaptive time coding to obtain the time characteristics of the wind speed data.
4. The wind speed prediction method based on spatiotemporal correlation according to claim 3, characterized in that: The wind speed data in time series form is adaptively time-coded and then the time series of the wind speed data is subjected to trend decomposition and seasonal decomposition through the series_decomp function and input into the autocorrelation weight matrix to obtain the time characteristics of the wind speed data.
5. The wind speed prediction method based on spatiotemporal correlation according to any one of claims 1-2, characterized in that: The method of constructing a graph structure based on the geographical location information, wind direction characteristics and time characteristics of wind speed data of several wind speed measurement points includes: constructing graph structure nodes and edges between graph structure nodes based on the geographical location information of the wind speed measurement points, and using wind direction characteristics and time characteristics of wind speed data as node characteristics of graph structure nodes.
6. The wind speed prediction method based on spatiotemporal correlation according to claim 5, characterized in that: The method of constructing graph structure nodes and edges between graph structure nodes according to the geographical location information of the wind speed measurement points includes: taking the geographical location information of each wind speed measurement point as a graph structure node, and reducing the geographical distance between each wind speed measurement point year on year as edges between the graph structure nodes.
7. The wind speed prediction method based on spatiotemporal correlation according to any one of claims 1-2, characterized in that: The graph attention mechanism processes nonlinear features through the LeakyReLu function and dynamically adjusts the weights between nodes in the graph structure in combination with the discard layer.
8. A wind speed prediction system based on spatiotemporal correlation, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Short-term wind speed prediction method fusing time features and cross attention
CN115688602A
Multi-view fusion offshore wind power plant cluster power prediction method
CN117874500A