Pyramid attention-based rolling bearing residual life prediction method and system
By constructing multiple feature sets and applying the pyramid attention mechanism and Weibull distribution loss function, combined with Kalman filtering processing, the problems of high complexity and difficulty in capturing time scale dependencies in rolling bearing life prediction are solved, and high-precision and low-complexity prediction effects are achieved.
Patent Information
- Application Number
- CN202510806050.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-17
- Publication Date
- 2025-10-10
AI Technical Summary
Existing rolling bearing remaining life prediction methods have high operational complexity when capturing long-term sequence dependencies, making it difficult to capture dependencies at different time scales. They also have high computing resource requirements and are difficult to deploy efficiently in resource-limited embedded systems.
A rolling bearing remaining life prediction method based on pyramid attention is adopted. Multiple feature sets are constructed through fast Fourier transform, wavelet transform and time domain statistical feature extraction. A prediction model is established by combining the pyramid attention mechanism. Weibull distribution loss function and Kalman filter are introduced for model convergence and noise reduction.
It significantly improves prediction accuracy, reduces computational complexity, enhances the model's generalization capability and the stability of prediction results, and reduces enterprise maintenance costs.
Smart Images

Figure CN120764078A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of bearing residual life prediction, and particularly relates to a rolling bearing residual life prediction method and system based on pyramid attention. BACKGROUND
[0002] As a key component of rotating machinery, rolling bearings are widely used in key fields such as industrial manufacturing, transportation and aerospace, and their operating conditions directly affect the safety and performance of industrial equipment. However, in actual operation, rolling bearings are often in harsh working environments of high speed, high load and high corrosion, resulting in a failure frequency of bearings far exceeding that of general rotating machinery components. Once the bearing fails, it will cause unpredictable economic losses and consequences, ranging from downtime, reduced yield to large-scale chain failures and serious safety accidents. Accurate prediction of the residual service life of rolling bearings not only enables the judgment of the failure degree of the bearing and accurate grasp of the operation of the industrial equipment, but also provides a theoretical basis for formulating industrial equipment maintenance strategies, thereby increasing the working efficiency of the equipment while ensuring safety.
[0003] The key to rolling bearing RUL prediction is to extract important features of degradation information from vibration data. Attention mechanism is an effective method for learning feature importance. Transformer, which takes self-attention mechanism as the core, is a sequence modeling architecture without any RNN and CNN modules. Although the Transformer can effectively capture the global dependence relationship of the sequence by using the self-attention mechanism, the running complexity is high, and a large amount of computing resources are required, which makes it difficult to achieve efficient deployment in resource-limited embedded systems. In addition, the model does not consider the problem of different range time correlation. Therefore, how to balance the accuracy and running complexity has become a key problem to be solved in the field of rolling bearing residual life prediction. SUMMARY
[0004] To overcome the problems in the related art, the application discloses a rolling bearing residual life prediction method and system based on pyramid attention. The application can capture long-time sequence dependence while reducing its running complexity, effectively extract bearing degradation features and capture dependence relationships of different time scales, thereby improving the life prediction accuracy.
[0005] The technical solution is as follows: a rolling bearing residual life prediction method based on pyramid attention, comprising the following steps:
[0006] S1, processing the bearing vibration signal by fast Fourier transform, wavelet transform and time domain statistical feature extraction to construct a multiple feature set;
[0007] S2, a rolling bearing remaining life prediction model is established based on pyramid attention to capture the relationship between multiple feature sets and rolling bearing life prediction;
[0008] S3, based on the established rolling bearing remaining life prediction model, introduces the Weibull distribution loss function to accelerate the convergence of the rolling bearing remaining life prediction model;
[0009] S4, based on the converged rolling bearing remaining life prediction model, introduces Kalman filtering to smooth and reduce noise on the rolling bearing remaining life prediction sequence.
[0010] In step S1, a multiple feature set is constructed, including:
[0011] The signal collected by the sensor is an S×F matrix, where S is the time step of the signal and F is the number of samples within a time step. The sensor signal is processed using fast Fourier transform, wavelet transform and time domain statistical feature extraction respectively. The extracted feature dimensions are: S×l1, S×l2, S×l3, where l1 is the number of samples within a time step of the original signal after fast Fourier transform processing, l2 is the number of samples within a time step of the original signal after wavelet transform processing, and l3 is the number of samples within a time step of the original signal after time domain statistical feature extraction processing;
[0012] The features extracted from fast Fourier transform, wavelet transform and time domain statistical features are spliced together to construct a multiple feature set. The dimension of the feature set is S×L=S×(l1+l2+l3), where L is the number of samples in one time step of the spliced feature matrix after the original signal is processed by the three feature extraction processes. For high-frequency acquired signals, L<<S to reduce the dimension of the input data and fuse information features from different angles.
[0013] In step S2, a rolling bearing remaining life prediction model is established based on pyramid attention, including:
[0014] Firstly, the multi-dimensional signals collected by the sensor are extracted through multiple features to construct a multi-feature matrix;
[0015] Secondly, set the training time window and perform time window sampling on multiple feature matrices;
[0016] After the input sequence of multiple feature extractions is superimposed with position encoding information, the feature dimension is converted to d through a linear layer. model ,Then it is input into the Pyraformer network to extract dependency information. The Pyraformer network consists of a coarse-grained construction module and multiple pyramid attention modules;
[0017] Thirdly, the RUL generation module based on pyramid features concatenates the last sequence point of each layer of the pyramid features. The last sequence point corresponds to the end node of the time window. The concatenated features are mapped through a linear layer, and the Sigmoid function is used to output the RUL prediction value. The hyperparameters in Pyraformer are adjusted, and the data set is input for training to establish a rolling bearing remaining life prediction model.
[0018] Furthermore, the position code is calculated using sine and cosine functions of different frequencies, and the calculation formula is:
[0019]
[0020] In the formula, pos is the position number in the sequence, j is the number of the feature dimension, and d model is the model dimension, and j=0,1…d model / 2; PE( ) is the position Embedding.
[0021] Furthermore, after the rolling bearing remaining life prediction model is established, the test set is preprocessed in the same way and input into the established rolling bearing remaining life prediction model to obtain the prediction result.
[0022] In step S3, the Weibull distribution loss function is introduced, including:
[0023] The Weibull distribution is introduced into the mean square error (MSE) to construct the Weibull MSE loss function to improve the prediction accuracy of the rolling bearing remaining life prediction model. The calculation formula of the Weibull MSE loss function is:
[0024]
[0025] Where λ is a hyperparameter that represents the relative weight of the probability loss value; t' is the actual running time of the component, Predicting runtime for components, is the Weibull MSE loss function, n is the number of samples in the data set, F(t' i ) is the true failure ratio at time i, is the estimated failure proportion at time i.
[0026] In step S4, a Kalman filter is introduced to smooth and reduce noise on the rolling bearing remaining life prediction sequence, including:
[0027] The RUL prediction value satisfies the discrete linear dynamic system, and the formulas are as follows:
[0028]
[0029] Where, is the true RUL value, r t To predict the RUL value, u t is the external control quantity at time t, ω t is the process noise at time t, v t is the measurement noise at time t, a, b, h are the state transfer coefficient, control coefficient and state observation coefficient respectively; is the true RUL prediction value at time t-1.
[0030] Furthermore, Kalman filtering obtains the optimal prediction value of RUL and saves the prior estimated covariance coefficient p t and the Kalman filter coefficient k t Perform prediction and update to obtain the optimal RUL prediction value.
[0031] Furthermore, in the update phase, the prior estimated covariance coefficient p t and the Kalman filter coefficient k t The calculation formula is as follows:
[0032]
[0033] Where q is the error caused by the linear system assumption, τ is the measurement covariance, and p t-1 is the prior covariance coefficient at time t-1, where t is the time;
[0034] The optimal RUL prediction value r' is calculated by the error of model training t for:
[0035] r′ t =r′ t-1 +k t (r t -r′ t-1 )
[0036] Where r' t-1 is the optimal RUL prediction value at time t-1;
[0037] Repeat the two steps of prediction and update to predict the RUL sequence R'={r1,r2…r t} is used for denoising to obtain the final optimal RUL prediction value.
[0038] Another object of the present invention is to provide a rolling bearing remaining life prediction system based on pyramid attention, which implements the rolling bearing remaining life prediction method based on pyramid attention, and the system includes:
[0039] Multiple feature extraction module, used to process bearing vibration signals through fast Fourier transform, wavelet transform and time domain statistical feature extraction to construct multiple feature sets;
[0040] Rolling bearing life prediction model building module, which is used to build a rolling bearing remaining life prediction model based on pyramid attention and capture the relationship between multiple feature sets and rolling bearing life prediction;
[0041] A Weibull distribution loss function introduction module is used to introduce the Weibull distribution loss function based on the established rolling bearing remaining life prediction model to accelerate the convergence of the rolling bearing remaining life prediction model;
[0042] The Kalman filter introduction module is used to smooth and reduce the noise of the rolling bearing remaining life prediction sequence based on the converged rolling bearing remaining life prediction model.
[0043] Combining all the above technical solutions, the beneficial effects of the present invention are as follows: the present invention proposes a method for predicting the remaining life of rolling bearings based on pyramid attention, which solves the problem that existing bearing remaining life prediction methods have high operational complexity when capturing long-term sequence dependencies and are difficult to capture dependencies within different time scales. The present invention has higher prediction accuracy: pyramid attention transmits information through a small number of intra-layer and inter-layer connections, only connecting adjacent nodes within a layer, and connecting layers through C-trees of upper and lower layers. In this way, not only can the long-term dependencies of the sequence be captured, but also the dependencies between different ranges and large ranges can be captured, significantly improving prediction accuracy; the present invention has lower computational complexity: pyramid attention reduces the computational complexity to O(L) by reducing the number of connections; the present invention has stronger generalization ability: the introduction of Weibull distribution loss function and Kalman filtering can effectively improve the generalization ability of the model and the stability of the prediction results. The present invention drives the development of the intelligent operation and maintenance industry chain for rolling bearings, and can reduce enterprise maintenance costs through accurate prediction of equipment life. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure;
[0045] Figure 1 This is a flow chart of a method for predicting the remaining life of a rolling bearing based on pyramid attention provided by an embodiment of the present invention;
[0046] Figure 2 This is a diagram of the multiple feature extraction architecture of the present invention;
[0047] Figure 3 It is a coarse-grained construction module diagram of the present invention;
[0048] Figure 4A comparison diagram of the self-attention and pyramid attention mechanisms of the present invention, where (a) is the self-attention mechanism and (b) is the pyramid attention mechanism.
[0049] Figure 5 This is a graph of the rolling bearing remaining life prediction model based on pyramid attention proposed by the present invention;
[0050] Figure 6 This is a diagram showing the Kalman filter prediction results of the bearing 1_6 test set under working condition 1 in the PHM2012 data set of the present invention;
[0051] Figure 7 This is a diagram showing the Kalman filter prediction results of the bearing 1_7 test set under working condition 1 in the PHM2012 data set of the present invention;
[0052] Figure 8 This is a diagram showing the Kalman filter prediction results of the bearing 2_4 test set under working condition 2 in the PHM2012 data set of the present invention;
[0053] Figure 9 This is a diagram showing the Kalman filter prediction results of the bearing 2_5 test set under working condition 2 in the PHM2012 data set of the present invention;
[0054] Figure 10 This is the Kalman filter prediction result diagram of the bearing 1_1 test set under the XJTU-SY data set of the present invention;
[0055] Figure 11 This is the Kalman filter prediction result diagram of the bearing 2_2 test set under the XJTU-SY dataset of the present invention. DETAILED DESCRIPTION
[0056] To make the above-mentioned objects, features, and advantages of the present invention more readily apparent, specific embodiments of the present invention are described in detail below with reference to the accompanying drawings. The following description sets forth numerous specific details to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways than those described herein, and those skilled in the art may make similar modifications without departing from the scope of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0057] In response to the problem that traditional rolling bearing remaining service life prediction methods have difficulty capturing time correlations in different ranges and reducing operational complexity when processing high-dimensional condition monitoring data, a rolling bearing remaining service life prediction method based on pyramid attention is proposed. The innovation of the present invention lies in: first, the original vibration signal of the bearing is processed using time-frequency feature extraction technology to construct multiple feature sets; then, a bearing remaining service life prediction model is established based on the pyramid attention mechanism to capture the complex relationship between multiple feature sets and rolling bearing life prediction; then, a life prediction module based on pyramid features is proposed, the Weibull distribution loss function is introduced to accelerate the convergence of the model, and the Kalman filter is used to smooth and reduce the noise of the life prediction curve; finally, a comparative experiment is conducted with other life prediction models on the PHM2012 dataset. The results show that the prediction accuracy of the proposed method is reduced by 23% and 30% in MAE and RMSE respectively compared with the traditional Transformer life prediction method, verifying that the method can effectively improve the prediction accuracy and has certain practicality.
[0058] In Example 1, the method for predicting the remaining life of a rolling bearing based on pyramid attention provided by an embodiment of the present invention proposes a multiple feature extraction method to construct a multiple feature set, which is more obvious than a single time domain feature or time-frequency domain feature, can reduce the dimension of the model input data, better characterize the bearing operating status, and improve the model prediction effect;
[0059] A rolling bearing life prediction model based on pyramid attention is proposed. Compared with the traditional self-attention mechanism, this method not only captures the long-term dependencies of bearing condition monitoring data, but also captures dependencies between different time scales, significantly improving prediction performance and fitting effects. In addition, through sparse scale connections, computational costs can be significantly reduced.
[0060] During the training phase, a Weibull distribution loss function is introduced to replace the mean square error loss function to accelerate model convergence and improve prediction accuracy. During the prediction phase, a Kalman filter is introduced to filter and smooth the RUL prediction sequence, improving the stability of the prediction results and making the prediction curve closer to the actual bearing degradation curve.
[0061] Specifically, such as Figure 1 As shown, the method for predicting the remaining life of a rolling bearing based on pyramid attention provided by an embodiment of the present invention includes:
[0062] S1, processes the bearing vibration signal through fast Fourier transform, wavelet transform and time domain statistical feature extraction to construct multiple feature sets;
[0063] S2, a rolling bearing remaining life prediction model is established based on pyramid attention to capture the relationship between multiple feature sets and rolling bearing life prediction;
[0064] S3, based on the established rolling bearing remaining life prediction model, introduces the Weibull distribution loss function to accelerate the convergence of the rolling bearing remaining life prediction model;
[0065] S4, based on the converged rolling bearing remaining life prediction model, introduces Kalman filtering to smooth and reduce noise on the rolling bearing remaining life prediction sequence.
[0066] For example, in step S1, Figure 2 This is the architecture diagram of the multiple feature extraction of the present invention. Constructing multiple feature sets (multiple feature extraction) specifically includes:
[0067] S101, fast Fourier transform.
[0068] Fast Fourier transform is a method for extracting frequency domain features of waveform signals. This paper extracts the spectral energy of the signal through the sub-band method. First, each time step of the vibration data x is fast Fourier transformed. Then, the frequency f is evenly divided into p sub-bands. The characteristics of each sub-band are calculated using formula (1):
[0069]
[0070] Where, E T,i is the i-th feature extracted at the T-th time step, x T (f) is the Fourier transform spectrum component of the Tth time step.
[0071] S102, wavelet transform.
[0072] When rolling bearings begin to degrade, the measured vibration signal exhibits non-stationary characteristics. In the process of mining degradation patterns, local impact components often have higher value. Wavelet transform is used to reconstruct each degradation signal and extract local features. The transformed signal is obtained by formula (2):
[0073]
[0074] Where a is the scaling factor, b is the translation factor, and W f (a, b) are wavelet components, x(T) is the original vibration signal, is the basis wavelet function, t=1,2…T is the time.
[0075] By setting the number of transformation levels, wavelet components W of different frequency scales can be obtained. f (a, b). After obtaining the wavelet components, the signal S is reconstructed based on the wavelet components. a,b , take the characteristics of the reconstructed signal. As shown in formula (3):
[0076]
[0077] Where, Reconstruct the signal S for the Tth time step a,b The energy feature of the i-th frequency band is extracted, and q is the number of frequency bands.
[0078] S103, time domain statistical feature extraction.
[0079] Statistical feature extraction is the use of statistical methods to extract statistics that can reflect the characteristics of the vibration signal from the vibration signal. This invention selects the mean, variance and root mean square value of the vibration signal as the time domain statistical features. The calculation formula is as follows:
[0080]
[0081]
[0082] For the signal collected by the sensor, it is assumed to be an S×F matrix, where S is the time step of the signal and F is the number of samples within a time step. The sensor signal is processed using fast Fourier transform, wavelet transform and time domain statistical feature extraction respectively. The extracted feature dimensions are: S×l1, S×l2, S×l3, where l1 is the number of samples within a time step of the original signal after fast Fourier transform processing, l2 is the number of samples within a time step of the original signal after wavelet transform processing, and l3 is the number of samples within a time step of the original signal after time domain statistical feature extraction processing;
[0083] The features extracted from the three are spliced to construct a multiple feature set. The present invention innovatively proposes that the dimension of the feature set is S×L=S×(l1+l2+l3), where L is the number of samples in one time step of the spliced feature matrix after the original signal is processed by the three feature extraction processes; for high-frequency collected signals, L<<S. This method not only effectively reduces the dimension of the input data, but also integrates information features from different angles.
[0084] It can be understood that the present invention proposes for the first time to apply the pyramid attention module to the remaining life prediction of rolling bearings, and constructs a bearing RUL prediction module based on the generated pyramid attention feature map: the last sequence point of each layer of the pyramid feature is spliced together, the last sequence point corresponds to the end node of the time window, the spliced features are mapped through a linear layer, and the Sigmoid function is used to output the RUL prediction value; although three feature extraction methods have been proposed in the prior art, in the field of bearing life prediction, it has not been considered to use different feature extraction methods to extract the degradation features of bearings in parallel. The present invention proposes a multiple feature extraction method to construct multiple feature sets through feature fusion.
[0085] Exemplarily, in step S2, establishing a rolling bearing remaining life prediction model based on pyramid attention includes:
[0086] S201, coarse-grained construction module, such as Figure 3 It is a coarse-grained construction module diagram of the present invention;
[0087] Pyraformer is a time series model based on Transformer. It draws on the concept of pyramid feature extraction in computer graphics and establishes multi-resolution granularity layers through the coarse-grained construction module (CSCM), realizing the representation of different time scale information between layers.
[0088] The workflow of CSCM is as follows: First, the dimension of the input sequence is reduced from D to D K , and then pass through multiple one-dimensional convolutions with a stride of C. After each layer of convolution, the length of the sequence is reduced by C times, but the maximum connection distance between each time step is expanded by C times. Finally, the output of each convolution layer is concatenated with the original sequence, and the feature dimension is restored to D through a linear layer.
[0089] S202, pyramid attention mechanism.
[0090] The core of Transformer is the multi-head self-attention mechanism, which is used to describe different expressions of potential patterns. Assume that X and Y are the input matrix and output matrix of a single attention structure, X is transformed by three linear transformations Q = XW Q ,K=XW K ,K=XW K Converted into three different matrices, corresponding to Q, K, V respectively; where L is the sequence length, d K is the characteristic dimension of the sequence, and Y is obtained by formula (7):
[0091]
[0092] Considering each vector in the Q and K matrices as a node, the above formula shows that the self-attention mechanism requires L nodes to perform dot product operations with each other, so the computational complexity is O(L 2), if some of the connections are discarded, it will inevitably cause the blockage of information transmission between sequences. Pyraformer introduces the Pyramidal Attention Module (PAM) to replace the self-attention mechanism, uses CSCM to represent information of different time scales, and transmits information through a small number of intra-layer connections and inter-layer connections. In this way, not only the long-term dependencies of the sequence can be captured, but also the dependencies between different ranges and large ranges can be captured. Only adjacent nodes are connected within the layer, and the layers are connected through the C-tree of the upper and lower layers. By reducing the number of connections, the time complexity of the calculation is reduced to O(L), while the propagation length of its sequence information is still maintained at O(1). Among them, Figure 4 A comparison diagram of the self-attention and pyramid attention mechanisms of the present invention, where (a) is the self-attention mechanism and (b) is the pyramid attention mechanism.
[0093] S203, network structure.
[0094] The present invention proposes a rolling bearing remaining life prediction model based on pyramid attention. Figure 5 Figure 1 shows the proposed pyramid attention-based rolling bearing remaining life prediction model. First, multiple feature matrices are constructed from the multidimensional signals collected by the sensor through multiple feature extraction. Second, a time window is set for model training, and the feature matrix is sampled within that time window. Due to the lack of position information, sine and cosine functions of different frequencies are used to calculate the position encoding, as shown in formula (8).
[0095]
[0096] In the formula, pos is the position number in the sequence, j is the number of the feature dimension, and d model is the model dimension, and j=0,1…d model / 2; PE() is position embedding.
[0097] After the input sequence of feature extraction is superimposed with position encoding information, it first passes through a linear layer to convert the feature dimension into d model , and then input into the Pyraformer network to extract dependency information. The Pyraformer network consists of a coarse-grained construction module and multiple pyramid attention modules, which can better adapt to long sequence input.
[0098] To produce accurate RUL predictions, the present invention proposes a RUL generation module based on pyramid features. This module concatenates the last sequence point of each pyramid feature layer, corresponding to the terminal node of the time window. The concatenated features are mapped through a linear layer, and the RUL prediction is output using a sigmoid function. Hyperparameters in the Pyraformer are adjusted, and a training dataset is input to establish a rolling bearing remaining life prediction model. The test set undergoes the same preprocessing and is then fed into the established model to obtain prediction results.
[0099] Exemplarily, in step S3, introducing the Weibull distribution loss function includes:
[0100] The Weibull distribution is commonly used to represent the probability distribution of a component failure and is widely used in various reliability engineering applications. There are multiple instances of the Weibull distribution in fault prediction and health management systems. The cumulative probability distribution function can be obtained using formula (9):
[0101]
[0102] Where η is the typical life of the component and β is the shape parameter of the component.
[0103] By giving β,η can be obtained by formula (10),
[0104]
[0105] Where N is the total number of components, d is the number of damaged components, and t is the actual operating time of the component.
[0106] The commonly used loss function in RUL prediction is the mean squared error (MSE) loss function. Although it is widely used in regression tasks, MSE cannot reflect the loss differences of the predicted values of components in different periods. Therefore, the Weibull distribution is introduced into MSE to construct the Weibull MSE loss function, which effectively improves the prediction accuracy of the rolling bearing remaining life prediction model, as shown in formula (11):
[0107]
[0108] Where λ is a hyperparameter that represents the relative weight of the probability loss value; t' is the actual running time of the component, Predicting runtime for components, is the Weibull MSE loss function, n is the number of samples in the data set, F(t′ i ) is the true failure ratio at time i, is the estimated failure proportion at time i.
[0109] Exemplarily, in step S4, introducing Kalman filtering to smooth and reduce noise on the rolling bearing remaining life prediction sequence includes:
[0110] When predicting the RUL value at time t, the time window sampling at time t is performed to obtain the feature matrix X t , input the matrix into the model, and calculate the RUL value r at time t t However, this method only samples the input signal at one moment, losing a lot of pre-information. At the same time, due to the fluctuations in signal acquisition itself and the errors caused by model training, the prediction results will have certain noise and fluctuations.
[0111] Another prediction method is to slide the time window from the starting position and repeatedly calculate the RUL prediction value to obtain the RUL prediction sequence R'={r1,r2…r t}, using a sliding average method to process the RUL prediction sequence and output the final filtered RUL value. However, this method only smooths the output, lacks noise immunity, and cannot reflect errors caused by model training. Therefore, a Kalman filter is introduced to filter and smooth the RUL prediction sequence.
[0112] Kalman filtering is currently the most widely used noise reduction filtering method and has been well applied in many fields. Assume that the RUL prediction value satisfies the discrete linear dynamic system, as shown in formula (12) and formula (13):
[0113]
[0114] Where, is the true RUL value, r t To predict the RUL value, u t is the external control quantity at time t, ω t is the process noise at time t, v t is the measurement noise at time t, a, b, h are the state transfer coefficient, control coefficient and state observation coefficient respectively; is the true RUL prediction value at time t-1.
[0115] The Kalman filter obtains the optimal prediction value of RUL based on the above assumptions, and the algorithm only needs to save a small number of parameters to complete the operation. The Kalman filter is divided into two steps: prediction and update. In the update phase, the algorithm only needs to maintain and update two coefficients, namely the prior estimated covariance coefficient p t and the Kalman filter coefficient k t , the calculation method is shown in formula (14) and formula (15):
[0116]
[0117] Where q is the error caused by the linear system assumption, τ is the measurement covariance, and p t-1 is the prior covariance coefficient at time t-1, where t is the time;
[0118] By calculating the error of model training, the present invention innovatively proposes that the optimal RUL prediction value r' t Obtained by formula (16):
[0119] r′ t =r′ t-1 +k t (r t -r′ t-1 ) (16)
[0120] Where r' t-1 is the optimal RUL prediction value at time t-1;
[0121] In practical applications, the two steps of prediction and update are repeated to denoise the sequence R' and obtain the final optimal RUL prediction value.
[0122] In embodiment 2, the rolling bearing remaining life prediction system based on pyramid attention provided by the embodiment of the present invention includes:
[0123] Multiple feature extraction module, used to process bearing vibration signals through fast Fourier transform, wavelet transform and time domain statistical feature extraction to construct multiple feature sets;
[0124] Rolling bearing life prediction model building module, which is used to build a rolling bearing remaining life prediction model based on pyramid attention and capture the relationship between multiple feature sets and rolling bearing life prediction;
[0125] A Weibull distribution loss function introduction module is used to introduce the Weibull distribution loss function based on the established rolling bearing remaining life prediction model to accelerate the convergence of the rolling bearing remaining life prediction model;
[0126] The Kalman filter introduction module is used to introduce the Kalman filter to smooth and reduce noise on the rolling bearing remaining life prediction sequence based on the converged rolling bearing remaining life prediction model.
[0127] Example 3, as another embodiment of the present invention, the method for predicting the remaining life of a rolling bearing based on pyramid attention provided in the embodiment of the present invention implements the steps described in Example 1, but the difference is that other types of attention mechanisms (such as sparse attention) can be used instead of pyramid attention;
[0128] Or use other types of loss functions (such as RMSE loss function) instead of Weibull distribution loss function, or use other filtering methods (such as sliding average method) instead of Kalman filtering.
[0129] To further illustrate the effects of the embodiments of the present invention, the following experiments were conducted.
[0130] 1. PHM 2012 dataset experiments,
[0131] Experimental comparative analysis was conducted on the PHM2012 dataset. Given that sufficient data is required for training, full lifecycle data from Conditions 1 and 2 were selected from the dataset and allocated to the training and test sets as shown in Table 1.
[0132] Table 1 PHM2012 dataset division
[0133]
[0134] like Figure 6-Figure 9 As shown in the figure, degradation features are extracted for each discrete vibration signal collected at each time step. The fast Fourier transform module uses five subband components as features. The wavelet transform feature module uses db4 as the base wavelet and performs a fourth-order wavelet transform on the signal, extracting five frequency band energy values from each reconstructed signal as features. Time-domain statistical feature extraction uses the mean, variance, and root mean square value of the vibration signal as features. Ultimately, the features for each time step are reduced to 177 dimensions. After feature extraction, the input features are normalized. The RUL (Relative Uncertainty) label is normalized using an estimated lifetime of 30,000 seconds, limiting the RUL value range to [0, 1].
[0135] The RUL prediction neural network was built using PyTorch and trained and tested on the Nvidia TeslaT4 GPU platform. In terms of parameter setting, after a lot of parameter adjustment and testing, the sampling window size was finally selected as 64, the time window interval was 1, and the coarse-grained construction module used 3 one-dimensional convolution layers with a stride of 4 for feature extraction. modelThe number of layers was set to 256. Based on the number of model parameters and sample size, a range was determined empirically. Using search and cross-validation, the Pyramid Attention model was selected to have 4 layers, 3 intra-layer connections, 2 inter-layer connections, and 4 attention heads. During training, the Adam optimizer was used, with dropout set to 0.1 and a batch size of 64. All models employed a dynamic learning rate. Initially, a higher learning rate was selected for training. As the number of iterations increased, the learning rate was adjusted using cosine decay, resulting in a final learning rate of 0.0001. The number of layers and network widths of the Transformer and Pyramid Attention models remained consistent. Furthermore, to maintain consistency in the number of Attention connections, the temporal sampling window in the Pyramid was set to 200, resulting in 1172 effective Attention connections. The temporal sampling window in the Transformer was set to 36, resulting in 1296 effective Attention connections.
[0136] The mean absolute error (MAE) and root mean square error (RMSE) are used as prediction evaluation indicators to characterize the accuracy of the prediction results, as shown in formula (17) and formula (18):
[0137]
[0138] Where y i For the real RUL, To predict RUL.
[0139] On the basis of verifying the effectiveness of the proposed method, comparative experiments were conducted. The comparative methods include the pyramid attention model using the WeibullMSE loss function, the pyramid attention model using the MSE loss function, Transformer, LSTM, GRU and Seq2Seq. The performance evaluation index results of each method on the training set and test set are shown in Table 2. The best performance is shown in bold.
[0140] Table 2 Performance comparison of each model on the PHM2012 dataset
[0141]
[0142] Table 2 shows that the rolling bearing life prediction method based on pyramid attention achieves superior performance. This is because the proposed method not only captures the long-term dependencies of the sequence but also considers the temporal dependencies between different ranges. The pyramid attention model using the WeibullMSE loss function outperforms the traditional MSE loss function. This is because the life data of rolling bearing degradation follows a Weibull distribution, and the traditional MSE function cannot reflect the variability in the predicted values of components at different time periods. For the test set, the pyramid attention model achieved RMSE reductions of 30%, 90%, 89%, and 80%, respectively, and MAE reductions of 23%, 90%, 88%, and 80%, respectively, compared to the Transformer, LSTM, GRU, and Seq2Seq models. The reductions in both RMSE and MAE demonstrate that the proposed method exhibits low error and excellent prediction performance, validating its effectiveness in bearing life prediction.
[0143] 2. Experiments on the XJTU-SY dataset.
[0144] In order to further verify the effectiveness of the proposed method in different data sets, the present invention continues to select the XJTU-SY data set for experiments. Since most of the sequence lengths in this data set are short, in order to eliminate the interference of multiple faults, a single outer ring fault with a large number of data groups under working conditions 1 and 2 is selected for training and testing. This fault contains a total of 6 groups of data, 4 groups are divided into training sets, and 2 groups are divided into test sets. The same six methods are used for comparative analysis, including the pyramid attention model using the WeibullMSE loss function, the pyramid attention model using the MSE loss function, LSTM, GRU, Seq2Seq, and Transformer Encoder. The results are shown in Table 3, and the best performance is in bold. Among them, Figure 10 This is the Kalman filter prediction result diagram of the bearing 1_1 test set under the XJTU-SY data set of the present invention; Figure 11 This is the Kalman filter prediction result diagram of the bearing 2_2 test set under the XJTU-SY data set of the present invention;
[0145] Table 3 Performance comparison of each model on the XJTU-SY dataset
[0146]
[0147] As can be seen from Table 3, the method proposed in this paper has different degrees of improvement in various indicators compared with other methods, indicating that the pyramid attention using the WeibullMSE loss function can still maintain good prediction accuracy on other datasets.
[0148] The above description is only a preferred specific implementation method of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications, equivalent substitutions and improvements made by any technician familiar with this technical field within the technical scope disclosed by the present invention and within the spirit and principles of the present invention should be covered by the scope of protection of the present invention.
Claims
1. A method for predicting the remaining life of a rolling bearing based on pyramid attention, characterized in that: The method comprises the following steps: S1, processes the bearing vibration signal through fast Fourier transform, wavelet transform and time domain statistical feature extraction to construct multiple feature sets; S2, a rolling bearing remaining life prediction model is established based on pyramid attention to capture the relationship between multiple feature sets and rolling bearing life prediction; S3, based on the established rolling bearing remaining life prediction model, introduces the Weibull distribution loss function to accelerate the convergence of the rolling bearing remaining life prediction model; S4, based on the converged rolling bearing remaining life prediction model, introduces Kalman filtering to smooth and reduce noise on the rolling bearing remaining life prediction sequence.
2. The method for predicting the remaining life of a rolling bearing based on pyramid attention according to claim 1, wherein: In step S1, a multiple feature set is constructed, including: The signal collected by the sensor is an S×F matrix, where S is the time step of the signal and F is the number of samples within a time step. The sensor signal is processed using fast Fourier transform, wavelet transform and time domain statistical feature extraction respectively. The extracted feature dimensions are: S×l1, S×l2, S×l3, where l1 is the number of samples within a time step of the original signal after fast Fourier transform processing, l2 is the number of samples within a time step of the original signal after wavelet transform processing, and l3 is the number of samples within a time step of the original signal after time domain statistical feature extraction processing; The features extracted from fast Fourier transform, wavelet transform and time domain statistical features are spliced together to construct a multiple feature set. The dimension of the feature set is S×L=S×(l1+l2+l3), where L is the number of samples in one time step of the spliced feature matrix after the original signal is processed by the three feature extraction processes. For high-frequency acquired signals, L<<S to reduce the dimension of the input data and fuse information features from different angles.
3. The method for predicting the remaining life of a rolling bearing based on pyramid attention according to claim 1, wherein: In step S2, a rolling bearing remaining life prediction model is established based on pyramid attention, including: Firstly, the multi-dimensional signals collected by the sensor are extracted through multiple features to construct a multi-feature matrix; Secondly, set the time window for training and perform time window sampling on the multiple feature matrices; after the input sequence of multiple feature extraction is superimposed with the position encoding information, the feature dimension is converted into d through the linear layer. model ,Then it is input into the Pyraformer network to extract dependency information. The Pyraformer network consists of a coarse-grained construction module and multiple pyramid attention modules; Thirdly, the RUL generation module based on pyramid features concatenates the last sequence point of each layer of the pyramid features. The last sequence point corresponds to the end node of the time window. The concatenated features are mapped through a linear layer, and the Sigmoid function is used to output the RUL prediction value. The hyperparameters in Pyraformer are adjusted, and the data set is input for training to establish a rolling bearing remaining life prediction model.
4. The method for predicting the remaining life of a rolling bearing based on pyramid attention according to claim 3, wherein: The position code is calculated using sine and cosine functions of different frequencies. The calculation formula is: In the formula, pos is the position number in the sequence, j is the number of the feature dimension, and d model is the model dimension, and j=0,1…d model / 2; PE() is position embedding.
5. The method for predicting the remaining life of a rolling bearing based on pyramid attention according to claim 3, wherein: After the rolling bearing remaining life prediction model is established, the test set is preprocessed in the same way and input into the established rolling bearing remaining life prediction model to obtain the prediction results.
6. The method for predicting the remaining life of a rolling bearing based on pyramid attention according to claim 1, characterized in that: In step S3, the Weibull distribution loss function is introduced, including: The Weibull distribution is introduced into the mean square error (MSE) to construct the Weibull MSE loss function to improve the prediction accuracy of the rolling bearing remaining life prediction model. The calculation formula of the Weibull MSE loss function is: Where λ is a hyperparameter that represents the relative weight of the probability loss value; t ' is the actual running time of the component, Predicting runtime for components, is the Weibull MSE loss function, n is the number of samples in the data set, F(t′ i ) is the true failure ratio at time i, is the estimated failure proportion at time i.
7. The method for predicting the remaining life of a rolling bearing based on pyramid attention according to claim 1, characterized in that: In step S4, a Kalman filter is introduced to smooth and reduce noise on the rolling bearing remaining life prediction sequence, including: The RUL prediction value satisfies the discrete linear dynamic system, and the formulas are as follows: Where, is the true RUL value, r t To predict the RUL value, u t is the external control quantity at time t, ω t is the process noise at time t, v t is the measurement noise at time t, a, b, h are the state transfer coefficient, control coefficient and state observation coefficient respectively; is the true RUL prediction value at time t-1.
8. The method for predicting the remaining life of a rolling bearing based on pyramid attention according to claim 7, characterized in that: Kalman filtering obtains the optimal prediction value of RUL and saves the prior estimated covariance coefficient p t and the Kalman filter coefficient k t Perform prediction and update to obtain the optimal RUL prediction value.
9. The method for predicting the remaining life of a rolling bearing based on pyramid attention according to claim 8, characterized in that: In the updating phase, the prior estimate of the covariance coefficient p t and the Kalman filter coefficient k t The calculation formula is as follows: Where q is the error caused by the linear system assumption, τ is the measurement covariance, and p t-1 is the prior covariance coefficient at time t-1, where t is the time; The optimal RUL prediction value r is calculated by the error of model training. ' t for: r′ t =r t-1 +k t (r t -r′ t-1 ) Where r' t-1 is the optimal RUL prediction value at time t-1; Repeat the two steps of prediction and update to predict the RUL sequence R'={r1,r2…r t } is used for denoising to obtain the final optimal RUL prediction value.
10. A rolling bearing remaining life prediction system based on pyramid attention, characterized in that: The system implements the method for predicting the remaining life of a rolling bearing based on pyramid attention according to any one of claims 1 to 9, and the system comprises: Multiple feature extraction module, used to process bearing vibration signals through fast Fourier transform, wavelet transform and time domain statistical feature extraction to construct multiple feature sets; Rolling bearing life prediction model building module, which is used to build a rolling bearing remaining life prediction model based on pyramid attention and capture the relationship between multiple feature sets and rolling bearing life prediction; A Weibull distribution loss function introduction module is used to introduce the Weibull distribution loss function based on the established rolling bearing remaining life prediction model to accelerate the convergence of the rolling bearing remaining life prediction model; The Kalman filter introduction module is used to introduce the Kalman filter to smooth and reduce noise on the rolling bearing remaining life prediction sequence based on the converged rolling bearing remaining life prediction model.
Citation Information
Cited By
High-speed train support capacitor residual life prediction method, equipment, medium and product
CN120951813A