A rolling bearing fault diagnosis method based on time-frequency fusion network and frequency band structure attention
By constructing a TFBF-Net model and using one-dimensional vibration signals and CWT time-frequency diagrams, frequency-scale position-related attention weights are generated, which solves the accuracy and stability problems of existing bearing fault diagnosis methods in complex environments and achieves efficient fault diagnosis.
Patent Information
- Application Number
- CN202611393774.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-09
- Publication Date
- 2026-11-24
AI Technical Summary
Existing bearing fault diagnosis methods are difficult to generalize stably under complex operating environments, do not fully utilize the complementary relationship between time-domain impact information and frequency band energy structure, and suffer from data leakage and inaccurate attention weight generation.
A time-frequency fusion network and frequency band structure attention are adopted. By constructing a TFBF-Net model, one-dimensional vibration signal and CWT time-frequency map are used. The time-series impact-sequence modeling branch and CWT frequency band structure feature extraction branch are combined to generate frequency-scale location-related attention weights for fault diagnosis.
It improves the accuracy and stability of bearing fault diagnosis, balances feature discrimination capability and structural simplicity, and reduces the risk of model overfitting.
Smart Images

Figure CN123155206A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of industrial artificial intelligence, vibration measurement signal processing and rotating machinery fault diagnosis technology, and specifically relates to a rolling bearing fault diagnosis method based on time-frequency fusion network and frequency band structure attention. Background Technology
[0002] Rolling bearings are critical fundamental components in motors, gearboxes, rail transportation, wind power equipment, machine tool spindles, and various rotating machinery. Their health status directly affects equipment operation safety, production continuity, and maintenance costs. When local defects occur in the bearing's inner ring, outer ring, rolling elements, or cage, transient impacts, modulation sidebands, resonance responses, and energy migration phenomena that change with operating conditions are typically generated in the vibration measurement signal. Therefore, bearing condition monitoring based on vibration signals has become an important technical approach in the field of industrial fault diagnosis.
[0003] Traditional bearing fault diagnosis methods typically rely on manually designed time-domain, frequency-domain, or time-frequency-domain features such as root mean square (RMS), kurtosis, envelope spectrum, wavelet coefficients, empirical mode decomposition (EMD), and variational mode decomposition (VMD), combined with a classifier to complete fault identification. While these methods offer some interpretability, their diagnostic performance is easily affected by parameter selection, operating condition variations, noise interference, and expert experience, making stable generalization difficult in complex operating environments.
[0004] In recent years, one-dimensional convolutional neural networks, recurrent neural networks, attention mechanisms, and Transformer structures have been widely used in bearing fault diagnosis. The original one-dimensional vibration sequence can preserve the timing and amplitude changes of the impact, while the continuous wavelet transform time-frequency plot can reflect the energy distribution in time and frequency band; these two representations are complementary. However, existing methods still have the following shortcomings:
[0005] First, some methods only use the original vibration waveform or only use the time-frequency diagram, without making full use of the complementary relationship between time-domain impact information and frequency band energy structure.
[0006] Second, some dual-branch fusion models introduce complex interactive modules, resulting in a high number of model parameters and a high risk of overfitting, making it difficult to balance feature discrimination ability and structural simplicity.
[0007] Third, common random window-level partitioning methods may cause adjacent window samples from the same original collection record to enter the training set and test set at the same time, resulting in data leakage and making the test results too optimistic.
[0008] Fourth, when global pooling is performed on the CWT feature map along both the time and frequency scale dimensions, the independent responses at each frequency scale position are compressed, making it difficult to generate attention weights that vary with the frequency scale position.
[0009] Therefore, there is a need for a rolling bearing fault diagnosis method that combines time-domain impact information with time-frequency representation and retains frequency-scale position-related information during attention weight generation. Summary of the Invention
[0010] The purpose of this invention is to provide a rolling bearing fault diagnosis method based on time-frequency fusion network and frequency band structure attention. By using complementary representations in the time domain and time-frequency domain and frequency scale position-related attention recalibration, the accuracy of bearing fault diagnosis can be improved.
[0011] The technical solution of the present invention is as follows:
[0012] A method for fault diagnosis of rolling bearings based on time-frequency fusion networks and frequency band structure attention includes the following steps:
[0013] S1. Obtain the original one-dimensional vibration measurement signal of the rolling bearing. Before the sliding window is segmented, determine the training, verification and test subsets and generate vibration windows independently in each subset. Calculate the mean and standard deviation of each window and perform Z-score standardization. Perform continuous wavelet transform on the same standardized window to construct a one-to-one paired one-dimensional time-domain input and two-dimensional CWT input. The paired inputs inherit the same subset.
[0014] S2. Construct a TFBF-Net dual-branch fault diagnosis model; the model includes a parallel temporal impact-sequence modeling branch and a CWT frequency band structure feature extraction branch, a feature splicing layer, and a lightweight dual-domain fusion classifier; wherein, the temporal impact-sequence modeling branch is used to extract local impact patterns, bidirectional temporal dependencies, and long-distance time relationships in one-dimensional vibration signals, and the CWT frequency band structure feature extraction branch uses a frequency band structure attention module and a channel recalibration module to extract time-frequency domain frequency band structure features, and the feature vectors output by the two branches are spliced and input into the lightweight dual-domain fusion classifier;
[0015] S3. Input the bimodal samples corresponding to the training subset into TFBF-Net, optimize the model parameters using the AdamW optimizer and the labeled smooth cross-entropy loss function, and save the model parameters based on the diagnostic accuracy of the validation set.
[0016] S4. Load the saved optimal model parameters, construct a dual-modal input for the test set samples or the rolling bearing vibration signal to be diagnosed according to the same data processing method as the training phase, and input it into TFBF-Net for forward propagation. Through dual-branch feature extraction, feature splicing and classification output, obtain the corresponding bearing health status or fault type.
[0017] Preferably, in step S1, the window length and step size are both 1024 sampling points, and the windows are generated independently within each predetermined subset; the mean and standard deviation of each window are calculated and Z-score standardized, and the one-dimensional input of the same window has the same subset affiliation as the CWT input.
[0018] Preferably, in step S1, a complex Morlet wavelet of size 1.5-1.0 is used, 64 linearly increasing scales are selected, the amplitude of the complex wavelet coefficients is taken to obtain a real number representation, and 64 time positions are uniformly selected on each scale to construct a single-channel CWT input with a size of 1×64×64; and a paired input is formed with the corresponding 1×1024 normalized vibration sample.
[0019] Preferably, in step S2, the temporal shock-sequence modeling branch sequentially includes a one-dimensional convolutional Stem, a transposed layer, a BiGRU, a lightweight Transformer encoder, a temporal average pooling layer, and a temporal projection head composed of a linear layer, a batch normalization layer, and a ReLU activation layer.
[0020] Preferably, the one-dimensional convolutional Stem includes three sets of Conv1D-BN-ReLU convolutional blocks with kernel sizes of 15, 9, and 7, stride of 2, and output channels of 32, 48, and 64, respectively; the BiGRU has 48 hidden units and adopts a bidirectional structure; the Transformer encoder includes one coding layer, four attention heads, and a feedforward network with a dimension of 160.
[0021] Preferably, in step S2, the CWT frequency band structure feature extraction branch sequentially includes a lightweight two-dimensional convolutional feature extractor, a frequency band structure attention module, a channel recalibration module, an adaptive average pooling layer, and a CWT projection head.
[0022] Preferably, the frequency band structure attention module performs average pooling only along the time dimension of the high-level CWT feature map, retaining the structural information of the frequency band dimension, and then generates frequency band attention weights through a lightweight point-by-point mapping network.
[0023] Preferably, the calculation process of the frequency band structure attention module specifically includes:
[0024] S41. Perform average pooling only along the time dimension on the high-level CWT feature map U to obtain the frequency band context tensor M.
[0025] S42. Input the frequency band context tensor M into a lightweight mapping network consisting of pointwise convolution, ReLU activation and pointwise convolution, and generate the frequency band attention weights A through the Sigmoid function.
[0026] S43. Broadcast the frequency band attention weight A along the time dimension and multiply it element-wise with the high-level CWT feature map U to obtain the frequency band recalibration feature map U′.
[0027]
[0028]
[0029]
[0030] Where M represents the frequency band context tensor, W1 and W2 represent learnable pointwise mappings, δ represents the ReLU function, and σ represents the Sigmoid function; the frequency band attention weights A are shared at temporal positions.
[0031] Preferably, in step S2, both the temporal feature vector and the frequency band structure feature vector are 128-dimensional, and are combined into a 256-dimensional fusion feature through a feature splicing layer; the lightweight dual-domain fusion classifier includes a batch normalization layer, a ReLU activation layer, a Dropout layer, a fully connected layer, and a Softmax output layer in sequence.
[0032] Preferably, in step S3, the training batch size is 64, the number of training rounds is 50, the initial learning rate is 2×10⁻³, the Dropout ratio is 0.2, the label smoothing coefficient is 0.02, and the AdamW optimizer is used. Repeated experiments are conducted using random seeds of 42, 52, 62, 72, and 82. For each training iteration, the model parameters are saved based on the diagnostic accuracy on the validation set. Tests are then performed, and the model performance is evaluated using the mean and standard deviation of the five test results.
[0033] Compared with the prior art, the present invention has the following beneficial technical effects:
[0034] First, the present invention uses both the original vibration sequence and the CWT time-frequency diagram as input, and can combine the impact time, amplitude fluctuation, periodic modulation information and frequency band energy distribution to improve the bearing fault characterization capability.
[0035] Second, the present invention determines the training, validation and testing subsets before windowing, and ensures that the two inputs in the same vibration window inherit the same subset affiliation, so as to achieve consistent use of paired inputs in the model training and evaluation process.
[0036] Third, the temporal branches of this invention are constructed in the order of local shock extraction, bidirectional sequence modeling, and global relation refinement, which can take into account both local shock patterns and long-distance time dependencies.
[0037] Fourth, this invention aggregates high-level CWT features only along the time dimension, preserves independent responses for each channel and frequency scale location, generates attention weights shared at the time location, and adaptively recalibrates scale-related features.
[0038] Fifth, this invention directly concatenates two 128-dimensional branch features into a 256-dimensional feature without introducing additional learnable parameters for the concatenation operation; in the GDUPT embodiment, its average diagnostic accuracy is higher than that of the control model that uses element-wise addition and learnable gating fusion.
[0039] Sixth, in five repeated experiments on the GDUPT dataset, the diagnostic accuracy of the present invention was 88.45±0.81%, and the macro-average F1 score was 88.27±0.41%; compared with the model that removes the frequency band structure attention module, the average diagnostic accuracy is improved by 2.66 percentage points. Attached Figure Description
[0040] Figure 1 This is a flowchart of the rolling bearing fault diagnosis method based on time-frequency fusion network and frequency band structure attention provided in the embodiment of the present invention. It shows the overall process of dual-modal sample construction, dual-branch model construction, model training and optimization, and model testing and diagnostic output.
[0041] Figure 2 This is a branch structure diagram of timing shock-sequence modeling provided in an embodiment of the present invention;
[0042] Figure 3 This is a branch structure diagram of CWT frequency band structure feature extraction provided in an embodiment of the present invention;
[0043] Figure 4 This is a schematic diagram of the frequency band structure attention module provided in an embodiment of the present invention;
[0044] Figure 5 This is an example of standardized vibration signals and CWT time-frequency diagrams of BJTU-RAO bearings under different bearing conditions in this embodiment of the invention;
[0045] Figure 6 This section compares the diagnostic accuracy on the GDUPT dataset and shows the diagnostic accuracy curves under different training sample ratios. Figure 6 (a) Comparison of accuracy under the condition of full training samples. Figure 6 (b) shows the results under different training sample ratios;
[0046] Figure 7 This is a confusion matrix diagram of the present invention on the CWRU, SEU, BJTU, and GDUPT datasets;
[0047] Figure 8 This is a visualization of t-SNE features on the CWRU, SEU, BJTU, and GDUPT datasets according to an embodiment of the present invention;
[0048] Figure 9This is a frequency band attention weight distribution diagram under different BJTU bearing states in an embodiment of the present invention;
[0049] Figure 10 This is a t-SNE visualization of different feature stages on the GDUPT dataset according to an embodiment of the present invention;
[0050] Figure 11 This is a graph showing the noise sensitivity and performance degradation analysis of this invention on the GDUPT dataset;
[0051] Figure 12 This is a graph showing the relationship between diagnostic accuracy and model complexity on the GDUPT dataset. The horizontal axis represents floating-point operations (FLOPs), the vertical axis represents diagnostic accuracy, and the size of the bubbles represents the number of trainable parameters. Detailed Implementation
[0052] To make the objectives, technical solutions, and beneficial effects of this invention clearer, the technical solutions of the embodiments of this invention will be described in more detail below with reference to the accompanying drawings. The described embodiments are only some, not all, of the embodiments of this invention. Other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are all within the protection scope of this invention.
[0053] Example 1
[0054] like Figure 1 As shown, this embodiment constructs time-domain input and CWT input for the same standardized vibration window, extracts complementary features through dual branches, retains the frequency-scale position-related response and generates attention weights in the CWT branch, and outputs the bearing health status or fault type after feature splicing and classification.
[0055] S1. Perform data acquisition and construct dual-modal samples.
[0056] This embodiment uses bearing data from BJTU-RAO, CWRU, SEU, and GDUPT. BJTU-RAO uses a subset of gearbox bearings from the bogie data; SEU uses a subset of bearings from the transmission system simulation platform; and GDUPT is a proprietary bearing vibration dataset. The GDUPT sampling rate is 48 kHz, and the rotational speed is 1500 rpm. In the accompanying figures, "BJTU" is an abbreviation for the BJTU-RAO dataset.
[0057] Before generating windows, training, validation, and test subsets are determined, and windows are segmented within each subset. After window generation, all windows are not randomly assigned to the three subsets; each vibration window and its CWT representation always inherit the same subset affiliation.
[0058] A window with length L = 1024 sampling points and step size h = 1024 sampling points is used, and the signal is independently segmented within each subset. For a continuous vibration signal s, the i-th window is defined as:
[0059]
[0060] Calculate the mean μᵢ and standard deviation σᵢ for each window sample, and then perform Z-score standardization:
[0061]
[0062] Where i is the window index and ε is a minimal constant to prevent division by zero. A continuous wavelet transform is performed on the standardized one-dimensional vibration sample to obtain the CWT time-frequency plot:
[0063]
[0064] Where a is the scale factor, b is the translation factor, ψ is the mother wavelet, and * denotes complex conjugate. This embodiment uses a complex Morlet wavelet cmor1.5-1.0, with a bandwidth parameter of 1.5 and a normalized center frequency parameter of 1.0. For the GDUPT embodiment, the sampling frequency is 48000 Hz, and the bearing speed is 1500 rpm; the lower limit of the analysis frequency is 64 Hz, and the upper limit is 12000 Hz, with an adjacent scale interval of approximately 11.84126984. The corresponding frequencies at each scale decrease from 12000 Hz to 64 Hz as the scale increases; the scales are uniformly distributed, while the corresponding frequencies are non-uniformly distributed. Continuous wavelet transform uniformly selects 64 time positions at each scale, forming a 64×64 scale-time amplitude map. A 1×64×64 single-channel input is constructed according to the image normalization process without additional image scaling.
[0065] S2. Construct a TFBF-Net dual-branch fault diagnosis model.
[0066] like Figure 1 As shown, TFBF-Net includes a temporal shock-sequence modeling branch, a CWT frequency band structure feature extraction branch, a feature splicing layer, and a lightweight dual-domain fusion classifier. The input to the temporal branch is a one-dimensional vibration sample of size 1×1024, and the input to the CWT branch is a time-frequency plot of size 1×64×64.
[0067] Let xᵢ∈R¹×ᴸ represent the i-th normalized vibration sample, and Xᵢ∈R¹×ᶠ×ᵀ represent the CWT time-frequency plot paired with it. The outputs of the two branches are expressed as follows:
[0068]
[0069]
[0070] Where T(·) and C(·) represent the temporal shock-sequence modeling branch and the CWT frequency band structure feature extraction branch, respectively, and fᵢ represents the dual-domain fusion feature of the corresponding sample.
[0071] like Figure 2 As shown, the temporal impact-sequence modeling branch includes three sets of Conv1D-BN-ReLU convolutional blocks, a transposed layer, a BiGRU, a lightweight Transformer encoder, a temporal average pooling layer, and a projection head consisting of a linear layer, a batch normalization layer, and a ReLU activation layer. The kernel sizes of the three sets of convolutional blocks are 15, 9, and 7, respectively, with a stride of 2, and the number of output channels are 32, 48, and 64, respectively; their output sequence lengths are 505, 249, and 122, respectively. After transposition, a 122×64 sequence feature is obtained. The BiGRU has 48 hidden units and adopts a bidirectional structure, outputting a 122×96 feature. A Transformer encoder with 4 attention heads and a 160-dimensional feedforward network further models long-distance temporal relationships. After temporal average pooling and projection, a 128-dimensional temporal feature vector is obtained. Figure 2 The temporal feature symbol f_r in the figure corresponds to fᵗ in this paper; the length and number of channels in the convolution output annotation are consistent with those in Table 1, and the dimensions omitted or abbreviated in the figure are interpreted according to the corresponding module.
[0072] The output of the l-th one-dimensional convolutional block is:
[0073]
[0074] Among them, Conv1D l (·) represents the l-th one-dimensional convolution, BN(·) represents batch normalization, and φ represents the ReLU activation function. The bidirectional representation of BiGRU at time t is:
[0075]
[0076] Among them, h t and h t These represent the hidden states of the forward and backward GRUs at their respective time points.
[0077] The update gate, reset gate, candidate hidden state, and current hidden state for each GRU direction are as follows:
[0078]
[0079]
[0080]
[0081]
[0082] Where σ represents the Sigmoid function, and ⊙ represents element-wise multiplication. For the BiGRU output feature sequence Hᵇ, the query matrix, key matrix, value matrix, and scaled dot product attention of the Transformer encoder are:
[0083]
[0084]
[0085] in, , and Denotes the learnable projection matrix, d k This represents the dimension of the key vector. The temporal feature vector is:
[0086]
[0087] like Figure 3 As shown, the CWT branch uses 2D convolution, depthwise convolution, and pointwise convolution to extract local scale-time features. The number of channels is expanded sequentially from 1 to 24, 32, 48, and 72, while the spatial size is reduced sequentially from 64×64 to 32×32 and 16×16, resulting in a high-level feature map U with a channel-priority size of B×72×16×16. After passing through frequency band structure attention, SE channel recalibration, adaptive average pooling, and a projection head, a 128-dimensional feature vector is output. The branch structure and dimensions are shown in Table 1. Figure 3 The convolution output is labeled with "frequency scale dimension × time dimension × number of channels". Therefore, 16×16×72 in the figure and 72×16×16 in the channel-first format of this paper represent the same feature map. Figure 3 The “72” after adaptive average pooling indicates that each of the 72 channels retains a pooling value, and its spatial size is 1×1, which flattens out to a 72-dimensional vector.
[0088] The lightweight 2D convolutional feature extractor The output is represented as:
[0089]
[0090] Where B represents the batch dimension, C represents the number of channels, and F′ and T′ represent the frequency scale dimension and time dimension after downsampling, respectively.
[0091] Furthermore, a frequency band structure attention module is constructed in the CWT frequency band structure feature extraction branch.
[0092] like Figure 4As shown, for the high-level CWT feature map U, instead of compressing the time dimension and the frequency band dimension simultaneously, average pooling is performed only along the time dimension to obtain the frequency band context tensor M. M is input into a lightweight pointwise mapping network and the frequency band attention weights A are generated by the Sigmoid function; A is broadcast along the time dimension and multiplied element-wise with U to obtain the frequency band recalibrated feature map U′.
[0093]
[0094]
[0095]
[0096] Where M∈Rᴮ×ᶜ×ᶠ′ is the context tensor that preserves the channel and frequency scale positions, W1 and W2 are learnable pointwise mappings, δ is the ReLU function, and σ is the Sigmoid function. The weights vary with the channel and frequency scale positions and are shared in the time dimension; the Sigmoid weights are multiplied with the features to achieve adaptive recalibration of the scale-related response. CWT branch features are obtained through SE channel recalibration, global average pooling, and projection head. For a B×72×16×16 input, average pooling is performed only along the time dimension to obtain a B×72×16 frequency band context; after the weights are broadcast and multiplied along 16 time positions, the output is still B×72×16×16. Subsequent global average pooling simultaneously aggregates the two spatial dimensions to obtain B×72×1×1 features, which are then flattened and projected from 72 dimensions to 128 dimensions before being fused with the temporal branch features.
[0097]
[0098] Furthermore, the dual-domain features output from the two branches are fused and classified.
[0099] 128-dimensional time series feature vector and 128-dimensional frequency band structure eigenvectors By splicing the features together, a 256-dimensional fused feature is obtained. The lightweight dual-domain fusion classifier consists of a batch normalization layer, a ReLU activation layer, a Dropout layer, a fully connected layer, and a Softmax output layer, which outputs the class probability of each bearing's health status or fault type.
[0100]
[0101]
[0102] S3. Perform dataset partitioning, model training, and optimization.
[0103] The lightweight dual-domain fusion classifier outputs a class probability vector p, W o and bo These represent the weights and biases of the classification layer, respectively. The model training employs label smoothing as a target and cross-entropy loss.
[0104]
[0105]
[0106] Where K represents the number of fault categories, yᵢ represents the one-hot encoded true label, yᵢᴸˢ represents the target after label smoothing, pᵢ represents the prediction probability of the i-th class, and α represents the label smoothing coefficient.
[0107] This embodiment is implemented in PyTorch, using the AdamW optimizer, a cross-entropy loss function with a label smoothing coefficient of 0.02, a batch size of 64, 50 training epochs, an initial learning rate of 2×10⁻³, and a Dropout ratio of 0.2. Five independent training iterations were performed using random seeds of 42, 52, 62, 72, and 82 respectively. Model parameters were saved based on the diagnostic accuracy on the validation set for each training iteration, and the results were evaluated on the test set, reported as mean and standard deviation. The experiment used NVIDIA RTX A2000 hardware.
[0108] S4. Perform model testing and diagnostic output. After loading the final model parameters, input the dual-modal samples from the test set into TFBF-Net for forward propagation. For the rolling bearing vibration signal to be diagnosed, construct the corresponding one-dimensional time-domain input and two-dimensional time-frequency input according to the sliding window segmentation, Z-score normalization, and CWT conversion process described in step S1, and input them into the time-series impact-sequence modeling branch and the CWT frequency band structure feature extraction branch, respectively. The model obtains fused features through the feature splicing layer, and the lightweight dual-domain fusion classifier outputs the category probability of each health state or fault type. The category with the highest probability is taken as the diagnostic result, or alarm information can be output in combination with the confidence threshold.
[0109] Figure 5 The standardized vibration waveforms and paired CWT representations for each state of BJTU-RAO are given. Figure 6 (a) Showing the diagnostic accuracy of each model on the GDUPT dataset, TFBF-Net has a graphical accuracy of 88.45%, which is 3.44 percentage points higher than CNN-BiLSTM. Figure 6 (b) The accuracy changes under different training sample ratios are shown. TFBF-Net achieved the highest accuracy at all ratios shown in the figure. The statistics of five repeated experiments comparing the complete model and core modules are shown in Table 2.
[0110] Figure 7 Provide the confusion matrix for each dataset. Figure 8The t-SNE projections for the corresponding features are given. GDUPT categories 0 and 1 correspond to healthy conditions and rolling element failures, respectively, and there is considerable confusion between the two; categories 2 and 3 correspond to inner and outer ring failures, respectively. The above figure is used to illustrate category misclassification and feature distribution.
[0111] Figure 9 This demonstrates the frequency-scale location-related weights of different states in BJTU-RAO. Figure 10 The t-SNE projections of GDUPT at different characteristic stages are shown. The band weight curves reflect the model's differentiated recalibration at different scale locations; the contributions of the bibranch and attention modules to the diagnostic results are quantified by the ablation experiments in Table 2. Figure 9 The horizontal axis, 0-15, represents the indices of the 16 frequency band positions after downsampling, and... Figure 3 and Figure 4 F′=16 corresponds to; Figure 5 The scale index corresponds to the 64 scale positions of the input.
[0112] Figure 11 The diagnostic results after adding Gaussian white noise to the test samples in GDUPT are presented. Under 0 dB noise conditions, the model accuracy is 81.30%, indicating that the method can still extract effective fault features under the tested noise conditions. Figure 12 The diagram illustrates the relationship between diagnostic accuracy, floating-point computation, and parameter size for each model. The horizontal axis represents FLOPs, the vertical axis represents accuracy, and the bubble size indicates the number of trainable parameters. TFBF-Net achieves the highest diagnostic accuracy among the models shown. In a four-class classification configuration, the model has 179,718 trainable parameters. Under the aforementioned hardware and input settings, the model's inference throughput is 11,775.69 FPS, measured during the model's forward inference process.
[0113] Table 1. Main Structure and Feature Dimensions of the Model
[0114] Branches / Modules Main configuration Output size Time domain input Window length 1024 1×1024 Temporal Convolution 1 15 cores, 2 steps, 32 output channels 32×505 Temporal Convolution 2 9 cores, 2-step size, 48 output channels 48×249 Temporal Convolution 3 Core 7, step size 2, output channels 64 64×122 BiGRU Bidirectional, with 48 hidden dimensions in each direction. 122×96 Transformer 1 layer, 4 heads, 24 dimensions per head, 160 dimensions feedforward 122×96 Temporal pooling and projection Time-average pooling, 96 → 128 128 CWT Input 64 scales × 64 time positions 1×64×64 Two-dimensional convolution 1 3×3, 1→24 channels 24×64×64 2D Convolution 2 3×3, step size 2, 24→32 32×32×32 Depthwise convolution / Pointwise convolution 3×3 depthwise convolution, 1×1 pointwise convolution, 32→48 48×32×32 Depthwise convolution / Pointwise convolution 3×3 depthwise convolution with stride 2, 1×1 pointwise convolution, 48→72 72×16×16 Bandwidth attention and SE Time-dimensional pooling generates band weights, followed by SE 72×16×16 CWT Pooling and Projection Global average pooling to 72×1×1, flattened and projected from 72 to 128. 128 Fusion and Classification Concatenation, BN, ReLU, Dropout, Linear, Softmax 256→K
[0115] The convolutional output in Table 1 is represented by "number of channels × spatial size", and the temporal module output is represented by "time length × feature dimension". Figure 3 The 16×16×72 in the table is represented as "frequency scale dimension × time dimension × number of channels", corresponding to 72×16×16 in the table. The band attention module performs average pooling only along the time dimension, generating weights that vary with the channel and frequency scale positions. After broadcast multiplication, the feature map size remains unchanged. Global average pooling before classification compresses the spatial size to 1×1. K is the number of categories, and in this embodiment, K=4.
[0116] Example 2: Diagnostic Performance and Core Module Verification
[0117] The method was validated using GDUPT rolling bearing vibration data. The vibration signal sampling rate was 48 kHz, the bearing speed was 1500 rpm, and the diagnostic categories included healthy, rolling element fault, inner ring fault, and outer ring fault. Data was partitioned and windowed as described above. The training set, validation set, and test set contained 22804, 6512, and 3256 samples, respectively, with the test set containing 814 samples per category.
[0118] With fixed data partitioning and a common training configuration, each model underwent repeated experiments using the same set of five random seeds to evaluate diagnostic performance by testing the mean and standard deviation of the accuracy. The accuracy of the complete TFBF-Net was 88.45 ± 0.81%. Figure 6 (a) Show the diagnostic accuracy of each control model. Figure 6 (b) Shows the performance changes under different training sample ratios. TFBF-Net achieves the highest accuracy under each training sample ratio shown in the figure.
[0119] To verify the effects of dual-branch fusion and frequency band structure attention, control configurations were set up with only the timing branch, only the CWT branch, and the frequency band structure attention module removed, while other applicable settings remained the same. The results are shown in Table 2.
[0120] Table 2 Ablation results of core modules
[0121] Configuration Accuracy (%) Difference from the complete model (percentage points) Complete TFBF-Net 88.45±0.81 0.00 Timing branch only 87.26±0.77 −1.19 CWT branch only 79.20±2.39 −9.25 Remove BiGRU 80.60±1.29 −7.85 BiGRU replaced with unidirectional GRU 87.98±0.40 −0.47 Remove Transformer 82.92±1.39 −5.53 Remove band attention FBA 85.79±0.61 −2.66 Remove SE 87.95±1.24 −0.50 Remove FBA and SE simultaneously 87.10±3.35 −1.35 Element-by-element addition and fusion 87.21±0.44 −1.24 Learnable Gating Fusion 86.25±1.64 −2.20
[0122] In Table 2, "±" represents the standard deviation of the results from five repeated experiments. The full model improved the average accuracy by 1.19 and 9.25 percentage points compared to the temporal branch only and the CWT branch only, respectively, indicating that feature fusion of the two branches can improve the diagnostic performance under this test condition. Compared to the configuration that removes the frequency band structure attention module, the average accuracy improved by 2.66 percentage points, verifying the role of the attention mechanism that aggregates along the time dimension and preserves the frequency scale structure in fault feature extraction.
[0123] This embodiment constructs paired one-dimensional vibration samples and continuous wavelet transform time-frequency representations, extracts impact and sequence features using time-series branches, enhances the CWT branch's feature representation at different frequency scales using frequency band structure attention, and fuses the features from both branches to complete rolling bearing fault classification. Experimental results show that this method has good diagnostic performance under the tested dataset, training sample ratio, and noise conditions, and achieves fewer model parameters and higher model inference throughput through a lightweight network structure.
Claims
1. A method for fault diagnosis of rolling bearings based on time-frequency fusion networks and frequency band structure attention, characterized in that, Includes the following steps: S1. Obtain the original one-dimensional vibration signal of the rolling bearing. Before segmenting the sliding window, determine the training, verification, and test subsets and generate vibration windows independently within each subset. Calculate the mean and standard deviation of each window and perform Z-score standardization. Perform continuous wavelet transform on the same standardized window to construct a one-to-one paired one-dimensional time-domain input and two-dimensional CWT input. The paired inputs inherit the same subset affiliation. 2.S2. Construct a fault diagnosis model TFBF-Net, which includes a parallel temporal branch, a CWT feature extraction branch, and a fusion classifier; the temporal branch extracts the impact and sequence features of one-dimensional vibration samples; The CWT branch extracts a high-level scale-time feature map, performs average pooling only along the time dimension of the feature map, retains the response at each channel and frequency scale position, generates attention weights that vary with the channel and frequency scale position through learnable mapping and the Sigmoid function, broadcasts the weights along the time dimension and multiplies them element-wise with the high-level feature map to obtain the frequency band recalibration features. S3. Input the paired samples corresponding to the training subset into the model, train the model using the labeled smooth cross-entropy loss function, and save the model parameters based on the diagnostic accuracy of the validation set. S4. Following the same preprocessing method as the training phase, the vibration signal of the rolling bearing to be diagnosed is constructed into a paired one-dimensional vibration sample and CWT input. The feature vectors are obtained through the time-series branch and the CWT branch respectively. The two feature vectors are concatenated and input into the fusion classifier to output the bearing health status or fault type.
3. The rolling bearing fault diagnosis method according to claim 1, characterized in that, Step S1 specifically includes: S11. Before segmenting the sliding window, determine the training, validation, and test subsets. With a window of 1024 sampling points in both length and step size, generate one-dimensional vibration samples independently in each subset. S12. Record the subset to which each window belongs, so that the one-dimensional vibration samples and their CWT representations in the same window inherit the same subset affiliation. S13. Calculate the mean and standard deviation of each one-dimensional vibration signal sample, and perform Z-score standardization on the corresponding samples; for the i-th window sample... Its standardized samples ,in, and Let represent the mean and standard deviation of the i-th window sample, respectively, and ε represent a minimal constant to prevent division by zero; S14. Perform continuous wavelet transform on the standardized one-dimensional vibration sample containing 1024 sampling points. Use the complex Morlet wavelet of cmor1.5-1.0 and 64 linearly increasing scales. Take the amplitude of the complex wavelet coefficients to form a real number representation. Select 64 time positions evenly on each scale to generate a single-channel CWT input with a size of 1×64×64. Pair it with the corresponding one-dimensional vibration sample to form a dual-mode sample.
4. The rolling bearing fault diagnosis method according to claim 1, characterized in that, In step S2, the temporal shock-sequence modeling branch sequentially includes a one-dimensional convolutional Stem, a transposed layer, a bidirectional gated recurrent unit (BiGRU), a lightweight Transformer encoder, a temporal average pooling layer, and a temporal projection head composed of a linear layer, a batch normalization layer, and a ReLU activation layer.
5. The rolling bearing fault diagnosis method according to claim 3, characterized in that, The one-dimensional convolutional Stem comprises three sets of Conv1D-BN-ReLU convolutional blocks connected in sequence, with kernel sizes of 15, 9, and 7, stride of 2, and output channels of 32, 48, and 64, respectively. The BiGRU has a hidden dimension of 48 in each direction, concatenating the forward and backward hidden states at the same time position into a 96-dimensional representation. The Transformer encoder comprises one encoding layer, four attention heads, and a feedforward network with a dimension of 160. After temporal average pooling and temporal projection, it outputs a 128-dimensional temporal feature vector.
6. The rolling bearing fault diagnosis method according to claim 1, characterized in that, In step S2, the CWT frequency band structure feature extraction branch sequentially includes a lightweight two-dimensional convolutional feature extractor, a frequency band structure attention module, a channel recalibration module, an adaptive average pooling layer, and a CWT projection head; the lightweight two-dimensional convolutional feature extractor uses two-dimensional convolution, depthwise separable convolution, and pointwise convolution to extract local time-frequency patterns and outputs a high-level CWT feature map.
7. The rolling bearing fault diagnosis method according to claim 5, characterized in that, The calculation process of the frequency band structure attention module includes: S61. For high-level CWT feature maps Average pooling is performed only along the time dimension, according to Calculate the frequency band context tensor M that preserves the channel dimension and the frequency band dimension; S62. Input the frequency band context tensor M into a lightweight mapping network consisting of pointwise convolution, ReLU activation, and pointwise convolution, and then follow the steps outlined in the code. Generate the band attention weight A; S63. Broadcast the frequency band attention weight A along the time dimension, and according to... The high-level CWT feature map U is recalibrated; wherein the frequency band attention weights are shared in time position to preserve the frequency band structure in the continuous wavelet transform time-frequency map while aggregating time evolution information.
8. The rolling bearing fault diagnosis method according to claim 5, characterized in that, The channel recalibration module performs global pooling on the CWT feature map Ũ after band recalibration, obtains channel attention weights through the channel weight generation network, and multiplies the channel attention weights element-wise with the CWT feature map Ũ after band recalibration. After global average pooling and CWT projection head according to Output a 128-dimensional frequency band structure feature vector.
9. The rolling bearing fault diagnosis method according to claim 1, characterized in that, The temporal feature vector fᵗ output by the temporal impulse-sequence modeling branch and the frequency band structure feature vector fᶜ output by the CWT frequency band structure feature extraction branch are both 128-dimensional. After being processed by the feature splicing layer according to... A 256-dimensional fusion feature is formed; the lightweight dual-domain fusion classifier sequentially includes a batch normalization layer, a ReLU activation layer, a Dropout layer, a fully connected layer, and a Softmax output layer, and follows the... Output the class probability p.
10. The rolling bearing fault diagnosis method according to claim 1, characterized in that, Step S3 uses the AdamW optimizer and labeled smoothed cross-entropy loss function with a label smoothing coefficient of 0.02, a batch size of 64, 50 training rounds, and an initial learning rate of 2×10⁻³. The model parameters are saved for each training run based on the diagnostic accuracy of the validation set.
