Rotary machinery fault diagnosis method based on residual capsule domain adaptive network
By combining a multi-scale nested residual feature extractor and a capsule domain adaptor, the accuracy and generalization issues of cross-domain fault diagnosis of rotating machinery in harsh environments are solved, and reliable fault assessment under variable operating conditions is achieved.
Patent Information
- Application Number
- CN202510604699.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-12
- Publication Date
- 2025-09-05
AI Technical Summary
Existing cross-domain fault diagnosis methods are difficult to adapt to the dynamic changes of non-stationary signals in harsh environments and lack generalization, resulting in insufficient fault diagnosis accuracy under variable working conditions.
A residual capsule domain adaptation network is adopted, through a multi-scale nested residual feature extractor, a capsule domain adaptor and a capsule fault state classifier, combined with a gradient reversal layer, a capsule coupling layer and a feature distribution difference metric, to achieve multi-scale alignment of source and target domain features and fault discrimination.
It improves the fault diagnosis accuracy and generalization ability of rotating machinery under variable operating conditions, and can effectively evaluate the health status in the absence of labeled data.
Smart Images

Figure CN120597081A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of rotating machinery fault diagnosis, and in particular relates to a rotating machinery fault diagnosis method based on a residual capsule domain adaptive network. Background Art
[0002] Rotating machinery often operates in complex and challenging industrial environments. The collected vibration signals not only exhibit nonstationary characteristics, but also, when faced with new or extreme operating conditions, may involve never-before-seen patterns or harsh environments. Labeled fault data is often difficult to collect. This lack of labeled data directly impacts the training and adaptability of diagnostic models, especially when the models need to be generalized to unseen operating conditions, where performance can be significantly limited. Therefore, in practical applications, it is necessary to develop fault diagnosis methods that can adapt to nonstationary signals, multiple operating conditions, and possess a certain degree of generalization capability. This allows for effective assessment of the health status of rotating machinery even when labeled data is limited or even absent. Deep learning algorithms often assume that training and test data follow the same probability distribution and rely on a large amount of labeled fault data. Consequently, they have been widely used in the field of fault diagnosis. However, when actual working conditions change, the new conditions may be unprecedented or extremely severe, making it difficult to collect sufficient labeled data from these conditions for training and learning. Moreover, existing deep learning often lacks strong generalization. Since the characteristic distribution of the changed working conditions is significantly different from the original working conditions, the network trained under a certain working condition cannot be generalized to other working conditions. This means that diagnosis must be performed under exactly the same conditions as the training process, further limiting the application of deep learning methods.
[0003] In recent years, domain adaptation methods, combining the advantages of deep learning and transfer learning, have been widely applied in the field of rotating machinery fault diagnosis. They not only use deep learning to mine domain-invariant features to reduce the difference in feature distributions between the source and target domains, achieving domain alignment, but also leverage knowledge learned from the source domain to solve new but related tasks in the target domain, addressing the problem of training reliable models using scarce labeled data in the target domain. These methods are primarily categorized into difference metric-based and adversarial-based methods. Difference metric-based methods minimize the difference between the source and target domain feature distributions by defining a quantitative metric that measures the difference in inter-domain distributions, thereby enabling cross-domain knowledge transfer. Adversarial-based methods, by incorporating the idea of generative adversarial networks (GANs), employ an adversarial training mechanism to render the feature representations of the source and target domains indistinguishable within the same domain. These methods employ a domain discriminator to distinguish between source and target domains. The feature extractor optimizes the domain discriminator while minimizing the loss of the fault state classifier. This optimization aims to ensure that the discriminator cannot distinguish between source and target domain features, thus promoting feature alignment between the source and target domains. Adversarial-based methods are widely used for rotating machinery fault diagnosis under variable load or speed conditions. However, existing domain adaptation methods, when applied to vibration signals in harsh environments, often ignore the dynamic changes in the signals due to their non-stationary characteristics. This neglect significantly reduces the accuracy of fault diagnosis under varying operating conditions. Furthermore, both difference metric-based and adversarial-based methods focus on domain adaptation at a specific angle and fail to fully align features across domains. This limitation can lead to insufficient feature transfer under complex operating conditions, making it difficult for the network to fully and holistically capture feature correlations across different operating conditions, further limiting its generalization ability for cross-domain fault diagnosis in practical applications.
[0004] In summary, existing cross-domain fault diagnosis methods still have problems such as being difficult to adapt to harsh environments and only focusing on domain adaptation at specific angles. Therefore, a rotating machinery variable operating condition fault diagnosis method with strong adaptability and generalization is needed. Summary of the Invention
[0005] This paper proposes a rotating machinery fault diagnosis method based on a residual capsule domain adaptive network (RCDAN). The residual capsule domain adaptive network (RCDAN) consists of three parts: a multi-scale nested residual feature extractor, a capsule domain adaptor, and a capsule fault state classifier. First, labeled source domain data and unlabeled target domain data are input into the network. Four residual blocks (NRMs) with different-sized convolution kernels are used to extract fault features of different resolutions. The features extracted by each residual block are then concat-integrated and encoded along the channel before being input into the gradient-based capsule coupling layer 0. The gradient-based capsule coupling layer can utilize the weight-sharing posture change matrix and the trainable coupling coefficient of gradient descent to learn the spatial information of the fault discrimination features. The gradient-based capsule coupling layer accelerates network convergence and improves computational efficiency. Then, a capsule domain adaptor, consisting of a capsule domain discriminator and a feature distribution difference metric, aligns the multi-scale feature spaces of the source and target domains. The capsule domain discriminator consists of a gradient reversal layer, a gradient-based capsule coupling layer 1, and a length calculation. Adversarial training maximizes the capsule domain discrimination loss, allowing the multi-scale nested residual feature extractor to learn domain-invariant fault features. The capsule feature distribution difference metric achieves feature distribution alignment between the source and target domains by minimizing the multi-kernel maximum mean difference (MK-MMD) statistical distribution metric on the gradient-based capsule coupling layer 0. The capsule fault state classifier, consisting of a gradient-based capsule coupling layer 2 and a length calculation, calculates the length of each output capsule of the gradient-based capsule coupling layer 2. The class corresponding to the capsule with the largest length is the final fault diagnosis result.
[0006] To solve the above technical problems, the present invention provides the following technical solution: a rotating machinery fault diagnosis method based on a residual capsule domain adaptive network. The method includes: a multi-scale nested residual feature extractor, a capsule domain adaptor, and a capsule fault state classifier; the output data of the multi-scale nested residual feature extractor serves as the input data of the capsule domain adaptor and the capsule fault state classifier respectively; the capsule domain adaptor includes: a capsule domain discriminator and a feature distribution difference metric;
[0007] The cross-domain fault diagnosis method for rotating machinery includes the following steps:
[0008] Step 1: Input the labeled source domain data and the unlabeled target domain data into the multi-scale nested residual feature extractor to extract fault features of different resolutions;
[0009] Step 2: The fault features extracted in step 1 are integrated using Concat, and the encoding is expanded along the channel and input into the gradient-based capsule coupling layer 0. The spatial information of the fault discrimination features is learned using the weight-sharing posture change matrix and the trainable coupling coefficient optimized by gradient descent.
[0010] Step 3: Use the capsule domain adaptor to align the source and target domain features of the multi-scale spatial information of the fault discrimination features obtained in step 2. Maximize the capsule domain discrimination loss through adversarial training, and achieve feature distribution alignment between the source and target domains by minimizing the MK-MMD statistical distribution indicator.
[0011] Step 4: Calculate the length of each output capsule through the capsule fault state classifier. The category corresponding to the capsule with the largest length is the final fault diagnosis result.
[0012] In step 1, four convolution kernels of different sizes are nested in residual blocks NRM to extract fault features of different resolutions. The input and output relationship of the nested residual block NRM is:
[0013]
[0014] Where w i represents the weight matrix of the i-th convolutional layer, f(·) represents the convolution operation, n in Represents the input of the module, n mid represents the output of the second convolutional layer, n out Represents the output of the fourth convolutional layer, that is, the final output of the nested residual block NRM.
[0015] In step 1, features of different resolutions are extracted from the same input vibration signal by nesting residual blocks NRM, and then the features of the four branches are fused to obtain multi-scale features, which are input into the gradient-based capsule coupling layer 0 to extract their spatial information; the convolution kernel sizes of the nested residual blocks NRM are set to 3×1, 5×1, 7×1, and 9×1, respectively. Each nested residual block NRM uses four convolution layers, and the size and number of kernels in each layer are the same.
[0016] In step 2, the j-th capsule is further compressed and activated as follows:
[0017] s j =Squashing(s′ j ) (3)
[0018]
[0019] Where s j represents the j-th capsule of the output, Squashing(·) represents the nonlinear activation function, s′ j Express The j-th capsule obtained by weighted summation, a ij represents the coupling coefficient, Represents the prediction vector obtained by affine transformation.
[0020] In step 3, the capsule domain discrimination loss is maximized by the capsule domain discriminator. In the capsule domain discrimination loss maximization, the probability of each type of domain discrimination label is compared as follows:
[0021]
[0022] Where y DC represents the final domain discrimination result, argmax(·) represents the maximum probability of existence of each type of domain label, represents the j-th domain discrimination label, M represents the total number of domain discrimination labels, represents the feature output after capsule layer processing, The feature representing the gradient reversal, represents the capsule of the ith multi-scale fault feature fusion, Represents a trainable parameter.
[0023] Preferably, in step 3, the feature distribution alignment between the source domain and the target domain is achieved by minimizing the MK-MMD statistical distribution index and measuring the difference in capsule feature distribution. The distance of feature distribution alignment is:
[0024]
[0025] Where, Indicates the calculation of the Hilbert space distance, k represents the weighted sum of multiple different kernels, and D represents the feature alignment distance between the source domain and the target domain in the gradient-based capsule coupling layer 0, which is the target distance that needs to be optimized in the end. represents the feature distribution of the capsule layer with source domain data output, Represents the feature distribution of the capsule layer with target domain data output.
[0026] In step 4, the probability of each type of fault state is:
[0027]
[0028] Where y FSC Indicates that the final cross-domain fault diagnosis result can be obtained, N represents the number of fault status classifications, Represents the classification label of the j-th type of fault state.
[0029] The residual capsule domain adaptation network includes three optimization objectives: minimizing the capsule fault state classification loss of the source domain data, maximizing the capsule domain discrimination loss of the source and target domain data, and minimizing the MK-MMD distance between the source and target domain data at the gradient-based capsule coupling layer 0 of the feature extractor.
[0030] The joint loss function of the residual capsule domain adaptation network is:
[0031] L RCDAN =L FSC -αL DC +βL MK-MMD (11)
[0032]
[0033] Where, L FSC Indicates edge loss, L DC represents the domain discrimination loss, L MK-MMD represents the MK-MMD alignment feature distribution, α and β represent L DC and L MK-MMD The weight coefficient of ; N represents the number of fault state classifications, Indicates the output value of the output capsule after L2 norm is calculated. represents the true label value of the fault state, λ represents the weighted penalty factor of the missing category loss, and m + and m - Represent the upper and lower bounds of the predicted value respectively; M represents the total number of domain discrimination labels, Indicates the output value of the output capsule after L2 norm is calculated. represents the true domain label value of the fault sample, q + and q - Respectively The upper and lower bounds of p s represents the number of samples from the source domain, p t represents the number of samples from the target domain, represents the output of the gradient-based capsule coupling layer 0 of the source domain data, represents the output of the gradient-based capsule coupling layer 0 of the target domain data, and K represents the Gaussian kernel parameter.
[0034] The beneficial effects of the present invention are:
[0035] 1. The present invention captures and integrates fault discrimination features of different resolutions by building a multi-scale nested residual feature extractor, introduces a Reshape layer for capsule encoding, and feeds the capsule encoding into a gradient-based capsule coupling layer to learn the spatial information of its features. Therefore, the present invention solves the problem of low cross-domain fault diagnosis accuracy caused by uneven feature probability distribution and lack of labeled data under variable working conditions.
[0036] 2. This paper reduces the feature distribution difference between the source and target domains. It not only maximizes the capsule domain discrimination loss through adversarial training, but also introduces a multi-core maximum mean difference statistical distribution indicator on the same gradient-based capsule coupling layer in the source and target domains to align the feature spaces of the two domains, effectively improving the generalization ability of the network in the target domain.
[0037] 3. This paper constructs a capsule fault state classifier that includes a gradient-based capsule coupling layer module. This classifier stabilizes the convergence process when two capsule layers are stacked, thereby improving computational efficiency. The classifier minimizes marginal loss to provide more reliable cross-domain fault diagnosis under varying operating conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 1 is an architecture diagram of a rotating machinery fault diagnosis method based on a residual capsule domain adaptive network according to the present invention;
[0039] Figure 2 It is the traditional residual block graph of the prior art;
[0040] Figure 3 is the nested residual block graph of the present invention;
[0041] Figure 4 is a gradient-based capsule coupling layer graph of the present invention;
[0042] Figure 5 : is the transformation matrix diagram of the present invention, (a) is the original transformation matrix; (b) is the weight sharing transformation matrix;
[0043] Figure 6 is a multi-scale nested residual feature extractor diagram of the present invention;
[0044] Figure 7 This is a flow chart of fault diagnosis under variable working conditions of the present invention;
[0045] Figure 8 This is a diagram of a bearing test platform of the present invention;
[0046] Figure 9 This is a diagram of the diagnostic results of 12 migration tasks of the PU dataset of the present invention;
[0047] Figure 10 These are the confusion matrix diagrams of various methods under the 2-0 migration task of the present invention; (a) CORAL; (b) MK-MMD; (c) DANN; (d) DCTLN; (e) SSCNN; (f) RCDAN. DETAILED DESCRIPTION
[0048] The following will provide a clear and complete description of the relevant technologies in the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0049] like Figures 1 to 10As shown in FIG, the rotating machinery fault diagnosis method based on the residual capsule domain adaptive network of this embodiment, wherein the residual capsule domain adaptive network RCDAN consists of three parts:
[0050] 1. Multi-scale nested residual feature extractor
[0051] (1) Nested residual blocks
[0052] Due to its unique structure of identity mapping, residual networks are used in the field of fault diagnosis and have shown significantly better classification performance than traditional convolutional neural networks. Assuming that the identity mapping spans only one convolutional layer, the state of the hidden layer of the residual block is n and the depth is l, then the state of the hidden layer changes as the depth increases as follows:
[0053] n i+1 =f(n i ,w i )+n i ,1≤i≤l-1 (1)
[0054] Where w i is the weight matrix of the i-th convolutional layer, n i is the state of the i-th layer, and f(·) is the convolution operation. Figure 2 It is a traditional residual block with two identity mappings, and each identity mapping spans two convolutional layers. Therefore, the input and output relationship of this module is as follows
[0055] n mid =f(n in ,w i )+n in (2)
[0056] n out =f(n mid ,w i )+n mid (3)
[0057] Where n in is the input of the module, n mid is the output of the second convolutional layer, n out is the output of the fourth convolutional layer, which is also the final output of this module. When the network gradient is backpropagated, the loss can be directly transferred to the shallower layers through the identity mapping, so that the classification accuracy does not decrease as the network deepens, alleviating the problem of network degradation.
[0058] The nested residual block NRM is different from the traditional residual block, such as Figure 3, also composed of four convolutional layers, contains an identical identity mapping between input and output. When using the identity mapping to access the intermediate state of the hidden layer, y is compressed in half, and a second identity mapping is applied directly from the original input position. Therefore, the input and output relationship of this module is as follows:
[0059]
[0060]
[0061] Where w i is the weight matrix of the i-th convolutional layer, f(·) is the convolution operation, n in is the input of the module, n mid is the output of the second convolutional layer, n out is the output of the fourth convolutional layer, which is also the final output of the module.
[0062] (2) Gradient-based capsule coupling layer
[0063] In order to improve the computational efficiency and generalization of the network, a gradient-based capsule coupling layer module is designed. This module uses the weight-sharing posture transformation matrix and the trainable coupling coefficient to learn the spatial information in the fault discrimination features during the error back propagation process, thereby accelerating the stable convergence of the network. The specific process is as follows: Figure 4 .
[0064] First, the fused multi-scale features are encoded by changing the tensor shape using the Reshape operation to obtain the encoded i-th capsule Since the input and output of the capsule layer are both capsule vectors, the gradient-based capsule coupling layer 1 and the gradient-based capsule coupling layer 2 do not require capsule encoding. The encoded capsules are affine transformed using a weight-sharing transformation matrix, which contains the spatial posture information transformation of the input capsule to the output capsule. Figure 5 (a) The weight sharing transformation matrix is different from the original transformation matrix. Assuming that i and j are the number of input and output capsules of the capsule layer respectively, the number of matrices that can be trained by the original transformation matrix is i×j, while the number of matrices that can be trained by the weight sharing transformation matrix is j. This greatly reduces the number of trainable parameters and improves the generalization performance of the network. Two different transformation matrices are used to perform affine transformation on the encoded capsules, as follows
[0065]
[0066] Then, the prediction vector obtained by affine transformation is The coupling coefficient can match the input local fault information with the output global fault information. The prediction vector corresponding to the input capsule that has an important contribution to the output capsule will be given a larger coupling coefficient. Figure 5 As shown in (b), the gradient-based capsule coupling layer proposed by the present invention sets the coupling coefficient as a network parameter that can be trained with gradient descent, stabilizing the overall training process and solving the problems of slow network training and difficulty in converging when multiple capsule layers are superimposed, caused by traditional dynamic routing algorithms.
[0067]
[0068] Where s′ j Yes The j-th capsule obtained by weighted summation, a ij is the coupling coefficient, which indicates the importance of the i-th low-level capsule to the j-th high-level capsule, and satisfies ∑ j a ij = 1. Unlike the coupling coefficient of traditional dynamic routing iterative updates, which can be unstable and even difficult to converge when facing complex signals, it is set as a learnable parameter and trained during the back propagation of the gradient, which enhances stability and facilitates the superposition of multiple capsule layers to extract more discriminative fault features. is the prediction vector obtained by affine transformation.
[0069] Finally, the obtained j-th capsule is further compressed and activated as follows:
[0070] s j =Squashing(s′ j ) (9)
[0071] Where Squashing(·) is a nonlinear activation function that compresses the length of the capsule to the range [0,1] without changing its direction, and s j It is the j-th capsule of the output, whose length is between [0,1] and represents the probability of a certain fault existing.
[0072] (3) Multi-scale nested residual feature extractor
[0073] like Figure 6, which is the working mechanism of the multi-scale nested residual feature extractor. Four nested residual blocks (NRMs) with different convolution kernels are used to extract features of different resolutions from the same input vibration signal. Finally, the features of the four branches are fused to obtain multi-scale features and input into the gradient-based capsule coupling layer 0 to extract their spatial information. The convolution kernel sizes of the different nested residual blocks are set to 3×1, 5×1, 7×1, and 9×1, respectively. Each residual block uses four convolution layers, and the kernel size and number of kernels in each layer are the same. The stride of each convolution layer is equal to 1, which keeps the shape of the input data unchanged. Finally, the features extracted by the four NRMs are fused through the concat operation and expanded along the channel. Then, they are encoded and input into the gradient-based capsule coupling layer 0 to obtain capsule features containing information at each scale.
[0074] 2. Capsule Domain Adaptor
[0075] The capsule domain adaptor consists of two parts: a capsule domain discriminator and a capsule feature distribution difference metric. The capsule domain discriminator maximizes the domain discrimination loss through adversarial training, while the feature distribution difference metric uses the MK-MMD statistical distribution indicator to minimize and extract more feature space information associations between the source and target domains. This achieves comprehensive fault feature distribution alignment and effectively improves the generalization performance of fault diagnosis under variable network conditions, such as Figure 1 .
[0076] The capsule domain discriminator consists of a gradient reversal layer, a gradient-based capsule coupling layer 1, and a length calculation. The i-th multi-scale fault feature fusion capsule First, it passes through a special gradient reversal layer, then passes through the gradient-based capsule coupling layer 1 to align the feature space information of the two domains, and finally performs domain discrimination. The input features are trained with parameters The capsule layer is as follows:
[0077]
[0078] Where, The feature representing the gradient reversal, Represents the feature output after the capsule layer is processed. The output capsule is calculated by L2 norm to obtain the length of the capsule and obtain the j-th category domain discrimination label. Indicates the probability of the existence of the domain. Finally, compare the probability of each type of domain discrimination label, as follows
[0079]
[0080] In the formula, argmax(·) represents the maximum probability of existence of each type of domain label, M represents the total number of domain discrimination labels, and is generally set to 2, indicating that the input data is divided into two domains, y DC Represents the final domain discrimination result.
[0081] The capsule feature distribution difference metric uses MK-MMD to align the feature space on the gradient-based capsule coupling layer 0. Assume that the gradient-based capsule coupling layer 0 has the capsule layer feature distribution of the source domain data output as The feature distribution of the capsule layer with target domain data output is This paper uses MK-MMD to calculate the distance between the feature distributions of the capsule layer as follows:
[0082]
[0083] Where, Indicates the calculation of the Hilbert space distance, k represents the weighted sum of multiple different kernels, and D represents the feature alignment distance between the source domain and the target domain in the gradient-based capsule coupling layer 0, which is the target distance that needs to be optimized in the end.
[0084] 3. Capsule Fault State Classifier
[0085] The capsule fault state classifier includes a gradient-based capsule coupling layer 2 and length calculation. The gradient-based capsule coupling layer 2 is described above, and the length of the output capsule is calculated by the L2 norm, but this time the j-th fault state classification label is obtained. Indicates the probability of the existence of this type of fault, and then compares the probabilities of various fault states as follows:
[0086]
[0087] In the formula, N represents the number of fault state classifications. By finding the maximum probability of existence of each type of fault state label, the final cross-domain fault diagnosis result y can be obtained. FSC .
[0088] 4. Network optimization
[0089] The proposed residual capsule domain adaptation network has three optimization objectives: (1) minimizing the capsule fault state classification loss of the source domain data; (2) maximizing the capsule domain discrimination loss between the source and target domain data; and (3) minimizing the MK-MMD distance between the source and target domain data at the gradient-based capsule coupling layer 0 of the feature extractor.
[0090] The first optimization object is based on the labeled source domain data, and the fault state classification loss is minimized through supervised learning. Here, the edge loss L is used. FSC To reduce the intra-class distance and expand the inter-class distance, as follows
[0091]
[0092] Where N represents the number of fault status categories, It represents the output value after the L2 norm of the output capsule is obtained. The true label value representing the fault state, Indicates that the input source domain sample belongs to the nth category, otherwise λ represents the weighted penalty factor for missing class loss, m + and m - They represent the upper and lower bounds of the predicted value, and their values are 0.5, 0.9, and 0.1 respectively.
[0093] The second optimization object is based on the source domain and target domain data, and the domain discrimination loss L is used to distinguish the input data through the edge loss. DC as follows:
[0094]
[0095] Where M represents the total number of domain discrimination labels, It represents the output value after the L2 norm of the output capsule is obtained. Represents the true domain label value of the fault sample. If the input sample belongs to the mth domain, then otherwise λ represents the weighted penalty factor for missing category loss, which is 0.5; here q + and q - Respectively The upper and lower bounds of the m-th domain discrimination label prediction value are in q + and q - Its value is also between 0.9 and 0.1.
[0096] The third optimization object is based on the source domain and target domain data, and MK-MMD is used to align the feature distribution in the gradient-based capsule coupling layer 0, L MK-MMD The specific expressions are as follows
[0097]
[0098] In the formula, the kernel function uses Gaussian kernel, and the constraint on parameter K is represents the output of the gradient-based capsule coupling layer 0 of the source domain data, represents the output of the gradient-based capsule coupling layer 0 of the target domain data, p s represents the number of samples from the source domain, p t Indicates the number of samples from the target domain.
[0099] Combining these three optimization objects, the joint loss function of the entire network can be expressed as follows:
[0100] L RCDAN =L FSC -αL DC+βL MK-MMD (19)
[0101] Where α and β are L DC and L MK-MMD The weight coefficients of and jointly determine the strength of capsule domain adaptation.
[0102] Implementation Process
[0103] 1. Overall process of cross-domain fault diagnosis
[0104] The residual capsule domain adaptive network proposed in the present invention simultaneously utilizes the capsule domain discriminator and the distribution difference metric to align the multi-scale feature space, extract domain-invariant information, and realize reliable fault diagnosis under varying working conditions.
[0105] like Figure 7 ,The process of using the residual capsule domain adaptive ,network for cross-domain fault diagnosis of rotating machinery under ,variable working conditions can be divided into three stages: data preprocessing, ,network training and network testing.
[0106] (1) Data preprocessing: In this stage, the vibration signals collected under various working conditions are divided into source domain and target domain, and then normalized. The training dataset is then composed of labeled source domain samples and unlabeled target domain samples, while the test dataset contains unlabeled target domain samples.
[0107] (2) Network training: In this stage, the training dataset is input into the network based on the constructed residual capsule domain adaptation network, and the network parameters are learned through error back propagation using a joint loss function composed of three optimization objectives;
[0108] (3) Network testing: After training, a network consisting of a multi-scale nested residual feature extractor and a capsule fault state classifier is used to diagnose the test sample set to evaluate the generalization and applicability of the residual capsule domain adaptive network in cross-domain fault diagnosis under variable working conditions.
[0109] 2. Experimental Setup
[0110] The Adam optimizer with a learning rate of 0.001 is used to update the learning network parameters, and the loss function is L RCDAN =L FSC -αL DC +βL MK-MMDThe batch size is set to 128, and all experiments are repeated five times, with the average value taken as the final diagnostic accuracy. To verify the reliability of the residual capsule domain adaptation network for variable working condition fault diagnosis, the correlation alignment domain adaptation CORAL, multi-core maximum mean difference MK-MMD, domain adversarial neural network DANN, deep convolutional transfer learning network DCTLN, and single-scale CNN feature extraction transfer network SSCNN are selected for comparison and evaluated on the PU bearing fault dataset of Paderborn University in Germany.
[0111] 3. Description of the PU bearing dataset of Paderborn University, Germany
[0112] The test platform of PU dataset is as follows Figure 8 The PU dataset consists of health status data under four operating conditions. To verify the network's diagnostic performance under variable operating conditions of rotating machinery, 12 transfer learning experiments were conducted under the four operating conditions. 0-1 represents the migration task where the source domain dataset is in operating condition 0 and the target domain dataset is in operating condition 1.
[0113] 4. Analysis of fault diagnosis results under variable working conditions
[0114] In order to verify the performance of the residual capsule domain adaptive network in cross-domain fault diagnosis under variable working conditions, five networks are compared under each group of migration tasks. Figure 9 It is obvious that the diagnostic results of the proposed network under each group of transfer tasks are higher than those of other networks. The details are shown in Table 1. The average accuracy of the proposed network under the three transfer tasks is 81.39%, which is higher than that of other networks. However, since the transfer tasks related to working condition 1 all involve changes in the speed of the drive system, the proposed network has difficulty adapting to the transfer of these tasks, resulting in a certain degree of reduction in the average accuracy. In summary, although the performance of the proposed network is relatively weak in some transfer tasks, its overall generalization is stronger than that of other networks, indicating that the residual capsule domain adaptive network has good adaptability and superiority for fault diagnosis under variable working conditions.
[0115] In order to further verify the generalization of the residual capsule domain adaptation network, the confusion matrix of the fault diagnosis results is visualized under the 2-0 migration task, as shown in Figure 10 The vertical axis represents the actual fault category, and the horizontal axis represents the predicted fault category, which intuitively shows the diagnosis of various fault conditions. The diagnostic accuracy of the PU dataset under variable working conditions is shown in Table 1:
[0116] Table 1
[0117]
[0118] It can be observed that for outer-ring faults labeled 1 and inner-ring faults labeled 4, the performance of other networks is limited, while the proposed network still performs well. This is because the residual capsule domain adaptation network uses a multi-scale nested residual feature extractor, which is superior to the typical single-scale CNN. It also extracts fault domain-invariant features through adversarial training and feature distribution difference measurement. This feature has reliable domain discrimination and improves the performance of the network's cross-domain fault diagnosis.
[0119] In summary, the present invention first builds a multi-scale nested residual feature extractor to capture and integrate fault discrimination features of different resolutions. Then, a Reshape layer is introduced to perform capsule encoding and input into a gradient-based capsule coupling layer to learn the spatial information of its features. Secondly, the present invention designs a capsule domain adaptor based on a domain discriminator and a feature distribution difference metric to reduce the difference in feature distribution between the source domain and the target domain. The adaptor maximizes the capsule domain discrimination loss through adversarial training and introduces a multi-core maximum mean difference statistical distribution indicator on the same gradient-based capsule coupling layer in the source and target domains to align the feature spaces of the two domains, thereby effectively improving the generalization ability of the network in the target domain. Finally, the present invention constructs a capsule fault state classifier, which contains a gradient-based capsule coupling layer that can converge stably and improve computational efficiency when two capsule layers are superimposed. The classifier achieves more reliable cross-domain fault diagnosis under variable working conditions by minimizing edge loss. Therefore, the present invention solves the problem of low cross-domain fault diagnosis accuracy caused by uneven feature probability distribution and lack of labeled data under variable working conditions.
[0120] It should be emphasized that the above are only preferred embodiments of the present invention and do not limit the present invention in any form. Any simple modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention are still within the scope of the technical solution of the present invention.
Claims
1. Rotating machinery fault diagnosis method based on residual capsule domain adaptive network, characterized by Residual Capsule Domain Adaptation Network (RCDAN); the residual capsule domain adaptation network includes: a multi-scale nested residual feature extractor, a capsule domain adaptor, and a capsule fault state classifier; the output data of the multi-scale nested residual feature extractor is used as input data of the capsule domain adaptor and the capsule fault state classifier respectively; the capsule domain adaptor includes: a capsule domain discriminator and a feature distribution difference metric; The rotating machinery cross-domain fault diagnosis method comprises the following steps: Step 1: Input the labeled source domain data and the unlabeled target domain data into the multi-scale nested residual feature extractor to extract fault features of different resolutions; Step 2: The fault features extracted in step 1 are integrated using Concat, and the encoding is expanded along the channel and then input into the gradient-based capsule coupling layer 0. The spatial information of the fault discrimination features is learned using the weight-sharing posture change matrix and the trainable coupling coefficient optimized by gradient descent. Step 3: Use the capsule domain adaptor to align the source and target domain features of the multi-scale spatial information of the fault discrimination features obtained in step 2. Maximize the capsule domain discrimination loss through adversarial training, and achieve feature distribution alignment between the source and target domains by minimizing the multi-kernel maximum mean difference (MK-MMD) statistical distribution indicator. Step 4: Calculate the length of each output capsule through the capsule fault state classifier. The category corresponding to the capsule with the largest length is the final fault diagnosis result.
2. The rotating machinery fault diagnosis method based on residual capsule domain adaptive network according to claim 1 is characterized in that: In step 1, fault features of different resolutions are extracted through four nested residual blocks NRM with convolution kernels of different sizes; the input and output relationship of the nested residual block NRM is: Where w i represents the weight matrix of the i-th convolutional layer, f(·) represents the convolution operation, n in Represents the input of the module, n mid represents the output of the second convolutional layer, n out Represents the output of the fourth convolutional layer.
3. The rotating machinery fault diagnosis method based on residual capsule domain adaptive network according to claim 2 is characterized in that: In step 1, features of different resolutions are extracted from the same input vibration signal through the nested residual block NRM, and then the features of the four branches are fused to obtain multi-scale features, and the multi-scale features are input into the gradient-based capsule coupling layer 0 to extract their spatial information; the convolution kernel sizes of the nested residual block NRM are set to 3×1, 5×1, 7×1, and 9×1, respectively, and each nested residual block NRM adopts four convolution layers, and the size and number of kernels in each layer are the same.
4. The rotating machinery fault diagnosis method based on residual capsule domain adaptive network according to claim 1 is characterized in that: In step 2, the j-th capsule is further compressed and activated as follows: Where s j represents the j-th capsule of the output, Squashing(·) represents the nonlinear activation function, s′ j Express The j-th capsule obtained by weighted summation, a ij represents the coupling coefficient, Represents the prediction vector obtained by affine transformation.
5. The rotating machinery fault diagnosis method based on residual capsule domain adaptive network according to claim 1, characterized in that: In step 3, the capsule domain discrimination loss is maximized by the capsule domain discriminator. In the capsule domain discrimination loss maximization, the probability of existence of each type of domain discrimination label is compared as follows: Where y DC represents the final domain discrimination result, argmax(·) represents the maximum probability of existence of each type of domain label, represents the j-th domain discrimination label, M represents the total number of domain discrimination labels, represents the feature output after capsule layer processing, The feature representing the gradient reversal, represents the capsule of the ith multi-scale fault feature fusion, Represents a trainable parameter.
6. The rotating machinery fault diagnosis method based on residual capsule domain adaptive network according to claim 1, characterized in that: In step 3, the feature distribution alignment of the source domain and the target domain is achieved by minimizing the MK-MMD statistical distribution index. The alignment process is completed by measuring the difference in capsule feature distribution. The distance of the feature distribution alignment is: Where, Indicates the calculation of Hilbert space distance, k represents the weighted sum of multiple different kernels, D represents the feature alignment distance between the source domain and the target domain in the gradient-based capsule coupling layer 0, represents the feature distribution of the capsule layer with source domain data output, Represents the feature distribution of the capsule layer with target domain data output.
7. The rotating machinery fault diagnosis method based on residual capsule domain adaptive network according to claim 1 is characterized in that: In step 4, the probability of each type of fault state is: Where y FSC Indicates that the final cross-domain fault diagnosis result can be obtained, N represents the number of fault status classifications, Represents the classification label of the j-th type of fault state.
8. The rotating machinery fault diagnosis method based on residual capsule domain adaptive network according to claim 1, characterized in that: The residual capsule domain adaptation network includes three optimization objectives: minimizing the capsule fault state classification loss of the source domain data, maximizing the capsule domain discrimination loss of the source and target domain data, and minimizing the MK-MMD distance between the source and target domain data at the gradient-based capsule coupling layer 0 of the feature extractor.
9. The rotating machinery fault diagnosis method based on residual capsule domain adaptive network according to claim 8, characterized in that: The joint loss function of the residual capsule domain adaptation network is: Where, L FSC Indicates edge loss, L DC represents the domain discrimination loss, L MK-MMD represents the MK-MMD alignment feature distribution, α and β represent L DC and L MK-MMD The weight coefficient of ; N represents the number of fault state classifications, It represents the output value after the L2 norm of the output capsule is obtained. represents the true label value of the fault state, λ represents the weighted penalty factor of the missing category loss, and m + and m - Represent the upper and lower bounds of the predicted value respectively; M represents the total number of domain discrimination labels, It represents the output value after the L2 norm of the output capsule is obtained. represents the true domain label value of the fault sample, q + and q - Respectively The upper and lower bounds of p s represents the number of samples from the source domain, p t represents the number of samples from the target domain, represents the output of the gradient-based capsule coupling layer 0 of the source domain data, represents the output of the gradient-based capsule coupling layer 0 of the target domain data, and K represents the Gaussian kernel parameter.
Citation Information
Cited By
Rotating machine fault diagnosis method and system based on Gaussian boundary constraint network
CN120890673A