A wind turbine main shaft end cover displacement prediction method based on a Transformer-GRU fusion model
Patent Information
- Application Number
- CN202611073913.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-20
- Publication Date
- 2026-10-09
AI Technical Summary
[0009]针对现有通用时序预测模型应用于风力发电机组主轴端盖位移预测时存在的技术缺陷,本发明的目的是为了一种基于Transformer-GRU融合模型的风力发电机组主轴端盖位移预测方法,能够有效解决通用时序模型在主轴端盖位移预测中物理不一致、极端工况预测不可靠的问题,模型适配不同机组特性且可动态迭代,预测精度满足R²≥0.80、MAE≤0.1mm的工程要求,为风电机组安全运维与技改效果评估提供可靠数据支撑,具备强工程实用性与规模化推广价值
[0056]第一,本发明的基于Transformer-GRU融合模型的风力发电机组主轴端盖位移预测方法,通过融合提取对角位移和差值、角点相邻位移梯度交叉相关系数两类原生空间耦合特征,构造带几何力学约束的增强时序特征,同时增设四向交叉注意力分支实现四路位移特征交互学习,贴合主轴端盖固有的结构刚性、力学联动规律,摒弃各方向位移独立预测模式,有效约束预测结果满足物理耦合关系,杜绝出现违背端盖形变机理的不合理位移预测值。
Smart Images

Figure CN122880683A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of wind turbine generator monitoring technology, specifically to a method for predicting the displacement of the main shaft end cover of a wind turbine generator based on the Transformer-GRU fusion model. Background Technology
[0002] As the wind power industry rapidly develops towards larger capacity, higher parameters, and longer lifespan, the single-unit capacity of wind turbine generators continues to increase. The main shaft, as the core load-bearing component of the unit's transmission system, has its end cap displacement as a key physical quantity directly reflecting the main shaft's operational stability and structural health. The main shaft end cap endures the combined effects of alternating aerodynamic loads, rotor centrifugal loads, and turbulent impact loads over long periods, while also facing extreme environmental corrosion from low temperatures, high humidity, and sandstorms. During long-term cyclic service, it is highly susceptible to abnormal displacement and excessive deformation. This can lead to issues ranging from excessive unit vibration, decreased transmission efficiency, and soaring maintenance costs, to serious accidents such as main shaft breakage and nacelle overturning, causing huge economic losses and severe social impact. Therefore, accurate prediction and early warning of main shaft end cap displacement have become a core technical requirement in the field of wind power safety operation and maintenance.
[0003] Currently, some research in the industry has attempted to use time-series prediction models (such as GRU, LSTM, and Transformer) to predict the state of key components of wind turbines. However, directly applying general time-series prediction models to predict the displacement of the main shaft end cap presents the following fundamental compatibility problems:
[0004] 1. Loss of spatial coupling relationship in four-way displacement. The displacements of the spindle end cap in the upper left, lower left, upper right, and lower right directions are not independent changes, but are affected by the structural rigidity of the end cap, the installation preload, and non-uniform loads, resulting in geometric constraints and mechanical equilibrium relationships. However, existing general models usually predict each direction independently, which cannot guarantee that the prediction results meet this coupling constraint, and may output physically impossible displacement combinations.
[0005] 2. Extreme operating conditions are characterized by scarcity and poor prediction accuracy. Under extreme operating conditions such as typhoons, strong turbulence, emergency shutdowns, and pitch disturbances, the end cap displacement response exhibits nonlinear abrupt changes. Furthermore, the number of samples for extreme operating conditions is small and their distribution is uneven. General time series models are trained based on normal stable operating data, resulting in weak fitting ability for abrupt displacements and extremely large prediction biases for extreme operating conditions.
[0006] 3. Poor adaptability of time-series feature mining, unable to adapt to the time-varying characteristics of wind power loads. Wind power loads have dual characteristics of short-term high-frequency fluctuations and long-term slow drifts. A single GRU can only capture short-term time-series fluctuations, and a single Transformer is only good at mining long-term time-series correlations. Existing combined models only perform hierarchical stacking processing, which cannot adapt to the time-varying load characteristics of wind turbine units. The data mining of displacement data of different fluctuation types is one-sided, and the global prediction stability is insufficient.
[0007] 4. The lack of a closed-loop operation and maintenance system for the model makes it unsuitable for the full life cycle service characteristics of the wind turbine. The service life of wind turbines is more than 20 years. The aging of turbine components, foundation settlement, and seasonal wind changes will all change the evolution of end cap displacement. The parameters of the existing static prediction model are fixed after training, and there is a lack of a normalized accuracy verification and iterative update mechanism. As the service time of the random group of the model increases, the prediction performance continues to decline, and the long-term prediction reliability cannot be guaranteed.
[0008] In view of the many shortcomings of the existing technologies, there is an urgent need for a displacement prediction method that deeply integrates the spatial coupling characteristics of the main shaft end cover with the physical laws of the working conditions, so as to comprehensively improve the prediction accuracy and engineering practicality and provide solid technical support for the safe operation of the wind turbine main shaft. Summary of the Invention
[0009] To address the technical shortcomings of existing general-purpose time-series prediction models when applied to predict the displacement of the main shaft end cap of wind turbine generators, this invention aims to provide a method for predicting the displacement of the main shaft end cap of wind turbine generators based on a Transformer-GRU fusion model. This method effectively solves the problems of physical inconsistency and unreliable prediction under extreme conditions in the main shaft end cap displacement prediction of general-purpose time-series models. The model is adaptable to different generator characteristics and can be dynamically iterated. The prediction accuracy meets the engineering requirements of R²≥0.80 and MAE≤0.1mm, providing reliable data support for the safe operation and maintenance and technical upgrade effect evaluation of wind turbine generators. It has strong engineering practicality and large-scale promotion value.
[0010] To achieve the above-mentioned technical objectives, the technical solution adopted by the present invention is as follows:
[0011] A method for predicting the displacement of the main shaft end cover of a wind turbine generator based on a Transformer-GRU fusion model, the method comprising the following steps:
[0012] S1, collect monitoring data from multiple wind turbine generator sets. The monitoring data includes historical monitoring data of displacement in four directions (upper left, lower left, upper right, and lower right) of the main shaft end cover, as well as corresponding time period unit operation data used to characterize the unit load and real-time operating status.
[0013] S2. The collected monitoring data is preprocessed. Based on the displacement data of the main shaft end cap in four directions, two types of four-way displacement coupling features are calculated: diagonal displacement and difference, and cross-correlation coefficient of displacement gradient in adjacent directions. The four-way displacement coupling features are then concatenated with the original monitoring data in the four directions to construct enhanced time-series samples with spatial geometric constraints in each direction. All enhanced time-series samples are uniformly divided into training set, validation set and test set.
[0014] S3. Construct a Transformer-GRU fusion prediction model. The model, in order of data flow, includes an input layer, a GRU short-term feature extraction layer, a Transformer long-range feature extraction layer, a condition-aware encoder, a four-way cross-attention branch, a feature fusion layer, a fully connected layer, and an output layer. The input layer has four independent input branches, receiving enhanced temporal samples from four directions and outputting standardized temporal features. The GRU short-term feature extraction layer and the Transformer long-range feature extraction layer each have four independent branches, processing temporal features in each direction and outputting corresponding short-term high-dimensional features and long-range correlation features. The condition-aware encoder parses the operating conditions and generates condition embedding vectors. The feature fusion layer generates dynamic fusion weights based on the condition embedding vectors, fusing short-term high-dimensional features and long-range correlation features in each direction to obtain four independent fused features. The four-way cross-attention branch performs cross-directional attention operations on the four fused features, mining the spatial coupling relationship of the four-way displacement and outputting coupled enhanced features. The fully connected layer performs nonlinear mapping dimensionality reduction on the coupled enhanced features, and the output layer synchronously outputs the displacement prediction results in the four directions.
[0015] S4. With the optimization objective of simultaneously minimizing the single-direction displacement prediction error and the four-direction displacement coupling deviation, a composite loss function containing the displacement prediction error term and the four-direction displacement coupling deviation penalty term is used to train the model, complete the model training and parameter optimization, and obtain the optimal fusion prediction model.
[0016] S5. Input the latest time series data into the optimal fusion prediction model to obtain the displacement prediction values in four directions of the main shaft end cover, and complete the displacement prediction.
[0017] Step S1 further includes:
[0018] One surface strain gauge is arranged in each of the four directions of the main shaft end cover of each wind turbine generator set, namely the upper left, lower left, upper right, and lower right, to collect displacement data of the main shaft end cover in the four directions; at the same time, the unit operating parameters for the corresponding time period are collected, including wind speed, rotor speed, generator speed, and grid active power.
[0019] Furthermore, in step S2, the preprocessing of the collected monitoring data includes the following steps:
[0020] The 3σ criterion is used to identify outliers in displacement and operational data. For outlier points in displacement values that are determined to be abnormal, linear interpolation is performed using the two adjacent normal data points before and after them. The maximum-minimum normalization method is used to normalize the displacement and operational data to the [0,1] interval.
[0021] Let the displacement time sequences of the spindle end cover in the four directions of upper left, lower left, upper right, and lower right be respectively... The diagonal displacement and difference were calculated. for:
[0022]
[0023] For each pair of adjacent directions First calculate the displacement difference in adjacent directions. Then, taking the derivative with respect to time yields the displacement gradient in adjacent directions. for:
[0024]
[0025] in Indicates a pair of adjacent directions. ;
[0026] At each time step t, a local time window of length W is extracted, ending at t. The time step index within the window is... ; within the time window Within, two pairs of adjacent directions are selected centered on a single displacement acquisition corner point. The cross-correlation coefficient is calculated as the synchronization coefficient of the changes in the directions of two adjacent displacements at the corresponding corner points. :
[0027]
[0028] in Indicates adjacent direction pairs; This is used to quantify the linkage characteristics of changes in two adjacent displacement directions at the same corner point of the spindle end cover; its value range is... The closer the value is to 1, the higher the synchronicity of displacement changes in the corresponding two directions.
[0029] Diagonal displacement and difference Synchronization coefficient of change The data were concatenated with the original monitoring data from four directions to construct enhanced time-series samples with spatial geometric constraints in each direction:
[0030]
[0031] In the formula, Indicates wind speed. Indicates the rotor speed. Indicates the generator speed. Indicates the active power of the power grid. This represents the historical displacement value in the current predicted direction. .
[0032] Furthermore, in step S2, the process of uniformly dividing all enhanced time-series samples into training, validation, and test sets includes the following steps:
[0033] Historical monitoring data is extracted using a fixed-length time window of length T as model input to predict the displacement values in four directions for the next time period, reconstructing the data into a time series input sample of [T, 5]. The sliding window time series reconstruction formula is as follows:
[0034]
[0035]
[0036] in, For the first There are input time series samples, where T is the sliding window length. For the first Augmented time series samples at each time step; For the first The output vector corresponding to the nth sample contains 4 directions. The actual value of the spindle end cap displacement at each time step; The sample number has a range of values. , This represents the total number of samples after preprocessing.
[0037] All augmented time series samples are uniformly divided into training set, validation set and test set according to the preset ratio.
[0038] Furthermore, in step S3, the input layer constructs independent input branches for the four directions of the main shaft end cap: upper left, lower left, upper right, and lower right, respectively, receives the enhanced temporal samples in the corresponding directions, and outputs the standardized temporal features in each direction;
[0039] The GRU short-term feature extraction layer processes time-series data branch by branch, and relies on the gating structure to mine the instantaneous fluctuations and short-term variation patterns of time-series data in each direction, outputting short-term high-dimensional features in four directions respectively. ;
[0040] The Transformer long-range feature extraction layer relies on multi-head attention to capture the long-range dependencies between operating parameters and displacement data in each direction, and outputs long-range correlation features in four directions. ;
[0041] The working condition sensing encoder first extracts the time. Working condition feature vector ,in It is instantaneous wind speed. For turbulence intensity, The power fluctuation rate is then used; a multilayer perceptron is then used to encode the operating condition feature vector into an operating condition embedding vector. ;
[0042] The feature fusion layer embeds vectors based on working conditions. Generate dynamic fusion weights:
[0043]
[0044]
[0045] In the formula, The weights are used to fuse the short-term characteristics of GRU, and the weights increase under strong turbulence conditions; The fusion weights for long-range features of the Transformer are increased under steady-state conditions; then, for each direction, a dynamic fusion weight is used to weight and fuse short-range and long-range features:
[0046] ;
[0047] The single-path fusion features of each of the four directions are obtained. ;
[0048] The four-way fused features are stacked into a three-dimensional tensor along the directional dimension. The Query, Key, and Value matrices are obtained through linear projection. Cross-directional multi-head cross-attention operations are performed to output the enhanced four-way directional features and learn the spatial rigidity and load coupling constraints of the main shaft end cap. The cross-attention output is used as the Value and the original fused features are used as the Query to further focus on key time steps and directional features.
[0049] The fully connected layer performs nonlinear mapping and dimensionality reduction on the four directional features after enhanced coupling, and finally the output layer synchronously outputs the displacement prediction results in the four directions.
[0050] Further, in step S4, the composite loss function is:
[0051]
[0052] In the formula, This is the displacement prediction error term. ; This is a penalty term for four-way displacement coupling deviation. ; For batch size, This is the directional weighting coefficient, set according to the historical displacement fluctuation range of each unit in each direction; Let be the diagonal displacement and difference output for the i-th sample; This is the gradient difference penalty coefficient; The rate of change of the displacement difference in adjacent directions; adjacent directions for the set Hyperparameters Optimize using the validation set.
[0053] Furthermore, the method also includes:
[0054] S6 compares the predicted values with the measured values to verify the accuracy, and performs online fine-tuning of the model based on new monitoring data to achieve dynamic model updates.
[0055] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0056] First, the wind turbine generator main shaft end cover displacement prediction method based on the Transformer-GRU fusion model of the present invention constructs enhanced temporal features with geometric and mechanical constraints by fusing two types of original spatial coupling features: diagonal displacement and difference, and cross-correlation coefficient of adjacent displacement gradients at corner points. At the same time, it adds a four-way cross-attention branch to realize interactive learning of four displacement features, which conforms to the inherent structural rigidity and mechanical linkage law of the main shaft end cover, abandons the independent prediction mode of displacement in each direction, effectively constrains the prediction results to meet the physical coupling relationship, and eliminates unreasonable displacement prediction values that violate the deformation mechanism of the end cover.
[0057] Second, the wind turbine generator main shaft end cover displacement prediction method based on the Transformer-GRU fusion model of the present invention constructs a GRU-Transformer dual-branch heterogeneous extraction structure, which specifically mines the high-frequency displacement fluctuations caused by short-term alternating loads and the slow displacement drift characteristics caused by long-term wind condition evolution. Combined with the working condition sensing encoder, it realizes adaptive weighted fusion of long-term and short-term characteristic working conditions, adapting to nonlinear extreme working conditions such as gusts, strong turbulence, and pitch disturbances, which greatly improves the displacement prediction accuracy under extreme working conditions and enhances the robustness of the model in predicting all working conditions.
[0058] Third, the wind turbine generator main shaft end cover displacement prediction method based on the Transformer-GRU fusion model of the present invention sets up a dedicated operating condition sensing encoder, and relies on multi-dimensional operating condition parameters such as wind speed, turbulence intensity, and power fluctuation rate to encode the operating condition embedding vector, and dynamically adjusts the fusion weight of long and short time series features. Unlike the traditional fixed weight splicing fusion mode, it can adaptively adjust the feature ratio according to real-time wind conditions and unit load, adapt to the time-varying and non-stationary characteristics of wind power load, improve the integrity of feature mining under different wind conditions, and improve the stability of global prediction.
[0059] Fourth, the wind turbine main shaft end cover displacement prediction method based on the Transformer-GRU fusion model of this invention adopts a composite loss function to jointly optimize the model, simultaneously constraining the single-direction fitting accuracy and four-direction coupling deviation, taking into account both single-point prediction error and global structural coupling constraints, further optimizing the model learning direction, and closely conforming to the actual deformation mechanism of the main shaft end cover. Compared with the traditional single error loss model, the prediction accuracy is higher, which can provide reliable data support for turbine main shaft fault early warning and operation and maintenance. In addition, the prediction results are verified by relying on standardized accuracy indicators, and the model is dynamically updated online by relying on incremental monitoring data. It can adaptively offset the displacement pattern changes caused by turbine component aging, foundation settlement, and seasonal wind drift, delay the model performance degradation, and adapt to the operation and maintenance of wind turbines for more than 20 years of their entire life cycle, balancing prediction accuracy and on-site engineering practicality. Attached Figure Description
[0060] Figure 1 Flowchart of the spindle end cap displacement prediction method based on the Transformer-GRU fusion model provided for embodiments of the present invention;
[0061] Figure 2 A diagram showing the sensor measuring points in four directions at the end of the spindle cover;
[0062] Figure 3 A schematic diagram of the Transformer-GRU fusion prediction model structure provided for an embodiment of the present invention;
[0063] Figure 4 The displacement processing diagram for the main shaft end cover displacement in the upper left direction of Unit 6, based on the 3σ criterion.
[0064] Figure 5 Normalized diagram of displacement data of the main shaft end cover in the upper left direction of Unit 6;
[0065] Figure 6 Structural diagram for dividing the displacement data of the main shaft end cover in the upper left direction of Unit 6;
[0066] Figures 7(a), 7(b), 7(c), and 7(d) are schematic diagrams comparing the predicted and measured values of the main shaft end cover displacement in the four directions of upper left, lower left, upper right, and lower right of Unit 6 provided by the embodiments of the present invention.
[0067] Figure 8 A comparison chart of the displacement prediction accuracy of five generating units in four directions provided for the embodiments of the present invention;
[0068] Figure 9 The specific flowchart is dynamically updated for the model. Detailed Implementation
[0069] The embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
[0070] See Figure 1 This invention discloses a method for predicting the displacement of the main shaft end cover of a wind turbine generator based on a Transformer-GRU fusion model. The method includes the following steps:
[0071] S1, collect monitoring data from multiple wind turbine generator sets. The monitoring data includes historical monitoring data of displacement in four directions (upper left, lower left, upper right, and lower right) of the main shaft end cover, as well as corresponding time period unit operation data used to characterize the unit load and real-time operating status.
[0072] S2. The collected monitoring data is preprocessed. Based on the displacement data of the main shaft end cap in four directions, two types of four-way displacement coupling features are calculated: diagonal displacement and difference, and cross-correlation coefficient of displacement gradient in adjacent directions. The four-way displacement coupling features are then concatenated with the original monitoring data in the four directions to construct enhanced time-series samples with spatial geometric constraints in each direction. All enhanced time-series samples are uniformly divided into training set, validation set and test set.
[0073] S3. Construct a Transformer-GRU fusion prediction model. The model, in order of data flow, includes an input layer, a GRU short-term feature extraction layer, a Transformer long-range feature extraction layer, a condition-aware encoder, a four-way cross-attention branch, a feature fusion layer, a fully connected layer, and an output layer. The input layer has four independent input branches, receiving enhanced temporal samples from four directions and outputting standardized temporal features. The GRU short-term feature extraction layer and the Transformer long-range feature extraction layer each have four independent branches, processing temporal features in each direction and outputting corresponding short-term high-dimensional features and long-range correlation features. The condition-aware encoder parses the operating conditions and generates condition embedding vectors. The feature fusion layer generates dynamic fusion weights based on the condition embedding vectors, fusing short-term high-dimensional features and long-range correlation features in each direction to obtain four independent fused features. The four-way cross-attention branch performs cross-directional attention operations on the four fused features, mining the spatial coupling relationship of the four-way displacement and outputting coupled enhanced features. The fully connected layer performs nonlinear mapping dimensionality reduction on the coupled enhanced features, and the output layer synchronously outputs the displacement prediction results in the four directions.
[0074] S4. With the optimization objective of simultaneously minimizing the single-direction displacement prediction error and the four-direction displacement coupling deviation, a composite loss function containing the displacement prediction error term and the four-direction displacement coupling deviation penalty term is used to train the model, complete the model training and parameter optimization, and obtain the optimal fusion prediction model.
[0075] S5. Input the latest time series data into the optimal fusion prediction model to obtain the displacement prediction values in four directions of the main shaft end cover, and complete the displacement prediction.
[0076] Example
[0077] The test prototypes used for method validation are located in a wind power plant, with unit numbers 6, 19, 23, 27, and 39. The aim is to predict the displacement and axial movement of their main shaft end caps. The wind turbine main shaft end cap displacement prediction method implemented in this example includes the following steps:
[0078] Step 1: Using a surface strain gauge DH1207, determine the monitoring points of the DH1207 displacement gauge. The main shaft displacement measuring points are as follows: Figure 2 As shown, one 1207 displacement gauge is installed in each of the four directions of the main shaft end cover of each unit, namely the upper left, lower left, upper right, and lower right, to collect the displacement data of the main shaft end cover in the four directions; at the same time, the unit operating parameters for the corresponding time period are collected, including wind speed, rotor speed, generator speed, and grid active power.
[0079] Step two involves preprocessing the collected monitoring data. This embodiment uses the data processing of Unit 6 under gusty wind conditions as an example for detailed explanation; the processing method for other units is the same. The preprocessed result of the upper left displacement value of Unit 6 is as follows: Figure 4 As shown, the specific steps include:
[0080] 1. Outlier handling: The 3σ criterion is used to identify outliers in displacement and operational data. Linear interpolation is used to fill in the outliers to avoid the impact of outliers on prediction accuracy.
[0081] 2. 3σ Criterion Outlier Identification Formula:
[0082] First, calculate the mean (μ) and standard deviation (σ) of the displacement data sequence:
[0083]
[0084]
[0085] in The first in the displacement time series data Displacement values This represents the total number of samples in a single set of displacement data.
[0086] When data points A value is considered an outlier if it meets any of the following conditions:
[0087]
[0088] or
[0089]
[0090] 3. Linear interpolation method for filling in gaps:
[0091] For displacement values that are determined to be abnormal, abnormal points (Corresponding to position k), use the two adjacent normal data points before and after it. (The previous one is normal) (The next normal point) is filled using linear interpolation, with the following formula:
[0092]
[0093] Simplified version:
[0094]
[0095] in Displacement numerical anomalies The new displacement value after filling.
[0096] Figure 4 The displacement processing diagram of the main shaft end cover displacement in the upper left direction of Unit 6 is shown. In this set of data, the mean μ is -1.206mm and the standard deviation σ is 0.031mm. Two abnormal data points were screened out by the 3σ criterion and filled in by linear interpolation to ensure the integrity of the data.
[0097] 4. Data normalization:
[0098] The maximum-minimum normalization method is used to normalize the displacement and operational data to the [0,1] interval, eliminating dimensional differences. The formula is as follows:
[0099]
[0100] in, The original data, For the normalized data, , These represent the maximum and minimum values of the original data, respectively.
[0101] Figure 5 The normalized result of the displacement data of the main shaft end cover in the upper left direction of Unit 6 is shown. This eliminates the difference in dimensions and numerical magnitude. The original numerical range was -1.35 to -1.15 mm, which was too small and negative. After normalization, all data are unified to [0,1] to avoid large numerical features "dominating" the model and small numerical features being ignored, thus ensuring that each feature contributes fairly to the model.
[0102] 5. Extract four-way displacement coupling features:
[0103] Let the displacement time sequences of the spindle end cover in the four directions of upper left, lower left, upper right, and lower right be respectively... The diagonal displacement and difference were calculated. for:
[0104]
[0105] For each pair of adjacent directions First calculate the displacement difference in adjacent directions. Then, taking the derivative with respect to time yields the displacement gradient in adjacent directions. for:
[0106]
[0107] in Indicates a pair of adjacent directions. ;
[0108] At each time step t, a local time window of length W is extracted, ending at t. The time step index within the window is... ; within the time window Within, two pairs of adjacent directions are selected centered on a single displacement acquisition corner point. The cross-correlation coefficient is calculated as the synchronization coefficient of the changes in the directions of two adjacent displacements at the corresponding corner points. :
[0109]
[0110] in Indicates adjacent direction pairs; This is used to quantify the linkage characteristics of changes in two adjacent displacement directions at the same corner point of the spindle end cover; its value range is... The closer the value is to 1, the higher the synchronicity of displacement changes in the corresponding two directions.
[0111] Diagonal displacement and difference Synchronization coefficient of change The data were concatenated with the original monitoring data from four directions to construct enhanced time-series samples with spatial geometric constraints in each direction:
[0112]
[0113] In the formula, Indicates wind speed. Indicates the rotor speed. Indicates the generator speed. Indicates the active power of the power grid. This represents the historical displacement value in the current predicted direction. .
[0114] 6. Data partitioning and reconstruction:
[0115] The preprocessed dataset is divided into training, validation, and test sets in a 70%:15%:15% ratio, as follows: Figure 6As shown, a sliding window method is used to segment the time series data, with a sliding window length T = 1800. Historical monitoring data (operational data + displacement data) is extracted from a fixed-length time window of T as the model input to predict the displacement values in four directions for the next time period. The data is then reconstructed into a time series input sample of [T, 7]. The specific formula is as follows:
[0116] Dataset partitioning formula:
[0117]
[0118]
[0119]
[0120] in This represents the total number of samples after preprocessing. The number of samples in the training set. To determine the number of samples in the validation set, The number of samples in the test set. This indicates rounding down to the nearest integer to ensure the sample size is an integer.
[0121] Sliding window timing reconstruction formula:
[0122]
[0123]
[0124] in, For the first There are 7 input time series samples with dimensions [T, 7], where T is the sliding window length (T = 120 or T = 80). For the first Feature vectors at each time step; For the first The output vector corresponding to the nth sample contains four directions (top left, bottom left, top right, bottom right). The actual displacement value of the spindle end cap at each time step; The sample number has a range of values. .
[0125] Step 3: Construct the Transformer-GRU fusion prediction model. The structure of the fusion model is shown in the attached figure. Figure 3 As shown.
[0126] 1. Input layer: Receives the time-series input data reconstructed in step 1. The input dimension is [T,7], where T is the sliding window length and 7 is the feature dimension (4 running parameters + 1 current direction displacement data + 2 coupled features). The displacement predictions in the four directions construct independent input branches respectively.
[0127] 2. GRU Short-Term Feature Extraction Layer: Contains 32 neurons, uses the tanh activation function, introduces a Dropout layer (dropout rate 0.2) to prevent overfitting, and has an output dimension of [T, 32] to capture short-term dynamic changes in displacement data (such as instantaneous fluctuations).
[0128] tanh activation function formula:
[0129]
[0130] The formula outputs in the range of (-1, 1), is symmetrical about 0, and is more suitable for deep learning training than sigmoid. The gradient is larger near 0, and gradient vanishing occurs at both ends.
[0131] 3. Transformer Long-Range Feature Extraction Layer: Contains two encoder layers. Each encoder layer consists of a multi-head self-attention mechanism and a feedforward neural network. The number of multi-head attention heads is 4, the hidden layer dimension of the feedforward neural network is 64, and the output dimension is [T, 32]. It is used to capture the long-range dependency between operating parameters and displacement data (such as the cumulative effect of long-term wind speed changes on displacement).
[0132] The Transformer module's multi-head self-attention mechanism calculates attention weights as follows:
[0133]
[0134] in, These are the query vector, key vector, and value vector, respectively. for Dimensions The function is used to normalize attention weights.
[0135] 4. Condition-Aware Encoder: General Transformer-GRU fusion models typically employ fixed-weighted fusion (such as simple addition or splicing), which cannot adapt to changes in operating conditions, leading to decreased prediction accuracy under non-stationary conditions. To address this, this invention designs a condition-aware encoder, whose core functions are: real-time identification of the current operating condition, mapping wind speed, turbulence intensity, power fluctuation rate, etc., into low-dimensional condition embedding vectors; and dynamically modulating the fusion weights, adaptively adjusting the proportion of GRU features and Transformer features during fusion based on the condition embedding.
[0136] Operating condition feature extraction, time definition Operating condition feature vector :
[0137]
[0138]
[0139] in It is instantaneous wind speed. For turbulence intensity, Power fluctuation rate , , These represent the mean and standard deviation of the wind speed, respectively.
[0140] Working condition embedding generation, working condition feature vector The dimensionality is low, and there is a complex nonlinear mapping relationship between the load condition and the displacement prediction task. To extract high-level load condition feature vectors, a multilayer perceptron (MLP) is used to encode them into load condition embedding vectors. ;
[0141]
[0142] in, , and are the weight matrix and bias of the first fully connected layer, respectively; It is the ReLU activation function; , and are the weight matrix and bias of the second fully connected layer, respectively. This MLP structure uses two layers of nonlinear transformation to bring similar operating conditions closer together in the embedding space, facilitating smooth adjustment of subsequent dynamic weights.
[0143] 5. Feature Fusion Layer: Dynamic fusion weight calculation, setting the short-term features output by the GRU layer as follows: The long-range features output by the Transformer layer are To automatically adjust the ratio of the two during fusion based on operating conditions, a gating mechanism is introduced:
[0144]
[0145]
[0146] in The weights are used for feature fusion. Table 1 shows the mapping relationship between working conditions and weights:
[0147] Table 1 Weight values under different working conditions
[0148]
[0149] Feature fusion, the final fused features are calculated by weighted sum:
[0150]
[0151] 6. Four-way Cross-Attention Branch: The displacements in the four directions of the spindle end cap are not independent variables, but are coupled together through physical mechanisms such as the rigidity of the end cap structure, bolt preload, and load distribution. Traditional methods model each direction independently (or only share underlying parameters), ignoring the aforementioned spatial coupling relationships, which may lead to physically unreasonable displacement combinations in the prediction results (e.g., a sudden increase in the upper left displacement while the lower right displacement remains unchanged). To address this, this invention designs a four-way cross-attention branch.
[0152] Input feature preparation: Assume that after fusion by GRU, Transformer, and condition-aware encoder, the feature vectors in the four directions are as follows:
[0153]
[0154] in For window length, Let be the feature dimension. Stacking these four features along the "directional dimension" forms a three-dimensional tensor. .
[0155] Multi-head cross-attention computation: Define a query, key, and value matrix. Unlike traditional self-attention, this branch uses cross-attention: allowing each direction to act as a query and extracting information from all directions. Features of the four directions are considered. Q, K, and V are obtained through three different linear projection matrices;
[0156]
[0157] Attention weight calculation:
[0158]
[0159] The similarity matrix between directions, except Scaling is performed to avoid excessively large inner products that could cause softmax gradient saturation, resulting in a better final output. In this embodiment, (and same).
[0160] 7. Attention Fusion Layer: The four directional features output from the cross-attention branch are fused with the original GRU / Transformer features again using scaled dot product attention, further focusing on important time steps and directional features. Specifically, a weighted sum is calculated using the cross-attention output as the value and the original fused features as the query.
[0161] 8. Fully Connected Layer and Output Layer: The fully connected layer contains two hidden layers (with dimensions of 64 and 32 respectively), using the ReLU activation function. The output layer uses a linear activation function and outputs the normalized displacement prediction value of the main shaft end cap in the corresponding direction at the next time point. , The four fusion branches share model parameters, with only the output layer being independent, enabling simultaneous prediction in multiple directions.
[0162] The ReLU activation function is a piecewise function, and the specific formula is as follows:
[0163]
[0164] This formula outputs the original value directly when the input is greater than 0, and outputs 0 when the input is less than 0. It is extremely fast, and the gradient is always 1 in the positive interval, making it less prone to gradient vanishing.
[0165] To clearly present the core parameters of each layer of the model, they are summarized in Table 2:
[0166] Table 2 Core parameters of each layer of the model
[0167]
[0168] Step four: Input the partitioned dataset into the Transformer-GRU fusion prediction model for model training and parameter optimization.
[0169] 1. A composite loss function is adopted, which includes a weighted mean square error term and a four-way coupling bias penalty term:
[0170]
[0171] Weighted mean square error:
[0172]
[0173] in Where is the batch size, and is the directional weighting coefficient. In this embodiment, the weighting is set according to the historical displacement fluctuation amplitude of each unit in each direction: Unit 6, upper right. =1.5, other directions =1.2; Units 19 and 39, upper right =1.4, other directions =1.1; Units 23 and 27, all directions =1.0.
[0174] Four-way coupling deviation penalty:
[0175]
[0176] The diagonal displacement and difference are output for the i-th sample; This is the gradient difference penalty coefficient; The rate of change of the displacement difference in adjacent directions; adjacent directions for the set Hyperparameters Through validation set optimization, this embodiment uses 0.05.
[0177] 2. The Adam optimizer was used for model training with an initial learning rate of 0.001 and a batch size of 32. Early stopping (patience=5) was used to prevent model overfitting.
[0178] 3. Validate the model during training using a validation set and adjust the model hyperparameters. GRU neuron count: {16, 32, 64} - preferably 32; Transformer attention head count: {2, 4, 8} - preferably 4; Sliding window length T: {1200, 1800, 2400} - preferably 1800; Loss function... The optimal fusion prediction model is obtained by using {0.01, 0.03, 0.05, 0.10} - preferably 0.05, until the prediction error of the model on the validation set is minimized.
[0179] Step 5: Obtain the predicted displacement values of the main shaft end cover in four directions for the 1207 displacement gauges of the 5 units to complete the displacement prediction. The displacement prediction results of Unit 6 in four directions are shown in Figure 7(a), (b), (c), and (d).
[0180] 1. Using the sliding window method in step two, the latest time series data of the sliding window is extracted and input into the optimal fusion prediction model trained in step four to obtain the normalized prediction values of the displacement of the main shaft end cap in four directions.
[0181] 2. Perform denormalization on the normalized predicted values to restore them to displacement predicted values with actual physical meaning. The formula is as follows:
[0182]
[0183] in, This is the final predicted displacement value. The normalized predicted value output by the model. , These are the maximum and minimum values of the original displacement data obtained in step two.
[0184] 3. Output the predicted displacement values of the main shaft end caps in four directions for the 1207 displacement gauges of the above five units to complete the displacement prediction. For example, at a certain moment, the wind speed of Unit 6 is 8.5 m / s, the rotor speed is 12 r / min, the generator speed is 1200 r / min, and the active power of the power grid is 1500 kW. The model outputs a predicted displacement value of -1.23 mm in the upper left direction, while the actual measured value is -1.24 mm. The prediction error is small and closely matches the actual monitoring situation.
[0185] Step 6: Compare the predicted values with the measured values to verify the prediction accuracy and perform dynamic updates.
[0186] 1. Input the test set data into the optimal fusion prediction model to obtain the predicted values. Calculate the mean absolute error (MAE) and coefficient of determination (R²) between the predicted and measured values to verify the model's prediction accuracy. The calculation formulas are as follows:
[0187]
[0188]
[0189] Where N is the total number of samples. For the first The predicted displacement value for each sample. For the first The measured displacement values of each sample. This is the average value of all measured displacement values.
[0190] 2. Figures 7(a), (b), (c), and (d) are schematic diagrams comparing the predicted and measured displacement values of Unit 6 in the four directions of upper left, lower left, upper right, and lower right. The horizontal axis represents the time step, and the vertical axis represents the displacement value. The solid line represents the measured displacement, and the dashed line represents the predicted displacement. The two curves have a very high degree of fit, accurately capturing subtle fluctuations and abrupt changes in displacement without significant deviation. The calculated MAE and R² for the four directions are shown in Table 3 below:
[0191] Table 3. MAE and R² values of Unit 6 in four directions
[0192] Top left 0.88 0.072 Bottom left 0.87 0.075 Top right 0.90 0.072 Bottom right 0.84 0.096
[0193] 3. Figure 8 A comparison of the prediction accuracy of the five generating units in four directions is presented in a bar chart, clearly showing the R² values of each unit in each direction. Unit 23 has the highest R² value in the lower left direction (0.92), Unit 6 has an R² value of 0.90 in the upper right direction, and Units 19 and 39 have relatively fluctuating R² values of 0.82 and 0.82 respectively in the upper right direction. All directions meet the accuracy requirements, intuitively demonstrating the prediction effect and unit adaptability of the model of this invention. The R² values of all units in each direction are shown in Table 4 below.
[0194] Table 4. R² values for each unit in all directions
[0195] 6 0.88 0.87 0.90 0.84 19 0.87 0.85 0.83 0.84 23 0.88 0.90 0.89 0.91 27 0.89 0.87 0.88 0.90 39 0.86 0.84 0.83 0.86
[0196] 5. Dynamic Model Update: When new monitoring data is acquired, the sliding window moves forward one time step, removing the oldest data points and adding the latest ones. This allows for online fine-tuning of the fusion prediction model. Each update only fine-tunes the parameters of the fully connected layer and the attention fusion layer, reducing computational load, ensuring real-time prediction performance, and achieving dynamic model updates to guarantee long-term prediction accuracy. The specific process is as follows: Figure 9 As shown.
[0197] The invention has been verified by actual wind farm monitoring. It has been found that the newly proposed method for predicting the displacement of the main shaft end cover of wind turbine generators based on the Transformer-GRU fusion model is reliable, has high prediction accuracy and strong adaptability. It can accurately capture the displacement change law of the main shaft end cover in four directions of the 1207 displacement gauge of five TBEA series units. It provides reliable data support for the safe operation of the units and the evaluation of the technical transformation effect. The method is simple and easy to operate and has strong practical physical significance and engineering application value.
[0198] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0199] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for predicting the displacement of the main shaft end cover of a wind turbine generator based on a Transformer-GRU fusion model, characterized in that, The method includes the following steps: S1, collect monitoring data from multiple wind turbine generator sets. The monitoring data includes historical monitoring data of displacement in four directions (upper left, lower left, upper right, and lower right) of the main shaft end cover, as well as corresponding time period unit operation data used to characterize the unit load and real-time operating status. S2. The collected monitoring data is preprocessed. Based on the displacement data of the main shaft end cap in four directions, two types of four-way displacement coupling features are calculated: diagonal displacement and difference, and cross-correlation coefficient of displacement gradient in adjacent directions. The four-way displacement coupling features are then concatenated with the original monitoring data in the four directions to construct enhanced time-series samples with spatial geometric constraints in each direction. All enhanced time-series samples are uniformly divided into training set, validation set and test set. S3. Construct a Transformer-GRU fusion prediction model. The model, in order of data flow, includes an input layer, a GRU short-term feature extraction layer, a Transformer long-range feature extraction layer, a condition-aware encoder, a four-way cross-attention branch, a feature fusion layer, a fully connected layer, and an output layer. The input layer has four independent input branches, receiving enhanced temporal samples from four directions and outputting standardized temporal features. The GRU short-term feature extraction layer and the Transformer long-range feature extraction layer each have four independent branches, processing temporal features in each direction and outputting corresponding short-term high-dimensional features and long-range correlation features. The condition-aware encoder parses the operating conditions and generates condition embedding vectors. The feature fusion layer generates dynamic fusion weights based on the condition embedding vectors, fusing short-term high-dimensional features and long-range correlation features in each direction to obtain four independent fused features. The four-way cross-attention branch performs cross-directional attention operations on the four fused features, mining the spatial coupling relationship of the four-way displacement and outputting coupled enhanced features. The fully connected layer performs nonlinear mapping dimensionality reduction on the coupled enhanced features, and the output layer synchronously outputs the displacement prediction results in the four directions. S4. With the optimization objective of simultaneously minimizing the single-direction displacement prediction error and the four-direction displacement coupling deviation, a composite loss function containing the displacement prediction error term and the four-direction displacement coupling deviation penalty term is used to train the model, complete the model training and parameter optimization, and obtain the optimal fusion prediction model. S5. Input the latest time series data into the optimal fusion prediction model to obtain the displacement prediction values in four directions of the main shaft end cover, and complete the displacement prediction.
2. The method for predicting the displacement of the main shaft end cover of a wind turbine generator based on the Transformer-GRU fusion model according to claim 1, characterized in that, Step S1 further includes: One surface strain gauge is arranged in each of the four directions of the main shaft end cover of each wind turbine generator set, namely the upper left, lower left, upper right, and lower right, to collect displacement data of the main shaft end cover in the four directions; at the same time, the unit operating parameters for the corresponding time period are collected, including wind speed, rotor speed, generator speed, and grid active power.
3. The method for predicting the displacement of the main shaft end cover of a wind turbine generator based on the Transformer-GRU fusion model according to claim 1, characterized in that, Step S2, the preprocessing of the collected monitoring data includes the following steps: The 3σ criterion is used to identify outliers in displacement and operational data. For outlier points in displacement values that are determined to be abnormal, linear interpolation is performed using the two adjacent normal data points before and after them. The maximum-minimum normalization method is used to normalize the displacement and operational data to the [0,1] interval.
4. The method for predicting the displacement of the main shaft end cover of a wind turbine generator based on the Transformer-GRU fusion model according to claim 1, characterized in that, In step S2, the process of constructing enhanced temporal samples with spatial geometric constraints includes the following steps: Let the displacement time sequences of the spindle end cover in the four directions of upper left, lower left, upper right, and lower right be respectively... The diagonal displacement and difference were calculated. for: For each pair of adjacent directions First calculate the displacement difference in adjacent directions. Then, taking the derivative with respect to time yields the displacement gradient in adjacent directions. for: in Indicates a pair of adjacent directions. ; At each time step t, a local time window of length W is extracted, ending at t. The time step index within the window is... ; within the time window Within, two pairs of adjacent directions are selected centered on a single displacement acquisition corner point. The cross-correlation coefficient is calculated as the synchronization coefficient of the changes in the directions of two adjacent displacements at the corresponding corner points. : in Indicates adjacent direction pairs; This is used to quantify the linkage characteristics of changes in two adjacent displacement directions at the same corner point of the spindle end cover; its value range is... The closer the value is to 1, the higher the synchronicity of displacement changes in the corresponding two directions. Diagonal displacement and difference Synchronization coefficient of change The data were concatenated with the original monitoring data from four directions to construct enhanced time-series samples with spatial geometric constraints in each direction: In the formula, Indicates wind speed. Indicates the rotor speed. Indicates the generator speed. Indicates the active power of the power grid. This represents the historical displacement value in the current predicted direction. .
5. The method for predicting the displacement of the main shaft end cover of a wind turbine generator based on the Transformer-GRU fusion model according to claim 4, characterized in that, Step S2, which involves uniformly dividing all augmented time series samples into training, validation, and test sets, includes the following steps: Historical monitoring data is extracted using a fixed-length time window of length T as model input to predict the displacement values in four directions for the next time period, reconstructing the data into a time series input sample of [T, 7]. The sliding window time series reconstruction formula is as follows: in, For the first There are input time series samples, where T is the sliding window length. For the first Augmented time series samples at each time step; For the first The output vector corresponding to the nth sample contains 4 directions. The actual value of the spindle end cap displacement at each time step; The sample number has a range of values. , This represents the total number of samples after preprocessing. All augmented time series samples are uniformly divided into training set, validation set and test set according to the preset ratio.
6. The method for predicting the displacement of the main shaft end cover of a wind turbine generator based on the Transformer-GRU fusion model according to claim 1, characterized in that, In step S3, the input layer constructs independent input branches for the four directions of the main shaft end cap: upper left, lower left, upper right, and lower right. These branches receive enhanced temporal samples in the corresponding directions and output standardized temporal features for each direction. The GRU short-term feature extraction layer processes time-series data branch by branch, and relies on the gating structure to mine the instantaneous fluctuations and short-term variation patterns of time-series data in each direction, outputting short-term high-dimensional features in four directions respectively. ; The Transformer long-range feature extraction layer relies on multi-head attention to capture the long-range dependencies between operating parameters and displacement data in each direction, and outputs long-range correlation features in four directions. ; The working condition sensing encoder first extracts the time. Working condition feature vector ,in It is instantaneous wind speed. For turbulence intensity, The power fluctuation rate is then used; a multilayer perceptron is then used to encode the operating condition feature vector into an operating condition embedding vector. ; The feature fusion layer embeds vectors based on working conditions. Generate dynamic fusion weights: In the formula, The weights are used to fuse the short-term characteristics of GRU, and the weights increase under strong turbulence conditions; The fusion weights for long-range features of the Transformer are increased under steady-state conditions; then, for each direction, a dynamic fusion weight is used to weight and fuse short-range and long-range features: ; The single-path fusion features of each of the four directions are obtained. ; The four-way fused features are stacked into a three-dimensional tensor along the directional dimension. The Query, Key, and Value matrices are obtained through linear projection. Cross-directional multi-head cross-attention operations are performed to output the enhanced four-way directional features and learn the spatial rigidity and load coupling constraints of the main shaft end cap. The cross-attention output is used as the Value and the original fused features are used as the Query to further focus on key time steps and directional features. The fully connected layer performs nonlinear mapping and dimensionality reduction on the four directional features after enhanced coupling, and finally the output layer synchronously outputs the displacement prediction results in the four directions.
7. The method for predicting the displacement of the main shaft end cover of a wind turbine generator based on the Transformer-GRU fusion model according to claim 1, characterized in that, In step S4, the composite loss function is: In the formula, This is the displacement prediction error term. ; This is a penalty term for four-way displacement coupling deviation. ; For batch size, This is the directional weighting coefficient, set according to the historical displacement fluctuation range of each unit in each direction; The diagonal displacement and difference are output for the i-th sample; This is the gradient difference penalty coefficient; The rate of change of the displacement difference in adjacent directions; adjacent directions for the set Hyperparameters Optimize using the validation set.
8. The method for predicting the displacement of the main shaft end cover of a wind turbine generator based on the Transformer-GRU fusion model according to claim 1, characterized in that, The method further includes: S6 compares the predicted values with the measured values to verify the accuracy, and performs online fine-tuning of the model based on new monitoring data to achieve dynamic model updates.