A two-stage anomaly classification method based on autoencoder
Through the two-stage anomaly classification model of the autoencoder, combined with the autoencoder network array and classification network, it solves the problem of multi-source signal feature fusion under complex working conditions, achieves efficient detection and classification of equipment faults, and improves generalization and detection. performance.
Patent Information
- Application Number
- CN202411081087.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-08-08
AI Technical Summary
Existing equipment anomaly classification methods have weak generalization and low prediction accuracy under complex working conditions, making it difficult to effectively obtain and fuse multi-source signal features for anomaly classification.
A two-stage anomaly classification model based on autoencoders is used to perform feature learning and classification processing on multi-source signals through a combination of autoencoder network arrays and classification networks, including encoder, decoder and attention mechanism modules for dimensionality reduction and feature extraction. Extract and use the ResNet50 network structure for classification.
It realizes the detection and classification of equipment faults under complex working conditions, has good generalization and detection performance, and improves the accuracy of fault diagnosis.
Smart Images

Figure CN118606873B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of equipment health management and fault prediction, and in particular to a two-stage anomaly classification method based on an autoencoder. Background Art
[0002] In industrial production, the health of equipment is directly related to production safety and quality. Therefore, real-time monitoring of equipment status and timely detection and handling of potential faults are crucial to ensuring production continuity and safety. Based on the signals of the equipment during operation, such as vibration signals, sound signals, temperature signals, etc., the operating status, failure mode and cause of the failure of the equipment can be inferred. The difficulty lies in how to effectively obtain and fuse multi-source signal features for anomaly classification.
[0003] At present, commonly used equipment anomaly classification methods include support vector machines, neural networks, deep learning, etc. These methods realize automatic classification and identification of equipment status by establishing a mapping relationship between equipment status and signal characteristics; however, due to complex working conditions, sensor signals have problems such as high noise, weak features, and multiple patterns, resulting in weak generalization and low prediction accuracy of existing equipment anomaly classification models.
[0004] In view of the above problems, the present invention proposes a two-stage anomaly classification model based on an autoencoder to realize multi-source signal fusion processing and anomaly classification under complex working conditions. Summary of the invention
[0005] The purpose of this section is to summarize some aspects of embodiments of the present invention and briefly introduce some preferred embodiments. Some simplifications or omissions may be made in this section and the specification abstract and the invention title of this application to avoid blurring the purpose of this section, the specification abstract and the invention title, and such simplifications or omissions cannot be used to limit the scope of the present invention.
[0006] In view of the above existing problems, the present invention is proposed.
[0007] In order to solve the above technical problems, the present invention provides the following technical solutions: based on the autoencoder network array and the classification network, a two-stage abnormal classification network model is constructed;
[0008] Inputting the spectrum graphs of the multi-source signals in parallel into the autoencoder network in the two-stage anomaly classification network model for autoencoder network processing, and outputting feature graphs;
[0009] The feature maps are concatenated and input into the classification network to classify device anomalies, and the classification results are output.
[0010] As a preferred solution of the two-stage anomaly classification method based on autoencoders described in the present invention, the autoencoder network array is a parallel array with multiple autoencoder networks as basic units, and the autoencoder network at least includes an encoder, a decoder and an attention mechanism module.
[0011] As a preferred solution of the two-stage anomaly classification method based on the autoencoder described in the present invention, the encoder includes three groups of convolution and pooling layers to perform dimensionality reduction and feature extraction on the input spectrum graph;
[0012] The decoder adopts a network structure symmetrical to that of the encoder, and reconstructs the input spectrum image using the learned features and deconvolution operations;
[0013] The attention mechanism module uses function as an activation function and a set of convolutional layers, which use 1×1 convolution kernels to generate a weight map with the same spatial dimensions as the input feature map.
[0014] As a preferred solution of the two-stage anomaly classification method based on the autoencoder described in the present invention, the classification network includes at least one set of deconvolution layers and a ResNet50 network structure, inputs a feature map after feature fusion, and outputs a classification result;
[0015] Wherein, the deconvolution layer and the ResNet50 network structure are connected in series.
[0016] As a preferred solution of the two-stage anomaly classification method based on autoencoder described in the present invention, the spectrum diagram has a uniform size specification.
[0017] As a preferred solution of the two-stage anomaly classification method based on the autoencoder described in the present invention, before forming the spectrum diagram, the collected multi-source signals need to be preprocessed, and the preprocessing includes:
[0018] By normalization processing, adjusting the amplitude of the multi-source signal;
[0019] Using a random sampling segmentation method, sampling is performed from the multi-source data according to a uniform data length;
[0020] Convert the sampled time series signal into a spectrum diagram.
[0021] Beneficial effects of the present invention: The method of the present invention is used to solve the detection and classification of equipment operation failures under complex working conditions. It uses a combination of an autoencoder network array and a classification network to perform feature learning and classification processing on multi-source signals to achieve the purpose of fault diagnosis and classification, and has good generalization and detection performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. Among them:
[0023] Figure 1 Schematic diagram of the model structure of the two-stage anomaly classification method based on the autoencoder shown in the present invention;
[0024] Figure 2 It is a flowchart of a two-stage anomaly classification method based on an autoencoder shown in the present invention;
[0025] Figure 3 A schematic diagram of a multi-source signal spectrum of a two-stage anomaly classification method based on an autoencoder shown in the present invention;
[0026] Figure 4 This is a schematic diagram of the anomaly classification results of the two-stage anomaly classification method based on the autoencoder shown in the present invention. DETAILED DESCRIPTION
[0027] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the drawings. It is obvious that the described embodiments are only part of the embodiments of the present invention, but not all of the embodiments.
[0028] Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in the art without making any creative work should fall within the scope of protection of the present invention.
[0029] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0030] According to an embodiment of the present invention, a two-stage anomaly classification method based on an autoencoder specifically includes the following steps:
[0031] S1: Based on the autoencoder network array and classification network, a two-stage anomaly classification network model is constructed;
[0032] S2: The spectrum graphs of the multi-source signals are input in parallel into the autoencoder network in the two-stage anomaly classification network model for autoencoder network processing, and the feature graph is output;
[0033] S3: Concatenate the feature maps and input them into the classification network to classify device anomalies and output the classification results.
[0034] As an example, the spectrogram has a uniform size, such as the size of the input image is 64×64×3.
[0035] It should be noted that the two-stage anomaly classification network model provided in the embodiment of the present invention is a model for anomaly classification, which can perform anomaly classification after unsupervised training of the autoencoder network and supervised training of the classification network.
[0036] The unsupervised training of the autoencoder network is specifically manifested in the ability of the training network to extract features. After extracting the features of the spectrum graph corresponding to different abnormal states, one-hot encoding is used to label the features corresponding to each abnormal state. Each one-hot encoding is represented by an integer label, such as 0, 1, 2...
[0037] The supervised training classification network mainly trains its abnormal classification ability. The feature map obtained by the self-encoding network array after feature fusion is input into the classification network. The classification network consists of at least a set of deconvolution layers and ResNet50 network structures. The feature map after feature fusion is input and the classification result is output. Among them, the deconvolution layer and the ResNet50 network structure are connected in series; after the deconvolution layer of the classification network is processed to restore the feature map to the standard size (224×224) of the ResNet50 network input, it is input into the pre-trained network ResNet50 network for classification. After being processed by the ResNet50 network, a feature vector equal to the number of categories is output, and then it is used through the fully connected layer. The function converts the feature vector into a probability distribution vector. Each element in this vector represents the probability that the input image belongs to the corresponding category. Finally, the category with the highest probability is selected as the classification result to achieve classification. That is, the output in the entire model is the classification result of the corresponding integer label.
[0038] It is also necessary to explain that in response to the problems raised in the aforementioned background technology, this embodiment provides a two-stage anomaly classification model based on an autoencoder. By integrating unsupervised learning methods and supervised learning methods in the model, the unsupervised learning method is used to learn data features, and the supervised method is used to learn anomaly classification, multi-source signal fusion processing and anomaly classification under complex working conditions are realized, and the model has the characteristics of good generalization and high detection accuracy.
[0039] The following is an example of abnormal detection of a bearing. Figure 1~Figure 4 The schematic diagrams shown and some preferred or optional examples of the present invention more specifically describe the implementation process and / or effects of certain examples of the present invention.
[0040] As examples, the signal sources include axial vibration signals, radial vibration signals, tangential vibration signals, and audio signals.
[0041] It should be noted that one signal has one spectrum graph, and one autoencoder network processes one spectrum graph. If it is a spectrum graph of multiple signals (i.e., multi-source signals), a corresponding number of autoencoder network arrays are configured for processing.
[0042] By way of example, abnormal conditions include bearing wear, bearing looseness, bearing overheating, bearing fracture, and poor bearing lubrication.
[0043] In an optional embodiment, the judgment criterion for the abnormal state is the difference in the spectrograms of multiple source signals, for example: bearing wear will produce continuous noise in the spectrogram converted from the audio signal, and will produce some peaks in the spectrogram converted from the vibration signal, accompanied by harmonics; bearing looseness will produce some peaks in the spectrogram converted from the audio signal, and will produce irregular peaks in the spectrogram converted from the vibration signal; bearing overheating will show energy distribution in a wider frequency range in the spectrogram converted from the audio signal, and will show a series of peaks in the spectrogram converted from the vibration signal; bearing fracture will show a transient impact peak at the moment of fracture in the spectrogram converted from the audio signal, and will show significant peaks at specific frequencies in the spectrogram converted from the vibration signal; poor bearing lubrication will show broadband noise in the spectrogram converted from the audio signal, and will show higher frequency vibration components in the spectrogram converted from the vibration signal.
[0044] It is also necessary to explain in detail the specific implementation steps of this embodiment as follows:
[0045] Step 1: Preprocess the four multi-source signals including axial vibration signal, radial vibration signal, tangential vibration signal and audio signal, and draw a spectrum diagram; refer to Figure 3 , what needs to be explained in this step is:
[0046] Using the Min-Max method, the amplitudes of multi-source vibration signals and audio signals are adjusted to between [0,1] to eliminate the amplitude differences between the signals.
[0047] Sample multiple source signals at a sampling rate of 50 kHz;
[0048] Apply FFT transformation to audio and vibration signals, convert the signals from time domain to frequency domain, and draw a spectrum diagram based on the transformation results.
[0049] It should be noted that the sampling rate is the same as the frequency of the signal collected by the device when collecting the signal. The sampling rate can be changed according to the device conditions for collecting the signal, and this embodiment does not make a sole limitation on it.
[0050] Specifically, the above conversion process can be achieved by the following formula:
[0051]
[0052] in, is the input time domain signal sequence, is the index of the time sample, is the corresponding frequency domain sequence, is the index of the frequency component, is the length of the input sequence, is an imaginary unit, satisfying , is the complex twiddle factor.
[0053] Step 2: Use the spectrum graph as input in the constructed autoencoder network and perform unsupervised training until the network converges. The following points need to be explained in this step:
[0054] The spectrogram is input into the autoencoder network in the two-stage anomaly classification model based on the autoencoder;
[0055] The encoder encodes the high-dimensional input into low-dimensional latent variables to learn features and representations to achieve feature extraction;
[0056] The decoder restores the low-dimensional latent variables of the hidden layer to minimize the reconstruction error;
[0057] The training process of unsupervised training uses the back-propagation algorithm to optimize the network parameters;
[0058] When the loss function becomes stable, the network converges.
[0059] Furthermore, this step also needs to be explained in detail. The encoding process from the input layer to the hidden layer is as follows:
[0060]
[0061] in, is the learned hidden feature, is the activation function, which is selected here function, is the weight and bias matrix of the encoder;
[0062] The decoding process from hidden layer to output layer is as follows:
[0063]
[0064] in, To reconstruct the sample, is the activation function, which is selected here function, , are the weight and bias matrices of the decoder;
[0065] The MSE loss function is used to calculate the reconstruction error, and its mathematical expression formula is as follows:
[0066]
[0067] in, is the number of samples, is the true value, is the reconstruction value;
[0068] Using back propagation, the gradient of the network parameters is calculated according to the loss function, and then the optimization algorithm is used to apply the Adam optimizer to update the network parameters. The specific process is shown in the following formula:
[0069] ,
[0070] in, is the average value of the gradient at the first moment, is the non-central variance value of the gradient at the second moment, is the average value of the gradient at the first moment, is the variance of the gradient at the second moment;
[0071]
[0072] in, is the current moment parameter, is the parameter at the previous moment, is the learning rate, is a constant, usually set to ;
[0073] Repeat the above steps until the set number of iterations is completed.
[0074] As an example, the aforementioned loss function is the MSE function, and its mathematical expression formula is as follows:
[0075]
[0076] In this embodiment, the value of the loss function is regularly recorded during the training process and plotted into a curve graph, and by observing the changing trend of the loss function, it is determined whether the loss function tends to be stable.
[0077] Reference Figure 1 In the autoencoder network of the overall network framework diagram, the former in the classifier module represents the deconvolution network, and the latter is network.
[0078] Step 3: Freeze the four trained autoencoder networks and keep the weights of these networks unchanged. In this step, it is also necessary to explain:
[0079] Four sets of spectrum diagrams of multi-source signals including axial vibration signal, radial vibration signal, tangential vibration signal and audio signal are input in parallel;
[0080] After being processed by the autoencoder network encoder, a feature map in the form of a matrix is obtained;
[0081] The four sets of feature maps expressed in the form of matrices are added together for feature fusion operation to obtain a concatenated feature map, i.e., a new feature map.
[0082] Step 4: Input the concatenated feature map into the classification network and perform supervised learning until convergence; the following points need to be explained in this step:
[0083] The concatenated feature map is input into the classification network in the two-stage anomaly classification model for training;
[0084] The classification network calculates the loss function based on the feature map and the corresponding label, and adjusts the classifier parameters through the back propagation algorithm to minimize the difference between the predicted label and the actual label;
[0085] When the loss function tends to be stable, it indicates that the network converges.
[0086] Furthermore, this step also needs to be described in detail that the classification network includes at least a set of deconvolution layers and a ResNet50 network structure, inputs a feature map after feature fusion, and outputs a classification result, wherein the deconvolution layer and the ResNet50 network structure are connected in series.
[0087] Specifically, the weights of the ResNet50 network are determined, and the cross entropy loss function (BSE) and the Adam optimizer are used for back propagation and parameter update. The output is calculated first in each training. The output is calculated based on the created classification network. The activation functions contained in the network are all function, the output layer contains a Function, used to calculate probability, its mathematical expression formula is as follows:
[0088]
[0089]
[0090] in, For input, Indicates the number of types, represents the original score vector;
[0091] The loss is calculated using the cross entropy loss function, and its mathematical expression formula is as follows:
[0092]
[0093] in, is the number of samples, is the actual value, is the predicted value;
[0094] Using back propagation, the gradient of the network parameters is calculated according to the loss function, and the optimization algorithm is used to apply the Adam optimizer to update the network parameters as follows:
[0095] ,
[0096] in, is the average value of the gradient at the first moment, is the non-central variance value of the gradient at the second moment, is the average value of the gradient at the first moment, is the variance of the gradient at the second moment;
[0097]
[0098] in, is the current moment parameter, is the parameter at the previous moment, is the learning rate, is a constant, usually set to ;
[0099] Repeat the above steps until the set number of iterations is completed.
[0100] As an example, the label type used in the embodiment of the present invention is one-hot encoding; for example, [1,0,0,0,0] and [0,1,0,0,0] represent an abnormal type respectively. After being processed by the ResNet50 network, a feature vector equal to the number of categories is output, and then the feature vector is processed by the fully connected layer. The function converts the feature vector into a probability distribution vector. Each element in this vector represents the probability that the input image belongs to the corresponding category. Finally, the category with the highest probability is selected as the classification result.
[0101] Step 5: Following the method of step 1, a new spectrum graph is generated using the bearing signals collected under different speed conditions to test the two-stage abnormal classification model. After the autoencoder network learns the features of the input spectrum graph, if it is in an abnormal state, the classifier will classify and judge its data state.
[0102] Reference Figure 4,The classification results show that five types of abnormal conditions are obtained (bearing wear, bearing looseness, bearing overheating, bearing breakage and poor bearing lubrication). Figure 4 In the confusion matrix, the horizontal axis represents the prediction results obtained by the two-stage anomaly classification model, and the vertical axis represents the five real anomaly states. Specifically, each column represents the predicted category, and each row represents the real category of the data.
[0103] It should also be noted that in this embodiment, Figure 4 The numbers in the grids represent the number of real data predicted to be of this category. In the constructed matrix, it can be seen that the predicted category is the same as the actual situation, and there is no prediction error, so the prediction result completely matches the actual state, which verifies the authenticity of the technical effect of the method of the present invention.
[0104] It should be noted that the above embodiments are only used to illustrate the technical solutions 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 solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A two-stage anomaly classification method based on autoencoder, characterized in that: include: Based on the autoencoder network array and classification network, a two-stage anomaly classification network model is constructed; The autoencoder network array is a parallel array with multiple autoencoder networks as basic units, and the autoencoder network at least includes an encoder, a decoder and an attention mechanism module; The encoder includes three sets of convolution and pooling layers to perform dimensionality reduction and feature extraction on the input spectrogram; The decoder adopts a network structure symmetrical to that of the encoder, and reconstructs the input spectrum image using the learned features and deconvolution operations; The attention mechanism module uses function as an activation function and a set of convolutional layers, where the convolutional layers use 1×1 convolution kernels to generate weight maps with the same spatial dimensions as the input feature map; The classification network includes at least one set of deconvolution layers and a ResNet50 network structure, inputs a feature map after feature fusion, and outputs a classification result, wherein the deconvolution layer and the ResNet50 network structure are connected in series; Preprocess the four multi-source signals including axial vibration signal, radial vibration signal, tangential vibration signal and audio signal, and draw the spectrum diagram; Using the Min-Max method, the amplitudes of multi-source vibration signals and audio signals are adjusted to between [0,1] to eliminate the amplitude differences between the signals. Sample multiple source signals at a sampling rate of 50 kHz; Apply FFT transformation to audio and vibration signals, convert the signals from time domain to frequency domain, and draw a spectrum diagram based on the transformation results; Using the spectrum graph as input in the constructed autoencoder network, unsupervised training is performed until the network converges; Inputting the spectrogram into an autoencoder network in a two-stage anomaly classification model established based on an autoencoder; The encoder encodes the high-dimensional input into low-dimensional latent variables to learn features and representations to achieve feature extraction; The decoder restores the low-dimensional latent variables of the hidden layer to minimize the reconstruction error; The training process of unsupervised training uses the back-propagation algorithm to optimize the network parameters; When the loss function becomes stable, the network converges; The encoding process from the input layer to the hidden layer is as follows: in, is the learned hidden feature, is the activation function, which is selected here function, is the weight and bias matrix of the encoder; The decoding process from the hidden layer to the output layer is as follows: in, To reconstruct the sample, is the activation function, which is selected here function, , are the weight and bias matrices of the decoder; The MSE loss function is used to calculate the reconstruction error, and its mathematical expression formula is as follows: in, is the number of samples, is the true value, is the reconstruction value; Using back propagation, the gradient of the network parameters is calculated according to the loss function, and then the optimization algorithm is used to apply the Adam optimizer to update the network parameters. The specific process is shown in the following formula: , in, is the average value of the gradient at the first moment, is the non-central variance value of the gradient at the second moment, is the average value of the gradient at the first moment, is the variance of the gradient at the second moment; in, is the current moment parameter, is the parameter at the previous moment, is the learning rate, is a constant, usually set to ; Repeat the above encoding process from the input layer to the hidden layer, the decoding process from the hidden layer to the output layer, calculate the reconstruction error using the MSE loss function, calculate the gradient of the network parameters according to the loss function, and apply the Adam optimizer to update the network parameters until the set number of iterations is completed; Inputting the spectrum graphs of the multi-source signals in parallel into the autoencoder network array in the two-stage anomaly classification network model for autoencoder network processing, and outputting feature graphs; The signal sources of the multi-source signal include an axial vibration signal, a radial vibration signal, a tangential vibration signal and an audio signal; Freeze the four trained autoencoder networks and keep the weights of these networks unchanged; Inputting four groups of frequency spectra of multi-source signals including the axial vibration signal, the radial vibration signal, the tangential vibration signal and the audio signal in parallel; After being processed by the autoencoder network encoder, a feature map in the form of a matrix is obtained; The four sets of feature maps in the form of matrices are added together to perform a feature fusion operation to obtain a concatenated feature map, i.e., a new feature map; Input the spliced feature graph into the classification network to classify device anomalies, and output the classification result; The spliced feature map is input into the classification network in the two-stage anomaly classification model for training; The classification network calculates a loss function based on the feature map and the corresponding label, and adjusts the classifier parameters through a back-propagation algorithm to minimize the difference between the predicted label and the actual label; When the loss function tends to be stable, it indicates that the network converges; Determine the weights of the ResNet50 network, and use the cross entropy loss function (BSE) and the Adam optimizer for back propagation and parameter update. The output is calculated first in each training. The output is calculated based on the created classification network. The activation functions contained in the network are function, the output layer contains a Function, used to calculate probability, its mathematical expression formula is as follows: in, For input, Indicates the number of types, represents the original score vector; The loss is calculated using the cross entropy loss function, and its mathematical expression formula is as follows: in, is the number of samples, is the actual value, is the predicted value; Using back propagation, the gradient of the network parameters is calculated according to the loss function, and the optimization algorithm is used to apply the Adam optimizer to update the network parameters as follows: , in, is the average value of the gradient at the first moment, is the non-central variance value of the gradient at the second moment, is the average value of the gradient at the first moment, is the variance of the gradient at the second moment; in, is the current moment parameter, is the parameter at the previous moment, is the learning rate, is a constant, usually set to ; Repeat the above steps of determining the weights of the ResNet50 network, calculating the loss using the cross entropy loss function, calculating the gradient of the network parameters according to the loss function, and applying the Adam optimizer to update the network parameters until the set number of iterations is completed; If it is in an abnormal state, the classifier will classify and judge its data state. The classification results of the equipment abnormality classification include five situations: bearing wear, bearing looseness, bearing overheating, bearing breakage and poor bearing lubrication.
2. The two-stage anomaly classification method based on autoencoder according to claim 1 is characterized in that: The spectrograms are of uniform size.
3. The two-stage anomaly classification method based on autoencoder according to claim 2 is characterized in that: Before forming the spectrum diagram, the collected multi-source signals need to be preprocessed, and the preprocessing includes: By normalization processing, adjusting the amplitude of the multi-source signal; Using a random sampling segmentation method, sampling is performed from the multi-source signals according to a uniform data length; Convert the sampled time series signal into a spectrum diagram.
Citation Information
Patent Citations
Hyperspectral and laser radar classification method for loop generation learning based on modal attention
CN117893827A
