IDANN-based cross-working-condition gearbox fault diagnosis method
By introducing an improved domain adversarial neural network (IDANN) and an improved time-frequency transformation network in gearbox fault diagnosis, combined with a deep residual network and a soft threshold noise reduction module, the problem of scarcity of gearbox fault data and insufficient model interpretability is solved, and higher fault diagnosis accuracy and robustness are achieved.
Patent Information
- Application Number
- CN202510094412.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-05-16
AI Technical Summary
The gearbox fault data is small, and the model is difficult to achieve good training results under different working conditions and data characteristics. The deep learning model lacks interpretability, which limits the industrial application of fault diagnosis.
A cross-condition gearbox fault diagnosis method based on an improved domain adversarial neural network (IDANN) is designed to perform feature extraction through improved time-frequency transformation network, combining interpretable time-frequency feature networks and deep residual networks, and integrating soft threshold noise reduction modules. At the same time, class-level alignment at the target domain level was introduced, and the exception target domain sample difference measurement was used using the Wasserstein distance.
It improves the accuracy and efficiency of gearbox fault diagnosis, enhances the interpretability and robustness of the model, and can better adapt to the fault diagnosis needs across operating conditions.
Smart Images

Figure CN120011782A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet big data and fault diagnosis, and in particular to a cross-operating condition gearbox fault diagnosis method based on IDANN. Background Art
[0002] As the core component of the rotating machinery system, the gearbox is often faced with various potential failure risks due to long-term operation, high-load conditions and environmental factors, such as gear damage, bearing wear, poor assembly, etc. If these failures are not discovered and diagnosed in time, they will not only cause equipment downtime for maintenance, affecting production plans, but may also cause serious damage to the equipment and increase maintenance costs.
[0003] Gearbox fault diagnosis technology using deep learning has received extensive attention and research. However, the complex principles of deep learning and the difficulty of understanding its high-dimensional linear structure have not yet been solved. At present, research on interpretable networks is very hot, which has greatly promoted the application of deep learning in the field of fault diagnosis. Wavelet Kernel Network (Wavelet KernelNet, WKN), as one of the outstanding achievements of knowledge embedded fault diagnosis, has taken a big step forward in interpretable networks. WKN introduces continuous wavelet transform into convolutional neural networks, constructs a unique wavelet convolution, and explains the physical meaning of model input and output.
[0004] The problem that the fault data of gearboxes is complex and scarce, resulting in the decline of model diagnosis performance, cannot be ignored in deep learning. Current research generally starts from the directions of physical modeling, data generation and transfer learning. Although physical modeling and data generation methods have certain advantages in the field of fault diagnosis and can provide physical information and data in real scenarios, they may be affected by model inaccuracy or data bias, especially when facing complex systems or unknown environments. However, transfer learning can achieve better performance in the target domain by sharing knowledge between the source domain and the target domain. This transfer learning capability makes the model more robust and able to handle fault diagnosis tasks in different fields or conditions. Therefore, using transfer learning to solve data scarcity has been a hot research direction in recent years.
[0005] The achievements made in recent years have made great contributions to this field, but there are still some issues that need attention: 1) The common problem is that the amount of gearbox fault data is small, and the model cannot achieve good training results under different working conditions and different data characteristics; on the other hand, due to the differences in the gearbox structure of different equipment, the data training model obtained by simple experimental equipment and more complex practical application equipment may not necessarily achieve excellent diagnostic results. 2) In the field of fault diagnosis, the problem of network model interpretability needs to be solved. Improving the interpretability of network models is becoming more and more important, which is related to the credibility of the model. Most of the current deep learning models lack interpretability, which limits the industrial application of fault diagnosis. Therefore, it is necessary to introduce an interpretable network to extract features with physical meaning and enhance the credibility and operability of this method in application.
[0006] In order to address the above-mentioned network interpretability, noise resistance and improve the poor model performance caused by the lack of fault data, the applicant thought of designing a new type of transfer learning model, which realizes gearbox cross-operating fault diagnosis by introducing an optimized domain adversarial network (IDANN). Among them, Domain-Adversarial Neural Networks (DANN) is a method of adversarial transfer learning. However, how to design a cross-operating gearbox fault diagnosis method based on IDANN is a technical problem that needs to be solved urgently. Summary of the invention
[0007] In view of the deficiencies of the above-mentioned prior art, the technical problem to be solved by the present invention is: how to provide a cross-operating condition gearbox fault diagnosis method based on IDANN, feature extraction is performed by improving the time-frequency transform network, and the improved time-frequency transform network combines the interpretable time-frequency feature network and the deep residual network and integrates the soft threshold denoising module; at the same time, class-level alignment at the target domain level is introduced, two label classifiers are added and the Wasserstein distance is used to perform a reliable abnormal target domain sample difference measurement, which takes into account the properties of the underlying geometry of the probability space and can effectively detect abnormal target samples even when the distribution does not share support, thereby improving the accuracy and efficiency of gearbox fault diagnosis.
[0008] In order to solve the above technical problems, the present invention adopts the following technical solutions:
[0009] A cross-operating condition gearbox fault diagnosis method based on IDANN, comprising:
[0010] S1: Acquire the gearbox data to be diagnosed;
[0011] S2: Input the gearbox data into the trained fault diagnosis model and output the corresponding fault prediction result; wherein the fault diagnosis model is constructed based on the improved domain adversarial neural network;
[0012] The processing steps when training a fault diagnosis model include:
[0013] S201: Obtain training sets of a source domain and a target domain as inputs of a fault diagnosis model; wherein the training set of the source domain includes data samples and corresponding real fault labels; and the training set of the target domain is unlabeled data samples;
[0014] S202: extracting features from data samples in the source domain and the target domain by improving the time-frequency transform network to obtain source domain features and target domain features; wherein the improved time-frequency transform network combines the time-frequency feature network with the deep residual network and integrates a soft threshold denoising module;
[0015] S203: Input the source domain features and the target domain features into the label classifier respectively, and output the corresponding source domain fault prediction label and the target domain fault prediction label;
[0016] S204: Calculating a prediction loss function based on the source domain fault prediction label and the corresponding true fault label;
[0017] S205: Input the target domain feature into the second label classifier, and output the corresponding target domain second predicted label;
[0018] S206: performing class-level alignment of the target domain level based on the target domain fault prediction label and the target domain second prediction label, and calculating the difference loss function of the target domain;
[0019] S207: Input the source domain features and the target domain features into the gradient reversal layer respectively to perform gradient reversal;
[0020] S208: Inputting the source domain features and the target domain features after gradient inversion into the domain discriminator for data differentiation, and calculating the adversarial loss function according to the data differentiation result;
[0021] S209: Calculate the total loss function based on the prediction loss function, the difference loss function of the target domain, and the adversarial loss function, and reversely optimize the model parameters;
[0022] S210: Repeat steps S201 to S209 to iteratively train the fault diagnosis model until the model converges or reaches a preset number of iterations;
[0023] S3: Outputting the fault prediction result as the fault diagnosis result of the gearbox data to be diagnosed.
[0024] Preferably, in step S202, the improved time-frequency transformation network includes a time-frequency convolution layer, a convolution layer, a batch normalization layer, a Relu function, a maximum pooling layer, a residual connection layer, a soft threshold denoising layer, an average pooling layer and a fully connected layer connected end to end in sequence.
[0025] Preferably, in step S202, the kernel function of the time-frequency convolution layer in the improved time-frequency transform network is a short-time Fourier transform function;
[0026] The formula is:
[0027]
[0028] Where: σ=0.52, n=[-(N c -1),…,(N c -1)]; f∈[0,0.5]; N c Indicates the number of channels of the time-frequency convolution layer.
[0029] Preferably, in step S202, the soft threshold noise reduction layer in the improved time-frequency transform network performs noise reduction through a soft threshold;
[0030] The formula is:
[0031] soft threshold(x,λ) =sign(x)·max(|x|-λ,0);
[0032] Where: x represents the input tensor, and λ represents the soft threshold parameter.
[0033] Preferably, in step S204, the prediction loss function is calculated by the following formula:
[0034]
[0035] Where: represents the prediction loss; G f Denote the parameter as θ f Improved time-frequency transformation network; G c Denote the parameter as θ c The class predictor of Represents the i-th data sample in the source domain dataset; represents the true fault label corresponding to the i-th data sample in the source domain dataset; c represents all possible categories; C represents the total number of categories; D s Represents the source domain dataset; Express expectations.
[0036] Preferably, in step S206, the difference loss function of the target domain is calculated by the following formula:
[0037]
[0038] Where: SWD represents the calculated slice Wasserstein difference; represents the difference loss of the target domain; R θ represents the one-dimensional linear projection operation on the probability measure μ or v, μ and v represent the target domain fault prediction label and the target domain second prediction label output by the label classifier and the second label classifier respectively; θ represents the unified measure on the unit sphere in the data sample; α and β represent the arrangement of sorting the N one-dimensional linear projections of N data samples; M is the number of radial projections.
[0039] Preferably, in step S202, the adversarial loss function is calculated by the following formula:
[0040]
[0041] Where: Indicates the loss of resistance; G f Denote the parameter as θ f Improved time-frequency transformation network; G d Denote the parameter as θ d Domain discriminator of Represents the i-th data sample in the source domain dataset; represents the i-th data sample in the target domain dataset; D s represents the source domain dataset; D t represents the target domain dataset; Express expectations.
[0042] Preferably, in step S209, the total loss function is calculated by the following formula:
[0043]
[0044] Where: represents the total loss; θ f ,θ c ,θ d They represent the parameters of the improved time-frequency transformation network, label classifier, and domain discriminator respectively; represents the predicted loss; It means fighting against loss; represents the difference loss of the target domain; λ DANN represents the weight of the adversarial loss.
[0045] Compared with the prior art, the cross-operating gearbox fault diagnosis method based on IDANN in the present invention has the following beneficial effects:
[0046] The fault diagnosis model of the present invention performs feature extraction by improving the time-frequency transform network, wherein the improved time-frequency transform network combines the time-frequency feature network with the deep residual network and integrates the soft threshold noise reduction module. First, compared with the traditional convolutional neural network, the deep residual network has a stronger feature learning ability, especially when dealing with complex and deep features, it can effectively avoid the gradient vanishing and gradient explosion problems, thereby more accurately extracting fault features in the gearbox vibration signal. Secondly, the improved time-frequency transform network combines the interpretable time-frequency feature network with the deep residual network to improve the network depth, so that the network can learn deeper feature representations, which increases the interpretability and diagnostic accuracy of the adversarial transfer method. Finally, by improving the feature extraction capability and model generalization, the improved time-frequency transform network can better adapt to the needs of cross-operating gearbox fault diagnosis, thereby improving the accuracy and efficiency of gearbox fault diagnosis.
[0047] The present invention calculates the total loss function based on the prediction loss function, the difference loss function of the target domain and the adversarial loss function, and reversely optimizes the model parameters. First, by calculating the prediction loss function, the prediction performance of the model on the source domain data can be quantified, guiding the optimization of the model parameters, so that the model can achieve a higher diagnostic accuracy on known fault types. At the same time, the continuous reduction of the prediction loss function means that the degree of fit of the model to the source domain data is continuously improved, which in turn helps to enhance the stability and reliability of the model, ensure that the model has good diagnostic performance on the source domain data, and provide a solid foundation for cross-operating fault diagnosis. Secondly, the class-level alignment of the target domain level is introduced, two label classifiers are added, and Wasserstein distance is used to perform reliable abnormal target sample difference measurement. This measurement takes into account the properties of the underlying geometry of the probability space and can effectively detect abnormal target samples even when the distribution does not share support. At the same time, by introducing the second label classifier and making secondary predictions on the target domain data, the performance difference of the model in the target domain can be evaluated, and the model's adaptability to unknown or new working conditions can be enhanced. The calculation of the difference loss function helps the model to achieve effective knowledge transfer between the source domain and the target domain, reduce the degradation of diagnostic performance caused by working condition changes, and thus improve the generalization ability and accuracy of the model in cross-working condition gearbox fault diagnosis. Then, the combined use of the gradient reversal layer and the domain discriminator helps to achieve the alignment of the source domain and target domain features and reduce the differences between domains, thereby enhancing the diagnostic ability of the model under cross-working conditions. At the same time, through adversarial training, the model can learn more robust feature representations, reduce misjudgments caused by working condition changes or noise interference, and further enhance the adaptability and accuracy of the model in cross-working condition gearbox fault diagnosis. Finally, the total loss function comprehensively considers the model's prediction performance in the source domain, its adaptability in the target domain, and the degree of alignment between domains. The comprehensive optimization of the model can be achieved by reversely optimizing the model parameters. At the same time, the comprehensive optimization results enable the model to show higher accuracy and robustness in cross-operating gearbox fault diagnosis, thereby improving the performance of the model in cross-operating gearbox fault diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to make the purpose, technical solution and advantages of the invention more clear, the present invention will be further described in detail below with reference to the accompanying drawings, in which:
[0049] Figure 1 Network structure diagram for training fault diagnosis model.
[0050] Figure 2 This is the network structure diagram of the residual block.
[0051] Figure 3 Network structure diagram for improving the time-frequency transformation network.
[0052] Figure 4 is the accuracy curve of task 0.
[0053] Figure 5 This is the accuracy curve of task 1.
[0054] Figure 6 This is the confusion matrix result for task 0.
[0055] Figure 7 This is the confusion matrix result for Task 1.
[0056] Figure 8 This is the accuracy curve of Task 2.
[0057] Fig. 9 This is the accuracy curve of Task 3. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. The components of the embodiments of the present invention generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed invention, but only represents selected embodiments of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work belong to the scope of protection of the present invention.
[0059] The following is a further detailed description through specific implementation methods:
[0060] Example:
[0061] This embodiment discloses a cross-operating condition gearbox fault diagnosis method based on IDANN.
[0062] like Figure 1 As shown, a cross-operating gearbox fault diagnosis method based on IDANN includes:
[0063] S1: Acquire the gearbox data to be diagnosed;
[0064] S2: Input the gearbox data into the trained fault diagnosis model and output the corresponding fault prediction results; wherein the fault diagnosis model is constructed based on the improved domain adversarial neural network (IDANN);
[0065] The processing steps when training a fault diagnosis model include:
[0066] S201: Obtain training sets of a source domain and a target domain as inputs of a fault diagnosis model; wherein the training set of the source domain includes data samples and corresponding real fault labels; and the training set of the target domain is unlabeled data samples;
[0067] S202: extracting features from data samples in the source domain and the target domain by improving the time-frequency transform network to obtain source domain features and target domain features; wherein the improved time-frequency transform network combines the time-frequency feature network with the deep residual network and integrates a soft threshold denoising module;
[0068] S203: Input the source domain features and the target domain features into the label classifier respectively, and output the corresponding source domain fault prediction label and the target domain fault prediction label;
[0069] S204: Calculating a prediction loss function based on the source domain fault prediction label and the corresponding true fault label;
[0070] S205: Input the target domain feature into the second label classifier, and output the corresponding target domain second predicted label;
[0071] In this embodiment, the network structure of the second label classifier is the same as that of the label classifier, and both are existing network structures.
[0072] S206: performing class-level alignment of the target domain level based on the target domain fault prediction label and the target domain second prediction label, and calculating the difference loss function of the target domain;
[0073] S207: Input the source domain features and the target domain features into the gradient reversal layer respectively to perform gradient reversal;
[0074] S208: Inputting the source domain features and the target domain features after gradient inversion into the domain discriminator for data differentiation, and calculating the adversarial loss function according to the data differentiation result;
[0075] S209: Calculate the total loss function based on the prediction loss function, the difference loss function of the target domain, and the adversarial loss function, and reversely optimize the model parameters;
[0076] S210: Repeat steps S201 to S209 to iteratively train the fault diagnosis model until the model converges or reaches a preset number of iterations;
[0077] S3: Outputting the fault prediction result as the fault diagnosis result of the gearbox data to be diagnosed.
[0078] The fault diagnosis model of the present invention performs feature extraction by improving the time-frequency transform network, wherein the improved time-frequency transform network combines the time-frequency feature network with the deep residual network and integrates the soft threshold noise reduction module. First, compared with the traditional convolutional neural network, the deep residual network has a stronger feature learning ability, especially when dealing with complex and deep features, it can effectively avoid the gradient vanishing and gradient explosion problems, thereby more accurately extracting fault features in the gearbox vibration signal. Secondly, the improved time-frequency transform network combines the interpretable time-frequency feature network with the deep residual network to improve the network depth, so that the network can learn deeper feature representations, which increases the interpretability and diagnostic accuracy of the adversarial transfer method. Finally, by improving the feature extraction capability and model generalization, the improved time-frequency transform network can better adapt to the needs of cross-operating gearbox fault diagnosis, thereby improving the accuracy and efficiency of gearbox fault diagnosis.
[0079] The present invention calculates the total loss function based on the prediction loss function, the difference loss function of the target domain and the adversarial loss function, and reversely optimizes the model parameters. First, by calculating the prediction loss function, the prediction performance of the model on the source domain data can be quantified, guiding the optimization of the model parameters, so that the model can achieve a higher diagnostic accuracy on known fault types. At the same time, the continuous reduction of the prediction loss function means that the degree of fit of the model to the source domain data is continuously improved, which in turn helps to enhance the stability and reliability of the model, ensure that the model has good diagnostic performance on the source domain data, and provide a solid foundation for cross-operating fault diagnosis. Secondly, the class-level alignment of the target domain level is introduced, two label classifiers are added, and Wasserstein distance is used to perform reliable abnormal target sample difference measurement. This measurement takes into account the properties of the underlying geometry of the probability space and can effectively detect abnormal target samples even when the distribution does not share support. At the same time, by introducing the second label classifier and making secondary predictions on the target domain data, the performance difference of the model in the target domain can be evaluated, and the model's adaptability to unknown or new working conditions can be enhanced. The calculation of the difference loss function helps the model to achieve effective knowledge transfer between the source domain and the target domain, reduce the degradation of diagnostic performance caused by working condition changes, and thus improve the generalization ability and accuracy of the model in cross-working condition gearbox fault diagnosis. Then, the combined use of the gradient reversal layer and the domain discriminator helps to achieve the alignment of the source domain and target domain features and reduce the differences between domains, thereby enhancing the diagnostic ability of the model under cross-working conditions. At the same time, through adversarial training, the model can learn more robust feature representations, reduce misjudgments caused by working condition changes or noise interference, and further enhance the adaptability and accuracy of the model in cross-working condition gearbox fault diagnosis. Finally, the total loss function comprehensively considers the model's prediction performance in the source domain, its adaptability in the target domain, and the degree of alignment between domains. The comprehensive optimization of the model can be achieved by reversely optimizing the model parameters. At the same time, the comprehensive optimization results enable the model to show higher accuracy and robustness in cross-operating gearbox fault diagnosis, thereby improving the performance of the model in cross-operating gearbox fault diagnosis.
[0080] The effectiveness and reliability of the IDANN proposed in this paper are verified on the Southeast University gearbox and straddle-type monorail gearbox datasets, and the performance of IDANN under noisy conditions is tested on the Case Western Reserve University bearing dataset. In addition, a comparative study was conducted with several commonly used and advanced methods. The results show that the proposed method has significant advantages in performance and can more effectively learn transferable discriminant features for accurate fault diagnosis. On the other hand, thanks to the interpretability of the network input, the credibility of the diagnosis results is improved.
[0081] In order to better introduce the technical solution of the present invention, this embodiment is described through the following parts.
[0082] 1. Improved Time-Frequency Transformation Network
[0083] In order to solve the application of neural networks in fault diagnosis scenarios with high reliability requirements, Chen et al. proposed a new interpretable neural network called Time-Frequency Network (TFN), which uses Convolutional Neural Network (CNN) with powerful feature extraction and classification capabilities as the basis to solve the problem of unclear CNN decision mechanism. The TFN model introduces physically interpretable time-frequency transformation as a trainable preprocessing layer and embeds it into the traditional convolutional layer, called the Time-Frequency Convolutional (TFconv) layer, whose kernel function is carefully designed to extract fault-related time-frequency information. The addition of the TFconv layer not only improves the performance of fault diagnosis, but also reveals the decision logic of the CNN model in the frequency domain view. By analyzing the frequency response of the trained TFconv layer, the attention of CNN to different frequencies can be obtained, and the frequencies with higher attention can easily pass through the TFconv layer and deeply participate in the prediction process. The effectiveness of the network is proved by experiments, and it can be concluded that the use of the TFconv layer can effectively improve the interpretability of the model.
[0084] Deep learning is a process of information extraction, which gradually extracts from the bottom-level features to highly abstract features. The more layers the network has, the richer the abstract features at different levels that can be extracted. In traditional neural networks, deep networks are constructed by stacking multiple layers. As the depth of the network increases, training becomes more difficult. One of the main problems is that gradient vanishing or gradient explosion may occur during the propagation of the gradient, resulting in the network failing to converge or being difficult to learn. In 2015, He et al. proposed the Deep Residual Networks (RES), which use residual connections to introduce direct cross-layer connections in the network. This connection can be achieved through skip connections, short-circuit connections, and the most typical form is to add the input directly to the output of a distant layer. This design changes the modeling method of traditional networks, making it easier for the network to learn identity mappings. The mathematical expression of the residual connection is H(x)=x+F(x), where F(x) represents the cross-layer mapping (the output of the residual block), which is obtained through learning. Such a design helps to retain the information of the previous layer, reduce the difficulty of gradient propagation, and make the network easier to train. The residual block is shown in the figure below. Figure 2 shown.
[0085] In order to deal with the problem that the basic convolutional neural network alone cannot achieve excellent diagnostic results for gearbox fault data running in real environments. This implementation replaces CNN with a deep residual network in the basic TFN, which not only retains the network's interpretability core TFconv, but also improves network performance. In addition, the performance of the network is improved when the data is interfered by noise by embedding a denoising algorithm, which is called the Improved Time-Frequency Network (ITFN). Figure 3 As shown in the figure, the improved time-frequency transformation network includes a time-frequency convolution layer, a convolution layer, a batch normalization layer, a Relu function, a maximum pooling layer, a residual connection layer, a soft threshold denoising layer, an average pooling layer and a fully connected layer, which are connected end to end in sequence.
[0086] The kernel function of the time-frequency convolution layer in the improved time-frequency transform network is a short-time Fourier transform function;
[0087] The formula is:
[0088]
[0089] Where: σ=0.52, n=[-(N c -1),…,(N c -1)]; f∈[0,0.5]; N c Indicates the number of channels of the time-frequency convolution layer.
[0090] Improve the soft threshold denoising layer in the time-frequency transform network to perform denoising through soft threshold. In order to alleviate the noise interference in the gearbox operating environment, the soft threshold method is selected for denoising. Compared with other methods, this method will not produce mutations at the threshold like hard threshold denoising, thereby reducing excessive damage to the signal; compared with adaptive threshold denoising, the parameter setting of this method is relatively easy, and no complex adaptive adjustment process is required. Soft threshold denoising can retain the main features of the signal to a certain extent and effectively remove noise by shrinking the wavelet coefficients. Its shrinkage function has continuity and smoothness, which makes the processed signal more stable and avoids the discontinuity problem that may occur in hard threshold denoising. Learning soft threshold parameters to suppress noise in the input signal can also improve the quality of the signal.
[0091] The formula of soft threshold is expressed as:
[0092] soft threshold(x,λ) =sign(x)·max(|x|-λ,0);
[0093] Where: x represents the input tensor, and λ represents the soft threshold parameter.
[0094] 2. Prediction Loss Function and Adversarial Loss
[0095] Adversarial transfer learning is a transfer learning method that incorporates the idea of adversarial training and uses a domain discriminator to reduce the difference in feature distribution between the source domain and the target domain produced by the feature extractor.
[0096] Domain-Adversarial Neural Networks (DANN) is a common method for adversarial transfer learning. It simultaneously trains feature extractors, domain discriminators that distinguish between source and target domains, and class predictors to align source and target distributions and reduce the distribution difference between the source and target domains, thereby improving the generalization performance of the model in the target domain. This can be achieved by introducing an adversarial loss function, which aims to make the features of the source and target domains more similar in a shared representation space. The loss function of DANN consists of prediction loss and adversarial loss (binary cross entropy loss).
[0097] Specific:
[0098] 1) Calculate the prediction loss function using the following formula:
[0099]
[0100] Where: represents the prediction loss; G f Denote the parameter as θ f Improved time-frequency transformation network; G c Denote the parameter as θ c The class predictor of Represents the i-th data sample in the source domain dataset; represents the true fault label corresponding to the i-th data sample in the source domain dataset; c represents all possible categories; C represents the total number of categories; D s Represents the source domain dataset; Express expectations.
[0101] 2) Calculate the adversarial loss function using the following formula:
[0102]
[0103] Where: Indicates the loss of resistance; G f Denote the parameter as θ f Improved time-frequency transformation network; G d Denote the parameter as θ d Domain discriminator of Represents the i-th data sample in the source domain dataset; represents the i-th data sample in the target domain dataset; D s represents the source domain dataset; Dt represents the target domain dataset; Express expectations.
[0104] 3. Difference Loss Function
[0105] In order to achieve high-precision fault transfer learning across working conditions, basic DANN alone is not enough. Therefore, the present invention uses a class-level alignment method to achieve more comprehensive domain adaptation. In the framework proposed in the present invention, two classifiers are used to classify the target domain data to achieve class-level domain alignment. Specifically, the two classifiers are used to detect target samples close to the decision boundary. Since the two classifiers may give different prediction results for target samples near the decision boundary, the difference between them can be used to detect samples in the target domain that exceed the support range of the source domain.
[0106] For these target samples that are beyond the support range of the source domain, the feature extractor is trained to minimize the difference between the two classifiers. The purpose of this is to aggregate the target features with the support features of the source domain to achieve class-level alignment. In this way, the target features generated by the feature extractor can be made closer to the support features of the source domain, thereby improving the class-level domain alignment effect.
[0107] The present invention uses Sliced Wasserstein Discrepancy (SWD) to measure the difference between two classifiers. It was originally used in the field of computer vision to capture the natural concept of dissimilarity between task-specific classifier outputs. It provides a geometric guide to detect target samples far from the source support and achieves efficient distribution alignment in an end-to-end trainable manner. The present invention uses discrete SWD as the loss function for target domain difference, and the formula is as follows:
[0108]
[0109] Where: SWD represents the calculated slice Wasserstein difference; represents the difference loss of the target domain; R θ represents the one-dimensional linear projection operation on the probability measure μ or v, μ and v represent the target domain fault prediction label and the target domain second prediction label output by the label classifier and the second label classifier respectively; θ represents the unified measure on the unit sphere in the data sample; α and β represent the arrangement of sorting the N one-dimensional linear projections of N data samples; M is the number of radial projections, generally θ is randomly sampled for M, and the square loss is taken for c.
[0110] The present invention introduces class-level alignment at the target domain level, adds two label classifiers and adopts Wasserstein distance for reliable abnormal target domain sample difference measurement, which takes into account the properties of the underlying geometry of the probability space and can effectively detect abnormal target samples even when the distributions do not share support.
[0111] 4. Total loss function
[0112] In this embodiment, the total loss function is calculated by the following formula:
[0113]
[0114] Where: represents the total loss; θ f ,θ c ,θ d They represent the parameters of the improved time-frequency transformation network, label classifier, and domain discriminator respectively; represents the predicted loss; It means fighting against loss; represents the difference loss of the target domain; λ DANN represents the weight of the adversarial loss.
[0115] 5. Experimental Description
[0116] In order to verify the effectiveness and excellence of the proposed method in the field of gearbox fault diagnosis, this experiment selected the Southeast University (SEU) gearbox dataset and the straddle-type monorail gearbox dataset as experimental objects, and selected the Case Western Reserve University (CWRU) bearing dataset to test the noise resistance performance of the proposed method. The experiment was implemented in PyTorch2.1.2 and Python3.9.5. In order to avoid the contingency of the test, we repeated each test 5 times in each experiment and compared the average values. The transfer learning methods such as Multiple Kernel Maximum Mean Discrepancy (MK-MMD), Joint Maximum Mean Discrepancy (JMMD), Correlation Alignment (CORAL) and original DANN were compared to verify the model performance. At the same time, different backbone networks were compared to prove the excellence of the model, including RES, WKN (Laplace Wavelet), TFN, and ITFN. To avoid the influence of other factors, all models use the Adam optimizer with an initial learning rate of 1e-3, a momentum parameter of 0.9, and a maximum number of iterations of 200.
[0117] 1. Comparative experiments and analysis based on SEU dataset
[0118] The proposed method is benchmarked on the SEU gearbox dataset (from Shao Siyu, McAleer Stephen, Yan Ruqiang, et al. Highly accurate machine fault diagnosis using deep transfer learning [J]. IEEE Transactions on Industrial Informatics, 2018, 15 (4): 2446-2455.). The SEU gearbox dataset is collected from a powertrain dynamic simulator.
[0119] The data set is mainly divided into a bearing data set and a gearbox data set. Each fault type corresponds to these two working conditions (speed 20 Hz (1200 rpm)-load 0 V (0 Nm) and speed 30 Hz (1800 rpm) load 2 V (7.32 Nm)). The data has a total of 8 channel signals. The present invention selects the vibration signal of the planetary gear in the x direction, and sets the labels of different bearing and gearbox fault types to 0-8 in sequence. The label correspondence is shown in Table 1 below.
[0120] In the SEU, the two working conditions with the rotation speed-load configuration set to 20Hz–0V and 30Hz–2V are regarded as different tasks, denoted as tasks 0 and 1, respectively. There are two transfer learning settings in total, 0-1 and 1-0. In the straddle-type monorail gearbox experiment, the two working conditions with the rotation speed-load configuration set to 2000RPM–375Nm and 2000RPM–501Nm are regarded as different tasks, denoted as tasks 2 and 3, respectively. The data was normalized, the input sample length was 1024, 80% of the total samples were taken as the training set of the source domain and the target domain, and 20% of the total samples were taken as the test set to avoid test leakage. All experimental data processing in this experiment is based on this standard.
[0121] Table 1 Bearing and gearbox fault types
[0122]
[0123]
[0124] Since the SEU dataset contains gear and bearing data and has many fault types, it is more complex than other data for testing fault diagnosis transfer learning performance. Therefore, the accuracy of the conventional model is not high (as shown in Table 2). However, IDANN has achieved excellent classification results on this dataset by combining a backbone network with time-frequency analysis function and an adversarial transfer method. The accuracy curve of the model (recording the best training accuracy) is shown in the figure below: Figure 4 and Figure 5 shown.
[0125] Table 2 Transfer learning model and IDANN accuracy
[0126]
[0127] For transfer learning, choosing a more effective backbone network is sometimes more useful than a more advanced algorithm. A powerful and suitable backbone can learn more transferable fault features. Table 3 shows the classification accuracy of the adversarial transfer learning model using different backbone networks in the SEU migration task. It is obvious that the model accuracy has been significantly improved after using a deep residual network with a more complex network structure. WKN, as an interpretable network, not only improves the accuracy but also adds interpretability to the model compared to the basic adversarial transfer network. However, as a residual network, the model performance has not been improved but has decreased, so it is not the method desired by the present invention. After embedding TFN into DANN, the model has been improved in two aspects. Therefore, IDANN, which has stronger model performance on this basis, is undoubtedly the most suitable fault diagnosis method.
[0128] Table 3 Classification accuracy of adversarial transfer learning models using different backbone networks in SEU transfer tasks
[0129]
[0130] Compared with DANN-TFN, IDANN improves the diagnostic accuracy by 2.2% in the 0-1 task and 3.52% in the 1-0 task. Figure 6 and Figure 7 As shown in the figure above, the results of IDANN and the results of DANN-TFN are shown below. In the confusion matrix, the Y axis represents the true label, the X axis represents the predicted label, and 0-9 represents different fault type labels. By comparing the two methods, it can be found that the proposed method is better than the other two, proving the effectiveness of more complex network and target domain matching methods.
[0131] 2. Noise experiments and analysis based on CWRU dataset
[0132] The CWRU dataset has been widely used for model performance testing in the field of fault diagnosis. It contains three types of sample data: rolling element faults, inner race faults, and outer race faults of bearings. However, due to the simple data components, the test effect on the model is not obvious enough. Therefore, a certain amount of noise is added based on the relatively clean CWRU data to simulate the actual working conditions. This experiment selects the cross-working condition migration task from 0 horsepower (1797RPM) to 3 horsepower (1730RPM), adds different noises with large working condition differences to verify the performance of the model, and selects domain adversarial networks with different backbone networks for comparison.
[0133] In real environments, noise is usually not generated by a single source, but is a combination of noise from many different sources. Assume that we regard real noise as the sum of many random variables with different probability distributions, and each random variable is independent. According to the central limit theorem, as the number of noise sources increases, their normalized sum approaches a Gaussian distribution. Therefore, the use of synthetic Gaussian noise is a simple and accurate approximate simulation method when dealing with such complex and unknown noise distributions. Therefore, different models will be tested for noise resistance under Gaussian noise and impact noise respectively. The Gaussian noise signal-to-noise ratios are -4dB, 0dB, and 4dB, respectively, and the signal-to-noise ratio formula is as follows:
[0134] SNR dB =101og 10 P signal / P noise ;
[0135] Where P signal is the original signal power, P noise is the noise power.
[0136] Table 4 shows the diagnostic accuracy of each model under different signal-to-noise ratio conditions based on adversarial transfer learning. The DANN using CNN and RES performs poorly because the information extracted by the model contains more noise. In contrast, the DANN embedded with ITFN (IDANN) can effectively filter noise and achieve good diagnostic results because it performs Laplace wavelet transform and short-time Fourier transform on the data at the network input stage. It can be seen that the model will not have a significant performance degradation due to noise interference, which verifies the robustness of IDANN.
[0137] Table 4 Test accuracy of IDANN and DANN with different backbone networks
[0138]
[0139] In industrial environments, impulse noise exists in the form of sudden pulses or spikes due to sudden interference caused by equipment failure, electrical interference or mechanical vibration of the gearbox. Impulse noise usually causes sudden and large fluctuations in the signal. In experiments, Gaussian noise can be multiplied by a randomly generated pulse sequence to simulate it. The specific formula is as follows:
[0140] N imp =S+N Guss *S i ;
[0141] Among them, the Gaussian noise with the same shape as the original signal is generated with a noise intensity of standard deviation 0.4, and the pulse sequence S i It is a random pulse sequence generated with a certain probability at each time point.
[0142] Table 5 shows the classification accuracy of different models under the influence of impact noise. It can be seen that the performance of each model will be different for different types of noise. DANN-CNN will perform better than DANN-RES in this case, while DANN-WKN performance is further reduced. This result shows that an overly complex network structure does not have an advantage in processing noise signals. However, although the IDANN proposed in the present invention uses a more complex residual structure, it has better diagnostic performance than DANN-TFN using a CNN structure, which proves the effectiveness of the model proposed in the present invention under the influence of impact noise.
[0143] Table 5 Classification accuracy of different models under the influence of impact noise
[0144]
[0145] 3. Data comparison experiment and analysis of straddle-type monorail gearbox
[0146] In order to further study the practicability of the model in industry, this experiment uses a gearbox dataset from a straddle-type monorail and conducts a migration experiment on the faults under different working conditions in the dataset to verify the IDANN effect.
[0147] The sensors of the experimental equipment are located in all directions of the gearbox housing and the connecting shaft. The sampling frequency is 10240Hz and the speed is 2000rpm. The experiment collected data in three states: assembly error, bearing inner ring failure and normal. Due to the influence of sensor errors, environmental interference and the instability of the system itself, the collected data will be affected by noise during the data collection process. In the experiment, the two working conditions of the rotation speed-load configuration set to 2000RPM-375Nm and 2000RPM-501Nm are regarded as different tasks, represented as tasks 2 and 3 respectively. The accuracy curve of the model (recording the best training accuracy) is shown in the figure. Figure 8 and Fig. 9 shown.
[0148] As can be seen from Table 6, the method proposed in the present invention has achieved the best test results in both tasks. The results in Table 7 show that the migration models after changing the backbone network are better than the basic migration models, which shows that the improvement direction proposed in the present invention is correct. On the other hand, the diagnostic accuracy of the time-frequency transformation network before and after the improvement is at least improved by 10%. This is because the two networks are pre-processed when the signal is input, and the model performance of the input fault signal and the noise fault signal is optimized. However, due to the limited fault types in this data set, the performance of the model cannot be fully reflected, but it can be found that the model already has strong applicability.
[0149] Table 6 Transfer learning model and IDANN accuracy
[0150]
[0151]
[0152] Table 7 Classification accuracy of adversarial transfer learning models using different backbone networks in the single-track gearbox transfer task
[0153]
[0154] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit the technical solution. Those skilled in the art should understand that those modifications or equivalent substitutions of the technical solution of the present invention that do not depart from the purpose and scope of the technical solution should be included in the scope of the claims of the present invention.
Claims
1. A gearbox fault diagnosis method based on IDANN across working conditions, characterized in that: include: S1: Acquire the gearbox data to be diagnosed; S2: Input the gearbox data into the trained fault diagnosis model and output the corresponding fault prediction results; The fault diagnosis model is constructed based on an improved domain adversarial neural network; The processing steps when training a fault diagnosis model include: S201: Obtain training sets of a source domain and a target domain as inputs of a fault diagnosis model; wherein the training set of the source domain includes data samples and corresponding real fault labels; and the training set of the target domain is unlabeled data samples; S202: extracting features from data samples in the source domain and the target domain by improving the time-frequency transform network to obtain source domain features and target domain features; The improved time-frequency transform network combines the time-frequency feature network and the deep residual network and integrates the soft threshold denoising module; S203: Input the source domain features and the target domain features into the label classifier respectively, and output the corresponding source domain fault prediction label and the target domain fault prediction label; S204: Calculating a prediction loss function based on the source domain fault prediction label and the corresponding true fault label; S205: Input the target domain feature into the second label classifier, and output the corresponding target domain second predicted label; S206: performing class-level alignment of the target domain level based on the target domain fault prediction label and the target domain second prediction label, and calculating the difference loss function of the target domain; S207: Input the source domain features and the target domain features into the gradient reversal layer respectively to perform gradient reversal; S208: Inputting the source domain features and the target domain features after gradient inversion into the domain discriminator for data differentiation, and calculating the adversarial loss function according to the data differentiation result; S209: Calculate the total loss function based on the prediction loss function, the difference loss function of the target domain, and the adversarial loss function, and reversely optimize the model parameters; S210: Repeat steps S201 to S209 to iteratively train the fault diagnosis model until the model converges or reaches a preset number of iterations; S3: Outputting the fault prediction result as the fault diagnosis result of the gearbox data to be diagnosed.
2. The cross-operating gearbox fault diagnosis method based on IDANN according to claim 1, characterized in that: In step S202, the improved time-frequency transformation network includes a time-frequency convolution layer, a convolution layer, a batch normalization layer, a ReLU function, a maximum pooling layer, a residual connection layer, a soft threshold denoising layer, an average pooling layer and a fully connected layer connected end to end in sequence.
3. The cross-operating gearbox fault diagnosis method based on IDANN according to claim 2, characterized in that: In step S202, the kernel function of the time-frequency convolution layer in the time-frequency transform network is improved to a short-time Fourier transform function; The formula is: Where: σ=0.52, n=[-(N c -1),…,(N c -1)]; f∈[0,0.5]; N c Indicates the number of channels of the time-frequency convolution layer.
4. The cross-operating gearbox fault diagnosis method based on IDANN according to claim 2, characterized in that: In step S202, the soft threshold denoising layer in the improved time-frequency transform network performs denoising through a soft threshold; The formula is: soft threshold(x,λ) =sign(x)·max(|x|-λ,0); Where: x represents the input tensor, and λ represents the soft threshold parameter.
5. The cross-operating gearbox fault diagnosis method based on IDANN according to claim 1, characterized in that: In step S204, the prediction loss function is calculated by the following formula: Where: represents the prediction loss; G f Denote the parameter as θ f Improved time-frequency transformation network; G c Denote the parameter as θ c The class predictor of Represents the i-th data sample in the source domain dataset; represents the true fault label corresponding to the i-th data sample in the source domain dataset; c represents all possible categories; C represents the total number of categories; D s Represents the source domain dataset; Express expectations.
6. The cross-operating gearbox fault diagnosis method based on IDANN according to claim 1, characterized in that: In step S206, the difference loss function of the target domain is calculated by the following formula: Where: SWD represents the calculated slice Wasserstein difference; represents the difference loss of the target domain; R θ represents the one-dimensional linear projection operation on the probability measure μ or v, μ and v represent the target domain fault prediction label and the target domain second prediction label output by the label classifier and the second label classifier respectively; θ represents the unified measure on the unit sphere in the data sample; α and β represent the arrangement of sorting the N one-dimensional linear projections of N data samples; M is the number of radial projections.
7. The cross-operating gearbox fault diagnosis method based on IDANN according to claim 1, characterized in that: In step S202, the adversarial loss function is calculated by the following formula: Where: Indicates the loss of resistance; G f Denote the parameter as θ f Improved time-frequency transformation network; G d Denote the parameter as θ d Domain discriminator of Represents the i-th data sample in the source domain dataset; represents the i-th data sample in the target domain dataset; D s represents the source domain dataset; D t represents the target domain dataset; Express expectations.
8. The cross-operating gearbox fault diagnosis method based on IDANN according to claim 1, characterized in that: In step S209, the total loss function is calculated by the following formula: Where: represents the total loss; θ f ,θ c ,θ d They represent the parameters of the improved time-frequency transformation network, label classifier, and domain discriminator respectively; represents the predicted loss; It means fighting against loss; represents the difference loss of the target domain; λ DANN represents the weight of the adversarial loss.
Citation Information
Cited By
Planetary gearbox fault diagnosis method based on graph convolution pulse residual network
CN120974347A
Gearbox fault diagnosis method based on domain adaptation and deep residual network
CN121365331A