TCN-LSTM wind power generation capacity prediction method combining time-frequency analysis and attention mechanism

Through the TCN-LSTM method of time-frequency analysis and multi-headed self-attention mechanism, it solves the problem of integration of wind-energy power generation forecasting medium-time and frequency domain characteristics, and realizes high-precision wind power generation forecasting and power system scheduling optimization.

CN119382103AActive Publication Date: 2025-01-28NORTHEAST GASOLINEEUM UNIV

Patent Information

Application Number
CN202411504827.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-27
Publication Date
2025-01-28
Estimated Expiration
2044-10-27

AI Technical Summary

Technical Problem

The prior art is difficult to effectively integrate time and frequency domain features in wind power generation prediction, and cannot fully capture multimodal features and long-term dependencies, resulting in insufficient prediction accuracy and adaptability.

Method used

Adopt TCN-LSTM wind energy prediction methods with a combination of time-frequency analysis combined with the multi-head self-attention mechanism, to extract the time frequency characteristics through the wavelet transformation, and use the TCN-LSTM combination network to process long-term relying on the long-term relying on the multi-headed self-attention mechanism to enhance the overall situation. Capture of dependencies.

Benefits of technology

It significantly improves the accuracy of wind power generation prediction and the calculation efficiency of the model. It can more accurately capture multi -modal characteristics and long -term dependency relationships, and it is suitable for the prediction and optimization scheduling in the power generation in the complex power system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119382103A_ABST
    Figure CN119382103A_ABST
Patent Text Reader

Abstract

The invention relates to a TCN-LSTM wind power generation capacity prediction method combining time-frequency conjoint analysis and a multi-head self-attention mechanism. The TCN-LSTM wind power generation capacity prediction method comprises the following steps: preprocessing original data of wind power generation; frequency domain features of the wind power generation data are extracted through wavelet transform, adaptive weighted fusion is carried out on the frequency domain features and time domain features, and a time-frequency conjoint analysis module is constructed; a TCN-LSTM combined network of a time convolution network TCN and a long short-term memory network LSTM is constructed; a multi-head self-attention mechanism is introduced into the TCN-LSTM combination network, and a TCN-LSTM wind energy generating capacity prediction model combining time-frequency analysis and the attention mechanism is generated; training the model by using the wind power generation data set; the trained prediction performance is evaluated; and performing wind power generation prediction by using the final wind power generation prediction model. According to the method, the accuracy of wind power generation prediction and the calculation efficiency of the model are remarkably improved, and the precision of wind power prediction is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical field:

[0001] The present invention relates to the accurate prediction of wind and solar power generation and power system dispatch optimization in the field of power system, smart grid and new energy prediction technology, specifically to a TCN-LSTM wind power generation prediction method combining time-frequency joint analysis with a multi-head self-attention mechanism. Background technology:

[0002] With the continuous growth of global energy demand and the improvement of environmental protection requirements, renewable energy such as wind and solar energy has gradually become an important part of electricity production. Wind power generation is affected by various external factors such as weather and seasons, showing significant volatility and intermittency. This uncertainty has brought great challenges to the stable operation of the power system. Especially when the proportion of access to the power grid is increasing, the accuracy of wind power generation prediction directly affects the security and dispatch optimization of the power grid. Therefore, it is of great practical significance to study high-precision wind power generation prediction models.

[0003] At present, wind power generation forecasting is mainly based on time series forecasting methods, and commonly used statistical methods include ARIMA model and support vector regression (SVR). However, traditional statistical methods have obvious limitations in dealing with complex nonlinear and non-stationary time series data, especially in multimodal information processing and long-term and short-term dependency modeling, showing low prediction accuracy and adaptability. In addition, how to effectively integrate the time domain and frequency domain features in wind power generation data to improve the accuracy of the prediction model is also a major difficulty in existing research.

[0004] Therefore, existing technologies have many shortcomings when dealing with the complexity of wind power generation forecasting, such as the inability to effectively integrate multimodal information, difficulty in simultaneously processing long-term and short-term dependency features, and low computational efficiency. Summary of the invention:

[0005] The purpose of the present invention is to provide a TCN-LSTM wind power generation prediction method combining time-frequency analysis and attention mechanism. This TCN-LSTM wind power generation prediction method combining time-frequency analysis and attention mechanism is used to solve the problem that traditional models in the prior art cannot fully capture multimodal features and long-term dependencies.

[0006] The technical solution adopted by the present invention to solve the technical problem is: the TCN-LSTM wind power generation prediction method combining time-frequency analysis and attention mechanism includes the following steps:

[0007] Step 1: Obtaining the original data of wind power generation and preprocessing the original data of wind power generation;

[0008] Step 2: After data preprocessing, the frequency domain features of wind power generation data are extracted by wavelet transform, and adaptive weighted fusion is performed with the time domain features to construct a time-frequency joint analysis module TFAA, perform time-frequency joint feature analysis, extract multimodal information, and obtain a wind power generation data set;

[0009] Step 3: Construct a TCN-LSTM combined network of a temporal convolutional network (TCN) and a long short-term memory network (LSTM) to improve the perception of complex time series features by processing long-term and short-term dependency features at the same time;

[0010] Step 4: Introduce the multi-head self-attention mechanism into the TCN-LSTM combined network to obtain the TCN-LSTM wind power generation prediction model that combines time-frequency analysis and attention mechanism. Capture the global dependency through multiple parallel attention heads to realize the perception of the context information of wind power generation data.

[0011] Step 5: Use the wind power generation data set generated in step 2 to train the model and optimize key parameters through hyperparameter optimization;

[0012] Step 6: Evaluate the prediction performance of the trained TCN-LSTM wind power generation prediction model combining time-frequency analysis and attention mechanism, and obtain the final TCN-LSTM wind power generation prediction model combining time-frequency analysis and attention mechanism;

[0013] Step 7: Use the final TCN-LSTM wind power generation prediction model that combines time-frequency analysis and attention mechanism to predict wind power generation.

[0014] The specific step 1 of the above scheme is:

[0015] 1.1. Data cleaning: Eliminate unreasonable records in the original data of wind power generation. The original data of wind power generation includes air density, wind speed and temperature;

[0016] 1.2. Data interpolation: cubic spline interpolation is used to fill in missing data to ensure data continuity;

[0017] 1.3. Normalization: Use maximum and minimum normalization for all data and scale the data range to [0,1].

[0018] The method for constructing the time-frequency joint analysis module in step 2 of the above scheme is specifically as follows:

[0019] 2.1. Use wavelet transform to extract frequency domain feature information of pre-processed wind power generation data;

[0020] 2.2. Construct the time domain feature F for the data after wavelet transformation time (t) and frequency domain features Ffreq (f);

[0021] 2.3. The time domain feature F time (t) and frequency domain features F freq (f) Feature fusion, calculation of fusion weight W time ;

[0022] W time =σ(Conv1D(GAP(F time (t)+F freq (f))))

[0023] Where W time is the adaptive weight, which indicates the relative importance of time domain and frequency domain features. The weight is automatically learned through the global average pooling GAP and the one-dimensional convolution Conv1D layer. σ is the Sigmoid activation function, and the output value is between [0,1].

[0024] 2.4. Obtain the fused feature representation F fusion :

[0025]

[0026] The TCN-LSTM combined network model in the steps of the above scheme is as follows:

[0027]

[0028] In the formula, is the combined feature vector, indicating the final feature output after fusion; is the output feature of the LSTM model at time step t; is the output feature of the TCN model at time step t; β(t) is the time-varying adaptive adjustment function; W β is a trainable weight matrix; b β is the bias term.

[0029] Beneficial effects:

[0030] 1. The wind power generation prediction model based on time-frequency joint analysis, TCN-LSTM combined network and multi-head self-attention mechanism proposed in the present invention extracts and fuses time-frequency features through wavelet transform, combines TCN and LSTM networks to model complex time series features, and introduces multi-head self-attention mechanism to enhance the ability to capture global dependencies, which significantly improves the accuracy of wind power generation prediction and the computational efficiency of the model, can improve the accuracy of wind energy prediction, solve the problem that traditional models cannot fully capture multimodal features and long-term dependencies, and is suitable for power generation prediction and optimal scheduling in complex power systems.

[0031] 2. The present invention solves the problem that it is difficult to effectively extract and fuse time domain and frequency domain information in the prior art by introducing the time-frequency joint analysis module (TFAA), fully exploits the multimodal characteristics in wind energy data, and thus greatly improves the accuracy of power generation prediction; the construction of the TCN-LSTM combined network enhances the model's ability to handle long-term and short-term dependencies, significantly improves the modeling effect of complex time series data, and overcomes the shortcomings of existing deep learning models in modeling long-term and short-term dependencies; the introduction of the multi-head self-attention mechanism (MHSA) further enhances the model's capture of global time series dependencies, especially in long-term prediction tasks, greatly improves the accuracy of the model, and accurately predicts wind power generation.

[0032] 3. The present invention ensures the high stability and generalization ability of the model under different meteorological conditions by optimizing the hyperparameters, so that it has good adaptability in the practical application of wind power generation systems.

[0033] 4. The present invention can effectively reduce the impact of power generation fluctuations on grid operation, improve the grid's dispatch optimization capabilities and its ability to absorb renewable energy, and reduce the demand for backup capacity.

[0034] 5. The present invention plays an important role in improving the accuracy of power generation prediction, enhancing the stability of the power grid and optimizing resource scheduling. The experimental results verify its wide applicability in practical applications and its performance significantly superior to that of existing technologies, and it has good prospects for promotion. Description of the drawings:

[0035] Figure 1 This is the structure diagram of the TCN-LSTM model with time-frequency joint analysis and multi-head self-attention mechanism;

[0036] Figure 2 It is the time series diagram of the original data of wind farm in different seasons;

[0037] Figure 3 This is the data series diagram after wavelet decomposition of wind energy forecast data;

[0038] Figure 4 It is a sensitivity analysis diagram of learning rate and batch size;

[0039] Figure 5 is the mother wavelet of wavelet transform and decomposition scale map;

[0040] Figure 6 Loss change graph for model training;

[0041] Figure 7 This is a comparison chart of wind power generation ablation experiments. Specific implementation method:

[0042] The present invention will be further described below:

[0043] See also Figure 1 ,This TCN-LSTM wind power generation prediction method combining time-frequency analysis and attention mechanism specifically includes the steps of data preprocessing, time-frequency feature extraction and fusion, TCN-LSTM combined network, introduction of attention mechanism, model training and optimization;

[0044] Step 1: Data preprocessing: Clean and preprocess the raw data of wind power generation, remove invalid or abnormal data, fill in missing values, and normalize the data to unify data of different dimensions in the same numerical range. The data preprocessing step can improve the accuracy of subsequent feature extraction and modeling, provide a reliable data foundation for model construction, and ensure data consistency and quality; preprocessing of wind power generation data includes the following steps:

[0045] Data cleaning: Eliminate unreasonable records in the data set, such as records with wind speed less than 0 or abnormally high.

[0046] Data interpolation: Cubic spline interpolation method is used to fill in missing data to ensure data continuity.

[0047] Normalization: Use maximum and minimum normalization for all data to scale the data range to [0,1]. The formula is as follows:

[0048]

[0049] In the formula, x ij is the jth sample value of the i-th physical quantity, is the corresponding normalized value; x i.max is the maximum value of the i-th physical quantity, x i.min is the minimum value of the i-th physical quantity.

[0050] Step 2: Time-frequency joint feature analysis: After data preprocessing, wavelet transform is used to analyze the time-frequency domain features of wind power generation data. Wavelet transform can extract frequency domain features at multiple scales and reveal the spectral information in the data. The frequency domain features of wind power generation data are extracted by wavelet transform, and adaptively weighted fusion is performed with the time domain features to construct a time-frequency joint analysis module (TFAA). This module can simultaneously consider the differences in time domain and frequency domain features, effectively extract multimodal information, solve the problem that traditional models cannot fully consider the differences in time domain and frequency domain information, and solve the problem that traditional methods cannot take into account both time and frequency information.

[0051] The wind energy data sequence contains nonlinear and non-stationary features. In order to effectively extract the features of the time domain and frequency domain, the present invention uses wavelet transform (WT) to extract frequency domain information. The formula of wavelet transform is as follows:

[0052]

[0053] Among them, Ψ(t) is the mother wavelet function, s is the scale parameter, τ is the translation parameter, and * represents the complex conjugate operation;

[0054] For the data after wavelet transformation, construct the time domain feature F time (t) and frequency domain features F freq (f); Next, we enter the feature fusion part and first calculate the fusion weight W time ;

[0055] W time =σ(Conv1D(GAP(F time (t)+F freq (f))))

[0056] Among them, W time is an adaptive weight, which indicates the relative importance of time domain and frequency domain features. The weight is automatically learned through the global average pooling (GAP) and one-dimensional convolution (Conv1D) layer. σ is the Sigmoid activation function, which ensures that the output value is between [0,1]. Finally, the fused feature representation F is obtained. fusion ;

[0057]

[0058] Step 3: TCN-LSTM combined network: Construct a combined structure of a temporal convolutional network (TCN) and a long short-term memory network (LSTM), where: the TCN network is used to capture long-term dependencies, and the time window is expanded by dilated convolution to improve the model's ability to model long-term dependencies. The LSTM network is used to further extract local time series features and solve the problem of capturing short-term dependency information; through the combination of TCN and LSTM, it is ensured that the model can take into account both long-term and short-term dependencies when processing complex time series features.

[0059] Based on the characteristics of wind power generation data, a combined network structure of temporal convolutional network (TCN) and long short-term memory network (LSTM) is constructed. TCN expands the time window by dilation convolution, effectively captures long-term dependencies, and enhances the model's ability to model long-term features. LSTM is used to further extract local short-term dependency features and solve short-term fluctuation problems. Through the combination of TCN and LSTM, the model can process long-term and short-term dependency features at the same time and improve the perception of complex time series features.

[0060] Temporal Convolutional Network (TCN) handles long-term dependencies through causal convolution and dilated convolution.

[0061] Causal convolution: Causal convolution ensures that each time step in the output sequence depends only on the data of the current time step and its previous time step, maintaining the causal order of time. For the fused time-frequency feature input sequence, the calculation formula of causal convolution is:

[0062]

[0063] In the formula, w i is the convolution kernel parameter, and k is the size of the convolution kernel. Causal convolution can ensure that the convolution operation does not introduce future information.

[0064] Dilated convolution: In order to expand the receptive field, TCN introduced dilated convolution. Based on the standard convolution, the dilated convolution increases the interval between inputs by introducing the dilation factor d, thereby expanding the receptive field without increasing the number of parameters. The calculation formula of the dilated convolution is:

[0065]

[0066] By adjusting the expansion factor d, TCN can gradually expand the time window in the multi-layer network to achieve modeling of long-term dependencies. The multi-layer expansion convolutional network can be expressed as:

[0067]

[0068] Where D represents the number of available dilation factors, is the output feature after multiple layers of causal convolution and dilated convolution, f represents the nonlinear activation function, is the convolution weight of the Lth layer, is the output from the previous time step from the L-1th layer;

[0069] LSTM is used to further capture local time series features. Its core formula is as follows:

[0070] The forget gate controls the memory state of the previous moment:

[0071] f t =σ(W f [h t-1 ,z t ]+b f )

[0072] Among them, f t is the activation value of the forget gate, σ is the sigmoid activation function, W f and b f are weight and bias parameters respectively, h t-1 is the hidden state at the previous moment, x t is the input at the current moment;

[0073] The input gate determines the update of the current information:

[0074]

[0075] Among them, i t is the activation value of the input gate, is the candidate memory cell state, tanh is the hyperbolic tangent activation function, W i and W c is the weight matrix, b i and b c is the bias term

[0076] The cell state update combines the results of the forget gate and the input gate:

[0077]

[0078] in, Represents element-wise product operation;

[0079] The output gate determines the output at the current moment:

[0080] o t =σ(W o [h t-1 ,z t ]+b o )

[0081]

[0082] Through the above formula, LSTM can capture local time series features while maintaining the long-term memory capacity of the model. Combined with the extensive time-dependent information extracted by TCN, the final output feature is expressed as:

[0083]

[0084] in, is the combined feature vector, indicating the final feature output after fusion; is the output feature of the LSTM model at time step t; is the output feature of the TCN model at time step t; β(t) is the time-varying adaptive adjustment function; W β is a trainable weight matrix; b β is the bias term.

[0085] Step 4: Multi-head self-attention mechanism: The multi-head self-attention mechanism (MHSA) is introduced into the model to capture the global dependencies in the time series data through multiple parallel attention heads. This mechanism can enhance the model's perception of the contextual information of wind and photovoltaic power generation data and avoid the limitations of traditional networks in modeling global dependencies. MHSA captures global information in different attention dimensions through a multi-head mechanism, effectively improving the prediction accuracy of the model.

[0086] The self-attention mechanism assigns different weights to features at different positions by calculating the dependencies between positions in the sequence. Given an input sequence H = {h1,h2,...,h T}, whose query matrix Q, key matrix K and value matrix V are generated by linear transformation of the input respectively:

[0087] Q=HW Q ,K=HW K ,V=HW V

[0088] Among them, W Q ,W K and W V is a learnable weight matrix. The self-attention calculation formula is:

[0089]

[0090] Among them, d k is the dimension of the key vector, and the softmax function ensures that the attention weights are normalized. Through this calculation, the model can pay attention to the relevance of different positions in the sequence globally, thereby better capturing temporal dependencies;

[0091] The multi-head mechanism calculates the outputs of multiple self-attention heads in parallel and concatenates the results. The formula is as follows:

[0092] MHSA(H)=Concat(head1,head2,...,headn)W o

[0093] Among them, head i =Attention(Q i ,K i ,V i ), W o is the output linear transformation matrix;

[0094] Make the final prediction of the attention-weighted output:

[0095]

[0096] Among them, W outis the weight matrix of the output layer, b out is the bias term of the output layer;

[0097] Step 5: Model training and hyperparameter optimization: Use actual wind and photovoltaic power generation data to train the model and optimize the model's hyperparameters, including learning rate, batch size and other parameters, to ensure the stability and generalization ability of the model;

[0098] Loss function: Use root mean square error (RMSE) as the loss function

[0099]

[0100] Among them, y i is the true value, is the model prediction value;

[0101] Step 6: Model evaluation and prediction: Use root mean square error (RMSE), mean absolute error (MAE) and coefficient of determination (R 2 ) and other indicators to compare and evaluate the prediction performance of different models to ensure the prediction accuracy and robustness of the present invention in practical applications;

[0102]

[0103] In the formula, p i and They are the actual observed value and the predicted value of power at the i-th prediction point: is the average value of the observed value, and N is the number of test sample points.

[0104] Step 7: Use the final TCN-LSTM wind power generation prediction model that combines time-frequency analysis and attention mechanism to predict wind power generation.

[0105] Embodiment 1:

[0106] Taking an actual wind farm in a certain province of China as the research object, the TCN-LSTM wind power generation prediction method combining time-frequency joint analysis and multi-head self-attention mechanism is described in detail as follows:

[0107] Step 1: Data preprocessing: Clean and preprocess the raw data of wind power generation and photovoltaic power generation, remove invalid data, fill in missing values, and normalize the data to ensure data consistency and quality;

[0108] The wind power generation prediction data uses air density (AD), wind speed (WS), and temperature (Tem) as model inputs and power generation (WP) as output. The sampling frequency is once every hour, with more than 8,000 cumulative records, showing a high time resolution. The preprocessed data is as follows Figure 2 As shown;

[0109] Step 2: Time-frequency joint feature analysis: The frequency domain features of wind power generation data are extracted through wavelet transform, and adaptively weighted fusion is performed with the time domain features to construct a time-frequency joint analysis module (TFAA). This module can effectively extract multimodal information and solve the problem that traditional models cannot fully consider the differences in time domain and frequency domain information;

[0110] like Figure 3 As shown in the figure, the wavelet decomposition results of wind power generation prediction data are shown. After wavelet decomposition, the wind power data of each season is divided into approximate components and detail components; however, the length of the frequency domain information obtained after wavelet transform is half of the length of the original wind power generation data sequence. Therefore, the binary interpolation reconstruction method is used to process the frequency domain information to make it consistent with the length of the original wind power generation sequence information.

[0111] Step 3: TCN-LSTM combined network: Construct a combined structure of a temporal convolutional network (TCN) and a long short-term memory network (LSTM), where: the TCN network is used to capture long-term dependencies, and the time window is expanded by dilated convolution to improve the model's modeling ability for long-term dependencies. The LSTM network is used to further extract local time series features and solve the problem of capturing short-term dependency information; through the combination of TCN and LSTM, it is ensured that the model can take into account both long-term and short-term dependencies when processing complex time series features;

[0112] Step 4: Multi-head self-attention mechanism: The multi-head self-attention mechanism (MHSA) is introduced into the model to capture the global dependencies in the time series data through multiple parallel attention heads. This mechanism enhances the model's ability to perceive contextual information and effectively improves prediction accuracy;

[0113] Step 5: Model training and hyperparameter optimization: Use actual wind and photovoltaic power generation data to train the model and optimize the model's hyperparameters, including learning rate, batch size and other parameters, to ensure the stability and generalization ability of the model;

[0114] The preprocessed dataset is divided into training set, validation set and test set, accounting for 80%, 10% and 10% respectively. The training set is used to train the model, the validation set is used for hyperparameter adjustment and model selection, and the test set is used for the final performance evaluation.

[0115] The training results are as follows Figure 4 As shown in the figure, after 200 rounds of training, the loss value of the training set rapidly decreases from the initial value close to 1 and eventually stabilizes, with the lowest loss value reaching 0.12. The loss value of the validation set also shows a gradual downward trend during the training process, with the lowest loss value being 0.22, indicating that the model has good generalization ability on the test set and can effectively avoid overfitting.

[0116] The hyperparameter optimization process is as follows Figure 5 As shown, at a lower learning rate (such as 10 -4 Up to 10 -3 ), the validation loss (RMSE) of the model decreases significantly, indicating that the model can converge effectively in this range; however, when the learning rate increases to 10 -2 When the batch size is 50 to 100, the validation loss rises sharply, indicating that the model over-adjusts the weights, resulting in unstable or even divergent training. Similarly, the analysis of batch size shows that smaller batches (such as 50 to 100) can significantly reduce the validation loss and optimize the generalization ability of the model, but when the batch size is too large, the model's ability to capture data is weakened, resulting in an increase in validation loss.

[0117] The optimal points of learning rate and batch size are 10 -3 and 100, which means that with the moderate configuration of these two hyperparameters, the model can be trained with the best speed and stability, thus achieving the best performance. The shaded area in the figure represents the error range, and the upper and lower boundaries of the error band usually represent the upper and lower limits of a certain error metric. For example, in the figure, the values ​​within the error band represent the degree of fluctuation of the validation loss (such as RMSE) under different learning rates or batch sizes. The wider the error band, the greater the uncertainty of the model performance under the learning rate or batch size, and the narrower the error band, the more stable the model performance.

[0118] like Figure 6 As shown in the figure, common mother wavelets include Daubechies, Haar, Meyer, etc. In different application scenarios, the appropriate mother wavelet should be selected according to the characteristics of the signal and the purpose of analysis. In addition, the choice of decomposition scale determines the depth of the signal decomposition, that is, to what extent the details are retained or the noise is filtered out. The db4 and coif1 wavelets have lower root mean square errors (RMSE) in model prediction, but the db4 wavelet has smaller error fluctuations, indicating that it has higher stability and effectiveness in feature extraction. The right figure shows the impact of the choice of wavelet decomposition level on the model performance. When the decomposition level is 4, the model has the lowest RMSE, the best performance, and the smallest error fluctuation, revealing that the appropriate decomposition level can effectively balance the fineness of feature extraction and the anti-noise performance of the model.

[0119] Step 6: Model evaluation and prediction: Use root mean square error (RMSE), mean absolute error (MAE) and coefficient of determination (R 2 ) and other indicators to compare and evaluate the prediction performance of different models to ensure the prediction accuracy and robustness of the present invention in practical applications;

[0120] The RMSE (root mean square error), MAE (mean absolute error) and R of seven prediction models, including ARIMA, RNN, GRU, LSTM, TCN-LSTM, LSTM-FCN and TCN-LSTM-MHSA, in the wind power generation process are calculated in four seasons (spring, summer, autumn and winter). 2 (Three common evaluation indicators) Results. The specific results are shown in Table 1. By analyzing these indicators, we can more clearly understand the performance of each model in different seasons:

[0121] Table 1 Evaluation indicators of different wind power generation models

[0122]

[0123]

[0124] The definitions of the indicators in Table 1 are as follows:

[0125] RMSE (root mean square error): measures the root mean square of the square difference between the model prediction value and the true value. The smaller the value, the smaller the model prediction error and the higher the prediction accuracy. MAE (mean absolute error): represents the average value of the absolute difference between the predicted value and the true value. The smaller the value, the higher the prediction accuracy of the model. 2 (Coefficient of determination): Measures the degree of fit of the model. The closer the value is to 1, the better the model fit is and the higher the prediction accuracy is.

[0126] Traditional wind power generation prediction models, such as ARIMA, RNN, GRU, LSTM, TCN and LSTM-FCN models, have shortcomings in some aspects:

[0127] The ARIMA model is only applicable to linear time series data. It performs poorly in the face of the nonlinear characteristics of wind power generation, has large prediction errors, and is difficult to adapt to actual scenarios. Although the RNN model can capture short-term dependencies, it performs poorly when dealing with long-term dependencies due to the gradient vanishing problem, and is difficult to handle the complex time series patterns in wind power generation. The GRU model optimizes the RNN through a gating mechanism, but it still has limitations in multimodal information processing and cannot cope with the nonlinear and multidimensional features in wind power generation data. The LSTM model effectively solves the problem of long-term dependencies, but it has high complexity, long training time, and cannot process time domain and frequency domain features at the same time. The model has limited effect on multimodal data processing. The TCN-LSTM combination model combines the advantages of TCN and LSTM and can capture long-term and short-term dependencies, but it still has shortcomings in global time series modeling and multimodal feature fusion. Although the LSTM-FCN model combines the feature extraction capabilities of the convolutional network, the convolutional network has limited ability to capture global features and cannot fully model global dependencies in time series data.

[0128] Model comparison analysis:

[0129] The ARIMA model performs better in summer. 2 Up to 0.858, but in autumn R 2 The LSTM model is only 0.381, which shows its limitation in dealing with seasonal fluctuations. The LSTM model is better than ARIMA in summer. 2 is 0.83. Although the error increases in winter, R 2 The TCN-LSTM model performs well in capturing complex time series features. 2 The R2 of the RNN and GRU models in spring is 0.79, but the performance in autumn is poor. The comprehensive performance of the LSTM-FCN model is better than 0.75, especially in spring, the R2 reaches 0.85, and the prediction error is low, showing the potential for processing multi-dimensional time series data. The model (TCN-LSTM-MHSA) proposed in the present invention outperforms the traditional model in all seasons, especially in summer, the R2 value reaches 0.87, indicating that it has significant advantages in capturing the complex time series characteristics of wind power generation data. At the same time, the RMSE and MAE values ​​of the model are lower than those of other models, further verifying its effectiveness and robustness in wind power generation prediction. Through these comparative analyses, it can be seen that different models have their own advantages and disadvantages in wind power generation prediction, and the model proposed in the present invention shows a strong comprehensive ability, which is worthy of further exploration and optimization in practical applications.

[0130] like Figure 7 As shown, A, B, C, D, and E represent TCN-LSTM-TFAA-MHSA, No TFAA, No TCN, No LSTM, and NoMHSA. The RMSE and MAE of the model of the present invention in spring are 0.11 and 0.079, respectively. 2 In summer, although the overall error decreased and the RMSE of the full model dropped to 0.105, the R 2 The value rose to 0.87, indicating that the model's prediction accuracy for summer wind power generation has been further improved. In contrast, the ablation of the TFAA module has the most significant impact on the model, especially in autumn and winter, with RMSE rising to 0.138 and 0.128, respectively, and R 2 The values ​​of R dropped to 0.76 and 0.78 respectively, which indicates that the TFAA module plays a key role in the complex seasonal fluctuations. The ablation of TCN and LSTM modules mainly affects the temporal dependency modeling of the model, especially in summer. After ablating TCN, R 2 The value dropped from 0.87 to 0.84.

[0131] Comprehensive data analysis shows that the complete model of wind power generation performs better in different seasons than any model after the ablation of a single module. In particular, the TFAA module plays an irreplaceable role in dealing with seasonal changes; the TCN and LSTM modules play an important role in capturing time dependencies and long-term patterns. Future model optimization should focus on strengthening these key modules, especially performance tuning in different seasons, to further improve the prediction accuracy and generalization ability of the model. These results provide important data support and theoretical basis for the improvement of energy forecasting models, and the present invention can be applied to solar power generation forecasting.

Claims

1. A TCN-LSTM wind power generation prediction method combining time-frequency analysis and attention mechanism, characterized by The steps include: Step 1: Obtaining the original data of wind power generation and preprocessing the original data of wind power generation; Step 2: After data preprocessing, the frequency domain features of wind power generation data are extracted by wavelet transform, and adaptive weighted fusion is performed with the time domain features to construct a time-frequency joint analysis module TFAA, perform time-frequency joint feature analysis, extract multimodal information, and obtain a wind power generation data set; Step 3: Construct a TCN-LSTM combined network of the temporal convolutional network (TCN) and the long short-term memory network (LSTM) to improve the perception of complex time series features by processing long-term and short-term dependency features at the same time; Step 4: Introduce the multi-head self-attention mechanism into the TCN-LSTM combined network to obtain the TCN-LSTM wind power generation prediction model that combines time-frequency analysis and attention mechanism. Capture the global dependency through multiple parallel attention heads to realize the perception of the context information of wind power generation data. Step 5: Use the wind power generation data set generated in step 2 to train the model and optimize key parameters through hyperparameter optimization; Step 6: Evaluate the prediction performance of the trained TCN-LSTM wind power generation prediction model combining time-frequency analysis and attention mechanism, and obtain the final TCN-LSTM wind power generation prediction model combining time-frequency analysis and attention mechanism; Step 7: Use the final TCN-LSTM wind power generation prediction model that combines time-frequency analysis and attention mechanism to predict wind power generation.

2. The TCN-LSTM wind power generation prediction method combining time-frequency analysis and attention mechanism according to claim 1 is characterized in that: The step 1 is specifically as follows: 1.

1. Data cleaning: Eliminate unreasonable records in the original data of wind power generation. The original data of wind power generation includes air density, wind speed and temperature; 1.

2. Data interpolation: cubic spline interpolation is used to fill in missing data to ensure data continuity; 1.

3. Normalization: Use maximum and minimum normalization for all data and scale the data range to [0,1].

3. The TCN-LSTM wind power generation prediction method combining time-frequency analysis and attention mechanism according to claim 2 is characterized in that: The method for constructing the time-frequency joint analysis module in step 2 is specifically as follows: 2.

1. Wavelet transform is used to extract the frequency domain feature information of pre-processed wind power generation data; 2.

2. Construct the time domain feature F for the data after wavelet transformation time (t) and frequency domain features F freq (f); 2.

3. The time domain feature F time (t) and frequency domain features F freq (f) Feature fusion, calculation of fusion weight W time ; W time =σ(Conv1D(GAP(F time (t)+F freq (f)))) Where W time is the adaptive weight, which indicates the relative importance of time domain and frequency domain features. The weight is automatically learned through the global average pooling GAP and the one-dimensional convolution Conv1D layer. σ is the Sigmoid activation function, and the output value is between [0,1]. 2.

4. Obtain the fused feature representation F fusion :

4. The TCN-LSTM wind power generation prediction method combining time-frequency analysis and attention mechanism according to claim 3 is characterized by: The TCN-LSTM combined network model in the steps is as follows: In the formula, is the combined feature vector, indicating the final feature output after fusion; is the output feature of the LSTM model at time step t; is the output feature of the TCN model at time step t; β(t) is the time-varying adaptive adjustment function; W β is a trainable weight matrix; b β is the bias term.

Citation Information

Patent Citations

  • Photovoltaic short-term generating capacity prediction method integrated with time-frequency analysis

    CN114282711A

  • Wind power ultra-short-term prediction method based on SATCN-LSTM

    CN114676814A

  • Wind power ultra-short-term prediction method and system based on improved TCN-LSTM model

    CN117350421A

Cited By

  • Wind speed and direction prediction method based on improved TCN-LSTM

    CN120234763A

  • Calculation power resource allocation method and device based on trend prediction and storage medium

    CN120523589A

  • Method for predicting pressure characteristics of multiphase flow in pipeline based on bubble attention mechanism

    CN120611639A

  • Oil well yield prediction method and device, storage medium and electronic equipment

    CN120744874A

  • Method for predicting strong wind along high-speed rail based on multi-scale modeling and time-frequency feature fusion

    CN120995885A