Bearing fault diagnosis method and system
By generating causal and obfuscated features through deep feature extraction and channel attention modules, and combining causal loss functions and style transfer diffusion modules, the bearing fault diagnosis model is optimized, solving the problem of insufficient recognition accuracy of bearing diagnosis models under unknown working conditions and achieving higher fault recognition accuracy.
Patent Information
- Application Number
- CN202510983893.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-17
- Publication Date
- 2025-11-11
AI Technical Summary
Existing bearing diagnostic models struggle to capture essential characteristics closely related to fault conditions when faced with unknown operating conditions, resulting in insufficient fault identification accuracy.
By constructing a fault diagnosis model, deep features are extracted using a deep feature extractor, and causal and confusion features are generated through a channel attention module. Combined with a causal loss function and a style transfer diffusion module, the training data is optimized to improve the model's generalization robustness and fault identification accuracy under unknown working conditions.
It effectively improves the generalization robustness and fault identification accuracy of bearing fault diagnosis models under unknown working conditions, solves the problem of decreased identification ability of existing models when working conditions change, and improves the accuracy of fault diagnosis.
Smart Images

Figure CN120929948A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of fault diagnosis technology, and in particular to a bearing fault diagnosis method and system. Background Technology
[0002] Rotating machinery, such as bearings, is a critical component of industrial equipment, and its operating status directly affects the system's performance and stability. Therefore, timely identification of bearing fault types, including outer ring faults, inner ring faults, rolling element faults, and cage faults, enabling early warning and tiered maintenance, is of great significance for preventing sudden damage, reducing operation and maintenance costs, and improving safety. Thus, developing efficient and reliable intelligent fault diagnosis methods has significant engineering value.
[0003] In recent years, bearing fault diagnosis technology based on deep learning has gradually become a research hotspot. Its core idea is to construct a multi-layer nonlinear neural network model to achieve end-to-end mapping from raw monitoring data to fault categories. The vibration signal is preprocessed, and one-dimensional time-series signals are converted into two-dimensional time-frequency images using methods such as short-time Fourier transform and wavelet decomposition. Subsequently, the local perception and weight-sharing mechanism of convolutional neural networks (CNNs) are used to extract texture features from the images, or recurrent neural networks (RNNs) and Transformer models are used to capture temporal dependencies in the signal. Finally, a fully connected layer and a softmax classifier are combined to complete the fault mode discrimination.
[0004] However, existing technologies generally rely on the ideal assumption that training and test data distributions are consistent. In actual industrial settings, equipment often operates under variable conditions, and data distribution is easily affected by changes in load, rotational speed, and environment, leading to a decline in model performance. In single-source out-of-domain generalization scenarios lacking multi-source data, the model struggles to extract stable features that can be accurately identified regardless of changing conditions from limited data. When the equipment's operating environment changes, the characteristics of vibration signal data also change. For example, as rotational speed increases, the frequency components of vibration signals shift upwards, and low-frequency pulse signals that originally characterized specific faults may be masked by high-frequency noise. Conversely, as the load increases, the signal amplitude significantly increases, blurring the boundary between fault characteristics and normal operating conditions. Existing deep learning models rely on specific distribution patterns of vibration signals in the training data for identification. If the model struggles to extract stable discriminative features, its fault identification capability will significantly decrease, failing to meet the needs of actual industrial production. Summary of the Invention
[0005] Therefore, the technical problem to be solved by the present invention is to overcome the shortcomings of existing bearing diagnostic models, which are unable to capture the essential features closely related to the fault state and have insufficient fault identification accuracy when facing unknown working conditions.
[0006] To solve the above-mentioned technical problems, the present invention provides a bearing fault diagnosis method, comprising:
[0007] Obtain a bearing fault diagnosis dataset that includes different vibration signals and their true labels, and divide the samples in the bearing fault diagnosis dataset into multiple batches;
[0008] After converting the vibration signal of each sample in the batch into a two-dimensional time-frequency graph, the depth features of each sample in the batch are extracted by the depth feature extractor of the fault diagnosis model.
[0009] For the depth features of each sample within a batch, the channel attention module of the fault diagnosis model is used to obtain the channel attention weight of each channel in the depth features of that sample; the depth features are weighted using the channel attention weight of each channel in the depth features of that sample to obtain the causal features of that sample.
[0010] Subtract the channel attention weight of each channel in the depth feature of the sample from 1 to obtain the complementary channel attention weight of each channel in the depth feature of the sample; use the complementary channel attention weight of each channel in the depth feature of the sample to weight the depth feature to obtain the confusion feature of the sample.
[0011] Based on the causal characteristics of each sample within a batch, the predicted probability distribution of the fault type for each sample within the batch is obtained and used as the output of the fault diagnosis model.
[0012] For each sample in a batch, the sample that matches the true label of that sample is taken as the positive sample of that sample; the remaining samples are taken as the negative samples of that sample; the difference between the distance between the causal feature of that sample and the distance between the depth feature of that sample and each of its corresponding positive samples is taken as the feature difference between that sample and each of its corresponding positive samples; the difference between the distance between the causal feature of that sample and the distance between the depth feature of that sample and each of its corresponding negative samples is taken as the feature difference between that sample and each of its corresponding negative samples.
[0013] A causal loss function is constructed based on the feature differences between all samples in a batch and their corresponding positive samples and the feature differences between each negative sample. The fault diagnosis model is trained using the causal loss function, the cross-entropy loss between the fault type prediction probability distribution of all samples in the batch and their true labels, and the trained fault diagnosis model is used to diagnose bearing faults in actual vibration signals.
[0014] Preferably, the causal loss function is:
[0015]
[0016] Among them, L causalLet I be the causal loss function, B be the set of deep features of samples within a batch, |B| be the total number of samples within a batch, and I be the total number of samples within a batch. anchor P represents the depth feature of any sample within a batch. a For I anchor The corresponding set of positive samples, |P a |For I anchor The corresponding total number of positive samples, N a For I anchor The corresponding set of negative samples, |N x |For I anchor The corresponding total number of negative samples, For I anchor The causal characteristics, For I anchor The causal characteristics corresponding to any positive sample, For I anchor The confusing features, For I anchor For any negative sample, the confusion feature, I positive For I anchor For any positive sample's depth features, I negative For I anchor For any negative sample, the depth feature is represented by d(·), which represents the distance, and exp(·) represents the exponential function with the natural constant as the base.
[0017] Preferably, the depth features, causal features, and confusion features of each sample in the batch are estimated by histogram to obtain the probability distribution of the depth features, causal features, and confusion features of each sample in the batch.
[0018] For each sample within a batch, based on the probability distribution of the depth features, causal features, and confusion features of each sample within the batch, the difference between the Rényi divergence between the causal features of the sample and each of its corresponding positive samples and the Rényi divergence between the depth features is taken as the feature difference between the sample and each of its corresponding positive samples; the difference between the Rényi divergence between the causal features of the sample and each of its corresponding negative samples and the Rényi divergence between the depth features is taken as the feature difference between the sample and each of its corresponding negative samples.
[0019] A causal loss function is constructed based on the feature differences between all samples in a batch and their corresponding positive samples and the feature differences between their corresponding negative samples.
[0020] Preferably, the deep feature extractor of the fault diagnosis model includes: an input layer, a first two-dimensional convolutional layer, a cross-channel normalization layer, a two-dimensional max pooling layer, a first two-dimensional grouped convolutional layer, a ReLU activation function, a cross-channel normalization layer, a two-dimensional max pooling layer, a second two-dimensional convolutional layer, a second two-dimensional grouped convolutional layer, and a third two-dimensional grouped convolutional layer, connected in sequence.
[0021] Preferably, the channel attention module of the fault diagnosis model includes a max pooling layer, a first fully connected layer, a ReLU activation function, a second fully connected layer, and a sigmoid activation function connected in sequence.
[0022] Preferably, the method further includes using the target simulated two-dimensional time-frequency graph and its true labels as supplementary training data for the fault diagnosis model, and using this data to train the fault diagnosis model.
[0023] Simulated vibration signals and their real labels are generated using a physical model; the simulated vibration signals are then converted into an initial simulated two-dimensional time-frequency plot.
[0024] Input the initial simulated 2D time-frequency plot into the style transfer diffusion module, and output the target simulated 2D time-frequency plot;
[0025] The fault diagnosis model is trained using the target simulation two-dimensional time-frequency plot and its real labels.
[0026] Preferably, the physical model is as follows:
[0027]
[0028] Where s(t) is the simulated vibration signal, f r For frequency conversion, A0 is the modulation amplitude factor, C is the attenuation coefficient, and f is the frequency conversion factor. n The fault resonance frequency band is given, and p1 is the number of repetitions of the complete cycle, p1 = [N / N]. T ]-1, N T N is the number of sampling points per cycle, and N is the total number of sampling points. T =[f s [T], where T is the impact period. f fault f is the fault characteristic frequency. s t is the sampling frequency, t is the time, [·] indicates rounding down, and T is the impact period.
[0029] Preferably, the training process of the style transfer diffusion module includes:
[0030] The initial simulated two-dimensional time-frequency plot is input into the image generation network of the style transfer diffusion module to obtain the target simulated two-dimensional time-frequency plot; the image generation network includes an encoder, a transformation, and a decoder connected in sequence; the transformation includes multiple residual blocks connected in sequence.
[0031] The actual vibration signal under the current working condition is converted into an actual two-dimensional time-frequency diagram;
[0032] The intermediate convolutional layers of the loss network of the style transfer diffusion module are used to extract the target simulation features of the target simulation two-dimensional time-frequency map and the actual features of the actual two-dimensional time-frequency map.
[0033] By utilizing any convolutional layer before the intermediate convolutional layer of the loss network, the target simulation local features and the actual local features of the actual two-dimensional time-frequency map are extracted from the target simulation local features and the actual local features of the actual two-dimensional time-frequency map, respectively.
[0034] By utilizing any convolutional layer after the intermediate convolutional layer of the loss network, the global features of the target simulation two-dimensional time-frequency map and the actual global features of the actual two-dimensional time-frequency map are extracted.
[0035] The total style transfer loss is the sum of the style transfer loss between the target simulation features and the actual features, the style transfer loss between the target simulation local features and the actual local features, and the style transfer loss between the target simulation global features and the actual global features.
[0036] The initial simulation features of the initial simulation two-dimensional time-frequency plot are extracted by utilizing the intermediate convolutional layer of the loss network of the style transfer diffusion module.
[0037] Based on the content reconstruction loss and total style transfer loss between the target simulation features and the initial simulation features, a total style transfer diffusion loss function is constructed.
[0038] The style transfer diffusion module is trained using the total loss function of style transfer diffusion, and the trained style transfer diffusion module is used as the target style transfer diffusion module.
[0039] Preferably, the total loss function for style transfer diffusion is:
[0040]
[0041] Among them, L style_generation Let λ1 be the total style transfer diffusion loss function, λ2 be the content reconstruction loss weight, and λ2 be the total style transfer loss weight. Let f be the content reconstruction loss, φ be the loss network, and f be the loss function. IG (x c ) represents the two-dimensional time-frequency plot of the target simulation, f IG (·) represents the image generation network, x c This is the initial simulation of a two-dimensional time-frequency plot, where j is the layer index and l is the number of layers. start For any convolutional layer before the intermediate convolutional layer of the loss network, l middle For the intermediate convolutional layers of the loss network, l end For any convolutional layer after the intermediate convolutional layers of the loss network, To utilize the j-th convolutional layer of the loss network, the style transfer loss between the extracted features of the target simulated 2D time-frequency map and the actual 2D time-frequency map is calculated. s This is the actual two-dimensional time-frequency diagram.
[0042] The present invention also provides a bearing fault diagnosis system, comprising:
[0043] The dataset partitioning module is used to acquire a bearing fault diagnosis dataset that includes different vibration signals and their true labels, and to divide the samples in the bearing fault diagnosis dataset into multiple batches.
[0044] The depth feature extraction module is used to convert the vibration signal of each sample in the batch into a two-dimensional time-frequency diagram, and then extract the depth features of each sample in the batch through the depth feature extractor of the fault diagnosis model.
[0045] The causal feature extraction module is used to extract the channel attention weights of each channel in the deep features of each sample in a batch by passing them through the channel attention module of the fault diagnosis model. The deep features are then weighted using the channel attention weights of each channel in the deep features of the sample to obtain the causal features of the sample.
[0046] The obfuscated feature extraction module is used to subtract the channel attention weight of each channel in the depth feature of the sample from 1 to obtain the complementary channel attention weight of each channel in the depth feature of the sample; and to weight the depth feature using the complementary channel attention weight of each channel in the depth feature of the sample to obtain the obfuscated feature of the sample.
[0047] The prediction module is used to obtain the probability distribution of the fault type prediction for each sample in the batch based on the causal characteristics of each sample in the batch, and use it as the output of the fault diagnosis model.
[0048] The feature difference acquisition module is used to, for each sample in a batch, identify samples that match the true label of that sample as positive samples; identify the remaining samples as negative samples; and use the difference between the distance between the causal features of that sample and the distance between the depth features of that sample and each corresponding positive sample as the feature difference between that sample and each corresponding negative sample.
[0049] The diagnostic module is used to construct a causal loss function based on the feature differences between all samples in a batch and their corresponding positive samples and the feature differences between each negative sample. The fault diagnosis model is trained using the causal loss function, the cross-entropy loss between the fault type prediction probability distribution of all samples in the batch and their true labels, and the trained fault diagnosis model is used to diagnose bearing faults on actual vibration signals.
[0050] Compared with the prior art, the above-described technical solution of the present invention has the following advantages:
[0051] The bearing fault diagnosis method and system described in this invention utilizes a deep feature extractor of a fault diagnosis model to extract deep features. Through a channel attention module, channel attention weights are obtained and causal features are generated. The causal features focus on key features closely related to the fault and can remain relatively stable when the operating conditions change. Furthermore, complementary channel attention weights are used to generate confusing features to help the model better identify non-key features. The deep features are decomposed into causal features and confounding features, enabling the model to distinguish between true fault features and interference features caused by changes in operating conditions. For each sample in a batch, the difference between the distance between the causal features of the sample and each of its corresponding positive samples and the distance between the deep features is used as the feature difference between the sample and each of its corresponding positive samples. Based on the feature differences of all samples in the batch and each of its corresponding positive samples, and the feature differences of each negative sample, a causal loss function is constructed. The smaller the difference in the feature differences of positive samples, the stronger the consistency of causal features among positive samples compared to deep features, indicating that the fault diagnosis model has successfully extracted stable features unaffected by operating conditions. The larger the difference in the feature differences of negative samples, the stronger the discriminative power of causal features among negative samples compared to deep features, suppressing the interference of operating condition noise. By constructing the causal loss function for training bearing fault diagnosis, the generalization robustness and fault identification accuracy of the single-source domain-based diagnostic model under unknown operating conditions are effectively improved.
[0052] Furthermore, to address the challenges of obtaining labeled samples and the scarcity of fault samples in industrial scenarios, which leads to severe imbalance in training data and causes existing models to tend to identify normal states while ignoring key fault features, thus reducing the effectiveness of mechanical fault diagnosis, this invention utilizes a physical model to generate simulated vibration signals and their real labels. A style transfer diffusion module further optimizes the simulated vibration signals. The style transfer loss is typically calculated using the intermediate convolutional layers of the loss network in the style transfer diffusion module, extracting target simulation features from the target simulated 2D time-frequency image and actual features from the actual 2D time-frequency image. To ensure comprehensive preservation of style information, this invention selects any convolutional layer before the intermediate convolutional layer of the loss network to capture local style information, such as texture, and uses any convolutional layer after the intermediate convolutional layer to focus on global style information, such as color distribution and large-scale structure. Finally, a weighted summation is used to calculate the style transfer loss, achieving style alignment between the simulated samples and measured samples based on the physical model. This generates supplementary samples with realistic working condition characteristics, constructing a more balanced dataset for model training. This effectively alleviates the problem of scarce fault category samples in industrial field condition monitoring and improves the recognition accuracy of fault diagnosis models. Attached Figure Description
[0053] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings, wherein:
[0054] Figure 1 This is a flowchart illustrating a bearing fault diagnosis method according to the present invention.
[0055] Figure 2 This is a structural diagram of a bearing fault diagnosis method according to the present invention.
[0056] Figure 3 This is a comparison diagram of the target simulated two-dimensional time-frequency plot generated by the style transfer diffusion module and the actual two-dimensional time-frequency plot.
[0057] Figure 4 This is a comparison chart of generalization results across multiple method domains. Figure 4 (a) in the figure shows the comparison of generalization results for different method domains when the ratio of real samples to simulated samples is 1:1 during training. Figure 4 (b) in the figure shows the comparison results of generalization of different method domains when the ratio of real samples to simulated samples is 1:9 during training. Detailed Implementation
[0058] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.
[0059] Reference Figure 1 As shown, this embodiment provides a bearing fault diagnosis method, including:
[0060] like Figure 2 As shown, Figure 2 This is a structural diagram of a bearing fault diagnosis method according to the present invention.
[0061] Step S1: Obtain a bearing fault diagnosis dataset including different vibration signals and their true labels, and divide the samples in the bearing fault diagnosis dataset into multiple batches;
[0062] In this embodiment, specifically, obtaining a bearing fault diagnosis dataset including different vibration signals and their true labels includes: when the bearing is running, using a vibration sensor to monitor its state and collecting vibration signals under different working conditions, and using a sliding window to divide the collected vibration signals to obtain multiple sample data.
[0063] Step S2: After converting the vibration signal of each sample in the batch into a two-dimensional time-frequency diagram, the causal features and confounding features of each sample in the batch are extracted using the causal feature extractor of the fault diagnosis model (CIGN), including:
[0064] After converting the vibration signal of each sample in the batch into a two-dimensional time-frequency graph, the depth features of each sample in the batch are extracted using the depth feature extractor of the fault diagnosis model (CIGN). Among them, I u Let u be the depth feature of the u-th sample within the batch. For I u height, For I u width, For I u The number of channels;
[0065] In this embodiment, specifically, the vibration signal of each sample in the batch is converted into a two-dimensional time-frequency graph using any one of the following: Short Time Fourier Transform (STFT), Hilbert-Huang Transform (HHT), or Wavelet Transform.
[0066] In this embodiment, the vibration signal of each sample in the batch is subjected to wavelet transform to obtain a two-dimensional time-frequency diagram of each sample in the batch, which serves as the basis for subsequent processing.
[0067] In this embodiment, preferably, the deep feature extractor of the fault diagnosis model includes: an input layer, a first two-dimensional convolutional layer, a cross-channel normalization layer, a two-dimensional max pooling layer, a first two-dimensional grouped convolutional layer, a ReLU activation function, a cross-channel normalization layer, a two-dimensional max pooling layer, a second two-dimensional convolutional layer, a second two-dimensional grouped convolutional layer, and a third two-dimensional grouped convolutional layer, connected in sequence. In this embodiment, the fault diagnosis model is essentially a causal-inspired domain generalization network.
[0068] As shown in Table 1, Table 1 is the deep feature extractor G of the fault diagnosis model. d The network layer structure table.
[0069] Table 1
[0070]
[0071] Step S3: For the depth features of each sample within a batch, pass them through the channel attention module of the fault diagnosis model to obtain the channel attention weights of each channel in the depth features of that sample. The causal branch of the fault diagnosis model utilizes the channel attention weights of each channel in the deep features of the sample to perform channel-by-channel weighting of the deep features, obtaining a feature representation that emphasizes causal correlation, which serves as the causal feature of the sample; where E is the channel attention weight vector of the deep features. For the deep features, the first Channel attention weights for each channel.
[0072] In this embodiment, preferably, the channel attention module of the fault diagnosis model includes a max pooling layer, a first fully connected layer, a ReLU activation function, a second fully connected layer, and a sigmoid activation function connected in sequence.
[0073] The expression for obtaining the channel attention weights for each channel in the depth features of each sample within a batch is as follows:
[0074] E u =σ.W2δ(W1pool(I u )) / ,
[0075] Among them, E u Let be the channel attention weights for each channel in the depth features of the u-th sample within the batch, and let pool(·) be the max pooling layer. As the first fully connected layer, This is the second fully connected layer, where δ(·) is the ReLU activation function, σ(·) is the sigmoid activation function, and r is the reduction ratio.
[0076] The causal branch of the fault diagnosis model utilizes the channel attention weights of each channel in the depth features of the u-th sample within a batch to perform channel-by-channel weighting of the depth features, obtaining a feature representation that emphasizes causal correlation, which serves as the causal feature of that sample. The formula is as follows:
[0077]
[0078] in, Let k be the k-th channel of the causal feature of the u-th sample in the batch, where k is the channel index. I u (:,:,k) represents the k-th channel of the depth feature of the u-th sample within the batch, E u (:,:,k) represents the channel attention weight of the k-th channel of the depth feature of the u-th sample in the batch.
[0079] Step S4: Subtract the channel attention weight of each channel in the depth features of the sample from 1 to obtain the complementary channel attention weight of each channel in the depth features of the sample; the confusion branch of the fault diagnosis model uses the complementary channel attention weight of each channel in the depth features of the sample to weight the depth features, extracting confusion factors that are irrelevant to the label or susceptible to domain changes, and obtains the confusion features of the sample, as shown in the formula:
[0080]
[0081] in, This represents the k-th channel of the confusion feature of the u-th sample within the batch.
[0082] According to the causal mechanism, the causal feature S directly related to the fault (such as the inherent physical characteristics of the fault itself, such as a specific frequency pulse caused by a bearing crack) is independent of the confounding feature U unrelated to the fault (such as changes in operating conditions, measurement noise, environmental interference, etc., such as load fluctuations at different times, temporary sensor noise). That is, changes in the confounding feature U do not affect the essence of the causal feature S. Specifically, P(S|do(U=u))=P(S), where do(U=u) represents intervention in the confounding feature U, P(S) represents the marginal probability distribution of the causal feature S without considering other factors, and P(S|do(U=u)) represents the marginal probability distribution of the causal feature S under the condition of intervention in the confounding feature U.
[0083] In practical engineering, the acquisition of actual vibration signals is subject to interference of varying intensities at different times, which can be seen as a natural intervention on U. Therefore, for samples with the same label acquired at different times, their causal characteristics should tend to be consistent, and for samples with different labels but the same operating conditions, their confusion characteristics should tend to be consistent. This invention uses a distance metric to achieve theoretical consistency, and then constructs a causal loss function.
[0084] Step S5: Based on the causal features of each sample in the batch, obtain the fault type prediction probability distribution of each sample in the batch, and use it as the output of the fault diagnosis model;
[0085] In this embodiment, specifically, the causal features of each sample in the batch are passed through a Softmax classifier to obtain the fault type prediction probability distribution of each sample in the batch.
[0086] Step S6: For each sample in the batch, the sample that matches the true label of the sample is taken as the positive sample of the sample; the remaining samples are taken as the negative samples of the sample; the difference between the distance between the causal feature of the sample and the distance between the depth feature of the sample and each of its corresponding positive samples is taken as the feature difference between the sample and each of its corresponding positive samples; the difference between the distance between the causal feature of the sample and the distance between the depth feature of the sample and each of its corresponding negative samples is taken as the feature difference between the sample and each of its corresponding negative samples.
[0087] Step S7: Construct a causal loss function based on the feature difference between all samples in the batch and each corresponding positive sample, and the feature difference between each negative sample; use the causal loss function, the cross-entropy loss between the fault type prediction probability distribution of all samples in the batch and their true labels to train the fault diagnosis model, and use the trained fault diagnosis model to diagnose bearing faults in actual vibration signals.
[0088] In this embodiment, preferably, the causal loss function is:
[0089] L causal =
[0090]
[0091] Among them, L causal Let I be the causal loss function, B be the set of deep features of samples within a batch, |B| be the total number of samples within a batch, and I be the total number of samples within a batch. anchor P represents the depth feature of any sample within a batch. a For I anchor The corresponding set of positive samples, |P a |For I anchor The corresponding total number of positive samples, N a For I anchor The corresponding set of negative samples, |N x |For I anchor The corresponding total number of negative samples, For I anchor The causal characteristics, For I anchor The causal characteristics corresponding to any positive sample, For I anchor The confusing features, For I anchor For any negative sample, the confusion feature, I positive For I anchor For any positive sample's depth features, I negative For I anchor For any negative sample, the depth feature is represented by d(·), which represents the distance, and exp(·) represents the exponential function with the natural constant as the base.
[0092] In this embodiment, a total loss function is constructed based on the causal loss function and the cross-entropy loss between the predicted probability distribution of fault types of all samples in a batch and their true labels. The fault diagnosis model is then trained using this total loss function formula:
[0093]
[0094] Where o is the sample index within the batch, and ∝ is L entropy The weights, L, are used to balance the cross-entropy loss and causality loss. entropy The cross-entropy loss is calculated between the predicted probability distribution of fault types for all samples within a batch and their true labels, where V is the total number of fault diagnosis categories, and y is the cross-entropy loss. o,v Let v be the true label of the o-th sample in the batch, v be the fault diagnosis category index, and p be the true label of the o-th sample in the batch. o,v The probability that the o-th sample in a batch is predicted to be a type v fault.
[0095] In this embodiment, the fault diagnosis network is trained using the SGDM optimizer. The parameters of the deep feature extractor and classifier are updated for each epoch as follows:
[0096]
[0097] in, This indicates that during the training of the q-th batch, the deep feature extractor G... c The parameter is μ, which is the learning rate. This indicates that during the (q+1)th batch of training, the deep feature extractor G... c The parameters, This represents the parameters of the classifier during the training of the q-th batch. This represents the parameters of the classifier during the (q+1)th batch of training.
[0098] In this embodiment, preferably, the depth features, causal features, and confusion features of each sample in the batch are estimated by histogram to obtain the probability distribution of the depth features, causal features, and confusion features of each sample in the batch.
[0099] For each sample within a batch, based on the probability distribution of the depth features, causal features, and confusion features of each sample within the batch, the difference between the Rényi divergence between the causal features of the sample and each of its corresponding positive samples and the Rényi divergence between the depth features is taken as the feature difference between the sample and each of its corresponding positive samples; the difference between the Rényi divergence between the causal features of the sample and each of its corresponding negative samples and the Rényi divergence between the depth features is taken as the feature difference between the sample and each of its corresponding negative samples.
[0100] A causal loss function is constructed based on the feature differences between all samples in a batch and their corresponding positive samples and the feature differences between their corresponding negative samples.
[0101] In order to reflect the global structure of data distribution, this invention uses Rényi divergence as a distance metric.
[0102] Given two eigenvectors and Histogram estimation maps I1 and I2 to discrete probability distributions P and Q. Setting the number of histogram bins to K, the eigenvalue range is divided into K intervals (bins), with the γ-th interval... Represented as:
[0103]
[0104] Where θ = min(I1∪I2), θ is the starting point of the histogram.
[0105] Δ is the step size of the histogram, and γ is the interval index.
[0106] The number of elements in each interval is counted using the indicator function I(·), and the result is normalized to obtain the probability distribution:
[0107]
[0108] Where ε is the smoothing term (e.g., 10). -10 Z is used to avoid the occurrence of zero probability. P With Z Q As the normalization factor, it makes Let I be the number of elements in I1. The number of elements in I2. The element index of I1, Let P(γ) be the element index of I2, P(γ) be the probability distribution of the γth interval I1, and Q(γ) be the probability distribution of the γth interval I2.
[0109] After obtaining probability distributions P and Q, the Rényi divergence between two eigenvectors is defined as:
[0110]
[0111] Where α>0, α≠1, and α is the order parameter of the Rényi divergence. When α=0.5, the divergence emphasizes the sensitivity to local differences between the two distributions.
[0112] This invention addresses the challenges of obtaining labeled samples and the scarcity of fault samples in industrial settings, which leads to a severe imbalance in training data. This imbalance causes existing models to tend to identify normal states while ignoring key fault features, thus reducing the effectiveness of mechanical fault diagnosis. The invention uses the target simulation two-dimensional time-frequency graph and its true labels as supplementary training data for the fault diagnosis model, thereby improving the model's accuracy in practical applications. The specific process is as follows:
[0113] Simulated vibration signals and their real labels are generated using a physical model; the simulated vibration signals are then converted into an initial simulated two-dimensional time-frequency plot.
[0114] In this embodiment, the physical model is specifically as follows:
[0115]
[0116] Where s(t) is the simulated vibration signal, f r For frequency conversion, A0 is the modulation amplitude factor, C is the attenuation coefficient, which determines the energy attenuation rate of the impulse signal, f n The fault resonance frequency band is given, and p1 is the number of repetitions of the complete cycle, p1 = [N / N]. T ]-1, N T N is the number of sampling points per cycle, and N is the total number of sampling points. T=[f s [T], where T is the impact period. f fault f is the fault characteristic frequency. s The sampling frequency is t, the time is t, [·] indicates rounding down, T is the impulse period, and e is e. -Ct The term is an exponential decay term, which describes the oscillation decay process after the shock, and i is the repetition index.
[0117] Among them, the fault characteristic frequency f fault The formulas include:
[0118] When the bearing outer ring fault occurs, the characteristic frequency of the outer ring fault is...
[0119] When the bearing inner ring fault occurs, the characteristic frequency of the inner ring fault is...
[0120] When the bearing rolling element failure is present, the characteristic frequency of the rolling element failure is...
[0121] When the bearing cage fails, the characteristic frequency of the cage failure is...
[0122] Where d is the diameter of the rolling element, and D is the pitch circle diameter of the rolling bearing. denoted as the contact angle, and z as the number of rolling elements.
[0123] The initial simulated 2D time-frequency plot is input into the style transfer diffusion module, which outputs the target simulated 2D time-frequency plot. Based on the style transfer diffusion module, the simulated samples and the measured samples are style-transferred and aligned to generate effective amplified samples that can be used for sample supplementation, thus ensuring class balance.
[0124] The fault diagnosis model is trained using the target simulation two-dimensional time-frequency plot and its real labels.
[0125] In this embodiment, preferably, the training process of the style transfer diffusion module includes:
[0126] The initial simulated two-dimensional time-frequency map is input into the image generation network of the style transfer diffusion module to obtain the target simulated two-dimensional time-frequency map; the image generation network includes an encoder, a transformation, and a decoder connected in sequence; the transformation includes multiple residual blocks connected in sequence;
[0127] Specifically, the encoder consists of multiple Conv-GN-ReLU Blocks, each of which includes a convolutional layer, a group normalization layer, and a ReLU activation function connected in sequence. In this embodiment, three Conv-GN-ReLU Blocks are used. The feature representation of the initial simulation two-dimensional time-frequency plot is extracted through convolution and downsampling.
[0128] The transformation uses five sequentially connected residual blocks. Each residual block contains a convolutional layer, a normalization layer, and a ReLU activation function. The input is directly connected to the output through skip connections to further extract high-level features while preserving content information.
[0129] The decoder consists of an upsampling module, a Conv-GN-ReLU Block, an upsampling module, and a Conv-GN-ReLU Block connected in sequence. The upsampled and convolutional modules are used to reconstruct the augmented image.
[0130] The actual vibration signal under the current working condition is converted into an actual two-dimensional time-frequency diagram;
[0131] The intermediate convolutional layers of the loss network of the style transfer diffusion module are used to extract the target simulation features of the target simulation two-dimensional time-frequency map and the actual features of the actual two-dimensional time-frequency map.
[0132] By utilizing any convolutional layer before the intermediate convolutional layer of the loss network, the target simulation local features and the actual local features of the actual two-dimensional time-frequency map are extracted from the target simulation local features and the actual local features of the actual two-dimensional time-frequency map, respectively.
[0133] By utilizing any convolutional layer after the intermediate convolutional layer of the loss network, the global features of the target simulation two-dimensional time-frequency map and the actual global features of the actual two-dimensional time-frequency map are extracted.
[0134] In this embodiment, VGG16 is used as the loss network of the style transfer diffusion module. The loss is calculated by extracting features through VGG16 to ensure that the output image retains content information and matches the style.
[0135] The actual vibration signal under the current working condition x s Convert the actual two-dimensional time-frequency diagram; convert the actual vibration signal x under the current working condition into a real two-dimensional time-frequency diagram. s The feature map extracted by the j-th convolutional layer of VGG16 is represented as follows: Where, φ j (x s () represents the actual vibration signal x under the current operating conditions. s H is a feature extracted from the j-th convolutional layer of VGG16. j The actual vibration signal x under the current working conditionss The height of the feature extracted from the j-th convolutional layer of VGG16, W j The actual vibration signal x under the current working conditions s The width C of the feature extracted by the j-th convolutional layer of VGG16 j The actual vibration signal x under the current working conditions s The number of channels of features extracted from the j-th convolutional layer of VGG16.
[0136] The total style transfer loss is the sum of the style transfer loss between the target simulation features and the actual features, the style transfer loss between the target simulation local features and the actual local features, and the style transfer loss between the target simulation global features and the actual global features.
[0137] The Gram matrix is calculated to measure the correlation between feature channels, eliminating spatial information and retaining only style information. The feature map extracted by VGG16 still retains the spatial location information of the image, while the Gram matrix calculates the statistical correlation between different channels. It does not focus on specific location information, but rather on the style features of the entire image.
[0138] The actual vibration signal y under the current working condition s The formula for calculating the Gram matrix between the feature channels c and c′ extracted by the j-th convolutional layer of VGG16 is as follows:
[0139]
[0140] in, The actual vibration signal y under the current working condition s The Gram matrix between feature channels c and c′ extracted from the j-th convolutional layer of VGG16, where h is the height index, w is the width index, and φ is the height index. j (x s ) h,w,c The actual vibration signal x under the current working conditions s The value of channel c, φ, is extracted from the features obtained by the j-th convolutional layer of VGG16. j (x s ) h,w,c′ The actual vibration signal x under the current working conditions s The feature channel c extracted from the j-th convolutional layer of VGG16 ′ The value of .
[0141] Suppose W is the set of all weight parameters of the image generation network in the style transfer diffusion module, and the optimization objective is to find the optimal parameters W. *This minimizes the expectation of the weighted loss function. By learning the mapping relationship between the simulated time-frequency graph and the actual time-frequency graph, the generated simulated time-frequency graph retains the original fault label information (content) while having the characteristics (style) of the actual working condition, thereby improving the model's ability to generalize to unknown working conditions.
[0142]
[0143] Where, x c For the initial simulation of the two-dimensional time-frequency diagram, {x s} represents the actual set of two-dimensional time-frequency diagrams. W represents the mathematical expectation. * For the optimal parameter solution, l q (f EG (x c ),x s,q Let λ be the loss function between the target simulated 2D time-frequency plot and the q-th actual 2D time-frequency plot. q f is the weighting coefficient for the q-th type of loss. IG (·) represents the image generation network, x s,q This is the q-th actual two-dimensional time-frequency diagram.
[0144] The initial simulation features of the initial simulation two-dimensional time-frequency plot are extracted by utilizing the intermediate convolutional layer of the loss network of the style transfer diffusion module.
[0145] Based on the content reconstruction loss and total style transfer loss between the target simulation features and the initial simulation features, a total style transfer diffusion loss function is constructed. The content reconstruction loss and total style transfer loss are used to measure the differences in content and style between images. The content reconstruction loss is represented by the Euclidean distance between the target simulation features and the initial simulation features. The existing style transfer loss is defined as the squared Frobenius norm of the difference between the Gram matrix of the target simulation two-dimensional time-frequency image and the actual two-dimensional time-frequency image.
[0146] The formula for content reconstruction loss is:
[0147]
[0148] in, For content reconstruction losses, For style transfer loss, ω j Let ω be the first weight corresponding to the j-th convolutional layer of the loss network. j ω' represents the second weight corresponding to the j-th convolutional layer of the loss network. j ,ω′ j Usually set to an equal value. This is a normalization factor to ensure that the style loss scale is consistent across different layers, preventing any one layer from dominating the loss. FDenotes the Frobenius norm. A represents a two-dimensional matrix, ||A|| F Let be the Frobenius norm of matrix A, a be the row index of matrix A, b be the column index of matrix A, and A be the column index of matrix A. a,b This represents the value of the element in the a-th row and b-th column of matrix A.
[0149] Style transfer loss is typically calculated using features extracted from the intermediate layers (relu3_3) of VGG. To ensure comprehensive preservation of style information, this invention selects shallower layers (relu1_2, relu2_2) to capture local style information (such as texture) and deeper layers (relu3_3, relu4_3) to focus on global style information (such as color distribution and large-scale structure). Finally, the total style transfer loss is calculated by weighted summation.
[0150] In this embodiment, preferably, the total loss function for style transfer diffusion is:
[0151]
[0152] Among them, L style_generation Let λ1 be the total style transfer diffusion loss function, λ2 be the content reconstruction loss weight, and λ2 be the total style transfer loss weight. Let f be the content reconstruction loss, φ be the loss network, and f be the loss function. IG (x c ) represents the two-dimensional time-frequency plot of the target simulation, f IG (·) represents the image generation network, x c This is the initial simulation of a two-dimensional time-frequency plot, where j is the layer index and l is the number of layers. start For any convolutional layer before the intermediate convolutional layer of the loss network, l middle For the intermediate convolutional layers of the loss network, l end For any convolutional layer after the intermediate convolutional layers of the loss network, To utilize the j-th convolutional layer of the loss network, the style transfer loss between the extracted features of the target simulated 2D time-frequency map and the actual 2D time-frequency map is calculated. s This is the actual two-dimensional time-frequency diagram.
[0153] In this embodiment, when the loss network is VGG16, l start For relu1_2 / relu2_2, l middle For relu3_3, l end For relu3_3 / relu4_3, after multiple experiments, λ1 and λ2 were set to 1e-4 and 1e-9 respectively.
[0154] The style transfer diffusion module is trained using the total loss function of style transfer diffusion, and the trained style transfer diffusion module is used as the target style transfer diffusion module.
[0155] like Figure 3 As shown, Figure 3 A comparison diagram of the target simulated two-dimensional time-frequency plot generated for the style transfer diffusion module and the actual two-dimensional time-frequency plot. Figure 3 The third column shows the target simulation two-dimensional time-frequency plot generated by the style transfer diffusion module, which is... Figure 3 It can be seen that, compared with the original simulated two-dimensional time-frequency plot, the target simulated two-dimensional time-frequency plot is more similar in style and characteristics to the actual two-dimensional time-frequency plot under the current operating conditions. Using the target simulated two-dimensional time-frequency plot as an extended dataset for the fault diagnosis model and training the model effectively alleviates the class imbalance problem in the original dataset, which is more conducive to subsequent out-of-domain generalization classification diagnosis under a single source domain. Subsequently, the dataset is divided into a base domain and a test domain according to the operating conditions, and the fault diagnosis model is trained.
[0156] In this embodiment, model performance often degrades when the training data (base domain) and test data (test domain) have different distributions. The goal of domain generalization is to enable the model to maintain good performance in the unseen test domain after training in the base domain.
[0157] Specifically, a bearing fault diagnosis dataset is constructed, in which the proportion of samples of different fault categories is balanced; the bearing fault diagnosis dataset includes base domain samples and test domain samples.
[0158] Using base domain samples, the fault diagnosis model is trained by employing a causal loss function and the cross-entropy loss between the fault type prediction probability distribution of all samples in a batch and their true labels. The trained fault diagnosis model is then tested using test domain samples.
[0159] To demonstrate the superiority and effectiveness of the bearing fault diagnosis method proposed in this invention, a comparison between the proposed bearing fault diagnosis method and four comparative methods is presented. For example... Figure 4 As shown in the figure, this is a comparison of generalization results across multiple method domains. Figure 4 (a) in the figure shows the comparison of generalization results for different method domains when the ratio of real samples to simulated samples is 1:1 during training. Figure 4 (b) in the figure shows the comparison results of generalization of different method domains when the ratio of real samples to simulated samples is 1:9 during training.
[0160] Figure 4In comparison, method A1 uses a simulated two-dimensional time-frequency plot of the target to supplement samples and train the fault diagnosis model to overcome the generalization problem in the unbalanced domain. Method A2's fault diagnosis model does not embed a causal loss function. Method A3 uses traditional Euclidean distance as the feature metric in its causal loss function. Experimental results show that all strategies and modules proposed in this invention positively contribute to the accuracy of bearing fault diagnosis. Style transfer improves the quality and domain consistency of the simulated two-dimensional time-frequency plot; without the style transfer diffusion module, the diagnostic accuracy would be significantly reduced. The causal loss function enhances the generalization and discrimination capabilities of the fault diagnosis model; without it, the diagnostic model struggles to achieve good diagnostic accuracy in single-source-domain out-of-domain generalization tasks. Structure-sensitive feature metrics further refine the diagnostic performance, and using Rényi divergence also improves model accuracy. In summary, each module plays a crucial role in improving the generalization diagnostic performance in the unbalanced domain. The bearing fault diagnosis method proposed in this invention can effectively overcome the key challenges of bearing condition monitoring in industrial settings.
[0161] This invention combines a deep neural network structure to automatically complete the bearing condition identification process, reducing reliance on expert experience and manual interpretation, enabling continuous monitoring of bearing health status during equipment operation, reducing the possibility of failure from the source, and improving the operational safety and maintenance efficiency of industrial equipment.
[0162] This second embodiment provides a bearing fault diagnosis system, including:
[0163] The dataset partitioning module is used to acquire a bearing fault diagnosis dataset that includes different vibration signals and their true labels, and to divide the samples in the bearing fault diagnosis dataset into multiple batches.
[0164] The depth feature extraction module is used to convert the vibration signal of each sample in the batch into a two-dimensional time-frequency diagram, and then extract the depth features of each sample in the batch through the depth feature extractor of the fault diagnosis model.
[0165] The causal feature extraction module is used to extract the channel attention weights of each channel in the deep features of each sample in a batch by passing them through the channel attention module of the fault diagnosis model. The deep features are then weighted using the channel attention weights of each channel in the deep features of the sample to obtain the causal features of the sample.
[0166] The obfuscated feature extraction module is used to subtract the channel attention weight of each channel in the depth feature of the sample from 1 to obtain the complementary channel attention weight of each channel in the depth feature of the sample; and to weight the depth feature using the complementary channel attention weight of each channel in the depth feature of the sample to obtain the obfuscated feature of the sample.
[0167] The prediction module is used to obtain the probability distribution of the fault type prediction for each sample in the batch based on the causal characteristics of each sample in the batch, and use it as the output of the fault diagnosis model.
[0168] The feature difference acquisition module is used to, for each sample in a batch, identify samples that match the true label of that sample as positive samples; identify the remaining samples as negative samples; and use the difference between the distance between the causal features of that sample and the distance between the depth features of that sample and each corresponding positive sample as the feature difference between that sample and each corresponding negative sample.
[0169] The diagnostic module is used to construct a causal loss function based on the feature differences between all samples in a batch and their corresponding positive samples and the feature differences between each negative sample. The fault diagnosis model is trained using the causal loss function, the cross-entropy loss between the fault type prediction probability distribution of all samples in the batch and their true labels, and the trained fault diagnosis model is used to diagnose bearing faults on actual vibration signals.
[0170] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0171] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0172] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0173] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0174] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.
Claims
1. A bearing fault diagnosis method, characterized in that, include: Obtain a bearing fault diagnosis dataset that includes different vibration signals and their true labels, and divide the samples in the bearing fault diagnosis dataset into multiple batches; After converting the vibration signal of each sample in the batch into a two-dimensional time-frequency graph, the depth features of each sample in the batch are extracted by the depth feature extractor of the fault diagnosis model. For the depth features of each sample within a batch, the channel attention weights of each channel in the depth features of that sample are obtained by passing them through the channel attention module of the fault diagnosis model. By weighting the depth features of the sample using the channel attention weights of each channel, the causal features of the sample are obtained. Subtract the channel attention weight of each channel in the depth feature of the sample from 1 to obtain the complementary channel attention weight of each channel in the depth feature of the sample. By using the complementary channel attention weights of each channel in the depth features of the sample to weight the depth features, the confusion features of the sample are obtained. Based on the causal characteristics of each sample within a batch, the predicted probability distribution of the fault type for each sample within the batch is obtained and used as the output of the fault diagnosis model. For each sample in a batch, the sample that matches the true label of that sample is taken as the positive sample of that sample; the remaining samples are taken as the negative samples of that sample; the difference between the distance between the causal features of that sample and the distance between the depth features of that sample and each of its corresponding positive samples is taken as the feature difference between that sample and each of its corresponding positive samples. The difference between the distance between the causal features of the sample and each of its corresponding negative samples and the distance between the depth features is taken as the feature difference between the sample and each of its corresponding negative samples. A causal loss function is constructed based on the feature differences between all samples in a batch and their corresponding positive samples and the feature differences between each negative sample. The fault diagnosis model is trained using the causal loss function, the cross-entropy loss between the fault type prediction probability distribution of all samples in the batch and their true labels, and the trained fault diagnosis model is used to diagnose bearing faults in actual vibration signals.
2. The bearing fault diagnosis method according to claim 1, characterized in that, The causal loss function is: Among them, L causal Let I be the causal loss function, B be the set of deep features of samples within a batch, |B| be the total number of samples within a batch, and I be the total number of samples within a batch. anchor P represents the depth feature of any sample within a batch. a For I anchor The corresponding set of positive samples, |P a |For I anchor The corresponding total number of positive samples, N a For I anchor The corresponding set of negative samples, |N x |For I anchor The corresponding total number of negative samples, For I anchor The causal characteristics, For I anchor The causal characteristics corresponding to any positive sample, For I anchor The confusing features, For I anchor For any negative sample, the confusion feature, I positive For I anchor For any positive sample's depth features, I negative For I anchor For any negative sample, the depth feature is represented by d(·), which represents the distance, and exp(·) represents the exponential function with the natural constant as the base.
3. The bearing fault diagnosis method according to claim 1, characterized in that, The depth features, causal features, and confusion features of each sample in the batch are estimated by histogram to obtain the probability distribution of the depth features, causal features, and confusion features of each sample in the batch. For each sample within a batch, based on the probability distribution of the depth features, causal features, and confusion features of each sample within the batch, the difference between the Rényi divergence between the causal features of the sample and each of its corresponding positive samples and the Rényi divergence between the depth features is taken as the feature difference between the sample and each of its corresponding positive samples. The difference between the Rényi divergence between the causal features of the sample and each of its corresponding negative samples and the Rényi divergence between the depth features is taken as the feature difference between the sample and each of its corresponding negative samples. A causal loss function is constructed based on the feature differences between all samples in a batch and their corresponding positive samples and the feature differences between their corresponding negative samples.
4. The bearing fault diagnosis method according to claim 1, characterized in that, The deep feature extractor of the fault diagnosis model includes: an input layer, a first two-dimensional convolutional layer, a cross-channel normalization layer, a two-dimensional max pooling layer, a first two-dimensional grouped convolutional layer, a ReLU activation function, a cross-channel normalization layer, a two-dimensional max pooling layer, a second two-dimensional convolutional layer, a second two-dimensional grouped convolutional layer, and a third two-dimensional grouped convolutional layer, connected in sequence.
5. The bearing fault diagnosis method according to claim 1, characterized in that, The channel attention module of the fault diagnosis model consists of a max pooling layer, a first fully connected layer, a ReLU activation function, a second fully connected layer, and a sigmoid activation function connected in sequence.
6. The bearing fault diagnosis method according to claim 1, characterized in that, This also includes using the target simulation two-dimensional time-frequency graph and its true labels as supplementary training data for the fault diagnosis model, to train the fault diagnosis model: Simulated vibration signals and their real labels are generated using a physical model; the simulated vibration signals are then converted into an initial simulated two-dimensional time-frequency plot. Input the initial simulated 2D time-frequency plot into the style transfer diffusion module, and output the target simulated 2D time-frequency plot; The fault diagnosis model is trained using the target simulation two-dimensional time-frequency plot and its real labels.
7. The bearing fault diagnosis method according to claim 6, characterized in that, The physical model is as follows: Where s(t) is the simulated vibration signal, f r For frequency conversion, A0 is the modulation amplitude factor, C is the attenuation coefficient, and f is the frequency conversion factor. n The fault resonance frequency band is given, and p1 is the number of repetitions of the complete cycle, p1 = [N / N]. T ]-1, N T N is the number of sampling points per cycle, and N is the total number of sampling points. T =[f s [T], where T is the impact period. f fault f is the fault characteristic frequency. s t is the sampling frequency, t is the time, [·] indicates rounding down, and T is the impact period.
8. A bearing fault diagnosis method according to claim 6, characterized in that, The training process for the style transfer diffusion module includes: The initial simulated two-dimensional time-frequency plot is input into the image generation network of the style transfer diffusion module to obtain the target simulated two-dimensional time-frequency plot; the image generation network includes an encoder, a transformation, and a decoder connected in sequence; the transformation includes multiple residual blocks connected in sequence. The actual vibration signal under the current working condition is converted into an actual two-dimensional time-frequency diagram; The intermediate convolutional layers of the loss network of the style transfer diffusion module are used to extract the target simulation features of the target simulation two-dimensional time-frequency map and the actual features of the actual two-dimensional time-frequency map. By utilizing any convolutional layer before the intermediate convolutional layer of the loss network, the target simulation local features and the actual local features of the actual two-dimensional time-frequency map are extracted from the target simulation local features and the actual local features of the actual two-dimensional time-frequency map, respectively. By utilizing any convolutional layer after the intermediate convolutional layer of the loss network, the global features of the target simulation two-dimensional time-frequency map and the actual global features of the actual two-dimensional time-frequency map are extracted. The total style transfer loss is the sum of the style transfer loss between the target simulation features and the actual features, the style transfer loss between the target simulation local features and the actual local features, and the style transfer loss between the target simulation global features and the actual global features. The initial simulation features of the initial simulation two-dimensional time-frequency plot are extracted by utilizing the intermediate convolutional layer of the loss network of the style transfer diffusion module. Based on the content reconstruction loss and total style transfer loss between the target simulation features and the initial simulation features, a total style transfer diffusion loss function is constructed. The style transfer diffusion module is trained using the total loss function of style transfer diffusion, and the trained style transfer diffusion module is used as the target style transfer diffusion module.
9. A bearing fault diagnosis method according to claim 8, characterized in that, The total loss function for style transfer diffusion is: Among them, L style_generation Let λ1 be the total style transfer diffusion loss function, λ2 be the content reconstruction loss weight, and λ2 be the total style transfer loss weight. Let f be the content reconstruction loss, φ be the loss network, and f be the loss function. IG (x c ) is the target simulation two-dimensional time-frequency diagram, f IG (·) represents the image generation network, x c This is the initial simulation of a two-dimensional time-frequency plot, where j is the layer index and l is the number of layers. start For any convolutional layer before the intermediate convolutional layer of the loss network, l middle For the intermediate convolutional layers of the loss network, l end For any convolutional layer after the intermediate convolutional layers of the loss network, To utilize the j-th convolutional layer of the loss network, the style transfer loss between the extracted features of the target simulated 2D time-frequency map and the actual 2D time-frequency map is calculated. s This is the actual two-dimensional time-frequency diagram.
10. A bearing fault diagnosis system, characterized in that, include: The dataset partitioning module is used to acquire a bearing fault diagnosis dataset that includes different vibration signals and their true labels, and to divide the samples in the bearing fault diagnosis dataset into multiple batches. The depth feature extraction module is used to convert the vibration signal of each sample in the batch into a two-dimensional time-frequency diagram, and then extract the depth features of each sample in the batch through the depth feature extractor of the fault diagnosis model. The causal feature extraction module is used to extract the channel attention weights of each channel in the deep features of each sample in a batch by passing them through the channel attention module of the fault diagnosis model. The deep features are then weighted using the channel attention weights of each channel in the deep features of the sample to obtain the causal features of the sample. The obfuscated feature extraction module is used to subtract the channel attention weight of each channel in the depth feature of the sample from 1 to obtain the complementary channel attention weight of each channel in the depth feature of the sample. By using the complementary channel attention weights of each channel in the depth features of the sample to weight the depth features, the confusion features of the sample are obtained. The prediction module is used to obtain the probability distribution of the fault type prediction for each sample in the batch based on the causal characteristics of each sample in the batch, and use it as the output of the fault diagnosis model. The feature difference acquisition module is used to, for each sample in a batch, take the sample that matches the true label of the sample as the positive sample of the sample; take the remaining samples as the negative samples of the sample; and take the difference between the distance between the causal features of the sample and the distance between the depth features of the sample and the corresponding positive samples as the feature difference between the sample and the corresponding positive samples. The difference between the distance between the causal features of the sample and each of its corresponding negative samples and the distance between the depth features is taken as the feature difference between the sample and each of its corresponding negative samples. The diagnostic module is used to construct a causal loss function based on the feature differences between all samples in a batch and their corresponding positive samples and the feature differences between each negative sample. The fault diagnosis model is trained using the causal loss function, the cross-entropy loss between the fault type prediction probability distribution of all samples in the batch and their true labels, and the trained fault diagnosis model is used to diagnose bearing faults on actual vibration signals.