Generalized zero sample composite fault diagnosis method, device and system based on anti-factual reasoning

Through a generalized zero-sample composite fault diagnosis method based on counterfactual reasoning, fault characteristics are decoupled and counterfactual characteristics are generated, combined with causal theory and supervised learning, the problems of low accuracy and poor interpretability in composite fault diagnosis are solved, and a high-precision single and composite fault diagnosis is achieved.

CN120448953AActive Publication Date: 2025-08-08HEFEI GENERAL MACHINERY RES INST +1

Patent Information

Application Number
CN202510287310.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-12
Publication Date
2025-08-08
Estimated Expiration
2045-03-12

AI Technical Summary

Technical Problem

The existing composite fault diagnosis model has low accuracy and lacks explanatory ability when identifying composite faults. The reason is that the causal relationship and the accuracy of single fault recognition is higher than that of composite faults. The composite fault characteristics generated by the existing methods tend toward a single fault distribution.

Method used

A generalized zero-sample composite fault diagnosis method based on counterfactual reasoning is adopted, and a structural causal model is constructed by generating adversarial network decoupling fault characteristics combined with causal theory, and a traditional zero-sample learning and supervised learning method are used to diagnose single and composite faults respectively.

Benefits of technology

The diagnostic accuracy of the model on visible and invisible classes is improved, the classification accuracy of single faults and composite faults is balanced, the interpretability and accuracy of the model is enhanced, and the equipment maintenance cost is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120448953A_ABST
    Figure CN120448953A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of fault prediction and computer big data processing, in particular to a generalized zero sample composite fault diagnosis method, device and system based on anti-fact reasoning. According to the generalized zero sample composite fault diagnosis method based on the anti-fact reasoning, a two-stage generalized zero sample composite fault diagnosis model based on the anti-fact reasoning is constructed. According to the model, internal causal components of fault data are pointed out from the angle of causal theory, and then a structural causal model is constructed to describe decoupling and generation of fault features under the guidance of anti-factual reasoning. On the basis, a generative model is improved through a reinforced discriminator in the first stage so as to realize binary classification of a single fault and a composite fault. In the second stage, a single fault category is predicted through supervised training of a classifier, and meanwhile, a traditional zero sample learning method is designed to classify composite faults. According to the method, the diagnosis precision of the model is greatly improved, and the problem of deviation of model diagnosis on visible classes and invisible classes is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of fault prediction and computer big data processing, and in particular to a generalized zero-sample compound fault diagnosis method, device and system based on counterfactual reasoning. Background Art

[0002] Bearings are core components in complex industrial systems, and their failures can shorten equipment life, impact industrial production, and even cause major safety incidents. Therefore, timely diagnosis and repair of bearing damage is key to ensuring the normal operation of mechanical equipment. Compound faults refer to the simultaneous occurrence of multiple single faults within a bearing, resulting in highly coupled characteristics of compound faults that are difficult to identify. Therefore, compound fault diagnosis has always been a difficult problem in bearing fault diagnosis. In learning-based fault diagnosis methods, due to the exponential growth of compound fault patterns, it is unrealistic to collect all types of compound fault samples for model training. However, in actual industrial scenarios, bearing faults include both single and compound faults. This requires the diagnostic system to be able to train the model using relatively easy-to-obtain single fault samples, so that the model can effectively identify both single and compound faults simultaneously. This is a major challenge in the field of compound fault diagnosis.

[0003] The recent boom in zero-shot learning technology has become a powerful tool for addressing these issues. Zero-shot learning is a new machine learning approach that effectively addresses data scarcity. Its basic idea is to leverage data from some seen categories, aided by prior knowledge of unseen categories (i.e., the semantic properties of the category labels), to train a learning model to classify the unseen categories. Therefore, a zero-shot learning-based fault diagnosis approach requires only single faults (i.e., seen categories) as training data, supplemented by prior semantics of compound faults (i.e., unseen categories). Ultimately, the model can be transferred to the diagnosis of compound faults.

[0004] The application of zero-shot learning in the field of complex fault diagnosis is just beginning. Its main types include attribute-based zero-shot learning, embedding-based zero-shot learning, and generative model-based zero-shot learning. Attribute-based zero-shot learning methods allow an attribute classifier to learn the mapping between single faults and attributes. The attribute classifier is then used to infer the category of complex faults based on the attributes predicted by the Bayesian formula. Embedding-based zero-shot learning methods use multiple training functions to fit the mapping between samples and attributes, thereby obtaining a prediction model that can transfer from single faults to complex faults. Generative model-based zero-shot learning methods, while obtaining prior semantics, combine noise to generate complex fault samples for classifier training, transforming zero-shot learning into traditional supervised learning. Furthermore, for the complex fault diagnosis task of generalized zero-shot learning, our previous work has incorporated the prior semantics constructed by the semantic-feature embedding module into a contrastive embedding generative adversarial network to generate pseudo-complex fault samples. These pseudo-complex fault samples are then used to train the adaptive smoothing module with single fault samples, enabling it to predict the categories of both single and complex faults.

[0005] However, the above composite fault diagnosis method based on zero-shot learning still has the following two problems that need to be improved:

[0006] 1) Existing composite fault diagnosis models all learn the correlation between the original vibration signal and the fault category label, but ignore the causal relationship, which may lead to statistical correlation but does not conform to the objective causal law, so the model lacks interpretability.

[0007] 2) Existing methods sometimes have higher single fault recognition accuracy than compound faults. This is because the model lacks compound fault samples and generates compound fault features based solely on prior compound fault semantics, causing their distribution to skew toward the known single fault data distribution, affecting the final compound fault classification accuracy. Summary of the Invention

[0008] In order to overcome the defect of low accuracy of the composite fault diagnosis method based on zero-shot learning in the above-mentioned prior art in composite fault diagnosis, the present invention proposes a generalized zero-shot composite fault diagnosis method based on counterfactual reasoning. Based on counterfactual reasoning, a generative adversarial network is designed to achieve decoupling of fault features and counterfactual generation, solving the problem that pseudo-composite faults tend to be distributed in a single fault in an explainable way; then, the respective advantageous methods are used for the separated single and composite faults to fully realize the generalized zero-shot composite fault diagnosis task.

[0009] The present invention proposes a generalized zero-shot composite fault diagnosis method based on counterfactual reasoning. First, a first-order training model is trained on a labeled single fault dataset. The first-order training model includes: a feature extractor that extracts fault features of input samples, a semantic alignment network that extracts semantic features of input samples and maps the semantic features to the fault feature space, and a generative adversarial network that combines fault features and semantic features to output reconstructed features. During the training phase, the single fault category is identified based on the reconstructed features and semantic features. During the testing phase, a classifier is set at the back end of the generative adversarial network to construct a first-order test model. The reconstructed features are used to identify whether the fault is single or composite.

[0010] The generative adversarial network of the first-order training model reconstructs features based on the encoded non-causal features and semantic features. The generative adversarial network of the first-order training model reconstructs features based on random noise and semantic features to form a second-order training model. The second-order training model is trained on a labeled single fault dataset. Then, a feature extractor is extracted from the second-order training model and combined with a classifier to form a single fault diagnosis model for diagnosing a single fault type. A feature extractor, a semantic alignment network, and a generative adversarial network are extracted from the second-order training model and combined with a classifier to form a composite fault diagnosis model for diagnosing composite fault types.

[0011] The sample to be diagnosed is first input into the first-order test model. If it is identified as a single fault, the single fault type is diagnosed through the single fault diagnosis model; if the sample to be diagnosed is a complex fault, the complex fault type is diagnosed through the complex fault diagnosis model.

[0012] Preferably, the first-order training model training method is:

[0013] Single fault training samples are extracted from the labeled single fault dataset and input into the first-order training model. The first-order training model then determines the type of single fault based on the reconstructed features output by the generative adversarial network. The loss function is then calculated to update the first-order training model.

[0014] When the number of updates of the first-order training model reaches the set value, the first-order training model is replaced so that it can judge whether the input sample is a single fault or a compound fault based on the reconstructed features;

[0015] Repeat the above steps until the first-order test model converges.

[0016] Preferably, the end of the first-order training model includes a discriminator and a comparator, wherein the discriminator determines whether the input sample is a single fault based on the reconstruction feature and the semantic feature; the comparator extracts the hidden layer feature from the discriminator and matches it with the semantic feature;

[0017] During the first-order training model training process, a single fault type is judged based on the fault features through the pre-trained classifier to calculate the feature loss and update the feature extractor; during the training process, the semantic alignment loss L is also combined SCont and feature alignment loss L Dist The sum updates the semantic alignment network; combines the generated adversarial loss to update the encoder and generator in the generated adversarial network; combines the identification loss LD dc and comparison loss LC dc The sum updates the discriminator and comparator.

[0018] Preferably, the training method of the single fault diagnosis model and the composite fault diagnosis model is:

[0019] First, single fault test samples and compound fault test samples are classified through the first-order test model; the real single fault type of the single fault test sample is obtained as the label; for the compound fault test sample, its fault combination is obtained as the compound fault label through semantic analysis;

[0020] Build a second-order training model and use a labeled single fault dataset to train the second-order training model;

[0021] When the number of updates of the second-order training model reaches the set value, a single fault diagnosis model and a composite fault diagnosis model are constructed;

[0022] The single fault diagnosis model is verified on labeled single fault test samples, and the accuracy of the composite fault diagnosis model is verified on labeled composite fault test samples;

[0023] The training of the second-order training model and the verification of the single fault diagnosis model and the composite fault diagnosis model are repeated until the single fault diagnosis model and the composite fault diagnosis model converge.

[0024] Preferably, the method for constructing the composite fault diagnosis model is:

[0025] The composite fault test samples are processed by the second-order training model to obtain the third data set {(reconstructed features Fault u ), composite fault label y u};

[0026] Let the third classifier be on the third data set The training is performed until convergence, and then the feature extractor, semantic alignment network and generator are extracted from the second-order training model to cooperate with the third classifier to form a composite fault diagnosis model.

[0027] Preferably, the method of obtaining the composite fault label of the composite fault sample through semantic parsing is:

[0028] First, obtain the prior semantics of single fault samples of the same type of faults;

[0029] The semantics of compound fault samples are extracted, and the combination of single fault types corresponding to the prior semantics contained in them is extracted as the compound fault label.

[0030] Preferred:

[0031]

[0032] Among them, τ a represents the temperature coefficient of semantic alignment loss, s is the semantic feature of the input sample; s + is the semantic feature of the positive sample, is the semantic feature of the mth negative sample; M is the number of negative samples; Represents the approximate fault feature obtained by mapping the semantic feature to the fault feature space The expectation of the two norms of the difference between and the fault feature f.

[0033] Preferred:

[0034]

[0035] Among them, τ d represents the temperature coefficient of the contrast loss of the hidden layer of the discriminator D, where d is the hidden layer feature; + To calculate LD dc The hidden layer features of the positive sample at time d q - Indicates calculation of LD dc The hidden layer features of the qth negative sample at time ; Q is the calculation of LD dc The number of negative samples when s d + To calculate LC dc The semantic features of the positive sample when To calculate LD dc The semantic features of the nth negative sample when N is used to calculate LC dc The number of negative samples when .

[0036] The present invention proposes a generalized zero-sample composite fault diagnosis system based on counterfactual reasoning, comprising:

[0037] An input module, used to obtain samples to be diagnosed;

[0038] The classification module has a first-order test model stored in it. The classification module is connected to the input module and uses the first-order test model to identify whether the sample to be diagnosed is a single fault or a compound fault.

[0039] A single fault identification module stores a single fault diagnosis model; the single fault identification module is connected to the input module and the classification module respectively, and the single fault diagnosis model is used to diagnose the single fault type of the sample to be diagnosed that is determined to be a single fault by the classification module;

[0040] A composite fault identification module stores a composite fault diagnosis model; the composite fault identification module is connected to the input module and the classification module respectively, and the composite fault diagnosis model is used to diagnose the composite fault type of the sample to be diagnosed that is determined to be a composite fault by the classification module;

[0041] The output module is connected to the single fault identification module and the compound fault identification module respectively; the output module is used to output the fault diagnosis result of the sample to be diagnosed.

[0042] The present invention proposes a storage medium storing a computer program, which is used to implement the generalized zero-sample composite fault diagnosis method based on counterfactual reasoning when executed.

[0043] The advantages of the present invention are:

[0044] (1) The generalized zero-shot composite fault diagnosis method based on counterfactual reasoning proposed in the present invention constructs a two-stage generalized zero-shot composite fault diagnosis model based on counterfactual reasoning. The model first points out the inherent causal components of fault data from the perspective of causal theory, and then constructs a structural causal model to describe the decoupling and generation of fault features under the guidance of counterfactual reasoning. On this basis, the proposed model improves the generative model by strengthening the discriminator in the first stage to achieve the binary classification of single faults and composite faults. In the second stage, the single fault category is predicted through supervised training of the classifier, and the traditional zero-shot learning method is designed to classify the composite fault. The present invention greatly improves the diagnostic accuracy of the model and solves the problem of the offset of the model diagnosis on the visible class and the unseen class.

[0045] (2) In the first stage, the present invention decouples the fault features and generates counterfactual fault features under the theoretical framework of counterfactual reasoning, and obtains accurate binary classification boundaries of single faults and compound faults on this basis; in the second stage, compound fault identification based on traditional zero-shot learning and single fault identification based on supervised learning are performed respectively; and a balance of accuracy between single fault diagnosis and compound fault diagnosis is achieved.

[0046] (3) The present invention constructs a structural causal model for composite fault diagnosis to describe the generation and reasoning process of counterfactual fault features, designs a generative adversarial network to decouple non-causal features from fault features, and combines composite fault semantics to generate counterfactual fault features that can fit the real data distribution, providing high-quality classification boundaries for the classifier, balancing the classification accuracy of single faults and composite faults, and improving the interpretability and accuracy of the model.

[0047] (4) During the model training process, the present invention introduces a comparator into the generative adversarial network to enhance the discriminator's hierarchical attention to fault semantics, thereby constraining the generative adversarial module to better decouple causal and non-causal fault feature subsets from fault features, thereby improving the generation quality of counterfactual fault features.

[0048] (5) From the perspective of counterfactual generation and reasoning, this paper proposes a generalized zero-shot composite fault diagnosis model based on counterfactual reasoning. This model is supervised and trained on single fault data and can be generalized to the diagnosis of single and composite faults. The proposed model generates counterfactual fault signatures by decoupling and intervening in fault signatures, achieving the model's focus on causal features and labels, thus alleviating the prediction gap between single and composite faults.

[0049] (6) The present invention significantly reduces equipment maintenance costs in scenarios where composite fault samples are scarce. The generalized zero-sample composite fault diagnosis system and storage medium based on counterfactual reasoning proposed in the present invention provide a carrier for the generalized zero-sample composite fault diagnosis method based on counterfactual reasoning proposed in the present invention, facilitating the application of the diagnostic method. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 This is a flow chart of a generalized zero-sample composite fault diagnosis method based on counterfactual reasoning;

[0051] Figure 2 This is the structure diagram of the first-order training model;

[0052] Figure 3 It is the structural diagram of the first-order test model;

[0053] Figure 4 This is the structure diagram of the second-order training model;

[0054] Figure 5 It is the structural diagram of the fault diagnosis model;

[0055] Figure 6 is the test accuracy under different numbers of training samples;

[0056] Figure 7is the confusion matrix of the classification results; where (a) corresponds to experimental task A, (b) corresponds to experimental task B, (c) corresponds to experimental task C, and (d) corresponds to experimental task D;

[0057] Figure 8 is the ablation analysis result of the model;

[0058] Figure 9 For comparison of experimental results. DETAILED DESCRIPTION

[0059] The following will provide a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. 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.

[0060] Reference Figure 1 The training method of the generalized zero-sample composite fault diagnosis model based on counterfactual reasoning proposed in this embodiment includes the following steps S1-S9.

[0061] S1. First, a single fault dataset is constructed. The single fault dataset is used to store vibration signals labeled with a single fault type, referred to as a labeled single fault dataset.

[0062] S2. Build a first-order training model, including: feature extractor, semantic alignment network, encoder E, generator G, discriminator D and comparator C; encoder E and generator G constitute a generative adversarial network;

[0063] Reference Figure 2 The feature extractor is used to extract the fault feature f of the vibration signal as the input sample x. The semantic alignment network generates semantic features s based on the semantics a of the input sample x and maps the semantic features s to the fault feature space to form an approximate fault feature. Encoder E generates non-causal features z based on fault features f and semantic features s, and generator G obtains reconstructed features based on z and s Identify network D based on and s identification Is it the output of the generator G or the feature extractor output; the comparator C extracts the hidden layer feature d from the discriminator network D, matches it with s, and outputs the matching value.

[0064] The semantics of the vibration signal are extracted using preset rules to obtain semantics a. Specifically, the vibration signal's features along different dimensions are observed, and statistical features are extracted to form the semantics of the vibration signal. In practice, prior semantics can be extracted for different vibration signals. This allows the prior semantics to be directly applied to the same vibration signal as its semantic a. For example, in the following example, 28 statistical features of the vibration signal are first defined. Then, for each single fault sample, these 28 statistical features are extracted to form the prior semantics.

[0065] S3. Extract single fault training samples from the labeled single fault dataset and input them into the first-order training model, and calculate the feature loss L respectively. c , semantic loss L s , Generate adversarial loss L VAEGAN and the discrimination loss L dc ; According to the feature loss L c Update the feature extractor according to the semantic loss L s Update the semantic alignment network according to the generated adversarial loss L VAEGAN Update the encoder E and generator G networks according to the identification loss L dc Update the discriminator D and comparator C.

[0066]

[0067] Among them, y i is the true label corresponding to the fault signal; p i The fault label y is obtained by inputting feature f into the existing classifier i The corresponding predicted probability; n is the number of fault categories;

[0068] L s =L SCont +L Dist

[0069]

[0070] Among them, L SCont represents the semantic alignment loss, τ a Represents the temperature coefficient of semantic alignment loss, s is the semantic feature of the input sample; when calculating L SCont When , a sample is randomly selected from the single fault training samples as a positive sample, and the single fault training samples belonging to different categories from the positive sample are used as negative samples; + Is to calculate L SCont The semantic feature s of the positive sample specified when Is to calculate L SCont The semantic feature s of the mth negative sample specified when M is calculated SCont The number of negative samples when ;

[0071] L Dist represents feature alignment loss; Indicates approximate fault characteristics The expectation of the two norms of the difference between and the fault feature f;

[0072]

[0073] Where KL represents the Kullback-Leibler divergence, p(z|s) is the prior distribution of N(0,1), λ is the set penalty coefficient, and f′ is the sum of f and Random sampling of; E[*] represents the expectation of the * distribution; E E(f,s) [*] represents the expected value of * calculated by the data distribution output by E(f,s); D(f,s) represents the output of the discriminator when the input is f and s, that is, the probability that f is identified as the extracted feature; It means that the discriminator has The output when and s is The probability of being identified as an extracted feature; represents the gradient, represents the gradient of the discriminator D when the input is f′ and s;

[0074] L dc =LD dc +LC dc

[0075]

[0076] Among them, τ d represents the temperature coefficient of the contrast loss of the hidden layer of the discriminator D, d is the hidden layer feature, d T is the transpose of d;

[0077] LD dc To identify the loss; in calculating LD dc When , a sample is randomly selected from the single fault training samples as a positive sample, and the single fault training samples belonging to different categories from the positive sample are used as negative samples; d + Indicates calculation of LD dc The hidden layer features d, d of the positive sample specified q - Indicates calculation of LD dc The hidden layer feature d of the qth negative sample specified when ; Q is used to calculate LD dc The number of negative samples when ;

[0078] LC dc To compare losses; in calculating LC dcWhen , a sample is randomly selected from the single fault training samples as a positive sample, and the single fault training samples belonging to different categories from the positive sample are used as negative samples; d + To calculate LC dc The semantic feature s of the positive sample is specified when To calculate LC dc The semantic feature s of the nth negative sample specified when N is used to calculate LC dc The number of negative samples when ;

[0079] C(d,s d + ) indicates that the comparator C has inputs d and s d + The output when The comparator C is represented by the input d and Output when .

[0080] Specifically, let N1 single fault training samples be extracted from the single fault data set in step S3, and the set is recorded as X0 = {(x1, y1), (x2, y2), (x3, y3), ..., (x k ,y k ),…,(x N1 ,y N1 )}; The label set of N1 single fault training samples is recorded as Y1 = {y k |1≤k≤N1};y k ∈Y, Y represents a set of single fault labels;

[0081] Let calculate L SCont When , extract the positive sample x i1 ∈X0, then the set of negative samples is recorded as {x m |1≤m≤M}, x m ∈X0, and y m ∈Y1-y i1 ;y i1 is x i1 The fault label, y m is x m Fault label;

[0082] Let calculate LD dc When , extract the positive sample x i2 ∈X0, then the set of negative samples is recorded as {x q |1≤q≤Q}, x q ∈X0, and y q ∈Y1-y i2 ;y i2 is x i2 Fault label of y q is xq Fault label;

[0083] Let calculate LC dc When , extract the positive sample x i3 ∈X0, then the set of negative samples is recorded as {x n |1≤n≤N}, x n ∈X0, and y n ∈Y1-y i3 ;y i3 is x i3 Fault label of y n is x n Fault label.

[0084] S4, repeat the above step S3 until the number of updates of the first-order training model reaches the set first threshold, then extract the feature extractor from the first-order training model, take the semantic alignment network, encoder E and generator G and combine them with the first classifier to form a first-order test model;

[0085] Reference Figure 3 In the first-order test model, the feature extractor is used to extract the fault feature f of the input sample x. The semantic alignment network generates semantic features s based on the semantics a of the vibration signal x and maps the semantic features s to the fault feature space to form an approximate fault feature. Encoder E generates non-causal features z based on fault features f and semantic features s, and generator G obtains reconstructed features based on z and s The first classifier is based on the reconstruction features Determine whether the input sample is a single fault feature sample or a compound fault feature sample.

[0086] Specifically, the first classifier in step S4 is first The training is then performed and then the first-order test model is placed. That is, the construction of the first-order test model in step S4 can be divided into the following steps:

[0087] S41. Process the samples extracted from the single fault dataset through the first-order training model to extract the reconstruction features output by the generator G. The dataset is composed of a single fault label y of the sample

[0088] S42, let the first classifier in the data set Train until convergence, and the loss function can be specifically cross entropy loss;

[0089] S43. Extract the feature extractor from the first-order training model, take the semantic alignment network, encoder E and generator G and combine them with the first classifier to form a first-order test model.

[0090] S5. Mix unlabeled single fault samples and unlabeled composite fault samples and input them into the first-order test model to determine whether the classification accuracy of the first-order test model converges; if not, return to step S3; if yes, execute step S6.

[0091] Unlabeled single fault samples can be obtained from the single fault dataset X S Obtain unlabeled compound fault samples from the compound fault dataset X U get.

[0092] The condition for the first-order test model classification accuracy to converge is that the range of the most recent k1 classification accuracies is less than the set floating error value.

[0093] S6. Based on the first-order training model, the non-causal feature z of the generator G input is replaced with random noise to form a second-order training model;

[0094] Reference Figure 4 In the second-order training model, the feature extractor is used to extract the fault feature f of the input sample x. The semantic alignment network generates semantic features s based on the semantics a of the vibration signal x and maps the semantic features s to the fault feature space to form approximate fault features. Generator G obtains the reconstructed features based on random noise z and semantic features s Identify network D based on and s identification Is it the output of the generator G or the feature extractor? The comparator C extracts the hidden layer feature d from the discriminator network D, matches it with s, and outputs the matching value.

[0095] S7. Use the labeled single fault dataset to train the second-order training model. Specifically, extract training samples from the labeled single fault dataset and input them into the second-order training model. Calculate the feature loss L during the training process. c , semantic loss L s , Generate adversarial loss L VAEGAN and the discrimination loss L dc ; According to the feature loss L c Update the feature extractor according to the semantic loss L s Update the semantic alignment network according to the generated adversarial loss L VAEGAN Update the encoder E and the production network G network according to the identification loss L dc Update the discriminator D and comparator C;

[0096] It is worth noting that the input of the generator G in the second-order training model is random noise z and semantic features s; therefore, the generative adversarial loss L in S7 VAEGAN The following formula is used for calculation:

[0097]

[0098] Where KL represents the Kullback-Leibler divergence, p(z|s) is the prior distribution of N(0,1), λ is the set penalty coefficient, and f′ is the sum of f and Random sampling of; E[*] represents the expectation of the * distribution; E z [*] represents the expected value of * calculated from the data distribution of the random noise z output; D(f,s) represents the output of the discriminator when the input is f and s, that is, the probability that f is identified as the extracted feature; It means that the discriminator has The output when and s is The probability of being identified as an extracted feature; represents the gradient, represents the gradient of the discriminator D when the input is f′ and s.

[0099] S8. Repeat step S7 until the training times of the second-order training model reach the set second threshold; then extract the feature extractor and the second classifier from the second-order training model to form a single fault diagnosis model, and extract the semantic alignment network, feature extractor, generator G and the third classifier from the second-order training model to form a composite fault diagnosis model.

[0100] Reference Figure 5 In the single fault diagnosis model, the feature extractor extracts the fault feature f of the input sample s , the second classifier is based on the fault feature f s Determine the single fault type;

[0101] In the composite fault diagnosis model, the feature extractor extracts the fault features f of the input sample u , the semantic alignment module is based on the composite fault semantics of the input sample a j Output semantic features s j , the generator G is based on the semantic feature s j and random noise z output reconstruction features The second classifier is based on the fault feature f u and reconstruction features Determine the composite fault type of the input sample.

[0102] S9. Obtain samples of a single fault type identified by the first-order test model as single fault test samples, and obtain samples of a compound fault type identified by the first-order test model as compound fault test samples;

[0103] Input a single fault test sample into a single fault diagnosis model; calculate the accuracy of the single fault diagnosis model based on the true label of the single fault test sample; determine whether the accuracy of the single fault diagnosis model has converged; if so, fix the single fault diagnosis model; if not, return to step S7;

[0104] For the composite fault test sample, semantics are extracted according to the set rules, and the semantics are parsed to obtain the composite fault label; the composite fault test sample is then input into the composite fault diagnosis model; the accuracy of the composite fault diagnosis model is calculated in combination with the real label of the composite fault test sample; it is determined whether the accuracy of the composite fault diagnosis model has converged; if yes, the composite fault diagnosis model is fixed; if not, the process returns to step S7.

[0105] Specifically, this implementation method focuses on first obtaining the prior semantics of various types of single fault samples, then extracting statistical features for the composite fault test samples to construct composite fault semantics, decomposing the composite fault semantics into superimposed combinations of the prior semantics, and obtaining the combination of single fault types corresponding to the prior semantics that are superimposed to form the composite fault semantics as the composite fault type corresponding to the composite fault semantics, that is, the composite fault type is the composite fault label of the composite fault test sample.

[0106] In step S8, both the second classifier and the third classifier need to be trained.

[0107] After the number of training times of the second-order training model in step S8 reaches the second threshold, a single fault diagnosis model is constructed by combining the following steps:

[0108] S81. Process the samples extracted from the single fault dataset through the second-order training model to extract the reconstruction features output by the generator G. The second dataset is composed of the fault label y of the sample

[0109] S82, let the second classifier be in the second data set Train until convergence, and the loss function can be specifically cross entropy loss;

[0110] S83. Extract a feature extractor and a second classifier combination from the second-order training model to form a single fault diagnosis model.

[0111] After the number of training times of the second-order training model in step S8 reaches the set value, a composite fault diagnosis model is constructed by combining the following steps:

[0112] S84. Filter compound fault samples using the first-order test model. Extract the semantics of the compound fault samples according to the set rules and record them as compound fault semantics. Split the compound fault semantics to obtain a combination of single fault semantics that can be obtained by linear superposition. Use the combination of single fault types corresponding to the single fault semantics as the compound fault label of the compound fault semantics to obtain a compound fault test sample {(compound fault sample x u , composite fault semantics a j ); composite fault type y u};

[0113] S85, let the second-order training model process the composite fault test sample to obtain the third data set in, For the generator G in the second-order training model, the composite fault sample x u The reconstructed features of the output, f u is the feature extractor in the second-order training model for the composite fault sample x u Output fault characteristics;

[0114] S86, let the third classifier be on the third data set Train until convergence, and the loss function can be specifically cross entropy loss;

[0115] S87. Extract the semantic alignment network, feature extractor, generator G and third classifier from the second-order training model to form a composite fault diagnosis model.

[0116] It can be seen that the generalized zero-sample composite fault diagnosis model based on counterfactual reasoning proposed in this invention includes two stages and three sub-models:

[0117] Sub-model 1 is the first-order test model in the first stage, which is used to classify the samples to be diagnosed into two categories, judging whether they are single fault categories or compound fault categories;

[0118] Sub-model 2 and sub-model 3 are the second stage;

[0119] Sub-model 2 is a single fault diagnosis model, which is used to diagnose a single fault type of a single fault sample;

[0120] Sub-model 3 is a composite fault diagnosis model, which is used to diagnose composite fault types of composite fault samples.

[0121] The generalized zero-sample composite fault diagnosis method based on counterfactual reasoning proposed in the present invention includes the following steps:

[0122] St1, first obtain the first-order test model, single fault diagnosis model and composite fault diagnosis model;

[0123] St2, input the sample to be diagnosed into the first-order test model to determine whether the sample to be diagnosed is a single fault sample or a compound fault sample;

[0124] If the sample to be diagnosed is a single fault, the fault type is diagnosed using a single fault diagnosis model;

[0125] If the sample to be diagnosed is a compound fault, the fault type is diagnosed using the compound fault diagnosis model.

[0126] The above method is verified below with reference to specific examples.

[0127] In this example, an experimental platform was constructed and an experiment was designed to collect vibration signal data from a faulty bearing. The experimental platform includes an AC variable-frequency motor and a shaft system consisting of a front bearing, a bearing housing, a radial load bearing, and a faulty bearing. An accelerometer is mounted on the bearing housing. The sampling frequency is 51.2 kHz, the load is 0 HP, and the speed is 1500 rpm. Each fault sample is sampled for 10 seconds. The collected data comes from healthy bearings, three types of single faults, and four types of combined faults. Healthy bearings are designated H. The three types of single faults are inner race fault (IF), outer race fault (OF), and roller fault (BF). The four types of combined faults are inner race and outer race fault (IOF), inner race and roller fault (IBF), outer race and roller fault (OBF), and inner race, outer race, and roller fault (IOBF).

[0128] In this embodiment, 500 is used as the step length and 2048 is used as the window length to obtain 1000 fault samples of various types.

[0129] In this embodiment, Sacc (the classification accuracy of the visible class, i.e., single fault class) and Uacc (the classification accuracy of the unseen class, i.e., compound fault class) are used to evaluate the model's prediction accuracy for single and compound faults, respectively. The harmonic average accuracy (Hacc) is used to balance the model's performance in single and compound fault classification:

[0130]

[0131] As shown in Table 1, this embodiment sets four groups of experiments. As the number of training samples of each type increases from 100 to 400, the number of test samples of each type remains at 400.

[0132] In this embodiment, when training the model of the present invention, in the first stage, the first-order training model is trained 50 times per round, that is, the first threshold is set to 50. In the second stage, the second-order training model is trained 125 times per round, that is, the second threshold is set to 125.

[0133] Table 1: Experimental task settings

[0134]

[0135] That is, Task A means that the training dataset contains four types of single fault samples: H, IF, OF, and BF, with 100 samples for each type of single fault; the test dataset contains eight types of fault samples: H, IF, OF, BF, IOF, IBF, OBF, and IOBF, with 400 samples for each type of fault. The same applies to Experiments B, C, and D.

[0136] During the model training process, the labeled single fault data set of steps S3 and S7 is the training data set, and the unlabeled single fault samples and unlabeled compound fault samples of step S5 come from the test set; step S9 classifies the samples in the test set through the first-order test model to obtain single fault test samples and compound fault test samples.

[0137] In order to balance the randomness of the results, each group of experiments was performed 5 times and the average was taken. Figure 6 The average results of each group of experiments are shown. Figure 6 It can be found that as the number of training samples increases, the classification accuracy of the model gradually improves, and the Hacc is higher than 70%. When the number of training set samples reaches 400, the harmonic mean accuracy reaches 87.4%. In this method, the accuracy of single fault prediction depends on whether the single fault and compound fault binary classification of the first-order test model is appropriate. The experimental results show that the single fault classification accuracy has been maintained at around 90%, indicating that the first-order test model can effectively identify the boundary between single and compound faults. In addition, compound faults rely on the model proposed in the second stage to realize the training and testing of the zero-sample learning method, and in the experiment, the best accuracy of 83.14% was achieved. It can be seen that the present invention can effectively distinguish single faults from compound faults and achieve high accuracy under their respective advantages, relax the model's requirements on the type of test samples, and improve the generalization of the model.

[0138] In this embodiment, the confusion matrix of the classification results of the four tasks is also drawn to show the test results in detail, as shown in the following example: Figure 7 As shown. The vertical axis of the matrix represents the true category, and the horizontal axis represents the predicted category. Taking the confusion matrix of the classification results of task D as an example, the diagnostic method performs well in predicting single faults, with only a slight probability of identifying healthy and single faults as compound faults. The diagnostic method performs slightly worse in predicting compound faults, with a probability of 0.17 to identify IOF class faults as IF faults. This is due to the binary classification prediction loss of the first-stage model, and a probability of 0.27 to identify IOBF class faults as IOF class faults. This is due to the prediction loss of the second-stage model. It may be that the existing model structure cannot avoid the confusion of IOBF faults, the most complex compound fault coupled by three types of faults, among other compound fault classes.

[0139] In order to verify the improvement effect of the model structure and counterfactual reasoning method of the present invention on the baseline model VAEGAN (generative adversarial network) in the generalized zero-shot composite diagnosis task, this embodiment tests the baseline model VAEGAN, VAEGAN+Ldc and the proposed model on experimental task D. The experimental results are shown in the figure below. Figure 8 shown.

[0140] The baseline model VAEGAN achieves binary classification of single faults and compound faults during the first stage of training. In the second stage, the specific fault type of the sample is diagnosed based on the classification results of the first stage, namely the specific single fault type and the specific compound fault type.

[0141] VAEGAN+Ldc, compared to the baseline model VAEGAN, adds a discriminator and a comparator during the training process.

[0142] from Figure 8 It can be seen that the Hacc of the baseline model is 62.69%, and the single fault recognition accuracy is much higher than that of compound faults. This is due to the inherent domain drift problem of generalized zero-shot learning. The Hacc of VAEGAN+Ldc is improved by 14.76%, which is attributed to the strong supervision of the discriminator D on the decoupling generation of VAE. The model of the present invention has a significant improvement over both, and the improvement in the accuracy of compound fault prediction is particularly significant. This is attributed to the distinction between single and compound faults under the effect of counterfactual reasoning, and the accurate prediction is achieved under their respective advantageous diagnostic methods. As a result, the proposed model performs best in the generalized zero-shot compound fault diagnosis task, with a Hacc of up to 87.40%.

[0143] In order to verify the performance advantages of the model of the present invention, the diagnostic method of the present invention is compared with four existing GZSL models, namely ZSML, LDS-IFD, CE-GZSL and PREE. Table 2 provides the detailed description of the four existing models. In order to achieve fair comparison, the training and test sets of different models in each group of experiments are the same, and the same features and semantics are used for model training and testing. Each experiment is repeated 5 times and the average value is taken. The experimental results are shown in Table 2. Figure 9 shown.

[0144] Table 2: Model description

[0145]

[0146] In the four sets of experiments, the test accuracy of each model increased with the increase in the number of training samples. Specifically, ZSML achieved the lowest prediction accuracy. Model analysis and experiments indicate that ZSML relies on a large number of meta-tasks to adjust model parameters. However, this experiment only had four healthy / single fault scenarios available for training, severely limiting ZSML's performance. Although LDS-IFD showed a slight improvement over ZSML, the results were still poor. This is because the number of training samples limits the dimensionality of fault semantics. CE-GZSL performed relatively well on all four tasks because it uses instance-level and category-level comparative supervision to train the embedding space, which alleviates the domain drift problem to some extent. PREE, as the best performing model among the four existing models, achieved a maximum accuracy of 76.42%. This is due to its improved feature extraction method and the use of SAMC-loss to adjust intra-class consistency and inter-class differences, thereby improving the quality of feature representation.

[0147] In comparison, the model of the present invention outperformed the four existing models in all four sets of experiments. For example, in experimental task D, its prediction accuracy was 10.98% higher than that of the PREE model. This shows that the model of the present invention can better diagnose complex fault categories than the existing models, and better balance the diagnosis results of single faults and complex faults. While further improving the diagnostic accuracy of the model, it also solves the problem of model drift in the visible class domain.

[0148] Of course, 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, but also encompasses the same or similar structures that can be implemented 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-restrictive, and the scope of the invention is defined by the appended claims, not the foregoing description, and it is intended that all variations that fall within the meaning and range of equivalents of the claims be encompassed within the present invention. Any reference signs in the claims should not be construed as limiting the claim 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.

[0150] The technology, shape, and structure not described in detail in the present invention are all well-known technologies.

Claims

1. A generalized zero-sample composite fault diagnosis method based on counterfactual reasoning, characterized in that: First, a first-order training model is trained on a labeled single-fault dataset. The first-order training model includes: a feature extractor that extracts fault features from input samples; a semantic alignment network that extracts semantic features from input samples and maps the semantic features to the fault feature space; and a generative adversarial network that combines fault features and semantic features to output reconstruction features. During the training phase, the single fault category is identified based on the reconstruction features and semantic features. During the testing phase, a classifier is set up on the backend of the generative adversarial network to construct a first-order test model. Based on the reconstruction features, the model identifies single faults or compound faults. The generative adversarial network of the first-order training model reconstructs features based on the encoded non-causal features and semantic features. The generative adversarial network of the first-order training model reconstructs features based on random noise and semantic features to form a second-order training model. The second-order training model is trained on a labeled single fault dataset. Then, a feature extractor is extracted from the second-order training model and combined with a classifier to form a single fault diagnosis model for diagnosing a single fault type. A feature extractor, a semantic alignment network, and a generative adversarial network are extracted from the second-order training model and combined with a classifier to form a composite fault diagnosis model for diagnosing composite fault types. The sample to be diagnosed is first input into the first-order test model. If it is identified as a single fault, the single fault type is diagnosed through the single fault diagnosis model; if the sample to be diagnosed is a complex fault, the complex fault type is diagnosed through the complex fault diagnosis model.

2. The generalized zero-sample composite fault diagnosis method based on counterfactual reasoning according to claim 1, characterized in that: The first-order training model training method is: Single fault training samples are extracted from the labeled single fault dataset and input into the first-order training model. The first-order training model then determines the type of single fault based on the reconstructed features output by the generative adversarial network. The loss function is then calculated to update the first-order training model. When the number of updates of the first-order training model reaches the set value, the first-order training model is replaced so that it can judge whether the input sample is a single fault or a compound fault based on the reconstructed features; Repeat the above steps until the first-order test model converges.

3. The generalized zero-sample composite fault diagnosis method based on counterfactual reasoning according to claim 2, characterized in that: The end of the first-order training model includes a discriminator and a comparator. The discriminator determines whether the input sample is a single fault based on the reconstruction features and semantic features; The comparator extracts hidden layer features from the discriminator and matches them with semantic features; During the first-order training model training process, a single fault type is determined based on the fault features through a pre-trained classifier to calculate the feature loss and update the feature extractor; During the training process, the semantic alignment loss L is also combined SCont and feature alignment loss L Dist The sum updates the semantic alignment network; combines the generated adversarial loss to update the encoder and generator in the generated adversarial network; combines the identification loss LD dc and comparison loss LC dc The sum updates the discriminator and comparator.

4. The generalized zero-sample composite fault diagnosis method based on counterfactual reasoning according to claim 3, characterized in that: The training methods for single fault diagnosis model and composite fault diagnosis model are as follows: First, single fault test samples and compound fault test samples are classified through the first-order test model; the real single fault type of the single fault test sample is obtained as the label; for the compound fault test sample, its fault combination is obtained as the compound fault label through semantic analysis; Build a second-order training model and use a labeled single fault dataset to train the second-order training model; When the number of updates of the second-order training model reaches the set value, a single fault diagnosis model and a composite fault diagnosis model are constructed; The single fault diagnosis model is verified on labeled single fault test samples, and the accuracy of the composite fault diagnosis model is verified on labeled composite fault test samples; The training of the second-order training model and the verification of the single fault diagnosis model and the composite fault diagnosis model are repeated until the single fault diagnosis model and the composite fault diagnosis model converge.

5. The generalized zero-sample composite fault diagnosis method based on counterfactual reasoning according to claim 4, characterized in that: The construction method of the composite fault diagnosis model is as follows: The composite fault test samples are processed by the second-order training model to obtain the third data set {(reconstructed features Fault u ), composite fault label y u }; Let the third classifier be on the third data set The training is performed until convergence, and then the feature extractor, semantic alignment network and generator are extracted from the second-order training model to cooperate with the third classifier to form a composite fault diagnosis model.

6. The generalized zero-sample composite fault diagnosis method based on counterfactual reasoning according to claim 4, characterized in that: The method of obtaining the compound fault label of the compound fault sample through semantic parsing is: First, obtain the prior semantics of single fault samples of the same type of faults; The semantics of compound fault samples are extracted, and the combination of single fault types corresponding to the prior semantics contained in them is extracted as the compound fault label.

7. The generalized zero-sample composite fault diagnosis method based on counterfactual reasoning according to claim 3, characterized in that: Among them, τ a represents the temperature coefficient of semantic alignment loss, s is the semantic feature of the input sample; s + is the semantic feature of the positive sample, is the semantic feature of the mth negative sample; M is the number of negative samples; Represents the approximate fault feature obtained by mapping the semantic feature to the fault feature space The expectation of the two norms of the difference between and the fault feature f.

8. The generalized zero-sample composite fault diagnosis method based on counterfactual reasoning according to claim 3, characterized in that: Among them, τ d represents the temperature coefficient of the contrast loss of the hidden layer of the discriminator D, where d is the hidden layer feature; + To calculate LD dc The hidden layer features of the positive sample at time d q - Indicates calculation of LD dc The hidden layer features of the qth negative sample at time ; Q is the calculation of LD dc The number of negative samples when s d + To calculate LC dc The semantic features of the positive sample when To calculate LC dc The semantic features of the nth negative sample when N is used to calculate LC dc The number of negative samples when .

9. A generalized zero-sample composite fault diagnosis system based on counterfactual reasoning, characterized in that: include: An input module, used to obtain samples to be diagnosed; The classification module stores a first-order test model internally; The classification module is connected to the input module and uses the first-order test model to identify whether the sample to be diagnosed is a single fault or a compound fault; A single fault identification module, which stores a single fault diagnosis model; The single fault identification module is connected to the input module and the classification module respectively. The single fault diagnosis model is used to diagnose the single fault type of the sample to be diagnosed that is determined to be a single fault by the classification module; A composite fault identification module, which stores a composite fault diagnosis model; The composite fault identification module is connected to the input module and the classification module respectively. The composite fault diagnosis model is used to diagnose the composite fault type of the sample to be diagnosed that is determined to be a composite fault by the classification module; The output module is connected to the single fault identification module and the compound fault identification module respectively; the output module is used to output the fault diagnosis result of the sample to be diagnosed.

10. A storage medium, characterized in that: A computer program is stored, and when the computer program is executed, it is used to implement the generalized zero-sample composite fault diagnosis method based on counterfactual reasoning according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Composite fault diagnosis method based on zero sample learning

    CN113177584A

  • Bearing composite fault diagnosis method based on embedded zero sample learning model

    CN114383845A

  • Out-of-distribution image classification method and system based on sample balance causal reasoning

    CN116883728A

  • Medical data generation method and system based on causal representation learning

    CN117010494A

  • Anti-fact fault data generation method based on causal intervention

    CN117520905A

Cited By

  • Generalized zero sample industrial fault diagnosis method based on feature generation and comparative learning

    CN121901806A

  • Rotating machinery generalized zero sample coupling fault diagnosis method based on dual convolutional network and dynamic semantic fusion, and medium

    CN122112999A

  • A rotating machinery generalized zero-shot coupled fault diagnosis method based on a double convolution network and dynamic semantic fusion and a medium

    CN122112999B