Bearing fault diagnosis method based on cross-domain adaptive weighting
By calculating the similarity of source domain and target domain signals and dynamically adjusting the weights, a two-stage training method is adopted to solve the problems of distribution difference and category imbalance between source domain and target domain in bearing fault diagnosis, thereby improving the diagnostic accuracy and adaptability.
Patent Information
- Application Number
- CN202511016472.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-23
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-07-23
AI Technical Summary
Existing technologies in bearing fault diagnosis suffer from negative transfer problems caused by distribution differences between the source domain and the target domain, as well as target domain category imbalance problems, resulting in poor performance of the diagnosis model.
By calculating the similarity between the source domain signal and the target domain signal, the adaptive weighting coefficients of the source domain signal and the target domain signal are dynamically adjusted. A two-stage training method is adopted. First, the fault diagnosis deep learning model is trained by similarity weighting. Then, the weight of the target domain signal is adjusted according to the confidence and prediction error to optimize the adaptability of the model in the target domain.
It improves the diagnostic accuracy of the fault diagnosis deep learning model in the target domain, effectively solves the problems of negative transfer interference and category imbalance, and enhances the adaptability of the model under changing working conditions.
Smart Images

Figure CN120524302B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fault diagnosis, and in particular to a bearing fault diagnosis method based on cross-domain adaptive weighting. Background Art
[0002] With the iterative evolution of intelligent sensing technology and artificial intelligence algorithms, significant progress has been made in the field of mechanical equipment health monitoring, particularly in fault diagnosis of bearings, a core component of rotating machinery. As a key load-bearing component in rotating machinery systems, the operating status of bearings is directly related to the overall safety and reliability of the equipment.
[0003] In the field of fault diagnosis, transfer learning is a common method used to address sample shortages. However, it often faces challenges such as negative transfer due to distribution differences between the source and target domains, as well as class imbalance in the target domain. Specifically, when the data distributions of the source and target domains differ significantly, knowledge from the source domain may not be effectively transferred to the target domain, leading to negative transfer, where samples from the source domain interfere with learning in the target domain. Secondly, class imbalance in the target domain results in a significantly smaller number of fault samples than other categories, preventing the fault diagnosis model from fully learning these minority class samples, which in turn affects its performance.
[0004] Existing technologies often address these issues through fixed sample weighting strategies or simple category weighting. However, these methods fail to fully consider the sample difficulty during training and the fault diagnosis model's confidence in the samples, resulting in inflexible and inaccurate weighting strategies. Furthermore, traditional transfer learning methods fail to fully consider how to dynamically adjust the weights of source domain samples, resulting in the fault diagnosis model being unable to effectively adapt to the changing distribution of target domain samples. This makes it difficult for the fault diagnosis model to effectively capture the dynamic characteristics of the domain distribution under time-varying operating conditions, ultimately leading to relatively low diagnostic accuracy. Summary of the Invention
[0005] To solve the above technical problems, the present invention provides a bearing fault diagnosis method based on cross-domain adaptive weighting. The technical solution of the present invention is as follows:
[0006] A bearing fault diagnosis method based on cross-domain adaptive weighting, comprising:
[0007] S1, obtaining multiple source domain signals of the reference bearing under different working conditions, and obtaining multiple target domain signals of different categories of the target bearing under real working conditions;
[0008] S2, calculates the similarity between each source domain signal and the target domain signal;
[0009] S3, weighting each source domain signal according to the similarity calculation result to obtain an adaptive weighting coefficient for each source domain signal;
[0010] S4, calculating a primary weighted loss function of the fault diagnosis deep learning model according to the adaptive weighting coefficient of each source domain signal, and training the fault diagnosis deep learning model using each source domain signal and the primary weighted loss function to obtain a pre-trained fault diagnosis deep learning model;
[0011] S5, determining the confidence and prediction error of each target domain signal through the pre-trained fault diagnosis deep learning model, and determining the adaptive weighting coefficient of each target domain signal according to the confidence and prediction error;
[0012] S6, continuing to train the pre-trained fault diagnosis deep learning model based on each target domain signal and its adaptive weighting coefficient to obtain the final fault diagnosis deep learning model;
[0013] S7, obtaining the real-time operating signal of the target bearing, and inputting the real-time operating signal into the final fault diagnosis deep learning model, and determining the fault type of the target bearing according to the output of the final fault diagnosis deep learning model.
[0014] Optionally, the S2 includes:
[0015] S21, extracting the feature vector of each source domain signal and the feature vector of each target domain signal, and determining the feature vector of the target domain signal of each category;
[0016] S22 , calculating the similarity between each source domain signal and the target domain signal according to the feature vector of each source domain signal and the feature vector of each category of the target domain signal.
[0017] Optionally, the S22 includes:
[0018] S221, calculating the mean of the feature vector of the target domain signal of each category;
[0019] S222, calculating the Euclidean distance between the feature vector of each source domain signal and the mean of the feature vector of the target domain signal of each category as the similarity between each source domain signal and the target domain signal of each category;
[0020] S223 , taking the maximum similarity value among the similarities between each source domain signal and all categories of target domain signals as the similarity between each source domain signal and the target domain signal.
[0021] Optionally, for the i source domain signal si , the S3 calculates the similarity of the first i source domain signalsi When weighting is performed, it is achieved through formula (1):
[0022] (1); in formula (1), Indicates the i source domain signal si Adaptive weighting coefficient of ; It is a hyperparameter that controls the influence of similarity; is the normalization factor, It is i source domain signal si With the tc The similarity between target domain signals of categories, Indicates the i source domain signal si The eigenvector of Indicates the tc The mean of the feature vectors of the target domain signals of categories.
[0023] Optionally, the S4 includes:
[0024] S41, according to the adaptive weighting coefficient of each source domain signal, the first-order weighted loss function of the fault diagnosis deep learning model is calculated by formula (2):
[0025] (2); in formula (2), It is i source domain signal si The adaptive weighting coefficient of For the i source domain signal si The loss value of the original loss function of the fault diagnosis deep learning model, L is a weighted loss function of the fault diagnosis deep learning model, N 1 indicates the number of source domain signals;
[0026] S42, train the fault diagnosis deep learning model through each source domain signal and a weighted loss function. The training process optimizes the parameters of the fault diagnosis deep learning model by minimizing the weighted loss function, saves the best model parameters in the training process, and obtains a pre-trained fault diagnosis deep learning model.
[0027] Optionally, the S5 includes:
[0028] S51, freeze the parameters of the feature extraction layer in the pre-trained fault diagnosis deep learning model;
[0029] S52, inputting each target domain signal into a pre-trained fault diagnosis deep learning model to obtain the confidence and prediction error of the pre-trained fault diagnosis deep learning model for each target domain signal;
[0030] S53 , dynamically adjusting the weight of each target domain signal according to the confidence and prediction error of each target domain signal to obtain an adaptive weighting coefficient of each target domain signal.
[0031] Optionally, the S53 is performed according to k The confidence and prediction error of the target domain signal are dynamically adjusted. k The weight of the target domain signal is obtained k Adaptive weighting coefficients of target domain signals When , it is realized by formula (3):
[0032] (3); in formula (3), and It is a hyperparameter used to control the influence of confidence and prediction error on weight; For the pre-trained fault diagnosis deep learning model k The confidence of the target domain signal, For the k The true label of the target domain signal, is the predicted value, For the pre-trained fault diagnosis deep learning model k The prediction error of the target domain signal.
[0033] Optionally, the S6 includes:
[0034] The quadratic weighted loss function of the fault diagnosis deep learning model is calculated according to the adaptive weighting coefficient of each target domain signal, and the pre-trained fault diagnosis deep learning model is further trained through each target domain signal and the quadratic weighted loss function to obtain the final fault diagnosis deep learning model.
[0035] Optionally, when calculating the quadratic weighted loss function of the fault diagnosis deep learning model according to the adaptive weighting coefficient of each target domain signal, it is implemented by formula (4):
[0036] (4); in formula (4), For the k The loss value of the target domain signal in the original loss function of the fault diagnosis deep learning model, is the quadratic loss function of the fault diagnosis deep learning model, is the number of target domain signals, For the kAdaptive weighting coefficients of target domain signals.
[0037] All the above optional technical solutions can be combined arbitrarily, and the present invention does not provide detailed descriptions of the structures after each combination.
[0038] By means of the above solution, the beneficial effects of the present invention are as follows:
[0039] By weighting each source domain signal according to the similarity between each source domain signal and the target domain signal, and calculating the first-order weighted loss function of the fault diagnosis deep learning model according to the adaptive weighting coefficient of each source domain signal, the fault diagnosis deep learning model is trained by each source domain signal and the first-order weighted loss function to ensure that the source domain signal closest to the target domain signal has the greatest impact on the training, thereby suppressing negative transfer interference; by determining the confidence and prediction error of each target domain signal according to the pre-trained fault diagnosis deep learning model, the adaptive weighting coefficient of each target domain signal is determined, so that target domain signals with large prediction errors and low confidence are given higher weights, so that the model can effectively adapt to the distribution changes of target domain samples; based on the above two methods of adaptively and dynamically adjusting the weights of source domain signals and target domain signals, the accuracy of the final diagnosis results of the fault diagnosis deep learning model is improved.
[0040] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention and implement it according to the contents of the specification, the following is a detailed description of the preferred embodiments of the present invention with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 This is a flow chart of a bearing fault diagnosis method based on cross-domain adaptive weighting provided by an embodiment of the present invention.
[0042] Figure 2 It is a schematic diagram of the fault diagnosis deep learning model training process provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0043] The following embodiments of the present invention are described in further detail with reference to the accompanying drawings and examples. The following examples are used to illustrate the present invention but are not intended to limit the scope of the present invention.
[0044] The bearing fault diagnosis method based on cross-domain adaptive weighting provided by the embodiment of the present invention can be implemented by any electronic device with computing function, such as a PC, mobile terminal or server. Figure 1 As shown, the bearing fault diagnosis method based on cross-domain adaptive weighting provided by the embodiment of the present invention includes the following steps S1 to S7:
[0045] S1, obtain multiple source domain signals of the reference bearing under different working conditions, and obtain multiple target domain signals of different categories of the target bearing under real working conditions.
[0046] The target domain signal is the actual operating data of the target equipment, collected from the target bearing under different operating conditions during actual operation. The source domain signal comes from a large amount of laboratory data or simulation data, which is data collected from reference bearings under different operating conditions. The target bearing is the bearing requiring fault diagnosis, and reference bearings include a variety of bearings, including the target bearing. The target domain signal can include vibration signals, temperature signals, and other signals.
[0047] S2, calculates the similarity between each source domain signal and the target domain signal.
[0048] In a specific embodiment, the S2 includes:
[0049] S21, extracting the feature vector of each source domain signal and the feature vector of each target domain signal, and determining the feature vector of the target domain signal of each category.
[0050] Specifically, before extracting feature vectors, each source and target domain signal can be normalized to eliminate amplitude differences between the signals and bring them to the same scale. Normalization is a prerequisite for effective comparison of source and target domain signals. Normalization eliminates signal amplitude differences between devices, acquisition devices, and operating conditions, preventing them from affecting subsequent analysis.
[0051] Among them, in the i source domain signal When normalizing, it can be achieved through formula (5):
[0052] (5); in formula (5), Indicates the i source domain signal The normalized signal, is the mean of all source domain signals, is the standard deviation of all source domain signals. The principle of normalizing the target domain signals is similar.
[0053] On the basis of the normalization processing, when S21 extracts the feature vector of each source domain signal and the feature vector of each target domain signal, it extracts the feature vector of each normalized source domain signal and the feature vector of each normalized target domain signal.
[0054] Furthermore, a feature vector is a combination of key features extracted from a signal that can reflect the signal's changing trend. These features may include time-domain features, frequency-domain features, and time-frequency-domain features. Extracting a feature vector from a source domain signal can be achieved through the following methods: 1) Using a trained feature extraction network, specifically inputting a source domain signal (a normalized source domain signal) into the trained feature extraction network, which then outputs the feature vector of the source domain signal. 2) Extracting feature vectors through the feature extraction layer of a pre-trained fault diagnosis deep learning model. Specifically, after collecting some sample data and labeling the sample data, the fault diagnosis deep learning model is trained using the sample data and its labels to obtain a pre-trained fault diagnosis deep learning model. Then, a source domain signal (a normalized source domain signal) is input into the pre-trained fault diagnosis deep learning model, which then outputs the feature vector of the source domain signal from its feature extraction layer. It should be noted that extracting feature vectors from a target domain signal can be done in the same way.
[0055] The eigenvectors of the source and target domain signals are their representations in the same feature space. These eigenvectors are high-dimensional representations of the source and target domain signals, effectively capturing important patterns in the signals.
[0056] S22 , calculating the similarity between each source domain signal and the target domain signal according to the feature vector of each source domain signal and the feature vector of each category of the target domain signal.
[0057] The purpose of this step is to find the sample in the source domain signal that is closest to the target domain signal, thereby achieving effective transfer learning. In the embodiment of the present invention, the Euclidean distance is used to represent the similarity between the feature vector of the source domain signal and the feature vector of the target domain signal.
[0058] More specifically, the S22 includes:
[0059] S221, calculating the mean of the feature vector of the target domain signal of each category.
[0060] For example, if the target domain signal obtained in S1 has C categories, the mean of the feature vectors of the target domain signals of the C categories is calculated respectively. Furthermore, if each category contains N target domain signals, the mean of the feature vector of the target domain signal of each category is calculated by the following formula (6):
[0061] (6); in formula (6), f tj Indicates the tcThe target domain signal of the category j The feature vector of the target domain signal, Indicates the tc The mean of the feature vectors of the target domain signals of categories, Indicates the tc The number of target domain signals for each category.
[0062] Specifically, for the i source domain signal si The eigenvector of , in calculating its tc The mean of the feature vectors of the target domain signals of categories When the Euclidean distance between , it is achieved by the following formula (7):
[0063] (7); in formula (7), Indicates the i source domain signal si The eigenvector of With the tc The mean of the feature vectors of the target domain signals of categories The Euclidean distance between n represents the dimension of the feature vector, Indicates the i source domain signal si No. h The feature vector of dimension Indicates the tc The first category of the target domain signal h The mean of the feature vector of dimensions.
[0064] For example, if the target domain signal has five categories, S222 will obtain the first i source domain signal si The eigenvector of The Euclidean distance between the target domain signal and the mean of the feature vectors of the five categories.
[0065] S223 , taking the maximum similarity value among the similarities between each source domain signal and all categories of target domain signals as the similarity between each source domain signal and the target domain signal.
[0066] Specifically, based on S222, for a certain source domain signal, this step selects the minimum Euclidean distance among all Euclidean distances calculated in S222, that is, the maximum similarity value, as the similarity between the source domain signal and the target domain signal.
[0067] S3, weighting each source domain signal according to the similarity calculation result to obtain an adaptive weighting coefficient of each source domain signal.
[0068] In a specific embodiment, for i source domain signal si , the S3 calculates the similarity of the first i source domain signal si When weighting is performed, it is achieved through formula (1):
[0069] (1); in formula (1), Indicates the i source domain signal si Adaptive weighting coefficient of ; It is a hyperparameter that controls the influence of similarity; is the normalization factor, It is i source domain signal si With the tc The similarity (Euclidean distance) between target domain signals of categories, Indicates the i source domain signal si The eigenvector of Indicates the tc The mean of the feature vectors of the target domain signals of categories.
[0070] In an embodiment of the present invention, source domain signals with higher similarity will receive higher weights during the training process. That is, the source domain signal closest to the target domain will be assigned a higher weight, thereby improving the performance of the model in the target domain. Specifically, an embodiment of the present invention weights the source domain signals through a weighting mechanism. This weighting mechanism dynamically adjusts the weights based on the similarity between the source domain signal and the target domain signal, ensuring that the source domain signal closest to the target domain signal has the greatest impact on the training, thereby helping the fault diagnosis deep learning model to better learn useful knowledge in the source domain.
[0071] S4, calculating a primary weighted loss function of the fault diagnosis deep learning model according to the adaptive weighting coefficient of each source domain signal, and training the fault diagnosis deep learning model through each source domain signal and the primary weighted loss function to obtain a pre-trained fault diagnosis deep learning model.
[0072] Specifically, during the training process, the weighting coefficient of the source domain signal will affect the loss generated by each source domain signal during training. The primary weighted loss function will be affected by the adaptive weighting coefficient of the source domain signal, so that the source domain signal similar to the target domain signal contributes more to the optimization of the fault diagnosis deep learning model.
[0073] In a specific embodiment, the S4 includes:
[0074] S41, according to the adaptive weighting coefficient of each source domain signal, the first-order weighted loss function of the fault diagnosis deep learning model is calculated by formula (2):
[0075] (2); in formula (2), It is i source domain signal si The adaptive weighting coefficient of For the i source domain signal si The loss value of the original loss function of the fault diagnosis deep learning model, L is a weighted loss function of the fault diagnosis deep learning model, N 1 indicates the number of source domain signals;
[0076] S42, train the fault diagnosis deep learning model through each source domain signal and a weighted loss function. The training process optimizes the parameters of the fault diagnosis deep learning model by minimizing the weighted loss function, saves the best model parameters in the training process, and obtains a pre-trained fault diagnosis deep learning model.
[0077] The parameters of the fault diagnosis deep learning model include those of the feature extraction layer and the classification layer. The optimal model parameters during training are those that minimize the primary weighted loss function.
[0078] In an embodiment of the present invention, the source domain signal is transmitted to the fault diagnosis deep learning model through a weighted mechanism. The fault diagnosis deep learning model learns source domain features that are more similar to the target domain based on the source domain signal and the weighted loss function.
[0079] S5, determines the confidence and prediction error of each target domain signal through the pre-trained fault diagnosis deep learning model, and determines the adaptive weighting coefficient of each target domain signal according to the confidence and prediction error.
[0080] In a specific embodiment, the S5 includes:
[0081] S51, freeze the parameters of the feature extraction layer in the pre-trained fault diagnosis deep learning model.
[0082] In an embodiment of the present invention, when continuing to train a pre-trained fault diagnosis deep learning model, the parameters of the feature extraction layer in the pre-trained fault diagnosis deep learning model remain unchanged, and only the parameters of the classification layer are updated. Freezing the parameters of the feature extraction layer means that the parameters of the feature extraction layer in the pre-trained fault diagnosis deep learning model remain unchanged.
[0083] S52: Input each target domain signal into a pre-trained fault diagnosis deep learning model to obtain the confidence and prediction error of the pre-trained fault diagnosis deep learning model for each target domain signal.
[0084] The confidence level of a pre-trained fault diagnosis deep learning model for a target domain signal refers to the confidence level of the pre-trained fault diagnosis deep learning model in its prediction of the target domain signal. A higher confidence level indicates greater confidence in the pre-trained fault diagnosis deep learning model's prediction of the target domain signal. The prediction error of a pre-trained fault diagnosis deep learning model for a target domain signal refers to the difference between the pre-trained fault diagnosis deep learning model's prediction of the target domain signal and the true label.
[0085] For the k Target domain signal , the confidence of the pre-trained fault diagnosis deep learning model on the target domain signal , calculated by the following formula (8):
[0086] (8); in formula (8), is a pre-trained fault diagnosis deep learning model, Softmax () represents the normalized exponential function.
[0087] S53 , dynamically adjusting the weight of each target domain signal according to the confidence and prediction error of each target domain signal to obtain an adaptive weighting coefficient of each target domain signal.
[0088] Specifically, the S53 is in accordance with k The confidence and prediction error of the target domain signal are dynamically adjusted. k The weight of the target domain signal is obtained k Adaptive weighting coefficients of target domain signals When , it is realized by formula (3):
[0089] (3); in formula (3), and It is a hyperparameter used to control the influence of confidence and prediction error on weight; For the pre-trained fault diagnosis deep learning model k The confidence of the target domain signal, For the k The true label of the target domain signal, is the predicted value, For the pre-trained fault diagnosis deep learning model k The prediction error of the target domain signal. Used to adjust the sample weight according to the confidence level. If it is close to 0.5, it means that the pre-trained fault diagnosis deep learning model is uncertain about the prediction of the target domain signal, that is, the confidence is low, so the target domain signal is given a higher weight to ensure that the pre-trained fault diagnosis deep learning model pays more attention to these uncertain target domain signals.
[0090] In the embodiment of the present invention, the adaptive weighting coefficient of the target domain signal takes into account both the size of the prediction error and the confidence of the model in the sample. A higher weight is assigned to the target domain signal with a larger prediction error and a lower confidence.
[0091] S6, continue to train the pre-trained fault diagnosis deep learning model based on each target domain signal and its adaptive weighting coefficient to obtain the final fault diagnosis deep learning model.
[0092] During the specific implementation of step S6, the quadratic weighted loss function of the fault diagnosis deep learning model is calculated based on the adaptive weighting coefficient of each target domain signal, and the pre-trained fault diagnosis deep learning model is further trained using each target domain signal and the quadratic weighted loss function to obtain the final fault diagnosis deep learning model.
[0093] Among them, when calculating the quadratic weighted loss function of the fault diagnosis deep learning model according to the adaptive weighting coefficient of each target domain signal, it is achieved through formula (4):
[0094] (4); in formula (4), For the k The loss value of the target domain signal in the original loss function of the fault diagnosis deep learning model, is the quadratic loss function of the fault diagnosis deep learning model, is the number of target domain signals, For the k Adaptive weighting coefficients of target domain signals.
[0095] Furthermore, when continuing to train the pre-trained fault diagnosis deep learning model using each target domain signal and a quadratic weighted loss function, the target domain signal is input into the pre-trained fault diagnosis deep learning model and trained using the quadratic weighted loss function. During the training process, by minimizing the quadratic weighted loss function based on confidence and prediction error and performing backpropagation optimization, the pre-trained fault diagnosis deep learning model can better capture the underlying patterns of the target domain signal during continued training, better adapt to the characteristic distribution of the target domain signal, and improve its performance in the target domain and the accuracy of target domain classification. Training is completed when the quadratic weighted loss function is minimized. The parameters of the final fault diagnosis deep learning model include the parameters of the feature extraction layer obtained by pre-training using the source domain signal and a primary weighted loss function, and the parameters of the classification layer obtained by continuing to train using the target domain signal and a secondary weighted loss function.
[0096] In this way, the embodiments of the present invention enable the fault diagnosis deep learning model to pay more attention to samples with imbalanced categories, uncertain predictions, or errors, thereby enhancing the performance of the fault diagnosis deep learning model in the target domain.
[0097] S7, obtaining the real-time operating signal of the target bearing, and inputting the real-time operating signal into the final fault diagnosis deep learning model, and determining the fault type of the target bearing according to the output of the final fault diagnosis deep learning model.
[0098] Specifically, the real-time operation signal is a signal collected in real time during the operation of the target bearing and capable of representing its operation state, such as a vibration signal, a temperature signal, and the like.
[0099] In summary, the bearing fault diagnosis method based on cross-domain adaptive weighting provided by the embodiment of the present invention has the following characteristics:
[0100] 1. The present invention proposes a two-stage progressive training method, which realizes the synergy of cross-domain knowledge transfer and intra-domain classification optimization through parameter freezing and dynamic decoupling mechanism. In the first stage, the migration contribution of the source domain signal is dynamically adjusted based on the spatial similarity measurement of the feature vector, and the source domain signal with a distribution close to the target domain is retained first to suppress negative migration interference. In the second stage, the parameters of the feature extraction layer are frozen, and only the classification layer is implemented with a fine-tuning strategy based on the joint optimization of confidence and prediction error. By quantifying the uncertainty of model prediction confidence and the intensity of prediction error, a bimodal dynamic weight distribution function is constructed, so that the model automatically focuses on low-frequency fault samples in the target domain that are difficult to classify and easy to misclassify during the fine-tuning process. This architecture uses staged parameter update rules, full parameter optimization in the first stage, and targeted optimization of the classification layer in the second stage to ensure cross-domain feature alignment while achieving efficient adaptation to target domain category imbalance scenarios. As Figure 2As shown, it is a schematic diagram of the fault diagnosis deep learning model training process provided by an embodiment of the present invention.
[0101] 2. The present invention designs a dynamic generation mechanism for sample weights facing target domain category imbalance, and realizes fine-grained sample selection by integrating the uncertainty of prediction confidence and the intensity of classification error. The core of the technology is: for target domain samples, the degree to which their prediction confidence deviates from the decision boundary is calculated in real time. The closer the confidence is to the level of random guessing, the higher the weight. At the same time, the severity of its classification error is quantified. The larger the error, the more significant the weight gain. The two are coupled through an exponential function to generate an adaptive weighting coefficient for the target domain signal. This strategy enables the model to prioritize learning two types of key samples during training: 1) fuzzy samples near the classification boundary to optimize the decision surface geometry; 2) difficult samples that are continuously misclassified to enhance the characterization capability of low-frequency fault modes. By adjusting the bias of weight distribution through hyperparameters, it can flexibly adapt to industrial scenarios with different imbalance ratios.
[0102] In summary, the present invention provides a more flexible and efficient bearing fault diagnosis method by comprehensively considering the distribution differences between the source domain and the target domain, as well as the class imbalance problem in the target domain. Through the first stage of cross-domain adaptive weighting and the second stage of training based on confidence-prediction error loss, the method provided by the embodiment of the present invention can enhance the adaptability of the model to the target domain, especially when the source domain and the target domain differ significantly, and can effectively avoid negative transfer. Secondly, by dynamically adjusting the weights, it can effectively solve the problem of class imbalance in the target domain.
[0103] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A bearing fault diagnosis method based on cross-domain adaptive weighting, characterized in that: include: S1, obtaining multiple source domain signals of the reference bearing under different working conditions, and obtaining multiple target domain signals of different categories of the target bearing under real working conditions; S2, calculates the similarity between each source domain signal and the target domain signal; S3, weighting each source domain signal according to the similarity calculation result to obtain an adaptive weighting coefficient for each source domain signal; S4, calculating a primary weighted loss function of the fault diagnosis deep learning model according to the adaptive weighting coefficient of each source domain signal, and training the fault diagnosis deep learning model using each source domain signal and the primary weighted loss function to obtain a pre-trained fault diagnosis deep learning model; S5, determining the confidence and prediction error of each target domain signal through the pre-trained fault diagnosis deep learning model, and determining the adaptive weighting coefficient of each target domain signal according to the confidence and prediction error; S6, continuing to train the pre-trained fault diagnosis deep learning model based on each target domain signal and its adaptive weighting coefficient to obtain the final fault diagnosis deep learning model; S7, obtaining the real-time operating signal of the target bearing, and inputting the real-time operating signal into the final fault diagnosis deep learning model, and determining the fault type of the target bearing according to the output of the final fault diagnosis deep learning model.
2. The bearing fault diagnosis method based on cross-domain adaptive weighting according to claim 1 is characterized in that: The S2 includes: S21, extracting the feature vector of each source domain signal and the feature vector of each target domain signal, and determining the feature vector of the target domain signal of each category; S22 , calculating the similarity between each source domain signal and the target domain signal according to the feature vector of each source domain signal and the feature vector of each category of the target domain signal.
3. The bearing fault diagnosis method based on cross-domain adaptive weighting according to claim 2 is characterized in that: The S22 includes: S221, calculating the mean of the feature vector of the target domain signal of each category; S222, calculating the Euclidean distance between the feature vector of each source domain signal and the mean of the feature vector of the target domain signal of each category as the similarity between each source domain signal and the target domain signal of each category; S223 , taking the maximum similarity value among the similarities between each source domain signal and all categories of target domain signals as the similarity between each source domain signal and the target domain signal.
4. The bearing fault diagnosis method based on cross-domain adaptive weighting according to claim 1 is characterized in that: For the i source domain signal si , the S3 calculates the similarity of the first i source domain signal si When weighting is performed, it is achieved through formula (1): (1); in formula (1), Indicates the i source domain signal si Adaptive weighting coefficient of ; It is a hyperparameter that controls the influence of similarity; is the normalization factor, It is i source domain signal si With the tc The similarity between target domain signals of categories, Indicates the i source domain signal si The eigenvector of Indicates the tc The mean of the feature vectors of the target domain signals of categories.
5. The bearing fault diagnosis method based on cross-domain adaptive weighting according to claim 1 is characterized in that: The S4 includes: S41, according to the adaptive weighting coefficient of each source domain signal, the first-order weighted loss function of the fault diagnosis deep learning model is calculated by formula (2): (2); in formula (2), It is i source domain signal si The adaptive weighting coefficient of For the i source domain signal si The loss value of the original loss function of the fault diagnosis deep learning model, L is a weighted loss function of the fault diagnosis deep learning model, N 1 indicates the number of source domain signals; S42, train the fault diagnosis deep learning model through each source domain signal and a weighted loss function. The training process optimizes the parameters of the fault diagnosis deep learning model by minimizing the weighted loss function, saves the best model parameters in the training process, and obtains a pre-trained fault diagnosis deep learning model.
6. The bearing fault diagnosis method based on cross-domain adaptive weighting according to claim 1 is characterized in that: The S5 includes: S51, freeze the parameters of the feature extraction layer in the pre-trained fault diagnosis deep learning model; S52, inputting each target domain signal into a pre-trained fault diagnosis deep learning model to obtain the confidence and prediction error of the pre-trained fault diagnosis deep learning model for each target domain signal; S53 , dynamically adjusting the weight of each target domain signal according to the confidence and prediction error of each target domain signal to obtain an adaptive weighting coefficient of each target domain signal.
7. The bearing fault diagnosis method based on cross-domain adaptive weighting according to claim 6 is characterized in that: The S53 is in accordance with k The confidence and prediction error of the target domain signal are dynamically adjusted. k The weight of the target domain signal is obtained k Adaptive weighting coefficients of target domain signals When , it is realized by formula (3): (3); in formula (3), and It is a hyperparameter used to control the influence of confidence and prediction error on weight; For the pre-trained fault diagnosis deep learning model k The confidence of the target domain signal, For the k The true label of the target domain signal, is the predicted value, For the pre-trained fault diagnosis deep learning model k The prediction error of the target domain signal.
8. The bearing fault diagnosis method based on cross-domain adaptive weighting according to claim 1 is characterized in that: The S6 includes: The quadratic weighted loss function of the fault diagnosis deep learning model is calculated according to the adaptive weighting coefficient of each target domain signal, and the pre-trained fault diagnosis deep learning model is further trained through each target domain signal and the quadratic weighted loss function to obtain the final fault diagnosis deep learning model.
9. The bearing fault diagnosis method based on cross-domain adaptive weighting according to claim 8, characterized in that: When calculating the quadratic weighted loss function of the fault diagnosis deep learning model based on the adaptive weighting coefficient of each target domain signal, it is achieved through formula (4): (4); in formula (4), For the k The loss value of the target domain signal in the original loss function of the fault diagnosis deep learning model, is the quadratic loss function of the fault diagnosis deep learning model, is the number of target domain signals, For the k Adaptive weighting coefficients of target domain signals.