Rolling bearing fault diagnosis method for improving alternate transfer learning based on embedded attention mechanism
By establishing a nonlinear dynamic model of rolling bearings and a transfer learning neural network embedded with attention mechanism, the problem of insufficient data generation strategy in rolling bearing fault diagnosis is solved, and efficient and accurate fault identification and classification is achieved, with a diagnostic accuracy rate of 99.83%.
Patent Information
- Application Number
- CN202510661835.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-22
- Publication Date
- 2025-08-01
AI Technical Summary
The existing technology lacks flexible and variable data generation strategies in rolling bearing fault diagnosis, making it difficult to accurately capture fault characteristics under various operating conditions, and the model complexity and training time problems have not been effectively solved.
By establishing a nonlinear dynamic model of rolling bearings to obtain the source domain data set, a transfer learning neural network embedded with attention mechanism is built, a freezing fine-tuning strategy and alternating calculation of CORAL and MMD loss functions are used, the model weight and bias parameters are updated, and the fault feature recognition ability is improved.
It significantly reduces the diagnosis cost, improves the efficiency and accuracy of fault diagnosis, and realizes efficient fault identification and classification without actual fault data, with an accuracy rate of 99.83%, solving the problem of insufficient generalization of traditional methods.
Smart Images

Figure CN120409278A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a fault diagnosis method, and particularly to a rolling bearing fault diagnosis method based on an embedded attention mechanism to improve alternating transfer learning. Background Art
[0002] In industrial applications, bearings, as key components for supporting rotating or sliding mechanical parts, directly affect the efficiency and reliability of machinery. Under repeated alternating stresses on the bearing surface, material fatigue and cracks are likely to occur, leading to fault forms such as pitting, pockmark spalling, and shallow spalling. These faults will accelerate the wear of the bearings, shorten the service life, and pose a serious threat to the safe operation of mechanical equipment. Effective fault diagnosis techniques can detect faults in a timely manner and perform preventive maintenance, thereby improving economic benefits and equipment safety.
[0003] Due to the diversity of rolling bearings and the complexity of working conditions, the detailed datasets provided by laboratories often fail to meet the actual application requirements. To solve this problem, existing research has generated simulation data through numerical simulation techniques. This method not only reduces the dependence on laboratory resources but also lowers the diagnostic cost. However, most current fault diagnosis studies still adopt fixed data acquisition methods, lacking flexible and variable data generation strategies, and it is difficult to accurately capture fault characteristics under various working conditions in practical applications.
[0004] With the wide application of deep learning methods in fields such as image processing, transfer learning, as a technology that can effectively utilize knowledge transfer between domains, has shown great potential in bearing fault diagnosis. By improving the initial model structure or the form of input data, many studies have successfully improved the accuracy of fault diagnosis. For example, Huo et al. improved the diagnostic accuracy by introducing a linear superposition convolutional block and constructing a loss function with pseudo-labels; Di et al. effectively identified local defects of bearings by transferring knowledge from adjacent domains. Although these methods have improved the diagnostic performance, the problems of model complexity and training time still need to be further solved. Summary of the Invention
[0005] Object of the Invention: The object of the present invention is to provide a rolling bearing fault diagnosis method based on an embedded attention mechanism to improve alternating transfer learning to reduce the diagnostic cost and improve the efficiency and accuracy of fault diagnosis.
[0006] Technical Solution: The rolling bearing fault diagnosis method described in the present invention includes the following steps:
[0007] S1. Obtain a source domain dataset by establishing a non-linear dynamics model of a rolling bearing;
[0008] S2. Construct a fault diagnosis model for transfer learning neural network, set the network structure parameters, pre-train the fault diagnosis model of the transfer learning neural network using the source domain dataset described in S1, and save it;
[0009] S3. Transfer the pre-trained fault diagnosis model of the transfer learning neural network to the target domain, adopt the freeze and fine-tuning strategy to enhance the generalization ability of the target domain features, alternately calculate the total loss of the CORAL and MMD loss functions, and use backpropagation to update the weight and bias parameters of the model;
[0010] S4. Conduct fault diagnosis of rolling bearings under multiple working conditions.
[0011] Preferably, the obtaining of the source domain dataset in S1 includes:
[0012] S11. Simplify the bearing outer ring, inner ring, rolling elements and high-frequency resonator into a mass-spring-damper system;
[0013] S12. Consider the real-time position of the rolling elements to correct the displacement excitation function, and based on the Hertz contact theory, combine the fault defect size and the bearing rotation speed to correct the impact force between the rolling elements and the fault area, and establish a non-linear dynamics model of the rolling bearing;
[0014] S13. Solve the non-linear dynamics model of the rolling bearing to obtain the time-domain waveform diagrams of the vibration acceleration signals collected under four different health states, and construct the source domain dataset.
[0015] Preferably, the neural network structure in S2 consists of an input layer, a convolutional layer, a pooling layer, a fully connected layer and an output layer, and a CA attention mechanism module is added; the convolutional layer uses a convolutional kernel to perform dot product operations to extract the features of the two-dimensional image; the pooling layer performs downsampling to reduce the dimension.
[0016] Preferably, the operation formula of the convolutional layer is as follows:
[0017]
[0018] Where, represents the output of the l-th convolutional layer, c l-1 represents the channels of the (l-1)-th layer, represents the input features of the i-th channel, represents the convolutional kernel of the l-th layer, represents the corresponding bias term, * represents the convolution operation, and σ(·) represents the activation function.
[0019] Preferably, the operation formula of the pooling layer is as follows:
[0020]
[0021] Among them, P ij represents the element at the position i, j of the feature map output by the pooling layer, F represents the input feature map, R(i, j) represents the area covered by the pooling window centered on i, j in the input feature map, and a, b represent the indices within this area.
[0022] Preferably, the CORAL loss function in S3 is as follows:
[0023]
[0024] Among them, L1 represents the CORAL loss function, D S represents the source domain dataset, D T represents the target domain dataset, represents the Frobenius norm of the mean square matrix, d represents the number of sample dimensions, C S and C T represent the feature covariance matrices of the source domain dataset and the target domain dataset.
[0025] Preferably, the MMD loss function in S3 is as follows:
[0026]
[0027] Among them, L2 represents the MMD loss function, n s is the sample data, y is the true label of the sample data, is the label predicted by the classifier. λ is the maximum mean discrepancy weight coefficient, ||·|| H represents the reproducing kernel Hilbert space, S i ∈D S and T i ∈D T and D S is the source domain dataset, D T is the target domain dataset, and the mapping function Φ(·) ∈ H.
[0028] Preferably, the freeze-and-fine-tune strategy in S3 includes: freezing the parameters of the first three convolutional layers in the convolutional neural network CNN model, not updating the weights and bias parameters of these layers during the fine-tuning process, adjusting the parameters of the fifth layer and the final fully connected layer, and using the training data of the target domain to perform a detailed adjustment of the parameters of these two layers to meet the requirements of the bearing fault diagnosis task.
[0029] Beneficial effects: Compared with the prior art, the present invention has the following remarkable advantages: 1. By establishing a non-linear dynamics model of rolling bearings and obtaining the source domain dataset, the dependence on laboratory resources is reduced, and the diagnostic cost is significantly reduced; 2. By embedding the CA attention mechanism module, the ability of the network to capture and identify fault features is improved. By cyclically calculating the CORAL and MMD loss functions and backpropagating to update the weights and bias parameters of each layer of the network, the distribution difference between the source domain and the target domain is shortened; 3. Analyze the influence of different network structures and attention modules on fault diagnosis, and select the best diagnostic model with a structure of 5 convolutional layers plus 2 pooling layers. The highest fault classification accuracy is 99.85%, and the lowest loss rate is 1.26%; 4. Through experiments, fault identification and classification of signals are realized without actual fault data, and the diagnostic accuracy is as high as 99.83%. Compared with algorithms such as TCA and LATL, the present invention solves the problem of insufficient generalization ability of traditional methods and significantly improves the efficiency and accuracy of fault diagnosis. Description of the Drawings
[0030] Figure 1 It is a schematic flow diagram of the present invention;
[0031] Figure 2 It is a schematic diagram of the non-linear dynamics model of the rolling bearing of the present invention;
[0032] Figure 3 It is a schematic diagram of the dimensional relationship when the rolling element enters the defect area of the present invention;
[0033] Figure 4 It is a schematic diagram of the time domain waveform of the SKF6205-2RS deep groove ball bearing of the present invention in four different health states;
[0034] Figure 5 It is a schematic diagram of the time domain waveform of the ZA-2115 double row bearing of the present invention in four different health states;
[0035] Figure 6 It is a schematic diagram of the accuracy comparison curve during the training process of each attention module of the present invention;
[0036] Figure 7 It is a schematic diagram of the loss rate comparison curve during the training process of each attention module of the present invention;
[0037] Figure 8 It is a schematic diagram of the time domain waveform and grayscale of the source domain in the transfer task of the present invention;
[0038] Figure 9 It is a schematic diagram of the time domain waveform and grayscale of the target domain in the transfer task of the present invention;
[0039] Figure 10 It is a schematic diagram of the confusion matrix of different algorithm results from transfer task I to II of the present invention;
[0040] Figure 11 This is a schematic diagram of the t-SNE visualization result of the present invention. Detailed implementation manners
[0041] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings.
[0042] As Figure 1 shown, the rolling bearing fault diagnosis method based on the improved alternating transfer learning with the embedded attention mechanism in this embodiment includes the following steps:
[0043] S1. Aiming at the problems of few rolling bearing fault data samples and low diagnosis accuracy, a rolling bearing nonlinear dynamics model is established, and finally a source domain data set is obtained through the simulation model, specifically as follows:
[0044] S11. According to the Hertz contact theory, the contact between the rolling element and the raceway will produce elastic deformation, thus forming a Hertz contact force inside the bearing. When there are defect faults in the bearing, the contact deformation should be divided into non-defect area contact deformation and defect area contact deformation. The bearing outer ring, inner ring, rolling element and high-frequency resonator are simplified into a mass-spring-damper system, as Figure 2 shown.
[0045] S12. Considering the real-time position of the rolling element to correct the displacement excitation function, based on the Hertz contact theory, combined with the fault defect size and the bearing rotation speed to correct the impact force between the rolling element and the fault area, and establish a rolling bearing nonlinear dynamics model.
[0046] The dimensional relationship when the rolling element enters the defect area is as Figure 3 shown, then the angle θ b at which the rolling element enters the defect area can be expressed as:
[0047]
[0048] where θ en and θ ex respectively represent the front edge and rear edge angular positions of the defect area, R represents the outer raceway radius of the bearing, and r represents the rolling element radius.
[0049] The radial displacement excitation function s of the rolling element entering the defect area mutation is expressed as:
[0050]
[0051] where R is the outer raceway radius of the bearing and r is the rolling element radius.
[0052] The radial displacement δ o_j of the contact deformation between the jth rolling element and the outer raceway of the bearing after correction is expressed as:
[0053]
[0054] Among them, D0 is the outer diameter of the bearing, and C r is the radial clearance of the bearing, and Z j respectively represent the relative displacement vectors of the jth rolling element with the raceways of the inner and outer rings of the bearing.
[0055] During the process of the rolling element crossing an obstacle, in addition to the sudden change in the radial displacement of the rolling element, an instantaneous impact force will be generated at the moment of the trailing edge line of the rolling element contact defect.
[0056] F impact represents the impact force generated by the rolling element hitting the trailing edge of the defect. According to the impulse theorem, the calculation formula for the impact force is:
[0057]
[0058] Orthogonally decompose it to obtain the horizontal and vertical components. Then the magnitude of the total Hertz contact force on the inner and outer rings of the bearing is as follows:
[0059]
[0060] Then, for the outer ring fault, the nonlinear dynamic equation of the rolling bearing is as follows:
[0061]
[0062] Among them, F r is the external load; g is the acceleration due to gravity, taking 9.8 m / s 2 , m i , k i , c i respectively represent the mass, stiffness and damping of the inner ring of the bearing. m o , k o , c o respectively represent the mass, stiffness and damping of the outer ring of the bearing. m r , k r , c r respectively represent the mass, stiffness and damping of the high-frequency resonator. e and g represent the installation eccentricity and the acceleration due to gravity constant. F r is the bearing load, and m b is the mass of the rolling element.
[0063] S13. Solve the nonlinear dynamic model of the rolling bearing. The simulation model uses SKF6205-2RS deep groove ball bearings and ZA-2115 double row bearings. For the SKF6205-2RS deep groove ball bearings, set the damage diameter L to 0.1778 mm, and the damage depth H dIt is 0.2794 mm, the sampling frequency is set to 12 kHz, and the inner ring rotation speed is set to 1797 r / min. A radial load of 2721.55 kg is applied to the ZA-2115 double-row bearing through a spring mechanism, the sampling frequency is 20 kHz, and the motor speed is 2000 r / min. Since the bearing dynamic equation set is highly non-linear, the fourth-order Runge-Kutta method is used to solve the established dynamic model, and the calculation step size is Δt = 5×10 -6 s, obtaining the time-domain waveform diagrams of the vibration acceleration signals collected under four different health states. The time-domain waveform diagram of the SKF6205-2RS deep groove ball bearing is as shown in Figure 4 the figure, and the time-domain waveform diagram of the ZA-2115 double-row bearing is as shown in Figure 5 the figure. The vibration acceleration signals are obtained using the simulation model to construct the source domain dataset.
[0064] S2. Construct a transfer learning neural network fault diagnosis model, set the network structure parameters, pre-train the transfer learning neural network fault diagnosis model using the source domain dataset, and save it.
[0065] The neural network structure consists of an input layer, a convolutional layer, a pooling layer, a fully connected layer, and an output layer, and a CA attention mechanism module is added; the convolutional layer performs dot product operations using convolutional kernels to extract the features of two-dimensional images; the pooling layer performs downsampling to reduce the spatial size of the data to reduce the dimension.
[0066] The convolution operation formula is as follows:
[0067]
[0068] where represents the output of the l-th convolutional layer, c l-1 represents the channels of the (l - 1)-th layer, represents the input features of the i-th channel, represents the convolutional kernel of the l-th layer, represents the corresponding bias term, * represents the convolution operation, and σ(·) represents the activation function.
[0069] The average pooling operation formula is as follows:
[0070]
[0071] where P ij represents the element at position i, j of the feature map output by the pooling layer, F represents the input feature map, R(i, j) represents the area covered by the pooling window centered at i, j in the input feature map, and a, b represent the indices within this area.
[0072] Experiment 1: Experiment on the fault classification effect of rolling bearings with different CNN network structures.
[0073] To systematically evaluate the effectiveness of different CNN network structures for the rolling bearing fault classification task, the following experimental studies were carried out. The experiment utilized the bearing datasets under different working conditions provided by the Case Western Reserve University (CWRU) Electrical Engineering Laboratory in the United States. In the CWRU experiment, the drive-end bearings used were 6203-2RS rolling bearings produced by SKF. The sampling frequency of these bearings was set at 12 kHz, while the motor speeds were 1797 r / min, 1772 r / min, 1750 r / min, and 1730 r / min. The corresponding loads were 0 hp, 1 hp, 2 hp, and 3 hp respectively. The bearing faults were single-point faults manufactured by electrical discharge machining (EDM), and the bearings demonstrated four operating states: normal state (N), outer race fault (O), inner race fault (I), and rolling element fault (R). The bearing crack fault sizes were 0.007, 0.014, and 0.021 inches.
[0074] Randomly select 300 consecutive data points from the CWRU dataset, each with a data length of 1024. Before model training, the data is preprocessed by regular normalization and converted into two-dimensional grayscale images to meet the input requirements of the CNN. To ensure that the model has good generalization ability on unseen data, the dataset is divided into an 80% training set and a 20% test set. The settings include a batch size of 16, a learning rate of 0.0001, and the number of iterations is set to 100.
[0075] Subsequently, models with different CNN network structures were trained one by one, and their classification accuracies were statistically analyzed. Based on a comprehensive consideration of model performance and computational efficiency, the CNN network structure that performed best in the experiment was ultimately selected.
[0076] Based on the bearing fault classification experiment of the CWRU dataset, the classification tasks were carried out in groups in sequence. Experiments were conducted by comparing multiple different combinations of convolutional layers and pooling layers, and the results are shown in Table 1.
[0077] Table 1 Comparison of Different Network Layers
[0078]
[0079] The experimental results show that the neural network structure with 5 convolutional layers + 2 pooling layers is the best structure, with the highest fault classification accuracy of 99.85% and the lowest loss rate of 1.26%. Therefore, this patent adopts the network structure of 5 convolutional layers + 2 pooling layers.
[0080] Experiment 2: Selection Experiment of the Attention Mechanism Module.
[0081] Taking the 6205-2RS bearings in the CWRU dataset with different loads and different fault sizes as an example, different attention mechanism modules are embedded in the best network structure in Experiment 1, namely 5 convolutional layers + 2 pooling layers, for transfer learning to obtain the fault diagnosis accuracy, and the best attention mechanism module is selected. The specific composition of the experimental data for this transfer task is shown in Table 2.
[0082] Table 2 Composition of the Dataset for Experiment 2
[0083]
[0084] The selected CWRU dataset is used to conduct three experiments in sequence according to cross-load, cross-fault size, and cross-load and fault size.
[0085] According to the sampling length of the dataset, 300 consecutive data points are randomly selected from the dataset, and the data length is 1024. Before model training, the data is preprocessed by regular normalization and converted into two-dimensional grayscale images to meet the input requirements of the network. 80% of the dataset is assigned as the training set, and the remaining 20% is used as the test set.
[0086] Set hyperparameters: the number of iterations Epoch is 100, the learning rate Learning rate is 0.0001, and the batch size Batch size is 16.
[0087] Taking the source domain in the CWRU dataset with a fault size of 0.1778 mm and a load of 0 W, and the target domain with a fault size of 0.5334 mm and a load of 2205 W as an example, the data characteristics of this dataset migration condition differ the most in the dataset, and it can better reflect the performance of different attention mechanism modules in the experiment. Compare the accuracy and loss during the training process of each attention module.
[0088] In this experiment, a cross-condition transfer experiment for bearing faults was conducted using the CWRU dataset. A total of 3 different transfer tasks were executed, and each task was independently tested 5 times to record data, and finally the average value of these data was used for analysis. The performance of different attention mechanisms in the fault diagnosis task has significant differences. Comparing and analyzing these differences helps to optimize the model design. The transfer learning fault diagnosis results incorporating different attention mechanisms are shown in Table 3.
[0089] Table 3 Fault Diagnosis Results of Different Attention Mechanism Modules
[0090]
[0091] The comparison curves of the accuracy during the training process of each attention module are as Figure 6 shown, and the comparison curves of the loss rate are as Figure 7As shown in the figure, in Experiment 2, the CA attention mechanism module demonstrated its remarkable performance in terms of accuracy and loss curves: the accuracy curve rose rapidly, and the loss curve dropped quickly and stabilized at a relatively low level. The model not only achieved high performance in the clustering task but also showed a significant improvement in the accuracy of fault diagnosis. Therefore, in this study, the CA attention mechanism was embedded into the current network structure as the subsequent transfer experiment algorithm model.
[0092] The CA attention mechanism introduces a global information pooling operation and a fully connected layer. The operation of the CA module can be divided into two steps: Squeeze and Excitation. Each channel is compressed through global average pooling, and then the importance weights of each channel are learned through the Excitation operation.
[0093] Squeeze can be expressed as:
[0094]
[0095] where represents the value of the C-th channel of X at position (i,j).
[0096] The Excitation operation is implemented through a sequence of fully connected layers with ReLU and sigmoid activation functions, that is:
[0097] s = σ(W2δ(W1Z));
[0098] where δ represents the ReLU activation function; σ represents the sigmoid activation function; and are learnable parameter matrices; Z is the scaling ratio, which is used to control the computational complexity of the CA module.
[0099] The structural parameters of the deep convolutional neural network embedded with the CA attention mechanism are shown in Table 4 below.
[0100] Table 4 Structural Parameters of the Deep Convolutional Neural Network Embedded with the CA Attention Mechanism
[0101]
[0102] Experiment 3:
[0103] The source domain data uses two sets of simulated bearing datasets constructed in Experiment 1: the ZA-2115 double-row bearing dataset and the 6205-2RS deep groove ball bearing dataset, which are divided into Dataset Ⅰ. This dataset contains the normal state and three fault states, and is used to construct the source domain dataset. The target domain dataset uses the bearing dataset of the University of Cincinnati in the United States and is divided into Dataset Ⅱ. This dataset also includes the normal state and three fault states, but only part of it is selected as the target domain data.
[0104] The target domain dataset uses the bearing dataset (IMS) of the University of Cincinnati in the United States. By using an AC motor connected to the shaft with a friction belt, the rotational speed is kept constant at 2000 RPM. A load of 6000 pounds is applied to the shaft, and two accelerometers are installed on the double-row bearings on the shaft. In the three datasets, the first dataset is equipped with two-axis accelerometers for each bearing, and the second and third datasets are equipped with single-axis accelerometers. The result datasets of the experimental runs are shown in Table 5 below.
[0105] Table 5 IMS Experimental Result Datasets
[0106]
[0107] It can be seen from the datasets in Table 5 that the results of the full-life experiment include inner race faults, outer race faults, and rolling element faults. Bearing 2, Bearing 3, and Bearing 4 in Dataset 1 and Bearing 1 in Dataset 2 are selected as the normal state (N), inner race (I), rolling element fault (R), and outer race fault (O) in the target domain dataset respectively.
[0108] To verify the effectiveness of the migration algorithm proposed in the present invention, this example designs a cross-condition migration fault diagnosis experiment based on different datasets and fault types. Taking the migration task from Ⅰ to Ⅱ as an example, where Ⅰ is the source domain dataset and Ⅱ is the target domain dataset, the specific experimental data composition is shown in Table 6 below.
[0109] According to the simulation results and the sampled data length, 300 consecutive data points are randomly selected from the dataset, and the data length is 1024. Before model training, the data is preprocessed by regular normalization and converted into two-dimensional grayscale images to meet the input requirements of the network. 80% of the dataset is assigned as the training set, and the remaining 20% is used as the test set. Set the hyperparameters: the number of iterations Epoch is 100, the learning rate Learning rate is 0.0001, and the batch size Batch size is 16.
[0110] Table 6 Dataset Composition of Migration Task 0 to A in Experiment 1
[0111]
[0112]
[0113] To verify the effectiveness of the algorithm proposed in this paper, it is compared with Transfer Component Analysis (TCA), Convolutional Neural Network (CNN), MMD, CORAL, and LATL.
[0114] In the cross-condition transfer fault diagnosis experiment, transfer tasks were set, and the algorithm proposed in this paper and other five algorithms were tested on the model proposed in this paper. By taking the average of the results of 5 experiments, the fault diagnosis results are shown in Table 7 below.
[0115] Table 7 Fault diagnosis results under different algorithms
[0116]
[0117] According to the data in Table 7, the following conclusions can be drawn: The accuracy of TCA is 70.58%, which is the lowest among all algorithms. TCA mainly focuses on reducing the marginal distribution difference between domains, but fails to consider the distribution difference, resulting in weak generalization ability in practical applications. The accuracy of CNN is 80.52%, which performs better than TCA. Although CNN can effectively extract spatial features, it may fail in cross-domain learning due to domain differences. The accuracy of MMD is 82.89%, and the results show that by effectively reducing the feature difference between domains. However, the effect of MMD is significantly affected in the case of sample imbalance, resulting in performance degradation. The accuracy of CORAL is 90.26%, which is significantly higher than that of MMD and CNN. CORAL improves the domain adaptation ability, but still ignores some subtle local feature differences, affecting the final diagnosis accuracy. The accuracy of LATL is 98.33%. Although this algorithm adopts an alternating learning strategy, which improves the adaptability and generalization ability of the model between different domains and significantly improves the accuracy and reliability of fault diagnosis. However, the algorithm of the present invention effectively focuses on the features crucial for fault diagnosis by integrating the attention mechanism and the freeze fine-tuning learning strategy, enhances the model's ability to capture key information, reduces the training time, and improves the learning and diagnosis efficiency with an accuracy of 99.83%.
[0118] As Figure 8 - 9 shown, in the transfer from Task I to Task II, the source domain dataset I is generated by constructing a dynamic equation, and its grayscale image shows obvious regular stripes. The results show that there are obvious differences between the source domain dataset I and the target domain dataset II in the time-domain waveform and grayscale image, indicating that there are significant differences in the data distributions between the two domains.
[0119] As Figure 10 shown, the classification accuracy of the confusion matrix of the algorithm of the present invention is up to 99.83% at the highest. Figure 11This is the t-SNE visualization result, which shows the difference in feature distribution. This indicates that the algorithm in this paper effectively ensures the feature separability between different fault categories and reduces the difference in feature distribution between data in different domains, thereby improving the fault diagnosis recognition rate of the model.
[0120] Therefore, through experimental comparison and verification, the improved alternating transfer learning fault diagnosis method with an embedded attention mechanism can effectively improve the fault diagnosis accuracy of rolling bearings and has good generalization ability.
[0121] S3. Transfer the pre-trained transfer learning neural network fault diagnosis model to the target domain. During the transfer learning process, a freezing and fine-tuning strategy is adopted to enhance the generalization ability of the features in the target domain. Probability statistical calculations are performed on the differences in the information entropy distribution and labels obtained from training the source domain and target domain data. The total loss calculated alternately by the two loss functions CORAL and MMD is used to update the weights of the network through backpropagation, shortening the distribution difference between the source domain and the target domain.
[0122] The freezing and fine-tuning strategy is as follows: Freeze the parameters of the first three convolutional layers in the convolutional neural network (CNN) model, and do not update the weights and biases of these layers during the fine-tuning process; Adjust the parameters of the fifth layer and the final fully connected layer, and use the training data of the target domain to perform detailed adjustment of the parameters of these two layers to meet the requirements of the bearing fault diagnosis task.
[0123] The CORAL loss function is as follows:
[0124]
[0125] Among them, L1 represents the CORAL loss function, D S represents the source domain dataset, D T represents the target domain dataset, represents the Frobenius norm of the mean square matrix, d represents the number of sample dimensions, C S 、C T represent the feature covariance matrices of the source domain dataset and the target domain dataset.
[0126] The MMD loss function is as follows:
[0127]
[0128] Among them, L2 represents the MMD loss function, n s is the sample data, y is the true label of the sample data, is the label predicted by the classifier. λ is the maximum mean difference weight coefficient, ||·|| H represents the reproducing kernel Hilbert space, S i ∈D S ,Ti ∈D T ,D S is the source domain dataset, D T is the target domain dataset, and the mapping function Φ(·) ∈ H.
[0129] S4. Perform rolling bearing fault diagnosis under multiple working conditions.
Claims
1. A rolling bearing fault diagnosis method based on an improved alternating transfer learning with an embedded attention mechanism, characterized in that, It includes the following steps: S1. Obtain the source domain dataset by establishing a nonlinear dynamics model of a rolling bearing; S2. Construct a transfer learning neural network fault diagnosis model, set the network structure parameters, pre-train the transfer learning neural network fault diagnosis model using the source domain dataset described in S1, and save it; S3. Transfer the pre-trained transfer learning neural network fault diagnosis model to the target domain, adopt a freeze-and-fine-tune strategy to enhance the generalization ability of the target domain features, alternately calculate the total loss of the CORAL and MMD loss functions, and update the weight and bias parameters of the model using backpropagation; S4. Conduct rolling bearing fault diagnosis under multiple working conditions.
2. The rolling bearing fault diagnosis method according to claim 1, wherein The obtaining of the source domain dataset described in S1 includes: S11. Simplify the bearing outer ring, inner ring, rolling elements and high-frequency resonator into a mass-spring-damper system; S12. Consider the real-time position of the rolling elements to correct the displacement excitation function, and based on the Hertz contact theory, combine the fault defect size and the bearing speed to correct the impact force between the rolling elements and the fault area, and establish a nonlinear dynamics model of the rolling bearing; S13. Solve the nonlinear dynamics model of the rolling bearing to obtain the time-domain waveform diagrams of the vibration acceleration signals collected under four different health states, and construct the source domain dataset.
3. The rolling bearing fault diagnosis method according to claim 1, characterized in that The neural network structure described in S2 consists of an input layer, a convolutional layer, a pooling layer, a fully connected layer and an output layer, and a CA attention mechanism module is added; the convolutional layer uses a convolutional kernel to perform dot product operations to extract the features of two-dimensional images; the pooling layer performs downsampling to reduce the dimension.
4. The rolling bearing fault diagnosis method according to claim 3, characterized in that, The operation formula of the convolutional layer is as follows: Among them, represents the output of the l-th convolutional layer, c l-1 represents the number of channels in the (l - 1)-th layer, represents the input feature of the i-th channel, represents the convolutional kernel of the l-th layer, represents the corresponding bias term, * represents the convolution operation, and σ(·) represents the activation function.
5. The rolling bearing fault diagnosis method according to claim 3, characterized in that The operation formula of the pooling layer is as follows: where, P ij represents the element at position i, j in the feature map output by the pooling layer, F represents the input feature map, R(i, j) represents the area covered by the pooling window centered at i, j in the input feature map, and a, b represent the indices within this area.
6. The rolling bearing fault diagnosis method according to claim 1, characterized in that, The CORAL loss function described in S3 is as follows: Among them, L1 represents the CORAL loss function, D S represents the source domain dataset, D T represents the target domain dataset, represents the Frobenius norm of the mean square matrix, d represents the number of sample dimensions, C S 、C T represent the feature covariance matrices of the source domain dataset and the target domain dataset.
7. The rolling bearing fault diagnosis method according to claim 1, wherein The MMD loss function described in S3 is as follows: Among them, L2 represents the MMD loss function, n s is the sample data, y is the true label of the sample data, is the label predicted by the classifier. λ is the maximum mean discrepancy weight coefficient, ||·|| H represents the reproducing kernel Hilbert space, S i ∈ D S , T i ∈ D T , D S is the source domain dataset, D T is the target domain dataset, and the mapping function Φ(·) ∈ H.
8. The rolling bearing fault diagnosis method according to claim 1, characterized in that The freeze-and-fine-tune strategy described in S3 includes: freezing the parameters of the first three convolutional layers in the convolutional neural network (CNN) model, not updating the weights and bias parameters of these layers during the fine-tuning process, adjusting the parameters of the fifth layer and the final fully connected layer, and performing detailed adjustment of the parameters of these two layers using the training data of the target domain to meet the requirements of the bearing fault diagnosis task.
9. A computer device, characterized in that, It includes one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and when the program is executed by the processor, it implements the steps of the rolling bearing fault diagnosis method as described in claims 1-8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the rolling bearing fault diagnosis method as described in claims 1-8.
Citation Information
Cited By
Rolling bearing fault diagnosis method based on mechanism and data fusion
CN120951100A