A method for predicting bearing residual life based on gated cross attention
By introducing a dual-branch Transformer network with a gated cross-attention mechanism, the multi-domain features of the bearing are adaptively fused, solving the problem of insufficient information fusion in the existing technology and realizing accurate prediction of the remaining life of the bearing.
Patent Information
- Application Number
- CN202510020218.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-07
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2045-01-07
AI Technical Summary
Existing technologies fail to effectively utilize the complementarity of multi-domain features in bearing remaining life prediction, resulting in insufficient prediction accuracy. Existing methods also fail to achieve dynamic information fusion, ignoring key information or causing information contamination, which affects prediction accuracy.
A dual-branch Transformer network based on a gated cross-attention mechanism is adopted to process one-dimensional time-domain and two-dimensional time-frequency domain features respectively. The information from different domains is adaptively fused through the gated cross-attention mechanism to ensure the complementarity and uniqueness of features, avoid information redundancy, and improve prediction accuracy.
By employing adaptive information fusion and a dual-branch network structure, the accuracy and reliability of bearing remaining life prediction are significantly improved, comprehensively capturing the complex feature changes during the bearing degradation process and enhancing the model's predictive performance.
Smart Images

Figure CN120030506B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of bearing residual life prediction, and particularly relates to a method for predicting bearing residual life based on gated cross-attention. BACKGROUND
[0002] With the increasing demand for bearing life prediction accuracy in industrial equipment, traditional remaining useful life (RUL) prediction methods are facing new challenges. Multi-domain features in bearing vibration signals are crucial for improving the accuracy of RUL prediction. However, how to effectively utilize the information in these multi-domain features remains a difficulty in current research. To address the above challenges, the present application introduces a new method based on dual-branch Transformer and gated cross-attention (DTGCA), aiming to process and fuse features from different domains to achieve more accurate RUL prediction. Specifically, one branch of the method processes one-dimensional time series features from time and frequency domains, while the other branch processes two-dimensional time-frequency image features using a residual-convolutional gated recurrent unit (res-ConvGRU). Through the gated cross-attention mechanism (GCA), the method can adaptively fuse the information of the two branches, thereby enhancing the discrimination ability of the features, providing a clearer representation of the bearing degradation state, and obtaining accurate RUL prediction results.
[0003] In existing similar technologies, in terms of network structure, there are methods that use dual-branch Transformer to fuse multi-domain information, which usually take time domain, frequency domain and time-frequency domain as input. However, these methods fail to achieve dynamic fusion in the fusion process and fail to flexibly combine the information contained in different domains. In terms of dynamic information fusion, some methods use naive cross-attention, full-attention fusion and other technologies, although these methods achieve dynamic fusion, they directly fuse information without fully considering the complementarity between different domain information, which to some extent limits the further improvement of the remaining useful life (RUL) prediction accuracy.
[0004] In existing similar methods, there are the following three main technical shortcomings, which are concentrated in the information fusion process, and fail to fully utilize the advantages of different domain features, affecting the accuracy of RUL prediction:
[0005] 1. Simple cross-attention fusion: This method uses one branch of class labels to perform cross-self-attention calculation with another branch, although it can capture the interaction between different branches to some extent, it fails to dynamically fuse according to the importance of different features. This leads to the neglect of some key information, limiting the accurate identification of bearing degradation state, and ultimately affecting the accuracy of RUL prediction.
[0006] 2. Full attention fusion: In this method, the labels of different domain features are directly concatenated for processing, without fully considering the complementarity between these features. This "one-size-fits-all" approach can easily lead to information mixing and redundancy, making it difficult for the model to effectively distinguish and utilize useful information in different domains, thereby limiting the accuracy of RUL prediction.
[0007] 3. Single branch processing: This method uses one-dimensional time series or two-dimensional image-based features for prediction, although it can process information in a certain domain separately, it fails to effectively utilize the complementarity of multi-domain information. In the case of using only single domain information, important information provided by other domains may be missed, resulting in insufficient comprehensiveness and accuracy of the prediction results. SUMMARY
[0008] In view of the above problems, the present application provides a method for predicting the remaining life of bearings based on gated cross-attention. The present application introduces a gated cross-attention (GCA) mechanism, which flexibly controls the proportion of information fusion between different branches through a gating mechanism, achieving adaptive dynamic fusion. GCA not only avoids the problem of possibly neglecting key information, but also accurately controls the contribution proportion of each domain feature in the fusion process. The present application ensures that the complementarity of each domain feature is fully utilized, effectively avoiding the problem of decreased prediction accuracy caused by information mixing, thereby significantly improving the accuracy and reliability of RUL prediction. In the double branch structure of the present application, the gating mechanism allows information from one-dimensional time domain, frequency domain features, and two-dimensional time-frequency domain features to be allocated according to importance during the fusion process. This avoids the limitation of missing key information from other domains when processing single domain information, ensuring the comprehensiveness and accuracy of the final prediction results.
[0009] The present application provides a method for predicting the remaining life of bearings based on gated cross-attention, comprising:
[0010] Step 1. Obtain multiple bearing vibration signals as training data and formulate corresponding bearing remaining useful life (RUL) labels;
[0011] Preferably, the expression of the bearing remaining useful life (RUL) label corresponding to the training data in step 1 is:
[0012]
[0013] wherein, RUL is the bearing life label corresponding to the t-th time, and T represents the total number of time points.
[0014] Step 2. Let t = 1, which represents the initial time when t = 1;
[0015] Step 3. After continuous wavelet transform and sliding window processing of the bearing vibration signal at time t, the time-frequency feature sequence of the bearing vibration signal at time t is obtained.
[0016] Preferably, the expression of the continuous wavelet transform in step 3 is:
[0017]
[0018] wherein x(t) is the bearing vibration signal at time t, s is the scale of control, τ is the parameter of translation, wt(·) is the continuous wavelet transform function, ψ * is the complex conjugate of the wavelet base, is a factor for maintaining the energy of the wavelet family function constant under different scale transformations.
[0019] Preferably, the expression of the time-frequency feature sequence of the bearing vibration signal at time t in step 3 is:
[0020]
[0021] wherein, represents the t-th time-frequency image sequence, H represents the height of the input time-frequency image, W represents the width of the input time-frequency image, C represents the number of channels of the input time-frequency image, and l is the time interval.
[0022] Step 4. One-dimensional time domain and frequency domain analysis is performed on the bearing vibration signal at time t to obtain a one-dimensional time domain and frequency domain feature sequence at time t;
[0023] It can be understood that the one-dimensional time domain and frequency domain feature sequence at time t in step 4 includes a one-dimensional time domain feature time sequence and a one-dimensional frequency domain feature time sequence wherein d n is the number of one-dimensional time domain and frequency domain features, and represents the dimension of the input features;
[0024] Step 5. A bearing residual life double-branch Transformer prediction model is established based on the gated cross-attention;
[0025] Step 6. The one-dimensional time-frequency feature sequence at time t is input into the bearing residual life double-branch Transformer prediction model A t , and dimension conversion is performed through linear mapping to obtain a deep time domain and deep frequency domain feature sequence at time t wherein d fis the projection dimension;
[0026] adding corresponding class label one in the depth time domain and depth frequency domain feature sequence at time t and introducing position encoding to obtain the updated time domain and updated frequency domain feature sequence of bearing vibration signal at time t
[0027] Optionally, the specific steps of obtaining the updated time domain and updated frequency domain feature sequence of bearing vibration signal at time t in step 6 include:
[0028] adding trainable class label one in the depth time domain and frequency domain feature time sequence obtaining a labeled depth time domain and a labeled frequency domain feature sequence wherein d f is the projection dimension;
[0029] introducing sinusoidal position encoding in the labeled depth time domain and labeled depth frequency domain feature sequence to obtain the updated time domain and updated frequency domain feature sequence of bearing vibration signal at time t E pos is the sinusoidal position encoding;
[0030] wherein the sinusoidal position encoding E pos The expression is:
[0031]
[0032] wherein, wherein k=0, 1, 2... represents the frequency index, controls the frequency of the sine and cosine functions, different k values generate different frequency encodings, which can help to capture multiple levels of position information; pos represents the position index in the sequence, d f is the projection dimension.
[0033] Step 7. Input the time-frequency feature sequence of bearing vibration signal at time t in step 3 into the bearing residual life double-branch Transformer prediction model A t wherein the residual convolution GRU network is passed to obtain the depth time-frequency feature sequence of bearing vibration signal at time t wherein d v represents the mapping dimension of the final layer of the depth network;
[0034] inserting corresponding class label two in the depth time-frequency feature sequence of bearing vibration signal at time t and based on the multi-head self-attention mechanism, obtaining the updated time-frequency feature sequence of bearing vibration signal at time t
[0035] Preferably, the residual convolutional network in step 7 has three layers, including one layer of residual convolutional gated unit, and two layers of convolutional gated unit; wherein each layer of network has a pooling layer for down-sampling between layers.
[0036] Step 8. Based on the gated cross-attention mechanism, the updated time domain feature sequence X 1d and the updated frequency domain feature sequence X 2d at time t in step 7 are interacted to obtain common information of the bearing vibration signal at time t;
[0037] Preferably, the specific steps of obtaining the common information of the bearing vibration signal at time t in step 8 include:
[0038] taking the class label one in the updated time domain feature sequence and the updated frequency domain feature sequence at time t as a query vector, interacting with the key and value of the updated time-frequency feature sequence at time t, and then based on the cross-attention mechanism, obtaining the common information of the bearing vibration signal at time t;
[0039] The common information includes common information of the time domain feature, the frequency domain feature and the time-frequency domain feature of the bearing vibration signal at time t;
[0040] The common information of the bearing vibration signal at time t is expressed as:
[0041]
[0042] Wherein, head t represents the attention head at time t; Q t represents the result of the linear transformation of the query vector at time t; K t represents the key vector at time t; V t represents the value vector at time t; W i q represents the trainable matrix of the query vector, represents the trainable matrix of the key vector, represents the trainable matrix of the value vector, represents the class label one, represents the deep time-frequency feature sequence of the bearing vibration signal at time t, represents the common information of the bearing vibration signal at time t, W t is the trainable matrix at time t.
[0043] Step 9. The common information of the bearing vibration signal at time t is spliced with the class label one in step 6 to obtain the spliced common information one at time t;
[0044] Input the shared information after splicing at time t into the auxiliary network AN, and output the time t gate signal;
[0045] Based on the gated signal at time t, the common information of the class label in step 6 and the bearing vibration signal at time t in step 8 is fused to obtain the gated fused class label.
[0046] The gated and fused class label is concatenated with the updated time-domain and updated frequency-domain feature sequences of the bearing vibration signal at time t described in step 6 to obtain the gated and fused time-domain and frequency-domain feature sequences at time t.
[0047] Optionally, the class label after gating fusion is:
[0048]
[0049] in, Represents the class label after gating and fusion, g is the gating signal, and p 1d This is common information for bearing vibration signals. Mark class 1.
[0050] The expression for the first gate signal is:
[0051] g = σ (W²f + b²)
[0052] Where σ(·) is the gating function, W2 is the weight matrix, f is the mapping dimension, and b2 represents the bias matrix.
[0053] Step 10. Concatenate the common information of the bearing vibration signal at time t with the class marker two described in step 7 to obtain the concatenated common information two at time t;
[0054] Input the shared information 2 after splicing at time t into the auxiliary network AN, and output the gating signal 2 at time t;
[0055] Based on the gated signal at time t, the common information of the class label II described in step 7 and the bearing vibration signal at time t described in step 8 is fused to obtain the gated fused class label II.
[0056] Class labeling after gating fusion By splicing the updated time-frequency feature sequence of the bearing vibration signal at time t described in step 7, a time-gated fused time-frequency domain feature sequence at time t is obtained;
[0057] Step 11. Based on the multi-head attention mechanism, process the time-domain and frequency-domain feature sequences gated and fused at time t and the time-frequency-domain feature sequences gated and fused at time t respectively to obtain the class labels in the time-domain and frequency-domain feature sequences at time t. and time-frequency domain feature sequence class labeling 2
[0058] concatenate the class labels in the time-domain feature sequence and the frequency-domain feature sequence at time t to obtain a composite label x at time t and the class label of the time-frequency domain feature sequence at time t concatenate to obtain a composite label x at time t cls_fused input the composite label x at time t cls_fused into a regression layer to obtain the final class label at time t, which represents the bearing life prediction value at time t:
[0059] the final class label y at time t t is expressed as:
[0060] y t =x cls_fused W r +b r
[0061] wherein W r is a learnable weight matrix in the regression layer, and b r represents a bias term.
[0062] Step 11. Based on the multi-head attention mechanism, concatenate the class labels of the time-domain and frequency-domain feature sequences at time t in step 9 and the class labels of the time-frequency domain feature sequences at time t in step 10 to obtain the final class label at time t, which represents the bearing life prediction value at time t;
[0063] Step 12. Determine whether t is greater than T, wherein T represents the total number of time points. If yes, output the bearing life prediction value at time t to obtain the final bearing residual life double-branch Transformer prediction model; if not, set t=t+1 and return to step 2.
[0064] Step 13. Perform bearing residual life prediction based on the final bearing residual life double-branch Transformer prediction model.
[0065] Preferably, step 14 further comprises using mean square error (MSE) as the loss function of the bearing residual life double-branch Transformer prediction model, and the expression is:
[0066]
[0067] wherein T is the total number of time points, y t is the prediction value at time t, and RUL is the bearing residual life label at time t.
[0068] The present application provides an efficient residual life prediction method, which can accurately capture the degradation trend of the bearing and realize accurate prediction of the bearing residual life through fusion of multi-domain information and regression analysis.
[0069] Compared with the prior art, the present application has at least the following beneficial effects:
[0070] (1) The present application is based on the adaptive information fusion of GCA: the present application realizes the adaptive dynamic fusion of time domain, frequency domain and time-frequency domain features by introducing the GCA mechanism. Compared with the traditional simple splicing or fixed proportion fusion method, the GCA mechanism not only eliminates the information redundancy, but also adjusts the fusion proportion of each branch feature flexibly through the gating mechanism, ensures that the uniqueness and complementarity of each domain feature are retained and fully utilized, thereby significantly improving the accuracy and reliability of RUL prediction;
[0071] (2) The present application adopts a double-branch network structure to process one-dimensional time domain, frequency domain features and two-dimensional time-frequency domain features respectively. This structure can fully capture the complex feature changes in the bearing degradation process, and greatly enhances the accurate identification ability of the model to the bearing state compared with the single branch processing method;
[0072] (3) The res-ConvGRU network in the present application retains the relative relationship between sequences when processing two-dimensional time-frequency domain features, avoiding the loss of important information that may be lost in the traditional network processing process. Compared with the simple combination of CNN and GRU, the res-ConvGRU structure effectively improves the depth and efficiency of feature extraction, thereby further improving the prediction performance of the model. BRIEF DESCRIPTION OF DRAWINGS
[0073] The accompanying drawings are for the purpose of illustrating preferred embodiments of the present application and are not to be construed as limiting the present application.
[0074] Figure 1 The schematic diagram of the network structure of the residual convolution gating unit in the embodiment of the present application;
[0075] Figure 2 The schematic diagram of the network unit structure of multi-head self-attention in the embodiment of the present application;
[0076] Figure 3 The schematic diagram of the deep feature extraction network structure for one-dimensional time domain and frequency domain features in the embodiment of the present application;
[0077] Figure 4 The schematic diagram of the deep feature extraction network structure for two-dimensional time-frequency domain features in the embodiment of the present application;
[0078] Figure 5 The schematic diagram of the gating cross-attention network structure in the embodiment of the present application;
[0079] Figure 6 (a)-(c) The schematic diagram of the multi-domain analysis result of the vibration signal in the embodiment of the present application;
[0080] Figure 7 Fig. 1 is a schematic diagram of the prediction results of the remaining useful life obtained in an embodiment of the present application. DETAILED DESCRIPTION
[0081] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict. In addition, the present application can also be implemented in other ways different from those described herein, and therefore, the protection scope of the present application is not limited by the specific embodiments disclosed below.
[0082] One specific embodiment of the present application, as Figures 1-7 , discloses a method for predicting the remaining life of a bearing based on gated cross attention.
[0083] In order to illustrate the effectiveness of the method proposed by the present application, the above technical solutions of the present application will be described in detail below through a specific embodiment, and the specific implementation steps are as follows:
[0084] The present application provides a method for predicting the remaining life of a bearing based on gated cross attention, comprising:
[0085] Step 1. Obtain a plurality of bearing vibration signals as training data and formulate corresponding bearing remaining useful life RUL labels;
[0086] Preferably, the expression of the bearing remaining useful life RUL label corresponding to the training data in step 1 is:
[0087]
[0088] wherein, is the bearing life RUL label corresponding to the t-th time, and T represents the total number of time points.
[0089] Step 2. Let t = 1, which represents the initial time when t = 1.
[0090] Step 3. After continuous wavelet transform and sliding window processing of the bearing vibration signal at time t, the time-frequency feature sequence of the bearing vibration signal at time t is obtained.
[0091] Preferably, the expression of the continuous wavelet transform in step 3 is:
[0092]
[0093] wherein, x(t) is the bearing vibration signal at time t, s is the scale of control, τ is the parameter of translation, wt(·) is the continuous wavelet transform function, ψ *is a complex conjugate of the wavelet basis, is a factor for keeping the energy of the wavelet family constant under different scale transformations.
[0094] Preferably, the expression of the time-frequency feature sequence of the bearing vibration signal at time t in step 3 is:
[0095]
[0096] wherein, denotes the t-th time-frequency image sequence, H denotes the height of the input time-frequency image, W denotes the width of the input time-frequency image, C denotes the number of channels of the input time-frequency image, and l is the time interval.
[0097] Step 4. One-dimensional time domain and frequency domain analysis is performed on the bearing vibration signal at time t to obtain a one-dimensional time domain and frequency domain feature sequence at time t.
[0098] It can be understood that the one-dimensional time domain and frequency domain feature sequence at time t in step 4 includes a one-dimensional time domain feature time sequence and a one-dimensional frequency domain feature time sequence wherein, n d is the number of one-dimensional time domain and frequency domain features, and denotes the dimension of the input features.
[0099] Step 5. A bearing residual life double-branch Transformer prediction model is established based on a gated cross-attention.
[0100] Step 6. The one-dimensional time-frequency feature sequence at time t is input into the bearing residual life double-branch Transformer prediction model A t , and dimension conversion is performed through linear mapping to obtain a deep time domain and deep frequency domain feature sequence at time t wherein, f d is the projection dimension.
[0101] The corresponding class label one is added to the deep time domain and deep frequency domain feature sequence at time t, and position encoding is introduced to obtain an updated time domain and updated frequency domain feature sequence of the bearing vibration signal at time t.
[0102] Optionally, the specific steps for obtaining the updated time domain and updated frequency domain feature sequence of the bearing vibration signal at time t in step 6 include:
[0103] A trainable class label one is added to the deep time domain and deep frequency domain feature sequence at time t to obtain a labeled deep time domain and labeled frequency domain feature sequence wherein, f d is the projection dimension.
[0104] The sinusoidal position coding is introduced into the labeled depth time domain and labeled depth frequency domain feature sequence to obtain updated time domain and updated frequency domain feature sequences of the bearing vibration signal at time t E pos The sinusoidal position coding is introduced into the labeled depth time domain and labeled depth frequency domain feature sequence to obtain updated time domain and updated frequency domain feature sequences of the bearing vibration signal at time t
[0105] The sinusoidal position coding E pos The expression is:
[0106]
[0107] wherein k=0, 1, 2,..., represents a frequency index, controls the frequency of the sine and cosine functions, different k values generate different frequency encodings, and can help capture position information at multiple levels; pos represents a position index in the sequence, d f is a projection dimension.
[0108] Step 7. Input the time-frequency feature sequence of the bearing vibration signal at time t described in step 3 into the bearing residual life double-branch Transformer prediction model A t , and obtain a deep time-frequency feature sequence of the bearing vibration signal at time t through a residual convolution GRU network wherein d v represents the mapping dimension of the final layer of the deep network.
[0109] Insert the corresponding class label into the deep time-frequency feature sequence of the bearing vibration signal at time t and obtain an updated time-frequency feature sequence of the bearing vibration signal at time t based on a multi-head self-attention mechanism
[0110] Preferably, the residual convolution network described in step 7 has three layers, including one residual convolution gate unit and two convolution gate units; wherein there is a pooling layer for down-sampling between each layer of the network.
[0111] Step 8. Based on the gated cross-attention mechanism, the updated time domain feature sequence and the updated frequency domain feature sequence X 1d at time t described in step 7 are interacted with the updated time-frequency feature sequence X 2d at time t described in step 9 to obtain common information of the bearing vibration signal at time t.
[0112] Preferably, the specific steps of obtaining the common information of the bearing vibration signal at time t described in step 8 include:
[0113] The class label one in the updated time domain feature and the updated frequency domain feature sequence at time t is taken as a query vector, which is interacted with the key and value of the updated time-frequency feature sequence at time t, and then based on the cross attention mechanism, common information p of the bearing vibration signal at time t is obtained 1d ;
[0114] The common information includes common information of the time domain feature, the frequency domain feature and the time-frequency domain feature of the bearing vibration signal at time t;
[0115] The common information expression of the bearing vibration signal at time t is:
[0116]
[0117] Wherein, head t represents the attention head at time t; Q t represents the result of the linear transformation of the query vector at time t; K t represents the key vector at time t; V t represents the value vector at time t; W i q represents the trainable matrix of the query vector, W i k represents the trainable matrix of the key vector, W i v represents the trainable matrix of the value vector, represents the class label one, represents the deep time-frequency feature sequence of the bearing vibration signal at time t, represents the common information of the bearing vibration signal at time t, W t is the trainable matrix at time t.
[0118] Step 9. The common information of the bearing vibration signal at time t is spliced with the class label one in step 6 to obtain the spliced common information one at time t;
[0119] The spliced common information one at time t is input into the auxiliary network AN, and the gating signal one at time t is output;
[0120] Based on the gating signal one at time t, the class label one in step 6 is fused with the common information of the bearing vibration signal at time t in step 8 to obtain the class label one after gating fusion;
[0121] The class label one after gating fusion is spliced with the updated time domain and frequency domain feature sequence of the bearing vibration signal at time t in step 6 to obtain the gating fusion time domain and frequency domain feature sequence at time t;
[0122] Optionally, the class label one after gating fusion is:
[0123]
[0124] wherein, represents the gating fusion label one, g is the gating signal one, p 1d is the common information of the bearing vibration signal, is the label one.
[0125] The expression of the gating signal one is:
[0126] g = σ (W2f + b2)
[0127] wherein, σ (·) is a gating function, W2 is a weight matrix, f is a mapping dimension, and b2 represents a bias matrix two.
[0128] Step 10. Splice the common information of the bearing vibration signal at time t with the label two in step 7 to obtain the spliced common information two at time t;
[0129] Input the spliced common information two at time t into the auxiliary network AN to output the gating signal two at time t;
[0130] Fuse the label two in step 7 with the common information of the bearing vibration signal at time t in step 8 based on the gating signal two at time t to obtain the gating fusion label two
[0131] Splice the gating fusion label two with the updated time-frequency feature sequence of the bearing vibration signal at time t in step 7 to obtain the gating fusion time-frequency domain feature sequence at time t;
[0132] Step 11. Based on the multi-head attention mechanism, process the gating fusion time domain and frequency domain feature sequences at time t and the gating fusion time-frequency domain feature sequence at time t respectively to obtain the label one in the time domain and frequency domain feature sequences at time t and the label two in the time-frequency domain feature sequence
[0133] Splice the label one in the time domain and frequency domain feature sequences at time t and the label two in the time-frequency domain feature sequence to obtain the composite label x at time t cls_fused Input the composite label x at time t cls_fused into the regression layer to obtain the final label at time t, which is represented as the bearing life prediction value at time t:
[0134] The expression of the final label y t at time t is:
[0135] yt = x cls_fused W r + b r
[0136] where W r is a learnable weight matrix in the regression layer, b r represents a bias term.
[0137] Step 12. Determine whether t is greater than T, T represents the total number of time points, if yes, output the bearing life prediction value at time point t, and obtain the final bearing residual life double-branch Transformer prediction model; if no, let t = t + 1, and return to step 2;
[0138] Step 13. Perform bearing residual life prediction based on the final bearing residual life double-branch Transformer prediction model.
[0139] Preferably, step 13 further comprises using mean square error (MSE) as the loss function of the bearing residual life double-branch Transformer prediction model, and the expression is:
[0140]
[0141] where T is the total number of time points, y t is the predicted value at time point t, is the bearing residual life RUL label at time point t.
[0142] The above description is only a preferred embodiment of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered within the protection scope of the present application.
Claims
1. A method for predicting the residual life of a bearing based on gated cross-attention, the method comprising: The application relates to a bearing residual life prediction method based on a dual-branch Transformer model. Step 1. Obtain a plurality of bearing vibration signals as training data and make corresponding bearing life RUL labels; Step 2. Let t=1, which represents the initial moment when t=1; Step 3. After continuous wavelet transform and sliding window processing of the bearing vibration signal at the moment t, the time-frequency feature sequence of the bearing vibration signal at the moment t is obtained; Step 4. One-dimensional time domain and frequency domain analysis is performed on the bearing vibration signal at the moment t, and the one-dimensional time domain and frequency domain feature sequence at the moment t is obtained; Step 5. A bearing residual life dual-branch Transformer prediction model is established based on a gated cross-attention mechanism; Step 6. Input the time t one-dimensional time domain and frequency domain feature sequence into the bearing residual life double-branch Transformer prediction model A t In the bearing vibration signal at time t, after dimension conversion, a class label one is added, and position encoding is introduced to obtain the updated time domain and updated frequency domain feature sequence of the bearing vibration signal at time t. Step 7. The time-frequency feature sequence of the bearing vibration signal at time t described in step 3 is input into the bearing residual life double-branch Transformer prediction model A t In the residual convolution GRU network, a class label two is added after processing to obtain the updated time-frequency feature sequence of the bearing vibration signal at time t. Step 8. Based on the gated cross-attention mechanism, the updated time domain feature sequence and the updated frequency domain feature sequence of the bearing vibration signal at the moment t are interacted with the updated time-frequency feature sequence of the bearing vibration signal at the moment t to obtain common information of the bearing vibration signal at the moment t; Step 9. After the common information of the bearing vibration signal at the moment t is fused with the class label one in step 6, the class label one after the fusion is obtained; the class label one after the fusion is spliced with the updated time domain and frequency domain feature sequence at the moment t in step 6 to obtain the time domain and frequency domain feature sequence after the fusion at the moment t; Step 10. After the common information of the bearing vibration signal at the moment t is fused with the class label two in step 7, the class label two after the fusion is obtained; the class label two after the fusion is spliced with the updated time-frequency feature sequence at the moment t in step 7 to obtain the time-frequency domain feature sequence after the fusion at the moment t; Step 11. Based on the multi-head attention mechanism, the time domain and frequency domain feature sequence after the fusion at the moment t in step 9 is spliced with the time-frequency domain feature sequence after the fusion at the moment t in step 10 to obtain the final class label at the moment t, which represents the bearing life prediction value at the moment t; Step 12. Determine whether t is greater than T, wherein T represents the total number of moments; if yes, output the bearing life prediction value at the moment t to obtain the final bearing residual life dual-branch Transformer prediction model; if not, let t=t+1 and return to step 2; Step 13. Perform bearing residual life prediction based on the final bearing residual life dual-branch Transformer prediction model.
2. The method for predicting the bearing remaining life based on the gated cross-attention according to claim 1, wherein, The specific steps of obtaining the updated time domain and updated frequency domain feature sequence of the bearing vibration signal at time t in step 6 include: inputting the one-dimensional time-frequency feature sequence at time t into the bearing residual life double-branch Transformer prediction model A t In the method, dimension conversion is performed through linear mapping to obtain the deep time domain and deep frequency domain feature sequence at time t. The corresponding class label one is added to the deep time domain and deep frequency domain feature sequence at the moment t, and position encoding is introduced to obtain the updated time domain and updated frequency domain feature sequence of the bearing vibration signal at the moment t.
3. The method for predicting the bearing remaining life based on the gated cross- attention according to claim 1, characterized in that, The specific steps for obtaining the updated time-frequency feature sequence of the bearing vibration signal at the moment t in step 7 include: Input the time-frequency feature sequence of the bearing vibration signal at time t described in step 3 into the bearing residual life double-branch Transformer prediction model A t In the residual convolution GRU network, the deep time-frequency feature sequence of the bearing vibration signal at time t is obtained. The corresponding class label two is inserted into the deep time-frequency feature sequence of the bearing vibration signal at the moment t, and the updated time-frequency feature sequence of the bearing vibration signal at the moment t is obtained based on the multi-head self-attention mechanism.
4. The method for predicting the bearing remaining life based on the gated cross- attention according to claim 1, characterized in that, The specific steps for obtaining the time domain and frequency domain feature sequence after the fusion at the moment t in step 9 include: The common information of the bearing vibration signal at the moment t is spliced with the class label one in step 6 to obtain spliced common information one at the moment t; The spliced common information one at the moment t is input into an auxiliary network AN to output a gating signal one at the moment t; Fuse the class label one in step 6 with the common information of the bearing vibration signal at time t in step 8 based on the gating signal at time t to obtain the class label one after gating fusion; Concatenate the class label one after gating fusion with the deep time domain and deep frequency domain feature sequence of the bearing vibration signal at time t in step 6 to obtain the time domain and frequency domain feature sequence after gating fusion at time t.
5. The method for predicting the remaining life of a bearing based on gated cross- attention according to claim 1, wherein, The specific steps for obtaining the time domain and frequency domain feature sequence after gating fusion at time t in step 10 include: Concatenate the common information of the bearing vibration signal at time t with the class label two in step 7 to obtain the concatenated common information two at time t; Input the concatenated common information two at time t into the auxiliary network AN to output the gating signal two at time t; Fuse the class label two in step 7 with the common information of the bearing vibration signal at time t in step 8 based on the gating signal two at time t to obtain the class label two after gating fusion; Concatenate the class label two after gating fusion with the deep time-frequency feature sequence of the bearing vibration signal at time t in step 8 to obtain the time domain and frequency domain feature sequence after gating fusion at time t.
6. The method for predicting the remaining life of the bearing based on the gating cross-attention according to claim 1, wherein the expression of the continuous wavelet transform in step 3 is:
7. The method for predicting the remaining life of the bearing based on the gating cross-attention according to claim 1, wherein the specific steps for obtaining the updated time domain and updated frequency domain feature sequence of the bearing vibration signal at time t in step 6 include: Wherein, x(t) is the bearing vibration signal at time t, s is the control scale, τ is the translation parameter, wt(·) is the continuous wavelet transform function, ψ * is the complex conjugate of the wavelet base, is the factor for keeping the energy of the wavelet family function constant under different scale transformations. Add the trainable class label one to the deep time domain and frequency domain feature sequence to obtain the labeled deep time domain and labeled deep frequency domain feature sequence; Introduce the sinusoidal position encoding into the labeled deep time domain and labeled deep frequency domain feature sequence to obtain the updated time domain and updated frequency domain feature sequence of the bearing vibration signal at time t.
8. The method for predicting the remaining life of the bearing based on the gating cross-attention according to claim 1, wherein the residual convolutional GRU network in step 7 has three layers, including one layer of residual convolutional gated unit and two layers of convolutional gated unit; wherein there is a pooling layer for down-sampling between each layer of network.
9. The method for predicting the remaining life of the bearing based on the gating cross-attention according to claim 1, wherein the specific steps for obtaining the common information of the bearing vibration signal at time t in step 8 include: Take the class label one in the updated time domain feature and updated frequency domain feature sequence at time t as the query vector, interact with the key and value of the updated time-frequency feature sequence at time t, and then obtain the common information of the bearing vibration signal at time t based on the cross-attention mechanism; The common information includes the common information of the time domain feature, frequency domain feature and time-frequency domain feature of the bearing vibration signal at time t.
10. The method for predicting the remaining life of the bearing based on the gating cross-attention according to claim 4, wherein the expression of the class label one after gating fusion is: Wherein, Represent the gating fusion class label one, g is the gating signal one, p 1d Is the common information of bearing vibration signal, Is the class label one.
Citation Information
Patent Citations
Bearing life prediction method based on attention mechanism and residual neural network
CN112747924A
Rolling bearing residual life prediction method based on attention enhancement time frequency Transformer
CN116150901A