Rolling bearing cross-domain fault diagnosis method based on transfer learning
By employing transfer learning methods, including cross-domain performance evaluation, sample selection, and feature alignment, the problem of insufficient model adaptability in cross-domain fault diagnosis of rolling bearings is solved, enabling high-precision fault diagnosis and equipment status monitoring under different operating conditions.
Patent Information
- Application Number
- CN202610032901.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-12
- Publication Date
- 2026-05-01
AI Technical Summary
In the cross-domain fault diagnosis of rolling bearings, the existing technology suffers from a decline in model diagnostic performance due to the difference in feature distribution between the source domain and the target domain. Furthermore, it requires labeled data from the target domain or additional adversarial network training, which increases computational costs and limits the number of samples in real-world environments.
By employing a transfer learning-based approach, we improve the model's adaptability and classification accuracy in the target domain through preliminary cross-domain performance evaluation, source domain sample selection strategy, CORAL feature distribution alignment, and optimization of various machine learning models.
It significantly improves the feature distribution difference between the source and target domains, enhances the accuracy of cross-domain transfer and classification precision, can effectively diagnose bearing faults under various working conditions, and can be extended to the fault diagnosis of other industrial equipment.
Smart Images

Figure CN121959271A_ABST
Abstract
Description
A method for cross-domain fault diagnosis of rolling bearings based on transfer learning Technical Field
[0001] This invention relates to the field of cross-domain fault technology for rolling bearings, and more particularly to a method for diagnosing cross-domain faults in rolling bearings based on transfer learning. Background Technology
[0002] Rolling bearings are critical components of rotating machinery, and their condition directly affects the safe and stable operation of the equipment. In recent years, data-driven intelligent fault diagnosis methods have achieved good results in laboratory settings or under single operating conditions (i.e., the "source domain"). However, the problem lies in the fact that when these models are applied to the "target domain" with different operating conditions, loads, equipment models, or environmental noise levels, the feature distributions of the source and target domains often differ significantly (i.e., domain shift), leading to a substantial decrease in the model's diagnostic performance, and potentially even resulting in prediction bias or complete failure.
[0003] Most existing methods require labeled data from the target domain or additional adversarial network training, which not only increases computational costs but also makes them highly sensitive to hyperparameter selection. Furthermore, in real-world industrial environments, target domain data is typically unlabeled and the sample size is limited. Therefore, developing an unsupervised, lightweight, and interpretable domain adaptation strategy has become a pressing issue in this field. Summary of the Invention
[0004] The purpose of this invention is to address the shortcomings of existing technologies by proposing a cross-domain fault diagnosis method for rolling bearings based on transfer learning. This method effectively improves the model's adaptability and classification accuracy in the target domain by optimizing feature distribution and screening source domain samples.
[0005] To achieve the above objectives, the present invention adopts the following technical solution:
[0006] A method for cross-domain fault diagnosis of rolling bearings based on transfer learning includes the following steps:
[0007] Step 1: Preliminary cross-domain performance evaluation. The fault diagnosis model trained on source domain data is directly applied to unlabeled data in the target domain to evaluate its cross-domain performance.
[0008] Step 2: Source domain sample selection strategy. To reduce the difference in feature distribution between the source domain and the target domain, a source domain sample selection mechanism is proposed.
[0009] Step 3: CORAL feature distribution alignment. The CORAL (Correlation Alignment) transfer method is introduced to transfer and adjust the feature distributions of the source and target domains.
[0010] Step 4: Model optimization and performance verification. After completing feature alignment and sample selection, various machine learning models, including neural networks, random forests and XGBoost, are used to perform classification tasks on the target domain data, and the optimal model is obtained by evaluating the model performance using multiple metrics.
[0011] Step 5: Visualize and analyze the features and classification results to verify the alignment effect.
[0012] Preferably, step 1 includes the following specific methods:
[0013] The t-SNE method is used to perform two-dimensional dimensionality reduction on the features of the source and target domains, and the obvious domain shift phenomenon is presented through visualization. This phenomenon indicates that there are significant differences in the spatial distribution of features between the source and target domains. If the transfer method is used directly, it is impossible to achieve reasonable fault category discrimination on the target domain data, thus resulting in prediction bias.
[0014] Preferably, step 2 includes the following specific methods:
[0015] The source domain sample selection mechanism includes feature standardization, target domain feature interval calculation, feature overlap judgment, and threshold setting, thereby selecting source domain samples that better match the target domain distribution and eliminating samples with large distribution differences. Experiments show that selection within a reasonable threshold range (e.g., τ = 0.6 to 0.8) can retain a sufficient number of samples while making the source domain distribution closer to the target domain, significantly improving the model's cross-domain adaptability.
[0016] Preferably, step 3 includes the following specific methods:
[0017] The CORAL (Correlation Alignment) transfer method achieves effective alignment of feature distributions between the source and target domains by minimizing the difference between the feature covariance matrices.
[0018] Non-numerical features are converted into numerical forms using two methods: label encoding and one-hot encoding.
[0019] Let the source domain sample matrix be X. S ∈R ns×d The target domain sample matrix is X T ∈R nt×d , where n s and n t Let be the number of samples, and d be the feature dimension. Then the covariance matrices of the source and target domains are defined as follows:
[0020]
[0021]
[0022] If the source domain feature covariance matrix is C S The feature covariance matrix of the target domain is C T Therefore, the optimization objective of CORAL is:
[0023]
[0024] In the relevant calculations of the CORAL transfer method, C S C represents the eigencovariance matrix of the source domain. T A represents the feature covariance matrix of the target domain, while A is the transformation matrix used to achieve linear transfer.
[0025] First, the features of the source and target domains are subjected to zero-mean and standardization respectively to eliminate the interference of differences in feature magnitudes on subsequent analysis. Based on the preprocessed feature data, the feature covariance matrix C of the source domain is calculated. S The characteristic covariance matrix C of the target domain T First, consider the covariance matrix C of the source domain. S Whitening is performed (eliminating redundant correlations between features), and then based on the covariance matrix C of the target domain... T A re-coloring operation is performed. Through these two steps, the statistical distribution of the source domain features is made consistent with the statistical distribution of the target domain features.
[0026] Preferably, step 4 includes the following specific method: evaluating model performance using accuracy, precision, recall, F1 score, and AUC. Experimental results show that the XGBoost model performs best in the target domain, achieving a classification accuracy of 0.861 and an AUC value of 0.969.
[0027] Preferably, in step 5, the feature distribution is visualized using the t-SNE method to verify the alignment effect. The results show that after processing with the CORAL method, the feature distribution of the target domain samples is closer to that of the source domain, and samples of different categories in the target domain can be more clearly distinguished and classified into their corresponding clusters. Furthermore, confidence analysis of the classification results indicates that the model's classification reliability in the target domain is significantly improved, with an overall average prediction confidence of 0.8278.
[0028] Compared with the prior art, the present invention has the following beneficial effects:
[0029] 1. This invention can fully consider the commonalities and differences between the source domain and the target domain, and use Python to help diagnose the source dataset and classify and label the data with unknown labels in the target domain, thereby improving the stability and adaptability of the migration process.
[0030] 2. The fault diagnosis model built based on source domain data in this invention exhibits good performance in the transfer learning process on the target domain. By introducing the transfer method CORAL, the distribution difference between the source and target domains is significantly improved, enhancing the accuracy of cross-domain transfer. By classifying fault types in a data-driven manner, the model can effectively handle bearing fault diagnosis tasks under various operating conditions and maintain high diagnostic accuracy across different fault categories.
[0031] 3. This invention, through its optimized cross-domain transfer learning model, can be extended to fault diagnosis of other industrial equipment, particularly for data-driven equipment maintenance and early warning systems under various operating conditions. In the future, by integrating data from more IoT devices and sensors, it will be able to more comprehensively monitor equipment status and issue timely warnings when potential faults occur, providing reliable decision support for maintenance personnel. Attached Figure Description
[0032] Figure 1 is a schematic diagram of the feature distribution of the t-SNE source domain vs. target domain before migration according to the present invention;
[0033] Figure 2 shows the relationship between the feature ratio threshold and the number of retained source domain samples in this invention.
[0034] Figure 3 is a multi-class ROC curve of the present invention;
[0035] Figure 4 is a heatmap of the confusion matrix of the present invention;
[0036] Figure 5 is a comparison chart of evaluation indicators for different types of models in this invention;
[0037] Figure 6 is a distribution diagram of the target domain prediction results of the present invention;
[0038] Figure 7 shows the feature distribution of the source domain vs. target domain in the t-SNE after migration according to the present invention. Detailed Implementation
[0039] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings, so that those skilled in the art can better understand the advantages and features of the present invention, thereby making a clearer definition of the scope of protection of the present invention. The embodiments described in this invention are only some embodiments of the present invention, not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0040] Example:
[0041] A method for cross-domain fault diagnosis of rolling bearings based on transfer learning includes the following steps:
[0042] Step 1: Preliminary cross-domain performance evaluation. The fault diagnosis model trained on source domain data is directly applied to unlabeled data in the target domain to evaluate its cross-domain performance.
[0043] Step 2: Source domain sample selection strategy. To reduce the difference in feature distribution between the source domain and the target domain, a source domain sample selection mechanism is proposed.
[0044] Step 3: CORAL feature distribution alignment. The CORAL (Correlation Alignment) transfer method is introduced to transfer and adjust the feature distributions of the source and target domains.
[0045] Step 4: Model optimization and performance verification. After completing feature alignment and sample selection, various machine learning models, including neural networks, random forests and XGBoost, are used to perform classification tasks on the target domain data, and the optimal model is obtained by evaluating the model performance using multiple metrics.
[0046] Step 5: Visualize and analyze the features and classification results to verify the alignment effect.
[0047] Specifically, in step 1, the fault diagnosis model trained on source domain data is directly applied to unlabeled data in the target domain to evaluate its cross-domain performance. The t-SNE method is used to perform two-dimensional dimensionality reduction on the features of the source and target domains, and the results are visualized as shown in Figure 1, exhibiting a clear domain shift phenomenon.
[0048] This phenomenon indicates that the features of the source domain and the target domain have significant differences in spatial distribution. If the transfer function is used directly, it will be impossible to achieve reasonable fault category discrimination on the target domain data, thus resulting in prediction bias.
[0049] Specifically, in step 2, during the direct transfer experiment, the classifier trained on the source domain data exhibited a significant prediction bias on the target domain data. This phenomenon indicates that the source and target domains have significantly different feature distributions, and this difference in distribution makes it difficult for the model to adapt in the target domain feature space, ultimately resulting in insufficient generalization ability. That is, it cannot effectively adapt to the feature patterns of the target domain data and is unable to accurately complete the fault diagnosis task.
[0050] To mitigate the adverse effects of such distributional differences on transfer performance, a source domain sample selection strategy was introduced before cross-domain transfer operations. The core logic of this strategy is to determine whether the feature values of the source domain samples fall within the common value range of the target domain features, filtering out source domain samples with significantly different distributions and discarding them, retaining only those source domain samples whose feature distributions are closer to the target domain. This selection process reduces the interference of data from the source domain with excessively different feature patterns from the target domain on model training, thereby reducing the degree of feature distribution shift between domains and laying a better data foundation for subsequent cross-domain transfer.
[0051] Method description:
[0052] 1. Feature Standardization: Using the source domain data as a benchmark, calculate its mean and variance, and then use these two statistics to standardize both the source and target domain samples simultaneously. This operation ensures that the source and target domain data are on the same numerical scale, providing a unified benchmark for subsequent cross-domain comparisons.
[0053] 2. Target Domain Interval Calculation: For each feature of the target domain sample, its statistical interval is calculated separately. Since extreme values in the data are easily affected by outliers, leading to distortion of the interval range, this invention selects the interval corresponding to the 5%–95th percentile as the "reasonable range" of the target domain features, thereby eliminating the influence of outliers on the interval definition.
[0054] 3. Feature overlap determination: For each source domain sample, count how many feature values fall within the reasonable range of the corresponding feature in the target domain across all feature dimensions. This statistical result is recorded as the "feature satisfaction number" and is used to measure the degree of overlap between the feature distribution of the source domain sample and the target domain.
[0055] 4. Threshold Setting and Sample Selection: A proportional threshold τ∈[0,1] is set, and the selection critical value τd is calculated based on the total number of feature dimensions d. When the number of features satisfying a certain source domain sample reaches at least τd, the sample is retained; otherwise, it is discarded. In the experiment, multiple sets of values for τ (such as 0.6, 0.7, and 0.8) were selected for comparative testing. By adjusting the size of τ, the two objectives of "retaining the number of source domain samples" and "retaining samples that are close to the target domain in distribution" are balanced to find a better sample selection scheme.
[0056] To further analyze the effectiveness of the sample selection strategy, a curve showing the relationship between the feature ratio threshold and the number of source domain samples that can be retained was plotted, as shown in Figure 2.
[0057] The figure reveals the overall pattern of source domain sample selection and the characteristics of different threshold stages: Overall, as the threshold τ increases, the number of source domain samples that can be retained decreases significantly. This phenomenon indicates that a higher threshold requires source samples to overlap with the target domain distribution in more feature dimensions, and this requirement significantly reduces the set of source samples available for subsequent research.
[0058] Specifically, in the low threshold stage (τ≤0.3), most source domain samples can still be retained, and the selection criteria are relatively lenient. However, among the retained samples, there may still be samples that differ significantly from the target domain, which may interfere with subsequent model training. Entering the medium threshold stage (τ≈0.5), the number of source domain samples decreases significantly, meaning that only a portion of the source samples meet the requirement of overlapping distribution with the target domain. This stage achieves a reasonable balance between "ensuring the number of samples" and "ensuring the samples are close to the target domain," thus becoming the key threshold range considered in subsequent experiments. In the high threshold stage (τ≥0.8), almost no source samples meet the selection criteria. At this point, the selection criteria are too strict, leading to a severe shortage of usable training data, which is detrimental to subsequent model training.
[0059] The curves showing the change in sample size with the threshold indicate that the threshold selection has a significant impact on the filtering effect of source domain samples: when the threshold is too low, samples that differ significantly from the target domain cannot be effectively filtered out; when the threshold is too high, insufficient training data may be necessary, affecting the model training effect. Considering the similarity between the source domain sample size and distribution and the target domain, subsequent experiments in this invention are mainly conducted within the range of τ = 0.6 to 0.8 to ensure that the model can achieve relatively robust cross-domain fault diagnosis performance.
[0060] Figure 3 shows the model's classification performance for various fault types after sample selection. The figure presents the AUC values for four categories (B, IR, N, and OR). This result further verifies the performance of the model after sample selection and optimization according to this invention: the model's ability to distinguish between various fault types is significantly enhanced, especially between N-type (normal state) faults and IR and OR-type faults, where the improvement in classification performance is more obvious.
[0061] To further evaluate the performance of the classification model, confusion matrices for different categories are presented. Each cell in the figure represents the number of actual and predicted classes, and heatmap 4 shows the proportion of misclassifications. It can be seen that after sample selection, the model's accuracy has significantly improved, especially for the classification accuracy of IR and B classes.
[0062] Specifically, in step 3, the CORAL (Correlation Alignment) transfer method is introduced. The core idea of this method is to minimize the difference between the feature covariance matrices of the source and target domains through specific computational operations. The feature covariance matrix can reflect the correlation and distribution characteristics between features. Reducing the difference between the two means adjusting the feature distributions of the source and target domains to be closer, ultimately realizing the transfer of cross-domain feature distributions and laying the foundation for subsequent model transfer.
[0063] Since machine learning models cannot directly process non-numerical categorical features, these features must first be converted into numerical form. Taking bearing operating states (such as OR, IR, B, N, etc.) as an example, directly using these features for modeling would not meet the model's numerical computation requirements; therefore, transcoding is necessary. For the categorical variable of bearing operating states, both label encoding and one-hot encoding were employed.
[0064] Table 1 Data transcoding table
[0065]
[0066] Let the source domain sample matrix be X. S ∈R ns×d The target domain sample matrix is X T ∈R nt×d , where n s and n t Let be the number of samples, and d be the feature dimension. Then the covariance matrices of the source and target domains are defined as follows:
[0067]
[0068]
[0069] If the source domain feature covariance matrix is C S The feature covariance matrix of the target domain is C T Therefore, the optimization objective of CORAL is:
[0070]
[0071] In the relevant calculations of the CORAL transfer method, C S C represents the eigencovariance matrix of the source domain. T A represents the feature covariance matrix of the target domain, while A is the transformation matrix used to achieve linear transfer.
[0072] First, the features of the source and target domains are subjected to zero-mean and standardization respectively to eliminate the interference of differences in feature magnitudes on subsequent analysis. Based on the preprocessed feature data, the feature covariance matrix C of the source domain is calculated. S The characteristic covariance matrix C of the target domain T First, consider the covariance matrix C of the source domain. S Whitening is performed (eliminating redundant correlations between features), and then based on the covariance matrix C of the target domain... T A re-coloring operation is performed. Through these two steps, the statistical distribution of the source domain features is made consistent with the statistical distribution of the target domain features.
[0073] Through the above operation process, the target domain features after CORAL transformation will be closer to the source domain features in terms of statistical characteristics. This improvement in distribution consistency can effectively enhance the cross-domain fault diagnosis model's ability to discriminate target domain data.
[0074] Specifically, in step 4, after feature alignment and sample selection, various machine learning models, including neural networks, random forests, and XGBoost, are used to perform classification tasks on the target domain data. The model performance is evaluated using metrics such as accuracy, precision, recall, F1 score, and AUC. The experimental results, shown in Figure 5, indicate that the XGBoost model performs best in the target domain.
[0075] The prediction results after the transfer are shown in Figure 6: the 16 target domain samples were divided into 1 N class, 5 B classes, 7 IR classes, and 3 OR classes. The classification results are no longer concentrated in a single category, and the model has a more reasonable ability to distinguish between target domains.
[0076] After the CORAL method transfer processing was performed and visualized, the results are shown in Figure 7. The orange dots representing the target domain samples gradually approach the distribution clusters formed by the purple dots representing the source domain samples, and gradually merge into the corresponding category clusters in the source domain.
[0077] Compared to the state before the transfer processing, the distribution difference between the source and target domain samples is significantly reduced. Simultaneously, the target domain samples exhibit a more reasonable clustering structure in the feature space; that is, different categories of target domain samples can be more clearly assigned to their corresponding clusters, eliminating the dispersion or misclassification that might have existed before the transfer. This change intuitively demonstrates the effectiveness of the CORAL method in mitigating cross-domain distribution differences.
[0078] Specifically, in step 5, the feature distribution is visualized using the t-SNE method to verify the alignment effect. The results show that after processing with the CORAL method, the feature distribution of the target domain samples is closer to that of the source domain, and samples of different categories in the target domain can be more clearly distinguished and assigned to their corresponding category clusters. Furthermore, confidence analysis of the classification results indicates that the model's classification reliability in the target domain is significantly improved, with an overall average prediction confidence of 0.8278.
[0079] In summary, the fault diagnosis model constructed based on source domain data in this invention demonstrates good performance in the transfer learning process on the target domain. By introducing the transfer method CORAL, the distribution difference between the source and target domains is significantly improved, enhancing the accuracy of cross-domain transfer. Through data-driven classification of fault types, the model can effectively handle bearing fault diagnosis tasks under various operating conditions and maintain high diagnostic accuracy across different fault categories.
[0080] The descriptions and practices disclosed in this invention are readily apparent and understandable to those skilled in the art, and various modifications and refinements can be made without departing from the principles of this invention. Therefore, any modifications or improvements made without departing from the spirit of this invention should also be considered within the scope of protection of this invention.
Claims
1. A method for cross-domain fault diagnosis of rolling bearings based on transfer learning, characterized in that, The process includes the following steps: Step 1: Preliminary cross-domain performance evaluation. The fault diagnosis model trained on source domain data is directly applied to unlabeled data in the target domain to evaluate its cross-domain performance. Step 2: Source domain sample selection strategy. To reduce the difference in feature distribution between the source and target domains, a source domain sample selection mechanism is proposed. Step 3: CORAL feature distribution alignment. The CORAL transfer method is introduced to adjust the feature distributions of the source and target domains. Step 4: Model optimization and performance verification. After feature alignment and sample selection, various machine learning models, including neural networks, random forests, and XGBoost, are used to perform classification tasks on the target domain data. Multiple metrics are used to evaluate model performance and obtain the optimal model. Step 5: Visual analysis of features and classification results to verify the alignment effect.
2. The method for cross-domain fault diagnosis of rolling bearings based on transfer learning according to claim 1, characterized in that, Step 1 includes the following specific methods: using the t-SNE method to perform two-dimensional dimensionality reduction on the features of the source and target domains, and visualizing the obvious domain shift phenomenon; this phenomenon indicates that the features of the source and target domains have significant differences in spatial distribution. If the transfer method is used directly, it is impossible to achieve fault category discrimination on the target domain data, thus generating prediction bias.
3. The method for cross-domain fault diagnosis of rolling bearings based on transfer learning according to claim 1, characterized in that, Step 2 includes the following specific methods: the source domain sample screening mechanism includes feature standardization, target domain feature interval calculation, feature overlap judgment and threshold setting, so as to screen out source domain samples that are more compatible with the target domain distribution and remove samples with large distribution differences.
4. The method for cross-domain fault diagnosis of rolling bearings based on transfer learning according to claim 1, characterized in that, Step 3 includes the following specific methods: The CORAL transfer method achieves effective alignment of feature distributions between the source and target domains by minimizing the difference between the feature covariance matrices; non-numerical features are converted into numerical forms using both label encoding and one-hot encoding; let the source domain sample matrix be X. S ∈R ns×d The target domain sample matrix is X T ∈R nt×d , where n s and n t Let d be the number of samples and d be the feature dimension, then the covariance matrices of the source domain and the target domain are defined as follows: If the source domain feature covariance matrix is C S The feature covariance matrix of the target domain is C T Therefore, the optimization objective of CORAL is: In the calculation of the CORAL migration method, C S C represents the eigencovariance matrix of the source domain. T Let A represent the feature covariance matrix of the target domain, and A be the transformation matrix used to achieve linear transfer. First, the features of the source and target domains are zero-mean and standardized, respectively, to eliminate the interference of differences in feature magnitudes on subsequent analysis. Based on the preprocessed feature data, the feature covariance matrix C of the source domain is calculated. S The characteristic covariance matrix C of the target domain T First, consider the covariance matrix C of the source domain. S Whitening is performed, and then based on the covariance matrix C of the target domain... T A recoloring operation is performed. Through these two steps, the statistical distribution of the source domain features is made consistent with the statistical distribution of the target domain features.
5. The method for cross-domain fault diagnosis of rolling bearings based on transfer learning according to claim 1, characterized in that, Step 4 includes the following specific methods: evaluating model performance using accuracy, precision, recall, F1 score, and AUC metrics.
6. The method for cross-domain fault diagnosis of rolling bearings based on transfer learning according to claim 1, characterized in that, In step 5, the feature distribution is visualized using the t-SNE method to verify the alignment effect.