A bearing fault diagnosis method based on time-frequency dual-flow complementarity and adaptive gating fusion
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NORTHEASTERN UNIV CHINA
- Filing Date
- 2026-03-17
- Publication Date
- 2026-05-12
AI Technical Summary
The existing Transformer architecture suffers from high computational load, incomplete single-modal feature extraction, and a lack of adaptability in multimodal fusion mechanisms during bearing fault diagnosis, resulting in low computational efficiency, insufficient information utilization, and inadequate robustness.
A time-frequency dual-stream complementary and adaptive gating fusion method is adopted. By constructing a time-frequency dual-stream feature extraction module and an adaptive gating fusion module, combined with a bidirectional recursive scanning mechanism and transfer learning, gating weights are dynamically generated for feature fusion, and the model parameters are optimized using a label smoothing regularization loss function.
It significantly improves the computational efficiency and real-time performance of the model, enhances the comprehensiveness and robustness of fault diagnosis, and strengthens the anti-interference ability and generalization performance under complex working conditions.
Smart Images

Figure CN121859201B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent fault diagnosis technology, and relates to a bearing fault diagnosis method based on the fusion of time-frequency dual-stream complementarity and adaptive gating. Background Technology
[0002] With the deepening development of the Industrial Internet and intelligent manufacturing, health monitoring of rotating machinery (such as wind turbines, aircraft engines, and industrial robots) has become a core element in ensuring production safety and efficiency. Rolling bearings, as key components in rotating machinery that bear loads and transmit motion, typically operate in extremely harsh environments and are highly susceptible to pitting, wear, or breakage. Statistics show that approximately 30% to 40% of rotating machinery failures are caused by bearing failure. Therefore, accurate and efficient diagnosis and classification of bearing failures are of significant industrial value in reducing maintenance costs and preventing catastrophic accidents.
[0003] Early bearing fault diagnosis primarily relied on signal processing techniques such as Fast Fourier Transform, Wavelet Transform, and Empirical Mode Decomposition. While these methods could extract certain physical features, they heavily depended on expert experience for parameter selection and were ill-suited to complex, non-stationary, and nonlinear industrial conditions. In recent years, data-driven methods, represented by deep learning, have gradually become mainstream. Convolutional neural networks utilize convolutional kernels to extract local features, and Long Short-Term Memory networks employ gating mechanisms to handle temporal dependencies. These methods have, to a certain extent, achieved end-to-end intelligent diagnosis, significantly improving the automation level of fault identification.
[0004] Currently, methods based on the Transformer architecture have become a research hotspot in the field of bearing fault diagnosis due to their powerful global modeling capabilities. Transformers utilize a self-attention mechanism to capture long-range dependencies in signals, overcoming the limitations of CNNs (limited receptive field) and LSTMs (low efficiency of serial computation). Simultaneously, some research has begun to explore combining time-frequency analysis techniques to convert one-dimensional vibration signals into two-dimensional spectrograms, utilizing mature models in the field of computer vision (such as...). , Transfer learning is used to solve the feature extraction problem in the case of small samples.
[0005] However, the above methods still face many challenges in practical industrial applications. First, mainstream models, represented by Transformer, are limited by quadratic computational complexity (…). First, existing methods suffer from low computational efficiency and high memory consumption when processing long-sequence bearing signals with high sampling rates, making it difficult to meet the real-time deployment requirements at the edge. Second, most existing studies are limited to modeling in a single feature domain (only time domain or only frequency domain), failing to simultaneously consider the phase evolution information of the time domain signal and the fine texture features of the frequency domain spectrogram, resulting in insufficient information utilization. Furthermore, methods involving multimodal fusion often employ simple splicing or linear weighting, lacking a gating mechanism that can adaptively adjust modal weights based on sample characteristics, leading to insufficient diagnostic robustness and generalization ability of the model under strong noise or complex mixed conditions. Summary of the Invention
[0006] To address the problems of high computational load, incomplete single-modal feature extraction, and lack of adaptability in multimodal fusion mechanisms in existing Transformer architectures, the present invention aims to provide a bearing fault diagnosis method based on time-frequency dual-stream complementarity and adaptive gating fusion.
[0007] The present invention provides a bearing fault diagnosis method based on time-frequency dual-stream complementarity and adaptive gating fusion, comprising:
[0008] Step 1: Collect the original vibration signal of the bearing, and divide the original vibration signal sequence into multiple fixed-length sample segments to form the original dataset;
[0009] Step 2: Use a time-axis-based physical partitioning strategy to divide the original dataset into a training set and a test set;
[0010] Step 3: Construct a time-frequency dual-stream feature extraction module to extract time-domain and frequency-domain feature vectors;
[0011] Step 4: Construct an adaptive gating fusion module, dynamically generate gating weights based on the feature distribution of the input samples, and perform weighted complementary fusion of the time-domain feature vector and the frequency-domain feature vector to obtain a fused fault feature vector;
[0012] Step 5: Construct a classification decision network and combine it with the time-frequency dual-stream feature extraction module and the adaptive gating fusion module to form a fault diagnosis model. Map the fused fault feature vector to the decision space through the classification decision network, and optimize the model parameters using the label smoothing regularization loss function and cosine annealing strategy until the model converges.
[0013] Step 6: Input the test set into the trained fault diagnosis model, calculate the posterior probability distribution of the sample belonging to each fault category, and output the final bearing fault diagnosis result according to the maximum a posteriori probability criterion.
[0014] The bearing fault diagnosis method based on time-frequency dual-stream complementarity and adaptive gating fusion of the present invention has the following beneficial effects:
[0015] (1) The bearing fault diagnosis method based on time-frequency dual-stream complementarity and adaptive gating fusion of the present invention significantly improves the computational efficiency and real-time performance of the model on the end-side device. Compared with the quadratic computational complexity of the traditional Transformer architecture when processing long sequence signals ( The bottleneck is addressed by utilizing the linear computational characteristics of bidirectional recursive scanning units. This technology enables global modeling of ultra-long bearing vibration sequences (e.g., over 4096 points) with extremely low GPU memory usage. This not only significantly reduces model training and inference time but also makes it possible to deploy the algorithm on industrial embedded devices with limited computing power, resulting in significant economic benefits.
[0016] (2) The method of this invention constructs a heterogeneous time-frequency dual-stream feature complementary architecture, effectively overcoming the blind spot problem in single-modal feature extraction and improving the comprehensiveness of fault diagnosis. Most existing technologies rely only on one-dimensional time-domain signals or two-dimensional frequency-domain images, making it difficult to take into account both the phase evolution and frequency texture of the signal. This invention constructs a parallel time-domain feature extraction branch based on a bidirectional recursive scanning mechanism and a frequency-domain feature extraction branch based on transfer learning. On the one hand, it uses a bidirectional state-space model to capture the temporal evolution law of fault impact; on the other hand, it introduces transfer learning to extract fine spectrogram texture features. This "two-pronged" strategy ensures that the model can capture fault features from all angles and perspectives, significantly improving the identification accuracy of weak and complex faults.
[0017] (3) The method of this invention designs an adaptive gating fusion mechanism based on nonlinear mapping, which significantly enhances the robustness and anti-interference ability of the model under strong noise and complex mixed conditions. Addressing the lack of flexibility in feature splicing in traditional methods, the gating network proposed in this invention can dynamically calculate the confidence weights of the time-domain and frequency-domain branches based on the real-time signal-to-noise ratio of the input samples, achieving "soft selection." When strong noise interference causes distortion in a certain mode, the model can automatically suppress the weight of that mode and rely on another high-confidence mode for decision-making. Experiments show that this mechanism enables the model to maintain extremely high diagnostic stability under varying speeds, varying loads, and high-noise environments.
[0018] (4) The method of this invention introduces cross-modal transfer learning and label smoothing regularization strategies, which effectively solves the overfitting problem caused by small sample data in industrial scenarios and improves the generalization performance of the model. By utilizing the visual model weights pre-trained on the large-scale ImageNet dataset, this invention successfully transfers general texture features to the bearing fault diagnosis task, greatly reducing the dependence on a large amount of labeled data. Combined with the temporal leakage prevention data partitioning strategy and label smoothing loss function, the model exhibits stronger generalization ability when facing unseen future time data, avoiding the "overconfidence" misjudgment phenomenon that is prone to occur in traditional deep learning models. Attached Figure Description
[0019] Figure 1 This is a flowchart of a bearing fault diagnosis method based on time-frequency dual-stream complementarity and adaptive gating fusion according to the present invention;
[0020] Figure 2 This is a schematic diagram of a bidirectional recursive scanning unit. Detailed Implementation
[0021] like Figure 1 As shown, the bearing fault diagnosis method of the present invention based on time-frequency dual-stream complementarity and adaptive gating fusion includes:
[0022] Step 1: Collect the raw vibration signal of the bearing, and divide the raw vibration signal sequence into multiple fixed-length sample segments to form the raw dataset, specifically:
[0023] Step 1.1: Collect continuous vibration signals using an accelerometer mounted on the bearing housing of the rotating machinery.
[0024] Step 1.2: Assume the acquired vibration signal sequence is as follows:
[0025]
[0026] in, The total length of the vibration signal; the sliding window length is set to... Step size is The original one-dimensional vibration signal sequence is divided into multiple sample segments of fixed length.
[0027] Step 1.3: Combine multiple fixed-length sample segments to form the original dataset.
[0028] In order to simulate real industrial fault prediction scenarios and prevent fault information from being leaked into the training set in the "future" moment, this invention abandons the conventional random sampling partitioning method and instead adopts the physical partitioning strategy based on the time axis in step 2.
[0029] Step 2: Using a time-axis-based physical partitioning strategy, the original dataset is divided into a training set and a test set, specifically as follows:
[0030] Step 2.1: Use a time-axis-based physical segmentation strategy to divide multiple sample segments into training and test sets.
[0031] Set the training set partition ratio as follows: The time division point is:
[0032]
[0033] The training set contains only historical data prior to the split point:
[0034]
[0035] The test set only contains future data after the split point:
[0036]
[0037] in, Let t be the t-th data point in the vibration signal sequence.
[0038] The above division ensures that the model learns using only historical data, verifying the model's ability to generalize and predict future unknown fault states.
[0039] Step 2.2: Considering the huge differences in the amplitude of vibration signals collected under different working conditions (such as different speeds and loads), in order to eliminate the influence of dimensions and accelerate model convergence, each sample segment after being divided in the training set and test set is subjected to independent instance normalization.
[0040] For sample fragments Calculate its mean and standard deviation :
[0041]
[0042]
[0043] in, For sample fragments The i-th data point in the middle.
[0044] Normalized sample fragments for:
[0045]
[0046] in, To prevent the use of tiny constants with a denominator of zero, this processing adjusts all input samples to a distribution with zero mean and unit variance, eliminating the amplitude drift caused by changes in operating conditions.
[0047] Steps 1 and 2 aim to construct a high-quality bearing fault dataset that conforms to real-world industrial prediction scenarios. Unlike traditional random shuffling, this invention employs a partitioning strategy that strictly adheres to the time dimension and performs instance-level standardization on the signals.
[0048] Step 3: Construct a time-frequency dual-stream feature extraction module to extract time-domain feature vectors and frequency-domain feature vectors.
[0049] The time-frequency dual-stream feature extraction module includes: a heterogeneous parallel time-domain feature extraction branch based on a bidirectional recursive scanning mechanism and a frequency-domain feature extraction branch based on transfer learning; the time-domain feature extraction branch based on the bidirectional recursive scanning mechanism is used to capture the long-term dynamic evolution features of the signal and output a time-domain feature vector rich in full life-cycle dynamic information; the frequency-domain feature extraction branch based on transfer learning is used to capture the high-dimensional frequency-domain texture features of the signal and output a high-dimensional frequency-domain feature vector.
[0050] In specific implementation, step 3 involves extracting the time-domain feature vector and the frequency-domain feature vector as follows:
[0051] Step 3.1: Normalize the sample fragments After being input into the temporal feature extraction branch based on a bidirectional recursive scanning mechanism, the following processing is performed:
[0052] First, a one-dimensional convolutional layer is used to project the features of the input signal, mapping the time-domain sampling points of a single channel into a high-dimensional latent feature vector sequence. Let the vector at the t-th time step of the projected high-dimensional latent feature vector sequence be... .
[0053] Subsequently, a high-dimensional latent feature vector sequence is input into multiple stacked bidirectional recursive scan units; in each bidirectional recursive scan unit, the initial hidden state of the recursive process is... Set as a vector of all zeros; for the th Each time step is based on the hidden state of the previous time step. and the input features at the current time Calculate the hidden state at the current time step. and output features The recursive equations for its state transitions and outputs are defined as follows:
[0054]
[0055] in, Indicates the first Historical state information captured in real time; The learnable state transition parameter matrix controls the degree to which historical information is retained. The input control parameter matrix controls the integration ratio of the current input information; The hidden states are mapped to output features to produce the output projection matrix.
[0056] like Figure 2 As shown, the bidirectional recursive scanning unit includes a forward feature extraction path and a backward feature extraction path. Within the forward feature extraction path, features are extracted according to time indexes. arrive The above recursive equations are executed sequentially, and the output features calculated at each time step are... Arranged chronologically, the forward feature sequence is obtained. This is used to capture the causal evolution of fault occurrence; in backward feature extraction, the high-dimensional latent feature vector sequence is reversed on the time axis, according to... arrive The recursive equations are executed sequentially, and the output features at each time step are collected to obtain the backward feature sequence. It is used to capture the hysteresis correlation of faults.
[0057] To integrate temporal contexts from different directions, the forward feature sequence is... With backward feature sequence The feature sequence is concatenated along the feature channel dimension to form a joint feature sequence with doubled dimensionality. A linear projection network is then used to compress the joint feature sequence back to the original feature dimension to extract the deep representation after bidirectional fusion. To prevent the vanishing gradient problem during deep network training and to preserve the underlying physical features of the original signal, a residual connection mechanism is introduced to process the initial input sequence of the bidirectional recursive scanning unit. The output sequence of the bidirectional recursive scan unit is obtained by adding it element-wise to the sequence after linear projection. The calculation process is expressed as follows:
[0058]
[0059] in, This indicates a splicing operation along the channel dimension. and These are the linear projection matrix and the bias vector, respectively.
[0060] Multiple bidirectional recursive scan units are stacked in series, with a total number of stacking layers of 1. In the first layer of the network, the initial input sequence is generated by projecting features onto the input signal through a one-dimensional convolutional layer, mapping the single-channel temporal sampling points into a high-dimensional latent feature vector sequence; in subsequent layers, the... The output sequence of the bidirectional recursive scan unit of the layer, after being combined with the root mean square normalization operation, is directly used as the first... The input sequence of the bidirectional recursive scanning unit; through this step-by-step, end-to-end progressive method, after... The deep cascaded extraction of layers, with the final layer's output sequence successfully aggregating global long-range temporal dependencies, is denoted as the deep temporal sequence. ;
[0061] Finally, in order to transform the sequence features into a fixed-length vector that can be fused with the frequency domain feature extraction branch based on transfer learning, deep time-domain sequences... A global max pooling operation is performed on the time axis. After the pooling operation eliminates redundant temporal dimensions, a non-linear mapping network is used for dimension alignment, ultimately outputting a high-dimensional temporal global feature vector. The calculation formula for this process is:
[0062]
[0063] in, This represents a global max pooling operation performed along the time dimension, used to extract the maximum response value of the entire sequence across all feature channels. This represents a composite function used for feature mapping and dimensionality enhancement, including linear mapping, layer normalization, and activation operations; to ensure temporal features. The final dimension is completely consistent with the frequency domain feature space, thus providing structurally aligned input for subsequent cross-modal adaptive gating fusion.
[0064] To compensate for the shortcomings of one-dimensional signals in frequency band texture representation and to solve the training difficulties caused by the scarcity of fault samples in industrial scenarios, this invention constructs a frequency domain feature extraction branch based on transfer learning.
[0065] Step 3.2: Normalized vibration signal After being input into the frequency domain feature extraction branch based on transfer learning, the following processing is performed:
[0066] First, using the short-time Fourier transform to... Transform to frequency domain To enhance the contrast of subtle fault features and make the background noise and fault impact texture more distinct, the transformed... Logarithmic augmentation is performed, and the calculation formula is as follows:
[0067]
[0068] Subsequently, the logarithmic spectrum was obtained using a bilinear interpolation algorithm. Resampling is performed on a standard-sized logarithmic spectrum that conforms to the input of the visual model. The standard-sized logarithmic spectrum is then copied into three copies and stacked along the channel dimension to form a three-channel pseudo-color image, which simulates a natural image in terms of data format.
[0069] EfficientNet, pre-trained on the ImageNet large-scale image dataset, is introduced as the backbone network. A three-channel pseudo-color image is input into EfficientNet, leveraging its learned general texture extraction capabilities from its deep convolutional structure to transfer feature representation capabilities from the natural image domain to the bearing fault diagnosis task. By freezing some shallow layer parameters and fine-tuning deep layer parameters, EfficientNet can efficiently extract periodic texture features reflecting fault impacts from the acoustic spectrogram. Finally, a high-dimensional frequency domain feature vector is output through a fully connected mapping layer. .
[0070] Step 4: Construct an adaptive gating fusion module. Based on the feature distribution of the input samples, dynamically generate gating weights, and perform weighted complementary fusion of the time-domain and frequency-domain feature vectors to obtain a fused fault feature vector. Specifically:
[0071] Considering the significant heterogeneity of time-domain and frequency-domain features in terms of physical properties and noise distribution, and the dynamic changes in the signal-to-noise ratio of different fault samples under the two modes, simple linear splicing or fixed-weight summation cannot achieve optimal feature complementarity. Therefore, this invention designs an adaptive gating fusion mechanism based on nonlinear mapping, aiming to dynamically evaluate and allocate confidence weights of dual-stream features at the sample level.
[0072] Step 4.1: Convert the time-domain feature vector and frequency domain eigenvectors The data is concatenated along the channel dimension to construct a joint feature space representation. .
[0073] Step 4.2: Construct a gated perceptual network incorporating dimensionality reduction projection, layer normalization, and random deactivation to learn cross-modal interaction relationships from joint features. The gating coefficients... The generation process is defined as follows:
[0074]
[0075] in, This represents the Sigmoid activation function, which constrains the output to... The interval represents the gating probability; and The weight matrix is a learnable matrix. and for and against The corresponding biases are responsible for feature compression and scalar mapping, respectively; This is a layer normalization operation used to stabilize the gradient distribution; for Nonlinear activation function; This represents the Bernoulli random deactivation operation, used to enhance the generalization robustness of gated networks.
[0076] Step 4.3: Based on the generated gating coefficients The time-domain feature vector and the frequency-domain feature vector are weighted and complementarily fused to obtain the final fused fault feature vector. :
[0077]
[0078] in, This indicates that each item is multiplied.
[0079] Through the above mechanism, the model can adaptively adjust the modal contribution according to the real-time characteristics of the input signal: when a certain mode is blurred due to strong environmental noise interference, the gating network will automatically reduce its weight (i.e., adjust the weight). (Tend to 0 or 1), thereby achieving "soft selection" of high-confidence modal features, which significantly improves the anti-interference capability of the diagnostic system under complex mixed conditions.
[0080] Step 5: Construct a classification decision network and combine it with the time-frequency dual-stream feature extraction module and the adaptive gating fusion module to form a fault diagnosis model. The classification decision network maps the fused fault feature vectors to the decision space. The model parameters are optimized using a label smoothing regularization loss function and a cosine annealing strategy until the model converges. Specifically:
[0081] Step 5.1: In order to achieve high-precision identification of bearing fault categories and map the fused high-dimensional features to the target decision space, a classification decision network containing layer normalization, random deactivation and fully connected mapping layers is constructed.
[0082] Step 5.2: Input the fused fault feature vector into the classification decision network. After linear projection and Softmax normalization, calculate the predicted probability distribution of the sample belonging to each fault category k. .
[0083] To address the potential for human annotation errors in fault labeling within industrial scenarios, and the overfitting phenomenon caused by "overconfidence" in deep models on the training set, this invention innovatively abandons the traditional hard-objective cross-entropy loss and instead employs a label smoothing regularization loss function. The label smoothing strategy transforms the true label distribution from a "Dirac delta" pattern... The "distribution" is reconstructed into a "soft target distribution," which forces the model to maintain a moderate level of uncertainty during training, thereby enhancing its generalization boundary.
[0084] Step 5.3: Let This is the original one-hot encoded true label, which is 1 if the sample belongs to class k, and 0 otherwise; This represents the total number of fault categories. As the smoothing factor, the reconstructed smooth label distribution Defined as:
[0085]
[0086] Based on this, the final optimization objective function is constructed. That is, minimizing the prediction distribution With smooth true distribution Kullback-Leibler divergence between:
[0087]
[0088] During the parameter update phase of the fault diagnosis model, the AdamW optimizer with decoupled weight decay characteristics is adopted to address the problem that the traditional Adam optimizer may converge to a local suboptimal solution on a non-convex optimization surface. Simultaneously, a cosine annealing learning rate scheduling strategy is introduced to dynamically adjust the learning rate during training. This strategy causes the learning rate to decrease with the number of training epochs d according to a cosine function curve, the formula of which is:
[0089]
[0090] in, and These are the maximum and minimum learning rates, respectively, and D is the total number of training epochs. This periodic learning rate adjustment mechanism helps the model quickly traverse flat regions in the early stages of training and finely converge to the global minimum of the loss function in the later stages, significantly improving the convergence stability and testing accuracy of the final model.
[0091] Step 6: Input the test set into the trained fault diagnosis model, calculate the posterior probability distribution of the samples belonging to each fault category, and output the final bearing fault diagnosis result according to the maximum a posteriori probability criterion, specifically:
[0092] Step 6.1: Input the unknown vibration signal samples from the test set into the trained fault diagnosis model. Through forward propagation calculation, the model outputs the posterior probability distribution vector of the sample belonging to each fault category. .
[0093] Step 6.2: Following the maximum a posteriori probability criterion, through... The operation determines the final fault category, thereby achieving end-to-end intelligent diagnosis.
[0094] To comprehensively and objectively quantify the performance of models in multi-class classification tasks, especially addressing the common sample imbalance problem in industrial data, this invention constructs a multi-dimensional evaluation system that includes accuracy, precision, recall, and F1 score. Unlike conventional micro-averaging calculations, this invention focuses on using a macro-averaging strategy to calculate core indicators, ensuring that each fault category (regardless of sample size) has equal weight in the evaluation.
[0095] For any fault category The accuracy is calculated based on the confusion matrix. With recall rate Then calculate the harmonic mean of that category. :
[0096]
[0097] Final system overall performance indicators Defined as the arithmetic mean of the F1 scores for all categories:
[0098]
[0099] This metric not only reflects the overall classification accuracy of the model, but also rigorously verifies the model's robustness in handling long-tailed distribution faults. If If the indicators meet the preset industrial deployment threshold (e.g., above 99%), the diagnostic system is deemed ready to go online and can be connected to the real-time monitoring system to output bearing health status reports.
[0100] The invention will be further explained below with reference to specific experimental data and implementation details.
[0101] Dataset and Experimental Environment Setup: To comprehensively verify the effectiveness and robustness of this invention under different operating conditions, five authoritative publicly available bearing fault datasets—CWRU, IMS, JNU, MFPT, and PU—were selected for testing. Each dataset includes four typical health states: normal condition, inner race fault, outer race fault, and rolling element fault.
[0102] In the data preprocessing stage, this embodiment strictly adheres to the "time-sequenced leakage prevention" principle, abandoning the traditional random partitioning method. Instead, it divides the first 80% of the acquired signals into a training set and the last 20% into a test set according to time sequence to simulate real industrial prediction scenarios. The sliding window length is set to 4096 points, and each slice sample undergoes independent instance normalization to eliminate amplitude differences under different load conditions.
[0103] For model training configuration, the batch size is set to 32, and the total number of iterations is 30. A model with weight decay characteristics is selected. Optimizer, initial learning rate set to Furthermore, a cosine annealing strategy is used to dynamically decay the learning rate, ensuring that the model converges to the global optimum. Additionally, a smoothing factor is employed. The label-smoothed cross-entropy loss function is used to prevent the model from overfitting.
[0104] To quantitatively evaluate the diagnostic performance of the model of this invention for bearing faults, the following formula is selected as the evaluation index:
[0105] Acc: Accuracy, which is the proportion of all correctly classified samples out of the total sample.
[0106]
[0107] Pre: Precision, which is the proportion of samples that the model predicts to be positive but are actually positive.
[0108]
[0109] Rec: Recall rate, which is the proportion of samples that are actually positive that are predicted as positive by the model.
[0110]
[0111] F1-Score: The harmonic mean of precision and recall, used to measure the overall classification performance of a model, especially in class imbalance problems.
[0112]
[0113] Table 1 shows the results of this invention across five datasets.
[0114]
[0115] Based on the experimental results in Table 1, the model proposed in this invention demonstrates excellent performance on five typical bearing datasets from different sources: CWRU, IMS, JNU, MFPT, and PU. All evaluation metrics (Accuracy, Precision, Recall, and F1 score) achieved perfect classification accuracy in three of these datasets, and maintained a high level of over 97% even in the other two. This result fully demonstrates that the model not only has extremely high classification accuracy but also exhibits strong adaptability and reliability when facing data from different acquisition environments and operating conditions.
[0116] Table 2 Results of different baseline algorithms on five datasets
[0117]
[0118] Based on the experimental results in Table 2, the model proposed in this invention is compared with CNN, LSTM, WDCNN, ResNet18, and... Five mainstream baseline models were comprehensively compared on five different datasets: CWRU, IMS, JNU, MFPT, and PU. The results show that our model consistently outperforms the comparison models in all evaluation metrics (accuracy, precision, recall, and F1 score) across all datasets. Particularly noteworthy is the PU dataset, where traditional models (such as CNN and LSTM) exhibit significant performance decline, while our model maintains extremely high diagnostic accuracy, fully validating its strong robustness and generalization ability across various working conditions.
[0119] The above description is only a preferred embodiment of the present invention and is not intended to limit the ideas of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A bearing fault diagnosis method based on time-frequency dual-stream complementarity and adaptive gating fusion, characterized in that, include: Step 1: Collect the original vibration signal of the bearing, and divide the original vibration signal sequence into multiple fixed-length sample segments to form the original dataset; Step 2: Use a time-axis-based physical partitioning strategy to divide the original dataset into a training set and a test set; Step 3: Construct a time-frequency dual-stream feature extraction module to extract time-domain feature vectors and frequency-domain feature vectors; the time-frequency dual-stream feature extraction module includes: a heterogeneous parallel time-domain feature extraction branch based on a bidirectional recursive scanning mechanism and a frequency-domain feature extraction branch based on transfer learning; Step 4: Construct an adaptive gating fusion module, dynamically generate gating weights based on the feature distribution of the input samples, and perform weighted complementary fusion of the time-domain feature vector and the frequency-domain feature vector to obtain a fused fault feature vector; Step 5: Construct a classification decision network and combine it with the time-frequency dual-stream feature extraction module and the adaptive gating fusion module to form a fault diagnosis model. Map the fused fault feature vector to the decision space through the classification decision network, and optimize the model parameters using the label smoothing regularization loss function and cosine annealing strategy until the model converges. Step 6: Input the test set into the trained fault diagnosis model, calculate the posterior probability distribution of the sample belonging to each fault category, and output the final bearing fault diagnosis result according to the maximum a posteriori probability criterion. The extraction of time-domain and frequency-domain feature vectors in step 3 specifically involves: Step 3.1: Normalize the sample fragments After being input into the temporal feature extraction branch based on a bidirectional recursive scanning mechanism, the following processing is performed: First, a one-dimensional convolutional layer is used to project the features of the input signal, mapping the time-domain sampling points of a single channel into a high-dimensional latent feature vector sequence. Let the vector at the t-th time step of the projected high-dimensional latent feature vector sequence be... ; Subsequently, a high-dimensional latent feature vector sequence is input into multiple stacked bidirectional recursive scan units; in each bidirectional recursive scan unit, the initial hidden state of the recursive process is... Set as a vector of all zeros; for the th Each time step is based on the hidden state of the previous time step. and the input features at the current time Calculate the hidden state at the current time step. and output features The recursive equations for its state transitions and outputs are defined as follows: in, Indicates the first Historical state information captured in real time; The learnable state transition parameter matrix controls the degree to which historical information is retained. The input control parameter matrix controls the integration ratio of the current input information; To output the projection matrix, the hidden states are mapped to output features; A bidirectional recursive scan unit includes a forward path and a backward path, with the forward path indexed by time. arrive The above recursive equations are executed sequentially, and the output features calculated at each time step are... Arranged chronologically, the forward feature sequence is obtained. This is used to capture the causal evolution of fault occurrence; in the backward path, the high-dimensional latent feature vector sequence is reversed on the time axis, according to... arrive The recursive equations are executed sequentially, and the output features at each time step are collected to obtain the backward feature sequence. This is used to capture the hysteresis correlation of faults; To integrate temporal contexts from different directions, the forward feature sequence is... With backward feature sequence The joint feature sequence is concatenated along the feature channel dimension to form a doubled-dimensional joint feature sequence; a linear projection network is used to compress the joint feature sequence back to the original feature dimension; a residual connection mechanism is introduced to process the initial input sequence of this bidirectional recursive scanning unit. The output sequence of the bidirectional recursive scan unit is obtained by adding it element-wise to the sequence after linear projection. The calculation process is expressed as follows: in, This indicates a splicing operation along the channel dimension. and These are the linear projection matrix and the bias vector, respectively; Multiple bidirectional recursive scan units are stacked in series, and the total number of stacking layers is . In the first layer of the network, the initial input sequence is generated by projecting features onto the input signal through a one-dimensional convolutional layer, mapping the single-channel temporal sampling points into a high-dimensional latent feature vector sequence; in subsequent layers, the... The output sequence of the bidirectional recursive scan unit of the layer, after being combined with the root mean square normalization operation, is directly used as the first... The input sequence of the bidirectional recursive scanning unit; through this step-by-step, end-to-end progressive method, after... The deep cascaded extraction of layers, with the final layer's output sequence successfully aggregating global long-range temporal dependencies, is denoted as the deep temporal sequence. ; Finally, in order to transform the sequence features into a fixed-length vector that can be fused with the frequency domain feature extraction branch based on transfer learning, deep time-domain sequences... A global max pooling operation is performed on the time axis. After the pooling operation eliminates redundant temporal dimensions, a non-linear mapping network is used for dimension alignment, ultimately outputting a high-dimensional temporal global feature vector. The calculation formula for this process is: in, This represents a global max pooling operation performed along the time dimension, used to extract the maximum response value of the entire sequence across all feature channels. This represents a composite function used for feature mapping and dimensionality increase, including linear mapping, layer normalization, and activation operations; Step 3.2: Normalized vibration signal After being input into the frequency domain feature extraction branch based on transfer learning, the following processing is performed: First, using the short-time Fourier transform to... Transform to frequency domain To enhance the contrast of subtle fault features and make the background noise and fault impact texture more distinct, the transformed... Logarithmic augmentation is performed, and the calculation formula is as follows: Subsequently, the logarithmic spectrum was obtained using a bilinear interpolation algorithm. Resampling is performed on a standard-sized logarithmic spectrogram that conforms to the input of the visual model. The standard-sized logarithmic spectrogram is then copied into three copies and stacked along the channel dimension to form a three-channel pseudo-color image, which simulates a natural image in terms of data format. EfficientNet, pre-trained on the ImageNet large-scale image dataset, is introduced as the backbone network. A three-channel pseudo-color image is input into EfficientNet, leveraging its learned general texture extraction capabilities from its deep convolutional structure to transfer feature representation capabilities from the natural image domain to the bearing fault diagnosis task. By freezing some shallow layer parameters and fine-tuning deep layer parameters, EfficientNet can efficiently extract periodic texture features reflecting fault impacts from the acoustic spectrogram. Finally, a high-dimensional frequency domain feature vector is output through a fully connected mapping layer. .
2. The bearing fault diagnosis method based on time-frequency dual-stream complementarity and adaptive gating fusion as described in claim 1, characterized in that, Step 1 specifically involves: Step 1.1: Collect continuous vibration signals using an accelerometer mounted on the bearing housing of the rotating machinery; Step 1.2: Assume the acquired vibration signal sequence is as follows: in, The total length of the vibration signal; the sliding window length is set to... Step size is The original one-dimensional vibration signal sequence is divided into multiple sample segments of fixed length. Step 1.3: Combine multiple fixed-length sample segments to form the original dataset.
3. The bearing fault diagnosis method based on time-frequency dual-stream complementarity and adaptive gating fusion as described in claim 1, characterized in that, Step 2 specifically involves: Step 2.1: Use a time-axis-based physical segmentation strategy to divide multiple sample segments into training and test sets; Set the training set partition ratio as follows: The time division point is: The training set contains only historical data prior to the split point: The test set only contains future data after the split point: in, This represents the t-th data point in the vibration signal sequence. Step 2.2: Perform independent instance normalization on each sample segment after splitting in the training and test sets; For sample fragments Calculate its mean and standard deviation : in, For sample fragments The i-th data point; Normalized sample fragments for: in, To prevent tiny constants with a denominator of zero.
4. The bearing fault diagnosis method based on time-frequency dual-stream complementarity and adaptive gating fusion as described in claim 3, characterized in that, The time-domain feature extraction branch based on the bidirectional recursive scanning mechanism is used to capture the long-term dynamic evolution features of the signal and output a time-domain feature vector rich in dynamic information throughout the entire life cycle; the frequency-domain feature extraction branch based on transfer learning is used to capture the high-dimensional frequency-domain texture features of the signal and output a high-dimensional frequency-domain feature vector.
5. The bearing fault diagnosis method based on time-frequency dual-stream complementarity and adaptive gating fusion according to claim 1, characterized in that, Step 4 specifically involves: Step 4.1: Convert the time-domain feature vector and frequency domain eigenvectors The data is concatenated along the channel dimension to construct a joint feature space representation. ; Step 4.2: Construct a gated perceptual network incorporating dimensionality reduction projection, layer normalization, and random deactivation to learn cross-modal interaction relationships from joint features. The gating coefficients... The generation process is defined as follows: in, This represents the Sigmoid activation function, which constrains the output to... The interval represents the gating probability; and The weight matrix is a learnable matrix. and for and against The corresponding biases are responsible for feature compression and scalar mapping, respectively; This is a layer normalization operation used to stabilize the gradient distribution; for Nonlinear activation function; This represents the Bernoulli random deactivation operation, used to enhance the generalization robustness of gated networks; Step 4.3: Based on the generated gating coefficients The time-domain feature vector and the frequency-domain feature vector are weighted and complementarily fused to obtain the final fused fault feature vector. : in, This indicates that each item is multiplied.
6. The bearing fault diagnosis method based on time-frequency dual-stream complementarity and adaptive gating fusion according to claim 1, characterized in that, Step 5 specifically involves: Step 5.1: Construct a classification decision network that includes layer normalization, random deactivation, and fully connected mapping layers; Step 5.2: Input the fused fault feature vector into the classification decision network. After linear projection and Softmax normalization, calculate the predicted probability distribution of the sample belonging to each fault category k. ; Step 5.3: Let This is the original one-hot encoded true label, which is 1 if the sample belongs to class k, and 0 otherwise; This represents the total number of fault categories. As the smoothing factor, the reconstructed smooth label distribution Defined as: Based on this, the final optimization objective function is constructed. That is, minimizing the prediction distribution With smooth true distribution Kullback-Leibler divergence between: During the parameter update phase of the fault diagnosis model, the AdamW optimizer with decoupled weight decay characteristics is adopted to address the problem that the traditional Adam optimizer may converge to a local suboptimal solution on a non-convex optimization surface. Simultaneously, a cosine annealing learning rate scheduling strategy is introduced to dynamically adjust the learning rate during training. This strategy causes the learning rate to decrease with the number of training epochs d according to a cosine function curve, the formula of which is: in, and These are the maximum and minimum learning rates, respectively, and D is the total number of training epochs. This periodic learning rate adjustment mechanism helps the model quickly traverse flat regions in the early stages of training and finely converge to the global minimum of the loss function in the later stages, significantly improving the convergence stability and testing accuracy of the final model.
7. The bearing fault diagnosis method based on time-frequency dual-stream complementarity and adaptive gating fusion according to claim 1, characterized in that, Step 6 specifically involves: Step 6.1: Input the unknown vibration signal samples from the test set into the trained fault diagnosis model. Through forward propagation calculation, the model outputs the posterior probability distribution vector of the sample belonging to each fault category. ; Step 6.2: Following the maximum a posteriori probability criterion, through... The operation determines the final fault category, thereby achieving end-to-end intelligent diagnosis.