An unsupervised domain adaptive device fault diagnosis method

Through wavelet-enhanced fuzzy Gaussian hybrid depth domain adaptive network, the problem of domain offset and high labeling costs between different machines is solved, efficient fault diagnosis in label-free scenarios is achieved, and the accuracy of fault detection is improved.

CN119884970BActive Publication Date: 2025-08-12UNIV OF SCI & TECH OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411936609.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-08-12
Estimated Expiration
2044-12-26

AI Technical Summary

Technical Problem

There is a domain offset problem between different machines and the cost of labeling data is high, so it is difficult for the prior art to effectively perform cross-domain fault diagnosis in label-free scenarios.

Method used

The fuzzy Gaussian hybrid depth domain adaptive network with wavelet enhancement is used to extract features through wavelet enhancement multi-scale transformer network and fuzzy Gaussian hybrid domain adaptive, and the features are extracted using wavelet packet decomposition, multi-scale convolution, band adaptive attention mechanism, Transformer encoder layer and feature fusion layer, and pseudo-labels are generated through adversarial training of the domain discriminator and feature extractor, and the weights are dynamically adjusted to achieve domain adaptive.

Benefits of technology

It improves the model's fault detection accuracy on the target domain, can process audio data from different machines, solves the domain offset problem, and reduces the labeling cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119884970B_ABST
    Figure CN119884970B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of cross-domain fault diagnosis, and discloses an unsupervised domain adaptive device fault diagnosis method, comprising: constructing a model of a fuzzy Gaussian mixture deep domain adaptive network based on wavelet enhancement; a wavelet enhanced multi-scale transformer network extracts features through wavelet packet decomposition, multi-scale convolution, a frequency band adaptive attention mechanism, a Transformer encoder layer, and a feature fusion layer; the fuzzy Gaussian mixture domain adaptation realizes domain adaptation through adversarial training of a domain discriminator and a feature extractor, generation of target domain pseudo-labels and confidences, calculation of fuzzy memberships based on a mixed Gaussian distribution, dynamic weighted adjustment of final weights, and alignment of edge distributions with conditional distributions; the present invention introduces a weighted strategy for calculating the fuzzy memberships of target samples and fusing them with pseudo-confidences, thereby being able to process audio data of different machines and realize more accurate classification and fault detection in the target domain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of cross-domain fault diagnosis, and in particular to an unsupervised domain adaptive device fault diagnosis method. Background Art

[0002] In modern industry and healthcare, real-time monitoring of machine health and predictive maintenance are crucial. This often involves analyzing the audio signals generated by a machine during operation to identify whether it is operating normally or experiencing a fault. However, due to differences in the operating environment, frequency of use, and model of each machine, the characteristics of the collected audio data can vary significantly. These differences can cause models trained on a single data source to perform poorly on new machines or environments, a problem known as domain shift. Furthermore, labeling large amounts of complex data often requires significant effort. Therefore, using transfer learning to address the domain shift problem between different machines in unlabeled scenarios has attracted widespread attention. Summary of the Invention

[0003] In order to solve the above technical problems, the present invention provides an unsupervised domain adaptive device fault diagnosis method.

[0004] In order to solve the above technical problems, the present invention adopts the following technical solutions:

[0005] An unsupervised domain adaptive device fault diagnosis method comprises the following steps:

[0006] Step 1: Collect audio signals from various machines in different health conditions. Label the audio signals of some machines with fault categories and use them as source domain samples. Use the unlabeled audio signals of other machines as target domain samples.

[0007] Step 2: Construct a model of a wavelet-enhanced fuzzy Gaussian mixture deep domain adaptation network, which includes a wavelet-enhanced multi-scale transformer network and a fuzzy Gaussian mixture domain adaptation; the wavelet-enhanced multi-scale transformer network extracts features through wavelet packet decomposition, multi-scale convolution, a frequency band adaptive attention mechanism, a Transformer encoder layer, and a feature fusion layer; the wavelet-enhanced multi-scale transformer network is used as a feature extractor, and the fuzzy Gaussian mixture domain adaptation realizes domain adaptation through adversarial training of domain discriminators and feature extractors, generation of target domain pseudo-labels and confidences, calculation of fuzzy membership based on mixed Gaussian distribution, dynamic weighted adjustment of final weights, and edge distribution alignment and conditional distribution alignment;

[0008] Step 3: Input source domain samples and target domain samples into the model, initialize the model parameters, and update the model parameters through the total loss function consisting of domain discriminator loss, label classifier loss, conditional distribution alignment loss, and marginal distribution alignment loss;

[0009] Step 4: Input the test audio signal into the trained model to obtain the fault category of the test audio signal.

[0010] Furthermore, step one specifically includes:

[0011] Collect audio signals from different machines under different health conditions, perform sampling and normalization preprocessing, and use the audio signals of one or more machines and the corresponding fault category labels as source domain samples to form a source domain dataset. in, represents the audio signal of the i-th source domain sample, express Fault category label, n s express The number of source domain samples in the target domain; the audio signals of other machines are used as target domain samples to form the target domain dataset in, represents the audio signal of the jth target domain sample, n t express The number of target domain samples in ; Due to the differences in the working environment and models of different machines, the probability distribution of source domain samples and the probability distribution of target domain samples satisfy:

[0012] Furthermore, the wavelet packet decomposition specifically includes

[0013] The audio signal input to the model is denoted as x∈R T×C , where T is the dimension of the time step and C is the number of channels of the audio signal. By performing multi-layer wavelet packet decomposition on the audio signal x, multiple frequency band features of different scales are output. If the number of wavelet packet layers is N, all frequency band features output by the wavelet packet decomposition are expressed as:

[0014] W scale =WPT(x),W scale ={W i,j |i=1,2,…,N;j=1,2,…,2 i};

[0015] Among them, W scaae Represents the frequency band features W of all levels i,j The collection of W i,j represents the frequency band characteristics of the j-th sub-band in the i-th layer, and the frequency band characteristics are composed of a series of specific frequency band coefficients; WPT(·) represents the wavelet packet decomposition operation;

[0016] The multi-scale convolution is performed by applying a convolution operation on the multi-scale frequency band features obtained by performing wavelet packet decomposition on the audio signal: N The frequency band features are divided into G groups according to the frequency range. Each group uses an independent convolution kernel sharing mechanism to maintain the uniqueness of each scale and process different frequency band features at the same time. For each frequency band feature W i,j , the output of the convolution operation is:

[0017] h i =σ(W g(i) *W i,j +b g(i) );

[0018] in, represents the convolution feature after the frequency band coefficient is processed by the convolution operation, T′ and C′ represent the time step and number of channels after convolution respectively, g(i) represents the group to which the i-th frequency band feature belongs, and W g(i) is the convolution kernel corresponding to g(i), b g(i) is the bias term corresponding to g(i), and σ is the activation function.

[0019] Furthermore, the band-adaptive attention mechanism uses a two-layer fully connected network to generate attention weights, and the learnable attention weights φ i The convolution feature h corresponding to each frequency band feature i Perform weighting to obtain weighted fusion features:

[0020] φ i =softmax(W2·ReLu(W1·h i +b1)+b2);

[0021] Among them, W1 and W2 represent the weights of the two-layer fully connected network, b1 and b2 are the bias terms corresponding to W1 and W2 respectively; φ i Represents the convolution feature h corresponding to the i-th frequency band feature i The attention weight of

[0022] Weighted fusion feature F MSWPC for:

[0023]

[0024] The Transformer encoder layer takes the weighted fusion features as input and uses the Transformer's self-attention mechanism to extract global context information; the Transformer's self-attention mechanism is:

[0025]

[0026] Among them, Q, K, V represent the query matrix, key matrix, and value matrix respectively, and the weighted fusion feature F MSwPC Linear transformation yields d k is the dimension of the key; after passing through the L-layer Transformer encoder, the global feature is output where d Trans is the number of output channels of Transformer. In order to ensure the dimension alignment during feature fusion, the output dimension of Transformer is adjusted to d through the linear layer. CNN :

[0027] F′ Trans =W align ·F Trans +b align ;

[0028] in, represents the alignment weight matrix, b align is the bias term, d CNN represents the adjusted output dimension, F′ Trans Represents the final global feature.

[0029] Furthermore, the feature fusion layer combines the weighted fusion features F MSWPC and global feature F′ Trans Perform weighted fusion to obtain the fusion feature F:

[0030] F=ωF MSWPC +(1-ω)F′ Trans +Conv1D(F input );

[0031] Among them, ω is the introduced adaptive fusion coefficient, F input ∈R T×C Represents the characteristics of the audio signal input to the model, and Conv1D represents a one-dimensional convolutional neural network.

[0032] Furthermore, the adversarial training of the domain discriminator and feature extractor specifically includes: And the audio signal of the target domain sample After inputting into the wavelet enhanced multi-scale transformer network, the source domain shared features are extracted respectively. Share features with the target domain The domain discriminator D receives the shared features from the feature extractor and performs domain classification on the corresponding audio signal. The fault category label of the audio signal of the source domain sample is set to 0, and the fault category label of the audio signal of the target domain sample is set to 1. The domain discriminator loss L DA for:

[0033]

[0034] Adversarial training is achieved through the gradient reversal mechanism, so that the fused feature F output by the feature fusion layer of the wavelet-enhanced multi-scale transformer network blurs the difference between the source domain and the target domain as much as possible. The optimization goal of F is to minimize the correctness of the domain discriminator, thereby ensuring the distribution alignment of F in the source domain and the target domain.

[0035] Furthermore, the generation of target domain pseudo labels and confidences specifically includes: using the label classifier G y Classify the audio signal of the source domain sample and use the cross entropy loss to calculate the label classifier loss L cls :

[0036]

[0037] in, is the predicted probability of the audio signal of the source domain sample by the label classifier. At the same time, using the trained label classifier G y Generate pseudo labels for the audio signal of target domain samples and maximum confidence

[0038]

[0039] in, is the label classifier for the sample The predicted probability of belonging to the kth fault class.

[0040] Furthermore, the fuzzy membership is calculated based on the mixed Gaussian distribution, specifically including: considering the source domain samples of each fault category in the source domain data set as an independent category component in the mixed Gaussian distribution, then the entire source domain data set is modeled as an overall mixed Gaussian distribution, and the fuzzy membership of each target domain sample is calculated through the category component, and the fuzzy membership reflects the uncertainty of the sample belonging to each fault category; assuming that there are K categories of source domain samples, then the overall mixed Gaussian distribution has K category components, and the kth fault category is regarded as a category component N(x|μ k ,∑ k ), the mean vector of the k-th category component is μ k , initialized by the center of K-Means clustering; the covariance matrix of the k-th category component is ∑ k ,∑ k It is a diagonal matrix, the initial value is the variance of each dimension; at the same time, a weight δ is assigned to each fault category k , the weights are initialized to the proportion of source domain samples for each fault category, namely:

[0041]

[0042] in, represents the number of source domain samples belonging to the kth fault category;

[0043] Introducing the boundary factor a:

[0044]

[0045] Then the boundary factor a is added to the calculation of the mixed Gaussian distribution, and the modified fuzzy membership calculation formula is:

[0046]

[0047]

[0048] in, represents the fuzzy membership of the target domain sample to the kth fault category, d represents the feature dimension of the sample, and λ∈[0,1] is an adjustable hyperparameter used to limit the contribution of the smoothness of a.

[0049] Furthermore, the dynamic weighting adjustment of the final weight specifically includes: adjusting the contribution of confidence and fuzzy membership during the training process through a dynamic weighting strategy; the dynamic weighting strategy gradually transitions the model from focusing on high-confidence samples to focusing more on fuzzy membership by changing the training round t′; the total number of current training rounds is T, and the dynamic weights of confidence and fuzzy membership are defined as:

[0050]

[0051] Among them, β conf is the confidence weight, which gradually decreases as the number of training rounds t increases; β fuzzy (t) is the weight of fuzzy membership, which gradually increases with the increase of training round t; the final weight after combining the dynamic weight for:

[0052]

[0053] Furthermore, the marginal distribution alignment and conditional distribution alignment specifically include: using the final weights to perform marginal distribution alignment and conditional distribution alignment on the samples of the source domain and the target domain respectively, and the conditional distribution alignment loss L based on the maximum mean difference metric C-MMD Defined as:

[0054]

[0055]

[0056] in, Represents the number of fault categories in the source domain and the target domain respectively, represents the final weight after normalization;

[0057] Integrating audio signals of target domain samples in marginal distribution alignment The final weight For the values of K fault categories, generate weighted target domain features

[0058]

[0059] Therefore, the marginal distribution alignment loss L based on the maximum mean difference metric MMD Defined as:

[0060]

[0061] In summary, the total loss function L of the fuzzy Gaussian mixture deep domain adaptive network model based on wavelet enhancement is total for:

[0062] L total =L cls +αL MMD +(1-α)L C-MMD +ηL DA ;

[0063] Among them, α and η are weight parameters respectively.

[0064] Compared with the prior art, the beneficial technical effects of the present invention are:

[0065] In response to the large domain offset between different machines and the difficulty in actually obtaining a large number of labeled samples for training, the present invention proposes a fuzzy Gaussian mixture domain adaptive fault diagnosis model based on wavelet enhancement. The wavelet enhanced multi-scale transformer network (WMT-Net) aims to improve the model's generalization ability for audio data from different machines by combining the multi-scale analysis of wavelet transform and the global context modeling capability of wavelet transformer. By introducing a weighted strategy for calculating the fuzzy membership of target samples and fusing it with pseudo-confidence, the proposed method can process audio data from different machines and achieve more accurate classification and fault detection in the target domain. This method provides an effective technical solution to the domain offset problem in practical applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Figure 1 Flowchart of a device fault diagnosis method in an embodiment of the present invention.

[0067] Figure 2Schematic diagram of a fuzzy Gaussian mixture depth domain adaptive network model based on wavelet enhancement in an embodiment of the present invention. DETAILED DESCRIPTION

[0068] A preferred embodiment of the present invention will be described in detail below with reference to the accompanying drawings.

[0069] The present invention proposes a deep unsupervised domain adaptive device fault diagnosis method based on wavelet enhancement and fuzzy Gaussian mixture, which is mainly divided into the following steps:

[0070] S1, data acquisition and processing;

[0071] S2, model building;

[0072] S3, model training;

[0073] S4, model testing.

[0074] Next, we will combine Figure 1 The specific implementation steps of the equipment fault diagnosis method of the present invention are described.

[0075] Step S1, data collection and processing:

[0076] First, the audio signals of different machines in different health conditions are collected through the data acquisition device, and sampling and normalization preprocessing are performed. The audio signals of a machine or multiple machines and the corresponding fault category labels are used as source domain samples for the initial training of the model. The source domain dataset in, represents the audio signal of the i-th source domain sample, express Fault category label, n s express In addition, the audio signals of other machines are used as target domain samples, and the target domain dataset in, represents the audio signal of the jth target domain sample, n t express The number of target domain samples in . Due to the differences in working environments and models of different machines, represent the probability distribution of source domain samples and target domain samples respectively.

[0077] Step S2, model building:

[0078] like Figure 2As shown in the figure, the wavelet-enhanced fuzzy Gaussian mixture deep domain adaptation network model (WMT-FGMDA) mainly includes two parts: wavelet-enhanced multi-scale transformer network (WMT-Net) and fuzzy Gaussian mixture domain adaptation (FGMDA).

[0079] Step 2.1, wavelet enhanced multi-scale transformer network:

[0080] (1) Wavelet packet decomposition: Assume that the input audio signal is x∈R T×C , where T is the dimension of the time step and C is the number of channels of the audio signal. By performing multi-layer wavelet packet decomposition on the input audio signal, multiple frequency band features of different scales are generated. Assuming the number of wavelet packet layers is N, all frequency band features output by the wavelet packet decomposition are expressed as:

[0081] W scale =WPT(x),W scale ={W i,j |i=1,2,…,N;j=1,2,…,2 i}; (1)

[0082] Among them, W scale Represents the frequency band features W of all levels i,j The collection of W i,j represents the frequency band characteristics of the j-th sub-band in the i-th layer, and the frequency band characteristics are composed of a series of specific frequency band coefficients; WPT(·) represents the wavelet packet decomposition operation.

[0083] (2) Multi-scale convolution: After performing wavelet packet decomposition on the signal, the convolution operation is applied to the multi-scale frequency band features to further extract the local time-frequency features. N The frequency band features are divided into G groups according to the frequency range (such as low frequency band, medium frequency band and high frequency band). Each group uses an independent convolution kernel sharing mechanism to maintain the uniqueness of each scale and process the features of different frequency bands at the same time. For each frequency band feature W i,j , the output of the convolutional layer is:

[0084] h i =σ(W g(i) *W i,j +b g(i) ); (2)

[0085] in, represents the convolution feature after the frequency band coefficient is processed by the convolution operation, T′ and C′ represent the time step and number of channels after convolution respectively, g(i) represents the group to which the i-th frequency band feature belongs, and W g(i) is the convolution kernel corresponding to g(i), b g(i)is the bias term corresponding to g(i), and σ is the activation function. By using this method, we can reduce the number of parameters and adapt to the characteristics of different frequency bands.

[0086] (3) Band-adaptive attention mechanism: The importance of features in different bands is different, and simple weighting may not automatically optimize the contribution of each band. Therefore, an adaptive attention mechanism is introduced to weight the features according to the importance of each band. A two-layer fully connected network (FCN) is used to generate attention weights. For each band feature h i , through a learnable attention weight φ i Weighted, that is:

[0087] φ i =softmax(W2·ReLU(W1·h i +b1)+b2); (3)

[0088] Among them, W1, W2 represent the weights of the two-layer fully connected network, b1, b2 are bias terms, and the weights of each frequency band are learned through training. i Represents the attention weight corresponding to the i-th frequency band feature, weighted fusion feature F MSWPC for:

[0089]

[0090] (4) Transformer encoder layer: Transformer can capture long-range dependencies and global information through the self-attention mechanism. By taking the weighted fusion features as input, the Transformer is used to further extract global context information. The self-attention calculation formula of Transformer is:

[0091]

[0092] Among them, Q, K, V represent query, key, and value matrices respectively, which can be obtained through F MSWPC Linear transformation yields d k is the dimension of the key. After passing through the L-layer Transformer encoder, the output is where d Trans is the number of output channels of the Transformer. To ensure dimensional alignment during feature fusion, the Transformer output dimension is adjusted to d through the linear layer. CNN :

[0093] F′ Trans =W align ·F Trans +b align ; (6)

[0094] in, represents the alignment weight matrix, b align is the bias term, d CNN Represents the adjusted output dimension to match the input dimension of the subsequent convolutional neural network (CNN layer).

[0095] (5) Feature fusion layer: Multi-scale convolution and Transformer encoder layers extract local features and global features respectively. Simple concatenation or weighting may not be able to fully combine the advantages of the two. In order to achieve more efficient feature fusion, weighted fusion is performed through residual connection and adaptive weighting strategy. MSWPC The final global features output by Transformer are weighted and fused. Considering that the two features may have different contributions in different tasks, the adaptive fusion coefficient ω is introduced, that is:

[0096] F=ωF MSWPC +(1-ω)F′ Trans +Conv1D(F input ); (7)

[0097] Among them, F input ∈R T×C Represents the original features of the input signal, as a residual connection, Conv1D represents 1D-CNN, for F input The size of the image is adjusted to help the network better retain low-level information.

[0098] Step 2.2, fuzzy Gaussian mixture domain adaptation:

[0099] (1) Adversarial training of domain discriminator and feature extractor: The wavelet-enhanced multi-scale transformer network is used as the feature extractor to train the audio signal of the source domain sample. And the audio signal of the target domain sample After inputting into the wavelet enhanced multi-scale transformer network, the source domain shared features are extracted respectively. Share features with the target domain The domain discriminator D receives the shared features from the feature extractor and performs domain classification on these samples. The fault category label of the audio signal of the source domain sample is set to 0, and the fault category label of the audio signal of the target domain sample is set to 1. The loss function of the domain discriminator is:

[0100]

[0101] Adversarial training is implemented through the gradient reversal mechanism (GRL), which makes F blur the difference between the source and target domains as much as possible. This mechanism makes the optimization goal of F minimize the correctness of the domain discriminator, thus ensuring that the distribution of F in the source and target domains is aligned.

[0102] (2) Generate target domain pseudo labels and confidence: Use the label classifier G y Classify the source domain label samples and use cross entropy loss to calculate the loss L of the label classifier cls ,Right now:

[0103]

[0104] in, is the predicted probability of the audio signal of the source domain sample by the label classifier. At the same time, using the trained label classifier G y Generate pseudo labels for the audio signal of target domain samples and maximum confidence

[0105]

[0106] in is the classifier for the sample The predicted probability of belonging to class k.

[0107] (3) Calculation of fuzzy membership based on mixed Gaussian distribution: All data of each fault category in the source domain are regarded as an independent component in the mixed Gaussian distribution (GMM), and the entire data set is modeled as a large GMM. The fuzzy membership of each target domain sample is calculated based on these category components, which reflects the uncertainty of the sample belonging to each fault category. Assuming that there are K fault categories in the source domain, the overall GMM has K components, and the kth fault category is regarded as a component N(x|μ k ,∑ k ), whose mean vector is μ k , initialized by the center of K-Means clustering, the covariance matrix is ∑ k , which is set as a diagonal matrix, and the initial value is the variance of each dimension. At the same time, a weight δ is assigned to each category k , which is usually initialized to the sample ratio of each category, that is:

[0108]

[0109] in, Indicates the number of samples of the kth category in the source domain.

[0110] In order to enable the model to further focus on samples with lower confidence, that is, samples at the classification boundary, and enhance its adaptability to target domain samples, a boundary factor a is introduced:

[0111]

[0112] Then add it to the calculation of the mixed Gaussian distribution, and the modified fuzzy membership calculation formula is:

[0113]

[0114]

[0115] in, represents the fuzzy membership of the target domain sample to category k, d represents the feature dimension of the input sample, and λ∈[0,1] is an adjustable hyperparameter used to limit the contribution of the smoothness of a.

[0116] (4) Dynamic weighting to adjust the final weight: In order to dynamically adjust the contribution of confidence and fuzzy membership during the training process, a dynamic weighting strategy is introduced. This strategy allows the model to gradually transition from focusing on high-confidence samples to focusing more on fuzzy membership through the change of training round t. Assuming that the total number of rounds of current training is t, the dynamic weights of confidence and fuzzy membership can be defined as:

[0117]

[0118] Among them, β conf is the confidence weight, which gradually decreases as the number of training rounds t increases; β fuzzy (t) is the weight of the fuzzy membership, which gradually increases with the increase of the training round t. In the early stage, the model pays more attention to samples with higher confidence, and in the later stage, it gradually increases its attention to the fuzzy membership to balance the contribution of high confidence samples and boundary samples.

[0119] The final weight formula after combining dynamic weights is:

[0120]

[0121] (5) Marginal distribution alignment and conditional distribution alignment: Use the fuzzy weighted weights to perform marginal distribution alignment and conditional distribution alignment on the samples of the source domain and target domain respectively. The loss function L of the conditional distribution alignment based on the MMD (maximum mean difference) measurement is C-MMD Defined as:

[0122]

[0123]

[0124] in, Represents the number of fault categories in the source domain and the target domain respectively, Represents the final weight after normalization.

[0125] Before edge distribution alignment, because the audio signal of the target domain sample The final weight of has a value for each of the K categories, so we first need to integrate the weights of these categories in the marginal distribution alignment, that is, to generate weighted target domain features according to these weights

[0126]

[0127] Therefore, the loss function L based on the marginal distribution alignment of MMD measurement is MMD Defined as:

[0128]

[0129] In summary, the total loss function of the wavelet-enhanced fuzzy Gaussian mixture deep domain adaptation network model (WMT-FGMDA) is:

[0130] L total =L cls +αL MMD +(1-α)L C-MMD +ηL DA ; (twenty one)

[0131] Among them, α and η are weight parameters, which improve the generalization ability of the model and the adaptability of the target domain by weighing the source domain supervision, edge alignment, conditional alignment and adversarial domain alignment.

[0132] Step S3, model training:

[0133] Step 1, parameter initialization: Input the source domain samples and target domain samples into the model to initialize the model parameters, including network weights, bias terms, etc.

[0134] Step 2, iterative training:

[0135] Domain discriminator loss: The domain discriminator loss is calculated through adversarial training according to formula (8), which encourages the feature extractor to learn domain-invariant features.

[0136] Label classifier loss: The label classifier loss is calculated using the fault category labels of the source domain samples according to formula (9).

[0137] Generate pseudo labels and confidence scores for target domain samples, and calculate fuzzy membership according to formula (12).

[0138] The weights of confidence and fuzzy membership are dynamically adjusted according to the training progress.

[0139] Conditional distribution alignment loss: The conditional distribution alignment loss is calculated using the maximum mean difference metric according to formula (17) and formula (18).

[0140] Marginal distribution alignment loss: The marginal distribution alignment loss is calculated using the maximum mean difference metric according to formula (19) and formula (20).

[0141] Total loss optimization: Calculate the total loss function of the model according to formula (21) and update the model parameters to minimize the total loss function.

[0142] Step 3, parameter update: Use gradient descent or other optimization algorithms to update model parameters according to the calculated gradients.

[0143] Step 4, model evaluation: Evaluate the performance of the model on the validation set and adjust the model parameters or structure as needed.

[0144] Step S4, model testing:

[0145] Using source domain datasets and target domain dataset After the model is trained, based on the test set Evaluate the model using relevant metrics such as precision, recall, F1 score, etc.

[0146] This paper focuses on solving the domain offset problem caused by fault diagnosis between different machines in real-world scenarios. The proposed method mainly consists of two parts: a multi-scale feature transformer network based on wavelet enhancement and domain adaptation based on fuzzy mixed Gaussian. Multi-scale wavelet packet decomposition (MS-WPT) can extract the local characteristics of the signal in different frequency ranges, which helps to capture the detailed changes in the signal. The convolutional network is good at extracting local features of the signal, while the Transformer module can capture global dependencies through the attention mechanism. By combining the two, the characteristics of the signal can be more comprehensively modeled in the feature space. At the same time, the use of a weighted fusion strategy provides a flexible way to allow the model to adjust the contribution of local and global features according to specific tasks, which greatly improves the model's feature extraction ability for complex signals in real-world scenarios.

[0147] The method based on fuzzy Gaussian mixture model for domain adaptation (FGMDA) proposed in this paper is an innovative domain adaptation strategy that combines probabilistic modeling, fuzzy logic and pseudo-label generation. The FGMDA method models the source domain category distribution based on the Gaussian mixture model (GMM). By combining fuzzy membership and pseudo-label confidence, it generates dynamic weights that reflect sample uncertainty, thereby improving the model's alignment ability on the target domain. It uses weights to guide the alignment of edge and conditional distributions, avoiding the bias of traditional hard label methods and enhancing the model's adaptability to boundary samples. At the same time, the FGMDA method provides fine-grained category distribution modeling capabilities, which can take into account high-confidence samples and boundary fuzzy samples, effectively improving the classification performance on the target domain. The fuzzy membership enhances the robustness of the model. The weight generation mechanism not only balances the impact of pseudo-label noise, but also has a certain generalization ability, making it suitable for tasks with complex distribution or imbalanced data.

[0148] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above and that the invention can be embodied in other specific forms without departing from the spirit or essential characteristics of the invention. Therefore, the embodiments should be considered in all respects as illustrative and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. It is intended that all variations within the meaning and range of equivalents of the claims be embraced herein, and any reference signs in the claims should not be construed as limiting the claims to which they relate.

[0149] In addition, it should be understood that although this specification is described in terms of implementation methods, not every implementation method contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment can also be appropriately combined to form other implementation methods that can be understood by those skilled in the art.

Claims

1. An unsupervised domain adaptive device fault diagnosis method, characterized in that: The following steps are involved: Step 1: Collect audio signals from various machines in different health conditions. Label the audio signals of some machines with fault categories and use them as source domain samples. Use the unlabeled audio signals of other machines as target domain samples. Step 2: constructing a model of a wavelet-enhanced fuzzy Gaussian mixture deep domain adaptive network, wherein the model includes a wavelet-enhanced multi-scale transformer network and a fuzzy Gaussian mixture domain adaptive network; The wavelet-enhanced multi-scale transformer network extracts features through wavelet packet decomposition, multi-scale convolution, frequency-band adaptive attention mechanism, Transformer encoder layer and feature fusion layer; Using a wavelet-enhanced multi-scale transformer network as a feature extractor, fuzzy Gaussian mixture domain adaptation achieves domain adaptation through adversarial training of the domain discriminator and feature extractor, generating pseudo labels and confidence scores for the target domain, calculating fuzzy membership based on the mixed Gaussian distribution, dynamically adjusting the final weight, and aligning the marginal distribution with the conditional distribution. Step 3: Input source domain samples and target domain samples into the model, initialize the model parameters, and update the model parameters through the total loss function consisting of domain discriminator loss, label classifier loss, conditional distribution alignment loss, and marginal distribution alignment loss; Step 4: Input the test audio signal into the trained model to obtain the fault category of the test audio signal; The wavelet packet decomposition specifically includes: The audio signal input to the model is denoted as x∈R T×C , where T is the dimension of the time step and C is the number of channels of the audio signal. By performing multi-layer wavelet packet decomposition on the audio signal x, multiple frequency band features of different scales are output. If the number of wavelet packet layers is N, all frequency band features output by the wavelet packet decomposition are expressed as: W scale =WPT(x),W scale ={W i,j |i=1,2,…,N;j=1,2,…,2 i }; Among them, W scale Represents the frequency band features W of all levels i,j The collection of W i,j represents the frequency band characteristics of the j-th sub-band in the i-th layer, and the frequency band characteristics are composed of a series of specific frequency band coefficients; WPT(·) represents the wavelet packet decomposition operation; The multi-scale convolution is performed by applying a convolution operation on the multi-scale frequency band features obtained by performing wavelet packet decomposition on the audio signal: N The frequency band features are divided into G groups according to the frequency range. Each group uses an independent convolution kernel sharing mechanism to maintain the uniqueness of each scale and process different frequency band features at the same time. For each frequency band feature W i,j , the output of the convolution operation is: h i =σ(W g(i) *W i,j +b g(i) ); in, represents the convolution feature after the frequency band coefficient is processed by the convolution operation, T′ and C′ represent the time step and number of channels after convolution respectively, g(i) represents the group to which the i-th frequency band feature belongs, and W g(i) is the convolution kernel corresponding to g(i), b g(i) is the bias term corresponding to g(i), σ is the activation function; The proposed band-adaptive attention mechanism uses a two-layer fully connected network to generate attention weights, through the learnable attention weight φ i The convolution feature h corresponding to each frequency band feature i Perform weighting to obtain weighted fusion features: φ i =softmax(W2·ReLU(W1·h i +b1)+b2); Among them, W1 and W2 represent the weights of the two-layer fully connected network, b1 and b2 are the bias terms corresponding to W1 and W2 respectively; φ i Represents the convolution feature h corresponding to the i-th frequency band feature i The attention weight of Weighted fusion feature F MSWPC for: The Transformer encoder layer takes the weighted fusion features as input and uses the Transformer's self-attention mechanism to extract global context information; the Transformer's self-attention mechanism is: Among them, Q, K, V represent the query matrix, key matrix, and value matrix respectively, and the weighted fusion feature F MSWPC Linear transformation yields d k is the dimension of the key; after passing through the L-layer Transformer encoder, the global feature is output where d Trans is the number of output channels of Transformer. In order to ensure the dimension alignment during feature fusion, the output dimension of Transformer is adjusted to d through the linear layer. CNN : F′ Trans =W align ·F Trans +b align ; in, represents the alignment weight matrix, b align is the bias term, d CNN represents the adjusted output dimension, F′ Trans Represents the final global feature.

2. The unsupervised domain adaptive device fault diagnosis method according to claim 1, characterized in that: Step 1 specifically includes: Collect audio signals from different machines under different health conditions, perform sampling and normalization preprocessing, and use the audio signals of one or more machines and the corresponding fault category labels as source domain samples to form a source domain dataset. in, represents the audio signal of the i-th source domain sample, express Fault category label, n s express The number of source domain samples in the target domain; the audio signals of other machines are used as target domain samples to form the target domain dataset in, represents the audio signal of the jth target domain sample, n t express The number of target domain samples in ; Due to the differences in the working environment and models of different machines, the probability distribution of source domain samples and the probability distribution of target domain samples satisfy:

3. The unsupervised domain adaptive device fault diagnosis method according to claim 1, characterized in that: The feature fusion layer combines the weighted fusion features F through residual connection and adaptive weighting strategy. MSWPC and global feature F′ Trans Perform weighted fusion to obtain the fusion feature F: F=ωF MSWPC +(1-ω)F′ Trans +Conv1D(F input ); Among them, ω is the introduced adaptive fusion coefficient, F input ∈R T×C Represents the characteristics of the audio signal input to the model, and Conv1D represents a one-dimensional convolutional neural network.

4. The unsupervised domain adaptive device fault diagnosis method according to claim 2, characterized in that: The adversarial training of the domain discriminator and feature extractor specifically includes: transforming the audio signal of the source domain sample And the audio signal of the target domain sample After inputting into the wavelet enhanced multi-scale transformer network, the source domain shared features are extracted respectively. Share features with the target domain The domain discriminator D receives the shared features from the feature extractor and performs domain classification on the corresponding audio signal. The fault category label of the audio signal of the source domain sample is set to 0, and the fault category label of the audio signal of the target domain sample is set to 1. The domain discriminator loss L DA for: Adversarial training is achieved through the gradient reversal mechanism, so that the fused feature F output by the feature fusion layer of the wavelet-enhanced multi-scale transformer network blurs the difference between the source domain and the target domain as much as possible. The optimization goal of F is to minimize the correctness of the domain discriminator, thereby ensuring the distribution alignment of F in the source domain and the target domain.

5. The unsupervised domain adaptive device fault diagnosis method according to claim 4, characterized in that: The generation of target domain pseudo labels and confidences specifically includes: using the label classifier G y Classify the audio signal of the source domain sample and use the cross entropy loss to calculate the label classifier loss L cls : in, is the predicted probability of the audio signal of the source domain sample by the label classifier. At the same time, using the trained label classifier G y Generate pseudo labels for the audio signal of target domain samples and maximum confidence in, is the label classifier for the sample The predicted probability of belonging to the kth fault class.

6. The unsupervised domain adaptive device fault diagnosis method according to claim 5, characterized in that: The fuzzy membership calculation based on the mixed Gaussian distribution specifically includes: treating the source domain samples of each fault category in the source domain data set as an independent category component in the mixed Gaussian distribution, then the entire source domain data set is modeled as an overall mixed Gaussian distribution, and calculating the fuzzy membership of each target domain sample through the category component, and the fuzzy membership reflects the uncertainty of the sample belonging to each fault category; assuming that there are K categories of source domain samples, then the overall mixed Gaussian distribution has K category components, and the kth fault category is regarded as a category component N(x|μ k ,∑ k ), the mean vector of the k-th category component is μ k , initialized by the center of K-Means clustering; the covariance matrix of the k-th category component is ∑ k ,∑ k It is a diagonal matrix, the initial value is the variance of each dimension; at the same time, a weight δ is assigned to each fault category k , the weights are initialized to the proportion of source domain samples for each fault category, namely: in, represents the number of source domain samples belonging to the kth fault category; Introducing the boundary factor a: Then the boundary factor a is added to the calculation of the mixed Gaussian distribution, and the modified fuzzy membership calculation formula is: in, represents the fuzzy membership of the target domain sample to the kth fault category, d represents the feature dimension of the sample, and λ∈[0,1] is an adjustable hyperparameter used to limit the contribution of the smoothness of a.

7. The unsupervised domain adaptive device fault diagnosis method according to claim 6, characterized in that: The dynamic weighting adjustment of the final weight specifically includes: adjusting the contribution of confidence and fuzzy membership during the training process through a dynamic weighting strategy; the dynamic weighting strategy gradually transitions the model from focusing on high-confidence samples to focusing more on fuzzy membership by changing the training round t′; the total number of training rounds is T, and the dynamic weights of confidence and fuzzy membership are defined as: Among them, β conf is the confidence weight, which gradually decreases as the number of training rounds t increases; β fuzzy (t) is the weight of fuzzy membership, which gradually increases with the increase of training round t; the final weight after combining the dynamic weight for:

8. The unsupervised domain adaptive device fault diagnosis method according to claim 7, characterized in that: The marginal distribution alignment and conditional distribution alignment specifically include: using the final weights to perform marginal distribution alignment and conditional distribution alignment on samples in the source domain and target domain respectively, and the conditional distribution alignment loss L based on the maximum mean difference metric C-MMD Defined as: in, Represents the number of fault categories in the source domain and the target domain respectively, represents the final weight after normalization; Integrating audio signals of target domain samples in marginal distribution alignment The final weight For the values of K fault categories, generate weighted target domain features Therefore, the marginal distribution alignment loss L based on the maximum mean difference metric MMD Defined as: In summary, the total loss function L of the fuzzy Gaussian mixture deep domain adaptive network model based on wavelet enhancement is total for: L total =L cls +αL MMD +(1-α)L C-MMD +ηL DA ; Among them, α and η are weight parameters respectively.

Citation Information

Patent Citations

  • Power battery pack series connection fault diagnosis method

    CN107843853A

  • Variable working condition small sample fault diagnosis method and device based on information fusion element transfer learning, medium and product

    CN118013289A