An unsupervised construction machinery fault detection method based on memory autoencoder
By introducing a memory module into the autoencoder and using the mean square error of the reconstructed samples and normal samples as the anomaly score, a threshold is set to judge the fault, which solves the problem of the difficulty of distinguishing faults in the autoencoder in fault detection and achieves efficient fault detection.
Patent Information
- Application Number
- CN202311213759.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-20
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2043-09-20
AI Technical Summary
Existing autoencoder models have difficulty effectively distinguishing between normal and abnormal samples in anomaly detection, resulting in insufficient reconstruction loss to differentiate between positive and negative samples and thus failing to accurately detect faults.
An autoencoder with a memory module is introduced. By training on normal samples, the mean square error between the reconstructed samples and normal samples is defined as the anomaly score, and a threshold is set to determine whether a fault has occurred.
It enables precise differentiation of faults in engineering machinery, and can accurately detect abnormal vibration data with only normal vibration data training, thus improving the accuracy and reliability of detection.
Smart Images

Figure CN117494015B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent fault diagnosis of construction machinery, and specifically provides an unsupervised fault detection method for construction machinery based on memory autoencoder. This method trains an autoencoder with added memory module using normal samples, defines the mean square error between reconstructed samples and normal samples as the anomaly score, and selects a reconstruction threshold to determine whether the construction machinery has a fault. Background Technology
[0002] Mechanical systems play an indispensable role in industrialization, with rotating machinery accounting for the majority. A key component of rotating machinery is the gearbox. Due to the harsh industrial environment and its enclosed working conditions, gearbox maintenance is difficult, leading to frequent gearbox failures in rotating machinery, each potentially resulting in significant financial and productivity losses. Therefore, researching and developing data-driven methods and condition monitoring technologies to achieve rapid, reliable, and high-quality automatic diagnostics is essential.
[0003] Autoencoders, as an unsupervised nonlinear dimensionality reduction method, are widely used in anomaly detection. They combine encoders and decoders to achieve accurate reconstruction of the original data. In anomaly detection, by learning from normal samples, the decoder reconstructs the latent variables of anomaly samples into the structure of normal samples when encountering anomalies. Therefore, when calculating the reconstruction loss, the reconstruction loss of normal samples is much lower than that of anomalies, and normal and anomaly samples can be well distinguished by giving a reasonable threshold.
[0004] However, due to the powerful expressive capabilities of neural networks, autoencoder models often reconstruct abnormal samples very well, making the reconstruction loss in such cases insufficient to distinguish between positive and negative samples. Introducing a memory module into the autoencoder to automatically learn the typical features of normal samples effectively avoids this problem. This method restricts the latent variables to the typical features of positive samples. Therefore, when an abnormal sample is input, the latent variables input to the decoder are still within the features of normal samples, resulting in the reconstruction of only normal samples. Consequently, the reconstruction loss for negative samples is significantly greater than that for positive samples, leading to a more distinct decision boundary.
[0005] This invention provides a method for monitoring the condition of construction machinery based on a memory autoencoder. When a rotating machine malfunctions, vibration data that is completely different from that under normal operating conditions will be obtained. This method can be used to detect faults in rotating equipment of construction machinery. Summary of the Invention
[0006] Based on the above-mentioned problem background, the present invention provides an unsupervised fault detection method for engineering machinery based on memory autoencoder. Specifically, the autoencoder and memory module are trained using normal samples, the reconstruction loss is set as the anomaly score, and a threshold is set to determine whether the rotating part has an anomaly.
[0007] The specific technical solution of this invention is as follows:
[0008] An unsupervised fault detection method for engineering machinery based on memory autoencoders, the method comprising the following steps:
[0009] S1. In the data preprocessing stage, vibration signals of engineering machinery components are collected by accelerometers. The obtained entire variable working condition data is segmented. Each segmented data is normalized and then subjected to continuous wavelet transform to obtain a coefficient matrix. The coefficient matrix is visualized to obtain a continuous wavelet transform time-frequency diagram, which is used as input data.
[0010] S2. In the network initialization phase, both the encoder and decoder adopt a two-dimensional convolutional neural network structure to initialize the network parameters and module size of the memory module. The memory module is a learnable parameterized matrix, i.e., the memory module matrix.
[0011] S3. In the network training phase, the obtained normal samples are input into the encoder to obtain latent variables. The similarity between the latent variables and the memory modules is calculated and then passed through Softmax to obtain the weight matrix. The weight matrix parameters and the memory module matrix are weighted and added together to obtain new latent variables. After passing through the decoder, the reconstructed signal is obtained. The information entropy of the weight matrix and the mean square error of the signals before and after reconstruction are used as the loss function for training.
[0012] S4. During the network testing phase, the mean square error of the input and output signals is used as the anomaly score for fault detection. An anomaly threshold is set. An anomaly score greater than the threshold is considered a fault signal, and vice versa.
[0013] Furthermore, the data preprocessing steps in S1 are as follows:
[0014] For each segmented fault signal x k The principle behind its max-min normalization is as follows:
[0015]
[0016] in, Input data x k The reconstructed data, mean(x) k ) represents the mean of the input signal, and max(x) represents the mean of the input signal. k ) and min(x kLet be the maximum and minimum values of the input signal, respectively. The principle of performing continuous wavelet transform on the normalized signal is as follows:
[0017]
[0018] Where s and τ represent the scale and translation parameters, respectively, t is time, ψ(*) is the wavelet basis function, and w k The obtained wavelet time-frequency two-dimensional matrix.
[0019] Furthermore, the steps for training the network in S3 are as follows:
[0020] First, let C be the number of channels of the latent variable Z obtained by the encoder from the input signal, and let z be a denoted as z. i Let m be the latent variable vector of the i-th pixel, and let m be the size of the memory module matrix, which is N*C, where N is a given hyperparameter. The similarity between the latent variable vector of the i-th pixel and the memory module matrix is calculated as follows:
[0021] w i =[ <z i ,m1>,…, <z i ,m j >,…, <z i ,m N >] (3)
[0022] Among them, w i For the latent variable z i Similarity vectors calculated by the memory module <z i ,m j > is a latent variable z i and memory vector m j The inner product of w is the similarity. i The specific principle of performing softmax normalization is as follows:
[0023]
[0024] Where w ij Let be the similarity between the i-th latent variable and the j-th memory vector. The corresponding normalized weights are then weighted and accumulated with the memory modules to obtain the new latent variables. The specific steps are as follows:
[0025]
[0026] The principle behind introducing information entropy as a constraint is as follows:
[0027]
[0028] in for The information entropy, and the final loss function L are:
[0029]
[0030] Where K is the size of a batch of data, α is the loss balancing parameter, and W k and Input x k The weight matrix and reconstructed samples.
[0031] Furthermore, the specific steps in S4 to determine whether the construction machinery has malfunctioned are as follows:
[0032] The threshold value η is selected as 0.9 to 1 times the mean square error of normal data. Test data greater than η are judged as abnormal, and those less than η are normal.
[0033] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0034] 1) This invention proposes an unsupervised fault detection method for engineering machinery based on memory autoencoders. By introducing a memory module, the problem of autoencoders easily overfitting to normal samples is solved.
[0035] 2) Only normal vibration data is needed for training, which can accurately distinguish abnormal vibration data of engineering machinery. Attached Figure Description
[0036] Figure 1 This is a flowchart of the present invention;
[0037] Figure 2 A time-frequency plot reconstructed from test data;
[0038] Figure 3 Time-frequency plot reconstructed from training data;
[0039] Figure 4 To reconstruct the loss descent curve. Detailed Implementation
[0040] To more clearly and completely illustrate the technical solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and examples:
[0041] This example uses bearing data from the Case Western Reserve University (CRWU) laboratory, selecting vibration data from the drive end. Three fault sizes are defined as 7mm, and the sampling frequency is f. s The value was 12000, the motor speed was 1772 rpm, and the data length N was 4096, resulting in a total of 1000 positive samples and 200 samples for each type of fault. 800 normal samples were used as the training set, and the remaining normal and fault samples were combined to form the test set.
[0042] S1. In the data preprocessing stage, in a specific embodiment of the present invention, the principle of performing maximum-minimum normalization on the original vibration data is as follows:
[0043]
[0044] in, Input data x k The reconstructed data, mean(x) k ) represents the mean of the input signal, and max(x) represents the mean of the input signal. k ) and min(x k Let be the maximum and minimum values of the input signal, respectively. The principle of performing continuous wavelet transform on the normalized signal is as follows:
[0045]
[0046] Where s and τ represent the scale and translation parameters, respectively, t is time, ψ(*) is the wavelet basis function, and w k The obtained wavelet time-frequency two-dimensional matrix.
[0047] First, all input data are cropped and standardized. Cropping ensures that all input data are of the same size, and standardization ensures that all input data approximately follow the same Gaussian distribution, which is beneficial for network training.
[0048] S2. In the network initialization phase, both the encoder and decoder adopt a two-dimensional convolutional neural network structure to initialize the network parameters and module size of the memory module. The memory module is a learnable parameterized matrix.
[0049] S3. In the network training phase, after setting the network parameters and the size of the memory modules, the network training process is as follows:
[0050] First, the input signal x k Let C be the number of channels of the latent variable Z obtained by the encoder, and let z be a denoted z. i Let be the latent variable vector of the i-th pixel, and let the size of the memory module matrix m be N*C, where N is a given hyperparameter. In this example, m is chosen to be 50. The similarity between the latent variable vector of the i-th pixel and the memory module matrix is calculated as follows:
[0051] w i =[ <z i ,m1>,…, <z i ,m j >,…, <z i ,m N >] (3)
[0052] Among them, w i For the latent variable zi Similarity vectors calculated by the memory module <z i ,m j > is a latent variable z i and memory vector m j The inner product of w is the similarity. i The specific principle of performing softmax normalization is as follows:
[0053]
[0054] Among them, w ij Let be the similarity between the i-th latent variable and the j-th memory vector. The corresponding normalized weights are then weighted and accumulated with the memory modules to obtain the new latent variables. The specific steps are as follows:
[0055]
[0056] To obtain sparser weight parameters, information entropy is introduced as a constraint. The specific principle is as follows:
[0057]
[0058] in for The information entropy, and the final loss function L are:
[0059]
[0060] Where K is the size of a batch of data, α is the loss balancing parameter, and in this example, α is fixed at 0.02, W k and Input x k The weight matrix and reconstructed samples.
[0061] S4. During the network testing phase, the mean square error of the input and output signals is used as the anomaly score for fault detection. An anomaly threshold is set. An anomaly score greater than the threshold is considered a fault signal, and vice versa.
[0062] The specific steps for determining whether construction machinery has malfunctioned are as follows:
[0063] The threshold value η is selected as 0.9 to 1 times the mean square error of normal data. Test data greater than η are judged as abnormal, and those less than η are normal.
[0064] To demonstrate the effectiveness of this invention, AUC and f1-score were selected as evaluation metrics, and ordinary autoencoders and other anomaly detection methods were used for comparison. The experimental results are as follows:
[0065] Methods AUC F1 score AE 94.37% 92.05% OCSVM 88.03% 86.57% Memory-AE 96.54% 96.20%
[0066] Experiments have shown that the present invention has the highest fault detection accuracy on the Western Reserve University dataset, thus the present invention can effectively detect whether engineering machinery has malfunctioned.
[0067] The above are preferred embodiments of the present invention. Any changes made to the technical solution of the present invention that do not exceed the scope of the technical solution of the present invention shall fall within the protection scope of the present invention.
Claims
1. An unsupervised fault detection method for engineering machinery based on a memory autoencoder, characterized in that, The method includes the following steps: S1. In the data preprocessing stage, vibration signals of engineering machinery components are collected by accelerometers. The obtained entire variable working condition data is segmented. Each segmented data is normalized and then subjected to continuous wavelet transform to obtain a coefficient matrix. The coefficient matrix is visualized to obtain a continuous wavelet transform time-frequency diagram, which is used as input data. The steps of data preprocessing are as follows: For each segmented fault signal x k The principle behind its max-min normalization is as follows: (1) in, Input data x k The reconstructed data, mean(x) k ) represents the mean of the input signal, and max(x) represents the mean of the input signal. k ) and min(x k Let be the maximum and minimum values of the input signal, respectively. The principle of performing continuous wavelet transform on the normalized signal is as follows: (2) Where s and τ represent the scale and translation parameters, respectively, and t is time. Let w be the wavelet basis function. k The obtained wavelet time-frequency two-dimensional matrix; S2. In the network initialization phase, both the encoder and decoder adopt a two-dimensional convolutional neural network structure to initialize the network parameters and module size of the memory module. The memory module is a learnable parameterized matrix, i.e., the memory module matrix. S3. In the network training phase, the obtained normal samples are input into the encoder to obtain latent variables. The similarity between the latent variables and the memory modules is calculated and then passed through Softmax to obtain the weight matrix. The weight matrix parameters and the memory module matrix are weighted and added together to obtain new latent variables. After passing through the decoder, the reconstructed signal is obtained. The information entropy of the weight matrix and the mean square error of the signals before and after reconstruction are used as the loss function for training. The steps for network training are as follows: First, let C be the number of channels of the latent variable Z obtained by the encoder from the input signal, and let z be a denoted as z. i Let m be the latent variable vector of the i-th pixel, and let m be the size of the memory module matrix. Where N is a given hyperparameter, the similarity between the latent variable and the memory module matrix of the i-th pixel is calculated as follows: (3) Among them, w i For the latent variable z i Similarity vectors calculated by the memory module <z i ,m j > is a latent variable z i and memory vector m j The inner product of w is the similarity. i The specific principle of performing softmax normalization is as follows: (4) Where w ij Let be the similarity between the i-th latent variable and the j-th memory vector. The corresponding normalized weights are then weighted and accumulated with the memory modules to obtain the new latent variables. The specific steps are as follows: (5) The principle behind introducing information entropy as a constraint is as follows: (6) in for The information entropy, and the final loss function L are: (7) Where K is the size of a batch of data, α is the loss balancing parameter, and W k and Input x k The weight matrix and reconstructed samples; S4. During the network testing phase, the mean square error of the input and output signals is used as the anomaly score for fault detection. An anomaly threshold is set. An anomaly score greater than the threshold is considered a fault signal, and vice versa.
2. The unsupervised fault detection method for engineering machinery based on a memory autoencoder according to claim 1, characterized in that, The specific steps for determining whether construction machinery has malfunctioned in S4 are as follows: The threshold value η is selected as 0.9 to 1 times the mean square error of normal data. Test data greater than η are judged as abnormal, and those less than η are normal.
Citation Information
Patent Citations
Credit card fraud detection method and system based on memory variation self-encoding model
CN115187266A
