Offshore wind speed prediction method based on TVFEMD-FE-TCN-Transform model
The offshore wind speed data is decomposed and reconstructed through the TVFEMD-FE-TCN-Transformer model, and combined with the improved whale optimization algorithm to optimize the model parameters, the intermittent and volatility problems of offshore wind speed prediction are solved, high-precision wind speed prediction is achieved, and the stable operation of the wind farm and grid scheduling are supported.
Patent Information
- Application Number
- CN202510661238.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-22
- Publication Date
- 2025-08-12
AI Technical Summary
The existing offshore wind speed prediction technology is difficult to adapt to the intermittent and volatility of wind speed, resulting in low prediction accuracy, and traditional methods are not effective when dealing with complex nonlinear relationships and noise interference.
Time-varying filtered empirical modal decomposition (TVFEMD) is used to decompose offshore wind speed data, combine fuzzy entropy reconstruction and time-domain convolutional network (TCN) to extract features, and use the improved whale optimization algorithm (MWOA) to optimize the Transformer model parameters, and capture global dependencies through the multi-head attention mechanism for prediction.
It improves the accuracy and stability of offshore wind speed prediction, is suitable for wind farm scenarios in different seasons and regions, supports wind farm operation and maintenance management and power grid scheduling, and has significant economic benefits and social value.
Smart Images

Figure CN120470265A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of renewable energy power generation technology, and in particular to an offshore wind speed prediction method based on a TVFEMD-FE-TCN-Transformer model. Background Art
[0002] With the widespread use of fossil fuels, the depletion of fossil energy and the environmental problems it causes are becoming increasingly prominent; clean and sustainable wind energy has gradually become a focus of attention in recent years, and offshore wind power is the focus of research on new power systems under the dual carbon background. However, the intermittent, random and uncontrollable nature of wind energy makes large-scale grid connection of offshore wind speed a major challenge; therefore, accurate and effective offshore wind speed prediction helps the power system to operate smoothly and generate reliable electricity.
[0003] Existing technologies for improving offshore wind speed prediction performance include physical models, statistical methods, and machine learning methods. Physical models are mainly based on numerical weather forecasts and use various meteorological parameters to predict wind speed. However, in the process of model construction, not only complex airflow parameters and terrain boundary conditions need to be accurately calculated, but also detailed and accurate mathematical descriptions of atmospheric physics and wind farm characteristics are required. These solution processes are often very difficult, the required conditions are complex, the amount of calculation is large, and the difficulty and cost of obtaining relevant data are also high. Statistical methods capture the linear correlation between variables in historical time series data and then construct corresponding statistical models. This model can reflect the dynamic correlation between variables and provide a scientific basis for prediction and decision-making, such as autoregressive, autoregressive sliding average model, autoregressive sliding average model, etc. Moving average models. Although statistical methods excel in analyzing linear relationships in historical event sequences, they cannot effectively handle the complex nonlinear relationships between meteorological elements. Therefore, machine learning methods such as backpropagation neural networks (BP), support vector machines (SVM), and extreme learning machines (ELM), as well as long-term and short-term memory (LSTM) and Transformer models, have emerged to extract the complex information contained in wind speed data, improving prediction accuracy to a certain extent. However, these traditional, single machine learning methods can only collect shallow features and cannot extract deep features. They also do not fully consider the dependencies in time series and are limited in parallel computing capabilities. Furthermore, they are not combined with signal preprocessing technology, resulting in severe noise interference when directly processing raw wind speed data.
[0004] In addition, traditional decomposition methods, such as empirical mode decomposition (EMD), are prone to modal confusion and poor decomposition signal stability. Although variational mode decomposition (VMD) has been improved, it still has problems such as endpoint effects, parameter sensitivity, and insufficient decomposition signals. Existing optimization algorithms, such as the whale optimization algorithm (WOA), have insufficient initial population diversity, slow convergence speed, and are prone to falling into local optimality, which affects the model parameter tuning effect, resulting in low model efficiency and unstable prediction accuracy. Summary of the Invention
[0005] In view of this, the present invention provides an offshore wind speed prediction method based on the TVFEMD-FE-TCN-Transformer model to solve the problem that the existing single prediction model is difficult to adapt to the intermittent and fluctuating offshore wind speed, resulting in low prediction accuracy.
[0006] To achieve the above object, the present invention provides a method for offshore wind speed prediction based on the TVFEMD-FE-TCN-Transformer model, which is characterized by comprising the following steps:
[0007] S1. Obtain historical offshore wind speed data and perform data preprocessing;
[0008] S2. Use time-varying filter empirical mode decomposition (TVFEMD) to decompose the pre-processed historical offshore wind speed data to generate multiple intrinsic mode function (IMF) components of different frequencies;
[0009] S3, using the exponential membership function to reconstruct the fuzzy entropy FE and divide the IMF components into four types of signals;
[0010] S4, the reconstructed four types of signals are divided into training sets and test sets, input into the time domain convolutional network TCN to extract features, and output a multi-dimensional feature matrix;
[0011] S5. Use the improved whale optimization algorithm MWOA to optimize the Transformer model parameters;
[0012] S501, fractional order chaos initialization, using the fractional order chaos equation to generate the initial population, the fractional order chaos equation expression is:
[0013]
[0014] Where a represents the parameter for controlling the nonlinear amplitude, which is used to adjust the chaos intensity; b represents the nonlinear intensity parameter of the control system response; and W represents the parameter for adjusting the frequency of the sine function. represents the Caputo fractional difference operator, X1 and X2 represent the system state variables, which serve as the positions or eigenvalues of the individuals in the generated population, and q represents the fractional order. The smaller q∈(0,1), the stronger the memory, and the larger the value, the closer the system is to the integer order.
[0015] S502, dimension-by-dimension pinhole imaging reverse learning, dynamically adjusting the decision variable boundary;
[0016] S6. Input the multidimensional feature matrix output by TCN into the Transformer model for training, obtain the optimal parameter combination of the Transformer model through iteration, input the test set data into the trained optimal parameter combination Transformer model to predict the offshore wind speed, and obtain the final offshore wind speed prediction value;
[0017] S601, capturing global dependencies through multi-head attention mechanism;
[0018] S602: embed absolute position information through position encoding PE, obtain unique representation between 0 and 1 of position information of offshore wind speed sequence data points contained in the multidimensional feature matrix, and generate code at the encoder layer;
[0019] S603, using a feedforward neural network to denormalize the encoder output to obtain prediction results of high frequency, medium frequency, low frequency and trend signals;
[0020] S604: Superimpose and reconstruct the prediction results of the high-frequency, medium-frequency, low-frequency and trend signals to obtain a final offshore wind speed prediction value.
[0021] Preferably, the historical offshore wind speed data is processed into monthly data sets in time series; the data preprocessing includes:
[0022] Deleting zero point data of the historical offshore wind speed data;
[0023] Interpolation fills missing values;
[0024] The offshore wind speed data after interpolation is normalized to obtain the offshore wind speed series.
[0025] Preferably, the time-varying filtered empirical mode decomposition (TVFEMD) process comprises the following steps:
[0026] S201, extracting the instantaneous amplitude and phase of the offshore wind speed series using Hilbert transform;
[0027] S202, obtaining extreme value points of the instantaneous amplitude of the offshore wind speed sequence, and interpolating the extreme value points to generate an envelope;
[0028] S203, calculating and dynamically adjusting the local cutoff frequency;
[0029] S204, performing time-varying filtering on the offshore wind speed sequence;
[0030] S205 , repeating steps S201 to S204 until an iteration stop condition is met, and outputting the offshore wind speed sequence data at this time as multiple IMF components.
[0031] Preferably, reconstructing the fuzzy entropy FE includes:
[0032] The fuzzy entropy FE of each IMF component is calculated using the exponential membership function i , each IMF component is reconstructed into four types of signals according to the entropy value:
[0033] High-frequency signals have the highest entropy and complexity;
[0034] Medium frequency signal, medium entropy value;
[0035] Low-frequency signals have lower entropy values;
[0036] Trend signal, the entropy value is the lowest.
[0037] Preferably, the temporal convolutional network (TCN) structure includes: extended causal convolution and residual attention mechanism;
[0038] The extended causal convolution uses a dilation coefficient to expand the receptive field, and the residual attention mechanism captures long-term dependencies through residual connections and self-attention modules.
[0039] Preferably, the Transformer model parameters include the number of multi-head attentions, batch size, and learning rate.
[0040] Compared with the prior art, the present invention has the following beneficial effects:
[0041] (1) The present invention adopts time-varying filtered empirical mode decomposition (TVFEMD) to replace the traditional EMD method. By dynamically adjusting the local cutoff frequency and time-varying filtering, the modal aliasing problem is solved, and the problem of high sub-signal complexity is reduced. The improved whale optimization algorithm (MWOA) dynamically adjusts the solution space boundary through fractional-order chaos initialization and dimension-by-dimension pinhole imaging reverse learning strategy, so that the global optimization ability of the algorithm is improved and the convergence speed is increased. In addition, the Transformer model parameters optimized by MWOA further reduce the prediction error.
[0042] (2) The present invention extracts local temporal features through the extended causal convolution of TCN and captures global dependencies through the multi-head self-attention mechanism of the Transformer model. The synergy between TCN and Transformer improves the coverage of long-term and short-term features of wind speed sequences. At the same time, the introduction of the residual attention mechanism enhances TCN's ability to screen key features and improves the prediction accuracy of offshore wind speed.
[0043] (3) In view of the intermittent, volatile and random characteristics of offshore wind speed, the present invention fully utilizes the advantages of each method through the collaborative cooperation of decomposition and reconstruction and hybrid models, overcomes the limitations of a single model and enhances the overall stability of the model. It can be applied to wind farm scenarios in different seasons and regions, helps the operation and maintenance management of wind farms and grid scheduling, provides reliable data support for the grid connection of new energy, and has significant economic benefits and social value. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 This is a flow chart of the TVFEMD-FE-TCN-Transformer model for predicting offshore wind speed;
[0045] Figure 2 MWOA algorithm flow chart of the present invention;
[0046] Figure 3 This is a schematic diagram of the process of a whale surrounding its prey, assuming it is a lens imaging process;
[0047] FIG4( a ) is a structural diagram of the TCN model of the present invention;
[0048] Figure 4(b) is a schematic diagram of extended causal convolution in the TCN model of the present invention;
[0049] Figure 5 This is the structure diagram of the Transformer model of the present invention;
[0050] Figure 6 This is the structure diagram of the TCN-Transformer model of the present invention;
[0051] Figure 7 This is a sequence diagram of original wind speed data of a certain offshore wind farm in Zhejiang Province in January, April, July and October 2022 in the embodiment;
[0052] Figure 8 This is a graph showing the decomposition results of the wind speed data for January in the embodiment;
[0053] Figure 9 This is a graph showing the decomposition results of the wind speed data for April in the embodiment;
[0054] Figure 10 This is a graph showing the decomposition results of the wind speed data for July in the embodiment;
[0055] Figure 11 This is a graph showing the decomposition results of wind speed data for October in the embodiment;
[0056] Figure 12 This is the FE analysis chart of wind speed data in Example 1, April, July and October;
[0057] Figure 13This is the FE reconstruction result diagram of the wind speed data for January in the embodiment;
[0058] Figure 14 This is the FE reconstruction result diagram of the wind speed data in April of the embodiment;
[0059] Figure 15 This is the FE reconstruction result diagram of the wind speed data in July of the embodiment;
[0060] Figure 16 This is the FE reconstruction result diagram of the wind speed data in October of the embodiment;
[0061] Figure 17 This is a comparison chart of the prediction results of the data model for January of Example;
[0062] Figure 18 This is a comparison chart of the prediction results of the data model for April in Example;
[0063] Figure 19 This is a comparison chart of the prediction results of the data model in July of the embodiment;
[0064] Figure 20 This is a comparison chart of the prediction results of the data model in October of the embodiment;
[0065] Figure 21 This is the fitting diagram of the prediction results of six models in Example 1;
[0066] Figure 22 This is the fitting diagram of the prediction results of six models in Example 4;
[0067] Figure 23 The fitting diagram of the prediction results of six models in Example 7 is shown;
[0068] Figure 24 This is a fitting diagram of the prediction results of six models in October of Example. DETAILED DESCRIPTION
[0069] In order to further illustrate the technical means and effects adopted by the present invention to achieve the predetermined purpose of the invention, the specific implementation methods, structures, features and effects of the present invention are described in detail below in conjunction with the accompanying drawings and preferred embodiments.
[0070] In order to cope with the intermittent and fluctuating offshore wind speed in a complex offshore environment and improve the accuracy of offshore wind speed prediction, this embodiment provides an offshore wind speed prediction method based on the TVFEMD-FE-TCN-Transformer model, including the following steps:
[0071] S1. Obtain historical offshore wind speed data, process the historical offshore wind speed data into monthly data sets according to time series, and perform data preprocessing on the historical offshore wind speed data:
[0072] Delete zero-point data in historical offshore wind speed data;
[0073] Interpolation fills missing values;
[0074] The offshore wind speed data after interpolation is normalized to obtain the offshore wind speed series.
[0075] S2. Use time-varying filter empirical mode decomposition (TVFEMD) to decompose the pre-processed historical offshore wind speed data to generate multiple intrinsic mode function (IMF) components of different frequencies;
[0076] Traditional empirical mode decomposition (EMD) can decompose the original data according to its own time scale to obtain several intrinsic mode functions (IMFs) and residuals. However, this method may suffer from modal aliasing. Therefore, this embodiment improves EMD and proposes time-varying filtered empirical mode decomposition (TVFEMD). TVFEMD uses a time-varying filter to solve the modal aliasing problem and ensure that the time-varying nature of the sequence is maintained. It uses information about instantaneous frequency and instantaneous amplitude to flexibly and adaptively design the local cutoff frequency and perform time-varying filtering on a given sequence. Specifically, the following steps are included:
[0077] S201. Use Hilbert transform to extract the instantaneous amplitude and phase of the offshore wind speed series. The expression is:
[0078]
[0079] Among them, Amp(t) and λ(t) represent the instantaneous amplitude and phase of the offshore wind speed series, respectively; S(t) and R(t) represent the offshore wind speed series data at time t, respectively;
[0080] S202, obtaining the extreme point of the instantaneous amplitude Amp(t) of the offshore wind speed sequence, i.e., the local maximum value Amp(t max ) and the local minimum Amp(t min ), interpolation Amp 2 (t max )λ 2 (t max ), Amp 2 (t min )λ 2 (t min ) generates envelopes cur1(t) and cur2(t), and the expressions are:
[0081]
[0082] Calculate the instantaneous frequency components λ′1(t) and λ′2(t) through the envelope curves cur1(t) and cur2(t);
[0083] S203, calculate and dynamically adjust the local cutoff frequency, local cutoff frequency λ′ bis (t) is expressed as:
[0084]
[0085] In order to solve the problem of intermittent offshore wind speed, the local cutoff frequency λ′ is readjusted. bis (t);
[0086] S204, constructing a time-varying filter to perform time-varying filtering on the offshore wind speed sequence;
[0087] Calculate the phase function at time t The expression is:
[0088]
[0089] Phase function Usually represents the instantaneous phase of the signal, A time-varying filter is constructed for the node, and the offshore wind speed series data S(t) is further filtered using the B-spline interpolation method, and the approximation result is m(t);
[0090] S205. When the stopping condition σ(t)≤r is not satisfied, then:
[0091] S(t)=S(t)-m(t)
[0092] Repeat steps S201 to S204 until the iteration stop condition is met;
[0093] When the stopping condition σ(t)≤r is met, the offshore wind speed series data S(t) is output as the IMF component;
[0094] Where σ(t) represents the time-varying standard deviation function, which measures the frequency spread of the signal at time t and is often used to control the filter bandwidth. The expression is:
[0095]
[0096] Among them, B Loughlin (t) represents the Loughlin instantaneous bandwidth of the two-component signal, λ avg(t) It represents the weighted average of the instantaneous frequency of a single component, and the threshold r is 0.1.
[0097] S3, using the exponential membership function to reconstruct the fuzzy entropy FE and divide the IMF components into four types of signals;
[0098] Fuzzy entropy FE uses an exponential membership function instead of the Heaviside function in approximate entropy and sample entropy to compare the similarity between two point vectors. It is used to quantify the fuzziness of the system when the system state changes. It can measure the complexity of the sequence. The larger the fuzzy entropy value, the more complex the time series. The steps for calculating fuzzy entropy FE are as follows:
[0099] S301. Assuming that the length of the historical offshore wind speed time series [V(j):1≤j≤J] is H and the embedding dimension is t, the phase space reconstruction is performed in the following order:
[0100] Y=[Y(1),Y(2),…,Y(H-t+1)]
[0101] t consecutive original sequences V(j) minus the mean V0(j) are obtained:
[0102]
[0103] in, represents the new time series t-dimensional vector, V0(j) represents The average value of
[0104] S302. For a specific vector Any and The gap between represents the total difference of the related scalar components;
[0105] S303, using fuzzy membership function calculate and Similarity The expression is:
[0106]
[0107] Among them, r represents the similarity tolerance, p represents the shape parameter of the fuzzy function, which controls the decay speed. It is usually set to p = 2, indicating a Gaussian fuzzy function. The larger p is, the faster the function decays.
[0108] S304, calculate the average value for each i and define a function, the expression is:
[0109]
[0110] in, It represents the average similarity between the i-th sequence of length t and all other sequences, represents the total length of the original time series, and t represents the current time scale, which is usually the embedding dimension, that is, the subsequence length. represents the fuzzy similarity between the j-th and i-th subsequences of length t, Q t(r) represents the global similarity measure at time scale t, i.e., the average similarity of all subsequences, and (H-t+1) represents the total number of subsequences of length t, i.e., the sliding window generation;
[0111] The fuzzy entropy FE(H,t,r) of the historical offshore wind speed time series V(j) is obtained, and the expression is:
[0112]
[0113] If the length H is finite, the fuzzy entropy FE(H, t, r) of the historical offshore wind speed time series V(j) can be expressed as:
[0114] FE(H,t,r)=lnQ t (r)-lnQ t+1 (r)
[0115] The fuzzy entropy FE of each IMF component is calculated using the exponential membership function i The decomposed data has high-dimensional and complex characteristics. Based on the fuzzy entropy FE, these IMF classifications are complexly calculated and the components are reconstructed into four types of signals according to the size of the entropy value:
[0116] High-frequency signals have the highest entropy and complexity;
[0117] Medium frequency signal, medium entropy value;
[0118] Low-frequency signals have lower entropy values;
[0119] Trend signal, the entropy value is the lowest.
[0120] S4, the reconstructed four types of signals are divided into training sets and test sets, input into the time domain convolutional network TCN to extract features, and output a multi-dimensional feature matrix;
[0121] The TCN model is a simple and general CNN architecture for solving time series problems. It is mainly composed of a stack of multiple residual units and uses a one-dimensional convolutional network instead of RNN to avoid the problem of gradient disappearance. As shown in Figure 4(a), the residual module consists of two convolution units and a nonlinear mapping unit. Each convolution unit includes a one-dimensional extended causal convolution, Weight Norm weight normalization, ReLu activation function and Dropout operation. As shown in Figure 4(b), the extended causal convolution obtains the network output by convolving the input with the causal relationship. In sequence modeling, causal convolution is expressed as the current time t is only related to the input before time t and t. For a one-dimensional sequence input x, the expanded convolution operation F of the elements in x and the filter f: {0, 1, ..., k-1} is performed. (s) The expression is:
[0122]
[0123] d=(1,2,4)
[0124] Where d represents the expansion coefficient, k represents the filter size, and (sd·i) represents the past direction. As shown in Figure 4(b), as the expansion coefficient d increases, the perception field of TCN increases and the amount of information received increases.
[0125] The extended causal convolution uses a dilation coefficient to expand the receptive field, and the residual attention mechanism captures long-term dependencies through residual connections and self-attention modules.
[0126] S5. Use the improved whale optimization algorithm MWOA to optimize the Transformer model parameters;
[0127] The Whale Optimization Algorithm (WOA) is an intelligent algorithm based on the hunting behavior of humpback whales. It mainly includes concentrated foraging behaviors such as surrounding prey, random search, and spiral attack. WOA has three methods for updating position. Different position update methods are selected by changing the A and P values. The calculation formula is:
[0128]
[0129] Where t represents the current iteration number, represents the position of the best whale, l represents a random value in [-1,1], represents the position of a random whale in the current population, b represents the parameter of the logarithmic spiral shape, and p represents a random value in [0,1];
[0130] Compared with other algorithms, the whale optimization algorithm WOA has the advantages of fewer parameters, simple principles, and strong optimization ability. However, WOA is prone to falling into local optimal solutions and slow convergence. This embodiment proposes an improved whale optimization algorithm MWOA, the flow chart of which is as follows: Figure 2 As shown;
[0131] S501, fractional order chaos initialization, using the fractional order chaos equation to generate the initial population, the fractional order chaos equation expression is:
[0132]
[0133] Where a represents the parameter for controlling the nonlinear amplitude, which is used to adjust the chaos intensity; b represents the nonlinear intensity parameter of the control system response; and W represents the parameter for adjusting the frequency of the sine function. represents the Caputo fractional difference operator, X1 and X2 represent the system state variables, which serve as the positions or eigenvalues of the individuals in the generated population, and q represents the fractional order. The smaller q∈(0,1), the stronger the memory, and the larger the value, the closer the system is to the integer order.
[0134] The fractional-order chaos proposed in this embodiment replaces the randomly generated initial population in the original algorithm to initialize the whale population, thereby improving the diversity of the initial individuals. Chaos is a common nonlinear phenomenon with inherent randomness and uniform ergodicity, which are very effective in improving the global search capability of the algorithm. Fractional-order chaos can produce chaotic sequences with more uniform ergodicity and faster convergence speed.
[0135] S502, dimension-by-dimension pinhole imaging reverse learning, dynamically adjusting the decision variable boundary;
[0136] like Figure 3 As shown in the figure, the process of whales surrounding their prey can be assumed to be a lens imaging process, the range of the solution interval is [a, b], and the global optimal individual X best is the projection of p on the X axis, with a height of h. At this time, the reverse point It can be obtained by lens imaging, and according to the imaging principle:
[0137]
[0138] Where k represents the scaling factor, and the reverse point The expression is:
[0139]
[0140] The difference between the general reverse learning strategy and the pinhole imaging reverse learning strategy lies in the different k values. When k = 1, there is no difference between the two reverse learning strategies. However, the new individuals obtained through iteration in general reverse learning are fixed. When solving more complex high-dimensional functions, these new individuals may fall into a monotonous local optimum due to their fixed range. By adjusting the parameter k, the new individuals can be made to have the ability to change dynamically, while expanding the search range of the population.
[0141] The dimension-by-dimension pinhole imaging reverse learning strategy provided in this embodiment can obtain the ability to escape from being trapped in local extreme values by eliminating the interference between various dimensions. The dimension-by-dimension pinhole imaging reverse learning strategy expression is:
[0142]
[0143] in, Represents X best 、 The j-th dimension component, a j 、b j They represent the upper and lower bounds of the decision variables respectively. Generally, the reverse learning strategy has a fixed boundary, while the boundary a in the dimension-by-dimension pinhole imaging reverse learning strategy provided in this embodiment is j and b j It changes dynamically, so the search range of the method provided in this embodiment is more accurate and the optimization efficiency is greatly improved.
[0144] S6. Input the multidimensional feature matrix output by TCN into the Transformer model for training, obtain the optimal parameter combination of the Transformer model through iteration, the Transformer model parameters include the number of multi-head attention, batch size and learning rate, input the test set data into the trained optimal parameter combination Transformer model to predict the offshore wind speed, and obtain the final offshore wind speed prediction value;
[0145] like Figure 5 As shown in Figure 1, the Transformer model follows an overall architecture consisting of Pointwise, stacked self-attention, encoder, and decoder fully connected layers. By abandoning recurrence and convolution, the implementation of the attention mechanism has been completely changed, relying only on the self-attention mechanism consisting of scaled dot product attention and multi-head attention.
[0146] Scaled dot product attention first calculates the dot product of each query vector q with all key vectors k, and then divides each result by Apply a Softmax function again, the expression is:
[0147]
[0148] The equation of the multi-head attention mechanism is based on the scaled dot product attention mechanism and is expressed as:
[0149] Multihead(Q,K,V)=Contact(head1,…,head h )W O
[0150] Among them, W O The projection matrix representing the multi-head output;
[0151] In the multi-head attention mechanism, head i A single attention function is implemented, and the learned projection matrix is:
[0152]
[0153] in, denote the projection matrices, which are used to generate different subspace representations of query, key and value matrices respectively;
[0154] Each layer of the Transformer encoder and decoder consists of a fully connected feed-forward network. Since the Transformer model has no recurrence and convolution, "positional encoding (PE)" is applied to the input embedding containing the relative or absolute position information of the tokens in the sequence;
[0155] In order to maximize the use of local and global characteristics of the wind speed time series sample model, e.g. Figure 6 This embodiment shows a TCN-Transformer model; Figure 6 In the process, detailed local features are first gradually extracted from the TCN to further enrich the description of local details. Then, with the help of the Transformer's multi-head attention mechanism, a global dependency relationship between input and output is established, improving the model's global perception ability. Positional encoding (PE) plays a key role. It is used to accurately describe the position information of data points in the sequence, ensuring that each position has a unique representation between 0 and 1. Subsequently, the encoder layer is responsible for generating encodings. These encodings contain important information about which parts of the input are related to each other. The output of the last encoder layer will serve as the input of the Transformer decoder for further processing and generating the final output.
[0156] The decoder receives the output of the encoder together with the output of the decoder at the previous time step to generate an output sequence. The Flatten layer merges all multi-dimensional inputs into one dimension so that all data can be effectively passed to each neuron of the model. The Dropout layer randomly ignores a group of neurons to prevent the model from overfitting. The neurons in the Dense layer receive the output of each neuron in the previous layer and realize the final prediction.
[0157] S601, capturing global dependencies through multi-head attention mechanism;
[0158] S602: embed absolute position information through position encoding PE, obtain unique representation between 0 and 1 of position information of offshore wind speed sequence data points contained in the multidimensional feature matrix, and generate code at the encoder layer;
[0159] S603, using a feedforward neural network to denormalize the encoder and obtain prediction results of output high frequency, medium frequency, low frequency and trend signals;
[0160] S604: Superimpose and reconstruct the prediction results of high frequency, medium frequency, low frequency and trend signals to obtain the final offshore wind speed prediction value.
[0161] Example 2
[0162] In this embodiment, the wind speed data of a certain offshore wind farm in Zhejiang Province in 2022 is analyzed. The wind speed data of January, April, July and October representing the four seasons of winter, spring, summer and autumn are selected for experiments. The original wind speed data sequence is as follows: Figure 7As shown in the figure, wind speed data is collected 24 hours a day and recorded every 30 minutes. There are 1488 data values in January, 1436 data values in April, 1474 data values in July, and 1484 data values in October. Each dataset is divided into two parts: a training set and a test set, which account for 70% and 30% of the total dataset respectively.
[0163] Considering the decomposition efficiency of TVFEMD, the spline order and bandwidth threshold R are set to 20 and 0.1 respectively. The submodes of the four-month wind speed data are decomposed as follows: Figure 8-11 As shown; Calculate the fuzzy entropy to analyze the complexity of each component, the entropy calculation results are shown in Table 1 and Figure 12 As shown;
[0164] Table 1 Fuzzy entropy values of IMFs decomposed from wind speed data
[0165]
[0166] If all decomposed IMFs are predicted directly, the prediction complexity will increase. However, reconstructing IMFs with similar entropy values can improve the modeling speed, reduce errors, and avoid overfitting. Taking the January data as an example, from Table 1 and Figure 12 It can be seen that the entropy values of IMF1, IMF2 and IMF4 are large, indicating that the data complexity is high. The difference is not obvious, so they are grouped together and reconstructed as high-frequency components; the entropy values of IMF3 and IMF5 are close and reconstructed as medium-frequency components; IMF6-IMF8 are reconstructed as low-frequency components; IMF9 has the lowest entropy value and is used as the trend component; the FE reconstruction method of the IMFs of the wind speed data in January, April, July and October is shown in Table 2, and the reconstruction results are as follows: Figure 13-16 As shown;
[0167] Table 2 FE reconstruction methods of IMFs in January, April, July and October
[0168]
[0169] In order to qualitatively measure the performance of the prediction model, this embodiment uses the mean absolute error MAE, root mean square error RMSE, mean relative error MAPE and determination coefficient R 2 These four evaluation indicators perform error analysis on the prediction results, and the expression is:
[0170]
[0171] Among them, p i Represents the actual data of wind speed, p′ i represents the wind speed forecast value, represents the average value of wind speed, and n represents the amount of data;
[0172] In this example, five comparative models (including two single models and three hybrid models) were constructed and compared with the proposed model, including LSTM, Transformer (TF), TCN-TF, EMD-TCN-TF, TVFEMD-TCN-TF, and TVFEMD-FE-TCN-TF;
[0173] The model parameters are set as follows: LSTM epoch is 100, the number of hidden layer neurons is 64, the initial learning rate is 0.002, and the optimizer is Adam; the number of TCN channels is 64, the convolution kernel size is 3; the number of Transformer multi-head attention is 6, the batch size is 32, the embedding dimension is 32, and the dropout rate is 0.001;
[0174] The computer platform is mainly configured as Win11 system, 12th Gen Intel(R) Core(TM) i9-12900H, RAM 16GB, and the models involved in the embodiment are mainly implemented using Python 3.10 and TensorFlow 2.13 deep learning framework;
[0175] The comparison of wind speed forecast results for January is shown in Table 3:
[0176] Table 3 Comparison of wind speed data forecast results in January
[0177]
[0178] Figure 17 This is a comparison chart of the prediction results of six models in January. The fitting chart of the prediction results in January is as follows: Figure 21 As shown; through analysis we can conclude that:
[0179] (1) TVFEMD-FE-TCN-TF model R 2 (0.980 5) maximum, RMSE (0.3485m / s)
[0180] The smallest, MAE (0.276 2m / s) is the smallest, and MAPE (0.044 1) is the smallest; the single LSTM model indicator result is the worst;
[0181] (2) Comparing the single LSTM and TF models, it can be found that the TF model has better wind speed prediction performance;
[0182] (3) By comparing the TCN-TF and TF models, it was found that the performance of TCN-TF was 5.14% higher than that of TF in terms of the error index RMSE, which proved the effectiveness of TCN feature extraction in improving prediction accuracy;
[0183] (4) The model errors based on EMD and TVFEMD are much smaller than those of other models, indicating that signal decomposition technology can better process the noise contained in the original wind speed data and improve the prediction accuracy. In addition, the wind speed data decomposition effect of TVFEMD is better than that of EMD.
[0184] (5) The RMSE error index value obtained by the TVFEMD-FE-TCN-TF model is 11.61% lower than that of the TVFEMD-TCN-TF model, indicating that FE signal reconstruction can effectively reduce signal noise;
[0185] (6) All error indicators of the TVFEMD-FE-TCN-TF model proposed in this example are optimal, and the degree of fit is also the best;
[0186] The ranking of wind speed data for each model in April, July and October is similar to that in January. The comparison values of the prediction results are shown in Table 4-6. The comparison of the prediction results is shown in the figure below. Figure 18-20 As shown, the fitting diagram is Figure 22-24 As shown;
[0187] Table 4 Comparison of wind speed data forecast results in April
[0188]
[0189] Table 5 Comparison of wind speed data forecast results in July
[0190]
[0191]
[0192] Table 6 Comparison of wind speed data forecast results in October
[0193]
[0194] Using improved MAPE, MAE, R 2 The performance of the model is analyzed by using the RMSE percentage formula. By comparing data preprocessing and signal decomposition, the superiority of the TVFEMD-FE-TCN-TF model proposed in this embodiment is highlighted. The subscripts m and n represent the comparison model and the TVFEMD-FE-TCN-TF model, respectively. The expression is:
[0195]
[0196] Compared with the other five comparison models, the improvement percentages of TVFEMD-FE-TCN-TF in the four-month wind speed dataset are shown in Tables 7-10. It can be concluded that:
[0197] (1) Compared with the model without signal decomposition, the RMSE, MAE, and R 2 and MAPE decreased by 51.63%, 52.39%, 6.94% and 49.88% in the first half of the year, and RMSE, MAE and MAPE also decreased significantly in other months, indicating that decomposing wind speed data can make the signal more stable and improve the prediction accuracy;
[0198] (2) Compared with the EMD model, the RMSE, MAE, and MAPE of the four months decreased by an average of 45.75%, 45.07%, and 46.62%, respectively, indicating that the TVFEMD used in this paper is more effective than the EMD and can process wind speed data more effectively;
[0199] (3) Compared with the model without FE reconstruction, the RMSE, MAE, and MAPE of the four months decreased by 20.27%, 19.16%, and 20.53% on average, and R 2 The average increase is 3.00%, which shows that the reconstruction of IMF components using FE can improve the prediction accuracy;
[0200] Table 7 Model improvement percentage - January
[0201]
[0202] Table 8 Model improvement percentage - April
[0203]
[0204] Table 9 Model improvement percentage - July
[0205]
[0206] Table 10 Model improvement percentage - October
[0207]
[0208] The results show that the average MAE, RMSE, MAPE, and R 2 Reaching 0.1980m / s, 0.2688m / s, 3.842%, and 0.9806, it can obtain better prediction results compared with the comparative model, providing strong support for the operation and maintenance management of offshore wind farms.
[0209] The above description is merely a preferred embodiment of the present invention and does not constitute any form of limitation to the present invention. Although the present invention has been disclosed as above in terms of a preferred embodiment, it is not intended to limit the present invention. Any person skilled in the art can, without departing from the scope of the technical solution of the present invention, make some changes or modifications to equivalent embodiments using the technical contents disclosed above. However, any brief modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention are still within the scope of the technical solution of the present invention.
Claims
1. A method for offshore wind speed prediction based on the TVFEMD-FE-TCN-Transformer model, characterized in that: The following steps are involved: S1. Obtain historical offshore wind speed data and perform data preprocessing; S2. Use time-varying filter empirical mode decomposition (TVFEMD) to decompose the pre-processed historical offshore wind speed data to generate multiple intrinsic mode function (IMF) components of different frequencies; S3, using the exponential membership function to reconstruct the fuzzy entropy FE and divide the IMF components into four types of signals; S4, the reconstructed four types of signals are divided into training sets and test sets, input into the time domain convolutional network TCN to extract features, and output a multi-dimensional feature matrix; S5. Use the improved whale optimization algorithm MWOA to optimize the Transformer model parameters; S501, fractional order chaos initialization, using the fractional order chaos equation to generate the initial population, the fractional order chaos equation expression is: Where a represents the parameter for controlling the nonlinear amplitude, which is used to adjust the chaos intensity; b represents the nonlinear intensity parameter of the control system response; and W represents the parameter for adjusting the frequency of the sine function. represents the Caputo fractional difference operator, X1 and X2 represent the system state variables, which serve as the positions or eigenvalues of the individuals in the generated population, and q represents the fractional order. The smaller q∈(0,1), the stronger the memory, and the larger the value, the closer the system is to the integer order. S502, dimension-by-dimension pinhole imaging reverse learning, dynamically adjusting the decision variable boundary; S6. Input the multidimensional feature matrix output by TCN into the Transformer model for training, obtain the optimal parameter combination of the Transformer model through iteration, input the test set data into the trained optimal parameter combination Transformer model to predict the offshore wind speed, and obtain the final offshore wind speed prediction value; S601, capturing global dependencies through multi-head attention mechanism; S602: embed absolute position information through position encoding PE, obtain unique representation between 0 and 1 of position information of offshore wind speed sequence data points contained in the multidimensional feature matrix, and generate code at the encoder layer; S603, using a feedforward neural network to denormalize the encoder output to obtain prediction results of high frequency, medium frequency, low frequency and trend signals; S604: Superimpose and reconstruct the prediction results of the high-frequency, medium-frequency, low-frequency and trend signals to obtain a final offshore wind speed prediction value.
2. The offshore wind speed prediction method based on the TVFEMD-FE-TCN-Transformer model according to claim 1, characterized in that: The historical offshore wind speed data are processed into monthly data sets in time series; the data preprocessing includes: Deleting zero point data of the historical offshore wind speed data; Interpolation fills missing values; The offshore wind speed data after interpolation is normalized to obtain the offshore wind speed series.
3. The offshore wind speed prediction method based on the TVFEMD-FE-TCN-Transformer model according to claim 1, characterized in that: The time-varying filter empirical mode decomposition (TVFEMD) process includes the following steps: S201, extracting the instantaneous amplitude and phase of the offshore wind speed series using Hilbert transform; S202, obtaining extreme value points of the instantaneous amplitude of the offshore wind speed sequence, and interpolating the extreme value points to generate an envelope; S203, calculating and dynamically adjusting the local cutoff frequency; S204, performing time-varying filtering on the offshore wind speed sequence; S205 , repeating steps S201 to S204 until an iteration stop condition is met, and outputting the offshore wind speed sequence data at this time as multiple IMF components.
4. The offshore wind speed prediction method based on the TVFEMD-FE-TCN-Transformer model according to claim 1, characterized in that: The reconstructed fuzzy entropy FE includes: The fuzzy entropy FE of each IMF component is calculated using the exponential membership function i , each IMF component is reconstructed into four types of signals according to the entropy value: High-frequency signals have the highest entropy and complexity; Medium frequency signal, medium entropy value; Low-frequency signals have lower entropy values; Trend signal, the entropy value is the lowest.
5. The offshore wind speed prediction method based on the TVFEMD-FE-TCN-Transformer model according to claim 1, characterized in that: The temporal convolutional network (TCN) structure includes: extended causal convolution and a residual attention mechanism; the extended causal convolution uses an expansion coefficient to expand the receptive field, and the residual attention mechanism captures long-term dependencies through residual connections and self-attention modules.
6. The offshore wind speed prediction method based on the TVFEMD-FE-TCN-Transformer model according to claim 1, characterized in that: Transformer model parameters include the number of multi-head attention, batch size, and learning rate.
Citation Information
Cited By
Photovoltaic power short-term multi-step prediction method for enhancing feature extraction through FECAM-SERTCN
CN120855335A
Method for predicting wind speed along high-speed rail based on intermittent prior and cross-scale adaptive fusion
CN120950893A
A high-speed rail line wind speed prediction method based on intermittent prior and cross-scale adaptive fusion
CN120950893B
Method for predicting strong wind along high-speed rail based on multi-scale modeling and time-frequency feature fusion
CN120995885A
Offshore wind power typical scene generation method based on depth feature extraction and clustering fusion
CN121743846A
