Wind power prediction method based on time-frequency fusion and double-view strategy
By constructing a TFCNet model and combining time-frequency fusion and a dual-view strategy, the problems of dynamic nonlinearity and non-stationary correlation in wind power prediction were solved, thereby improving the accuracy and stability of wind power prediction.
Patent Information
- Application Number
- CN202511064617.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-31
- Publication Date
- 2025-11-28
AI Technical Summary
Existing technologies struggle to effectively capture the dynamic nonlinear and nonstationary relationships between variables in wind power forecasting, and traditional models tend to ignore local information when dealing with complex features, leading to large prediction errors.
A wind power prediction method employing time-frequency fusion and dual-view strategies is proposed. By constructing a TFCNet model and combining it with a cross-channel temporal convolutional network, a time-frequency decomposition module, and a multi-scale feature extraction module, the model's multi-granularity local perception capability and long-term dependency capture capability are enhanced.
It improves the accuracy and stability of wind power forecasting, effectively handles non-stationary data, enhances the ability to perceive local features and overall trends, and reduces forecasting errors.
Smart Images

Figure CN121024863A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of wind power generation prediction, and particularly relates to a wind power prediction method based on time-frequency fusion and dual-view strategy. Background Technology
[0002] In recent years, with the rise of machine learning and big data technologies, data-driven prediction methods have broad application prospects in wind power prediction research. Traditional methods incorporate multiple factors into the prediction model, and considering the interactions and coupling relationships among these factors helps improve the accuracy and reliability of the prediction model. However, the inclusion of multiple factors, such as meteorological factors, can easily lead to the model overemphasizing long sequences while neglecting local information, making it difficult to effectively extract key information between high-latitude features. Therefore, focusing on the extraction of local features and enhancing the model's multi-granularity local perception capability is a key technical challenge.
[0003] Currently, most methods rely on single prediction models. However, these models struggle to fully capture the nonlinear and non-stationary relationships between variables in the face of complex features. Furthermore, wind speed is influenced by seasons and weather, and its distribution and fluctuations vary significantly over time. Such models typically assume a static, linear relationship between variables, making them unsuitable for these complex, dynamically evolving patterns. For example, using a single model like ARIMA in wind power forecasting, under the assumptions of linearity and stationarity, fails to accurately describe sudden wind speed changes or power fluctuations under extreme weather conditions, leading to significant prediction errors. Therefore, effectively addressing the issue of perceiving both local features and overall trends is crucial for improving prediction accuracy and reliability.
[0004] Traditional methods for modeling long-term dependencies often employ deep learning techniques (such as LSTNet and LSTM). LSTM can selectively retain or discard information, effectively capturing long-term dependencies. However, during the training process of traditional deep learning networks, the limited number of hidden states makes it difficult for these models to store key information from long sequences. Furthermore, the selective memory capability of the forget gate may not be sufficient to capture long-term dependencies between sequences when faced with complex temporal changes. These limitations cause models to focus on information from recent time steps while ignoring important features from earlier time steps, thus reducing their ability to capture key dynamic features in time series, especially when dealing with non-stationary data. Therefore, addressing the problem of information loss in long sequences in recurrent networks can effectively utilize information from earlier time steps. Summary of the Invention
[0005] To address the shortcomings of the existing technology, this invention provides a wind power prediction method based on time-frequency fusion and a dual-view strategy, comprising the following steps:
[0006] S1: Obtain two wind field datasets, P1 and P2. After preprocessing, divide the data into training and testing sets. Also, divide the P1 dataset into four datasets according to the date field: spring, summer, autumn, and winter.
[0007] S2: Construct a TFCNet model for wind power prediction;
[0008] S3: Using the divided training set and the four datasets of spring, summer, autumn and winter, train the TFCNet model respectively to obtain the trained TFCNet model;
[0009] S4: Obtain the test dataset and use the trained TFCNet model to obtain wind power prediction results.
[0010] The present invention also provides a computer-readable storage medium storing a computer program for executing the above-described wind power prediction method using a time-frequency fusion and dual-view strategy.
[0011] Based on the above technical solution, the present invention produces the following beneficial effects:
[0012] This invention employs a dual-view diagram strategy and proposes a time-frequency fusion prediction framework. Compared with existing technologies, this model includes two views: a cross-channel temporal convolutional network and a time-frequency decomposition-multi-scale fusion network, enabling the model to analyze local fluctuations as well as model the long-term trend and seasonal components of the sequence.
[0013] This invention introduces a local segmentation (Patch) processing technique. Compared with existing technologies, Patch divides the input data into smaller local regions, enabling the model to focus more on the extraction of local features and enhancing the model's multi-granularity local perception capability.
[0014] This invention constructs a Cross-Modality TCN (CMTCN), which expands the receptive field layer by layer through depthwise separable convolutions, enhancing the model's ability to efficiently capture long-term dependencies. Furthermore, it introduces SEBlock blocks to ensure information exchange between channels and obtains channel information through global pooling, improving the stability and accuracy of predictions.
[0015] This invention proposes a time-frequency decomposition block and a multi-scale feature extraction module for constructing frequency domain branches. Compared with existing technologies, this method uses STFT (Short-Time Fourier Transform) to convert the sequence from the time domain to the frequency domain, and extracts trend and seasonal components through downsampling. By de-stationing, it effectively identifies long-term trends and short-term fluctuations in dynamic time series data, and can gradually extract complex time patterns from the sequence, providing rich multi-dimensional time information for the model. Secondly, the multi-scale feature extraction module analyzes feature coupling correlations and uses convolutional kernels of different scales to extract local changes and long-term trend information, enhancing the capture of multi-dimensional time information. Attached Figure Description
[0016] Figure 1 This is a schematic diagram of the structure of the TFCNet model in an embodiment of this application.
[0017] Figure 2 This is a schematic diagram illustrating the principle of extended causal convolution in an embodiment of this application.
[0018] Figure 3 This is a schematic diagram of the structure of a cross-channel temporal convolutional network according to an embodiment of this application. Detailed Implementation
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] like Figures 1-3 As shown, this application provides a wind power prediction method based on time-frequency fusion and a dual-view strategy. This method employs a dual-view diagram strategy and proposes a time-frequency fusion prediction framework to capture the relationship between local features and overall trends. The results from the two views are merged through an MLP layer to construct a global-local perspective. The method includes the following steps:
[0021] S1: Obtain two wind field datasets, P1 and P2. After preprocessing, divide the data into training and testing sets. Furthermore, divide the P1 dataset into four datasets based on the date field: spring, summer, autumn, and winter. Specifically:
[0022] Two open-source datasets were obtained: a Turkish wind field dataset, containing multi-dimensional features such as date, wind speed, wind direction, and power, named P1; and a German wind field dataset, containing multi-dimensional features such as date, wind speed, wind direction, power, temperature, air pressure, and rainfall, named P2. After appropriate preprocessing, the data were divided into training and testing sets. The preprocessed P1 dataset was then further divided into four datasets based on the date field: spring, summer, autumn, and winter.
[0023] Furthermore, the preprocessing includes:
[0024] 1) Delete duplicate values.
[0025] 2) Outliers and missing values are filled by median imputation, that is, by using the mean of two adjacent time points.
[0026] 3) Maximum and minimum value normalization unifies all data to [0,1], as shown in the following formula:
[0027]
[0028] in, These represent the original data, the maximum value, the minimum value, and the standardized data, respectively.
[0029] S2: Construct a TFCNet model for wind power prediction. The TFCNet model is used to capture the relationship between local features and overall trends to generate prediction results.
[0030] like Figure 1 As shown, the TFCNet model includes: a Patch data processing module, a cross-modality temporal convolutional network (Cross-Modality TCN, CMTCN), a time-frequency decomposition module, a multi-scale feature extraction module, and an MLP layer.
[0031] Furthermore, the data processing module of the patch employs the patching method in PatchTST, which can extract fine-grained time patterns from each variable. Specifically, given a set of wind power input sequences... Where B is the batch size, L is the number of features, and C is the time step. These represent the feature matrices for each time step. , Each feature is represented by a sequence of length L. The Patch operation can be represented as:
[0032]
[0033]
[0034]
[0035]
[0036] In the formula: To prevent fragmented patch blocks from affecting the utilization of multi-granular dependencies, the sequence is... Perform a padding operation to obtain the length of the padded sequence. The patch length is common A patch block, is the length of the original sequence. A patch can be represented as Then, data reconstruction operations are performed. . Indicates data reconstruction, Map these patch blocks to the hidden layer , This represents the GELU activation function.
[0037] Furthermore, the Cross-Modality TCN (CMTCN) is used to capture subtle temporal changes in data points, model local fluctuations in sequences, and analyze their local characteristics. This network uses a Temporal Convolutional Network (TCN) as its basic network architecture. The core feature of TCN is a convolutional neural network that integrates dilated convolution and residual connections. The formula for calculating dilated convolution is as follows:
[0038]
[0039] In the formula: It is the dilation factor, which determines the jump stride of the convolution kernel; This refers to the kernel size. The principle is as follows: Figure 2 As shown, it strictly limits the convolution to only cover the content of the current and historical moments.
[0040] Furthermore, such as Figure 3 As shown, to enhance the local feature extraction capability of TCN, the CMTCN network introduces depthwise separable convolutions and SEBlock blocks. The CMTCN network consists of several CMTCN blocks. The portion within the dashed box in the figure corresponds to each CMTCN block, which contains two depthwise separable convolutions and one SEBlock (Squeezeand-ExcitationBlock) block to enhance feature representation. The SEBlock block performs average pooling on multiple channels and uses the Sigmoid activation function to obtain channel coefficients, weighting and labeling the channels to improve feature information selection capability.
[0041] CMTCN captures features at different time scales by stacking multiple temporal convolutional layers with gradually increasing dilation in each layer. The depthwise separable convolutions and SEBlock blocks are computed as follows:
[0042]
[0043]
[0044] In the formula: Depthwise separable convolution decomposes standard convolution into two independent operations: depthwise convolution and pointwise convolution. It is the depthwise convolution kernel size. Pointwise convolution kernel size, It is the output feature set after convolution; This represents the global pooling operation for each channel; and It is the weight matrix of the fully connected layer. It is the Sigmoid activation function.
[0045] Furthermore, the aforementioned Time-Frequency Decomposition (TFN) module is based on seasonal decomposition, aiming to decompose the sequence into trend and seasonal components. Its core idea is to separate influencing factors at different scales. Specifically, for time-series signals... Divide the sequence into overlapping windows , For window size, This refers to the sliding step size. The time-series sequence is transformed into frequency domain information using the Short-Time Fourier Transform (STFT) function to obtain richer, multi-granularity time-frequency information. The Short-Time Fourier Transform can be expressed as:
[0046]
[0047]
[0048] In the formula: It is a complex spectrum; Represents frequency The corresponding Fourier transform basis functions; the second formula represents the inverse STFT function, which converts the frequency domain signal back to the time domain.
[0049] Next, the sequence is decomposed into two parts using the concept of seasonal decomposition: a trend component and a seasonal component, and different operations are performed on each component. The trend component retains the low-frequency signal, while the seasonal component retains the high-frequency signal and takes the logarithmic amplitude and phase.
[0050]
[0051]
[0052] In the formula: and These represent the trend component and seasonal component in the frequency domain, respectively. .
[0053] Furthermore, the multi-scale feature extraction module MSFBlock is used to enhance the local feature perception capability at various scales and capture long-term dependencies in sequences through multi-channel processing. This module integrates downsampling operations, grouped convolutions, and normalization layers to construct the MSFBlock network. Its working method is as follows:
[0054] First, in the time-domain path, average pooling is used to process the trend components in the time domain. Perform downsampling, with the time step starting from... Transform into Then, preliminary processing is performed using specific grouped convolutions, and padding operations are used to ensure the output dimension is maintained. Unchanged. The downsampling operation is as follows:
[0055]
[0056]
[0057] In the formula: It is the trend component of the downsampling. It is the trend component in the time domain. yes The output of each convolution, It is the output of grouped convolution. It is a one-dimensional convolutional layer that does not change the convolution dimension. This is for layer normalization. This part extracts feature information at multiple scales through grouped convolutions, amplifies the hidden states between features, enhances the model's ability to capture complex temporal dependencies between data, and linearly projects it to the same dimension.
[0058] Next, multiple two-dimensional convolutional layers with different features are integrated into the frequency domain sequence, and the frequency domain sequence is dynamically weighted using residual connections to fully extract the mixed dependency features between the frequency domains. Transformed into seasonal components in the time domain through inverse STFT operation :
[0059]
[0060]
[0061]
[0062] In the formula: It is the Sigmoid function. For a set of weighting coefficients to be calculated.
[0063] Finally, a gating mechanism is used to combine the two components: .
[0064] In particular, such as Figure 1 As shown, the TFCNet model employs a dual-view strategy to address non-stationary factors in wind power sequences. The model primarily consists of two branches: a cross-channel temporal convolutional network and a time-frequency decomposition-multi-scale fusion network. The time-frequency decomposition-multi-scale fusion network comprises a time-frequency decomposition module and a multi-scale feature extraction module. These components work synergistically to maintain the coupling between variables while mitigating the impact of non-stationary factors. The working method of the TFCNet model is as follows:
[0065] First, input sequence The encoded sequence is obtained after the patch partitioning operation. Secondly, the sequence The cross-channel temporal convolutional network and the time-frequency decomposition-multi-scale fusion network are input separately. The cross-channel temporal convolutional network expands the receptive field layer by layer through dilated convolution and introduces an SE module to realize cross-channel information interaction, thereby obtaining... The time-frequency decomposition-multi-scale fusion network converts the sequence into frequency domain information using STFT, and separates the seasonal and trend components through upsampling and downsampling. These components are then input into the deep short-time feature extraction module, and the two components are merged through a gating mechanism to obtain the final result. Finally, the weights are calculated using the Softmax function and then fused and output through an MLP layer.
[0066]
[0067]
[0068] Furthermore, this embodiment employs the Adam optimizer and uses mean squared error (MSE) as the loss function. The MSE loss is defined by the following equation:
[0069]
[0070] in, It is the first One sample in Predicted value at time, It is the first One sample in The true value of a moment It refers to the number of samples.
[0071] S3: Using the divided training set and the four datasets for spring, summer, autumn, and winter, train the TFCNet model respectively to obtain the trained TFCNet model. Specifically:
[0072] Using the partitioned training set, a TFCNet model was trained on an NVIDIA GeForce RTX 4060ti 16G platform. The deep learning framework PyTorch was used to build and train the model. The model dimension was set to 128, the batch size to 32, the initial learning rate to 0.001, and the backtracking window to 30. All models were run with the same initial parameters to obtain the trained TFCNet model.
[0073] Using the P1 dataset (collected every hour), divided into four datasets (spring, summer, autumn, and winter) based on the date field, the TFCNet model was trained for prediction. Table 1 shows that, under different scenarios, the model closely approximates the real data regardless of whether the trend is "smooth" or "fluctuating." Furthermore, even with a smaller dataset size after splitting the data, the model still achieves good results on a small sample size, validating its robustness and stability.
[0074] Table 1 Seasonal Analysis
[0075]
[0076] S4: Obtain the test dataset and use the trained TFCNet model to obtain wind power prediction results.
[0077] This application's embodiments utilize a trained TFCNet model to perform predictions on a defined test set, and analyze the model's performance using a series of metrics, including... The results in Table 2 show that the embodiment of this application has the highest coefficient of determination and the lowest errors in RMSE and MAE. This indicates that the prediction performance of this method is stable and the prediction accuracy is the best.
[0078] Table 2 Experimental results of different models
[0079]
[0080] The CMTCN, MSFBlock, and TFN modules were removed, and ablation experiments were conducted on the P2 dataset. The results in Table 3 show that the RMSE and MAE of the proposed model in this application decreased when each module was removed, verifying the effectiveness and necessity of each module.
[0081] Table 3 Ablation Experiment
[0082]
[0083] This application also discloses a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the steps of a wind power prediction method based on time-frequency fusion and a dual-view strategy. Specifically, the computer-readable storage medium includes, but is not limited to, volatile memory and / or non-volatile memory. The volatile memory may include random access memory (RAM) and / or cache memory, etc. The non-volatile memory may include read-only memory (ROM), hard disk, flash memory, optical disk, magnetic disk, etc.
[0084] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. For those skilled in the art, other variations or modifications can be made based on the above description. It is impossible to exhaustively list all the implementation methods here. All obvious variations or modifications derived from the technical solutions of the present invention are still within the protection scope of the present invention.
Claims
1. A wind power prediction method based on time-frequency fusion and dual-view strategy, characterized in that, Includes the following steps: S1: Obtain two wind field datasets, P1 and P2. After preprocessing, divide the data into training and testing sets. Also, divide the P1 dataset into four datasets according to the date field: spring, summer, autumn, and winter. S2: Construct a TFCNet model for wind power prediction; S3: Using the divided training set and the four datasets of spring, summer, autumn and winter, train the TFCNet model respectively to obtain the trained TFCNet model; S4: Obtain the test dataset and use the trained TFCNet model to obtain wind power prediction results.
2. The wind power prediction method according to claim 1, characterized in that, The preprocessing includes: Remove duplicate values; fill out outliers and missing values using median imputation; normalize the maximum and minimum values to unify all data to [0,1].
3. The wind power prediction method according to claim 1, characterized in that, The TFCNet model includes: a data processing module for Patch, a cross-channel temporal convolutional network, a time-frequency decomposition module, a multi-scale feature extraction module, and an MLP layer; The data processing module of the Patch is used to extract fine-grained time patterns from each variable; The cross-channel temporal convolutional network is used to capture subtle changes in data points over time, model local fluctuations in sequences, and analyze their local characteristics. The time-frequency decomposition module is used to decompose the sequence into trend components and seasonal components; The multi-scale feature extraction module is used to enhance the perception of local features at various scales and to capture long-term dependencies in sequences through multiple channels.
4. The wind power prediction method according to claim 3, characterized in that, The cross-channel temporal convolutional network uses a temporal convolutional network as its basic network architecture and introduces depthwise separable convolutions and SEBlock blocks to enhance the local feature extraction capability of the temporal convolutional network.
5. The wind power prediction method according to claim 4, characterized in that, The SEBlock block uses average pooling to obtain channel coefficients and applies weighted calibration to the channels to improve the feature information selection capability.
6. The wind power prediction method according to claim 3, 4 or 5, characterized in that, The time-frequency decomposition block module performs the following operations: For time-series signals, the sequence is divided into overlapping windows; The time series is transformed into frequency domain information by using the short-time Fourier function to obtain richer multi-granular time-frequency information; The sequence is decomposed into trend components and seasonal components using the idea of seasonal decomposition. The trend components retain low-frequency signals, while the seasonal components retain high-frequency signals and take the logarithmic amplitude and phase.
7. The wind power prediction method according to claim 6, characterized in that, The multi-scale feature extraction module performs the following operations: In the time domain path, the trend component is downsampled using average pooling. We extract feature information at multiple scales using grouped convolutions and ensure that the output dimension remains unchanged through padding operations. Two-dimensional convolutional layers with different features are integrated into the frequency domain sequence, and the frequency domain sequence is dynamically weighted using residual connections to extract the mixed dependency features between the frequency domains; The seasonal components are converted into time-domain seasonal components through an inverse STFT operation; A gating mechanism is used to combine the trend component and the seasonal component in the time domain.
8. The wind power prediction method according to claim 1 or 3, characterized in that, The TFCNet model employs a dual-view strategy; the dual views include a cross-channel temporal convolutional network and a time-frequency decomposition-multi-scale fusion network; the time-frequency decomposition-multi-scale fusion network includes a time-frequency decomposition module and a multi-scale feature extraction module.
9. The wind power prediction method according to claim 8, characterized in that, The TFCNet model performs the following operations: The input sequence is divided into an encoded sequence after being processed by the Patch operation. The encoded sequences are respectively input into cross-channel temporal convolution and time-frequency decomposition-multi-scale fusion networks; The cross-channel temporal convolutional network expands the receptive field layer by layer through dilated convolution and introduces an SE module to realize cross-channel information interaction, thereby obtaining the output feature set after convolution; The time-frequency decomposition-multi-scale fusion network converts the sequence into frequency domain information through short-time Fourier transform, and separates the seasonal component and trend component by up-down sampling. These components are then input into the deep short-time feature extraction module, and the two components are merged through a gating mechanism. The weights are calculated using the Softmax function and then fused and output through an MLP layer.
10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program for executing a wind power prediction method based on time-frequency fusion and dual-view strategy as described in any one of claims 1-9.