A Fault Diagnosis Method Based on Classifier Difference Soft Weight Adaptive Network

By constructing a cross-working condition fault diagnosis model based on the method of classifier differential soft-weight adaptive network, it solves the problem of reduced fault diagnosis performance of traditional methods under domain shift and achieves high accuracy and robustness under changing working conditions. Excellent troubleshooting.

CN116106008BActive Publication Date: 2024-09-06SUZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211699746.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-28
Publication Date
2024-09-06
Estimated Expiration
2042-12-28

AI Technical Summary

Technical Problem

Traditional machine learning methods are difficult to effectively diagnose faults under domain shift, especially under variable operating conditions of bearings, resulting in a decline in diagnostic performance, and it is difficult to solve the problem of differences in fault types of different equipment.

Method used

A method based on classifier difference soft weight adaptive network is used to collect vibration data under different working conditions through sensors to build a cross-working condition fault diagnosis model. Feature extractors, state classifiers and outlier classifiers are used for pre-training and pseudo-training. Label learning, obtains cross-domain shared label space and private label space, constructs supervision and difference loss functions, and realizes cross-domain fault diagnosis.

Benefits of technology

It effectively solves the problem of type differences under domain migration, improves the accuracy and robustness of fault diagnosis under variable working conditions, and is suitable for open set migration fault diagnosis tasks in actual industrial production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116106008B
    Figure CN116106008B
Patent Text Reader

Abstract

The present invention discloses a fault diagnosis method, device, equipment and computer-readable storage medium based on a classifier difference soft weight adaptive network. The present invention consists of three parts: a feature extractor, an outlier classifier and two state classifiers. The feature extractor is used to extract transferable features of different categories in a source domain and a target domain. Two different state classifiers perform label prediction based on the extracted transferable features. The outlier classifier performs pseudo-label learning on target domain samples, thereby automatically separating shared class and outlier class samples. The present invention constructs a sample soft weight term to adaptively measure the probability that the target sample belongs to a cross-domain shared label space, and designs a weighted classifier difference loss to obtain cross-domain invariant features of shared class samples. The present invention has high diagnostic accuracy and strong robustness, is suitable for open set migration fault diagnosis tasks under variable working condition type differences, and can be widely used in machinery, electricity, chemical industry, aviation and other fields.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of mechanical fault diagnosis and machine learning technology, and in particular to a fault diagnosis method, device, equipment and computer-readable storage medium based on a classifier difference soft weight adaptive network. Background Art

[0002] Driven by the technological level, modern industry is developing in the direction of informatization and intelligence. As an important carrier of modern industry, the failure of industrial equipment will not only cause huge economic losses, but also bring potential casualties. Bearings are an indispensable part of industrial equipment. They need to work for a long time in harsh environments such as high temperature and high pressure, which will inevitably lead to unexpected failures of bearings. Therefore, it is very important to monitor the health status of bearings.

[0003] Traditional machine learning methods often require a lot of expertise and complex feature engineering, which means manual processing by professionals. First, perform in-depth exploratory data analysis on the data set, then use principal component analysis or other methods to reduce the dimensionality of the data, and finally extract features. The most troublesome step is the manual feature extraction step. There is not much overlap in expertise in different fields. When studying problems in different fields, it is often necessary for multiple professionals in the field to perform manual feature extraction, which greatly increases the research cost.

[0004] Common neural network methods, such as convolutional neural networks and deep belief networks, have shown good performance in fault diagnosis tasks. However, these methods are essentially statistical methods, in which a basic assumption must be met, that is, the probability distribution of training data should be highly similar to the probability distribution of test data. In actual engineering scenarios, this assumption is difficult to meet because machines often operate in complex, time-varying working environments, resulting in differences in data distribution. This phenomenon is called the domain shift problem, which greatly reduces the diagnostic performance of traditional deep learning models under variable working conditions. At the same time, another problem is that different devices in variable working environments will have some faults of the same type and different types, which leads to the problem of different fault types of equipment.

[0005] From the above, it can be seen that solving the type difference problem under domain shift and establishing a reliable and effective intelligent diagnosis model are important technical issues in actual industrial production. Summary of the invention

[0006] The purpose of the present invention is to provide a fault diagnosis method based on a classifier difference soft weight adaptive network, which solves the type difference problem under domain offset and can be used in actual industrial production.

[0007] In order to solve the above technical problems, the present invention provides a fault diagnosis method based on a classifier difference soft weight adaptive network, comprising:

[0008] The vibration data under different working conditions are collected by using sensors, and the vibration data collected under each working condition is used as a transferable domain, and the vibration data in each transferable domain is cut to form samples;

[0009] A transferable domain is randomly selected as a source domain sample and another transferable domain is selected as a target domain sample, wherein the source domain sample has a label and the target domain sample does not have a label, and a cross-operating condition fault diagnosis model is constructed based on a feature extractor, two state classifiers and an outlier classifier;

[0010] Input the source domain sample into the feature extractor to obtain sample high-level features, use the two state classifiers to respectively predict sample labels on the sample high-level features to obtain label prediction feature vectors, minimize the loss of sample label prediction and sample label, and obtain a pre-trained feature extractor and two pre-trained state classifiers;

[0011] Inputting the source domain sample and the target domain sample into the pre-trained feature extractor to obtain features of the source domain and the target domain samples, and using the pre-trained two-state classifier to perform sample label prediction on the high-level features of the target sample to obtain a target domain sample label prediction feature vector and a source domain sample label prediction feature vector;

[0012] Inputting the target domain sample label prediction feature vector into the outlier classifier to obtain a pseudo label of the predicted target domain sample, and performing pseudo label learning to obtain an outlier classifier loss function;

[0013] Based on the target domain sample label prediction feature vector, the probability that the target domain sample soft weight item belongs to the cross-domain shared label space in different samples is obtained, and the cross-domain shared label space and the private label space are obtained;

[0014] Perform supervised learning on the source domain samples using the shared label space to obtain a source domain supervised classification loss function, and construct a difference loss function of two state classifiers according to the target domain sample soft weight terms;

[0015] The objective function is formed by combining the source domain supervised classification loss function, the two state classifier difference loss functions and the outlier classifier loss function, and optimized by gradient descent method to obtain a trained cross-operating condition fault diagnosis model;

[0016] The sample to be tested is input into the trained cross-operating condition fault diagnosis model to obtain a fault diagnosis result.

[0017] Preferably, the method of collecting vibration data under different working conditions by using sensors, and taking the vibration data collected under each working condition as a transferable domain, and cutting the vibration data in each transferable domain to form samples comprises:

[0018] Use acceleration sensors to collect bearing vibration acceleration data under different working conditions and fault types;

[0019] The bearing vibration acceleration data under each working condition is regarded as a transferable domain. The data in each domain obeys different characteristic distributions and the fault types are different.

[0020] Cutting the bearing vibration acceleration data according to a preset sampling point book to obtain a plurality of data samples;

[0021] Perform fast Fourier transform on all data samples, convert the time domain data samples into frequency domain data samples, and perform dimension processing on the frequency domain data samples to obtain a plurality of processed samples.

[0022] Preferably, the randomly selecting a transferable domain as a source domain sample and another transferable domain as a target domain sample comprises:

[0023] Select a transferable domain under a working condition as the source domain Ds = {(Xs, Cs)}, where Xs and Cs are the source domain sample feature space and label space respectively. There are ns labeled samples. and sample labels composition;

[0024] Select a transferable domain different from the source domain space as the target domain D t ={(Xt,Ct)}, where Xt and Ct are the target domain sample feature space and label space respectively, From nt unlabeled samples composition;

[0025] Among them, Ds and Dt come from different probability distributions P s (X) and P t (X), P s (X) is the source domain probability distribution, P t (X) is the target domain probability distribution.

[0026] Preferably, the inputting of the source domain sample into the feature extractor to obtain sample high-level features, using the two state classifiers to respectively predict sample labels on the sample high-level features to obtain label prediction feature vectors, minimizing the loss of sample label prediction and sample label, and obtaining a pre-trained feature extractor and pre-trained two state classifiers includes:

[0027] The feature extractor G is used to extract the sample high-level features in the source domain samples, and the calculation formula is:

[0028]

[0029] in, is the jth source domain sample, is the high-level feature extracted from the jth sample in the pre-training phase;

[0030] The two state classifiers are used to predict the sample labels of the sample high-level features respectively, and the softmax function is used to calculate the loss of the sample real label and the predicted label;

[0031] Until the loss function is minimized, the pre-trained feature extractor and the two state classifiers are obtained.

[0032] Preferably, the step of inputting the source domain sample and the target domain sample into the pre-trained feature extractor to obtain features of the source domain and the target domain samples, and using the pre-trained two-state classifier to perform sample label prediction on the high-level features of the target sample to obtain a target domain sample label prediction feature vector and a source domain sample label prediction feature vector comprises:

[0033] The source domain samples and the target domain samples are simultaneously input into the feature extractor to obtain the high-level features of the source domain samples. and high-level features of target domain samples

[0034] The high-level features of the source domain samples and the target domain sample high-level features Both are input into the two state classifiers for state prediction, and the source domain sample label prediction feature vector is obtained. And the target domain sample label prediction feature vector

[0035] Among them, i is the serial number of the state classifier, and j is the serial number of the sample.

[0036] Preferably, the target domain sample label prediction feature vector is input into the outlier classifier to obtain a pseudo label of the predicted target domain sample, and pseudo label learning is performed to obtain an outlier classifier loss function:

[0037] The target domain sample label prediction feature vector is input into the outlier classifier, and the binary softmax function is used to predict the pseudo label p of the target domain sample. o (x t );

[0038] Collect all pseudo labels to get the pseudo label sample set Γ pseudo, calculate the outlier classifier loss function

[0039] in, For p o (x t ), the kth unit value, x t is the target domain sample set, y i is the predicted label, I is the consistency function, For p o (x t )’s mth cell value.

[0040] Preferably, the predicting feature vector based on the target domain sample label, obtaining the probability that the target domain sample soft weight item belongs to the cross-domain shared label space in different samples, and obtaining the cross-domain shared label space and the private label space includes:

[0041] Using the formula Calculate the soft weight of the target domain sample and the probability that different samples belong to the cross-domain shared label space

[0042] Based on the weights of the target domain samples Obtaining the cross-domain shared label space and the private label space;

[0043] in, For the target sample The probability of belonging to class c is, for The cth unit value of , K is the number of cross-domain shared categories, and Z is the normalized vector such that

[0044] Preferably, the using the shared label space to perform supervised learning on the source domain samples to obtain a source domain supervised classification loss function, and constructing two state classifier difference loss functions according to the target domain sample soft weight terms includes:

[0045] Perform supervised learning on the source domain samples based on the shared label space, and calculate the source domain supervised classification loss of each state classifier

[0046] Construct the source domain supervised total classification loss based on the source domain supervised classification loss of each state classifier

[0047] According to the weight of the target domain samples Calculate the classifier difference loss function, which is expressed as:

[0048] in, is the source domain shared label sample set, y i is the predicted label, I is the consistency function, xs is the source domain sample set, Predict the k unit values ​​of the feature vector set for the source domain sample label of the i-th state classifier, is the label prediction vector set of the jth sample in the source domain of the i-th state classifier, are two state classifiers, and ||·||1 is the sum of the absolute values ​​of the prediction differences between state classifier 1 and state classifier 2.

[0049] The present invention also provides a fault diagnosis device based on a classifier difference soft weight adaptive network, comprising:

[0050] An acquisition module is used to use sensors to collect vibration data under different working conditions, and use the vibration data collected under each working condition as a transferable domain, and cut the vibration data in each transferable domain to form samples;

[0051] Constructing a data and model module, for randomly selecting a transferable domain as a source domain sample and another transferable domain as a target domain sample, wherein the source domain sample has a label and the target domain sample does not have a label, and constructing a cross-operating condition fault diagnosis model based on a feature extractor, two state classifiers and an outlier classifier;

[0052] A pre-training module, used for inputting the source domain sample into the feature extractor to obtain sample high-level features, using the two state classifiers to respectively predict sample labels on the sample high-level features to obtain label prediction feature vectors, so as to minimize the loss of the sample label prediction and the sample label, and obtain a pre-trained feature extractor and two pre-trained state classifiers;

[0053] A training module, used for inputting the source domain samples and the target domain samples into the pre-trained feature extractor, obtaining features of the source domain and the target domain samples, and using the pre-trained two-state classifier to perform sample label prediction on the high-level features of the target samples, to obtain a target domain sample label prediction feature vector and a source domain sample label prediction feature vector;

[0054] A training pseudo-label module is used to input the target domain sample label prediction feature vector into the outlier classifier to obtain a pseudo-label of the predicted target domain sample, and perform pseudo-label learning to obtain an outlier classifier loss function;

[0055] A weight calculation module is used to predict a feature vector based on the target domain sample label, obtain the probability that the target domain sample soft weight item belongs to the cross-domain shared label space in different samples, and obtain the cross-domain shared label space and the private label space;

[0056] A supervised learning module is used to perform supervised learning on the source domain samples using the shared label space to obtain a source domain supervised classification loss function, and to construct a difference loss function between two state classifiers according to the target domain sample soft weight terms;

[0057] An optimization model module is used to form an objective function by combining the source domain supervised classification loss function, the two state classifier difference loss functions and the outlier classifier loss function, and optimize using a gradient descent method to obtain a trained cross-operating condition fault diagnosis model;

[0058] The testing module is used to input the sample to be tested into the trained cross-operating condition fault diagnosis model to obtain the fault diagnosis result.

[0059] The present invention also provides a fault diagnosis device based on a classifier difference soft weight adaptive network, comprising:

[0060] The memory is used to store computer programs; the processor is used to implement the steps of the above-mentioned fault diagnosis method based on classifier difference soft weight adaptive network when executing the computer program.

[0061] The present invention provides a fault diagnosis method based on classifier difference soft weights. First, vibration acceleration signals from different working conditions and different fault types are collected and preprocessed into input samples; second, a feature extractor, an outlier classifier and two state classifiers are constructed; third, the feature extractor and the state classifier are pre-trained using source domain samples; fourth, the pre-trained feature extractor and state classifier are migrated to the training stage to perform cross-domain feature alignment of shared class samples and separation of unknown classes; finally, the method is fully trained to convergence, and the well-trained feature extractor and two state classifiers are used to predict the test samples to obtain the test performance of the method; the training strategy of the present invention is a novel training method, which can realize domain-invariant feature extraction of shared class samples and outlier class sample detection under type differences, and has an excellent cross-domain open set diagnosis effect. The present invention has a high degree of exemplaryness and robustness, and is very suitable for open set migration fault diagnosis tasks under variable working conditions. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 paying creative work.

[0063] Figure 1A flowchart of a first specific embodiment of the fault diagnosis method based on classifier difference soft weight adaptive network provided by the present invention;

[0064] Figure 2 A flowchart of a second specific embodiment of the fault diagnosis method based on the classifier difference soft weight adaptive network provided by the present invention;

[0065] Figure 3 A block diagram showing the principle of the fault diagnosis method based on the classifier difference soft weight adaptive network provided by the present invention;

[0066] Figure 4 is a diagram of the fault diagnosis accuracy of different migration tasks of the present invention;

[0067] Figure 5 A structural block diagram of a fault diagnosis device based on a classifier difference soft weight adaptive network provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0068] The core of the present invention is to provide a fault diagnosis method based on a classifier difference soft weight adaptive network, design a new open set domain adaptation framework, and effectively solve the fault migration diagnosis problem under domain offset type differences.

[0069] In order to enable those skilled in the art to better understand the scheme of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0070] Please refer to Figure 1 , Figure 1 This is a flow chart of a first specific embodiment of the fault diagnosis method based on classifier difference soft weight adaptive network provided by the present invention; the specific operation steps are as follows:

[0071] Step S101: using a sensor to collect vibration data under different working conditions, and taking the vibration data collected under each working condition as a transferable domain, and cutting the vibration data in each transferable domain to form a sample;

[0072] Step S102: randomly selecting a transferable domain as a source domain sample and another transferable domain as a target domain sample, wherein the source domain sample has a label and the target domain sample does not have a label, and constructing a cross-operating condition fault diagnosis model based on a feature extractor, two state classifiers and an outlier classifier;

[0073] Step S103: inputting the source domain sample into the feature extractor to obtain sample high-level features, using the two state classifiers to respectively predict sample labels on the sample high-level features to obtain label prediction feature vectors, minimizing the loss of sample label prediction and sample label, and obtaining a pre-trained feature extractor and pre-trained two state classifiers;

[0074] Step S104: inputting the source domain sample and the target domain sample into the pre-trained feature extractor to obtain features of the source domain and target domain samples, and using the pre-trained two-state classifier to perform sample label prediction on the high-level features of the target sample to obtain a target domain sample label prediction feature vector and a source domain sample label prediction feature vector;

[0075] Step S105: inputting the target domain sample label prediction feature vector into the outlier classifier to obtain a pseudo label of the predicted target domain sample, and performing pseudo label learning to obtain an outlier classifier loss function;

[0076] Step S106: based on the target domain sample label prediction feature vector, obtain the probability that the target domain sample soft weight item belongs to the cross-domain shared label space in different samples, and obtain the cross-domain shared label space and the private label space;

[0077] Step S107: using the shared label space to perform supervised learning on the source domain samples to obtain a source domain supervised classification loss function, and constructing two state classifier difference loss functions according to the target domain sample soft weight terms;

[0078] Step S108: combining the source domain supervised classification loss function, the two state classifier difference loss functions and the outlier classifier loss function to form an objective function, optimizing it using the gradient descent method, and obtaining a trained cross-operating condition fault diagnosis model;

[0079] Step S109: input the sample to be tested into the trained cross-operating condition fault diagnosis model to obtain a fault diagnosis result.

[0080] The advantages of the present invention are:

[0081] 1. A new open set domain adaptation framework is designed to effectively solve the fault migration diagnosis problem under different domain offset types.

[0082] 2. A soft weight term is designed to adaptively measure the probability that the target sample belongs to the shared label space.

[0083] 2. A weighted classifier difference loss function is designed to promote domain-invariant feature learning of cross-domain shared class samples.

[0084] 3. An outlier classifier is designed to enhance the robustness of the decision boundary between shared class samples and outlier class samples in the target domain.

[0085] In this embodiment, first, vibration acceleration signals from different working conditions and different fault types are collected and preprocessed into input samples; second, feature extractors, outlier classifiers and two state classifiers are constructed; third, source domain samples are used to pre-train feature extractors and state classifiers; fourth, the pre-trained feature extractors and state classifiers are transferred to the training stage to perform cross-domain feature alignment of shared class samples and separation of unknown classes; finally, the method is fully trained to convergence, and the well-trained feature extractors and two state classifiers are used to predict the test samples to obtain the test performance of the method. The training strategy of the present invention is a novel training method that can achieve domain-invariant feature extraction and outlier sample detection of shared class samples under type differences, and has excellent cross-domain open set diagnosis effects. The present invention has a high degree of exemplarity and robustness, and is very suitable for open set migration fault diagnosis tasks under variable working conditions.

[0086] Based on the above embodiment, the bearing vibration data used in this embodiment is collected from the fault diagnosis laboratory. The test system includes a motor (rated speed: 1450RMP; rated frequency: 50Hz), a plum coupling and a main shaft with a normal bearing, and a loading device connected to the test bearing. In addition, the test system also has an acceleration sensor (model: PCBM621B40; sensitivity: 10mv / g), a signal acquisition instrument (model: INV3018C) and a computer. Please refer to Figure 2 and Figure 3 , Figure 2 A flowchart of a second specific embodiment of the fault diagnosis method based on the classifier difference soft weight adaptive network provided by the present invention; Figure 3 This is a principle block diagram of the fault diagnosis method based on the classifier difference soft weight adaptive network provided by the present invention; the specific steps are as follows:

[0087] Step S201: using a test bench to collect bearing fault data sets under ten working conditions, and preprocessing the data sets;

[0088] S11: A bearing fault data set containing ten health states was constructed using the signals collected by the test bench (0.2mm inner ring fault, 0.2mm roller fault, 0.2mm outer ring fault, 0.3mm inner ring fault, 0.3mm roller fault, 0.3mm outer ring fault, 0.4mm inner ring fault, 0.4mm roller fault, 0.4mm outer ring fault, and normal bearing). Therefore, 10 bearing health states were obtained. As shown in Table 1, each health state has 100 training samples and 100 test samples, and each sample consists of 1024 sampling points.

[0089] Table 1: Ten types of bearing health status information

[0090]

[0091]

[0092] S12: When collecting the measured vibration signal, the motor speed is 896.1r / min and the sensor sampling frequency is 10.6KHz. By adjusting the nut, the radial load of the bearing gradually increases from 0KN to 3KN. According to the different working conditions of the bearing, four different domains are established, as shown in Table 2.

[0093] Table 2: Domain Information

[0094]

[0095] S13: Perform fast Fourier transform (FFT) on the sample. FFT transforms the sample from a time domain signal to a frequency domain signal while retaining the 1×1024 shape, helping the feature extractor to more easily learn the sample discriminant features;

[0096] S14: Samples are reshaped from 1×1024 to 1×32×32. The 1024 points on each channel are divided into 32 parts, each with 32 points, and reconstructed in the new dimension to obtain the ideal shape of 1×32×32.

[0097] Step S202: Select source domain samples and target domain samples, build a cross-operating condition fault diagnosis model based on a feature extractor, two state classifiers and an outlier classifier, and initialize parameters;

[0098] S21: Twelve groups of migration tasks are set. In each group of tasks, several fault types are randomly selected as the source domain label set, and several fault types are randomly selected as the target domain label set. For clear description, the migration tasks and their label information are provided in Table 3;

[0099] Table 3: All migration tasks and label information

[0100]

[0101] S22: Construct a feature extractor, which is essentially a convolutional neural network consisting of three convolutional layers and one fully connected layer; construct an outlier classifier, which is essentially composed of three fully connected layers; construct two state classifiers, state classifier 1 and state classifier 2 have the same structure, both consisting of two fully connected layers. The structured parameter list is as follows:

[0102] Table 4 Structural parameters of feature learner

[0103]

[0104]

[0105] Table 5 Structural parameters of state classifiers 1 and 2

[0106]

[0107] Table 6 Structural parameters of outlier classifier

[0108]

[0109] Step S203: inputting source domain samples into a cross-operating condition fault diagnosis model for pre-training;

[0110] S31: Input the labeled source domain samples into the feature extractor to obtain the high-level features of the samples. The process is as follows:

[0111]

[0112] Where G is the feature extractor, is the jth source domain sample, is the high-level feature extracted from the jth sample in the pre-training phase;

[0113] S32: Then the two state classifiers predict the sample labels based on the extracted high-level features of the samples, and use the softmax function to calculate the loss of the real sample labels and predicted labels. By minimizing the loss, the pre-trained feature extractor and state classifier are obtained. The specific process is shown in the following formula:

[0114]

[0115]

[0116]

[0117] in, is the i-th state classifier For high-level sample features The output, for The kth unit of , C is the number of source domain types.

[0118] Step S204: input the source domain samples and the target domain samples into the pre-trained cross-operating condition fault diagnosis model for training to obtain a label prediction feature vector; based on the target domain sample label prediction feature vector, generate a target sample soft weight term to measure the probability that different samples belong to the cross-domain shared label space, thereby obtaining the cross-domain shared label space and the private label space;

[0119] S41: Migrate the pre-trained feature extractor and state classifier to the training stage to start method training. In the training stage, firstly, the source domain samples and the target domain samples are simultaneously input into the feature extractor to obtain the high-level features of the samples. The process is shown as follows:

[0120]

[0121] in is the high-level features extracted from the j-th sample in the source domain and the j-th sample in the target domain;

[0122] S42: Then, the high-level features of samples in different domains are input into two state classifiers to obtain the sample label prediction feature vector. The process is as follows:

[0123]

[0124] in is the i-th state classifier right The output, is the i-th state classifier right Output:

[0125] S43: Based on the target domain sample label prediction feature vector, a target domain sample soft weight term is generated to measure the probability that different samples belong to the cross-domain shared label space. The calculation formula is as follows:

[0126]

[0127] in, For the target sample The probability of belonging to class c is, for The cth unit value of , K is the number of cross-domain shared categories, and Z is the normalized vector such that

[0128] S44: Based on the target domain sample weight Obtain cross-domain shared label space and private label space.

[0129] Step S205: using the target domain label feature vector to input into the outlier classifier to predict the pseudo label of the target domain sample, thereby performing pseudo label learning of the target domain sample and constructing a loss function;

[0130] The target domain sample label prediction feature vector is input into the outlier classifier, and the binary softmax function is used to predict the pseudo label p of the target domain sample. o (x t );

[0131] Collect all pseudo labels to get the pseudo label sample set Γ pseudo , calculate the outlier classifier loss function

[0132] in, For p o (x t ), the kth unit value, x t is the target domain sample set, y i is the predicted label, I is the consistency function, For p o (x t )’s mth cell value.

[0133] Step S206: applying the target domain sample soft weight term to the classifier difference loss function, performing source domain supervised training based on the source domain shared label space, and constructing the source domain supervised total classification loss;

[0134] Perform supervised learning on the source domain samples based on the shared label space, and calculate the source domain supervised classification loss of each state classifier

[0135] Construct the source domain supervised total classification loss based on the source domain supervised classification loss of each state classifier

[0136] According to the weight of the target domain samples Calculate the classifier difference loss function, which is expressed as:

[0137] in, is the source domain shared label sample set, yi is the predicted label, I is the consistency function, xs is the source domain sample set, Predict the k unit values ​​of the feature vector set for the source domain sample label of the i-th state classifier, is the label prediction vector set of the jth sample in the source domain of the i-th state classifier, are two state classifiers, and ||·||1 is the sum of the absolute values ​​of the prediction differences between state classifier 1 and state classifier 2.

[0138] Step S207: Optimize the parameters of the cross-operating condition fault diagnosis model using the gradient descent method.

[0139] Combine the source domain supervised classification loss function, the difference loss function of the two state classifiers, and the outlier classifier loss function, and use the gradient descent method to update the parameters of the feature extractor, outlier classifier, and state classifier. The specific formula is as follows:

[0140]

[0141] Among them, θg,θ1,θ2,θ o Each is a feature extractor G, a state classifier State Classifier Outlier Classifier C o network parameters.

[0142] The diagnosis results of 12 different migration tasks in this embodiment are as follows: Figure 4 As shown in the figure, the average accuracy of the diagnostic tasks under 12 variable working conditions reaches 85.50%, which is significantly better than the existing methods. This shows that the present invention can handle the open set migration fault diagnosis tasks under variable working conditions very well.

[0143] The present invention discloses a fault diagnosis method based on a classifier difference soft weight adaptive network. Based on the target domain sample prediction feature vector, the method generates a target sample soft weight term to measure the probability that different samples belong to a cross-domain shared label space, thereby obtaining a cross-domain shared label space and a private label space. At the same time, the obtained soft weight term is applied to the classifier difference loss function to ensure that the network can learn the cross-domain invariant features of the shared category. In addition, the outlier classifier is used to learn the pseudo-labels of the unlabeled target domain samples, thereby further optimizing the decision boundaries of the target domain shared samples and outlier samples. The superiority and robustness of the method are confirmed by experimental verification and comparison with a variety of popular methods. A research result of this paper shows that the proposed method realizes reliable open set migration fault diagnosis under different working condition types; therefore, the proposed method is a forward-looking direction for realizing open set migration fault diagnosis.

[0144] Please refer to Figure 5 , Figure 5 A structural block diagram of a device for fault diagnosis based on a classifier difference soft weight adaptive network provided by an embodiment of the present invention; the specific device may include:

[0145] The acquisition module 100 is used to collect vibration data under different working conditions using sensors, and use the vibration data collected under each working condition as a transferable domain, and cut the vibration data in each transferable domain to form samples;

[0146] Constructing a data and model module 200, for randomly selecting a transferable domain as a source domain sample and another transferable domain as a target domain sample, wherein the source domain sample has a label and the target domain sample does not have a label, and constructing a cross-operating condition fault diagnosis model based on a feature extractor, two state classifiers and an outlier classifier;

[0147] A pre-training module 300 is used to input the source domain sample into the feature extractor to obtain sample high-level features, and use the two state classifiers to respectively predict sample labels on the sample high-level features to obtain label prediction feature vectors, so as to minimize the loss of sample label prediction and sample label, and obtain a pre-trained feature extractor and two pre-trained state classifiers;

[0148] The training module 400 is used to input the source domain sample and the target domain sample into the pre-trained feature extractor to obtain features of the source domain and target domain samples, and use the pre-trained two-state classifier to perform sample label prediction on the high-level features of the target sample to obtain a target domain sample label prediction feature vector and a source domain sample label prediction feature vector;

[0149] A training pseudo-label module 500 is used to input the target domain sample label prediction feature vector into the outlier classifier to obtain a pseudo-label of the predicted target domain sample, and perform pseudo-label learning to obtain an outlier classifier loss function;

[0150] A weight calculation module 600 is used to predict a feature vector based on the target domain sample label, obtain the probability that the target domain sample soft weight item belongs to the cross-domain shared label space in different samples, and obtain the cross-domain shared label space and the private label space;

[0151] A supervised learning module 700 is used to perform supervised learning on the source domain samples using the shared label space to obtain a source domain supervised classification loss function, and to construct a difference loss function between two state classifiers according to the target domain sample soft weight terms;

[0152] An optimization model module 800 is used to form an objective function by combining the source domain supervised classification loss function, the two state classifier difference loss functions and the outlier classifier loss function, and optimize using a gradient descent method to obtain a trained cross-operating condition fault diagnosis model;

[0153] The testing module 900 is used to input the sample to be tested into the trained cross-operating condition fault diagnosis model to obtain a fault diagnosis result.

[0154] The device for fault diagnosis based on classifier difference soft weight adaptive network of this embodiment is used to implement the aforementioned fault diagnosis method based on classifier difference soft weight adaptive network. Therefore, the specific implementation method of the device for fault diagnosis based on classifier difference soft weight adaptive network can be seen in the embodiment part of the fault diagnosis method based on classifier difference soft weight adaptive network in the previous text, for example, the acquisition module 100, the data construction model module 200, the pre-training module 300, the training module 400, the training pseudo-label module 500, the weight calculation module 600, the supervised learning module 700, the optimization model module 800, and the testing module 900 are respectively used to implement the steps S101, S102, S103, S104, S105, S106, S107, S108 and S109 in the aforementioned fault diagnosis method based on classifier difference soft weight adaptive network. Therefore, its specific implementation method can refer to the description of the corresponding embodiments of each part, which will not be repeated here.

[0155] A specific embodiment of the present invention also provides a device for fault diagnosis based on a classifier difference soft weight adaptive network, including: a memory for storing a computer program; a processor for implementing the steps of the above-mentioned fault diagnosis method based on a classifier difference soft weight adaptive network when executing the computer program.

[0156] A specific embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned fault diagnosis method based on a classifier difference soft weight adaptive network are implemented.

[0157] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0158] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0159] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0160] The above is a detailed introduction to a fault diagnosis method, device, equipment and computer-readable storage medium based on a classifier difference soft weight adaptive network provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.

Claims

1. A fault diagnosis method based on classifier difference soft weight adaptive network, characterized in that: include: The vibration data under different working conditions are collected by using sensors, and the vibration data collected under each working condition is used as a transferable domain, and the vibration data in each transferable domain is cut to form samples; Randomly select a transferable domain as a source domain sample and another transferable domain as a target domain sample, wherein the source domain sample has a label and the target domain sample does not have a label, specifically including: selecting a transferable domain under a working condition as the source domain D s ={(X s ,C s )}, where X s and C s are the source domain sample feature space and label space respectively, By s Labeled samples and sample labels Composition; Select a transferable domain different from the source domain as the target domain D t ={(X t ,C t )}, where X t and C t are the target domain sample feature space and label space respectively, By t unlabeled samples Composition; among them, D s and D t From different probability distributions P s (X) and P t (X), P s (X) is the source domain probability distribution, P t (X) is the target domain probability distribution; A cross-operating condition fault diagnosis model is constructed based on a feature extractor, two state classifiers and an outlier classifier; The source domain sample is input into the feature extractor to obtain the sample high-level features, and the two state classifiers are used to predict the sample labels of the sample high-level features respectively to obtain the label prediction feature vector, so that the loss of the sample label prediction and the sample label is minimized, and a pre-trained feature extractor and two pre-trained state classifiers are obtained, including: using the feature extractor G to extract the sample high-level features in the source domain sample, and the calculation formula is: in, is the jth source domain sample, is the high-level feature extracted from the j-th sample in the pre-training stage; the two state classifiers are used to predict the sample labels for the high-level features of the samples respectively, and the softmax function is used to calculate the loss of the real label and the predicted label of the samples; until the loss function is minimized, the pre-trained feature extractor and the two state classifiers are obtained; Inputting the source domain sample and the target domain sample into the pre-trained feature extractor to obtain high-level features of the source domain and target domain samples, and using the pre-trained two-state classifier to perform sample label prediction on the high-level features of the target domain samples to obtain a target domain sample label prediction feature vector and a source domain sample label prediction feature vector; Inputting the target domain sample label prediction feature vector into the outlier classifier to obtain a pseudo label of the predicted target domain sample, and performing pseudo label learning to obtain an outlier classifier loss function; Based on the target domain sample label prediction feature vector, the probability that the target domain sample soft weight item belongs to the cross-domain shared label space in different samples is obtained, and the cross-domain shared label space and the private label space are obtained; Perform supervised learning on the source domain samples using the shared label space to obtain a source domain supervised classification loss function, and construct a difference loss function of two state classifiers according to the target domain sample soft weight terms; The objective function is formed by combining the source domain supervised classification loss function, the two state classifier difference loss functions and the outlier classifier loss function, and optimized by gradient descent method to obtain a trained cross-operating condition fault diagnosis model; The sample to be tested is input into the trained cross-operating condition fault diagnosis model to obtain a fault diagnosis result.

2. The fault diagnosis method according to claim 1, characterized in that: The method of collecting vibration data under different working conditions by using sensors, taking the vibration data collected under each working condition as a transferable domain, and cutting the vibration data in each transferable domain to form samples includes: Use acceleration sensors to collect bearing vibration acceleration data under different working conditions and fault types; The bearing vibration acceleration data under each working condition is regarded as a transferable domain. The data in each domain obeys different characteristic distributions and the fault types are different. Cutting the bearing vibration acceleration data according to a preset sampling point book to obtain a plurality of data samples; Perform fast Fourier transform on all data samples, convert the time domain data samples into frequency domain data samples, and perform dimension processing on the frequency domain data samples to obtain a plurality of processed samples.

3. The fault diagnosis method according to claim 1, characterized in that: The step of inputting the source domain sample and the target domain sample into the pre-trained feature extractor to obtain high-level features of the source domain and the target domain samples, and using the pre-trained two-state classifier to perform sample label prediction on the high-level features of the target domain samples to obtain a target domain sample label prediction feature vector and a source domain sample label prediction feature vector comprises: The source domain samples and the target domain samples are simultaneously input into the feature extractor to obtain the high-level features of the source domain samples. and high-level features of target domain samples The high-level features of the source domain samples and the target domain sample high-level features Both are input into the two state classifiers for state prediction, and the source domain sample label prediction feature vector is obtained. And the target domain sample label prediction feature vector Among them, i is the serial number of the state classifier, and j is the serial number of the sample.

4. The fault diagnosis method according to claim 1, characterized in that: The target domain sample label prediction feature vector is input into the outlier classifier to obtain a pseudo label of the predicted target domain sample, and pseudo label learning is performed to obtain an outlier classifier loss function: The target domain sample label prediction feature vector is input into the outlier classifier, and the binary softmax function is used to predict the pseudo label p of the target domain sample. o (x t ); Collect all pseudo labels to get the pseudo label sample set Γ pseudo , calculate the outlier classifier loss function in, For p o (x t ), the kth unit value, x t is the target domain sample set, y i is the predicted label, I is the consistency function, For p o (x t )’s mth cell value.

5. The fault diagnosis method according to claim 1, characterized in that: The method of predicting the feature vector based on the target domain sample label, obtaining the probability that the target domain sample soft weight item belongs to the cross-domain shared label space in different samples, and obtaining the cross-domain shared label space and the private label space includes: Using the formula Calculate the soft weight of the target domain sample and the probability that different samples belong to the cross-domain shared label space Based on the weights of the target domain samples Obtaining the cross-domain shared label space and the private label space; in, For the target sample The probability of belonging to class c is, for The cth unit value of , K is the number of cross-domain shared categories, and Z is the normalized vector such that 6. The fault diagnosis method according to claim 1, characterized in that: The method of using the shared label space to perform supervised learning on the source domain samples to obtain a source domain supervised classification loss function, and constructing two state classifier difference loss functions according to the target domain sample soft weight terms includes: Perform supervised learning on the source domain samples based on the shared label space, and calculate the source domain supervised classification loss of each state classifier Construct the source domain supervised total classification loss based on the source domain supervised classification loss of each state classifier According to the weight of the target domain samples Calculate the classifier difference loss function, which is expressed as: in, is the source domain shared label sample set, y i is the predicted label, I is the consistency function, K is the number of cross-domain shared categories, and x t is the target domain sample set, G is the feature extractor, x s is the source domain sample set, Predict the k unit values ​​of the feature vector set for the source domain sample label of the i-th state classifier, is the label prediction vector set of the jth sample in the source domain of the i-th state classifier, are two state classifiers, and ||·||1 is the sum of the absolute values ​​of the prediction differences between state classifier 1 and state classifier 2.

7. A fault diagnosis device based on a classifier difference soft weight adaptive network, characterized in that: include: An acquisition module is used to use sensors to collect vibration data under different working conditions, and use the vibration data collected under each working condition as a transferable domain, and cut the vibration data in each transferable domain to form samples; Constructing a data and model module, for randomly selecting a transferable domain as a source domain sample and another transferable domain as a target domain sample, wherein the source domain sample has a label and the target domain sample does not have a label, specifically comprising: selecting a transferable domain under a working condition as the source domain D s ={(X s ,C s )}, where X s and C s are the source domain sample feature space and label space respectively, By s Labeled samples and sample labels Composition; Select a transferable domain different from the source domain as the target domain D t ={(X t ,C t )}, where X t and C t are the target domain sample feature space and label space respectively, By t unlabeled samples Composition; among them, D s and D t From different probability distributions P s (X) and P t (X), P s (X) is the source domain probability distribution, P t (X) is the target domain probability distribution; a cross-operating condition fault diagnosis model is constructed based on a feature extractor, two state classifiers and an outlier classifier; The pre-training module is used to input the source domain sample into the feature extractor to obtain the sample high-level features, and use the two state classifiers to respectively predict the sample labels of the sample high-level features to obtain the label prediction feature vector, so that the loss of the sample label prediction and the sample label is minimized, and the pre-trained feature extractor and the pre-trained two-state classifier are obtained, including: using the feature extractor G to extract the sample high-level features in the source domain sample, and the calculation formula is: in, is the jth source domain sample, is the high-level feature extracted from the j-th sample in the pre-training stage; the two state classifiers are used to predict the sample labels for the high-level features of the samples respectively, and the softmax function is used to calculate the loss of the real label and the predicted label of the samples; until the loss function is minimized, the pre-trained feature extractor and the two state classifiers are obtained; A training module, used for inputting the source domain samples and the target domain samples into the pre-trained feature extractor, obtaining high-level features of the source domain and target domain samples, and using the pre-trained two-state classifier to perform sample label prediction on the high-level features of the target domain samples, to obtain a target domain sample label prediction feature vector and a source domain sample label prediction feature vector; A training pseudo-label module is used to input the target domain sample label prediction feature vector into the outlier classifier to obtain a pseudo-label of the predicted target domain sample, and perform pseudo-label learning to obtain an outlier classifier loss function; A weight calculation module is used to predict a feature vector based on the target domain sample label, obtain the probability that the target domain sample soft weight item belongs to the cross-domain shared label space in different samples, and obtain the cross-domain shared label space and the private label space; A supervised learning module is used to perform supervised learning on the source domain samples using the shared label space to obtain a source domain supervised classification loss function, and to construct a difference loss function between two state classifiers according to the target domain sample soft weight terms; An optimization model module is used to form an objective function by combining the source domain supervised classification loss function, the two state classifier difference loss functions and the outlier classifier loss function, and optimize using a gradient descent method to obtain a trained cross-operating condition fault diagnosis model; The testing module is used to input the sample to be tested into the trained cross-operating condition fault diagnosis model to obtain the fault diagnosis result.

8. A fault diagnosis device based on a classifier difference soft weight adaptive network, characterized in that: include: Memory for storing computer programs; A processor is used to implement the steps of a fault diagnosis method based on a classifier difference soft weight adaptive network as described in any one of claims 1 to 6 when executing the computer program.