Method for detecting motor based on integrated learning model of hybrid auto-encoder
By building a hybrid autoencoder integrated learning model, combining multiple audio feature extraction methods and a basic model of the autoencoder AU architecture, the problem of low detection accuracy in motor abnormality detection is solved, and more efficient detection effect is achieved.
Patent Information
- Application Number
- CN202411591732.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-11-08
AI Technical Summary
In the prior art, in motor abnormality detection, the autoencoder AU architecture is difficult to determine and the feature extraction method is difficult to determine, resulting in low detection accuracy.
Using a method based on a hybrid autoencoder integrated learning model, a base model including a variety of audio feature extraction methods and autoencoder AU architecture is constructed, and the detection accuracy is improved by training and integrating these basic models.
By integrating multiple basic models, the randomness of the model is reduced and the detection accuracy is improved, and more efficient motor abnormality detection is achieved.
Smart Images

Figure CN119476368A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of motor testing, and in particular to a method for detecting a motor based on a hybrid autoencoder integrated learning model. Background Art
[0002] The process of machine recognition of motor sound is to input the motor sound into the feature extraction method, then use the feature extraction method to extract the motor sound features, and finally input the motor sound features into the machine learning model for classification.
[0003] The existing technical solutions are:
[0004] First existing technology solution: Yang Tianjia. Research on forklift AGV DC motor anomaly detection and timing prediction algorithm based on mixed samples [D]. Qilu University of Technology, 2024. DOI: 10.27278 / d.cnki.gsdqc.2024.000872.
[0005] Second existing technical solution: Tao Yonghui, Wang Yong. Abnormal data detection of wind turbine based on improved K-means [J]. Foreign Electronic Measurement Technology, 2023, 42(04): 141-148. DOI: 10.19652 / j.cnki.femt.2304738.
[0006] The third existing technology solution: Liu Fawei. Rotating motor abnormality detection based on CAE-OC-SVM [J]. Industrial Control Computer, 2024, 37(03): 133-135.
[0007] Fourth prior art solution: Agrawal VK, Maurya S S. Unsupervised detection of anomalous sounds for machine condition monitoring[J]. DCASE2020 Challenge, Tech. Rep, 2020.
[0008] Fifth existing technical solution: Yuan Xuefeng, Ma Chenglong, Chen Shihe. Research on equipment parameter early warning based on GMM and NSET optimization algorithm [J]. Control Engineering, 2022, 29(06): 1058-1064. DOI: 10.14107 / j.cnki.kzgc.20210731.
[0009] Sixth prior art solution: Breunig MM, Kriegel HP, Ng RT, et al. Proceedings of the 2000 ACM SIGMOD international conference on Management of data[C] / / Proceedings of the 2000 Acm Sigmod International Conference on Management of Data. 2000: 93-104.
[0010] Seventh prior art solution: Jiang W, Hong Y, Zhou B, et al. A GAN-based anomalydetection approach for imbalanced industrial time series[J]. IEEE Access, 2019, 7: 143608-143619.
[0011] Eighth prior art solution: Marchi E, Vesperini F, Weninger F, et al. Non-linear prediction with LSTM recurrent neural networks for acoustic novelty detection[C] / / 2015 International Joint Conference on Neural Networks (IJCNN). IEEE, 2015: 1-7.
[0012] Ninth prior art solution: Qi Y, Shen C, Wang D, et al. Stacked sparseautoencoder-based deep network for fault diagnosis of rotating machinery[J].Ieee Access, 2017, 5: 15066-15079.
[0013] The tenth prior art solution: Principi E, Rossetti D, Squartini S, et al. Unsupervised electric motor fault detection by using deep autoencoders[J]. IEEE / CAA Journal of Automatica Sinica, 2019, 6(2): 441-451.
[0014] Eleventh prior art solution: Atal BS, Hanauer S L. Speech analysis and synthesis by linear prediction of the speech wave[J]. The journal of the acoustical society of America, 1971, 50(2B): 637-655.
[0015] The twelfth prior art solution: Davis S, Mermelstein P. Comparison of parametricrepresentations for monosyllabic word recognition in continuously spokensentences[J]. IEEE transactions on acoustics, speech, and signal processing,1980, 28(4): 357-366.
[0016] Thirteenth prior art solution: Elmasry W, Wadi M. Edla-efds: A novel ensemble deep learning approach for electrical fault detection systems[J]. Electric Power Systems Research, 2022, 207: 107834.
[0017] Fourteenth prior art solution: Dong X, Yu Z, Cao W, et al. A survey on ensemble learning[J]. Frontiers of Computer Science, 2020, 14: 241-258.
[0018] In the prior art solution, during the training process, the autoencoder AU models with different architectures composed of different numbers of neurons in the hidden layer have certain differences. The AU architecture with a larger number of neurons will not underfit, but it is easy to overfit some data. The autoencoder AU architecture with a smaller number of neurons will not overfit, but it is easy to underfit some data. Therefore, autoencoder AU models with different architectures have their own advantages and disadvantages. At the same time, since the parameters are randomly initialized during the training of the autoencoder AU, the training of the autoencoder AU is random, and the same autoencoder AU architecture is trained multiple times, and there are also advantages and disadvantages.
[0019] The authorization announcement number is CN118226254B, and its name is a method for detecting motors based on an autoencoder ensemble learning model. In response to the randomness problem of the autoencoder AU, a single autoencoder AU architecture and a single feature extraction method were adopted. Ensemble learning can reduce the randomness of the model and give full play to the advantages of each base model, thereby improving the overall accuracy. However, in the detection of motor sound anomalies, ensemble learning is composed of multiple base models, one of which represents a combination of an audio feature extraction method and a machine learning model architecture, and one base model can be trained multiple times to generate multiple base models. Therefore, the autoencoder AU architecture is difficult to determine, the autoencoder AU is random during training, and the feature extraction method is difficult to determine, resulting in low accuracy in motor anomaly detection. Summary of the invention
[0020] The present invention provides a method for detecting a motor based on a hybrid autoencoder integrated learning model, which solves the technical problem of low accuracy in detecting motor abnormalities.
[0021] In order to solve the above technical problems, the technical solutions adopted by the present invention are as follows: A method for detecting a motor based on a hybrid autoencoder ensemble learning model comprises the following steps: Step S1: constructing a hybrid autoencoder ensemble learning model, wherein the hybrid autoencoder ensemble learning model includes m*n base models, where m is the number of types of audio feature extraction methods, n is the number of types of autoencoder AU architectures, and one base model includes one audio feature extraction method and one autoencoder AU; Step S2: training the autoencoder AU of each base model in the hybrid autoencoder ensemble learning model to obtain a trained base model, inputting the normal audio data of the motor in the training set into each trained base model to train and obtain each optimal base model; Step S3: Input the normal and abnormal audio data of the test set motor into each best base model in the hybrid autoencoder ensemble learning model, obtain the test set anomaly score of each best base model, and average all the test set anomaly scores to obtain the test set anomaly score.
[0022] A further technical solution is that in step S1, the step of constructing a hybrid autoencoder ensemble learning model comprises the following steps: Step S101: construct an autoencoder AU; n=2, the autoencoder AU includes a first autoencoder modelA and a second autoencoder modelB, two types of autoencoders in total, the first autoencoder modelA and the second autoencoder modelB are a type of autoencoder, namely, a basic autoencoder; Step S102: constructing a feature extraction method; m=2, the feature extraction methods include Mel frequency cepstral coefficient MFCC and frequency filter bank FB, a total of two feature extraction methods; The base models include MFCC_modelA base model, FB_modelA base model, MFCC_modelB base model and FB_modelB base model, a total of four base models, and the four base models form a hybrid autoencoder ensemble learning model and are marked as mul_fea_model base models.
[0023] A further technical solution is that: the step S102 further includes the following steps: The step of extracting features by the frequency filter bank FB includes sequentially subjecting the acoustic signal of the motor to short-time Fourier transform, frequency filter bank FB processing, logarithmic transformation and feature vector construction to obtain a frequency band feature vector; The steps of extracting features of Mel frequency cepstrum coefficients (MFCC) include subjecting the acoustic signal of the motor to short-time Fourier transform, Mel filter bank MF processing, logarithmic transform, discrete cosine transform and feature vector construction to obtain a Mel frequency cepstrum coefficient feature vector.
[0024] A further technical solution is that: in the step S2, the step of training the autoencoder AU of each base model in the hybrid autoencoder ensemble learning model to obtain a trained base model includes obtaining the gradient of the autoencoder AU by a gradient descent method based on a loss function, optimizing the gradient by an optimization function Adam, and back-propagating to obtain the weight and threshold of each autoencoder AU in the hybrid autoencoder ensemble learning model until a plurality of trained autoencoder AUs are obtained; The step of inputting the normal audio data of the motor in the training set into each trained base model to train and obtain each optimal base model includes inputting the normal audio data of the motor in the training set into each trained base model, extracting the normal audio data of the motor through the feature extraction method in the trained base model to obtain the normal audio features of the motor, inputting the normal audio features of the motor as training input features into the autoencoder AU in the trained base model, obtaining the training output features of the autoencoder AU in the trained base model, calculating the mean square error between the training input features and the training output features of the autoencoder AU in each trained base model and using it as the training error, obtaining the inverse of each training error, normalizing and obtaining the integrated weight, obtaining each optimal autoencoder AU, and then obtaining each optimal base model.
[0025] A further technical solution is: in step S2, The loss function is: (1) In formula (1): is the loss function; p is the batch size; q is the dimension of the input feature; is the i-th feature of the j-th input feature vector in the batch; is the i-th feature of the j-th output feature vector in the batch; j∈[1,p],i∈[1,q]; The training error function is: (2) In formula (2): is the training error function; z is the number of training samples; q is the dimension of the input feature; i is the i-dimensional feature vector, and j is the feature vector of the j-th training data; is the i-th feature of the j-th input feature vector in the training set; is the i-th feature of the j-th reconstructed feature vector in the training set; j∈[1,z], i∈[1,q].
[0026] A further technical solution is that in step S3, the step of obtaining the test set anomaly score of each best base model includes inputting the normal and abnormal audio data of the test set motor into each best base model in the hybrid autoencoder ensemble learning model, extracting the normal and abnormal audio data of the motor by the feature extraction method in the best base model to obtain the normal and abnormal audio features of the motor, inputting the normal and abnormal audio features of the motor as test input features into the autoencoder AU in the best base model, obtaining the test output features of the autoencoder AU in the best base model, i.e., the reconstructed features, calculating the mean square error between the test input features and the test output features of the autoencoder AU in each best base model and using it as the reconstruction error, and the reconstruction error is the test set anomaly score.
[0027] The beneficial effects of adopting the above technical solution are: A method for detecting a motor based on a hybrid autoencoder ensemble learning model comprises: step S1: constructing a hybrid autoencoder ensemble learning model, the model comprising m*n base models, m being the number of types of audio feature extraction methods, n being the number of types of autoencoder AU architectures, and one base model comprising an audio feature extraction method and an autoencoder AU; step S2: training the autoencoder AU of each base model to obtain a trained base model, inputting the normal audio data of the motor in the training set into each trained base model to obtain each optimal base model; step S3: inputting the normal and abnormal audio data of the motor in the test set into each optimal base model in the hybrid autoencoder ensemble learning model, obtaining the abnormal score of the test set of each optimal base model, and averaging all the abnormal scores of the test set to obtain the abnormal score of the test set. The greater the difference between the base models, the higher the accuracy of the base model, and the higher the accuracy of the hybrid autoencoder ensemble learning model, thereby making the motor abnormality detection accuracy higher.
[0028] Please refer to the detailed description of the specific implementation method. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 is a flow chart of the present invention;
[0030] Figure 2 is a data flow diagram of the present invention;
[0031] Figure 3 It is the data flow diagram for obtaining the trained autoencoder AU;
[0032] Figure 4 is the data flow graph for obtaining the best base model. DETAILED DESCRIPTION
[0033] The authorization announcement number is CN118226254B, and the name is "Method for detecting motors based on autoencoder integrated learning model", hereinafter referred to as the original technical solution. The technical solution of this application is a technical solution obtained by further improving the original technical solution, hereinafter referred to as the improved technical solution. The original technical solution adopts an audio feature extraction method and an autoencoder AU architecture, and the improved technical solution adopts the integration of multiple feature extraction methods and multiple autoencoder AU architectures, which solves the technical problem that the autoencoder AU architecture is difficult to determine, solves the technical problem that the feature extraction method is difficult to determine, and then solves the technical problem of low accuracy in motor abnormality detection.
[0034] The autoencoder AU is a commonly used unsupervised learning model that can be used in many fields such as anomaly detection and image generation. AU maps features based on the weights and thresholds of neurons and activation functions, and has strong fitting and generalization capabilities. Since the distribution of abnormal data is different from that of normal data, the AU is trained with normal data, so that the AU has a smaller reconstruction error for normal data, also called anomaly score, and a larger reconstruction error for abnormal data.
[0035] Since the autoencoder AU architecture is difficult to determine, the feature extraction method is difficult to determine, which reduces the accuracy of motor abnormality detection. Ensemble learning is a method that combines multiple base models to improve the overall model performance. By combining the outputs of multiple models, the advantages and disadvantages of each base model are fully utilized, so ensemble learning can obtain better results than a single model. The accuracy of ensemble learning depends on the accuracy of the base model and the difference between the base models. The greater the difference between the base models, the higher the accuracy of the base model, and the higher the accuracy of the ensemble learning. Different motor sound feature extraction methods and AUs with different architectures can be combined into different types of base models with large differences. After training each base model multiple times, the best base model in each base model can be selected, and then the best base models in each base model can be integrated to form an improved method for detecting motors based on hybrid autoencoder ensemble learning models.
[0036] Taking full advantage of the advantages and disadvantages of various autoencoder AU architectures and different feature extraction methods, a method for detecting motors based on a hybrid autoencoder ensemble learning model is proposed. This method trains each base model multiple times, extracts the best base model from each base model, and then combines the best base models from each base model into an ensemble learning model.
[0037] Commonly used feature extraction methods include frequency filter bank, FB for short, and Mel Frequency Cepstral Coefficients, MFCC for short. Both frequency filter bank FB and Mel Frequency Cepstral Coefficients MFCC have a good fit to human ear perception. However, MFCC is more robust, and FB retains more detailed information for each frequency band, so each has its own advantages and disadvantages.
[0038] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and is by no means intended to limit the present application and its application or use. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0039] In the following description, many specific details are set forth to facilitate a full understanding of the present application, but the present application 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 application. Therefore, the present application is not limited to the specific embodiments disclosed below.
[0040] Embodiment 1:
[0041] like Figure 1 As shown, the present invention discloses a method for detecting a motor based on a hybrid autoencoder integrated learning model, comprising the following steps:
[0042] Step S1: Construct a hybrid autoencoder ensemble learning model.
[0043] A hybrid autoencoder ensemble learning model is constructed, which includes m*n base models, where m is the number of audio feature extraction methods, n is the number of autoencoder AU architectures, and the base model includes feature extraction methods and autoencoder AUs.
[0044] like Figure 2As shown, the hybrid autoencoder ensemble learning model proposed in the present application is an improved multi-feature and multi-model autoencoder ensemble learning model, which adopts m feature extraction methods and n autoencoder AU architectures, and constructs a total of m*n base models. A base model includes an audio feature extraction method and an autoencoder AU, and different autoencoder AU architectures and different feature extraction methods are constructed, wherein an audio feature extraction method and an autoencoder AU of an architecture form a base model, thereby combining into a plurality of base models with large differences.
[0045] The accuracy of the hybrid autoencoder ensemble learning model depends on the accuracy of the base model and the difference between the base models. The greater the difference between the base models, the higher the accuracy of the base model, and the higher the accuracy of the hybrid autoencoder ensemble learning model.
[0046] Step S101: construct and obtain an autoencoder AU.
[0047] Construct n types of autoencoders AU, n=2.
[0048] The autoencoder AU is a type of autoencoder model, there are two of them, including a first autoencoder modelA and a second autoencoder modelB.
[0049] Step S102: construct a feature extraction method.
[0050] Construct m feature extraction methods, m=2.
[0051] There are two feature extraction methods, including Mel-frequency cepstral coefficients (MFCC) and frequency filter banks (FB).
[0052] The step of extracting features by the frequency filter group FB includes sequentially subjecting the acoustic signal of the motor to short-time Fourier transform, frequency filter group FB processing, logarithmic transformation and feature vector construction to obtain a frequency band feature vector, where the frequency band feature vector is an audio feature.
[0053] The steps of extracting features of Mel frequency cepstrum coefficients (MFCC) include subjecting the motor's acoustic signal to short-time Fourier transform, Mel filter bank MF processing, logarithmic transform, discrete cosine transform, and feature vector construction to obtain a Mel frequency cepstrum coefficient feature vector, and the Mel frequency cepstrum coefficient feature vector is an audio feature.
[0054] Details are as follows:
[0055] Commonly used feature extraction methods for machine learning motors are: filter bank, referred to as FB, which is an audio feature extraction method, Mel Frequency Cepstral Coefficients, referred to as MFCC, which is an audio feature extraction method.
[0056] FB is a group of filters used to decompose a signal into different frequency bands, which is a key step in signal processing, especially audio and speech processing. In speech signal processing, filter banks are often used to extract meaningful frequency band information from frequency domain signals.
[0057] Step S1021: The frequency filter bank FB extracts features.
[0058] The acoustic signal of the motor is sequentially subjected to short-time Fourier transform, frequency filter bank FB processing, logarithmic transformation and feature vector construction to obtain the frequency band feature vector, as described in detail below.
[0059] Step S10211: short-time Fourier transform.
[0060] The acoustic signal of the motor is framed, windowed, and Fourier transformed to obtain a spectrum diagram.
[0061] Step S10212: Frequency filter bank FB processing.
[0062] The spectrum graph is filtered by the frequency filter group FB to obtain the spectrum graph of the corresponding frequency band in the spectrum.
[0063] In order to be more in line with human hearing, a frequency filter group FB is used to filter the spectrum graph to obtain the energy sum of the corresponding frequency band in the spectrum.
[0064] Step S10213: Logarithmic transformation.
[0065] The spectrum graph obtained by filtering the frequency filter bank in step S10212 is logarithmically transformed to obtain a spectrum graph after logarithmic transformation.
[0066] After calculating the energy output by each filter group, these energies are logarithmically transformed. This can compress the dynamic range of the audio signal, narrow the gap between large energy and small energy, and further simulate the human ear's perception of loudness.
[0067] Step S10214: construct a feature vector.
[0068] The vectors of each frame in the spectrum graph after logarithmic transformation in step S10213 are concatenated into a total frequency band feature vector.
[0069] Since the spectrum graph after logarithm extraction is composed of multiple frame vectors, in order to meet the input of the autoencoder AU, the vectors of each frame are concatenated into a total feature vector.
[0070] Mel frequency cepstral coefficient MFCC is a feature extraction method widely used in speech recognition, audio processing and other fields. It extracts useful features that can represent audio signals by imitating the human ear's perception of sounds of different frequencies. Mel frequency cepstral coefficient MFCC is an additional discrete cosine transform operation based on the frequency filter bank FB.
[0071] Step S1022: extract features using Mel-frequency cepstral coefficients (MFCC).
[0072] The acoustic signal of the motor is sequentially subjected to short-time Fourier transform, Mel filter bank MF processing, logarithmic transform, discrete cosine transform and feature vector construction to obtain the Mel frequency cepstrum coefficient feature vector, as described in detail below.
[0073] Step S10221: short-time Fourier transform.
[0074] The acoustic signal of the motor is framed, windowed, and Fourier transformed to obtain a spectrum diagram.
[0075] Step S10222: Mel filter bank MF processing.
[0076] The spectrum graph is filtered by a Mel filter bank to obtain the spectrum graph of the corresponding frequency band in the spectrum.
[0077] In order to be more in line with human hearing, the Mel filterbank is used to filter the spectrum to obtain the energy sum of the corresponding frequency bands in the spectrum.
[0078] Step S10223: Logarithmic transformation.
[0079] The spectrum graph filtered by the Mel filter bank in step S10222 is logarithmically transformed to obtain a spectrum graph after logarithmic transformation.
[0080] After calculating the energy output by each filter group, these energies are logarithmically transformed. This can compress the dynamic range of the audio signal, narrow the gap between large energy and small energy, and further simulate the human ear's perception of loudness.
[0081] Step S10224: discrete cosine transform.
[0082] The frequency spectrum obtained in step S10223 is discrete cosine transformed to obtain cepstral coefficients.
[0083] Perform discrete cosine transform (DCT) on the logarithmic energy spectrum and convert it into cepstrum coefficients.
[0084] Step S10225: construct a feature vector.
[0085] The vectors of each frame in the cepstral coefficients of step S10224 are concatenated into a total Mel-frequency cepstral coefficient feature vector.
[0086] Since the cepstral coefficients of the discrete cosine transform are composed of multiple frame vectors, in order to meet the input of the autoencoder AU, the vectors of each frame are concatenated into a total feature vector.
[0087] Both the frequency filter bank FB and the Mel-frequency cepstral coefficient MFCC have a good fit to the human ear's perception, but MFCC is more robust and FB retains more detailed information for each frequency band, so each has its own advantages and disadvantages.
[0088] Step S2: Train to obtain the best base model.
[0089] The autoencoder AU of each base model in the hybrid autoencoder ensemble learning model obtained in the training step S1 obtains a trained base model, and the normal audio data of the motor in the training set is input into each trained base model for training to obtain each optimal base model.
[0090] The steps of training the autoencoder AU of each base model in the hybrid autoencoder ensemble learning model to obtain a trained base model include obtaining the gradient of the autoencoder AU using the gradient descent method based on the loss function, optimizing the gradient using the optimization function Adam, and back-propagating to obtain the weight and threshold of each autoencoder AU in the hybrid autoencoder ensemble learning model until a plurality of trained autoencoder AUs are obtained.
[0091] The step of inputting the normal audio data of the motor in the training set into each trained base model to train and obtain each optimal base model includes inputting the normal audio data of the motor in the training set into each trained base model, extracting the normal audio data of the motor through the feature extraction method in the trained base model to obtain the normal audio features of the motor, inputting the normal audio features of the motor as training input features into the autoencoder AU in the trained base model, obtaining the training output features of the autoencoder AU in the trained base model, calculating the mean square error between the training input features and the training output features of the autoencoder AU in each trained base model and using it as the training error, obtaining the inverse of each training error, normalizing and obtaining the integrated weight, obtaining each optimal autoencoder AU, and then obtaining each optimal base model.
[0092] Details are as follows:
[0093] The training process of the autoencoder AU: build the autoencoder AU architecture and determine the loss function.
[0094] like Figure 3As shown in the figure, the architecture of the autoencoder AU. The feature vector extracted by the feature extraction method is input into the encoder layer to obtain feature embedding, and the feature embedding is parsed by the decoder layer to obtain the reconstructed feature vector, where the input feature vector and the reconstructed feature vector have the same dimension. The different number of neurons in the encoder layer and the decoder layer determine different autoencoder AU architectures.
[0095] The loss function can be expressed as:
[0096] (1)
[0097] In formula (1): is the loss function; p is the batch size; q is the dimension of the input feature; is the i-th feature of the j-th input feature vector in the batch; is the i-th feature of the j-th output feature vector in the batch; j∈[1,p],i∈[1,q].
[0098] like Figure 2 As shown in the figure, there are a total of m*n base models. A base model can be trained multiple times to become multiple base models. K is the number of times a base model is trained, and this base model also generates K base models. The same base model is trained K times in total, and then the best base model is taken from the K base models of each base model, and then the best base models in each base model are integrated. The best base models are m*n in total.
[0099] like Figure 4 As shown in the figure, a base model is trained K times, and then the best base model is selected based on the reconstruction error of the training set. The normal data of the training set is subjected to feature extraction to obtain the input feature vector, which is input into the autoencoder AU for training, and then the reconstructed feature vector is obtained. The mean square error (MSE) between the input feature vector and the reconstructed feature vector is calculated to obtain the training error of the autoencoder AU, and finally the trained autoencoder AU with the smallest training error is selected.
[0100] Figure 2 In the figure, there are m*n base models, and each base model is trained K times. Figure 4 In , a model is trained K times and the best base model graph is selected; Figure 4 for Figure 2 part of.
[0101] The reconstruction error is calculated based on the mean square error of the input features and output features of the autoencoder AU in the training set. This part is the same as the method steps in the original technical solution. The reconstruction error is shown in formula (2):
[0102] (2)
[0103] In formula (2): is the training error function; z is the number of training samples; q is the dimension of the input feature; i is the i-dimensional feature vector, and j is the feature vector of the j-th training data; is the i-th feature of the j-th input feature vector in the training set; is the i-th feature of the j-th reconstructed feature vector in the training set; j∈[1,z], i∈[1,q].
[0104] Step S3: Test to obtain anomaly scores.
[0105] The normal and abnormal audio data of the test set motor are input into each best base model in the hybrid autoencoder ensemble learning model to obtain the test set anomaly score of each best base model, and the anomaly score is obtained by averaging all the test set anomaly scores.
[0106] The step of obtaining the test set anomaly score of each best base model includes inputting the normal and abnormal audio data of the test set motor into each best base model in the hybrid autoencoder ensemble learning model, extracting the normal and abnormal audio data of the motor through the feature extraction method in the best base model to obtain the normal and abnormal audio features of the motor, inputting the normal and abnormal audio features of the motor as test input features into the autoencoder AU in the best base model, obtaining the test output features of the autoencoder AU in the best base model, that is, the reconstructed features, calculating the mean square error between the test input features and the test output features of the autoencoder AU in each best base model and using it as the reconstruction error, and the reconstruction error is the test set anomaly score.
[0107] Details are as follows:
[0108] There are m*n base models, each of which is trained K times, and the best base model in each base model is selected through the reconstruction error of the training set. The data of the test set is input into the best m*n base models, and the reconstruction errors of m*n test sets are obtained. The average value of the reconstruction errors of the m*n test sets is taken as the abnormal score of the test set of the technical solution of this application.
[0109] The area under the curve (AUC) is a machine learning indicator that can be obtained by simply giving the label of the test set and the anomaly score predicted by the base model.
[0110] Each base model needs to be trained multiple times. The normal data of the training set is extracted with the feature extraction method under this base model, and then input into the autoencoder AU architecture of this base model for training. The best base model among these base models is determined based on the training reconstruction errors of multiple base models.
[0111] During testing, the test reconstruction errors of the best base model in each base model are averaged to obtain the anomaly score of the test set.
[0112] The technical solution of this application uses the public dataset MIMII Dataset to verify the superiority of the improved method for detecting motors based on a hybrid autoencoder ensemble learning model. MIMII Dataset is a reliable dataset for investigating and inspecting faulty industrial machines. It contains the sounds generated by four types of industrial machines, namely valves, pumps, fans, and slide rails.
[0113] The technical solution of the present application selects the motor sound of a fan with a signal-to-noise ratio of 6db as experimental data, and the normal data is cut in a ratio of 8:2 to obtain a training set and a test set, and the abnormal data are all placed in the test set.
[0114] The specific parameters of the improved multi-feature multi-model based autoencoder ensemble learning model are as follows:
[0115] m=2, there are two feature extraction methods, the feature extraction methods include Mel frequency cepstral coefficient MFCC and frequency filter group FB; n=2, there are two autoencoders AU, the autoencoder AU is a type of autoencoder model, there are two of them, including the first autoencoder modelA and the second autoencoder modelB, forming a hybrid autoencoder ensemble learning model, namely the mul_fea_model base model.
[0116] ModelA and modelB are an autoencoder AU architecture.
[0117] The mul_fea_model base model includes the MFCC_modelA base model, the FB_modelA base model, the MFCC_modelB base model and the FB_modelB base model, and the i_mul_fea_model includes the best MFCC_modelA base model, the FB_modelA base model, the MFCC_modelB base model and the FB_modelB base model.
[0118] 1. Feature extraction method: Mel frequency cepstral coefficient MFCC and frequency filter bank FB.
[0119] 2. Autoencoder AU architecture: In the autoencoder AU, different numbers of neurons result in different types and architectures of the autoencoder AU.
[0120] 3. Base model: An audio feature extraction method + an autoencoder AU constitutes a base model. However, a base model can be trained multiple times, and each training is a base model.
[0121] 4. MFCC_modelA base model: A base model composed of MFCC feature extraction method + modelA AU architecture. However, the base model can be trained multiple times, so MFCC_modelA can contain multiple base models, but they are all the same base model.
[0122] 5. FB_modelA base model: a base model composed of FB feature extraction method + modelA AU architecture.
[0123] 6. MFCC_modelB base model: A base model consisting of MFCC feature extraction method + modelB AU architecture.
[0124] 7.FB_modelB base model: A base model composed of FB feature extraction method + modelB AU architecture.
[0125] 8.mul_fea_model base model: includes four base models: MFCC feature extraction method + modelA AU architecture; FB feature extraction method + modelA AU architecture; MFCC feature extraction method + modelB AU architecture; FB feature extraction method + modelB AU architecture. Each base model can be trained multiple times.
[0126] 9.i_mul_fea_model base model: contains four base models. After each base model is trained, the best base model among the base models is taken out.
[0127] 10.m is the number of audio feature extraction methods; n is the number of autoencoder AU architectures; so there are a total of m*n base models; but a base model can be trained multiple times to become multiple base models, K is the number of times a base model is trained, and this base model also generates K base models.
[0128] In step S101, different autoencoder AU architectures are constructed: a first autoencoder modelA and a second autoencoder modelB of the same category are constructed, for a total of two autoencoder AUs.
[0129] Different numbers of layers and neurons can form AUs with different architectures. The neuron topology of the first autoencoder modelA is: input dimension 320 dimensions; 5 hidden layers in the middle, the dimensions of the hidden layers are 64, 64, 8, 64, 64 respectively; output dimension 320 dimensions. The neuron topology of the second autoencoder modelB is: input dimension 320 dimensions; 5 hidden layers in the middle, the dimensions of the hidden layers are 32, 32, 8, 32, 32 respectively; output dimension 320 dimensions.
[0130] The category of the autoencoder AU used in Example 1 is a basic autoencoder. The first autoencoder modelA and the second autoencoder modelB are both basic autoencoders. The difference between the first autoencoder modelA and the second autoencoder modelB lies in the different specific data of the dimension of the hidden layer, so the first autoencoder modelA and the second autoencoder modelB are two types of autoencoders.
[0131] In step S102, different feature extraction methods are constructed: the technical solution of the present application adopts two feature extraction methods, FB and MFCC. FB uses 1024 points as the frame length, 512 points as the step length, and the number of Mel boxes is 64. MFCC uses 1024 points as the frame length, 512 points as the step length, and the number of MFCC coefficients is 64. Since the collected signal is a steady-state signal, the 5 consecutive frames of the features after FB and MFCC extraction are stretched into a feature vector to facilitate the input of the autoencoder AU model. Finally, the dimensions of the vectors of FB and MFCC are both 64 times 5, which is equal to 320 dimensions.
[0132] In step S2, the best trained base model is selected: the two feature extraction methods of FB and MFCC and the two AU model architectures of modelA and modelB form four base models, namely MFCC_modelA, FB_modelA, MFCC_modelB and FB_modelB. Each base model is trained three times, with Adam as the optimization function, mean square error as the loss function, batch size of 64, early stopping as the iteration stop condition, and the best trained base model is selected according to the training reconstruction error.
[0133] In step S3, the best base model is integrated: the best base model is input into the test set, and the reconstruction error of the test set of each base model is obtained, and the average reconstruction error is the anomaly score.
[0134] Experimental results show: CN118226254B uses a single autoencoder AU architecture and a single feature extraction method to address the AU randomness problem. The autoencoder AU architecture is difficult to determine, the autoencoder AU is random during training, and the feature extraction method is difficult to determine, resulting in low accuracy in motor abnormality detection. The technical solution of the present application uses the integration of multiple feature extraction methods and multiple autoencoder AU architectures to not only solve the problem that the autoencoder AU architecture is difficult to determine, but also solves the problem that the feature extraction method is difficult to determine, thereby solving the problem of low accuracy in motor abnormality detection.
[0135] In order to demonstrate the superiority of the motor detection method using the multi-feature and multi-model autoencoder ensemble learning model improved by the technical solution of the present application, the following experiment was conducted.
[0136] A total of four base models are defined, namely: The base model MFCC_modelA is composed of MFCC as the feature extraction method and the AU architecture of modelA; The base model FB _modelA is composed of FB as the feature extraction method and the AU architecture of modelA; The base model MFCC_modelB is composed of MFCC as the feature extraction method and the AU architecture of modelB; The base model FB_modelB is composed of FB as the feature extraction method and the AU architecture of modelB.
[0137] A total of six ensemble learning methods are defined, namely:
[0138] MFCC_modelA ensemble learning: Only one base model of MFCC_modelA is used for training three times to obtain three base models of MFCC_modelA. Then the anomaly score of the test set is, the test set is input into the three trained base models of MFCC_modelA, and the average of the anomaly scores is the anomaly score of the test set of MFCC_modelA ensemble learning.
[0139] FB _modelA ensemble learning: Only one base model FB _modelA is used for training three times to obtain three base models of FB _modelA. Then the anomaly score of the test set is, the test set is input into the three trained base models of FB _modelA, and the average of the anomaly scores is taken, which is the anomaly score of the test set of FB _modelA ensemble learning.
[0140] MFCC_modelB ensemble learning: Only one base model of MFCC_modelB is used for training three times to obtain three base models of MFCC_modelB. Then the anomaly score of the test set is, the test set is input into the three trained base models of MFCC_modelB, and the average of the anomaly scores is the anomaly score of the test set of MFCC_modelB ensemble learning.
[0141] FB_modelB ensemble learning: Only one base model of FB_modelB is used for training three times to obtain three base models of FB_modelB. Then the anomaly score of the test set is, the test set is input into the three trained base models of FB_modelB, and the average of the anomaly scores is the anomaly score of the test set of FB_modelB ensemble learning.
[0142] mul_fea_model (Multiple features and multiple models): Use MFCC_modelA, FB _modelA, MFCC_modelB, FB_modelB four base models at the same time, each base model is trained three times, and twelve base models are obtained. Then the anomaly score of the test set is, the test set is input into the trained twelve base models, and the average of the anomaly scores is taken, which is the anomaly score of the test set of mul_fea_model.
[0143] i_mul_fea_model(Improved multiple features and multiple models): Four base models, MFCC_modelA, FB _modelA, MFCC_modelB, and FB_modelB, are used at the same time. Each base model is trained three times to obtain twelve base models. Then, according to the reconstruction error of the training set, the best base model of each base model is selected, a total of four. Then the anomaly score of the test set is, the test set is input into the four best trained base models, and the average of the anomaly scores is taken, which is the anomaly score of the test set of i_mul_fea_model.
[0144] The indicator used in this experiment is the area under the curve (AUC) to judge the quality of the model. The area under the curve value can be obtained by giving the anomaly score of the model-predicted test set and the true label of the test set to the AUC calculation formula. The AUC value range is 0 to 1. The closer the AUC is to 1, the better the model effect.
[0145] Since the autoencoder AU model is random, three experiments were conducted on six ensemble learning methods. The experimental results are shown in Tables 1 and 2.
[0146] Table 1: AUC results of the model
[0147] Table 2: AUC average results of the model
[0148] Table 1 compares the AUC results of three experiments: MFCC_modelA ensemble learning, FB_modelA ensemble learning, MFCC_modelB ensemble learning, FB_modelB ensemble learning, mul_fea_model, and i_mul_fea_model.
[0149] Table 2 shows the average AUC of the six ensemble learning methods in three experiments, which is the average of each ensemble learning in Table 1. It can be seen that since the four ensemble learning methods, MFCC_modelA ensemble learning, FB_modelA ensemble learning, MFCC_modelB ensemble learning, and FB_modelB ensemble learning, only consider one audio feature extraction method and one AU architecture, the average AUC of the three experiments is 0.92. mul_fea_model considers multiple feature extraction methods and multiple AU architectures, and integrates different types of base models, so the average AUC of the three experiments is 0.93. In addition to considering multiple feature extraction methods and multiple AU architectures, i_mul_fea_model also considers selecting the best base model, so the effect is the best, and the average AUC of the three experiments is 0.94.
[0150] Technical effects: The mimii dataset shows that i_mul_fea_model takes into account different feature extraction methods and different autoencoder AU architectures, and also considers the selection of the best base model. Therefore, compared with other ensemble learning methods, the AUC value of this application method is the highest, so it can be concluded that the i_mul_fea_model method can improve the accuracy of abnormal sound detection of industrial equipment.
[0151] In the prior art, the categories of autoencoders AU used for audio processing include basic autoencoders, regular autoencoders and variational autoencoders. Both regular autoencoders and variational autoencoders are autoencoders obtained by improving the basic autoencoder. Both the basic autoencoder and the regular autoencoder can be used for abnormal detection of motor sounds. The variational autoencoder is generally used for data generation, but not for abnormal detection of motors.
[0152] In the prior art, feature extraction methods used for audio processing include mel-frequency cepstral coefficients MFCC, frequency filter banks FB and mel spectrogram. Mel-frequency cepstral coefficients MFCC and frequency filter banks FB are the most commonly used feature extraction methods in machine learning audio processing.
[0153] Embodiment 2:
[0154] Compared with Example 1, the feature extraction method can also use the mel spectrogram feature extraction method, and the technical solution is that m=3, the feature extraction method includes mel frequency cepstral coefficient MFCC, frequency filter group FB and mel spectrogram, a total of three feature extraction methods; n=2, the autoencoder AU includes a first autoencoder modelA and a second autoencoder modelB, a total of two autoencoder AUs. The similarities are not repeated here.
[0155] Compared with the above embodiments, in addition to the two AU architectures mentioned in Embodiment 1, there are countless other architectures of the autoencoder AU, two of which are listed in Embodiment 1. Therefore, there can be many combinations of base models, and four base models are listed in Embodiment 1. The similarities are not repeated here.
[0156] Compared with the above embodiment, the architecture of the autoencoder AU can also adopt an architecture category of a regular autoencoder, and the autoencoder AU includes a first autoencoder and a second autoencoder, a total of one type of regular autoencoder, and the difference between the first regular autoencoder and the second regular autoencoder is that the specific data is different, so they are two types of regular autoencoders. The similarities are not repeated here.
[0157] Compared with the above embodiment, the architecture of the autoencoder AU can also adopt one architecture category of basic autoencoder and another architecture category of regular autoencoder. The autoencoder AU includes a first autoencoder and a second autoencoder, a total of two types of autoencoders, the first autoencoder is a basic autoencoder, and the second autoencoder is a regular autoencoder. The similarities are not repeated here.
[0158] Compared with the above embodiment, the feature extraction method can also select any two methods from the three methods of Mel frequency cepstral coefficient MFCC, frequency filter bank FB and mel spectrogram for combination. The similarities are not repeated here.
Claims
1. A method for detecting a motor based on a hybrid autoencoder ensemble learning model, characterized in that: The following steps are included: Step S1: constructing a hybrid autoencoder ensemble learning model, wherein the hybrid autoencoder ensemble learning model includes m*n base models, where m is the number of types of audio feature extraction methods, n is the number of types of autoencoder AU architectures, and one base model includes one audio feature extraction method and one autoencoder AU; Step S2: training the autoencoder AU of each base model in the hybrid autoencoder ensemble learning model to obtain a trained base model, inputting the normal audio data of the motor in the training set into each trained base model to train and obtain each optimal base model; Step S3: Input the normal and abnormal audio data of the test set motor into each best base model in the hybrid autoencoder ensemble learning model, obtain the test set anomaly score of each best base model, and average all the test set anomaly scores to obtain the test set anomaly score.
2. The method for detecting a motor based on a hybrid autoencoder integrated learning model according to claim 1, characterized in that: In step S1, the step of constructing a hybrid autoencoder ensemble learning model includes the following steps: Step S101: construct an autoencoder AU; n=2, the autoencoder AU includes a first autoencoder modelA and a second autoencoder modelB, two types of autoencoders in total, the first autoencoder modelA and the second autoencoder modelB are a type of autoencoder, namely, a basic autoencoder; Step S102: constructing a feature extraction method; m=2, the feature extraction methods include Mel frequency cepstral coefficient MFCC and frequency filter bank FB, a total of two feature extraction methods; The base models include MFCC_modelA base model, FB_modelA base model, MFCC_modelB base model and FB_modelB base model, a total of four base models, and the four base models form a hybrid autoencoder ensemble learning model and are marked as mul_fea_model base models.
3. The method for detecting a motor based on a hybrid autoencoder integrated learning model according to claim 2, characterized in that: The step S102 further includes the following steps: The step of extracting features by the frequency filter bank FB includes sequentially subjecting the acoustic signal of the motor to short-time Fourier transform, frequency filter bank FB processing, logarithmic transformation and feature vector construction to obtain a frequency band feature vector; The steps of extracting features of Mel frequency cepstrum coefficients (MFCC) include subjecting the acoustic signal of the motor to short-time Fourier transform, Mel filter bank MF processing, logarithmic transform, discrete cosine transform and feature vector construction to obtain a Mel frequency cepstrum coefficient feature vector.
4. The method for detecting a motor based on a hybrid autoencoder integrated learning model according to claim 1, characterized in that: In step S2, the step of training the autoencoder AU of each base model in the hybrid autoencoder ensemble learning model to obtain a trained base model includes obtaining the gradient of the autoencoder AU by using a gradient descent method based on a loss function, optimizing the gradient by using an optimization function Adam, and back-propagating to obtain the weight and threshold of each autoencoder AU in the hybrid autoencoder ensemble learning model until a plurality of trained autoencoder AUs are obtained; The step of inputting the normal audio data of the motor in the training set into each trained base model to train and obtain each optimal base model includes inputting the normal audio data of the motor in the training set into each trained base model, extracting the normal audio data of the motor through the feature extraction method in the trained base model to obtain the normal audio features of the motor, inputting the normal audio features of the motor as training input features into the autoencoder AU in the trained base model, obtaining the training output features of the autoencoder AU in the trained base model, calculating the mean square error between the training input features and the training output features of the autoencoder AU in each trained base model and using it as the training error, obtaining the inverse of each training error, normalizing and obtaining the integrated weight, obtaining each optimal autoencoder AU, and then obtaining each optimal base model.
5. The method for detecting a motor based on a hybrid autoencoder integrated learning model according to claim 4 is characterized in that: In the step S2, The loss function is: (1) In formula (1): is the loss function; p is the batch size; q is the dimension of the input feature; is the i-th feature of the j-th input feature vector in the batch; is the i-th feature of the j-th output feature vector in the batch; j∈[1,p],i∈[1,q]; The training error function is: (2) In formula (2): is the training error function; z is the number of training samples; q is the dimension of the input feature; i is the i-dimensional feature vector, j is the feature vector of the j-th training data; is the i-th feature of the j-th input feature vector in the training set; is the i-th feature of the j-th reconstructed feature vector in the training set; j∈[1,z], i∈[1,q].
6. The method for detecting a motor based on a hybrid autoencoder integrated learning model according to claim 1, characterized in that: In the step S3, the step of obtaining the test set anomaly score of each best base model includes inputting the normal and abnormal audio data of the test set motor into each best base model in the hybrid autoencoder ensemble learning model, extracting the normal and abnormal audio data of the motor by the feature extraction method in the best base model to obtain the normal and abnormal audio features of the motor, inputting the normal and abnormal audio features of the motor as test input features into the autoencoder AU in the best base model, obtaining the test output features of the autoencoder AU in the best base model, that is, the reconstructed features, calculating the mean square error between the test input features and the test output features of the autoencoder AU in each best base model and using it as the reconstruction error, and the reconstruction error is the test set anomaly score.
Citation Information
Patent Citations
Method for detecting motor based on autoencoder ensemble learning model
CN118226254B
Rolling bearing fault diagnosis method based on parallel feature learning and multiple classifiers
CN110110768A
Integrated learning soft measurement modeling method based on auto-encoder diversity generation mechanism
CN112989635A
Mode recognition method, device and equipment for mechanical part, and storage medium
CN113887461A
Industrial scene abnormal sound detection and identification method based on auto-encoder
CN114333773A