Method for predicting residual life of bearing based on gated cross attention
By introducing a dual-branch Transformer method of gated cross attention in the prediction of the remaining life of bearings, the adaptive dynamic fusion of time domain, frequency domain and time frequency domain characteristics is realized, the problem of insufficient information fusion in the existing technology is solved, and the prediction accuracy is significantly improved.
Patent Information
- Application Number
- CN202510020218.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-07
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2045-01-07
AI Technical Summary
When using multi-domain features to predict the remaining life of bearings, the prior art fails to effectively and dynamically fuse information from different domains, resulting in insufficient prediction accuracy.
The dual-branch Transformer method based on gated cross attention is adopted, and the proportion of information fusion between different branches is flexibly controlled through the gated mechanism to achieve adaptive dynamic fusion. This method processes the time domain, frequency domain and time frequency domain features separately, and communicates and fusions information through the gated cross attention mechanism.
Through the adaptive dynamic fusion mechanism, the complementarity of various domain characteristics is fully utilized, and the accuracy and reliability of bearing residual life prediction is significantly improved, avoiding the problems of information redundancy and neglect of key information.
Smart Images

Figure CN120030506A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of bearing remaining life prediction, and in particular to a method for predicting the remaining life of a bearing based on gated cross attention. Background Art
[0002] As the requirements for bearing life prediction accuracy of industrial equipment continue to increase, traditional remaining useful life (RUL) prediction methods are facing new challenges. Multi-domain features in bearing vibration signals are crucial to 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 meet the above challenges, the present invention introduces a new method based on dual-branch Transformer with gated cross-attention (DTGCA), which aims 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 the time domain and frequency domain, and the other branch uses the residual-convolutional gated recurrent unit (res-ConvGRU) to process two-dimensional time-frequency image features. Through the gated cross-attention mechanism (GCA), this method can adaptively fuse the information of the two branches, thereby enhancing the feature discrimination ability and providing a clearer representation of the bearing degradation state, thereby obtaining accurate RUL prediction results.
[0003] Among the existing similar technologies, in terms of network structure, there are indeed methods that use dual-branch Transformers to fuse multi-domain information. These methods usually take the time domain, frequency domain, and time-frequency domain as input. However, these methods fail to achieve dynamic fusion during the fusion process and fail to flexibly combine the information contained in different domains. In terms of dynamic information fusion, some methods use technologies such as naive cross attention and full attention fusion. Although these methods achieve dynamic fusion, they all directly fuse information and do not fully consider the complementarity between information in different domains. This, to a certain extent, limits the further improvement of the remaining useful life (RUL) prediction accuracy.
[0004] There are three main technical shortcomings in the existing similar methods. These shortcomings are concentrated in the information fusion process, which fails to give full play to the advantages of different domain features and affects the accuracy of RUL prediction:
[0005] 1. Simple cross-attention fusion: This method uses the class label of one branch to perform cross-self-attention calculation with another branch. Although it can capture the information interaction between different branches to a certain extent, it fails to dynamically fuse according to the importance of different features. This leads to the neglect of some key information, limits the accurate identification of the bearing degradation state, and ultimately affects the accuracy of RUL prediction.
[0006] 2. Full attention fusion: In this method, the labels of different domain features are directly spliced together for processing, without fully considering the complementarity between these features. This "one-size-fits-all" processing method easily leads to information confusion 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 features based on one-dimensional time series or two-dimensional images for prediction. Although it can process information in a certain domain separately, it fails to effectively utilize the complementarity of multi-domain information. When only using information from a single domain, important information provided by other domains may be missed, resulting in insufficient comprehensiveness and accuracy of the prediction results. Summary of the invention
[0008] In view of the above problems, the present invention provides a method for predicting the remaining life of bearings based on gated cross attention. The present invention introduces a gated cross attention (GCA) mechanism, and flexibly controls the proportion of information fusion between different branches through the gating mechanism to achieve adaptive dynamic fusion. GCA not only avoids the problem of possible neglect of key information, but also can accurately control the contribution ratio of each domain feature in the fusion process. The present invention ensures that the complementarity of each domain feature is fully utilized, effectively avoiding the problem of reduced prediction accuracy caused by information mixing, thereby significantly improving the accuracy and reliability of RUL prediction; in the dual-branch structure of the present invention, the gating mechanism enables information from one-dimensional time domain, frequency domain features and two-dimensional time and frequency domain features to be distributed according to importance during the fusion process. This avoids the limitation that single domain information processing may miss key information of other domains, and ensures the comprehensiveness and accuracy of the final prediction results.
[0009] The present invention provides a method for predicting the remaining life of a bearing based on gated cross attention, comprising:
[0010] Step 1. Obtain multiple bearing vibration signals as training data and formulate corresponding bearing remaining life RUL labels;
[0011] Preferably, the expression of the bearing remaining life RUL label corresponding to the training data in step 1 is:
[0012]
[0013] in, is the bearing life RUL label corresponding to the tth moment, and T represents the total number of moments.
[0014] Step 2. Let t = 1. When t = 1, it indicates the initial moment;
[0015] Step 3. After performing continuous wavelet transform and sliding window processing on the bearing vibration signal at time t, the time-frequency characteristic 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] Where 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 basis, is a factor used to keep the energy of the wavelet family function constant under different scale transformations.
[0019] Preferably, the expression of the time-frequency characteristic sequence of the bearing vibration signal at time t in step 3 is:
[0020]
[0021] in, Represents the tth 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. Perform one-dimensional time domain and frequency domain analysis 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 sequences at time t in step 4 include a one-dimensional time domain feature time sequence and a one-dimensional frequency domain feature time sequence. Among them, d n is the number of one-dimensional time domain and frequency domain features, indicating the dimension of the input features;
[0024] Step 5. Establish a dual-branch Transformer prediction model for the remaining life of the bearing based on gated cross attention;
[0025] Step 6. Input the one-dimensional time-frequency feature sequence at time t into the bearing remaining life dual-branch Transformer prediction model A t In the process, the dimension is transformed by linear mapping to obtain the deep time domain and deep frequency domain feature sequences at time t Among them, d fis the projection dimension;
[0026] At time t, the corresponding class mark is added to the deep time domain and deep frequency domain feature sequences. And introduce position coding to obtain the updated time domain and updated frequency domain feature sequences of the bearing vibration signal at time t;
[0027] Optionally, the specific steps of obtaining the updated time domain and updated frequency domain feature sequences of the bearing vibration signal at time t in step 6 include:
[0028] Adding trainable class labels to deep temporal and frequency domain feature time series Get the labeled deep time domain and labeled frequency domain feature sequences Among them, d f is the projection dimension;
[0029] Sinusoidal position coding is introduced into the marked depth time domain and marked depth frequency domain feature sequences to obtain the updated time domain and updated frequency domain feature sequences of the bearing vibration signal at time t. E pos is a sinusoidal position encoding;
[0030] Wherein, the sinusoidal position code E pos The expression is:
[0031]
[0032] Among them, k = 0, 1, 2... represents the frequency index, which controls the frequency of the sine and cosine functions. Different k values generate codes with different frequencies, which can help 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 the bearing vibration signal at time t described in step 3 into the bearing remaining life dual-branch Transformer prediction model A t In the example, after the residual convolution GRU network, the deep time-frequency feature sequence of the bearing vibration signal at time t is obtained. Among them, d v Represents the mapping dimension of the final layer of the deep network;
[0034] At time t, the deep time-frequency feature sequence of the bearing vibration signal is inserted into the corresponding class marker 2 Based on the multi-head self-attention mechanism, the updated time-frequency feature sequence of the bearing vibration signal at time t is obtained
[0035] Preferably, the residual convolutional network described in step 7 has three layers, including a layer of residual convolutional gating units and two layers of convolutional gating units; wherein, there is a pooling layer for downsampling between each layer of the network.
[0036] Step 8. Based on the gated cross attention mechanism, update the time domain features and the frequency domain feature sequence X at time t described in step 7 1d The updated time-frequency feature sequence X at time t described in step 9 2d Interact to obtain the 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] The updated time domain features at time t and the class label one in the updated frequency domain feature sequence are used as the query vector, which interacts with the key and value of the updated time-frequency feature sequence at time t, and then the common information of the bearing vibration signal at time t is obtained based on the cross attention mechanism;
[0039] The shared information includes the shared information of the time domain characteristics, frequency domain characteristics and time-frequency domain characteristics of the bearing vibration signal at time t;
[0040] The common information expression of the bearing vibration signal at time t is:
[0041]
[0042] Among them, head t represents the attention head at time t; Q t represents the result of linear transformation of the query vector at time t; K t represents the key vector at time t; V t represents the time t value vector; W i q A trainable matrix representing the query vector, A trainable matrix representing the key vector, A trainable matrix representing a vector of values, represents class tag 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. Combine the common information of the bearing vibration signal at time t with the class mark described in step 6. Perform splicing to obtain the common information after splicing at time t;
[0044] Input the common information after splicing at time t into the auxiliary network AN, and output the gating signal at time t;
[0045] Based on the gated 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 gated fused class label one;
[0046] The gated fused class label 1 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 fused time domain and frequency domain feature sequences at time t;
[0047] Optionally, the class label after the gated fusion is:
[0048]
[0049] in, represents the class label after gated fusion, g is the gated signal, and p 1d is the common information of the bearing vibration signal, Label the class one.
[0050] The expression of the gate signal 1 is:
[0051] g=σ(W 2 f+b 2 )
[0052] Among them, σ(·) is the gating function, W 2 is the weight matrix, f is the mapping dimension, b 2 Represents bias matrix two.
[0053] Step 10. Concatenate the common information of the bearing vibration signal at time t with the class mark 2 described in step 7 to obtain the concatenated common information 2 at time t;
[0054] Input the common 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 2 at time t, the class label 2 in step 7 and the common information of the bearing vibration signal at time t in step 8 are fused to obtain the class label 2 after gated fusion.
[0056] The class label after gated fusion is splicing with the updated time-frequency feature sequence of the bearing vibration signal at time t in step 7 to obtain a gated fusion time-frequency domain feature sequence at time t;
[0057] Step 11. Based on the multi-head attention mechanism, the gated fusion time domain and frequency domain feature sequence at time t and the gated fusion time and frequency domain feature sequence at time t are processed respectively to obtain the class label in the time domain and frequency domain feature sequence at time t. And time-frequency domain feature sequence class labeling 2
[0058] Mark the class in the time domain and frequency domain feature sequence at time t And time-frequency domain feature sequence class labeling 2 Splice and get the composite mark x at time t cls_fused , compositely mark the time t as x cls_fused Input the regression layer to obtain the final class label at time t, which is represented as the predicted value of bearing life at time t:
[0059] The final class label y at the time t t The expression is:
[0060] y t =x cls_fused W r +b r
[0061] Among them, W r is the learnable weight matrix in the regression layer, b r Represents the bias term.
[0062] Step 11. Based on the multi-head attention mechanism, the gated fusion time domain and frequency domain feature sequence at time t in step 9 and the gated fusion time and frequency domain feature sequence at time t in step 10 are concatenated by class labels to obtain the final class label at time t, which is represented as the bearing life prediction value at time t;
[0063] Step 12. Determine whether t is greater than T, where T represents the total number of moments. If so, output the bearing life prediction value at moment t to obtain the final bearing remaining life dual-branch Transformer prediction model; if not, set t = t + 1 and return to step 2;
[0064] Step 13. Predict the remaining life of the bearing based on the final bearing remaining life dual-branch Transformer prediction model.
[0065] Preferably, step 14 further includes using mean square error (MSE) as the loss function of the bearing remaining life dual-branch Transformer prediction model, expressed as:
[0066]
[0067] Among them, T is the total number of moments, y t is the predicted value at time t, is the remaining life RUL label of the bearing at time t.
[0068] The present invention provides an efficient remaining life prediction method, which can accurately capture the degradation trend of bearings and realize accurate prediction of the remaining life of bearings through the fusion and regression analysis of multi-domain information.
[0069] Compared with the prior art, the present invention has at least the following beneficial effects:
[0070] (1) Adaptive information fusion based on GCA: The present invention realizes 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 ratio fusion method, the GCA mechanism not only eliminates information redundancy, but also flexibly adjusts the fusion ratio of each branch feature through the gating mechanism, ensuring 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 invention adopts a dual-branch network structure to process one-dimensional time domain and frequency domain features and two-dimensional time and frequency domain features respectively. This structure can fully capture the complex feature changes in the bearing degradation process. Compared with the single-branch processing method, it greatly enhances the model's ability to accurately identify the bearing status;
[0072] (3) The res-ConvGRU network in the present invention retains the relative relationship between sequences when processing two-dimensional time-frequency domain features, avoiding 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 THE DRAWINGS
[0073] The drawings are only for the purpose of illustrating particular embodiments and are not to be construed as limiting the invention.
[0074] Figure 1 Schematic diagram of the network structure of the residual convolution gating unit in an embodiment of the present invention;
[0075] Figure 2 A schematic diagram of a network unit structure of multi-head self-attention in an embodiment of the present invention;
[0076] Figure 3 A schematic diagram of a deep feature extraction network structure for one-dimensional time domain and frequency domain features in an embodiment of the present invention;
[0077] Figure 4 A schematic diagram of a deep feature extraction network structure for two-dimensional time-frequency domain features in an embodiment of the present invention;
[0078] Figure 5Schematic diagram of a gated cross-attention network structure in an embodiment of the present invention;
[0079] Figure 6 (a)-(c) are schematic diagrams of multi-domain analysis results of vibration signals according to an embodiment of the present invention;
[0080] Figure 7 (a)-(g) are schematic diagrams of the prediction results of the remaining useful life obtained in the embodiments of the present invention. DETAILED DESCRIPTION
[0081] In order to more clearly understand the above-mentioned purpose, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other. In addition, the present invention can also be implemented in other ways different from those described herein, and therefore, the protection scope of the present invention is not limited by the specific embodiments disclosed below.
[0082] A specific embodiment of the present invention, as Figure 1-7 , discloses a method for predicting the remaining life of bearings based on gated cross-attention.
[0083] In order to illustrate the effectiveness of the method proposed in the present invention, the above technical solution of the present invention is described in detail below through a specific embodiment, and the specific implementation steps are as follows:
[0084] The present invention provides a method for predicting the remaining life of a bearing based on gated cross attention, comprising:
[0085] Step 1. Obtain multiple bearing vibration signals as training data and formulate corresponding bearing remaining life RUL labels;
[0086] Preferably, the expression of the bearing remaining life RUL label corresponding to the training data in step 1 is:
[0087]
[0088] in, is the bearing life RUL label corresponding to the tth moment, and T represents the total number of moments.
[0089] Step 2. Let t = 1. When t = 1, it indicates the initial moment;
[0090] Step 3. After performing continuous wavelet transform and sliding window processing on the bearing vibration signal at time t, the time-frequency characteristic 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] Where 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 basis, is a factor used to keep the energy of the wavelet family function constant under different scale transformations.
[0094] Preferably, the expression of the time-frequency characteristic sequence of the bearing vibration signal at time t in step 3 is:
[0095]
[0096] in, Represents the tth 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.
[0097] Step 4. Perform one-dimensional time domain and frequency domain analysis 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 sequences at time t in step 4 include a one-dimensional time domain feature time sequence and a one-dimensional frequency domain feature time sequence. Among them, d n is the number of one-dimensional time domain and frequency domain features, indicating the dimension of the input features;
[0099] Step 5. Establish a dual-branch Transformer prediction model for the remaining life of the bearing based on gated cross attention;
[0100] Step 6. Input the one-dimensional time-frequency feature sequence at time t into the bearing remaining life dual-branch Transformer prediction model A t In the process, the dimension is transformed by linear mapping to obtain the deep time domain and deep frequency domain feature sequences at time t Among them, d f is the projection dimension;
[0101] At time t, the corresponding class mark is added to the deep time domain and deep frequency domain feature sequences. And introduce position coding to obtain the updated time domain and updated frequency domain feature sequences of the bearing vibration signal at time t;
[0102] Optionally, the specific steps of obtaining the updated time domain and updated frequency domain feature sequences of the bearing vibration signal at time t in step 6 include:
[0103] Adding trainable class labels to deep temporal and frequency domain feature time series Get the labeled deep time domain and labeled frequency domain feature sequences Among them, d f is the projection dimension;
[0104] Sinusoidal position coding is introduced into the marked depth time domain and marked depth frequency domain feature sequences to obtain the updated time domain and updated frequency domain feature sequences of the bearing vibration signal at time t. E pos is a sinusoidal position encoding;
[0105] Wherein, the sinusoidal position code E pos The expression is:
[0106]
[0107] Among them, k = 0, 1, 2... represents the frequency index, which controls the frequency of the sine and cosine functions. Different k values generate codes with different frequencies, which can help capture multiple levels of position information; pos represents the position index in the sequence, d f is the 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 remaining life dual-branch Transformer prediction model A t In the example, after the residual convolution GRU network, the deep time-frequency feature sequence of the bearing vibration signal at time t is obtained. Among them, d v Represents the mapping dimension of the final layer of the deep network;
[0109] At time t, the deep time-frequency feature sequence of the bearing vibration signal is inserted into the corresponding class marker 2 Based on the multi-head self-attention mechanism, the updated time-frequency feature sequence of the bearing vibration signal at time t is obtained
[0110] Preferably, the residual convolutional network described in step 7 has three layers, including a layer of residual convolutional gating units and two layers of convolutional gating units; wherein, there is a pooling layer for downsampling between each layer of the network.
[0111] Step 8. Based on the gated cross attention mechanism, update the time domain features and the frequency domain feature sequence X at time t described in step 7 1d The updated time-frequency feature sequence X at time t described in step 9 2d Interact to obtain the 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 in step 8 include:
[0113] The updated time domain features at time t and the class label in the updated frequency domain feature sequence are used as the query vector, which interacts with the key and value of the updated time-frequency feature sequence at time t, and then based on the cross attention mechanism, the common information p of the bearing vibration signal at time t is obtained. 1d ;
[0114] The shared information includes the shared information of the time domain characteristics, frequency domain characteristics and time-frequency domain characteristics of the bearing vibration signal at time t;
[0115] The common information expression of the bearing vibration signal at time t is:
[0116]
[0117] Among them, head t represents the attention head at time t; Q t represents the result of linear transformation of the query vector at time t; K t represents the key vector at time t; V t represents the time t value vector; W i q A trainable matrix representing the query vector, W i k A trainable matrix representing the key vector, W i v A trainable matrix representing a vector of values, represents class tag 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. Combine the common information of the bearing vibration signal at time t with the class mark described in step 6. Perform splicing to obtain the common information after splicing at time t;
[0119] Input the common information after splicing at time t into the auxiliary network AN, and output the gating signal at time t;
[0120] Based on the gated 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 gated fused class label one;
[0121] The gated fused class label 1 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 fused time domain and frequency domain feature sequences at time t;
[0122] Optionally, the class label after the gated fusion is:
[0123]
[0124] in, represents the class label after gated fusion, g is the gated signal, and p 1d is the common information of the bearing vibration signal, Label the class one.
[0125] The expression of the gate signal 1 is:
[0126] g=σ(W 2 f+b 2 )
[0127] Where σ(·) is the gating function, W 2 is the weight matrix, f is the mapping dimension, b 2 Represents bias matrix two.
[0128] Step 10. Concatenate the common information of the bearing vibration signal at time t with the class mark 2 described in step 7 to obtain the concatenated common information 2 at time t;
[0129] Input the common information 2 after splicing at time t into the auxiliary network AN, and output the gating signal 2 at time t;
[0130] Based on the gated signal 2 at time t, the class label 2 in step 7 and the common information of the bearing vibration signal at time t in step 8 are fused to obtain the class label 2 after gated fusion.
[0131] The class label after gated fusion is splicing with the updated time-frequency feature sequence of the bearing vibration signal at time t in step 7 to obtain a gated fusion time-frequency domain feature sequence at time t;
[0132] Step 11. Based on the multi-head attention mechanism, the gated fusion time domain and frequency domain feature sequence at time t and the gated fusion time and frequency domain feature sequence at time t are processed respectively to obtain the class label in the time domain and frequency domain feature sequence at time t. And time-frequency domain feature sequence class labeling 2
[0133] Mark the class in the time domain and frequency domain feature sequence at time t And time-frequency domain feature sequence class labeling 2 Splice and get the composite mark x at time t cls_fused , compositely mark the time t as x cls_fused Input the regression layer to obtain the final class label at time t, which is represented as the predicted value of bearing life at time t:
[0134] The final class label y at the time t t The expression is:
[0135] y t =x cls_fused W r +b r
[0136] Among them, W r is the learnable weight matrix in the regression layer, b r Represents the bias term.
[0137] Step 12. Determine whether t is greater than T, where T represents the total number of moments. If so, output the bearing life prediction value at moment t to obtain the final bearing remaining life dual-branch Transformer prediction model; if not, set t = t + 1 and return to step 2;
[0138] Step 13. Predict the remaining life of the bearing based on the final bearing remaining life dual-branch Transformer prediction model.
[0139] Preferably, step 13 further includes using mean square error (MSE) as the loss function of the bearing remaining life dual-branch Transformer prediction model, expressed as:
[0140]
[0141] Among them, T is the total number of moments, y t is the predicted value at time t, is the remaining life RUL label of the bearing at time t.
[0142] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.
Claims
1. A method for predicting the remaining life of a bearing based on gated cross attention, characterized in that: include: Step 1. Obtain multiple bearing vibration signals as training data and formulate corresponding bearing life RUL labels; Step 2. Let t = 1. When t = 1, it indicates the initial moment; Step 3. After performing continuous wavelet transform and sliding window processing on the bearing vibration signal at time t, the time-frequency characteristic sequence of the bearing vibration signal at time t is obtained; Step 4. Perform one-dimensional time domain and frequency domain analysis on the bearing vibration signal at time t to obtain a one-dimensional time domain and frequency domain feature sequence at time t; Step 5. Establish a dual-branch Transformer prediction model for the remaining life of the bearing based on gated cross attention; Step 6. Input the one-dimensional time domain and frequency domain feature sequences at time t into the bearing remaining life dual-branch Transformer prediction model A t In , after dimension conversion, the class marker 1 is added, and the position encoding is introduced to obtain the updated time domain and updated frequency domain feature sequences of the bearing vibration signal at time t; Step 7. Input the time-frequency feature sequence of the bearing vibration signal at time t described in step 3 into the bearing remaining life dual-branch Transformer prediction model A t In the figure, after being processed by the residual convolutional GRU network, the class label 2 is added 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 features and the updated frequency domain feature sequence at time t in step 7 are interacted with the updated time-frequency feature sequence at time t in step 7 to obtain the common information of the bearing vibration signal at time t; Step 9. Perform gated fusion processing on the common information of the bearing vibration signal at time t and the class label one described in step 6 to obtain the gated fused class label one; splice the gated fused class label one with the updated time domain and updated frequency domain feature sequences at time t described in step 6 to obtain the gated fused time domain and frequency domain feature sequences at time t; Step 10. Perform gated fusion processing on the common information of the bearing vibration signal at time t and the class label 2 described in step 7 to obtain the gated fused class label 2; splice the gated fused class label 2 with the updated time-frequency feature sequence at time t described in step 7 to obtain the gated fused time-frequency domain feature sequence at time t; Step 11. Based on the multi-head attention mechanism, the gated fusion time domain and frequency domain feature sequence at time t in step 9 and the gated fusion time and frequency domain feature sequence at time t in step 10 are concatenated by class labels to obtain the final class label at time t, which is represented as the bearing life prediction value at time t; Step 12. Determine whether t is greater than T, where T represents the total number of moments. If so, output the bearing life prediction value at moment t to obtain the final bearing remaining life dual-branch Transformer prediction model; if not, set t=t+1 and return to step 2. Step 13. Predict the remaining life of the bearing based on the final bearing remaining life dual-branch Transformer prediction model.
2. The method for predicting the remaining life of a bearing based on gated cross attention according to claim 1 is characterized in that: The specific steps of obtaining the updated time domain and updated frequency domain feature sequences 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 remaining life dual-branch Transformer prediction model A t In the process, the dimension is transformed by linear mapping to obtain the deep time domain and deep frequency domain feature sequences at time t; The corresponding class marker 1 is added to the deep time domain and deep frequency domain feature sequences at time t, and position encoding is introduced to obtain the updated time domain and updated frequency domain feature sequences of the bearing vibration signal at time t.
3. The method for predicting the remaining life of a bearing based on gated cross attention according to claim 1, characterized in that: The specific steps of obtaining the updated time-frequency characteristic sequence of the bearing vibration signal at time t in step 7 include: The time-frequency feature sequence of the bearing vibration signal at time t described in step 3 is input into the bearing remaining life dual-branch Transformer prediction model A t In the figure, after 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 2 is inserted into the deep time-frequency feature sequence of the bearing vibration signal at time t, and based on the multi-head self-attention mechanism, the updated time-frequency feature sequence of the bearing vibration signal at time t is obtained.
4. The method for predicting the remaining life of a bearing based on gated cross attention according to claim 1, characterized in that: Step 9: The specific steps of obtaining the gated fusion time domain and frequency domain feature sequence at time t include: The common information of the bearing vibration signal at time t is concatenated with the class mark one described in step 6 to obtain the concatenated common information one at time t; Input the common information after splicing at time t into the auxiliary network AN, and output the gating signal at time t; Based on the gated 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 gated fused class label one; The gated fused class label one is concatenated with the deep time domain and deep frequency domain feature sequences at time t described in step 6 to obtain the gated fused time domain and frequency domain feature sequences at time t.
5. The method for predicting the remaining life of a bearing based on gated cross attention according to claim 1, characterized in that: The specific steps of obtaining the gated fusion time-frequency domain feature sequence at time t in step 10 include: The common information of the bearing vibration signal at time t is spliced with the class mark 2 described in step 7 to obtain the common information 2 after splicing at time t; Input the common information 2 after splicing at time t into the auxiliary network AN, and output the gating signal 2 at time t; Based on the gated signal 2 at time t, the class label 2 in step 7 is fused with the common information of the bearing vibration signal at time t in step 8 to obtain the class label 2 after gated fusion; The gated fused class label 2 is concatenated with the deep time-frequency feature sequence of the bearing vibration signal at time t described in step 8 to obtain the gated fused time-frequency domain feature sequence at time t.
6. The method for predicting the remaining life of a bearing based on gated cross attention according to claim 1, characterized in that: The expression of the continuous wavelet transform in step 3 is: Where 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 basis, is a factor used to keep the energy of the wavelet family function constant under different scale transformations.
7. The method for predicting the remaining life of a bearing based on gated cross attention according to claim 1, characterized in that: The specific steps of obtaining the updated time domain and updated frequency domain feature sequences of the bearing vibration signal at time t in step 6 include: Add a trainable class label 1 to the deep time domain and frequency domain feature time series to obtain a labeled deep time domain and a labeled frequency domain feature sequence; Sinusoidal position coding is introduced into the marked depth time domain and marked depth frequency domain feature sequences to obtain the updated time domain and updated frequency domain feature sequences of the bearing vibration signal at time t.
8. The method for predicting the remaining life of a bearing based on gated cross attention according to claim 1, characterized in that: The residual convolutional network described in step 7 has three layers, including a layer of residual convolutional gated units and two layers of convolutional gated units; wherein, there is a pooling layer for downsampling between each layer of the network.
9. The method for predicting the remaining life of a bearing based on gated cross attention according to claim 1, characterized in that: The specific steps of obtaining the common information of the bearing vibration signal at time t in step 8 include: The updated time domain features at time t and the class label one in the updated frequency domain feature sequence are used as the query vector, which interacts with the key and value of the updated time-frequency feature sequence at time t, and then the common information of the bearing vibration signal at time t is obtained based on the cross attention mechanism; The shared information includes the shared information of the time domain characteristics, frequency domain characteristics and time-frequency domain characteristics of the bearing vibration signal at time t.
10. The method for predicting the remaining life of a bearing based on gated cross attention according to claim 4, characterized in that: The expression of the class label one after the gated fusion is: in, represents the class label after gated fusion, g is the gated signal, and p 1d is the common information of the bearing vibration signal, Label the class 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
Rolling bearing remaining service life prediction method based on double-graph attention and GRU
CN117664575A
Bearing residual life prediction method based on probability sparse attention
CN118010350A
Method for predicting remaining useful life of bearings based on a gated recurrent neural network
US20220253697A1