One-dimensional time sequence signal anomaly detection method and system
By using CWT multi-scale analysis and adversarial neural network models (AE, GAN and AUTO-GAN) in the detection of acoustic vibration signal anomalies, the problem of poor detection effect of the prior art in small signal components and strong noise environments is solved, and higher recognition accuracy and applicability are achieved.
Patent Information
- Application Number
- CN202411775688.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-05
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2044-12-05
AI Technical Summary
The existing acoustic vibration signal abnormality detection method has a small proportion of fault signal components or is masked by strong background noise, and it is difficult to effectively implement in practical applications.
Continuous wavelet transform (CWT) is used for multi-scale analysis, combining adversarial autoencoder (AE and GAN) and AUTO-GAN models, one-dimensional timing signals are extracted and processed, and the detection results are output.
Time-frequency features are effectively extracted through CWT multi-scale analysis, combined with adversarial training of adversarial neural networks, the recognition accuracy of abnormal signals is significantly improved, suitable for detection under small data volumes, and performs excellently in background noise environments.
Smart Images

Figure CN119884919A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of equipment fault diagnosis, and in particular relates to a one-dimensional time series signal anomaly detection method and system. Background Art
[0002] Acoustic-vibration signals are typical one-dimensional time series signals. Anomaly detection based on acoustic-vibration signals plays a vital role in modern industry, especially in the field of equipment status monitoring and fault diagnosis. With the increasing complexity of industrial equipment, traditional fault diagnosis methods can no longer meet the needs of real-time, efficient and accurate detection. In recent years, anomaly detection based on acoustic-vibration signals has attracted more and more attention from researchers and engineers as an effective diagnostic method.
[0003] In recent years, machine learning technology has been introduced into the detection of abnormal acoustic vibration signals. By learning from a large amount of historical data, machine learning algorithms can automatically extract effective features and perform pattern recognition, which significantly improves the accuracy and robustness of detection. Traditional machine learning algorithms such as support vector machine (SVM), random forest (RF), and extreme learning machine (ELM) have shown good application prospects in fault diagnosis. Guiji Tang et al. proposed a method based on improved fast spectral correlation and optimized random forest to more effectively extract bearing fault features and accurately identify bearing faults. With the development of deep learning, models such as deep neural network (DNN), convolutional neural network (CNN) and recurrent neural network (RNN) are increasingly being used in the detection of abnormal acoustic vibration signals. These deep learning models can automatically learn complex features in signals without manual feature extraction, which improves the automation and accuracy of detection. For example, interpolation deep neural network (IDNN) and ID-condition autoencoder, they learn the characteristics of normal sound by minimizing reconstruction error. Rishikesh Magar et al. proposed a convolutional neural network-based FaultNet for different types of bearing fault detection. Youde Liu et al. proposed a method based on spectrum-time fusion and deep learning network to learn the characteristics of normal sound, and achieved better results than the baseline in anomaly detection of DCASE 2020 Challenge. However, these methods lack in-depth research on the feature extraction of acoustic vibration signals and rely entirely on the training of a large amount of data to obtain better detection and recognition results. However, in reality, it is difficult to collect a large amount of fault data for neural network model training. In addition, when the fault signal component accounts for a small proportion of the full-frequency signal bandwidth or is masked by strong background noise, its detection and recognition effect will be significantly deteriorated.
[0004] In summary, the existing signal anomaly detection methods cannot meet the actual usage requirements. Summary of the invention
[0005] The embodiments of the present invention provide a one-dimensional time series signal anomaly detection method and system, which solve the problem that the existing signal anomaly detection method cannot meet actual use requirements.
[0006] An embodiment of the present invention provides a one-dimensional time series signal anomaly detection method, comprising: Use CWT multi-scale analysis to analyze the one-dimensional time series signal to be processed; Adopt AE and GAN adversarial autoencoder to process the one-dimensional time series signal after CWT multi-scale analysis; The AUTO-GAN model is used to process the one-dimensional time series signal after adversarial autoencoding and output the detection results. Optionally, the mathematical formula of the CWT is specifically: , Where t is time, x(t) is the input signal, is the wavelet function, a is the scale parameter, b is the translation parameter, is the continuous wavelet transform.
[0007] Optionally, the mother wavelet of the CWT is specifically a Morlet wavelet, and its bandwidth mathematical formula is specifically: , in, is the bandwidth, is the center frequency.
[0008] Optionally, the base wavelet of the CWT is specifically a complex Morlet wavelet, and its mathematical formula is specifically: , Where t is the time, is the central circle frequency of the wavelet, i is the imaginary unit, is the complex Morlet wavelet transform.
[0009] Optionally, the mathematical formula of AE is specifically: , in, is the input real sample feature, h is the latent space representation of the sample, To reconstruct sample features, f and g are the activation functions of the encoder and decoder respectively, W 1 and W 2 are the weight matrices of the encoder and decoder, respectively, and b1 and b2 are the bias vectors of the encoder and decoder, respectively.
[0010] Optionally, the mathematical formula of the objective function of the GAN is specifically: , in, is the input real sample feature, is random noise, is to minimize the generation of fake samples, is to maximize the score of the input true sample, is the objective function, is the score of the discriminator on the input real sample features, is a fake sample generated by the generator, is the expected value of the score of the input real sample, is the expected value of the generated fake sample rating.
[0011] Optionally, the mathematical formula of the overall loss function of the generator in the AUTO-GAN model is specifically: , in, is the overall loss function, To input the real sample features, To reconstruct sample features, is the root mean square error between the input true sample features and the reconstructed sample features, is the feature matching loss coefficient, is the feature matching loss.
[0012] Optionally, the mathematical formula of the loss function of the discriminator in the AUTO-GAN model is specifically: , in, To input the real sample features, To reconstruct sample features, is the mean of the prediction loss of the real sample features, is the mean of the prediction loss of the reconstructed sample features, is the gradient penalty coefficient, is the gradient penalty term.
[0013] On the other hand, an embodiment of the present invention further provides a one-dimensional time series signal anomaly detection system, comprising: CWT module, used for analyzing the one-dimensional time series signal to be processed by CWT multi-scale analysis; Adversarial autoencoder, which is used to process one-dimensional time series signals after CWT multi-scale analysis using AE and GAN adversarial autoencoder; The AUTO-GAN model is used to process the one-dimensional time series signal after adversarial autoencoding and output the detection results.
[0014] One or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages: The patent of this invention proposes a one-dimensional time series signal anomaly detection method, which is an acoustic vibration signal anomaly detection method based on continuous wavelet transform and adversarial neural network. Through multi-scale analysis of specific continuous wavelet transform, it can more effectively extract the typical features of the target time-frequency area, further highlight the difference between normal signals and abnormal signals, and provide more valuable discrimination information for subsequent anomaly detection; at the same time, an adversarial neural network with encoder and decoder as the main architecture is introduced as an anomaly detection model. Through adversarial training, the discriminator is committed to providing feature matching guidance for the generator, and the generator learns the feature representation of samples in the latent space. By reconstructing the feature distribution of samples, more accurate identification of abnormal signals is achieved. The implementation results show that the proposed method has achieved a high recognition accuracy rate under multiple scene data. The model proposed by this invention has a small scale, and a good recognition accuracy rate can be obtained under a small amount of data. It is suitable for the implementation of electromechanical equipment, various equipment and factory production lines. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 A diagram of a parameter optimization architecture of a continuous wavelet transform according to an embodiment of the present invention; Figure 2 This is a diagram of a generator architecture in one embodiment of the present invention; Figure 3 This is a diagram of the discriminator architecture in one embodiment of the present invention; Figure 4 It is the overall framework of the model in one embodiment of the present invention. DETAILED DESCRIPTION
[0016] In order to overcome the shortcomings of the prior art, the present invention provides a one-dimensional time series signal anomaly detection method and system, which can achieve a high anomaly recognition rate when the fault signal component accounts for a small proportion of the full-frequency signal bandwidth or is masked by strong background noise.
[0017] A one-dimensional time series signal anomaly detection method, comprising: Use CWT multi-scale analysis to analyze the one-dimensional time series signal to be processed; Adopt AE and GAN adversarial autoencoder to process the one-dimensional time series signal after CWT multi-scale analysis; The AUTO-GAN model is used to process the one-dimensional time series signal after adversarial autoencoding and output the detection results. The specific plan is as follows: Continuous Wavelet Transform CWT (Continuous Wavelet Transform) is an effective time-frequency analysis method, which is very suitable for analyzing non-stationary signals and has strong anti-interference ability. The mathematical definition of CWT is as follows: , Where t is time, x(t) is the input signal, is the wavelet function, a is the scale parameter, b is the translation parameter, is the continuous wavelet transform.
[0018] The result of continuous wavelet transform is wavelet coefficients, which provide local information of the signal in time and frequency. These wavelet coefficients constitute an image on the time-frequency plane, that is, a time-frequency spectrum. The scale parameter determines the degree of expansion and contraction of the wavelet. A larger scale corresponds to the analysis of the low-frequency part, and vice versa, a smaller scale corresponds to the analysis of the high-frequency part. The translation parameter determines the position of the wavelet on the time axis. By adjusting the scale and translation parameters, the local characteristics of the signal can be analyzed in detail.
[0019] The choice of mother wavelet has an important influence on the effect of CWT. Commonly used ones include Morlet, Mexican Hat, Haar, Daubechies, Coiflet, etc. The present invention selects Morlet to perform continuous wavelet analysis of signals. CWT realizes multi-scale time-frequency analysis of signals by convolving the signal with wavelets of different scales. It is adaptive in the time-frequency domain and can select the appropriate wavelet scale according to the local characteristics of the signal. Therefore, for non-stationary signals with rapid frequency changes or unstable signals, CWT can provide better time-frequency resolution than STFT. In addition, the multi-scale analysis of CWT can capture the different characteristics of the signal, thereby describing the changes in the signal in more detail. However, its computational complexity is relatively high, especially when processing large amounts of data, the computational cost increases significantly. At the same time, the wavelet parameter setting needs to be debugged and optimized to ensure the accuracy and effectiveness of the analysis. The CWT parameters are optimized from the wavelet function, center frequency, bandwidth and scale parameters, and the process is as follows: Figure 1 shown.
[0020] In the present invention, complex Morlet wavelet is selected as the base wavelet of continuous wavelet transform, which is defined as: , Where t is the time, is the central circle frequency of the wavelet, i is the imaginary unit, is the complex Morlet wavelet transform.
[0021] The complex Morlet wavelet combines a Gaussian window and a sine wave and is suitable for analyzing high-frequency signals. The bandwidth of the Morlet wavelet is determined by a parameter, which is expressed as the standard deviation in the frequency domain. For the Morlet wavelet, the bandwidth is calculated using the following formula: , in, is the bandwidth, is the center frequency.
[0022] The bandwidth determines the frequency resolution of the wavelet. Narrower bandwidths provide higher frequency resolution, and longer bandwidths provide higher time resolution.
[0023] In CWT, the main parameter that affects the wavelet coefficients is the scale parameter. The larger the scale parameter, the more attention is paid to the low-frequency features. The central circle frequency of the Morlet wavelet Determines the main frequency range of the wavelet, and the scale parameter a controls the expansion and contraction of the wavelet, that is, the different frequency components in the corresponding signal. The present invention uses the center frequency function to control the scale range, and defines the scale parameter as follows: , in, is the scale parameter, the constant M is an empirical parameter, constant N Indicates the number of scales used in the wavelet transform.
[0024] constant M It is used to balance the relationship between scale range and frequency range. Its selection is based on how to effectively capture the main features of the signal without causing the scale range to be too narrow or too wide, thereby achieving a balance between computational efficiency and analysis effect. N Represents the number of scales used in the wavelet transform. Choosing a larger value provides higher frequency resolution, which allows more scales to be used in the transform, covering a wider frequency range.
[0025] (2) Adversarial Autoencoder The combination of AE (Autoencoder) and GAN (Generative Adversarial Network) aims to enhance the performance of generative models by leveraging the strengths of both. AE excels at data dimensionality reduction and feature learning, while GAN excels at generating high-quality data. By combining AE's feature extraction capabilities with GAN's generation capabilities, a more efficient and powerful generative model can be built.
[0026] AE is an unsupervised learning model mainly used for data dimensionality reduction and feature learning. Its basic structure consists of two parts: encoder and decoder. The encoder maps the input data to a low-dimensional latent space, while the decoder reconstructs the input data from the latent space. AE is trained by minimizing the difference between the input data and the reconstructed data. The mathematical representation of AE is as follows: , in, is the input real sample feature, h is the latent space representation of the sample, To reconstruct sample features, f and g are the activation functions of the encoder and decoder respectively, W 1 and W 2 are the weight matrices of the encoder and decoder respectively, b 1 and b 2 are the bias vectors of the encoder and decoder respectively.
[0027] GAN consists of a generator and a discriminator. Figure 2 , Figure 3 As shown in Figure 2. The generator is responsible for generating realistic data, while the discriminator tries to distinguish between real data and generated data. GAN uses adversarial training to enable the generator to continuously improve the quality of the data it generates in order to better "fool" the discriminator.
[0028] The objective function of the generative adversarial network can be expressed as: , in, is the input real sample feature, is random noise, is to minimize the generation of fake samples, is to maximize the score of the input true sample, is the objective function, is the score of the discriminator on the input real sample features, is a fake sample generated by the generator, is the expected value of the score of the input real sample, is the expected value of the generated fake sample rating.
[0029] Adversarial autoencoders optimize the encoder through adversarial training, so that the distribution of the latent space output by the encoder is close to a prior distribution. The generator samples latent variables from the prior distribution, and the decoder generates data from the latent variables. This method combines the feature learning ability of the autoencoder and the generative adversarial ability of GAN, which not only improves the quality of data generation, but also improves the stability of the model.
[0030] (3) Anomaly detection model based on continuous wavelet transform and adversarial neural network (AUTO-GAN) The overall framework of the AUTO-GAN model is as follows Figure 4 As shown in the figure, in the proposed AUTO-GAN model, the generator G is modified to an autoencoder that reconstructs the wavelet transformed time-frequency graph, while the discriminator D is trained to distinguish between the real spectrogram and the reconstructed spectrogram. The structure of G can be seen as an inverse cascade of a deep convolutional GAN (DCGAN), where the encoder of G is the discriminator of DCGAN and the decoder of G is the generator of DCGAN. The structure of D is mainly similar to the encoder of G, except that the last layer is replaced by a deep convolution to facilitate the extraction of semantic embedding. Layer normalization (LN) is mainly used, which can improve the training speed, generalization ability and stability of neural networks, especially on deep networks and large-scale datasets.
[0031] The discriminator is trained, and the loss function of the generator is modified to a feature matching loss constraint at the sample level. The generator learns the feature representation of the positive sample in the latent space as much as possible, and reduces the reconstruction loss of the reconstructed sample and the original sample during reconstruction. Since the model only accepts positive samples as training data, the feature representation of abnormal samples in the latent space will be significantly different from that of normal samples during the encoding stage, and the reconstruction error of abnormal samples during the decoding reconstruction stage will be significantly greater than the reconstruction error of normal samples. Based on this idea, the overall loss function of the generator can be constructed by extracting the mean and standard deviation of the embedding from the discriminator for comparison: , in, is the overall loss function, To input the real sample features, To reconstruct sample features, is the root mean square error between the input true sample features and the reconstructed sample features, is the feature matching loss coefficient, is the feature matching loss.
[0032] The loss function of the generator combines the difference in statistics with the mean squared error (MSE). The first term is expected to improve denoising performance, while the second term can improve robustness.
[0033] The loss function of the discriminator is set to: , in, To input the real sample features, To reconstruct sample features, is the mean of the prediction loss of the real sample features, which partly encourages the discriminator to classify the real samples as true, The mean of the prediction loss for reconstructing sample features, which partially encourages the discriminator to classify generated samples as fake, is the gradient penalty coefficient, It is the gradient penalty term, which is used to penalize the gradient of the discriminator to encourage the discriminator to maintain a smooth output between the formal samples and the generated samples.
[0034] The model learns the characteristic distribution of normal samples by training normal samples, so that the model can obtain a significantly enlarged reconstruction error when detecting abnormal samples. By selecting an appropriate reconstruction error threshold, abnormal samples can be effectively detected.
[0035] A one-dimensional time series signal anomaly detection system in an embodiment of the present invention includes: CWT module, used for analyzing the one-dimensional time series signal to be processed by CWT multi-scale analysis; Adversarial autoencoder, which is used to process one-dimensional time series signals after CWT multi-scale analysis using AE and GAN adversarial autoencoder; The AUTO-GAN model is used to process the one-dimensional time series signal after adversarial autoencoding and output the detection results. Specific embodiment: In the motor production line, end-of-line inspection is a crucial link, which ensures that the quality and performance of the motor meet the standards. In end-of-line inspection, the traditional use of human ears to listen to abnormal sounds is a common preliminary inspection method. Human ears listen to abnormal sounds mainly rely on the operator's experience and auditory acuity to judge whether there are abnormal conditions in the motor. However, it should be noted that although human ears listen to abnormal sounds is a simple and quick method, its accuracy and reliability are limited by many factors. Compared with traditional manual inspection methods, intelligent detection systems have many advantages. First, the intelligent detection system can realize 24-hour uninterrupted automatic detection, avoiding omissions and misjudgments of manual detection. Secondly, the intelligent detection system can record and analyze the test results to provide data support for product quality improvement. In addition, the intelligent detection system can also deal with complex and hidden faults, and improve the accuracy and reliability of detection through refined signal processing and feature extraction algorithms.
[0036] The motor offline inspection data in this paper is collected in the workshop, with a sampling rate of 48k and an audio segment of about 4s. There are 22 normal audio segments and 8 faulty audio segments. The original audio is segmented and sampled with an overlap rate of 25%. Each sample is 1s long and has 48,000 data points. Each sample is processed by continuous wavelet transform to obtain a time-frequency feature map of size 512×512 as the input sample. The training set contains 588 normal samples and the test set selects 100 faulty samples. After data preprocessing, it is found that the data sample produces fault features different from normal training samples in the 400 Hz-600 Hz frequency band. Therefore, the continuous wavelet transform parameters are set as: 'cmor100-10', the center frequency is 100 Hz, the bandwidth is '10', the mother wavelet is Morlet wavelet, the scale parameter constant M is 25, and the scale sequence length constant N is 512.
[0037] For this data set, the method proposed in the present invention (abbreviated as AUTO-GAN) and the methods in other literatures were used to conduct anomaly detection test comparisons, and the recognition accuracy results are shown in the following table. The results show that the method proposed in the present invention performs significantly better than other methods on the motor offline detection data set, proving the superiority of the method proposed in the present invention.
[0038] Motor offline detection accuracy comparison table
[0039] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A one-dimensional time series signal anomaly detection method, characterized in that: include: Use CWT multi-scale analysis to analyze the one-dimensional time series signal to be processed; Adopt AE and GAN adversarial autoencoder to process the one-dimensional time series signal after CWT multi-scale analysis; The AUTO-GAN model is used to process the one-dimensional time series signal after adversarial autoencoding and output the detection results.
2. The method according to claim 1, characterized in that The mathematical formula of the CWT is specifically: , Where t is time, x(t) is the input signal, is the wavelet function, a is the scale parameter, b is the translation parameter, is the continuous wavelet transform.
3. The method according to claim 1, characterized in that The mother wavelet of the CWT is specifically the Morlet wavelet, and its bandwidth mathematical formula is specifically: , in, is the bandwidth, is the center frequency.
4. The method according to claim 1, characterized in that The base wavelet of the CWT is specifically the complex Morlet wavelet, and its mathematical formula is specifically: , Where t is the time, is the central circle frequency of the wavelet, i is the imaginary unit, is the complex Morlet wavelet transform.
5. The method according to claim 1, characterized in that The mathematical formula of AE is specifically: , in, is the input real sample feature, h is the latent space representation of the sample, To reconstruct sample features, f and g are the activation functions of the encoder and decoder respectively, W 1 and W 2 are the weight matrices of the encoder and decoder, respectively, and b1 and b2 are the bias vectors of the encoder and decoder, respectively.
6. The method according to claim 1, characterized in that The mathematical formula of the objective function of the GAN is specifically: , in, is the input real sample feature, is random noise, is to minimize the generation of fake samples, is to maximize the score of the input true sample, is the objective function, is the score of the discriminator on the input real sample features, is a fake sample generated by the generator, is the expected value of the score of the input real sample, is the expected value of the generated fake sample rating.
7. The method according to claim 1, characterized in that The mathematical formula of the overall loss function of the generator in the AUTO-GAN model is specifically: , in, is the overall loss function, To input the real sample features, To reconstruct sample features, is the root mean square error between the input true sample features and the reconstructed sample features, is the feature matching loss coefficient, is the feature matching loss.
8. The method according to claim 1, characterized in that The mathematical formula of the loss function of the discriminator in the AUTO-GAN model is specifically: , in, To input the real sample features, To reconstruct sample features, is the mean of the prediction loss of the real sample features, is the mean of the prediction loss of the reconstructed sample features, is the gradient penalty coefficient, is the gradient penalty term.
9. A one-dimensional time series signal anomaly detection system, characterized in that: include: CWT module, used for analyzing the one-dimensional time series signal to be processed by CWT multi-scale analysis; Adversarial autoencoder, which is used to process one-dimensional time series signals after CWT multi-scale analysis using AE and GAN adversarial autoencoder; The AUTO-GAN model is used to process the one-dimensional time series signal after adversarial autoencoding and output the detection results.
Citation Information
Patent Citations
Bearing cross-working-condition fault prediction method based on adversarial transfer learning
CN114722879A
Industrial internet time series data anomaly detection method and device
CN116522265A
Abnormality detection method for multivariate time series data
CN118779731A
Anomaly detection device and anomaly detection method based on generative adversarial network architecture
US20220156580A1