Bearing anti-noise fault diagnosis method based on multi-cascade cross-dimension dynamic interaction Transformer
By using a multi-level, cross-dimensional, dynamic interactive Transformer model, combined with the ScConv module and the dynamic quaternion dual-path Transformer module, the problem of low recognition rate in traditional bearing fault diagnosis under strong noise environment is solved, and accurate fault identification and diagnosis accuracy are improved under strong noise conditions.
Patent Information
- Application Number
- CN202510987992.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-17
- Publication Date
- 2025-10-31
AI Technical Summary
Traditional bearing fault diagnosis methods suffer from low recognition rate, poor versatility, and insufficient diagnostic accuracy in high-noise environments, making it difficult to effectively extract deep features from complex fault modes.
A multi-level, cross-dimensional, dynamic interactive Transformer model is adopted, combining the ScConv module and the dynamic quaternion dual-path Transformer module. Through multi-scale cascaded convolution and cross-attention mechanism, the local and global features of bearing faults are captured, noise interference is suppressed, and the fault identification capability of the model under strong noise conditions is enhanced.
It enables accurate identification of bearing faults in high-noise environments, improves the versatility and accuracy of the fault diagnosis model, and can better cope with fault diagnosis under complex noise conditions.
Smart Images

Figure CN120873806A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of bearing fault diagnosis technology, and in particular to a bearing noise reduction fault diagnosis method based on a multi-cascaded cross-dimensional dynamic interactive Transformer. Background Technology
[0002] In today's highly industrialized and modernized society, bearings, as an indispensable part of rotating machinery, directly affect the operation of the entire mechanical system and are of great significance to the safe operation of equipment. From ground transportation vehicles to aerospace equipment, from industrial manufacturing workshops to automated production lines, bearings always play a vital role. If the health condition of bearings is not assessed and diagnosed in a timely and effective manner, it can lead not only to equipment damage but also to serious safety accidents, causing huge economic losses and social impacts. Therefore, conducting efficient and reliable bearing fault diagnosis can effectively reduce economic losses caused by equipment damage and effectively prevent safety accidents, providing an important guarantee for industrial production safety.
[0003] Traditional fault diagnosis methods are mainly divided into two categories: signal processing methods and machine learning methods. In the field of signal processing, these methods possess good fault identification capabilities, but their effectiveness generally relies on high-quality signal input and struggles to handle complex fault modes, exhibiting significant limitations in real-world industrial scenarios. On one hand, noise interference in the production environment can mask key fault features, leading to decreased diagnostic accuracy. On the other hand, when faced with coupled multiple faults, traditional signal processing methods struggle to effectively separate interrelated fault features, significantly reducing diagnostic performance. In the field of machine learning, these methods extract features to build classification or regression models for fault identification, but they fail to fully mine the deep feature information within fault data, significantly impacting diagnostic performance.
[0004] To address these challenges, deep learning methods have emerged. Deep learning can spontaneously extract features from raw data, effectively filtering out fault characteristics from complex fault modes. A single-structure deep learning model can effectively combine raw signals and exhibits good performance in handling general bearing faults. However, in actual industrial production, a significant amount of noise exists during bearing operation, and this model cannot achieve good noise immunity, especially in high-noise environments where accurate fault diagnosis is difficult. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a bearing noise-resistant fault diagnosis method based on a multi-cascaded cross-dimensional dynamic interactive Transformer. This method aims to solve the problems of low bearing identification rate in high-noise environments, poor versatility of traditional bearing fault diagnosis methods, and low diagnostic accuracy of bearing faults. The goal is to achieve more accurate bearing fault diagnosis results, realize the advantage of the model in accurately identifying bearing faults under high-noise conditions, and ultimately improve the versatility and accuracy of the bearing fault diagnosis model.
[0006] To achieve the above technical objectives, the present invention provides the following technical solution: A bearing noise reduction fault diagnosis method based on a multi-cascaded cross-dimensional dynamic interactive Transformer includes the following steps:
[0007] S1. Use sensors to collect bearing operation signals and collect the original vibration signals of the bearing at different positions;
[0008] S2. Perform data preprocessing on the collected raw bearing vibration signals, and divide the collected data into training set, validation set, and test set;
[0009] S3. Extract and transform the features of the original vibration signal of the bearing, and convert the data type into quaternions to obtain the bearing fault quaternion features;
[0010] S4. Construct a noise-resistant bearing fault diagnosis model consisting of a multi-level, cross-dimensional interactive ScConv module and a dynamic quaternion dual-path Transformer module.
[0011] S5. Train the overall model based on the training set and validation set, and adjust the parameter configuration and structure of each module until the optimal model is obtained.
[0012] S6. Input the test set into the optimal diagnostic model, verify the model's effectiveness, obtain the fault classification results, and evaluate its fault diagnosis performance.
[0013] Furthermore, step S1 specifically includes:
[0014] Multiple measuring points were selected on the bearing surface, and vibration sensors were installed and fixed to ensure normal signal transmission. The original vibration signals of the bearing at different locations were collected by the vibration sensors at the measuring points, including data of the inner ring, outer ring, and rolling elements under four motor power conditions of 0, 1, 2, and 3 horsepower.
[0015] Furthermore, step S3 specifically includes:
[0016] S31. Perform signal sampling using a sliding window, extracting 1024 sampling points from the original bearing vibration signal as a sample unit X∈R. 1024×1 ;
[0017] S32. For each sample unit, 128 large convolutional kernels of size 7 and stride 2 are used to capture broadband features. Then, nonlinearity is introduced through the ReLU activation function to obtain the primary feature F1. The formula is expressed as:
[0018] F1 = ReLU(X*W1 + b1);
[0019] Where W1 = R 7×1×128 That is, 128 convolutional kernels of size 7; b1∈R 128 For bias terms;
[0020] S33. Using max pooling to compress the primary feature size, the dominant peak of the bearing fault signal in the sliding window is preserved, and the low-amplitude feature disturbance caused by noise is weakened, resulting in the pooled feature F2; the formula is expressed as:
[0021] F2=MaxPooling(F1,pool size=2);
[0022] Where MaxPooling() represents max pooling, and pool size is the pooling kernel size;
[0023] The pooling features are refined using a one-dimensional convolution of length 3 to ensure channel consistency, and the output bearing fault local features F3 = ReLU(F2*W2+b2)∈R are 256×128. 256×128 ;
[0024] Where W2 is a one-dimensional convolution and b2 is a bias term;
[0025] S34. Quaternion modeling transformation: The local features of the 128-channel bearing fault are divided into four parts: real part r, imaginary parts i, j, k, and each part is 32-dimensional; thus, a quaternion q is defined, expressed by the formula:
[0026] q = r + a1i + a2j + a3k;
[0027] Among them, a1, a2, and a3 are the three corresponding components of the imaginary part;
[0028] Then, by performing a linear mapping on the quaternion, we obtain the mapping for each part as follows:
[0029] r′=rW r -iW i -jW j -kW k ;
[0030] i′=rW i +iW r +jW k -kW j ;
[0031] j′=rW j -iW k +jW r +kW i ;
[0032] k′=rW k +iW j -jW i +kW r ;
[0033] Among them, W r W i W j W k It is the weight matrix of each part of the quaternion;
[0034] S35, Final Output Bearing Fault Quaternion Characteristics F q =[r',i',j',k']∈R 256×128 .
[0035] Furthermore, step S4 specifically includes:
[0036] S41. Determine the basic parameters, including learning rate, batch size, and number of iterations;
[0037] S42. Construct a multi-scale cascaded cross-dimensional interactive convolutional kernel, which adopts three parallel convolutional paths. Each path consists of multiple sets of cascaded structures, and each set of structures is combined with horizontal convolution, vertical convolution and square convolution of different sizes.
[0038] S43. Based on multi-scale cascaded cross-dimensional interactive convolution kernels, construct a multi-cascaded cross-dimensional interactive ScConv module, and use the bearing fault quaternion features obtained in step S3 as input to capture features of different frequencies.
[0039] S44. Construct a dynamic quaternion dual-path Transformer module, using the output of the multi-cascaded cross-dimensional interactive ScConv module as input, to focus on key fault characteristics in a noisy environment.
[0040] Furthermore, step S43 specifically includes:
[0041] S431, the multi-cascaded cross-dimensional interaction ScConv module adopts a three-branch convolutional path cascaded structure, and uses a cross-attention mechanism in each cascaded structure; the input feature of each cascaded structure is F. in =F q ∈R H×W×C Where H represents the time step (i.e., feature map height), W represents the channel width (i.e., feature map width), C represents the number of channels, and F represents the feature map height. qQuaternion characteristics of bearing failure;
[0042] S432, the first cascaded structure is designed for modeling high-frequency, short-duration sudden fault signals. It employs a 1×3 horizontal convolution to model the sliding pattern within a small window on the time axis, a 3×1 vertical convolution to focus on modeling local perturbations in the spatial dimension of the feature map, and a 3×3 square convolution to detect local structural abrupt changes in the feature map. The formula is expressed as:
[0043]
[0044]
[0045] Among them, F 1×3 F 3×1 F 3×3 The output features of 1×3 horizontal convolution, 3×1 vertical convolution, and 3×3 square convolution are respectively; W 1×3 1×3 horizontal convolution kernel, W 3×1 3×1 vertical convolution kernel, W 3×3 The kernel is a 3×3 square convolution kernel; α and β are the kernel index variables, representing the position of the kernel element in the convolution operation; h, w, and c are the feature map height, width, and channel index, respectively;
[0046] After obtaining the output features of each convolution, a guided cross-attention mechanism is applied to F... 3×3 As the foundation for guiding the main path, specifically the query in the cross-attention mechanism, one-dimensional convolution maps high-dimensional features to a low-dimensional space, while concatenating F... 1×3 F 3×1 As auxiliary information, it generates the key and value in the cross-attention mechanism; the formula is expressed as:
[0047] Q1 = Conv(F 3×3 )∈R H×W×m ;
[0048] F a =[F 1×3 ,F 3×1 ]∈R H×W×2C ;
[0049] k1=Conv(F a )∈R H×W×m ;
[0050] V1 = Conv(F a )∈R H×W×C ;
[0051] Where m is the guiding cross-attention dimension, F a For F 1×3 F3×1 The fusion features are: Q1, K1, and V1, which are the query, key, and value guiding the cross-attention mechanism in the first cascade structure, respectively; Conv(.) is a one-dimensional convolution operation.
[0052] Q1 and K1 are then reshaped into two-dimensional tensors, the attention weight A1 is calculated, and it is then weighted and fused with V1 to reshape the original size. Finally, a 3×3 convolution is used for local guided enhancement, resulting in the output features of the first cascaded structure; the formula is expressed as:
[0053]
[0054] F x =Conv 3×3 (F n );
[0055] Where softmax(.) represents the softmax activation function, Conv 3×3 (.) represents a 3×3 convolution; F n To reshape the features to the desired size, F x The output features of the first cascaded structure; d represents the feature dimension at each position;
[0056] S433. The second cascaded structure is used to extract mid-frequency feature information. Its internal structure is similar to the first cascaded structure, but it uses a 1×5 horizontal convolution to extract local features along the time series direction, a 5×1 vertical convolution to extract amplitude fluctuations in different directional channels, and a 5×5 square convolution to comprehensively perceive local and directional joint changes, respectively, to obtain the output feature F. 1×5 F 5×1 F 5×5 ;
[0057] Meanwhile, the second cascade structure uses a standard cross-attention mechanism, that is, through F respectively 1×5 F 5×1 F 5×5 Calculate the Query, Key, and Value in the standard cross-attention mechanism; the formula is expressed as:
[0058] Q2 = BN Q (F 1×5 )∈R H×W×d ;
[0059] K2=BN K (F 5×1 )∈R H×W×d ;
[0060] V2 = BN v (F 5×5 )∈R H×W×d ;
[0061] Among them, BN Q BN K BN v All are batch normalized; Q2, K2, and V2 are the query, key, and value of the standard cross-attention in the second cascade structure, respectively;
[0062] The attention weights A2 are calculated using Q2 and K2, and the output features F of the second cascaded structure are finally obtained. y The formula is expressed as:
[0063]
[0064] F y =A2·V2;
[0065] S434, the third cascaded structure, is used for multi-directional sensing and modeling of long-period, high-amplitude oscillation characteristics in bearing signals. Its internal structure is similar to the first cascaded structure, but it uses 1×7 horizontal convolution, 7×1 vertical convolution, and 7×7 square convolution, respectively. The features output by each convolution are denoted as F. 1×7 F 7×1 F 7×7 ;
[0066] Then first F 1×7 F 7×1 The splicing features F are obtained by splicing. b Then, a low-rank decomposition cross-attention mechanism is used to decompose F. 7×7 As the main path information is used for query calculation, the concatenated feature F is used. b As auxiliary information, the keys and values are calculated, dynamically filtered and weighted through a low-rank decomposition cross-attention mechanism, and then channel-based dimensionality reduction projection is performed. The formula is expressed as:
[0067] F b =[F 1×7 ,F 7×1 ]∈R H×W×2C ;
[0068]
[0069] Finally, the attention weight A3 is calculated using Q3 and K3, and the output feature F of the third cascade structure is obtained. z The formula is expressed as:
[0070]
[0071] F z =A3·V3;
[0072] S435. A multi-scale gating selection mechanism is used to weight and fuse the output features of each branch cascade structure to obtain multi-scale fused features. Then, based on spatial attention mechanism, channel attention mechanism and integral-differential interaction layer, redundancy suppression is performed on the multi-scale fused features to finally obtain the output features Y of the multi-cascade cross-dimensional interactive ScConv module. ScConv .
[0073] More specifically, the multi-scale gating selection mechanism in step S435 is as follows:
[0074] Global average pooling is performed on the output features of the three-branch cascade structure to obtain a compressed representation g of the output features. p The formula is expressed as:
[0075] g p =GAP(F p ), p = x, y, z;
[0076] GAP stands for global-average-pooling.
[0077] For each output feature, an independent gating network is set to extract local weights w. p The formula is expressed as:
[0078] w p =sigmoid(W p ·g p +b p );
[0079] Among them, w p ∈(0,1), sigmoid(.) is the sigmoid activation function, W p and b p These are learnable parameters;
[0080] Then, a higher-order selector is used for a global comparison, and g is selected. x ,g y ,g z The splicing forms a comprehensive representation g concat =[g x ,g y ,g z Then, a sotmax network is used to predict the global selection probability, and the global competitive selection of the output features of the three-branch cascaded structure is learned. The formula is expressed as:
[0081] s p =sotmax(W s ·g concat +b s ) p ;
[0082] Among them, W s b s For learnable weights; g concat It is the concatenated global feature, s p These are the weight components for the p-th branch; the softmax output is a 3-dimensional vector, which are s x ,s y ,s z ∈(0,1);
[0083] By combining the local weights and global selections of each cascaded structure, the final fusion weight α of each cascaded structure is obtained. p The formula is expressed as:
[0084]
[0085] Finally, the output features of each branch cascade structure are weighted and fused according to the fusion weights to obtain the multi-scale fusion features.
[0086] More specifically, the redundancy suppression of multi-scale fused features in step S435 is as follows:
[0087] Denote the multi-scale fusion feature F fusion ∈R E×F×H Where E is the height, F is the width, and H is the number of channels; the multi-scale fusion features are sequentially processed through spatial attention and channel attention mechanisms to suppress redundancy from both spatial and channel perspectives, as expressed in the formula:
[0088] Y o (e,f,g)=Y s (e,f,g)·Y t (e,f,g);
[0089] Y s (e,f,g)=Y(e,f,g)·A s (e,f);
[0090] Y t (e,f,g)=Y(e,f,g)·A t (g);
[0091] Where Y(e,f,g) is the convolutional feature of the multi-scale fusion feature at position (e,f) and channel g, Y t (e,f,g),Y s (e,f,g),Y o (e,f,g) represent the channel-weighted feature, spatial-weighted feature, and weighted output convolutional feature of the multi-scale fusion feature at positions (e,f) and channel g, respectively; A s(e,f) is the spatial attention weight at position (e,f); A t (g) is the attention weight of channel g;
[0092] Next, the Sobel differential operator is used to enhance the edges of the spatially weighted features, and the Gaussian integral operator is used to denoise the channel-weighted features. The formula is expressed as follows:
[0093] F diff =DepthwiseConv 2D (Y s ,K diff );
[0094] F int =DepthwiseConv 2D (Y t ,K diff );
[0095] Among them, K diff K is a trainable Sobel differential convolution kernel used for gradient extraction of spatial paths; int Trainable Gaussian convolution kernels are used for channel smoothing; DepthwiseConv 2D For depthwise convolution; F diff F int These are the spatial weighted features after edge enhancement and the channel weighted features after denoising, respectively.
[0096] Define the channel dimension to learn the gate weight g. w After normalization, F is obtained respectively. diff F int The corresponding fusion gating weights are expressed by the formula:
[0097] g diff =sigmoid(g w );
[0098] g int =1-g diff ;
[0099] Apply the fusion gating weights to F respectively diff F int ,get:
[0100] F′ diff =g diff ⊙F diff ;
[0101] F′ int =g int ⊙F int ;
[0102] Where ⊙ represents the gating position multiplication mechanism; F' diff F' int These are the spatial weighted features and channel weighted features after gating enhancement, respectively;
[0103] Finally, feature reconstruction and interaction are performed, and the fusion result is used as an enhancement weighting term to apply to the spatial weighted feature Y. s Channel weighted feature Y t The output features Y of the ScConv module with multi-level cross-dimensional interaction are obtained. ScConv The formula is expressed as:
[0104] Y ScConv =Y s ·(1+F′ diff )+Y t ·(1+F′ int ).
[0105] Furthermore, step S44 specifically includes:
[0106] S441, Output feature Y of the ScConv module with multi-level cross-dimensional interaction ScConv As input, Y ScConv Convert the input to quaternion form, dividing it into a real part r and three imaginary parts i, j, k;
[0107] S442. Then, using a dynamic quaternion multi-head attention mechanism, a query and key are assigned to each part of the input, and an attention score is calculated, i.e., the following definition is made. Let r, i, j, and k be the queries for the hd-th attention heads, respectively. The key for the hd-th attention head is r, i, j, k, and the score is the dynamic quaternion multi-head attention score. hd for:
[0108]
[0109] S443. Using a dynamic routing mechanism, the output of each head is averaged and pooled, then concatenated and fed into the scorer to generate a fusion weight α. The weighted fusion output of all heads is then expressed by the formula:
[0110]
[0111] Where HD represents the total number of attention heads, i.e., the number of parallel subspaces in multi-head attention. hd This represents the hd-th attention head currently being processed; it is an index variable used for head-by-head computation.
[0112] S444. After the dynamic quaternion multi-head attention mechanism layer, a residual connection and layer normalization are performed sequentially to standardize the entire feature dimension. The formula is expressed as:
[0113] Z1 = Y ScConv +Y out ;
[0114] V1 = LayerNorm(Z1);
[0115] Among them, Y ScConv Z1 represents the original features before entering the dynamic quaternion dual-path Transformer; Z1 represents the result of the first residual connection; V1 represents the output of the first layer normalization.
[0116] S445. Design a dual-path feedforward network, performing parallel modeling and fusion representation in the time and frequency domains; the time-domain branch uses two quaternion fully connected layers to construct a nonlinear time-series transform, and the time-domain output is denoted as f. time The frequency domain branch uses a Fourier transform layer to capture peaks in the spectrum, expressed by the formula:
[0117]
[0118] in, and These are the real and imaginary parts of the spectrum, respectively.
[0119] Then concatenate the real and imaginary parts in the frequency domain to obtain The frequency domain output f is obtained after passing through two quaternion fully connected layers. freq ;
[0120] S446. Finally, the time-domain output and frequency-domain output are fused through a gated fusion layer to obtain the time-frequency domain fusion feature f. out The formula is expressed as:
[0121] f out =Gate·f time +(1-Gate)·f freq ;
[0122] Where Gate is the gate function of the gated fusion layer;
[0123] S447. After obtaining the time-frequency domain fusion features, residual connection, addition, and layer normalization are performed sequentially, as expressed by the formula:
[0124] Z2=V1+f out ;
[0125] F out =LayerNorm(z2);
[0126] Where Z2 is the result of the second residual connection; F out It is the final output feature of the noise-resistant bearing fault diagnosis model.
[0127] Based on the above technical solution, the present invention has at least the following beneficial effects:
[0128] This invention solves the problems of low recognition rate of faulty bearings in high-noise environments, poor versatility of traditional bearing fault diagnosis methods, and low diagnostic accuracy of bearing faults. It can output more accurate bearing fault diagnosis results and achieve the advantage of accurate bearing fault identification under high-noise conditions, thereby improving the versatility and accuracy of bearing fault diagnosis models.
[0129] The multi-tiered, cross-dimensional interactive ScConv module in this method utilizes different convolutional receptive fields, combined with guided cross-attention and low-rank cross-attention mechanisms, to accurately capture the dynamic fault feature relationships between local and global aspects. A multi-scale gating selection mechanism adaptively selects outputs at different scales, effectively achieving multi-scale weight fusion. The differential-integral interaction layer suppresses noise perturbations and strengthens the coupling of spatial channel dimensional information. The Transformer part introduces dynamic quaternion multi-head attention, enhancing the model's ability to select and aggregate complex modal features. The time-domain-frequency domain dual-path feedforward network extracts spectral features through FFT and fuses time-frequency information, enabling the model to have stronger generalization and discrimination capabilities when dealing with periodic, non-stationary, and noisy signals. Attached Figure Description
[0130] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0131] Figure 1 This is an overall flowchart of a bearing noise reduction fault diagnosis method based on a multi-cascaded cross-dimensional dynamic interactive Transformer proposed in this invention.
[0132] Figure 2 This is a diagram showing the overall framework of the noise-resistant bearing fault diagnosis model proposed in this invention.
[0133] Figure 3 This is a framework diagram of the ScConv model for multi-cascaded cross-dimensional interaction in this invention;
[0134] Figure 4 This is a framework diagram of the dynamic quaternion dual-path Transformer model in this invention.
[0135] Figure 5 A bar chart comparing the performance of the method proposed in this invention with other existing models;
[0136] Figure 6 The confusion matrix diagram of this invention under a signal-to-noise ratio of -6dB;
[0137] Figure 7 The confusion matrix diagram of this invention under a signal-to-noise ratio of -4dB;
[0138] Figure 8 The confusion matrix diagram of this invention under a signal-to-noise ratio of -2dB;
[0139] Figure 9 The confusion matrix diagram of this invention under the condition of 0dB signal-to-noise ratio. Detailed Implementation
[0140] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. This will allow for a full understanding of how the present application uses technical means to solve technical problems and achieve technical effects, and to facilitate its implementation.
[0141] Those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0142] Please refer to Figures 1-9This illustration demonstrates a specific implementation of this embodiment. This embodiment utilizes a multi-tiered, cross-dimensional interactive ScConv module with different convolutional receptive fields, combined with guided cross-attention and low-rank cross-attention mechanisms, to accurately capture the dynamic fault feature relationships between local and global aspects. A multi-scale gating selection mechanism adaptively selects outputs at different scales, effectively achieving multi-scale weight fusion. The differential-integral interaction layer suppresses noise disturbances and strengthens the coupling of spatial channel dimensional information. The Transformer part introduces dynamic quaternion multi-head attention, enhancing the model's ability to select and aggregate complex modal features. The time-domain-frequency domain dual-path feedforward network extracts spectral features through FFT and fuses time-frequency information, enabling the model to have stronger generalization and discrimination capabilities when dealing with periodic, non-stationary, and noisy signals, achieving bearing fault identification under strong noise conditions. This solves the problems of low bearing fault identification rate in strong noise environments, poor generality of traditional bearing fault diagnosis methods, and low diagnostic accuracy of bearing faults. It can output more accurate bearing fault diagnosis results, achieving the advantage of accurate bearing fault identification under strong noise conditions, and thus improving the generality and accuracy of the bearing fault diagnosis model.
[0143] Please refer to Figure 1 This embodiment proposes a bearing noise reduction fault diagnosis method based on a multi-cascaded cross-dimensional dynamic interactive Transformer, which specifically includes the following steps:
[0144] S1. Use sensors to collect bearing operation signals and collect the original vibration signals of the bearing at different positions;
[0145] In a preferred embodiment, step S1 specifically includes:
[0146] Multiple measuring points were selected on the bearing surface, and vibration sensors were installed and fixed to ensure normal signal transmission. The original vibration signals of the bearing at different locations were collected by the vibration sensors at the measuring points, including data of the inner ring, outer ring, and rolling elements under four motor power conditions of 0, 1, 2, and 3 horsepower.
[0147] S2. Perform data preprocessing on the collected original vibration signals of the bearing, and divide the collected data into training set, validation set and test set; in this embodiment, the division ratio is 3:1:1.
[0148] S3. Extract and transform the features of the original vibration signal of the bearing, and convert the data type into quaternions to obtain the bearing fault quaternion features;
[0149] In a preferred embodiment, step S3 specifically includes:
[0150] S31. Perform signal sampling using a sliding window, extracting 1024 sampling points from the original bearing vibration signal as a sample unit X∈R.1024×1 ;
[0151] S32. For each sample unit, 128 large convolutional kernels of size 7 and stride 2 are used to capture broadband features. Then, nonlinearity is introduced through the ReLU activation function to obtain the primary feature F1. The formula is expressed as:
[0152] F1 = ReLU(X*W1 + b1);
[0153] Where W1 = R 7×1×128 That is, 128 convolutional kernels of size 7; b1∈R 128 For bias terms;
[0154] The receptive field of the 7-point convolution kernel can capture the tiny abrupt changes in bearing failure and extract local features in the time domain, making it suitable for periodic impact waveforms caused by bearing failure. The 2-point step size enables downsampling and suppresses high-frequency noise, making it suitable for bearing failure identification.
[0155] S33. Using max pooling to compress the primary feature size, the dominant peak of the bearing fault signal in the sliding window is preserved, and the low-amplitude feature disturbance caused by noise is weakened, resulting in the pooled feature F2; the formula is expressed as:
[0156] F2=MaxPooling(F1,pool size=2);
[0157] Where MaxPooling() represents max pooling, and pool size is the pooling kernel size;
[0158] The pooling features are refined using a one-dimensional convolution of length 3 to ensure channel consistency, and the output bearing fault local features F3 = ReLU(F2*W2+b2)∈R are 256×128. 256×128 ;
[0159] Where W2 is a one-dimensional convolution and b2 is a bias term;
[0160] S34. Quaternion modeling transformation: The local features of the 128-channel bearing fault are divided into four parts: real part r, imaginary parts i, j, k, and each part is 32-dimensional; thus, a quaternion q is defined, expressed by the formula:
[0161] q = r + a1i + a2j + a3k;
[0162] Among them, a1, a2, and a3 are the three corresponding components of the imaginary part;
[0163] Then, by performing a linear mapping on the quaternion, we obtain the mapping for each part as follows:
[0164] r′=rW r -iW i-jW j -kW k ;
[0165] i′=rW i +iW r +jW k -kW j ;
[0166] j′=rW j -iW k +jW r +kW i ;
[0167] k′=rW k +iW j -jW i +kW r ;
[0168] Among them, W r W i W j W k It is the weight matrix of each part of the quaternion;
[0169] S35. Based on the given quaternion weight matrix W r W i W j W k Hamiltonian product operations are performed to encode the relative transformations and coupling relationships between temporal features, enhancing the model's ability to express weak multi-axis features and providing stronger nonlinear modeling capabilities than ordinary fully connected layers; the final output is the bearing fault quaternion feature F. q =[r',i',j',k']∈R 256×128 .
[0170] S4. Construct a noise-resistant bearing fault diagnosis model consisting of a multi-level, cross-dimensional interactive ScConv module and a dynamic quaternion dual-path Transformer module.
[0171] As a preferred embodiment, such as Figure 2 As shown, step S4 specifically includes:
[0172] S41. Determine the basic parameters, including learning rate, batch size, and number of iterations;
[0173] S42. Construct a multi-scale cascaded cross-dimensional interactive convolutional kernel, which adopts three parallel convolutional paths. Each path consists of multiple sets of cascaded structures. Each set of structures is combined using horizontal convolution, vertical convolution, and square convolution of different sizes. This design in this application introduces directional convolution operations in the spatial dimension to achieve comprehensive perception and cross-fusion of features at different scales and directions. This helps to fully explore the potential local perturbation patterns and periodic structures in bearing signals and enhance the diversity and robustness of feature representation.
[0174] S43. Based on multi-scale cascaded cross-dimensional interactive convolution kernels, construct a multi-cascaded cross-dimensional interactive ScConv module, and use the bearing fault quaternion features obtained in step S3 as input to capture features of different frequencies.
[0175] More specifically, in this embodiment, such as Figure 3 As shown, step S43 specifically includes:
[0176] S431, the multi-cascaded cross-dimensional interaction ScConv module adopts a three-branch convolutional path cascaded structure, and uses a cross-attention mechanism in each cascaded structure; the input feature of each cascaded structure is F. in =F q ∈R H×W×C Where H represents the time step (i.e., feature map height), W represents the channel width (i.e., feature map width), C represents the number of channels, and F represents the feature map height. q Quaternion characteristics of bearing failure;
[0177] The core challenge in bearing fault diagnosis stems from feature extraction from vibration signals. Traditional convolutional neural networks typically employ fixed-scale convolutional kernels, making it difficult to simultaneously capture features of different frequencies, thus affecting diagnostic accuracy. Therefore, this application designs a multi-cascaded cross-dimensional interactive ScConv module. In this module, each convolutional path does not simply use a single 3×3, 5×5, or 7×7 standard convolutional kernel. Instead, it employs a three-path cascaded structure, utilizing a cascaded combination of 1×N horizontal convolutions, N×1 vertical convolutions, and N×N square convolutions to cover different receptive fields. This extracts directional features and spatial overall features separately, which are then fused to achieve comprehensive coverage of high-frequency, mid-frequency, and low-frequency features, thereby enhancing feature representation capabilities and suppressing noise interference.
[0178] S432, the first cascaded structure is designed for modeling high-frequency, short-duration sudden fault signals. It employs a 1×3 horizontal convolution to model the sliding pattern within a small window on the time axis, a 3×1 vertical convolution to focus on modeling local perturbations in the spatial dimension of the feature map, and a 3×3 square convolution to detect local structural abrupt changes in the feature map. The formula is expressed as:
[0179]
[0180]
[0181] Among them, F 1×3 F 3×1 F 3×3 The output features of 1×3 horizontal convolution, 3×1 vertical convolution, and 3×3 square convolution are respectively; W 1×3 1×3 horizontal convolution kernel, W 3×1 3×1 vertical convolution kernel, W 3×3 The kernel is a 3×3 square convolution kernel; α and β are the kernel index variables, representing the position of the kernel element in the convolution operation; h, w, and c are the feature map height, width, and channel index, respectively;
[0182] 1×3 horizontal convolution can effectively extract the rapid energy changes between peaks and troughs, is highly sensitive to the starting position of the impact signal, and can amplify the small periodic disturbance characteristics generated during the operation of the bearing rolling elements, thereby enhancing the model's ability to perceive minor faults or early damage signals.
[0183] 3×1 vertical convolution can enhance the model's sensitivity to changes in directional signals during bearing operation, effectively improve the response capability to directional feature anomalies, and further enrich the expression dimensions of bearing fault features.
[0184] 3×3 square convolution can effectively aggregate spatial information and suppress redundancy. It exhibits good anti-interference ability when facing noise interference or unstructured disturbances, and can retain key features while suppressing invalid information. In particular, in the scenario of local amplitude change caused by inner ring faults or rolling element faults, 3×3 square convolution has strong sensitivity to high-frequency impact signals, can effectively extract local strong excitation areas, and improve the accuracy and stability of fault identification.
[0185] In this application, the first cascaded structure is primarily designed for modeling high-frequency, short-duration sudden fault signals. These signals typically occur during the contact process between the rolling element and the inner ring, exhibiting significant instantaneous impact characteristics. To address this characteristic, after obtaining the output features of each convolution, a guided cross-attention mechanism is applied, with F... 3×3 As the foundation for guiding the main path, specifically the query in the cross-attention mechanism, one-dimensional convolution maps high-dimensional features to a low-dimensional space, while concatenating F... 1×3 F 3×1 As auxiliary information, it generates the key and value in the cross-attention mechanism; the formula is expressed as:
[0186] Q1 = Conv(F 3×3 )∈R H×W×m ;
[0187] F a =[F 1×3 ,F 3×1 ]∈R H×W×2C ;
[0188] K1=Conv(F a )∈R H×W×m ;
[0189] V1 = Conv(F a )∈R H×W×C ;
[0190] Where m is the guiding cross-attention dimension, F a For F 1×3 F 3×1 The fusion features are: Q1, K1, and V1, which are the query, key, and value guiding the cross-attention mechanism in the first cascade structure, respectively; Conv(.) is a one-dimensional convolution operation.
[0191] Q1 and K1 are then reshaped into two-dimensional tensors, the attention weight A1 is calculated, and it is then weighted and fused with V1 to reshape the original size. Finally, a 3×3 convolution is used for local guided enhancement, resulting in the output features of the first cascaded structure; the formula is expressed as:
[0192]
[0193] F x =Conv 3×3 (F n );
[0194] Where softmax(.) represents the softmax activation function, Conv 3×3 (.) represents a 3×3 convolution; F n To reshape the features to the desired size, F x The output features of the first cascaded structure; d represents the feature dimension at each position;
[0195] By guiding the cross-attention mechanism to achieve dynamic feature selection and weighted fusion, the model can effectively highlight the real fault signals and suppress interference caused by high-frequency noise or unstructured disturbances, thereby improving the model's ability to identify sudden impact faults.
[0196] S433, the second cascaded structure is used to extract mid-frequency feature information. Its internal structure is similar to the first cascaded structure, but it uses the following methods respectively: a 1×5 horizontal convolution to extract local features in the time series direction, enhancing the response to periodic slight oscillations and locating steep rises and falls in the signal; a 5×1 vertical convolution to extract amplitude fluctuations in different directional channels, improving the inconsistent response to multi-directional vibrations; and a 5×5 square convolution to comprehensively perceive local and directional joint changes, used for identifying mid-frequency oscillations caused by bearing failures. The output features obtained from these three convolutions are denoted as F. 1×5 F 5×1 F 5×5 This setting can effectively capture the continuous fluctuation pattern and local amplitude gradual change characteristics in bearing fault signals, thereby enhancing the model's ability to perceive faults in rolling elements and outer rings.
[0197] Meanwhile, the second-level cascaded structure uses a standard cross-attention mechanism, enabling each spatiotemporal location to establish a global dynamic connection with other locations, thus enhancing the ability to extract periodic patterns; that is, through F respectively 1×5 F 5×1 F 5×5 Calculate the Query, Key, and Value in the standard cross-attention mechanism; the formula is expressed as:
[0198] Q2 = BN Q (F 1×5 )∈R H×W×d ;
[0199] K2=BN K (F 5×1 )∈R H×W×d ;
[0200] V2 = BN K (F 5×5 )∈R H×W×d ;
[0201] Where BN stands for batch normalization; Q2, K2, and V2 are the query, key, and value of the standard cross-attention in the second cascade structure, respectively.
[0202] The attention weights A2 are calculated using Q2 and K2, and the output features F of the second cascaded structure are finally obtained. y The formula is expressed as:
[0203]
[0204] F y =A2·V2;
[0205] S434, the third cascaded structure, is used for multi-directional sensing and modeling of long-period, high-amplitude oscillation characteristics in bearing signals. Its internal structure is similar to the first cascaded structure, but it uses 1×7 horizontal convolution, 7×1 vertical convolution, and 7×7 square convolution, respectively. The features output by each convolution are denoted as F. 1×7 F 7×1 F 7×7 ;
[0206] Then first F 1×7 F 7×1 The splicing features F are obtained by splicing. b Then, a low-rank decomposition cross-attention mechanism is used to compress mesoscale features into a low-dimensional subspace for association matching, i.e., F 7×7 As the main path information is used for query calculation, the concatenated feature F is used. b As auxiliary information, the keys and values are calculated, dynamically filtered and weighted through a low-rank decomposition cross-attention mechanism, and then channel-based dimensionality reduction projection is performed. The formula is expressed as:
[0207] F b =[F 1×7 ,F 7×1 ]∈R H×W×2C ;
[0208]
[0209] Finally, the attention weight A3 is calculated using Q3 and K3, and the output feature F of the third cascade structure is obtained. z The formula is expressed as:
[0210]
[0211] F z =A3·V3;
[0212] The low-rank decomposition cross-attention mechanism effectively reduces computational redundancy and enhances the model's global modeling ability for complex signals such as severe faults and broadband impairments. The third-cascade structure has stronger long-distance sensing capabilities in the time domain, which helps to enhance the model's fault identification performance and noise robustness under conditions of large-scale temporal fluctuations.
[0213] S435. Use a multi-scale gating selection mechanism to weighted fuse the output features of each branch cascade structure to obtain multi-scale fused features;
[0214] In bearing fault diagnosis, convolutional receptive fields of different scales correspond to different frequencies and local-global features in the signal. However, the importance of features at each scale in the signal changes dynamically, requiring the introduction of a multi-scale selection mechanism for adaptive trade-offs. Therefore, this invention proposes a multi-scale gating selection mechanism to fuse bearing vibration signal features extracted from different convolutional kernel sizes. This mechanism first obtains compressed feature representations of each scale channel through global average pooling and extracts local response intensities within each scale through an independent gating network; simultaneously, a higher-order selector is constructed to compare the global importance of each scale. Finally, through a soft selection mechanism that fuses local responses and global weights, scale fusion weights are dynamically generated to achieve differentiated responses to features of different fault types (inner ring damage, outer ring spalling, rolling element defects, etc.). This mechanism exhibits excellent fault adaptability and robustness enhancement, effectively improving the discrimination capability under strong background noise fault conditions.
[0215] As a preferred implementation method, the multi-scale gating selection mechanism in step S435 is specifically as follows:
[0216] Global average pooling is performed on the output features of the three-branch cascade structure to obtain a compressed representation g of the output features. p The formula is expressed as:
[0217] g p =GAP(F p ), p = x, y, z;
[0218] GAP stands for global-average-pooling.
[0219] For each output feature, an independent gating network is set to extract local weights w. p The formula is expressed as:
[0220] w p =sigmoid(W p ·g p +b p );
[0221] Among them, w p ∈(0,1), sigmoid(.) is the sigmoid activation function, W p and b p These are learnable parameters;
[0222] Then, a higher-order selector is used for a global comparison, and g is selected. x ,g y ,g z The splicing forms a comprehensive representation g concat =[g x ,g y ,gz Then, a softmax network is used to predict the global selection probability, and the global competitive selection of the output features of the three-branch cascaded structure is learned. The formula is expressed as:
[0223] s p =softmax(W s ·g concat +b s ) p ;
[0224] Among them, W s b s For learnable weights; g concat It is the concatenated global feature, s p These are the weight components for the p-th branch; the softmax output is a 3-dimensional vector, which are s x ,s y ,s z ∈(0,1);
[0225] By combining the local weights and global selections of each cascaded structure, the final fusion weight α of each cascaded structure is obtained. p The formula is expressed as:
[0226]
[0227] Finally, the output features of each branch cascade structure are weighted and fused according to the fusion weights to obtain the multi-scale fusion features.
[0228] After obtaining the multi-scale fused features, spatial redundancy (such as smooth background or repetitive texture in the spectrum) often exists in the convolutional feature map of bearing fault vibration signals. Especially under noise conditions, spatial redundancy activation can mask the true fault features. In addition, some channels may be irrelevant to classification or even dominated by noise, requiring channel-level importance re-evaluation. Therefore, it is necessary to further suppress redundancy of the multi-scale fused features based on spatial attention mechanism, channel attention mechanism, and integral-differential interaction layer, and finally obtain the output feature Y of the multi-cascaded cross-dimensional interactive ScConv module. ScConv .
[0229] In this embodiment, redundancy suppression of multi-scale fusion features specifically involves:
[0230] Denote the multi-scale fusion feature F fusion ∈R E×F×H Where E is the height, F is the width, and H is the number of channels; the multi-scale fusion features are sequentially processed through spatial attention and channel attention mechanisms to suppress redundancy from both spatial and channel perspectives, as expressed in the formula:
[0231] Y o(e,f,g)=Y s (e,f,g)·Y t (e,f,g);
[0232] Y s (e,f,g)=Y(e,f,g)·A s (e,f);
[0233] Y t (e,f,g)=Y(e,f,g)·A t (g);
[0234] Where Y(e,f,g) is the convolutional feature of the multi-scale fusion feature at position (e,f) and channel g, Y t (e,f,g),Y s (e,f,g),Y o (e,f,g) represent the channel-weighted feature, spatial-weighted feature, and weighted output convolutional feature of the multi-scale fusion feature at positions (e,f) and channel g, respectively; A s (e,f) is the spatial attention weight at position (e,f); A t (g) is the attention weight of channel g;
[0235] Fault features are often contaminated by strong noise, affecting the stability and generalization ability of the discrimination model. To improve the model's ability to model weak fault features and suppress redundant noise, this application designs an integral-differential interaction layer as an attention enhancement module that integrates spatial gradient and channel smoothing characteristics. The differential operator Sobel can capture local gradient information and enhance edge and abrupt features, making it suitable for abrupt fault identification; the integral operator Gaussian has smoothing and denoising capabilities, which is beneficial for suppressing background interference. However, traditional modules struggle to coordinate the modeling of the two effects, hence this interaction layer is introduced; specifically:
[0236] The Sobel differential operator is used to enhance the edges of the spatially weighted features, and the Gaussian integral operator is used to denoise the channel-weighted features. The formulas are as follows:
[0237] F diff =DepthwiseConv 2D (Y s ,K diff );
[0238] F int =DepthwiseConv 2D (Y t ,K diff );
[0239] Among them, Kdiff K is a trainable Sobel differential convolution kernel used for gradient extraction of spatial paths; int Trainable Gaussian convolution kernels are used for channel smoothing; DepthwiseConv 2D For depthwise convolution; F diff F int These are the spatial weighted features after edge enhancement and the channel weighted features after denoising, respectively.
[0240] Define the channel dimension to learn the gate weight g. w After normalization, F is obtained respectively. diff F int The corresponding fusion gating weights are expressed by the formula:
[0241] g diff =sigmoid(g w );
[0242] g int =1-g diff ;
[0243] Apply the fusion gating weights to F respectively diff F int ,get:
[0244] F′ diff =g diff ⊙F diff ;
[0245] F′ int =g int ⊙F int ;
[0246] Where ⊙ represents the gating position multiplication mechanism; F' diff F' int These are the spatial weighted features and channel weighted features after gating enhancement, respectively;
[0247] Finally, feature reconstruction and interaction are performed, and the fusion result is used as an enhancement weighting term to apply to the spatial weighted feature Y. s Channel weighted feature Y t The output features Y of the ScConv module with multi-level cross-dimensional interaction are obtained. ScConv The formula is expressed as:
[0248] Y ScConv =Y s ·(1+F′ diff )+Y t ·(1+F′ int ).
[0249] Thus, the output feature Y is obtained.ScConv It achieves both gradient modulation of the original spatial path and weighted smooth modulation of the channel path.
[0250] S44. Construct a dynamic quaternion dual-path Transformer module, using the output of the multi-cascaded cross-dimensional interactive ScConv module as input, to focus on key fault characteristics in a noisy environment.
[0251] Traditional models, under strong noise conditions, smooth out local periodic impulses in the signal, making them difficult to distinguish in the time domain; high-frequency band energy is masked; and the model tends to extract noise-dominant features, leading to misfocusing of attention. To further improve the identification capability of bearing fault diagnosis under strong noise conditions, this application, based on the traditional Transformer, decomposes noise into real and imaginary parts through a quaternion modeling mechanism, significantly suppressing noise. Simultaneously, a dynamic quaternion multi-head attention mechanism is designed, using a global scoring mechanism to score the output of each attention head and dynamically adjust the weights of each head to achieve the optimal combination of information channels. Finally, a time-frequency dual-path feedforward network is designed, using quaternion convolutional layers as the time domain path and Fourier transform layers as the frequency domain path, automatically adjusting the time-frequency fusion weights through a gating mechanism. That is... Figure 2 and Figure 4 As shown, step S44 specifically includes:
[0252] S441, Output feature Y of the ScConv module with multi-level cross-dimensional interaction ScConv As input, Y ScConv Convert the input to quaternion form, dividing it into a real part r and three imaginary parts i, j, k;
[0253] S442. Then, using a dynamic quaternion multi-head attention mechanism, a query and key are assigned to each part of the input, and an attention score is calculated, i.e., the following definition is made. Let r, i, j, and k be the queries for the hd-th attention heads, respectively. The key for the hd-th attention head is r, i, j, k, and the score is the dynamic quaternion multi-head attention score. hd for:
[0254]
[0255] S443. Using a dynamic routing mechanism, the output of each head is averaged and pooled, then concatenated and fed into the scorer to generate a fusion weight α. The weighted fusion output of all heads is then expressed by the formula:
[0256]
[0257] Where HD represents the total number of attention heads, i.e., the number of parallel subspaces in multi-head attention.hd This represents the hd-th attention head currently being processed. It is an index variable used for head-by-head computation. The dynamic routing mechanism automatically determines which heads are useful. When the input signal is disturbed by noise, it can suppress the influence of unstable attention and reduce false focusing.
[0258] S444. After the dynamic quaternion multi-head attention mechanism layer, a residual connection and layer normalization are performed sequentially to standardize the entire feature dimension. The formula is expressed as:
[0259] Z1 = Y ScConv +Y out ;
[0260] V1 = LayerNorm(Z1);
[0261] Among them, Y SoConv Z1 represents the original features before entering the dynamic quaternion dual-path Transformer; Z1 represents the result of the first residual connection; V1 represents the output of the first layer normalization.
[0262] S445. Since weak faults in signals are easily masked by noise, frequency domain signal stability is often ignored, and features exhibit distinct time and frequency domain characteristics, this application designs a dual-path feedforward network to model and fuse time and frequency domain features in parallel, thereby improving noise robustness. The time-domain branch uses two quaternion fully connected layers to construct a nonlinear time-series transform, and the time-domain output is denoted as f. time The frequency domain branch uses a Fourier transform layer to capture peaks in the spectrum, expressed by the formula:
[0263]
[0264] in, and These are the real and imaginary parts of the spectrum, respectively.
[0265] Then concatenate the real and imaginary parts in the frequency domain to obtain The frequency domain output f is obtained after passing through two quaternion fully connected layers. freq ;
[0266] S446. Finally, the time-domain output and frequency-domain output are fused through a gated fusion layer to obtain the time-frequency domain fusion feature f. out The formula is expressed as:
[0267] f out =Gate·f time +(1-Gate)·f freq ;
[0268] Here, Gate is the gate function of the gated fusion layer; if the time-domain features are unstable (such as large noise disturbances), Gate will favor the frequency-domain path; if the signal is low-frequency fluctuation and has obvious periodic impacts, the advantage of the time-domain path will be preserved; the fusion ratio is dynamically learned to avoid hard-coded path dependence and improve the model's adaptability.
[0269] S447. After obtaining the time-frequency domain fusion features, residual connection, addition, and layer normalization are performed sequentially, as expressed by the formula:
[0270] Z2=V1+f out ;
[0271] F out =LayerNorm(Z2);
[0272] Where Z2 is the result of the second residual connection; F out It is the final output feature of the noise-resistant bearing fault diagnosis model.
[0273] S5. Train the overall model based on the training set and validation set, and adjust the parameter configuration and structure of each module until the optimal model is obtained.
[0274] S6. Input the test set into the optimal diagnostic model, verify the model's effectiveness, obtain the fault classification results, and evaluate its fault diagnosis performance.
[0275] This concludes the description of the entire process of the bearing noise-resistant fault diagnosis method based on a multi-cascaded cross-dimensional dynamic interactive Transformer proposed in this invention. Furthermore, to verify the performance of the proposed method, experiments were conducted on the publicly available bearing fault dataset provided by Western Reserve University.
[0276] The Western Reserve University dataset includes 36 ".mat" files containing fault data for the inner ring, outer ring, and rolling elements under four horsepower conditions (0, 1, 2, and 3), as well as 4 ".mat" files containing normal data. Each file contains vibration acceleration signals of the bearing collected by an accelerometer placed above the bearing housing at the motor drive end, at a sampling frequency of 12kHz. All faulty bearings were subjected to single-point damage machining using electrical discharge machining. The Western Reserve University publicly released bearing fault dataset includes three types of faulty bearings and one type of normal bearing. The faulty bearings were located in the outer ring, rolling elements, and inner ring. All data files were sampled, with each sample having a signal length of 1024. The resulting dataset was divided into training, validation, and test sets, with the training set accounting for 60%, the validation set for 20%, and the test set for 20%.
[0277] Table 1 below and Figure 5This demonstrates that the model has a higher fault identification rate compared to other basic models, especially under strong noise conditions, where the advantage is even more obvious.
[0278] Table 1 Fault identification rate of each model under different noise conditions
[0279] Model -6 decibels -4 decibels -2 dB 0 decibels average value This model 95.81±0.79 97.61±0.92 98.69±0.27 99.21±0.27 97.83±0.56 TCNN 92.95±0.55 94.83±0.40 93.92±0.40 98.00±0.30 94.93±0.37 DCA-BiGRU 95.14±0.70 96.45±0.34 97.89±0.84 98.90±0.39 97.10±0.57 NCAA 93.56±0.65 95.83±0.47 97.17±0.32 98.50±0.32 96.27±0.44 DRSN 82.40±1.34 89.20±0.78 97.20±0.48 98.90±0.36 91.93±0.74 Mel-CNN 88.60±0.92 94.10±0.44 97.20±0.25 99.50±0.12 95.85±0.43
[0280] This invention sets the number of training iterations to 80, the batch size to 128, and uses the Adam algorithm with an initial learning rate of 0.0001. Figure 6-9 It can be seen that the fault identification accuracy of the present invention is above 95% under strong noise conditions, and the model effect is significantly improved with the increase of signal-to-noise ratio. Therefore, the bearing fault method proposed in this invention is reliable.
[0281] In summary, this invention provides a bearing noise-resistant fault diagnosis method based on a multi-cascaded cross-dimensional dynamic interactive Transformer. It solves the problems of low recognition rate of faulty bearings in strong noise environments, poor versatility of traditional bearing fault diagnosis methods, and low diagnostic accuracy of bearing faults. It can output more accurate bearing fault diagnosis results. The model proposed in this invention has the advantage of accurately identifying bearing faults under strong noise conditions, and can improve the versatility and accuracy of bearing fault diagnosis models.
[0282] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., refer to the specific features described in connection with that embodiment or example.
[0283] Features, structures, materials, or characteristics are included in at least one embodiment or example of this application. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of those different embodiments or examples.
[0284] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus or device (such as a computer-based system, a processor-included system or other system that can fetch and execute instructions from, an instruction execution system, apparatus or device).
[0285] The above embodiments provide a detailed description of the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A bearing noise reduction fault diagnosis method based on multi-cascaded cross-dimensional dynamic interactive Transformer: S1. Use sensors to collect bearing operation signals and collect the original vibration signals of the bearing at different positions; S2. Perform data preprocessing on the collected raw vibration signals of the bearing, and divide the collected data into training set, validation set, and test set; S3. Extract and transform the features of the original vibration signal of the bearing, and convert the data type into quaternions to obtain the bearing fault quaternion features; S4. Construct a noise-resistant bearing fault diagnosis model consisting of a multi-level, cross-dimensional interactive ScConv module and a dynamic quaternion dual-path Transformer module. S5. Train the overall model based on the training set and validation set, and adjust the parameter configuration and structure of each module until the optimal model is obtained; S6. Input the test set into the optimal diagnostic model, verify the model's effectiveness, obtain the fault classification results, and evaluate its fault diagnosis performance.
2. The bearing noise reduction fault diagnosis method based on a multi-cascaded cross-dimensional dynamic interactive Transformer according to claim 1, characterized in that, Step S1 is as follows: Multiple measuring points were selected on the bearing surface, and vibration sensors were installed and fixed to ensure normal signal transmission. The original vibration signals of the bearing at different locations were collected by the vibration sensors at the measuring points, including data of the inner ring, outer ring, and rolling elements under four motor power conditions of 0, 1, 2, and 3 horsepower.
3. The bearing noise reduction fault diagnosis method based on a multi-cascaded cross-dimensional dynamic interactive Transformer according to claim 1, characterized in that, Step S3 specifically includes: S31. Perform signal sampling using a sliding window, extracting 1024 sampling points from the original bearing vibration signal as a sample unit X∈R. 1024×1 ; S32. For each sample unit, 128 large convolutional kernels of size 7 and stride 2 are used to capture broadband features. Then, nonlinearity is introduced through the ReLU activation function to obtain the primary feature F1. The formula is expressed as: F1 = ReLU(X*W1 + b1); Where W1 = R 7×1×128 That is, 128 convolutional kernels of size 7; b1∈R 128 For bias terms; S33. Using max pooling to compress the primary feature size, the dominant peak of the bearing fault signal in the sliding window is preserved, and the low-amplitude feature disturbance caused by noise is weakened, resulting in the pooled feature F2; the formula is expressed as: F2=MaxPooling(F1,pool size=2); Where MaxPooling() represents max pooling, and pool size is the pooling kernel size; The pooling features are refined using a one-dimensional convolution of length 3 to ensure channel consistency, and the output bearing fault local features F3 = ReLU(F2*W2+b2)∈R are 256×128. 256×128 ; Where W2 is a one-dimensional convolution and b2 is a bias term; S34. Quaternion modeling transformation: The local features of the 128-channel bearing fault are divided into four parts: real part r, imaginary parts i, j, k, and each part is 32-dimensional; thus, a quaternion q is defined, expressed by the formula: q = r + a1i + a2j + a3k; Among them, a1, a2, and a3 are the three corresponding components of the imaginary part; Then, by performing a linear mapping on the quaternion, we obtain the mapping for each part as follows: r′=rW r -iW r -jW j -kW k ; i′=rW i +iW r +jW k -kW j ; j′=rW j -iW k +jW r +kW i ; k′=rW k +iW j -jW i +kW r ; Among them, W r W i W j W k It is the weight matrix of each part of the quaternion; S35, Final Output Bearing Fault Quaternion Characteristics F q =[r',i',j',k']∈R 256×128 .
4. The bearing noise reduction fault diagnosis method based on a multi-cascaded cross-dimensional dynamic interactive Transformer according to claim 1, characterized in that, Step S4 specifically includes: S41. Determine the basic parameters, including learning rate, batch size, and number of iterations; S42. Construct a multi-scale cascaded cross-dimensional interactive convolutional kernel, which adopts three parallel convolutional paths. Each path consists of multiple sets of cascaded structures, and each set of structures is combined with horizontal convolution, vertical convolution and square convolution of different sizes. S43. Based on multi-scale cascaded cross-dimensional interactive convolution kernels, construct a multi-cascaded cross-dimensional interactive ScConv module, and use the bearing fault quaternion features obtained in step S3 as input to capture features of different frequencies. S44. Construct a dynamic quaternion dual-path Transformer module, using the output of the multi-cascaded cross-dimensional interactive ScConv module as input, to focus on key fault characteristics in a noisy environment.
5. The bearing noise reduction fault diagnosis method based on a multi-cascaded cross-dimensional dynamic interactive Transformer according to claim 4, characterized in that, Step S43 specifically includes: S431, the multi-cascaded cross-dimensional interaction ScConv module adopts a three-branch convolutional path cascaded structure, and uses a cross-attention mechanism in each cascaded structure; the input feature of each cascaded structure is F. in =F q ∈R H×W×C Where H represents the time step (i.e., feature map height), W represents the channel width (i.e., feature map width), C represents the number of channels, and F represents the feature map height. q Quaternion characteristics of bearing failure; S432, the first cascaded structure is designed for modeling high-frequency, short-duration sudden fault signals. It employs a 1×3 horizontal convolution to model the sliding pattern within a small window on the time axis, a 3×1 vertical convolution to focus on modeling local perturbations in the spatial dimension of the feature map, and a 3×3 square convolution to detect local structural abrupt changes in the feature map. The formula is expressed as: Among them, F 1×3 F 3×1 F 3×3 The output features of 1×3 horizontal convolution, 3×1 vertical convolution, and 3×3 square convolution are respectively; W 1×3 1×3 horizontal convolution kernel, W 3×1 3×1 vertical convolution kernel, W 3×3 The kernel is a 3×3 square convolution kernel; α and β are the kernel index variables, representing the position of the kernel element in the convolution operation; h, w, and c are the feature map height, width, and channel index, respectively; After obtaining the output features of each convolution, a guided cross-attention mechanism is applied to F... 3×3 As the foundation for guiding the main path, specifically the query in the cross-attention mechanism, one-dimensional convolution maps high-dimensional features to a low-dimensional space, while concatenating F... 1×3 F 3×1 As auxiliary information, it generates the key and value in the cross-attention mechanism; the formula is expressed as: Q1=Conv(F 3×3 )∈R H×W×m ; F a =[F 1×3 ,F 3×1 ]∈R H×W×2C ; K1=Conv(F a )∈R H×W×m ; V1=Conv(F a )∈R H×W×C ; Where m is the guiding cross-attention dimension, F a For F 1×3 F 3×1 The fusion features are: Q1, K1, and V1, which are the query, key, and value guiding the cross-attention mechanism in the first cascade structure, respectively; Conv(.) is a one-dimensional convolution operation. Q1 and K1 are then reshaped into two-dimensional tensors, the attention weight A1 is calculated, and it is then weighted and fused with V1 to reshape the original size. Finally, a 3×3 convolution is used for local guided enhancement, resulting in the output features of the first cascaded structure; the formula is expressed as: F x =Conv 3×3 (F n ); Where softmax(.) represents the softmax activation function, Conv 3×3 (.) represents a 3×3 convolution; F n To reshape the features to the desired size, F x The output features of the first cascaded structure; d represents the feature dimension at each position; S433. The second cascaded structure is used to extract mid-frequency feature information. Its internal structure is similar to the first cascaded structure, but it uses a 1×5 horizontal convolution to extract local features along the time series direction, a 5×1 vertical convolution to extract amplitude fluctuations in different directional channels, and a 5×5 square convolution to comprehensively perceive local and directional joint changes, respectively, to obtain the output feature F. 1×5 F 5×1 F 5×5 ; Meanwhile, the second cascade structure uses a standard cross-attention mechanism, that is, through F respectively 1×5 F 5×1 F 5×5 Calculate the Query, Key, and Value in the standard cross-attention mechanism; the formula is expressed as: Q2=BN Q (F 1×5 )∈R H×W×d ; K2=BN K (F 5×1 )∈R H×W×d ; V2=BN v (F 5×5 )∈R H×W×d ; Among them, BN Q BN K BN v All are batch normalized; Q2, K2, and V2 are the query, key, and value of the standard cross-attention in the second cascade structure, respectively; The attention weights A2 are calculated using Q2 and K2, and the output features F of the second cascaded structure are finally obtained. y The formula is expressed as: F y =A2·V2; S434, the third cascaded structure, is used for multi-directional sensing and modeling of long-period, high-amplitude oscillation characteristics in bearing signals. Its internal structure is similar to the first cascaded structure, but it uses 1×7 horizontal convolution, 7×1 vertical convolution, and 7×7 square convolution, respectively. The features output by each convolution are denoted as F. 1×7 F 7×1 F 7×7 ; Then first F 1×7 F 7×1 The splicing results in the splicing feature F. b Then, a low-rank decomposition cross-attention mechanism is used to decompose F. 7×7 As the main path information is used for query calculation, the concatenated feature F is used. b As auxiliary information, the keys and values are calculated, dynamically filtered and weighted through a low-rank decomposition cross-attention mechanism, and then channel-based dimensionality reduction projection is performed. The formula is expressed as: F b =[F 1×7 ,F 7×1 ]∈R H×W×2C ; Finally, the attention weight A3 is calculated using Q3 and K3, and the output feature F of the third cascade structure is obtained. z The formula is expressed as: F z =A3·V3; S435. A multi-scale gating selection mechanism is used to weight and fuse the output features of each branch cascade structure to obtain multi-scale fused features. Then, based on spatial attention mechanism, channel attention mechanism and integral-differential interaction layer, redundancy suppression is performed on the multi-scale fused features to finally obtain the output features Y of the multi-cascade cross-dimensional interactive ScConv module. ScConv .
6. The bearing noise reduction fault diagnosis method based on a multi-cascaded cross-dimensional dynamic interactive Transformer according to claim 5, characterized in that, The multi-scale gating selection mechanism in step S435 is as follows: Global average pooling is performed on the output features of the three-branch cascade structure to obtain a compressed representation g of the output features. p The formula is expressed as: g p =GAP(F p ),p=x,y,z; GAP stands for global-average-pooling. For each output feature, an independent gating network is set to extract local weights w p The formula is expressed as: w p =sigmoid(W p ·g p +b p ); Among them, w p ∈(0,1), sigmoid(.) is the sigmoid activation function, W p and b p These are learnable parameters; Then, a higher-order selector is used for a global comparison, and g is selected. x ,g y ,g z The splicing forms a comprehensive representation g concat =[g x ,g y ,g z Then, a softmax network is used to predict the global selection probability, and the global competitive selection of the output features of the three-branch cascaded structure is learned. The formula is expressed as: s p =softmax(W s ·g concat +b s ) p ; Among them, W s b s For learnable weights; g concat It is the concatenated global feature, s p These are the weight components for the p-th branch; the softmax output is a 3-dimensional vector, which are s x ,s y ,s z ∈(0,1); By combining the local weights and global selections of each cascaded structure, the final fusion weight α of each cascaded structure is obtained. p The formula is expressed as: Finally, the output features of each branch cascade structure are weighted and fused according to the fusion weights to obtain the multi-scale fusion features.
7. The bearing noise reduction fault diagnosis method based on a multi-cascaded cross-dimensional dynamic interactive Transformer according to claim 5, characterized in that, The redundancy suppression of multi-scale fused features in step S435 specifically involves: Denote the multi-scale fusion feature F fusion ∈R E×F×H Where E is the height, F is the width, and H is the number of channels; the multi-scale fusion features are sequentially processed through spatial attention and channel attention mechanisms to suppress redundancy from both spatial and channel perspectives, as expressed in the formula: Y o (e,f,g)=Y s (e,f,g)·Y t (e,f,g); Y s (e,f,g)=Y(e,f,g)·A s (e,f); Y t (e,f,g)=Y(e,f,g)·A t (g); Where Y(e,f,g) is the convolutional feature of the multi-scale fusion feature at position (e,f) and channel g, Y t (e,f,g),Y s (e,f,g),Y o (e,f,g) represent the channel-weighted feature, spatial-weighted feature, and weighted output convolutional feature of the multi-scale fusion feature at positions (e,f) and channel g, respectively; A s (e,f) is the spatial attention weight at position (e,f); A t (g) is the attention weight of channel g; Next, the Sobel differential operator is used to enhance the edges of the spatially weighted features, and the Gaussian integral operator is used to denoise the channel-weighted features. The formula is expressed as follows: F diff =DepthwiseConv 2D (Y s ,K diff ); F int =DepthwiseConv 2D (Y t ,F diff ); Among them, K diff K is a trainable Sobel differential convolution kernel used for gradient extraction of spatial paths; int Trainable Gaussian convolution kernels are used for channel smoothing; DepthwiseConv 2D For depthwise convolution; F diff F int These are the spatial weighted features after edge enhancement and the channel weighted features after denoising, respectively. Define the channel dimension to learn the gate weights g w After normalization, F is obtained respectively. diff F int The corresponding fusion gating weights are expressed by the formula: g diff =sigmoid(g w ); g int =1-g diff ; Apply the fusion gating weights to F respectively diff Fi nt, get: F′ diff =g diff ⊙F diff ; F′ int =g int ⊙F int ; Where ⊙ represents the gating position multiplication mechanism; F' diff 、F' int These are the spatial weighted features and channel weighted features after gating enhancement, respectively; Finally, feature reconstruction and interaction are performed, and the fusion result is used as an enhancement weighting term to apply to the spatial weighted feature Y. s Channel weighted feature Y t The output features Y of the ScConv module with multi-level cross-dimensional interaction are obtained. ScConv The formula is expressed as: Y ScConv =Y s ·(1+F′ diff )+Y t ·(1+F′ int )。 8. The bearing noise reduction fault diagnosis method based on a multi-cascaded cross-dimensional dynamic interactive Transformer according to claim 4, characterized in that, Step S44 specifically includes: S441, Output feature Y of the ScConv module with multi-level cross-dimensional interaction ScConv As input, Y ScConv Convert the input to quaternion form, dividing it into a real part r and three imaginary parts i, j, k; S442. Then, using a dynamic quaternion multi-head attention mechanism, a query and key are assigned to each part of the input, and an attention score is calculated, i.e., the following definition is made. Let r, i, j, and k be the queries for the hd-th attention heads, respectively. The key for the hd-th attention head is r, i, j, k, and the score is the dynamic quaternion multi-head attention score. hd for: S443. Using a dynamic routing mechanism, the output of each head is averaged and pooled, then concatenated and fed into the scorer to generate a fusion weight α. The weighted fusion output of all heads is then expressed by the formula: Where HD represents the total number of attention heads, i.e., the number of parallel subspaces in multi-head attention. hd This represents the hd-th attention head currently being processed; it is an index variable used for head-by-head computation. S444. After the dynamic quaternion multi-head attention mechanism layer, a residual connection and layer normalization are performed sequentially to standardize the entire feature dimension. The formula is expressed as: Z1=Y ScConv +Y out ; V1 = LayerNorm(Z1); Among them, Y ScConv Z1 represents the original features before entering the dynamic quaternion dual-path Transformer; Z1 represents the result of the first residual connection; V1 represents the output of the first layer normalization. S445. Design a dual-path feedforward network, performing parallel modeling and fusion representation in the time and frequency domains; the time-domain branch uses two quaternion fully connected layers to construct a nonlinear time-series transform, and the time-domain output is denoted as f. time The frequency domain branch uses a Fourier transform layer to capture peaks in the spectrum, expressed by the formula: in, and These are the real and imaginary parts of the spectrum, respectively. Then concatenate the real and imaginary parts in the frequency domain to obtain The frequency domain output f is obtained after passing through two quaternion fully connected layers. freq ; S446. Finally, the time-domain output and frequency-domain output are fused through a gated fusion layer to obtain the time-frequency domain fusion feature f. out The formula is expressed as: f out =Gate·f time +(1-Gate)·f freq ; Where Gate is the gate function of the gated fusion layer; S447. After obtaining the time-frequency domain fusion features, residual connection, addition, and layer normalization are performed sequentially, as expressed by the formula: Z2=V1+f out ; F out =LayerNorm(Z2); Where Z2 is the result of the second residual connection; F out It is the final output feature of the noise-resistant bearing fault diagnosis model.
Citation Information
Cited By
Transform fault diagnosis interpretation method and system based on multilayer attention fusion
CN122196703A
