Physical priors and bearing fault diagnosis method, device and medium adapted to mixed domain

By introducing a Laplacian wavelet convolution kernel and a multi-kernel maximum mean difference method combined with Wasserstein distance, the problem of insufficient model generalization ability in bearing fault diagnosis is solved, achieving high accuracy and stable cross-operating condition fault diagnosis, and enhancing the interpretability of feature extraction and the reliability of target domain pseudo-labels.

CN123158366APending Publication Date: 2026-11-24CHANGCHUN UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611343771.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-01
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing technologies for bearing fault diagnosis suffer from insufficient model generalization ability, especially when data distribution is inconsistent under different operating conditions, leading to negative transfer phenomena and reduced accuracy of diagnostic results. Furthermore, transfer learning models lack interpretability and widely applicable edge alignment strategies have theoretical flaws.

Method used

We employ a physical prior and hybrid domain adaptation approach. By introducing Laplacian wavelet convolution kernels and classifiers, and combining multi-kernel maximum mean difference and Wasserstein distance, we perform hybrid domain adaptation training to achieve interpretability of feature extraction and cross-domain feature alignment, thereby reducing class aliasing and negative transfer phenomena.

Benefits of technology

It improves the accuracy and stability of bearing fault diagnosis, enhances the interpretability and cross-condition transferability of the model, effectively brings similar features from different domains closer together and pushes apart dissimilar features from different domains, and improves the reliability of pseudo-labels in the target domain and the stability of the overall training process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123158366A_ABST
    Figure CN123158366A_ABST
Patent Text Reader

Abstract

This invention discloses a bearing fault diagnosis method, equipment, and medium based on physical priors and hybrid domain adaptation, belonging to the field of mechanical fault diagnosis technology. The method includes: acquiring bearing vibration signals under different operating conditions, dividing them into labeled source domain data and unlabeled target domain data; constructing a fault diagnosis model, employing a phased training strategy of edge alignment followed by conditional alignment. During warm-up, classification loss is calculated based on source domain labels, and edge distribution alignment loss is calculated jointly using multi-kernel maximum mean difference. During conditional alignment, high-confidence pseudo-labels are generated for target domain samples, and features of the same type from different domains are brought closer together while features of different types from different domains are pushed apart based on Wasserstein distance. The conditional distribution alignment loss is calculated, the model is jointly optimized, and the fault diagnosis result is output. This invention significantly improves the accuracy and generalization ability of bearing fault diagnosis under varying operating conditions through physical prior feature extraction and a hybrid domain adaptation strategy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of mechanical fault diagnosis technology, and in particular to a bearing fault diagnosis method, equipment and medium that combines physical prior knowledge with hybrid domain adaptation. Background Technology

[0002] As a critical load-bearing component in rotating machinery systems, the operating status of bearings directly affects the overall safety and reliability of the equipment. With the continuous accumulation of monitoring data from industrial equipment, data-driven intelligent fault diagnosis methods have gradually become a research hotspot. However, under different operating conditions, the statistical characteristics of equipment vibration signals often change, resulting in a significant distribution shift between the source domain data in the training phase and the target domain data in actual applications.

[0003] This inconsistent data distribution no longer satisfies the independent and identically distributed assumption of traditional machine learning. Directly applying deep learning models under such circumstances may lead to negative transfer during model generalization, causing a decline in the model's classification ability on the target task. To address the limitations imposed by the scarcity of fault data and the differences in distribution across domains, transfer learning offers an effective solution. It primarily overcomes the differences between the source and target domains to some extent by extracting domain-invariant features and achieving cross-domain knowledge sharing. Therefore, it has been increasingly widely used in fault diagnosis. However, current transfer learning models are often black-box models, lacking interpretability; simultaneously, existing widely used edge alignment strategies have theoretical flaws, ignoring the conditional dependencies between features and labels when aligning feature spaces, which can easily lead to negative transfer and ultimately reduce the accuracy of the model's diagnostic results. Summary of the Invention

[0004] To address the aforementioned shortcomings in existing technologies, this invention provides a bearing fault diagnosis method, device, and medium based on physical prior and hybrid domain adaptation. The physical prior and hybrid domain adaptation bearing fault diagnosis method improves the interpretability of feature extraction results; effectively narrows the gap between similar features from different domains and widens the gap between dissimilar features from different domains, reducing class aliasing and negative transfer phenomena; and it also helps improve the reliability of pseudo-labels in the target domain, enhancing the stability of the overall training process.

[0005] The first aspect of this invention provides a bearing fault diagnosis method based on physical priors and hybrid domain adaptation, comprising: S1, acquire bearing operating signals under different working conditions, and divide them into source domain data and target domain data. The source domain data contains the true label of the fault category, while the target domain data does not contain the true label of the fault category. S2, Construct a fault diagnosis model, which includes a physical encoder and a classifier. The physical encoder has a built-in Laplace wavelet convolution kernel. The Laplace wavelet convolution kernel introduces a normalized oscillation frequency parameter and a damping attenuation parameter, and is a complex exponential convolution kernel with damped oscillation characteristics. The complex exponential convolution kernel is decomposed into a real part convolution kernel and an imaginary part convolution kernel. The physical encoder is used to map a one-dimensional vibration signal into a high-dimensional vibration feature. The classifier is used to output the corresponding fault category based on the high-dimensional vibration feature. S3, perform hybrid domain adaptation training on the fault diagnosis model based on source domain data and target domain data. The hybrid domain adaptation training includes warm-up training and conditional alignment. In the warm-up training stage, the classification loss is calculated based on the true label of the source domain. At the same time, the edge alignment loss is calculated using the difference between the multi-kernel maximum mean between the source domain features and the target domain features. In the conditional alignment stage, based on the pseudo label of the target domain, the Wasserstein distance is used to bring similar features from different domains closer and push dissimilar features from different domains apart, and the conditional alignment loss is calculated. S4: Acquire the real-time operating signal of the target bearing, input it into the fault diagnosis model after training, and output the corresponding fault diagnosis result.

[0006] Furthermore, after acquiring bearing operating signals under different operating conditions, the method includes: Establish a category index mapping for each type of fault data, mapping the category name to an integer label; A fixed-length sliding window is used to extract data from the original bearing operating signal. The window length is determined based on the bearing fault characteristic frequency, sampling frequency, and bearing speed. Each truncated window sample is standardized.

[0007] Furthermore, the physical encoder includes a Laplacian wavelet convolutional layer and a convolutional backbone network. In the Laplacian wavelet convolutional layer, the input vibration signal is convolved one-dimensionally with the real part convolutional kernel and the imaginary part convolutional kernel to obtain the real part feature response and the imaginary part feature response. The real part feature response and the imaginary part feature response are synthesized by modulus to obtain the initial time-frequency response features with translation invariance. The convolutional backbone network consists of multiple one-dimensional convolutional modules. Each module includes convolution operations, normalization processing, nonlinear activation, and pooling operations. After the initial time-frequency response features are input into the convolutional backbone network, they are extracted and transformed layer by layer to output a high-dimensional feature vector.

[0008] The physical encoder further includes an attention enhancement module, which is located after the convolutional backbone network. The attention enhancement module includes channel attention units and spatial attention units connected in sequence. The channel attention unit performs global average pooling and global max pooling on the input features respectively, maps the two results through a shared fully connected layer, adds them together and normalizes them to obtain channel weights, and then weights the features channel by channel. The spatial attention unit takes the mean and maximum values ​​along the channel dimension respectively, concatenates them, maps them through a one-dimensional convolution and normalizes them to obtain position weights, and then weights the feature sequence position by position.

[0009] Furthermore, the normalized oscillation frequency parameter and the damping attenuation parameter are set as learnable parameters and updated through the backpropagation algorithm. During the forward propagation of the Laplace wavelet convolutional layer, boundary constraints are applied to the normalized oscillation frequency parameter and the damping attenuation parameter, which are then limited to a preset physical reasonable range through parameter truncation.

[0010] Furthermore, the classification loss is the labeled smooth cross-entropy loss, expressed by the formula: ,in, Represents classification loss, This represents the target distribution after label smoothing. Indicates belonging to the first Predicted probabilities for each fault category This indicates the total number of fault categories.

[0011] Furthermore, the calculation of the edge alignment loss includes: The source domain features and target domain features are concatenated along the sample dimension, and the pairwise squared Euclidean distance matrix between the joint features is calculated. Extract the distance elements that are greater than zero from the distance matrix, and take the median as the reference kernel bandwidth; Multiple Gaussian kernel bandwidths at different scales are constructed using a preset scaling factor, and the Gaussian kernel matrices obtained at each scale are summed to form a multi-kernel matrix; Extract the kernel matrix inside the source domain, the kernel matrix inside the target domain, and the cross kernel matrix between the source and target domains respectively, and calculate the edge distribution alignment loss in the form of mean embedding difference.

[0012] Furthermore, the conditional distribution alignment loss includes a similar-class convergence loss and a dissimilar-class pushback loss, and the calculation of the conditional distribution alignment loss includes: For samples in the target domain, samples whose maximum value in the class probability distribution output by the classifier is greater than the preset confidence threshold are assigned high-confidence pseudo-labels. Based on the target domain pseudo-labels and the source domain real labels, for each category, a set of similar features in the source domain and a set of similar features with high confidence in the target domain are constructed respectively; For a set of similar features in different domains, the optimal transmission Wasserstein distance is calculated using the Sinkhorn algorithm with entropy regularization as the loss for bringing similar features closer together. For heterogeneous feature sets from different domains, a boundary margin parameter is introduced and combined with a modified linear unit to construct a heterogeneous push-away loss. The conditional distribution alignment loss is calculated by dividing the sum of the similar-class convergence loss and the dissimilar-class divergence loss by the number of valid classes.

[0013] Furthermore, the hybrid domain adaptation training adopts a phased training strategy of edge alignment first and conditional alignment later: in the warm-up training phase, only the classification loss and edge distribution alignment loss are calculated; when the training rounds reach the preset number of warm-up rounds, and the model's classification accuracy on the validation set in the source domain is greater than the preset source domain accuracy threshold, the conditional distribution alignment loss is introduced, and the classification loss, edge distribution alignment loss and conditional distribution alignment loss are weighted and summed to calculate the joint loss.

[0014] A second aspect of the present invention provides a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of a bearing fault diagnosis method that combines physical priors and hybrid domain adaptation.

[0015] A third aspect of the present invention also provides a storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of a bearing fault diagnosis method that combines physical priors with hybrid domain adaptation.

[0016] The beneficial effects of this invention are: (1) The present invention introduces a Laplace wavelet convolution structure at the feature extraction front end, and uses the decay oscillation characteristics of the Laplace wavelet kernel to match the bearing fault impact response signal, so that the vibration signal can be modeled by the physical prior of oscillation and decay in the initial convolution stage of the network, thereby enhancing the model's sensitivity to bearing fault impact features and improving the interpretability of feature extraction results. (2) In the process of cross-domain migration, this invention not only uses the maximum mean difference of multi-kernel to achieve the overall edge distribution alignment between the source domain and the target domain, but also combines high-confidence pseudo-labels and Wasserstein distance to achieve conditional distribution alignment, which can effectively bring similar features from different domains closer together and push away dissimilar features from different domains, reducing class aliasing and negative migration phenomena. (3) The present invention adopts a strategy that combines preheating training with threshold triggering. When the model does not yet have a stable classification ability, it does not directly introduce conditional alignment constraints, which is conducive to improving the reliability of the target domain pseudo-labels and enhancing the stability of the overall training process. (4) By jointly optimizing the classification loss, edge alignment loss and condition alignment loss, this invention enables the model to have strong fault discrimination ability and cross-condition transfer ability, thereby improving the accuracy and stability of bearing fault diagnosis under complex working conditions and having good application value. Attached Figure Description

[0017] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings: Figure 1 A schematic diagram of the overall framework of a bearing fault diagnosis method based on physical priors and hybrid domain adaptation provided in an embodiment of the present invention; Figure 2 This is a model architecture diagram; Figure 3 The unsupervised transfer classification accuracy, F1 score, recall, and precision of the model on the PU dataset are given. Figure 4 The t-SNE visualization results are shown for working condition A as the source domain and working condition C as the target domain. Figure 5 The t-SNE visualization results are shown with load condition B as the source domain and load condition A as the target domain. Figure 6 The t-SNE visualization results are shown for case C as the source domain and case A as the target domain. Figure 7 The t-SNE visualization results are shown with load case B as the source domain and load case C as the target domain. Figure 8 The t-SNE visualization results are shown with condition A as the source domain and condition B as the target domain. Figure 9 This is the t-SNE visualization result with load condition C as the source domain and load condition B as the target domain. Detailed Implementation

[0018] To make the objectives, technical solutions, and beneficial effects of this invention clearer, the invention will be further described in detail below with reference to specific embodiments. It should be understood that the following embodiments are only for explaining this invention and are not intended to limit the scope of protection of this invention. For those skilled in the art, equivalent substitutions or conventional improvements made to some of the technical features without departing from the concept of this invention should all fall within the scope of protection of this invention.

[0019] The first aspect of this invention provides a bearing fault diagnosis method based on physical priors and hybrid domain adaptation, referring to... Figure 1 The method includes: S1, acquire bearing operating signals under different working conditions, and divide source domain data and target domain data; (1) Data source; In this embodiment, real damage data from the Paderborn University bearing dataset (PU dataset) was selected as the experimental object to construct a cross-condition transfer diagnostic task. The diagnostic task is a 15-class classification task, which identifies 15 operating states of the bearing under different real damage conditions.

[0020] The PU dataset uses the 6203 type rolling bearing as the research object, and provides vibration signals, motor current signals, and operating condition information such as speed, load torque, radial load, and temperature. The main signal sampling frequency is 64kHz. The PU dataset contains 32 sets of bearing condition samples, including 6 sets of healthy bearings, 12 sets of artificially damaged bearings, and 14 sets of truly damaged bearings. For each operating condition, 20 sets of data are collected, with each set containing 4 seconds of data. The file names include the operating condition code and the bearing number to facilitate cross-operating condition comparison experiments. In this embodiment, healthy bearing samples and 14 sets of truly damaged bearing samples are selected to construct a 15-category cross-operating condition fault diagnosis task containing 1 type of healthy state and 14 types of truly damaged states.

[0021] Real damage samples are obtained through accelerated life testing, thus more closely resembling actual service conditions in terms of damage formation mechanisms and surface morphology. This part of the damage mainly includes fatigue pitting and plastic indentation, and the damage sites can be located in the inner or outer rings. It also includes single-point damage, repeated damage, multiple damage, and distributed damage, so the fault characterization is significantly more complex than that of regular artificial damage.

[0022] The PU dataset also sets up a variety of standard operating conditions. There are differences in speed, torque and radial load between different operating conditions, which can form a relatively typical inter-domain distribution offset.

[0023] Based on the above characteristics, the real damage portion of the PU dataset is particularly suitable for unsupervised transfer learning research. It can be used to construct cross-condition fault diagnosis tasks with "labeled source domain and unlabeled target domain" to verify the model's feature transfer and generalization capabilities under complex real damage and changing conditions.

[0024] This embodiment mainly sets up three working conditions, and the specific settings for each working condition are shown in Table 1: Operating conditions Rotational speed (rpm) Load torque (N·m) A 900 0.7 B 1500 0.1 C 1500 0.7 (Table 1) This embodiment sets up three operating conditions: A, B, and C. Bearing vibration samples collected under one of these conditions are selected as source domain data, and bearing vibration samples collected under another condition are selected as target domain data. This constructs six sets of unsupervised cross-condition transfer diagnosis tasks: A→B, A→C, B→A, B→C, C→A, and C→B. The left side of the arrow represents the source domain condition, and the right side represents the target domain condition. For each transfer task, the source domain samples retain the true fault category labels for supervised classification training of the model. The target domain training samples do not provide true fault category labels during model training; they are only used for edge distribution alignment between the source and target domains, generation of high-confidence pseudo-labels for the target domain, and conditional distribution alignment. After model training, the fault diagnosis performance of the model under the target operating conditions is evaluated using the true labels from the target domain test set. These true labels from the target domain test set are not involved in model parameter updates or model selection.

[0025] (2) Data processing; 2.1 First, the PU dataset is read and samples are constructed. For each type of fault data in the given root directory, the .mat files in the corresponding category folder are traversed and sorted by the last digit of the filename. A category index mapping relationship is established for each type of data, mapping the category name to an integer label, denoted as: , ,in This represents a set of bearing condition categories. In this embodiment, it includes 1 category of healthy condition and 14 categories of actual damage condition, for a total of 15 categories. This represents the class label of the corresponding sample. The class index mapping is used for subsequent source domain supervised classification training and target domain result evaluation.

[0026] 2.2 A fixed-length sliding window is used to extract the original vibration signal. By calculating the bearing's fault characteristic frequency and comparing it with the sampling frequency and bearing speed of the dataset, the window length L is set to 2048 sampling points. In this embodiment, sliding sampling is performed with a step size s of 6144 (s=3L). By using a sliding extraction method with larger intervals, the strong correlation between adjacent samples is reduced, resulting in better dispersion of the training samples in the time domain.

[0027] 2.3 To reduce the impact of amplitude scale differences between different samples on subsequent feature extraction and distribution alignment, each truncated window sample is standardized. Let a certain window sample be... The mean is The standard deviation is Standardized samples It can be represented as: ,in, A very small constant is introduced to prevent the denominator from being zero. Through standardization, amplitude fluctuations and scale differences between different samples can be reduced, improving the consistency of input samples and laying the foundation for subsequent physical feature extraction and cross-domain distribution alignment.

[0028] 2.4 Dataset Partitioning. 400 samples of each class in the source domain are used for training, and 100 samples are used as a validation set to monitor the model's classification accuracy in the source domain, assisting in determining the timing of enabling conditional alignment strategies and model selection; 400 samples of each class in the target domain are used for training (without class labels), and 100 samples are used for testing.

[0029] S2, Construct a fault diagnosis model; like Figure 2 As shown, the fault diagnosis model in this embodiment consists of two parts: a physical encoder and a classifier. The physical encoder is responsible for mapping the one-dimensional vibration signal into a high-dimensional feature representation, and it is composed of a pre-Laplace wavelet convolutional layer, a convolutional backbone network, and an attention enhancement module. The classifier is responsible for outputting the fault category based on the high-dimensional features.

[0030] (1) Pre-Laplace wavelet convolution layer; The first layer of the physical encoder employs a pre-Laplace wavelet convolution structure. The design philosophy behind this layer is that the vibration response excited by local bearing faults typically manifests as an oscillating impact signal with a damped envelope. Traditional random initialization convolution kernels lack explicit physical priors, hindering the model's focus on fault-related modes in the initial stages. Therefore, a Laplace wavelet kernel with damped oscillation characteristics is introduced as the pre-convolution layer.

[0031] By introducing normalized oscillation frequency parameters and damping decay parameters, a complex exponential convolution kernel with damped oscillation characteristics is constructed to enhance the model's ability to express the impact response characteristics of bearing failures. Let the time variable be... The normalized oscillation frequency is The damping attenuation coefficient is Then the complex exponential form of the Laplace wavelet convolution kernel can be expressed as: ;in, The imaginary unit is used, and the exponential decay term is used in the formula. Used to characterize the characteristic of the energy of the impact response gradually decaying over time, oscillation term Used to describe the periodic oscillation structure resulting from local resonance after a fault impact. Parameters and The parameters are set as learnable parameters to enhance the ability of the front layer to extract fault-related information, and the parameters are updated through the backpropagation algorithm.

[0032] Since convolutional neural networks typically operate in the real number domain, the complex exponential convolution kernel described above is decomposed into a real part convolution kernel according to Euler's formula. and imaginary part convolution kernel : ; ; Input vibration signal One-dimensional convolutions are performed with the real part convolution kernel and the imaginary part convolution kernel respectively to obtain the real part feature response. and imaginary part characteristic response : ; , where * denotes a one-dimensional convolution operation. After obtaining the real and imaginary feature responses, modulus synthesis is performed to obtain the initial time-frequency response features with translation invariance. : By synthesizing the modulus, the responses of the real and imaginary parts to fault impacts can be combined, reducing the influence of phase changes on feature representation and thus improving the stability of initial feature extraction.

[0033] The above method facilitates the extraction of fault-sensitive information related to local damage in bearings by the pre-convolutional layer.

[0034] Furthermore, to prevent the model from learning meaningless high-frequency noise patterns or abnormal convolutional kernels with insufficient attenuation characteristics, this embodiment sets boundary constraints on the normalized oscillation frequency parameter and damping attenuation parameter during forward propagation, ensuring they remain within a preset physically reasonable range. Parameter truncation enhances the physical interpretability of the convolutional kernel and improves the numerical stability of the training process.

[0035] (2) Convolutional backbone network; After the initial time-frequency response features are output from the pre-Laplacian wavelet convolutional layer, they will be further input into the subsequent convolutional backbone network to extract higher-level fault representations.

[0036] This convolutional backbone network consists of multiple one-dimensional convolutional modules. Each module can include convolution operations, normalization processing, nonlinear activation, and pooling operations. By expanding the receptive field layer by layer and compressing the temporal dimension, it achieves a gradual mapping from local waveforms to abstract semantic features.

[0037] (3) Attention enhancement module; To further enhance the model's ability to filter key time-frequency features, this embodiment adds an attention enhancement module after the convolutional backbone network. This module includes channel attention units and spatial attention units connected in sequence.

[0038] The channel attention unit performs global average pooling and global max pooling on the input features respectively. The two results are mapped through a shared fully connected layer and then added together. The results are normalized by the Sigmoid function to obtain the channel weights. The features are weighted channel by channel to enhance the response of important fault-related channels.

[0039] The spatial attention unit takes the mean and maximum values ​​along the channel dimension, concatenates them, performs a one-dimensional convolution mapping, and normalizes them using the Sigmoid function to obtain position weights. These weights are then applied to the feature sequence position by position to highlight the timing and location of the impulse response in the signal.

[0040] After processing by the attention enhancement module, the final output feature dimension is 256, and the encoder output feature vector is: , This represents the mapping process of the physical encoder. Represents the real number field.

[0041] (4) Classifier; After obtaining the high-dimensional feature vector output by the physical encoder (i.e., after the attention enhancement module), Then, it is input into a classifier to complete the fault category identification.

[0042] The classifier used in this embodiment consists of two fully connected layers: the first layer maps 256-dimensional features to 128-dimensional features and performs a non-linear transformation using the ReLU activation function, while introducing a Dropout mechanism to suppress overfitting; the second layer further maps the 128-dimensional latent features to the fault category space, outputting unnormalized prediction results corresponding to 15 fault categories. The logits vector output by the classifier can be represented as: ,in and Here are the weight matrix and bias terms for the first fully connected layer. and This represents the weight matrix and bias terms of the second fully connected layer. This represents the activation function.

[0043] Furthermore, the logits vector is transformed into a class probability distribution using the softmax function: .in, Indicates that the sample belongs to the first Predicted probability of class The first output of the classifier The logits vector of the class. The index of the class with the highest probability is taken as the prediction result for the current input sample.

[0044] This classifier is used for supervised learning of labeled samples in the source domain, as well as for generating pseudo-labels for samples in the target domain and outputting the final fault category.

[0045] S3, Loss Function and Model Training; This embodiment employs hybrid domain adaptation training based on source domain data and target domain data, and introduces classification loss, edge distribution alignment loss, and conditional distribution alignment loss to form a unified joint loss function, so as to simultaneously ensure the ability to distinguish fault categories and the ability to migrate across operating conditions.

[0046] (1) Classification loss; The classification loss term is calculated based solely on the true labels of the source domain samples. To enhance the model's generalization ability and mitigate overfitting, a labeled smoothed cross-entropy loss is employed. Let the source domain input samples be... , tag as The predicted probability output by the classifier is Then the classification loss term can be expressed as: ,in, This represents the target distribution after label smoothing (in this embodiment, the label smoothing coefficient is set to 0.1).

[0047] (2) Edge distribution alignment loss; To reduce the difference between the overall feature distributions of the source and target domains, this embodiment employs Multi-Kernel Maximum Mean Discrepancy (MK-MMD) as the edge distribution alignment loss. Specifically, a multi-kernel kernel function is constructed using multiple Gaussian kernels of different scales, and the mean embedding difference between the source and target domain feature distributions is measured in the Hilbert space of the regenerating kernel corresponding to the multi-kernel kernel function. Let the source domain features of the current batch be... The target domain features are If the number of samples in the source domain and the number of samples in the target domain are n and m respectively, then the multi-core maximum mean difference loss can be expressed as: ; in, This represents the feature map induced by the multi-kernel kernel function. Let n represent the corresponding reproducing kernel Hilbert space, where n and m represent the number of samples in the source and target domains, respectively.

[0048] The calculation steps for the multi-kernel maximum mean difference loss are as follows: First, concatenate the source domain features and target domain features of the current batch along the sample dimension to obtain the joint feature matrix Z. Then, calculate the pairwise squared Euclidean distance between any two samples in the joint features to form a distance matrix D. Extract the distance elements greater than zero from the distance matrix D, and take the median of the distance elements as the benchmark Gaussian kernel scale parameter. At the same time, a preset minimum constant is added. To avoid the scale parameter being zero, i.e. In this embodiment, Based on the aforementioned baseline Gaussian kernel scaling parameters, five Gaussian kernel scaling parameters with different scales are constructed according to a scaling factor q=2.0: That is, the five scales are as follows: .

[0049] For the r-th scale, the corresponding Gaussian kernel matrix is ​​calculated based on the pairwise squared Euclidean distance matrix D. The kernel function values ​​corresponding to any i-th sample and j-th sample are represented as follows: The multi-kernel matrix is ​​obtained by summing the Gaussian kernel matrices obtained at five different scales element-wise. Subsequently, based on the number of source domain samples n and the number of target domain samples m, the kernel matrix within the source domain is extracted from the multi-kernel matrix K. Kernel matrix within the target domain and the cross kernel matrix between the source and target domains The multi-core maximum mean difference loss is calculated according to the mean embedding difference form: ; (3) Conditional distribution alignment loss;

[0050] Considering that performing only edge distribution alignment may result in insufficient aggregation of similar samples from different domains, while heterogeneous samples from different domains may still exhibit aliasing, this embodiment further introduces a conditional distribution alignment loss term after the preheating training is completed, i.e., when the number of iterations reaches the preset number of preheating iterations, and the model's classification accuracy in the source domain is greater than the preset source domain accuracy threshold.

[0051] First, the target domain samples are input into the current model to obtain the classifier output, and the class probability distribution is obtained through the softmax function; let the maximum predicted probability of the target domain samples be... If it is greater than or equal to the preset confidence threshold (In this embodiment, it is set to 0.8), then the predicted category corresponding to the sample is considered to have high confidence, and the pseudo-label is reliable, that is, if the first... The target domain samples satisfy If the corresponding category index is used, then the sample's high-confidence pseudo-label is used.

[0052] Based on the true labels of the source domain samples and the high-confidence pseudo labels of the target domain samples, for each category In sequence, feature vectors from the source domain and feature vectors from the target domain are extracted under this category, and feature sets of the same type in the source domain are constructed respectively. High-confidence feature set of the same type as the target domain For a set of similar features from different domains, the optimal transit Wasserstein distance is calculated using the Sinkhorn algorithm with entropy regularization, and this distance is used as the loss for bringing similar features closer together. Minimizing this Wasserstein distance achieves feature convergence. For a set of dissimilar features from different domains, a boundary margin parameter is introduced. (In this embodiment, the boundary margin parameter is taken as) This approach combines modified linear units to construct a heterogeneous push-away loss, applying a penalty when the distance between heterogeneous features in different domains is less than the boundary margin, thereby enhancing the discriminability between different categories. Through this strategy, the conditional alignment objective of "bringing similar categories closer and pushing heterogeneous categories further apart" can be achieved simultaneously.

[0053] The similar convergence loss can be expressed as: ,in, This represents the optimal transmission distance calculated using the Sinkhorn approximation.

[0054] The outlier push-away loss can be expressed as: .in This indicates that the pseudo-label in the target domain does not belong to the first... The set of features of a class. When the optimal transmission distance between features from different domains and of different classes is less than the boundary margin, a penalty is imposed; when the distance is already large enough, no additional penalty is imposed.

[0055] The conditional alignment loss function can be written as: For the k-th class, when the feature set of the k-th class in the source domain... The feature set of the target domain with high-confidence pseudo-labels of the k-th class When all values ​​are not empty, this category is used as a valid class-alignment category to calculate the class-close loss; furthermore, when calculating the dissimilar-class push-away loss, if the high-confidence pseudo-label of the target domain does not belong to the feature set of the k-th class... If the value is not empty, calculate the corresponding outlier push-out loss; otherwise, skip the outlier push-out term for that category. This indicates the number of categories participating in the valid condition alignment calculation in the current batch. When there are no valid categories, let... .

[0056] (4) Phased training; In this embodiment, the model training adopts a phased training strategy of "edge alignment first, then conditional alignment." The core is as follows: In the early stages of training, the basic discriminative ability and preliminary cross-domain transfer ability of the model are established through source domain supervised learning and global edge alignment. Specifically, supervised classification learning is first performed based on the true labels of the source domain samples, and the classification loss is calculated. Simultaneously, the edge distribution alignment loss is constructed using the difference in the maximum mean of the multi-kernel values ​​between the source domain features and the target domain features, thereby achieving preliminary alignment of the overall feature distribution across domains. Considering the low reliability of pseudo-labels in the target domain during the early stages of training, pseudo-label-driven conditional alignment is introduced after the model training is relatively stable. By combining edge alignment and conditional alignment, the negative transfer risk caused by traditional domain adaptation methods that only perform overall distribution alignment while ignoring category conditional information is effectively reduced, and the adverse effects of early pseudo-label noise on the training process are mitigated. For the specific process, please refer to the appendix. Figure 3 .

[0057] Specifically, in the early stages of training, the model is in a warm-up training phase. At this time, only the classification loss is calculated. Edge alignment loss The relevant loss function can be written as: This approach allows the physical encoder and classifier to form a relatively stable discrimination boundary first, and reduces the negative impact of poor quality of early pseudo-labels in the target domain.

[0058] When the training rounds reach the preset number of warm-up rounds (10 rounds in this embodiment), and the model's performance metrics in the source domain meet the preset conditions (the source domain classification accuracy threshold is set to 90% in this embodiment), a conditional distribution alignment loss is further introduced to form a joint loss, which is expressed as: , and As the weighting coefficient, in this embodiment, we take... , This is to improve the reliability of pseudo-labels in the target domain and the stability of training.

[0059] The model training parameters are set as follows: batch size of 64; total number of training epochs of 100; Adam optimizer; initial learning rate of 1×10⁻⁶. -3 The weight decay coefficient is set to 5×10. -4 The learning rate scheduling strategy uses cosine annealing, with a minimum learning rate of 1×10⁻⁶. -6 .

[0060] During training, let the current batch of source domain input samples be... The target domain input sample is The source domain samples and target domain samples are respectively input into the physical encoder to obtain the source domain features. Features of the target domain and will The input is fed into the classifier to obtain the fault category of the source domain sample. First, calculate... If the conditional alignment enable condition is met, the conditional alignment module will be called to calculate further. And added to the total loss to form a joint loss. Then, backpropagation is performed on the joint loss, and the Adam optimizer is used to update all learnable parameters in the physical encoder and classifier.

[0061] S4, Model Evaluation and Fault Diagnosis; After completing all training, this embodiment first loads the physical encoder and classifier parameters saved when the source domain validation set accuracy is highest, and then uses the target domain test set to perform a final evaluation of the model. Let the input of the target domain test set be... The model predicts the output as follows: The final test accuracy in the target domain is calculated by comparing the predicted categories with the true labels in the target domain test set. To further visualize the changes in feature distribution of the model during cross-condition migration, Figures 4 to 9 The t-SNE visualization results after the target domain features are extracted by the model for different transfer tasks (such as A→B, A→C, etc.). As can be seen from the figure, samples of the same target domain exhibit good clustering in the feature space, and the boundaries between different categories are clear, indicating that the method can effectively achieve inter-domain feature alignment and category discrimination.

[0062] After the accuracy evaluation results meet the preset qualification standards, the model is used for fault diagnosis. The real-time operating signal of the target bearing under test is first extracted by the pre-Laplace wavelet convolutional layer to extract the initial features with physical prior constraints. Then, it is inferred by the subsequent convolutional backbone network, attention enhancement module and classifier, and finally outputs the fault category of the target bearing under test, so as to realize the bearing fault diagnosis under variable working conditions.

[0063] Based on the general concept of the first aspect described above, the second aspect of the present invention provides a computer device for implementing the above embodiments and preferred embodiments, the details of which will not be repeated hereafter. The computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When executed by the processor, the computer program implements the steps described in the method embodiments above.

[0064] A third aspect of the present invention also provides a storage medium storing a computer program, wherein the computer program is configured to execute the steps in the above method embodiments when running.

[0065] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0066] The sequence numbers of the above embodiments are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments. The descriptions of each embodiment in the above embodiments have different emphases; for parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0067] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A bearing fault diagnosis method based on physical priors and hybrid domain adaptation, characterized in that, include: S1, acquire bearing operating signals under different working conditions, and divide them into source domain data and target domain data. The source domain data contains the true label of the fault category, while the target domain data does not contain the true label of the fault category. S2, Construct a fault diagnosis model, which includes a physical encoder and a classifier. The physical encoder has a built-in Laplace wavelet convolution kernel. The Laplace wavelet convolution kernel introduces a normalized oscillation frequency parameter and a damping attenuation parameter, and is a complex exponential convolution kernel with damped oscillation characteristics. The complex exponential convolution kernel is decomposed into a real part convolution kernel and an imaginary part convolution kernel. The physical encoder is used to map a one-dimensional vibration signal into a high-dimensional vibration feature. The classifier is used to output the corresponding fault category based on the high-dimensional vibration feature. S3, perform hybrid domain adaptation training on the fault diagnosis model based on source domain data and target domain data. The hybrid domain adaptation training includes warm-up training and conditional alignment. In the warm-up training stage, the classification loss is calculated based on the true label of the source domain. At the same time, the edge alignment loss is calculated using the difference between the multi-kernel maximum mean between the source domain features and the target domain features. In the conditional alignment stage, based on the pseudo label of the target domain, the Wasserstein distance is used to bring similar features from different domains closer and push dissimilar features from different domains apart, and the conditional alignment loss is calculated. S4: Acquire the real-time operating signal of the target bearing, input it into the fault diagnosis model after training, and output the corresponding fault diagnosis result.

2. The bearing fault diagnosis method based on physical priors and hybrid domain adaptation according to claim 1, characterized in that, After acquiring bearing operating signals under different operating conditions, the method includes: Establish a category index mapping for each type of fault data, mapping the category name to an integer label; A fixed-length sliding window is used to extract data from the original bearing operating signal. The window length is determined based on the bearing fault characteristic frequency, sampling frequency, and bearing speed. Each truncated window sample is standardized.

3. The bearing fault diagnosis method based on physical priors and hybrid domain adaptation according to claim 1, characterized in that, The physical encoder includes a Laplacian wavelet convolutional layer and a convolutional backbone network. In the Laplacian wavelet convolutional layer, the input vibration signal is convolved one-dimensionally with the real part convolutional kernel and the imaginary part convolutional kernel to obtain the real part feature response and the imaginary part feature response. The real part feature response and the imaginary part feature response are synthesized by modulus to obtain the initial time-frequency response features with translation invariance. The convolutional backbone network consists of multiple one-dimensional convolutional modules. Each module includes convolution operations, normalization processing, nonlinear activation, and pooling operations. After the initial time-frequency response features are input into the convolutional backbone network, they are extracted and transformed layer by layer to output a high-dimensional feature vector.

4. The physical encoder further includes an attention enhancement module, which is located after the convolutional backbone network. The attention enhancement module includes channel attention units and spatial attention units connected in sequence. The channel attention unit performs global average pooling and global max pooling on the input features respectively. The two results are mapped through a shared fully connected layer, added together, and normalized to obtain channel weights, which are then applied to the features channel by channel. The spatial attention unit takes the mean and maximum values ​​along the channel dimension, concatenates them, maps them through a one-dimensional convolution, and normalizes them to obtain position weights, which are then applied to the feature sequence position by position.

5. The bearing fault diagnosis method based on physical priors and hybrid domain adaptation according to claim 3, characterized in that, The normalized oscillation frequency parameter and damping attenuation parameter are set as learnable parameters and updated through the backpropagation algorithm. During the forward propagation of the Laplace wavelet convolution layer, boundary constraints are applied to the normalized oscillation frequency parameter and damping attenuation parameter, which are then limited to a preset physical reasonable range through parameter truncation.

6. The bearing fault diagnosis method based on physical priors and hybrid domain adaptation according to claim 1, characterized in that, The classification loss is the labeled smooth cross-entropy loss, expressed by the formula: ,in, Represents classification loss. This represents the target distribution after label smoothing. Indicates belonging to the first Predicted probabilities for each fault category This indicates the total number of fault categories.

7. The bearing fault diagnosis method based on physical priors and hybrid domain adaptation according to claim 1, characterized in that, The calculation of the edge alignment loss includes: The source domain features and target domain features are concatenated along the sample dimension, and the pairwise squared Euclidean distance matrix between the joint features is calculated. Extract the distance elements that are greater than zero from the distance matrix, and take the median as the reference kernel bandwidth; Multiple Gaussian kernel bandwidths at different scales are constructed using a preset scaling factor, and the Gaussian kernel matrices obtained at each scale are summed to form a multi-kernel matrix; Extract the kernel matrix inside the source domain, the kernel matrix inside the target domain, and the cross kernel matrix between the source and target domains respectively, and calculate the edge distribution alignment loss in the form of mean embedding difference.

8. The bearing fault diagnosis method based on physical priors and hybrid domain adaptation according to claim 1, characterized in that, The conditional distribution alignment loss includes a similar-class convergence loss and a dissimilar-class pushback loss. The calculation of the conditional distribution alignment loss includes: For samples in the target domain, samples whose maximum value in the class probability distribution output by the classifier is greater than the preset confidence threshold are assigned high-confidence pseudo-labels. Based on the target domain pseudo-labels and the source domain real labels, for each category, a set of similar features in the source domain and a set of similar features with high confidence in the target domain are constructed respectively; For a set of similar features in different domains, the optimal transmission Wasserstein distance is calculated using the Sinkhorn algorithm with entropy regularization as the loss for bringing similar features closer together. For heterogeneous feature sets from different domains, a boundary margin parameter is introduced and combined with a modified linear unit to construct a heterogeneous push-away loss. The conditional distribution alignment loss is calculated by dividing the sum of the similar-class convergence loss and the dissimilar-class divergence loss by the number of valid classes.

9. The bearing fault diagnosis method based on physical priors and hybrid domain adaptation according to claim 1, characterized in that, The hybrid domain adaptation training adopts a phased training strategy of edge alignment first and conditional alignment later: in the warm-up training phase, only the classification loss and edge distribution alignment loss are calculated; when the training rounds reach the preset number of warm-up rounds and the model's classification accuracy on the validation set in the source domain is greater than the preset source domain accuracy threshold, the conditional distribution alignment loss is introduced, and the classification loss, edge distribution alignment loss and conditional distribution alignment loss are weighted and summed to calculate the joint loss.

10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the computer program is executed by the processor, it implements the steps of the bearing fault diagnosis method based on physical priors and hybrid domain adaptation as described in any one of claims 1 to 8.

11. A storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, implements the steps of the bearing fault diagnosis method based on physical priors and hybrid domain adaptation as described in any one of claims 1 to 8.