Semi-supervised fault diagnosis method based on two-stream attention mechanism and recurrent autoencoder

By introducing a dual-flow attention mechanism and cyclic structure into the autoencoder and adding a feature difference loss function, the semi-supervised fault diagnosis method is improved, and the problem of low accuracy of existing methods at low labeling rates is solved, and diagnostic accuracy and generalization capabilities are improved.

CN116361710BActive Publication Date: 2025-04-11CHONGQING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310343609.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-03
Publication Date
2025-04-11
Estimated Expiration
2043-04-03

AI Technical Summary

Technical Problem

The existing semi-supervised fault diagnosis method based on autoencoder has low accuracy when the number of labeled samples is small, resulting in insufficient representative feature extraction and affecting diagnostic accuracy.

Method used

The semi-supervised fault diagnosis method based on the dual-flow attention mechanism and cyclic autoencoder is adopted. By adding a loss function for the difference in the reconstructed sample and sample characteristics into the encoder, the optimization process of the autoencoder is improved and more representative features are extracted.

Benefits of technology

The diagnostic accuracy and generalization ability of the semi-supervised fault diagnosis method are improved, especially when the number of labeled samples is small, the feature extraction ability and cross-working diagnosis accuracy of the model are enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116361710B_ABST
    Figure CN116361710B_ABST
Patent Text Reader

Abstract

The present invention relates to a semi-supervised fault diagnosis method based on a dual-stream attention mechanism and a cyclic autoencoder, which belongs to the field of industrial processes. After preprocessing the fault data, the cyclic autoencoder with the dual-stream attention mechanism inserted is used to extract the features of unlabeled and labeled samples in an unsupervised manner, and after the encoder of the fully trained cyclic autoencoder, a fully connected classification layer is connected to form a classifier, and the classifier is fine-tuned using labeled samples to finally obtain the expected classifier, thereby avoiding the overfitting problem when training the fault classifier when the labeled data is insufficient. The dual-stream attention mechanism can improve the feature extraction capability of the model, the cyclic autoencoder can improve the classification accuracy of the semi-supervised fault diagnosis method, and has stronger generalization, and the trained model has a higher accuracy across working conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of industrial processes and relates to a semi-supervised fault diagnosis method based on a dual-stream attention mechanism and a cyclic autoencoder. Background Art

[0002] In modern industry, the reliability requirements for industrial equipment are getting higher and higher. The failure of industrial equipment not only directly affects production efficiency, but also serious failures may even lead to economic losses or even casualties. Effective fault diagnosis methods can detect faults in time, avoid unnecessary losses and improve production efficiency. Fault diagnosis methods in recent years include mechanism-based methods, expert experience-based methods and data-driven methods. With the rapid development of sensor technology and intelligent manufacturing technology, the amount of data from equipment has greatly increased, which has led to the rapid development of data-driven methods. Among them, deep learning methods represented by convolutional neural network models are the most widely used.

[0003] Deep learning methods train models under supervised learning conditions, which requires a large amount of labeled data. Insufficient labeled data will greatly reduce the diagnostic effect. However, in industrial processes, a large amount of data is often unlabeled, and manual labeling of data is time-consuming and labor-intensive, or even impossible in some cases. Therefore, it is particularly important to combine a small amount of labeled data and make full use of unlabeled data to improve fault diagnosis accuracy, and semi-supervised learning methods can achieve this.

[0004] As a typical unsupervised learning model, the autoencoder (AE) consists of two parts: an encoder and a decoder. The encoder reduces the dimension of the input sample to extract features in the latent space, and the decoder reconstructs the sample by increasing the dimension of the features extracted by the encoder, and minimizes the error between the reconstructed sample and the sample, so that the network structure learns the sample features. It has the characteristics of simple training and strong generalization ability, so it is widely used in the pre-training model step in the semi-supervised learning method. After the pre-training is completed, the semi-supervised learning method needs to construct a classifier with a fully connected layer after the encoder part, and fine-tune the classifier with a small number of labeled samples to obtain the final model. However, the sample features extracted by the autoencoder often deviate from the expected sample features, and its reconstructed samples also have feature-level differences from the samples. As a result, the semi-supervised fault diagnosis method based on the autoencoder has low accuracy when the number of labeled samples is limited. Therefore, a better semi-supervised fault diagnosis method is needed to extract more representative features and improve the classification accuracy at a low label rate. Summary of the invention

[0005] In view of this, the purpose of the present invention is to provide a semi-supervised fault diagnosis method based on a dual-stream attention mechanism and a recurrent autoencoder, which improves the optimization process of the autoencoder, adds a loss function for the feature difference between the reconstructed sample and the sample in the encoder, and finally improves the diagnostic accuracy and generalization ability of the semi-supervised fault diagnosis method. In the semi-supervised learning method based on the autoencoder, there is a feature difference between the reconstructed sample and the sample, which makes the method have a low accuracy when the number of labeled samples is small.

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

[0007] A semi-supervised fault diagnosis method based on a dual-stream attention mechanism and a recurrent autoencoder comprises the following steps:

[0008] S1: Collect fault data and normal operation data of industrial processes and establish training data sets after preprocessing;

[0009] S2: Construct a recurrent autoencoder model CAE with a dual-stream attention mechanism, train the CAE model using the fault sample x to automatically extract the features of the fault data, and obtain a fully pre-trained model CAE p ;

[0010] S3: Take out the encoder part Enet from the cyclic autoencoder pre-trained in step S2, add a fully connected layer to it to output the classification category, and randomly initialize the parameters in the fully connected layer to form a new classifier Enet p ;

[0011] S4: The new classifier Enet obtained in step S3 p Unfreeze, set the learning rate and train to get the expected classifier Enet F ;

[0012] S5: Process the new industrial process fault data in the same way as in step S1 to obtain new fault data, and input it into the expected classifier Enet F , output the diagnosis results.

[0013] Furthermore, the data in step S1 includes a labeled data set with fault categories marked and unlabeled datasets without fault labels Where x represents the fault sample, y represents the sample label, M represents the number of labeled samples, and N represents the number of unlabeled samples.

[0014] Furthermore, the cyclic autoencoder model CAE includes an encoder, a decoder, a cyclic structure and a dual-stream attention mechanism;

[0015] The encoder and decoder are each optimized according to different losses, and finally the encoder outputs features of the sample after dimensionality reduction, and the decoder outputs reconstructed samples;

[0016] The loop structure updates the encoder and decoder parameters according to different loss functions;

[0017] The dual-stream attention mechanism captures the relationship between channels and spatial position information simultaneously through convolution, thereby improving the feature extraction capability of the model.

[0018] Further, the encoding process of the encoder is as follows:

[0019] z=f e (W e x+b e ) (8)

[0020] Where: x is the input sample, z is the latent space sample feature, W e is the weight matrix, b e is the bias, f e is the activation function;

[0021] The decoding process of the decoder is as follows:

[0022] x'=f d (W d z+b d ) (9)

[0023] Where: x' is the reconstructed sample, z is the input latent space sample feature, W d is the weight matrix, b d is the bias, f d is the activation function.

[0024] Furthermore, the loop structure updates the encoder and decoder parameters according to different loss functions, specifically including: updating the decoder parameters by the loss function of the reconstructed sample and the error between samples; encoding the reconstructed sample again through the encoder to obtain the reconstructed sample feature, encoding the original sample to obtain the sample feature, and calculating the error between the two as the loss function for updating the encoder;

[0025] For the encoder, the mean square error function is used as the training loss function. The features of the reconstructed samples and samples are extracted respectively, and the errors between the two are calculated. The overall optimization process and objective function are as follows:

[0026]

[0027]

[0028] Among them, x' is the reconstructed sample, z' is the feature of the reconstructed sample, and z i , z'i They represent the features of the i-th sample and the i-th reconstructed sample respectively, and M represents the number of labeled samples;

[0029] For the decoder, the mean square error function is used as the training loss function to calculate the error between the sample and the reconstructed sample. The optimization process and objective function are as follows:

[0030]

[0031] where x i , x' i They represent the i-th sample and the i-th reconstructed sample respectively, and N represents the number of unlabeled samples.

[0032] Furthermore, the dual-stream attention mechanism performs average pooling on the channel direction and horizontal spatial direction of the feature map of the sample to obtain two 1D vectors C and W, and then uses the local cross-channel information interaction to convolve the two vectors using a 1×k convolution kernel to obtain vector C k and W k , and then activate the two vectors through the sigmoid activation function, and finally multiply them with the original feature map. k is adaptively adjusted according to the vector size, and its calculation is as follows:

[0033] C=φ(k)=2 (γ*k-b) (13)

[0034]

[0035] Among them, k represents the convolution kernel size, C represents the vector size, and b and γ are parameters that change the ratio between the vector size C and the convolution kernel size k.

[0036] Further, the new classifier Enet is constructed as described in step S3 p , specifically comprising: freezing the encoder part Enet, using the labeled data set in step S1 Train the fully connected layer to get the new classifier Enet p .

[0037] The beneficial effect of the present invention is that: on the basis of reducing the sample reconstructed by the autoencoder and the sample error, the method of the present invention improves the optimization process of the autoencoder, makes the reconstructed sample features close to the original sample features, and uses this representative feature as the latent space feature, thereby enhancing the ability of the autoencoder to extract features. Finally, the same distribution and cross-operating condition diagnosis accuracy of the semi-supervised fault diagnosis method are improved.

[0038] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be described in detail below in conjunction with the accompanying drawings, wherein:

[0040] Figure 1 Schematic diagram of a recurrent autoencoder;

[0041] Figure 2 Schematic diagram of the dual-stream attention mechanism;

[0042] Figure 3 This is a schematic diagram of the semi-supervised fault diagnosis process;

[0043] Figure 4 This is a comparison chart of fault diagnosis results of different methods under the same distribution;

[0044] Figure 5 This is a comparison chart of fault diagnosis results using different methods under different working conditions. DETAILED DESCRIPTION

[0045] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner, and the following embodiments and features in the embodiments can be combined with each other without conflict.

[0046] Among them, the drawings are only used for illustrative explanations, and they only represent schematic diagrams rather than actual pictures, and should not be understood as limitations on the present invention. In order to better illustrate the embodiments of the present invention, some parts of the drawings may be omitted, enlarged or reduced, and do not represent the size of actual products. For those skilled in the art, it is understandable that some well-known structures and their descriptions in the drawings may be omitted.

[0047] The same or similar numbers in the drawings of the embodiments of the present invention correspond to the same or similar parts; in the description of the present invention, it should be understood that if the terms "upper", "lower", "left", "right", "front", "rear", etc. indicate the orientation or position relationship, they are based on the orientation or position relationship shown in the drawings, which is 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 orientation, be constructed and operate in a specific orientation. Therefore, the terms describing the position relationship in the drawings are only used for illustrative purposes and cannot be understood as limiting the present invention. For ordinary technicians in this field, the specific meanings of the above terms can be understood according to specific circumstances.

[0048] like Figure 1-3 As shown, the present invention can make full use of unlabeled samples to improve the accuracy of fault diagnosis through a semi-supervised fault diagnosis method based on a dual-stream attention mechanism and a cyclic autoencoder. After preprocessing the fault data, the cyclic autoencoder with a dual-stream attention mechanism inserted is used to extract the features of unlabeled and labeled samples in an unsupervised manner, and a fully connected classification layer is connected after the encoder of the fully trained cyclic autoencoder to form a classifier. The classifier is fine-tuned using labeled samples to finally obtain the desired classifier, avoiding the problem of overfitting of the fault classifier when training is insufficient in labeled data. The dual-stream attention mechanism can improve the feature extraction capability of the model. Compared with the autoencoder, the proposed cyclic autoencoder can not only achieve better classification accuracy, but also has stronger generalization, and the trained model has higher accuracy across working conditions.

[0049] The method of the present invention comprises the following specific steps:

[0050] Step 1: Collect fault data and normal operation data of industrial processes, and establish training data sets after preprocessing. The samples are all one-dimensional data. This includes labeled data sets with fault categories marked. and unlabeled datasets without fault labels Where x represents the fault sample, y represents the sample label, M represents the number of labeled samples, and N represents the number of unlabeled samples;

[0051] Step 2: Construct a recurrent autoencoder model CAE with a dual-stream attention mechanism inserted, and train the model using the fault samples x in the labeled and unlabeled datasets collected in step 1 to automatically extract the features of the fault data and obtain a fully pre-trained model CAE p .

[0052] (2.1) The cyclic autoencoder consists of an encoder and a decoder, and each is optimized according to different losses. Finally, the encoder outputs the features of the sample after dimensionality reduction, and the decoder outputs the reconstructed sample.

[0053] For the encoder, the encoding process is as follows:

[0054] z=f e (W e x+b e ) (15)

[0055] Where: x is the input sample, z is the latent space sample feature, W e is the weight matrix, b e is the bias, f e is the activation function.

[0056] For the decoder, the decoding process is as follows:

[0057] x'=f d (W d z+b d ) (16)

[0058] Where: x' is the reconstructed sample, z is the input latent space sample feature, W d is the weight matrix, b d is the bias, f d is the activation function.

[0059] (2.2) The loop structure updates the encoder and decoder parameters according to different loss functions, including: updating the decoder parameters with the loss function of the reconstructed sample and the error between samples; encoding the reconstructed sample again through the encoder to obtain the reconstructed sample features, encoding the original sample to obtain the sample features, and calculating the error between the two as the loss function to update the encoder.

[0060] For the encoder, the mean square error function is used as the training loss function. The features of the reconstructed samples and samples are extracted respectively, and the errors between the two are calculated. The overall optimization process and objective function are as follows:

[0061]

[0062]

[0063] Among them, x' is the reconstructed sample, z' is the feature of the reconstructed sample, and z i , z' i They represent the characteristics of the i-th sample and the characteristics of the i-th reconstructed sample respectively.

[0064] For the decoder, the mean square error function is used as the training loss function to calculate the error between the sample and the reconstructed sample. The optimization process and objective function are as follows:

[0065]

[0066] Among them, x i , x'i represent the i-th sample and the i-th reconstructed sample respectively.

[0067] (2.3) The dual-stream attention mechanism performs average pooling on the channel direction and horizontal spatial direction of the feature map of the one-dimensional sample to obtain two 1D vectors C and W. Then, the two vectors are convolved using a 1×k convolution kernel using local cross-channel information interaction to obtain vector C. k and W k , and then activate the two vectors through the sigmoid activation function, and finally multiply them with the original feature map. k is adaptively adjusted according to the vector size, and its calculation is as follows:

[0068] C=φ(k)=2 (γ*k-b) (20)

[0069]

[0070] Among them, k represents the convolution kernel size, C represents the vector size, and b and γ are parameters that change the ratio between the vector size C and the convolution kernel size k.

[0071] Step 3: Take out the encoder part Enet from the cyclic autoencoder obtained by pre-training in step 2, add a fully connected layer to it to output the classification category, randomly initialize the parameters in the fully connected layer, and form a new classifier. And freeze the above encoder part, use the labeled data set in step 1 Train the fully connected layer to get the new classifier Enet p .

[0072] Step 4: Use the classifier Enet obtained in step 3 p Unfreeze, set a small learning rate, and use the labeled data set in step 1 Train the entire classifier Enet p , and finally get the expected classifier Enet F .

[0073] Step 5: Process the new industrial process fault data in the same way as in step 1 to obtain a new fault data set O represents the number of samples, input into the classifier Enet in step 4 F , the output category of the classifier is the diagnosis result.

[0074] The effectiveness of the method of the present invention is verified by combining a specific industrial process example. In the experiment, acceleration sensor data in a bearing test bench are collected. The data set contains damage and normal damage-free status data of the inner ring, ball, and outer ring. Each damaged part contains data of three different degrees of 0.2, 0.3, and 0.5 mm, with a total of 10 categories.

[0075] Among the collected data, the training set is data under the working condition of 0kN load and 35hz speed. There are 5 labeled data and 95 unlabeled data in each category. All data totals 100*10 training data for training models. The test set includes a same-working condition test set and two cross-working condition test sets. The latter working conditions are 0kN load and 27hz speed and 0kN load and 18hz speed. Each test set contains 200*10 training data for testing models.

[0076] During the training process, the experiment was repeated 10 times, and the diagnostic accuracy was used as the evaluation criterion.

[0077] The test results of the comparative experiment are as follows Figure 4 As shown in the figure, CNN and CNN-DA are one-dimensional convolutional neural networks and one-dimensional convolutional neural networks with dual-stream attention mechanism inserted. The training method is supervised training with labeled data. Their structure is consistent with the classifier structure obtained by semi-supervised learning of cyclic autoencoders. CAE, CAE-CA, CAE-ECA, and CAE-DA are cyclic autoencoders, cyclic autoencoders with coordinated attention mechanism inserted, efficient channel attention mechanism inserted, and dual-stream attention mechanism inserted. AE and AE-DA are autoencoders and autoencoders with dual-stream attention mechanism inserted. The training method is semi-supervised training with labeled and unlabeled data. The structure of the autoencoder is consistent with that of the cyclic autoencoder. As can be seen from the figure, the proposed cyclic autoencoder model with dual-stream attention mechanism has better performance than other methods.

[0078] The test results of the cross-operating condition experiment are as follows: Figure 5 As shown in the figure, the names of the methods are the same as above. Since different speed cross-operating condition tests will have a greater impact, the overall accuracy is lower than that of the same operating condition. It can be seen that the method proposed in the cross-operating condition has higher accuracy and stronger generalization than other methods.

[0079] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. 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 solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution, which should be included in the scope of the claims of the present invention.

Claims

1. A semi-supervised fault diagnosis method based on a dual-stream attention mechanism and a recurrent autoencoder, characterized in that: Includes the following step: S1: Collecting fault data and normal operation data of an industrial process, and establishing a training data set after preprocessing; the fault data and normal operation data of the industrial process include acceleration sensor data; S2: Construct a recurrent autoencoder model CAE with a dual-stream attention mechanism, train the CAE model using the fault sample x to automatically extract the features of the fault data, and obtain a fully pre-trained model CAE p ; The cyclic autoencoder model CAE includes an encoder, a decoder, a cyclic structure and a dual-stream attention mechanism; The encoder and decoder are each optimized according to different losses, and finally the encoder outputs features of the sample after dimensionality reduction, and the decoder outputs reconstructed samples; The loop structure updates the encoder and decoder parameters according to different loss functions; The dual-stream attention mechanism captures the relationship between channels and spatial position information through convolution, thereby improving the feature extraction capability of the model. The dual-stream attention mechanism performs average pooling on the channel direction and horizontal spatial direction of the feature map of the sample to obtain two 1D vectors C and W, and then uses the local cross-channel information interaction to convolve the two vectors using a 1×k convolution kernel to obtain a vector C. k and W k , and then activate the two vectors through the sigmoid activation function, and finally multiply them with the original feature map; k is adaptively adjusted according to the vector size, and its calculation is as follows: C=φ(k)=2 (γ*k-b) (6) Among them, k represents the convolution kernel size, C represents the vector size, b, γ are parameters that change the ratio between the vector size C and the convolution kernel size k; S3: Take out the encoder part Enet from the cyclic autoencoder pre-trained in step S2, add a fully connected layer to it to output the classification category, and randomly initialize the parameters in the fully connected layer to form a new classifier Enet p ; S4: The new classifier Enet obtained in step S3 p Unfreeze, set the learning rate and train to get the expected classifier Enet F ; S5: Process the new industrial process fault data in the same way as in step S1 to obtain new fault data, and input it into the expected classifier Enet F , output the diagnosis results.

2. The semi-supervised fault diagnosis method based on dual-stream attention mechanism and recurrent autoencoder according to claim 1, characterized in that: The data in step S1 includes a labeled data set with fault categories marked and unlabeled datasets without fault labels Where x represents the fault sample, y represents the sample label, M represents the number of labeled samples, and N represents the number of unlabeled samples.

3. The semi-supervised fault diagnosis method based on dual-stream attention mechanism and recurrent autoencoder according to claim 1, characterized in that: The encoding process of the encoder is as follows: z=f e (W e x+b e ) (1) Where: x is the input sample, z is the latent space sample feature, W e is the weight matrix, b e is the bias, f e is the activation function; The decoding process of the decoder is as follows: x'=f d (W d z+b d ) (2) Where: x' is the reconstructed sample, z is the input latent space sample feature, W d is the weight matrix, b d is the bias, f d is the activation function.

4. The semi-supervised fault diagnosis method based on dual-stream attention mechanism and recurrent autoencoder according to claim 1, characterized in that: The loop structure updates the encoder and decoder parameters according to different loss functions, specifically including: updating the decoder parameters with the loss function of the reconstructed sample and the error between samples; encoding the reconstructed sample again through the encoder to obtain the reconstructed sample features, encoding the original sample to obtain the sample features, and calculating the error between the two as the loss function for updating the encoder; For the encoder, the mean square error function is used as the training loss function. The features of the reconstructed samples and samples are extracted respectively, and the errors between the two are calculated. The overall optimization process and objective function are as follows: Among them, x' is the reconstructed sample, z' is the feature of the reconstructed sample, and z i , z' i They represent the features of the i-th sample and the i-th reconstructed sample respectively, and M represents the number of labeled samples; For the decoder, the mean square error function is used as the training loss function to calculate the error between the sample and the reconstructed sample. The optimization process and objective function are as follows: where x i , x' i They represent the i-th sample and the i-th reconstructed sample respectively, and N represents the number of unlabeled samples.

5. The semi-supervised fault diagnosis method based on dual-stream attention mechanism and recurrent autoencoder according to claim 1, characterized in that: The new classifier Enet is constructed as described in step S3 p , specifically comprising: freezing the encoder part Enet, using the labeled data set in step S1 Train the fully connected layer to get the new classifier Enet p .