Unsupervised industrial fault diagnosis method and system based on structured prediction

Through structured prediction and conditional domains to combat neural networks, the source and target domain data are aligned with local reserved projection and pseudo-label learning, the problems of data scarcity and domain differences in bearing fault diagnosis are solved, achieving high accuracy and robustness fault diagnosis effect.

CN119202890APending Publication Date: 2024-12-27CHANGZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411243482.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-05
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

In the diagnosis of bearing faults, traditional solutions limit the generalization ability of the data-driven model due to the lack of data labels and the scarcity of fault data, and fail to make full use of internal structural data. Especially in unbalanced fault scenarios, there are domain differences problems, which are difficult to improve. Supervise the identification accuracy of fault diagnosis.

Method used

Unsupervised industrial fault diagnosis method with structured prediction is adopted, and the source domain and target domain data are aligned through conditional domain adversarial neural network and local reserve projection algorithm, domain invariant features are extracted, and pseudo-labels and selective iterative learning algorithms are used. Improve the accuracy and robustness of fault diagnosis.

Benefits of technology

Significantly improves the fault diagnosis accuracy and model generalization capabilities on unbalanced data sets, maintains high accuracy in the case of category imbalance, and further improves model performance and significantly improves The accuracy and robustness of industrial fault diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119202890A_ABST
    Figure CN119202890A_ABST
Patent Text Reader

Abstract

The invention discloses an unsupervised industrial fault diagnosis method based on structured prediction, and the method comprises the steps: obtaining fault data and real data, dividing the fault data and the real data into target domain data and real sample data, mixing the fault data and the real sample data, obtaining source domain data, training a conditional domain adversarial neural network with the target domain data, and obtaining a target domain adversarial neural network; aligning the source domain data and the target domain data, extracting domain invariant features, performing normalization processing on the obtained feature sample of the source domain and the feature sample of the target domain to obtain a first source domain feature sample and a first target domain feature sample, projecting the first source domain feature sample and the first target domain feature sample into the same subspace by using a local preserving projection algorithm, and performing secondary alignment; according to the method, the domain invariant subspaces of the pseudo-label learning source domain data and the target domain data are distributed to the first target domain feature sample, the projection matrix is obtained, the projection matrix is solved, the classifier is used for classifying the first target domain feature sample, and the accuracy and robustness of industrial fault diagnosis are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of unsupervised fault diagnosis of transfer learning, and in particular to an unsupervised industrial fault diagnosis method and system of structured prediction. Background Art

[0002] Intelligent fault diagnosis based on small data and unbalanced data refers to the use of limited machine fault samples to establish intelligent diagnosis models to achieve accurate fault identification, which has always attracted the attention of researchers. According to the three main stages of bearing fault diagnosis: data preprocessing, feature extraction and conditional classification, the existing research results can be divided into the following three categories: based on data enhancement, based on feature learning and based on classifier design. Among them, thanks to the emergence and application of deep learning models such as GAN, the small sample class imbalance fault diagnosis method based on data enhancement has become the mainstream solution group at present. Specifically, in terms of data enhancement, data generation and data oversampling models can effectively expand the fault data set. Adversarial domain adaptation aims to reduce the domain difference between the source domain and the target domain through adversarial training, obtain features with domain invariance, so that the classifier trained on the source domain can be applied to the classification of target data. Thereby improving the generalization performance of the model on the target domain. This adversarial training method originated from GAN. Influenced by this, Ganin et al. proposed a domain adversarial neural network, which can be trained on a large amount of labeled data from the source domain and a large amount of unlabeled data from the target domain. By enhancing it with several standard layers and a simple new gradient reversal layer, domain adaptation can be achieved in almost any feedforward model, training the classifier branch to minimize the classification loss on the source data. During the training process, DANN learns adversarial feature representations by minimizing the loss of the main task and maximizing the classification error of the domain classifier. In this way, the model can find a shared feature representation between the source and target domains. This minimax game effectively adjusts the distribution between the source and the target, thereby achieving the purpose of domain adaptation. The application of pseudo-labels in UDA can be divided into two categories: the application of pseudo-labeling in improving the recognition rate of classifiers and the application of pseudo-labeling in class feature alignment. The first category is a method that obtains a classifier with high generalization ability by performing supervised learning in the source domain and weakly supervised learning in the target domain, and the target domain is annotated with high-quality pseudo-labels. The second category refers to methods that use pseudo-labeling to promote the alignment of class features in the source and target domains. This method uses the second category of methods.

[0003] This method aims to solve the problem of domain differences in bearing fault diagnosis. Based on the direct alignment of marginal distributions in adversarial training, structured prediction is introduced to select the most confident pseudo-labeling method of labeled target samples with the maximum conditional probability. With the help of LPP projection, the conditional distributions of the source domain and the target domain are aligned through the latent subspace, which narrows the domain gap and improves the accuracy of unsupervised fault diagnosis and recognition. Summary of the invention

[0004] In view of the above-mentioned problems, the present invention is proposed.

[0005] Therefore, the technical problem solved by the present invention is: the present invention solves the problem that the traditional solution data has no labels and the fault data is scarce, which limits the generalization ability of the data-driven model. The existing technology does not fully solve the internal structure data, which poses challenges in unbalanced fault scenarios.

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

[0007] In a first aspect, the present invention provides an unsupervised industrial fault diagnosis method for structured prediction, comprising:

[0008] Acquire fault data and real data, divide the real data into target domain data and real sample data, mix the fault data and the real sample data to obtain source domain data;

[0009] Using source domain data and target domain data to train a conditional domain adversarial neural network, aligning the source domain data and the target domain data, and using a feature extractor to extract domain-invariant features of the source domain data and the target domain data to obtain feature samples of the source domain and feature samples of the target domain;

[0010] Normalizing the feature samples of the source domain and the feature samples of the target domain respectively to obtain a first source domain feature sample and a first target domain feature sample, and projecting the first source domain feature sample and the first target domain feature sample into the same subspace by using a local preservation projection algorithm to perform secondary alignment;

[0011] Assign pseudo labels to the first target domain feature samples to learn the domain invariant subspace of the source domain data and the target domain data, and obtain a projection matrix, solve the projection matrix, and classify the first target domain feature samples using a classifier according to the solution result.

[0012] As a preferred solution of the structured prediction unsupervised industrial fault diagnosis method of the present invention, wherein: using source domain data and target domain data to train a conditional domain adversarial neural network includes:

[0013] Use feature extractors to extract features from source and target domain data, and apply multilinear mapping to the features;

[0014] Train the domain discriminator and the target classifier, and pit the target classifier against the domain discriminator;

[0015] Define loss functions, including classification loss and domain adversarial loss;

[0016] The classification loss is expressed as:

[0017]

[0018] in, is the minimum classification loss on the source domain, is the classification loss of a single sample in the source domain, u s is the feature of the source domain, v s is the label of the corresponding feature in the source domain, ε is the parameter of the model, μ is the parameter of the target classifier, f is the feature extractor, g μs The function that classifies the features on the source domain for the target classifier.

[0019] As a preferred solution of the structured prediction unsupervised industrial fault diagnosis method of the present invention, the domain adversarial loss includes:

[0020] The domain adversarial loss is expressed as:

[0021]

[0022] in, is the maximum domain adversarial loss, is the adversarial loss on the source and target domains, ω is the parameter of the domain discriminator, is a multilinear mapping, h ω is the domain discriminator, G s and G t are the datasets of the source domain and the target domain, f s (u s ) and f t (u t ) are the source domain and target domain feature extraction functions respectively, g s (u s ) and g t (u t ) are functions for further processing of features;

[0023] The optimization algorithm is used to perform gradient descent on the loss function, and the parameters of the adversarial neural network model are updated through back propagation. After training, the adversarial neural network model outputs feature samples of the source domain and feature samples of the target domain.

[0024] As a preferred solution of the structured prediction unsupervised industrial fault diagnosis method of the present invention, the projection matrix includes:

[0025] Concatenate the feature samples of the source domain and the feature samples of the target domain into a matrix;

[0026] Through supervised local preservation projection, the domain invariant subspace of the source domain and the target domain is learned from the matrix, and the following formula is solved to obtain the projection matrix represented as:

[0027]

[0028] Among them, M is the projection matrix, U is the set of labeled source domain data and pseudo-labeled target domain data, N is the Laplace matrix, B is the degree matrix, K is the number of iterations in the learning process, tr(〃) is the regularization term, and I is the unit matrix.

[0029] As a preferred solution of the structured prediction unsupervised industrial fault diagnosis method of the present invention, solving the projection matrix includes:

[0030] The projection matrix is ​​solved by generalized eigenvalue decomposition, which is expressed as: (UBU K -λUNU K )M=λIM, and the optimal solution is M=[m 1 ,m 2 ,...,m a ], where λ is the regularization parameter, m 1 ,m 2 ,...,m a is the eigenvector corresponding to the largest eigenvalue.

[0031] As a preferred solution of the structured prediction unsupervised industrial fault diagnosis method of the present invention, the pseudo-label assignment to the first target domain feature sample comprises:

[0032] The projection matrix is ​​used to calculate the projections of the feature samples of the source domain and the feature samples of the target domain in the subspace respectively, and the average subtraction is used for all projections to obtain the average value of all projections;

[0033] The average value of all projections is normalized to the subspace to obtain feature samples of different categories and determine the class prototype of each category. The class prototype is defined as the mean vector of the projection source feature with label v, which is expressed as:

[0034]

[0035] in, is the mean vector of the projected source features with label v, is the eigenvector of the i-th projection, is an exponential function;

[0036] Using the projection of the class prototype and the feature sample of the target domain, the conditional probability that the feature sample of the target domain belongs to each category is calculated.

[0037] As a preferred solution of the structured prediction unsupervised industrial fault diagnosis method of the present invention, it also includes:

[0038] A clustering algorithm is used to cluster the projection vectors of the feature samples of the target domain, and the same number of cluster centers as the class prototypes are generated. The cluster centers are used as the initial cluster centers of the feature samples of the target domain and are linked to the class prototypes of the source domain.

[0039] The clusters of the target domain are matched with the class prototypes of the source domain by minimizing the sum of the distances of all matching pairs between the cluster centers and the class prototypes;

[0040] The pseudo-labeling method that combines the closest class prototype and the method based on structured prediction is expressed as:

[0041]

[0042] The final pseudo label is expressed as:

[0043]

[0044] in, is a feature sample of a given target domain The conditional probability of belonging to class v, For the given conditions Next, the conditional probability of class v is, is the distance function, V is the set of all category combinations, and exp(〃) is the exponential function;

[0045] Using feature samples from the source domain with true labels and feature samples from the target domain with pseudo labels, the projection matrix and pseudo labels are updated through an iterative learning algorithm based on selective pseudo labels. In each iteration, the target features and their corresponding pseudo labels are selected for learning.

[0046] After the iterative learning is completed, the adversarial neural network model is trained using the updated projection matrix and pseudo labels to obtain the fault diagnosis results.

[0047] In a second aspect, the present invention provides a system for unsupervised industrial fault diagnosis based on structured prediction, comprising:

[0048] A data mixing module is used to obtain fault data and real data, divide the real data into target domain data and real sample data, and mix the fault data and the real sample data to obtain source domain data;

[0049] A feature extraction module is used to train a conditional domain adversarial neural network using source domain data and target domain data, align the source domain data and target domain data, and use a feature extractor to extract domain-invariant features of the source domain data and target domain data to obtain feature samples of the source domain and feature samples of the target domain;

[0050] A projection module is used to normalize the feature samples of the source domain and the feature samples of the target domain respectively to obtain a first source domain feature sample and a first target domain feature sample, and project the first source domain feature sample and the first target domain feature sample into the same subspace by using a local preservation projection algorithm to perform secondary alignment;

[0051] The classification module is used to assign pseudo labels to the first target domain feature samples to learn the domain invariant subspace of the source domain data and the target domain data, and obtain a projection matrix, solve the projection matrix, and classify the first target domain feature samples using a classifier according to the solution result.

[0052] In a third aspect, the present invention provides a computing device, comprising:

[0053] Memory and processor;

[0054] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, the steps of the structured predictive unsupervised industrial fault diagnosis method are implemented.

[0055] In a fourth aspect, the present invention provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the steps of the structured predictive unsupervised industrial fault diagnosis method.

[0056] The beneficial effects of the present invention are as follows: in view of the problem of scarcity of actual fault data, synthetic data generation technology is used to create sufficient training data, improve the generalization ability of data-driven models, combine conditional domain adversarial neural networks and local preservation projection (LPP), introduce mean square error loss, and propose a new unsupervised fault diagnosis framework, especially for the problem of class imbalance, to improve the diagnosis accuracy. The framework performs well in processing unbalanced data sets, and can also maintain a high accuracy rate on balanced data sets, showing strong generalization ability and adaptability. An iterative learning strategy based on selective pseudo-labels is used to further improve the model performance by continuously updating the projection matrix and pseudo-labels, thereby significantly improving the accuracy and robustness of industrial fault diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. Among them:

[0058] Figure 1 An overall flow chart of an unsupervised industrial fault diagnosis method for structured prediction provided by the present invention. DETAILED DESCRIPTION

[0059] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings of the specification. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without creative work should fall within the scope of protection of the present invention.

[0060] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0061] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.

[0062] The present invention is described in detail with reference to schematic diagrams. When describing the embodiments of the present invention, for the sake of convenience, the cross-sectional diagrams showing the device structure will not be partially enlarged according to the general scale, and the schematic diagrams are only examples, which should not limit the scope of protection of the present invention. In addition, in actual production, the three-dimensional dimensions of length, width and depth should be included.

[0063] At the same time, in the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "upper, lower, inner and outer" are based on the directions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as limiting the present invention. In addition, the terms "first, second or third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0064] In the present invention, unless otherwise clearly specified and limited, the terms "install, connect, connect" should be understood in a broad sense, for example: it can be a fixed connection, a detachable connection or an integral connection; it can also be a mechanical connection, an electrical connection or a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0065] Example 1

[0066] Reference Figure 1 , which is an embodiment of the present invention, provides an unsupervised industrial fault diagnosis method for structured prediction, comprising:

[0067] S100: Acquire fault data and real data, divide the real data into target domain data and real sample data, mix the fault data and the real sample data, and obtain source domain data;

[0068] Specifically, synthetic data refers to data generated by simulation, model or algorithm, rather than data directly measured by actual equipment or process. The use of synthetic data is particularly important in the field of fault diagnosis, because there is usually a lack of sufficient fault samples in real data. Fault data samples in the real world are usually not sufficient, especially in safety-critical systems, where the frequency of faults is very low and it is difficult to collect enough representative samples;

[0069] A common method for generating synthetic data is to use a high-precision physical model to generate a signal containing fault characteristics. For example, for bearing fault diagnosis, a synthetic vibration signal can be generated based on operating conditions and bearing characteristics. This method can generate a large amount of synthetic fault data to train data-driven diagnostic models;

[0070] However, there are some drawbacks to relying solely on synthetic data for model training. First, the distribution difference between synthetic data and real data may lead to degraded model performance because the simulated environment is not completely equivalent to the actual operating conditions. Second, creating an accurate physical model requires a lot of resources and time, and in some complex systems, detailed physical models are not available.

[0071] Vibration signals are used to simulate single impact excitation waveforms due to surface defects. The parameters of these signals, such as impact period T and modulation period Q, can be directly calculated by domain experts based on the kinematics and velocity records of the bearing. The model of the vibration signal is expressed as:

[0072]

[0073] Where m(t) is the vibration record of a healthy bearing used as background noise, and ρ is the noise modulation coefficient, which is uniformly distributed between 0.25 and 2.

[0074] Modulation and randomness are introduced, the impact amplitude B i It is represented by the sum of multiple cosine waves:

[0075]

[0076] Among them, T is the impulse period, Q is the modulation period, α is a random variable with a mean of 1 and a standard deviation of 0.1, and the v value control includes the number and amplitude of the sidebands in the analysis. The selected v value is not specially optimized to adapt to different load conditions;

[0077] Synthesized fault signals are mixed with signals under healthy conditions to generate more realistic samples. The distribution difference between synthetic data and real data still exists. In order to bridge this gap, unsupervised domain adaptation technology is used. By aligning the features of synthetic data and real data, the generalization ability of the model on the target domain can be improved.

[0078] It should be noted that the knowledge of domain experts is used to generate synthetic data, and domain adaptation technology is used to overcome the inter-domain differences between synthetic data and real data, which can improve the performance of the model, especially in the case of class imbalance in the target domain.

[0079] Specifically, the labeled synthetic data is represented as the source domain data as follows:

[0080]

[0081] The unlabeled real data is represented as the target domain data as:

[0082]

[0083] Where V represents the set of four bearing states: healthy, inner race fault (IF), rolling element fault (REF) and outer race fault (OF), (u s,i ,v s,i ) is the element in the data set, m is the total number, u t,i is the i-th data point in the target domain data.

[0084] It should be noted that a sufficient amount of training data is generated by using synthetic faults to obtain a model that performs well on the target domain.

[0085] S200: using source domain data and target domain data to train a conditional domain adversarial neural network, aligning the source domain data and the target domain data, and using a feature extractor to extract domain-invariant features of the source domain data and the target domain data, thereby obtaining feature samples of the source domain and feature samples of the target domain;

[0086] In the embodiment of the present application, a feature extractor is used to extract features from source domain data and target domain data, and a multilinear mapping is applied to the features;

[0087] Train the domain discriminator and the target classifier, and pit the target classifier against the domain discriminator;

[0088] Define loss functions, including classification loss and domain adversarial loss;

[0089] The classification loss is expressed as:

[0090]

[0091] in, is the minimum classification loss on the source domain, is the classification loss of a single sample in the source domain, u s is the feature of the source domain, v s is the label of the corresponding feature in the source domain, ε is the parameter of the model, μ is the parameter of the target classifier, f is the feature extractor, g μs The function that classifies the features on the source domain for the target classifier.

[0092] Specifically, the conditional domain adversarial neural network module consists of a feature extractor, a target classifier, and a domain discriminator. Both the target classifier and the domain discriminator consist of two fully connected layers. The classifier is used to receive the features extracted by the feature extractor and classify and predict the extracted features. The discriminator receives the extracted features and determines whether the extracted features come from the source domain or the target domain. By combining the feature representation and the classifier output, it can capture more information and improve the effect of feature alignment.

[0093] In the embodiment of the present application, the domain adversarial loss is expressed as:

[0094]

[0095] in, is the maximum domain adversarial loss, is the adversarial loss on the source and target domains, ω is the parameter of the domain discriminator, is a multilinear map, h ω is the domain discriminator, G s and G t are the datasets of the source domain and the target domain, f s (u s ) and f t (u t ) are the source domain and target domain feature extraction functions respectively, g s (u s ) and g t (u t) are functions for further processing of features;

[0096] The optimization algorithm is used to perform gradient descent on the loss function, and the parameters of the adversarial neural network model are updated through back propagation. After training, the adversarial neural network model outputs feature samples of the source domain and feature samples of the target domain.

[0097] Specifically, in the basic adversarial neural network module, a shared feature extractor is used to extract features from the source domain and target domain data. The feature extractor mainly consists of three convolutional layers and is supplemented by a fully connected layer.

[0098] It should be noted that during the training process, although minimizing the classification loss of the model is crucial, maximizing the domain adversarial loss is equally important. The purpose of this process is to reduce the difference between the source domain and the target domain. The network parameters are updated through the Adam optimization algorithm and back propagation. After training, the model outputs source domain features and target domain features, which come from the fully connected layer of the feature extractor.

[0099] S300: normalizing the feature samples of the source domain and the feature samples of the target domain respectively to obtain a first source domain feature sample and a first target domain feature sample, and projecting the first source domain feature sample and the first target domain feature sample into the same subspace by using a local preservation projection algorithm to perform secondary alignment;

[0100] Specifically, each feature of the source domain and the target domain is L2 normalized so that This eliminates the scale differences of features, allowing the extracted features to be well distributed on the surface of the same hypersphere, helping the source domain and target domain to be better aligned.

[0101] It should be noted that when the synthetic dataset is directly used to train the conditional domain adversarial neural network model, the final classification results tend to be biased towards the healthy category due to the mismatch in the category distribution of the source domain and target domain data. Therefore, a selective pseudo-label strategy based on structured prediction is introduced to offset the impact of this class mismatch.

[0102] S400: assigning pseudo labels to the first target domain feature samples to learn the domain invariant subspace of the source domain data and the target domain data, and obtaining a projection matrix, solving the projection matrix, and classifying the first target domain feature samples using a classifier according to the solution result;

[0103] In the embodiment of the present application, the feature samples of the source domain and the feature samples of the target domain are concatenated into a matrix;

[0104] Through supervised local preservation projection, the domain invariant subspace of the source domain and the target domain is learned from the matrix, and the following formula is solved to obtain the projection matrix represented as:

[0105]

[0106] Among them, M is the projection matrix, U is the set of labeled source domain data and pseudo-labeled target domain data, N is the Laplace matrix, B is the degree matrix, K is the number of iterations in the learning process, tr(〃) is the regularization term, and I is the unit matrix.

[0107] Specifically, the regularization term tr(M K M) is used to penalize the extreme values ​​of the projection matrix M. The Laplacian matrix N is calculated by the degree matrix B and the affinity matrix Q: N = BQ. The degree matrix B is a diagonal matrix whose diagonal elements represent the sum of the number of connections between each data point and other data points. For the i-th data point in the data set, the i-th diagonal element of the degree matrix B is: B ii =∑ j Q ij , the affinity matrix Q is a symmetric matrix, whose elements Q ij Represents the similarity between data points i and j. The similarity is expressed as:

[0108]

[0109] In the embodiment of the present application, the projection matrix is ​​solved by generalized eigenvalue decomposition, which is expressed as: (UBU K -λUNU K )M=λIM, and the optimal solution is M=[m 1 ,m 2 ,...,m a ], where λ is the regularization parameter, m 1 ,m 2 ,...,m a is the eigenvector corresponding to the largest eigenvalue.

[0110] Specifically, the corresponding projection matrix is ​​obtained by calculation so that the subspace projections of feature samples belonging to the same category are close to each other in both the source domain and the target domain, and the target feature samples can be classified using the nearest neighbor classifier.

[0111] In the embodiment of the present application, the projection matrix is ​​used to calculate the projections of the feature samples of the source domain and the feature samples of the target domain in the subspace respectively, and the average subtraction is performed on all the projections to obtain the average value of all the projections;

[0112] The average value of all projections is normalized to the subspace to obtain feature samples of different categories and determine the class prototype of each category. The class prototype is defined as the mean vector of the projection source feature with label v, which is expressed as:

[0113]

[0114] in, is the mean vector of the projected source features with label v, is the eigenvector of the i-th projection, is an exponential function;

[0115] Using the projection of the class prototype and the feature sample of the target domain, the conditional probability that the feature sample of the target domain belongs to each category is calculated.

[0116] Specifically, the projection of the feature samples of the source domain and the feature samples of the target domain in the subspace is expressed as:

[0117]

[0118] in, is the source domain feature, is the target domain feature, z s is the projection in the source domain feature subspace z, t is the projection of the target domain features in the subspace z;

[0119] Use mean subtraction on all projections so that in, It is the average value of all projections and is normalized to the subspace using L2, making the separability of feature samples of different categories in the subspace more obvious;

[0120] The mean vector of the projected source features with label v Using indicator functions Instead of the weight function when The value is 1 when , otherwise it is 0, and the L2 normalization operation is performed on the class prototype to obtain

[0121] Use K-means algorithm to project vector z of all target features t Generate the same number of clusters as the class prototype, calculate the class prototype of the target feature sample, and use it as the initial cluster center of the target feature sample, connect the cluster of the target domain with the class prototype of the source domain, so that the sum of the distances of all matching pairs between the cluster center and the class prototype is minimized, and the cluster target is expressed as:

[0122]

[0123] Where H∈{0,1} |V|×|V| is a one-to-one matching matrix, |V| is the number of different categories, H ij = 1 means the i-th target cluster matches the j-th source cluster, and we get

[0124] In the embodiment of the present application, clustering is performed on the projection vector of the feature sample of the target domain using a clustering algorithm to generate the same number of cluster centers as the class prototype, and the cluster centers are used as the initialization cluster centers of the feature sample of the target domain and are associated with the class prototype of the source domain;

[0125] The clusters of the target domain are matched with the class prototypes of the source domain by minimizing the sum of the distances of all matching pairs between the cluster centers and the class prototypes;

[0126] The pseudo-labeling method that combines the closest class prototype and the method based on structured prediction is expressed as:

[0127]

[0128] The final pseudo label is expressed as:

[0129]

[0130] in, is a feature sample of a given target domain The conditional probability of belonging to class v, For the given conditions Next, the conditional probability of class v is, is the distance function, V is the set of all category combinations, and exp(〃) is the exponential function;

[0131] Using feature samples from the source domain with true labels and feature samples from the target domain with pseudo labels, the projection matrix and pseudo labels are updated through an iterative learning algorithm based on selective pseudo labels. In each iteration, the target features and their corresponding pseudo labels are selected for learning.

[0132] After the iterative learning is completed, the adversarial neural network model is trained using the updated projection matrix and pseudo labels to obtain the fault diagnosis results.

[0133] Specifically, unsupervised domain adaptation techniques are preferred, including latent subspace learning, conditional domain adversarial neural networks, locality preserving projections, and selective pseudo-labeling strategies;

[0134] It should be noted that compared with traditional methods, unsupervised domain adaptation technology is more adaptable and can maintain good performance even when there is a large distribution difference between the source domain and the target domain. This adaptability is particularly important for the complex environments faced in actual industrial applications. Through the selective pseudo-label strategy, this method performs well in dealing with class imbalanced data. This is something that traditional supervised learning methods are usually unable to deal with effectively. Through the combination of local preservation projection and conditional domain adversarial network, this method enhances the ability to capture and align local features, making the fault diagnosis process more robust and accurate.

[0135] The above is a schematic scheme of a structured prediction unsupervised industrial fault diagnosis method of this embodiment. It should be noted that the technical scheme of the structured prediction unsupervised industrial fault diagnosis device and the technical scheme of the structured prediction unsupervised industrial fault diagnosis method described above belong to the same concept, and the details of the technical scheme of the structured prediction unsupervised industrial fault diagnosis device not described in detail in this embodiment can all be referred to the description of the technical scheme of the structured prediction unsupervised industrial fault diagnosis method described above.

[0136] The device for unsupervised industrial fault diagnosis based on structured prediction in this embodiment includes:

[0137] A data mixing module is used to obtain fault data and real data, divide the real data into target domain data and real sample data, and mix the fault data and the real sample data to obtain source domain data;

[0138] A feature extraction module is used to train a conditional domain adversarial neural network using source domain data and target domain data, align the source domain data and target domain data, and use a feature extractor to extract domain-invariant features of the source domain data and target domain data to obtain feature samples of the source domain and feature samples of the target domain;

[0139] A projection module is used to normalize the feature samples of the source domain and the feature samples of the target domain respectively to obtain a first source domain feature sample and a first target domain feature sample, and project the first source domain feature sample and the first target domain feature sample into the same subspace by using a local preservation projection algorithm to perform secondary alignment;

[0140] The classification module is used to assign pseudo labels to the first target domain feature samples to learn the domain invariant subspace of the source domain data and the target domain data, and obtain a projection matrix, solve the projection matrix, and classify the first target domain feature samples using a classifier according to the solution result.

[0141] This embodiment also provides a computing device suitable for unsupervised industrial fault diagnosis of structured prediction, including:

[0142] Memory and processor; the memory is used to store computer executable instructions, and the processor is used to execute computer executable instructions to implement the unsupervised industrial fault diagnosis method for structured prediction proposed in the above embodiment.

[0143] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the unsupervised industrial fault diagnosis method for implementing structured prediction as proposed in the above embodiment is implemented.

[0144] The storage medium proposed in this embodiment and the unsupervised industrial fault diagnosis method for implementing structured prediction proposed in the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0145] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ReadOnly, Memory, ROM), random access memory (RandomAccess Memory, RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform the methods of various embodiments of the present invention.

[0146] Example 2

[0147] Referring to Table 1, this embodiment is different from the first embodiment in that it provides a verification test of a structured prediction unsupervised industrial fault diagnosis method to verify and illustrate the technical effects used in this method.

[0148] The driver-side accelerometer data sampled at 12kHz was used to preprocess the data, and the acceleration data was divided into 4096 blocks, from which 100 blocks were selected for analysis. A Butterworth bandpass filter was used to separate the relevant frequency range from the acceleration data of each block. The signal was rectified and low-pass filtered to obtain the envelope signal. The Fourier transform of the normalized envelope signal was calculated to obtain the envelope spectrum, which was normalized by dividing by the square root of the signal length. 1200 samples were provided for each signal, each containing 4096 points, for a total of 4800 samples, as the target data.

[0149] The healthy samples are divided and half are used to generate synthetic source data, thus increasing the number of healthy samples in both domains to 1200. Basic signals are generated from healthy samples, and error patterns are introduced by interpolation to generate real defect signals, synthesizing a class-balanced fault dataset as the source domain;

[0150] The synthesis of fault signals relies on the availability of real healthy signals. A standardized procedure is used to generate synthetic bearing fault signals, where the synthetic data η(t) is expressed as:

[0151]

[0152] where η(t) is the synthetic data, s is the oscillation waveform caused by a single shock caused by the rollover of a surface defect with a period T, m is the additive background noise term set equal to the vibration record of the healthy bearing, the parameter ρ follows a uniform distribution between 0.25 and 2, and the waveform s is modeled as a single shock using a Hann window with a duty cycle of 5% relative to T.

[0153] C i is the sum of cosine functions, defined as:

[0154]

[0155] where α is a normal distribution with unit mean and standard deviation of 0.1, P represents the sideband, and v is the amplitude set to [1, 0.76, 0.38, 0.11, 0.05].

[0156] Imbalances of multiple fault types are simulated in the target domain to create a highly imbalanced target dataset. The unlabeled target dataset consists of N = 1200 healthy samples, with 10% × N samples of OF, 5% × N samples of IF, and 1% × N samples of REF.

[0157] The iterative learning method focusing on selective pseudo-labeling includes: (1) Loading data files of the source and target domains. (2) Performing L2 normalization on the features of the source and target domains. (3) Computing the labels of the source and target domains and adding 1 to them (in order to start counting from 0). (4) Calculating the number of categories in the target domain. (5) Experimenting with different classifier methods, including 1-NN, NC (nearest neighbor classifier), and SVM (support vector machine). (6) Performing domain adaptation using the proposed DA_LPP_SP method, which uses the LPP (local linear embedding) algorithm. (7) Calculating the average accuracy and confusion matrix for each category.

[0158] Table 1 Average accuracy results

[0159]

[0160] The feature dimension d is set to 128, and there are 11 iterations in total. After each iteration, the overall accuracy and the average accuracy of each category are calculated. From the results in Table 1, it can be seen that with the increase in the number of iterations, the overall accuracy and the average accuracy of each category are gradually improving. At the 11th iteration, the overall accuracy reached 0.911, and the average accuracy of each category also gradually increased, reaching a maximum of 0.9106. This shows that the method of unsupervised domain adaptation using 1-NN classifier is effective and can improve the classification performance of target domain data.

[0161] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

[0162] Example 3

[0163] Referring to Table 2-3, a structured prediction unsupervised industrial fault diagnosis method is provided to verify and illustrate the technical effects used in this method.

[0164] Compare the proposed architecture with other common unsupervised fault diagnosis methods (Basline, DANN, CDAN, CDAN+Mixup);

[0165] Table 2 Comparison results of common methods on the CWRU dataset under the same experimental conditions

[0166]

[0167] As shown in Table 2, this method increases the amount of training data by synthesizing faults. Without any domain alignment, the accuracy of the baseline method reaches 61.4%, which is much higher than the random guessing performance of 25%.

[0168] Although the DANN method has obvious performance improvements for both class-balanced and class-imbalanced situations, the 67.85% accuracy of the class-imbalanced experiment is much lower than the 79.00% of the class-balanced experiment. Obviously, in the more realistic class-imbalanced situation, the DANN performance is poor and needs to be improved. On this basis, considering the additional class information, the CDAN method that performs conditional alignment on the basis of DANN edge alignment has an absolute improvement of 6% in the unbalanced state;

[0169] The CDAN+Mixup method based on CDAN has achieved a 10.4% improvement over the DANN method through data enhancement. By using selective pseudo-labels based on structured predictions for conditional alignment, the accuracy can be increased to 91.06%, an absolute improvement of 12.81% over the advanced CDAN+Mixup method, and an absolute improvement of 23.21% over the standard DANN method. The accuracy is not even lower than the accuracy in the balanced state, which makes this method no longer need to consider the balance and imbalance of categories. For unpredictable tasks in the real world, the degree of category balance varies, which provides great confidence in this method.

[0170] To demonstrate the effectiveness of the proposed method for different degrees of class imbalance, the number of samples of rolling element faults was varied. For example, when the balance level is 1%, the unlabeled target training data contains 1%*1200=12 samples of the rolling element fault class, while each of the other classes has 1200 samples. In the 10% setting, the target set contains 10%*1200=120 samples of the rolling element fault class. Smaller balance level values ​​(1%) indicate larger class imbalance levels because the number of faults is much smaller compared to the number of healthy class samples.

[0171] Table 3 Experiments on CWRU synthesis to real data, with different degrees of imbalance for single faults

[0172]

[0173] As can be seen from Table 3, DANN can perform well when all classes are balanced, but it drops sharply when the balance level decreases. Conditional alignment alone shows resistance to degradation caused by class imbalance by considering class information. However, the performance gap still exists and the performance becomes less stable as the balance level decreases. Through structured prediction of subspaces, our method can significantly enhance the alignment quality and achieve a similar performance level to the balanced dataset even when there are only 1% rolling element fault samples in the target dataset, which proves the effectiveness of our method.

[0174] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A structured prediction unsupervised industrial fault diagnosis method, characterized in that: include: Acquire fault data and real data, divide the real data into target domain data and real sample data, mix the fault data and the real sample data to obtain source domain data; Using source domain data and target domain data to train a conditional domain adversarial neural network, aligning the source domain data and the target domain data, and using a feature extractor to extract domain-invariant features of the source domain data and the target domain data to obtain feature samples of the source domain and feature samples of the target domain; Normalizing the feature samples of the source domain and the feature samples of the target domain respectively to obtain a first source domain feature sample and a first target domain feature sample, and projecting the first source domain feature sample and the first target domain feature sample into the same subspace by using a local preservation projection algorithm to perform secondary alignment; Assign pseudo labels to the first target domain feature samples to learn the domain invariant subspace of the source domain data and the target domain data, and obtain a projection matrix, solve the projection matrix, and classify the first target domain feature samples using a classifier according to the solution result.

2. The unsupervised industrial fault diagnosis method of structured prediction as claimed in claim 1, characterized in that: Using source domain data and target domain data to train a conditional domain adversarial neural network includes: Use feature extractors to extract features from source domain data and target domain data, and apply multilinear mapping to the features; Train the domain discriminator and the target classifier, and pit the target classifier against the domain discriminator; Define loss functions, including classification loss and domain adversarial loss; The classification loss is expressed as: in, is the minimum classification loss on the source domain, is the classification loss of a single sample in the source domain, u s is the feature of the source domain, v s is the label of the corresponding feature in the source domain, ε is the parameter of the model, μ is the parameter of the target classifier, f is the feature extractor, g μs The function that classifies the features on the source domain for the target classifier.

3. The unsupervised industrial fault diagnosis method of structured prediction as claimed in claim 2, characterized in that: The domain adversarial losses include: The domain adversarial loss is expressed as: in, is the maximum domain adversarial loss, is the adversarial loss on the source and target domains, ω is the parameter of the domain discriminator, is a multilinear mapping, h ω is the domain discriminator, G s and G t are the datasets of the source domain and the target domain, f s (u s ) and f t (u t ) are the source domain and target domain feature extraction functions respectively, g s (u s ) and g t (u t ) are functions for further processing of features; The optimization algorithm is used to perform gradient descent on the loss function, and the parameters of the adversarial neural network model are updated through back propagation. After training, the adversarial neural network model outputs feature samples of the source domain and feature samples of the target domain.

4. The unsupervised industrial fault diagnosis method of structured prediction as claimed in claim 3, characterized in that: The projection matrix consists of: Concatenate the feature samples of the source domain and the feature samples of the target domain into a matrix; Through supervised local preservation projection, the domain invariant subspace of the source domain and the target domain is learned from the matrix, and the following formula is solved to obtain the projection matrix represented as: Among them, M is the projection matrix, U is the set of labeled source domain data and pseudo-labeled target domain data, N is the Laplacian matrix, B is the degree matrix, K is the number of iterations in the learning process, tr(·) is the regularization term, and I is the identity matrix.

5. The unsupervised industrial fault diagnosis method of structured prediction as claimed in claim 4, characterized in that: Solving the projection matrix includes: The projection matrix is ​​solved by generalized eigenvalue decomposition, which is expressed as: (UBU K -λUNU K )M=λIM, and the optimal solution is M=[m1,m2,...,m a ], where λ is the regularization parameter, m1,m2,...,m a is the eigenvector corresponding to the largest eigenvalue.

6. The unsupervised industrial fault diagnosis method of structured prediction as claimed in claim 5, characterized in that: Assigning a pseudo label to the first target domain feature sample includes: The projection matrix is ​​used to calculate the projections of the feature samples of the source domain and the feature samples of the target domain in the subspace respectively, and the average subtraction is used for all projections to obtain the average value of all projections; The average value of all projections is normalized to the subspace to obtain feature samples of different categories and determine the class prototype of each category. The class prototype is defined as the mean vector of the projection source feature with label v, which is expressed as: in, is the mean vector of the projected source features with label v, is the eigenvector of the i-th projection, is an exponential function; Using the projection of the class prototype and the feature sample of the target domain, the conditional probability that the feature sample of the target domain belongs to each category is calculated.

7. The unsupervised industrial fault diagnosis method of structured prediction as claimed in claim 5 or 6, characterized in that: Also includes: A clustering algorithm is used to cluster the projection vectors of the feature samples of the target domain, and the same number of cluster centers as the class prototypes are generated. The cluster centers are used as the initial cluster centers of the feature samples of the target domain and are linked to the class prototypes of the source domain. The clusters of the target domain are matched with the class prototypes of the source domain by minimizing the sum of the distances of all matching pairs between the cluster centers and the class prototypes; The pseudo-labeling method that combines the closest class prototype and the method based on structured prediction is expressed as: The final pseudo label is expressed as: in, is a feature sample of a given target domain The conditional probability of belonging to class v, For the given conditions Next, the conditional probability of class v is, is the distance function, V is the set of all category combinations, and exp(·) is the exponential function; Using feature samples from the source domain with true labels and feature samples from the target domain with pseudo labels, the projection matrix and pseudo labels are updated through an iterative learning algorithm based on selective pseudo labels. In each iteration, the target features and their corresponding pseudo labels are selected for learning. After the iterative learning is completed, the adversarial neural network model is trained using the updated projection matrix and pseudo labels to obtain the fault diagnosis results.

8. A system for unsupervised industrial fault diagnosis method based on structured prediction, characterized in that: include: A data mixing module is used to obtain fault data and real data, divide the real data into target domain data and real sample data, and mix the fault data and the real sample data to obtain source domain data; A feature extraction module is used to train a conditional domain adversarial neural network using source domain data and target domain data, align the source domain data and target domain data, and use a feature extractor to extract domain-invariant features of the source domain data and target domain data to obtain feature samples of the source domain and feature samples of the target domain; A projection module is used to normalize the feature samples of the source domain and the feature samples of the target domain respectively to obtain a first source domain feature sample and a first target domain feature sample, and project the first source domain feature sample and the first target domain feature sample into the same subspace by using a local preservation projection algorithm to perform secondary alignment; The classification module is used to assign pseudo labels to the first target domain feature samples to learn the domain invariant subspace of the source domain data and the target domain data, and obtain a projection matrix, solve the projection matrix, and classify the first target domain feature samples using a classifier according to the solution result.

9. An electronic device, characterized in that: The device comprises: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.