Motor anomaly detection model training method and motor anomaly detection method
By performing speed perturbation and feature extraction of audio samples during motor operation, combined with deep neural networks and classifiers, the problem of lack of robustness in signal processing in the prior art is solved, and higher fault recognition accuracy and stability are achieved .
Patent Information
- Application Number
- CN202411552078.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-01
- Publication Date
- 2025-02-14
AI Technical Summary
The prior art lacks sufficient robustness when processing signals under different operating conditions, resulting in a decrease in the accuracy of motor fault identification, especially in high noise environments or complex operating conditions, which is difficult to stably output reliable fault diagnosis results.
A motor abnormality detection model training method is adopted to generate diverse perturbation audio by obtaining multiple audio samples during motor operation and their corresponding category labels. Then, these perturbing audio input frequency domain feature extraction sub-models and time domain feature extraction sub-models are extracted, respectively, and the enhanced wavelet time spectrum and time domain features are extracted. Linear transformation is performed through the fully connected layer, fusion enhancement features are obtained, and feature transformation is performed through deep neural networks. Finally, classification probability is generated through the classifier, triple loss is calculated and model parameters are updated.
By fully processing disturbed audio, the model's adaptability to different working conditions and noise environments is improved, the accuracy and robustness of fault recognition are improved, especially in complex or noisy environments, and the accuracy of motor status recognition is enhanced Sex and reliability.
Smart Images

Figure CN119442030A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of audio signal processing, and in particular to a motor anomaly detection model training method and a motor anomaly detection method. Background Art
[0002] In the field of mechanical equipment and industrial production, motors are a common driving device, and accurate identification of their operating status is crucial for the normal operation and maintenance of the equipment. Motor status monitoring can not only prevent the occurrence of failures, but also extend the service life of the equipment and reduce maintenance costs. At present, motor status identification mainly relies on neural network methods, which classify by analyzing the vibration signals and sound signals generated when the motor is running.
[0003] However, the existing technical methods have an obvious flaw, that is, they do not fully utilize the time and frequency domain information of the sound signal. This deficiency leads to a decrease in the accuracy of neural networks in the process of motor fault identification. Especially in high-noise environments or complex working conditions, traditional audio signal processing technology often cannot effectively separate fault features, thereby reducing the accuracy of fault diagnosis. In addition, the existing methods lack sufficient robustness when processing signals under different working conditions, making the recognition results affected by environmental noise and other interference, and it is difficult to stably output reliable fault diagnosis results. Summary of the invention
[0004] The purpose of the present application is to solve at least one of the above-mentioned technical defects, especially the technical defect that the prior art lacks sufficient robustness when processing signals under different working conditions, so that the recognition results are affected by environmental noise and other interferences, and it is difficult to stably output reliable fault diagnosis results.
[0005] In a first aspect, the present application provides a method for training a motor abnormality detection model, wherein the motor abnormality detection model includes a frequency domain feature extraction sub-model, a time domain feature extraction sub-model, a fully connected layer, a deep neural network and a classifier; the method includes:
[0006] Acquire multiple audio samples and their corresponding category labels when the motor is running, and perform speed perturbation on each audio sample to obtain multiple perturbed audios of each audio sample;
[0007] Input multiple perturbed audios of each audio sample into the frequency domain feature extraction sub-model to obtain the enhanced wavelet time-frequency spectrum of each audio sample. The frequency domain feature extraction sub-model is used to perform continuous wavelet transform on each perturbed audio and then splice them in the time dimension.
[0008] Input multiple perturbed audios of each audio sample into the time domain feature extraction sub-model to obtain enhanced time domain features of each audio sample. The time domain feature extraction sub-model is used to perform multiple convolutions, normalizations, and activations on each perturbed audio and then splice them in the time dimension.
[0009] For each audio sample, a fully connected layer is used to perform linear transformation on an enhanced wavelet time-frequency spectrum of the audio sample using a first parameter, and a second parameter is used to perform linear transformation on an enhanced time-domain feature of the audio sample using a second parameter, respectively, to obtain a first weight matrix and a second weight matrix, and based on the first weight matrix and the second weight matrix, an element-by-element weighted summation is performed on the enhanced wavelet time-frequency spectrum and the enhanced time-domain feature of the audio sample to obtain a fused enhanced feature of the audio sample;
[0010] Using a deep neural network, the fusion enhanced features of each audio sample are transformed and then input into the classifier to obtain the classification probability of each audio sample;
[0011] The triplet loss is calculated according to the category label and classification probability of each audio sample, and the parameters of the frequency domain feature extraction sub-model, time domain feature extraction sub-model, fully connected layer, deep neural network and classifier are updated respectively through loss back propagation and stochastic gradient descent algorithm to obtain the trained motor anomaly detection model.
[0012] In one embodiment, the step of using a deep neural network to transform the fused enhanced features of each audio sample and then inputting the transformed features into a classifier includes:
[0013] Using a deep neural network, the fusion enhanced features of each audio sample are transformed to obtain a high-level feature embedding code for each audio sample;
[0014] The high-level feature embedding code of each audio sample is fed into the classifier.
[0015] In one embodiment, the calculation formula for continuous wavelet transform of the frequency domain feature extraction sub-model is:
[0016]
[0017] In the formula, is the mother wavelet function The complex conjugate of represents the scale parameter, Represents the scale, which is used to control the frequency of the mother wavelet function. Represents the translation parameter, which is used to control the position of the mother wavelet function on the time axis. Indicates audio, Represents a time variable.
[0018] In one embodiment, the triplet loss is calculated as:
[0019]
[0020] In the formula, Represents anchor point samples With positive samples The distance between Represents anchor point samples With negative samples The distance between Indicates the preset boundary value, Indicates the number of samples.
[0021] In one embodiment, the calculation formula of the stochastic gradient descent algorithm is:
[0022]
[0023] In the formula, Indicates The parameter vector at the iteration, Represents the learning rate, which is used to control the step size of parameter update in each iteration. is the loss function, expressed in terms of parameters Download Sample The triplet loss of is the loss function Relative to the parameters The gradient of , which represents the rate of change of the loss function at the current parameter value.
[0024] In a second aspect, the present application provides a motor abnormality detection method, the method comprising:
[0025] Acquire the audio to be detected when the motor is running, and perform speed disturbance on the audio to be detected to obtain multiple disturbed audios of the audio to be detected;
[0026] Each disturbance audio of the audio to be detected is input into a pre-trained motor abnormality detection model to obtain a detection result of the audio to be detected, wherein the motor abnormality detection model is trained using the motor abnormality detection model training method in any of the above embodiments.
[0027] In a third aspect, the present application provides a motor anomaly detection model training device, the motor anomaly detection model includes a frequency domain feature extraction sub-model, a time domain feature extraction sub-model, a fully connected layer, a deep neural network and a classifier; the device includes:
[0028] A disturbance audio acquisition module is used to acquire multiple audio samples and their corresponding category labels when the motor is running, and to perform speed disturbance on each audio sample to obtain multiple disturbance audios of each audio sample;
[0029] The enhanced wavelet time-frequency spectrum acquisition module is used to input multiple disturbance audios of each audio sample into the frequency domain feature extraction sub-model to obtain the enhanced wavelet time-frequency spectrum of each audio sample. The frequency domain feature extraction sub-model is used to perform continuous wavelet transform on each disturbance audio and then splice them in the time dimension.
[0030] The enhanced time domain feature acquisition module is used to input multiple perturbed audios of each audio sample into the time domain feature extraction sub-model to obtain enhanced time domain features of each audio sample. The time domain feature extraction sub-model is used to perform multiple convolutions, normalizations, and activations on each perturbed audio and then splice them in the time dimension.
[0031] A fusion enhanced feature acquisition module is used to perform linear transformation on the enhanced wavelet time-frequency spectrum of the audio sample and the enhanced time-domain features of the audio sample using the first parameter through a fully connected layer for each audio sample, respectively, to obtain a first weight matrix and a second weight matrix, and based on the first weight matrix and the second weight matrix, perform element-by-element weighted summation on the enhanced wavelet time-frequency spectrum and the enhanced time-domain features of the audio sample to obtain the fusion enhanced features of the audio sample;
[0032] A classification probability acquisition module is used to use a deep neural network to perform feature transformation on the fusion enhanced features of each audio sample and then input the transformed features into a classifier to obtain the classification probability of each audio sample;
[0033] The motor anomaly detection model training module is used to calculate the triplet loss according to the category label and classification probability of each audio sample, and update the parameters of the frequency domain feature extraction sub-model, time domain feature extraction sub-model, fully connected layer, deep neural network and classifier through loss back propagation and stochastic gradient descent algorithm to obtain the trained motor anomaly detection model.
[0034] In a fourth aspect, the present application provides a motor abnormality detection device, the device comprising:
[0035] The to-be-detected audio acquisition module is used to acquire the to-be-detected audio when the motor is running, and to perform speed disturbance on the to-be-detected audio to obtain multiple disturbed audios of the to-be-detected audio;
[0036] A detection result acquisition module is used to input each disturbance audio of the audio to be detected into a pre-trained motor abnormality detection model to obtain the detection result of the audio to be detected, wherein the motor abnormality detection model is trained using the motor abnormality detection model training method in any of the above embodiments.
[0037] In a fifth aspect, the present application provides a storage medium: the storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the one or more processors execute the motor abnormality detection model training method as in any of the above embodiments, and / or the steps of the motor abnormality detection method as in the above embodiments.
[0038] In a sixth aspect, the present application provides a computer device, comprising: one or more processors, and a memory;
[0039] The memory stores computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the steps of the motor abnormality detection model training method in any of the above embodiments are performed, and / or the steps of the motor abnormality detection method in the above embodiments are performed.
[0040] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0041] In the motor anomaly detection model training method and motor anomaly detection method provided in the present application, by perturbing the speed of the audio sample, a variety of perturbed audio can be generated, so that the frequency domain feature extraction submodule and the time domain feature extraction submodel can more comprehensively capture the characteristics of the motor operation, especially the splicing of the wavelet time spectrum and the time domain features, which helps to provide richer input information, thereby improving the accuracy of fault detection. The frequency domain feature extraction submodel adopts continuous wavelet transform, which can effectively extract the time-frequency characteristics of the audio signal, and overcomes the problem of insufficient utilization of the time-frequency domain information of the sound signal in the prior art, so that when analyzing the motor operation status, the fault characteristics can be more accurately identified. The time domain feature extraction submodel enhances the model's adaptability to different working conditions and noise environments through multiple convolution, normalization and activation operations. Since each perturbed audio is fully processed, the useful signal can be better separated in a high noise environment, reducing the impact of environmental interference on fault identification. The enhanced wavelet time-frequency spectrum and time-domain features are weighted and fused respectively through a learnable weight matrix, which can capture the time-frequency and time-domain information of the audio signal at the same time, thereby obtaining a more comprehensive feature representation, improving the accuracy and robustness of fault identification, especially in complex or noisy environments. After the deep neural network performs feature transformation on the fused enhanced features, it can generate reliable classification probabilities. The model is trained using a triplet loss function, and the parameters of the frequency domain feature extraction submodule and the time domain feature extraction submodel, the deep neural network, and the classifier are optimized through back propagation and stochastic gradient descent algorithms, thus ensuring that the model can continuously learn on different input samples and improving the generalization ability of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0043] Figure 1 A flow chart of a motor anomaly detection model training method provided in an embodiment of the present application;
[0044] Figure 2 A schematic diagram of a flow chart of a motor abnormality detection method provided in an embodiment of the present application;
[0045] Figure 3 A schematic diagram of the structure of a motor abnormality detection model training device provided in an embodiment of the present application;
[0046] Figure 4 A schematic diagram of the structure of a motor abnormality detection device provided in an embodiment of the present application;
[0047] Figure 5 A schematic diagram of the internal structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0048] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. 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.
[0049] The current technical methods have an obvious defect, that is, they do not fully utilize the time and frequency domain information of the sound signal, resulting in a decrease in the accuracy of the neural network's recognition of motor faults; more specifically, they do not involve the fusion of the wavelet time-frequency spectrum and the time-domain features of the motor sound. This is because when the wavelet time-frequency spectrum is used alone, there may be a lack of sufficient information related to the motor fault, and relying solely on time domain features may lack prior knowledge. Therefore, for fault diagnosis in high-noise environments or complex working conditions, the accuracy of existing methods is low and lacks robustness. The present invention aims to solve the problem of maintaining high diagnostic accuracy under noisy and complex working conditions. The advantage of the fusion method involved in the present invention is that it can comprehensively utilize time-frequency domain information and prior knowledge to improve the accuracy and reliability of motor state identification, thereby providing more effective protection for the safe and stable operation of industrial production.
[0050] Based on this, the present application provides a motor anomaly detection model training method, the motor anomaly detection model includes a frequency domain feature extraction sub-model, a time domain feature extraction sub-model, a fully connected layer, a deep neural network and a classifier; the following embodiment takes the method applied to a computer device as an example to illustrate, it can be understood that the computer device can be various devices with data processing functions, can be but not limited to a single server, a server cluster, a personal laptop computer, a desktop computer, etc. Figure 1 As shown, the method includes:
[0051] S101: Acquire multiple audio samples and their corresponding category labels when the motor is running, and perform speed perturbation on each audio sample to obtain multiple perturbed audios of each audio sample.
[0052] Among them, a motor is a device that converts electrical energy into mechanical energy. An audio sample refers to a sound signal collected when the motor is running, which records the working status of the motor. The category label is an identifier corresponding to each audio sample, indicating its status, such as normal or abnormal. Speed perturbation is to adjust the audio sample to change its playback speed and generate different versions of the audio signal. Perturbed audio refers to audio samples that have been processed with speed perturbation and have different speed and pitch characteristics.
[0053] In this step, first, the sound signal of the motor during operation can be recorded in real time through the installed microphone or audio acquisition module. After that, the acquired audio samples are imported and speed adjusted using the audio processing library. By changing the parameters of the playback speed, multiple different versions of the audio are generated. During the processing, the multiple generated audio signals are saved as new files to ensure that each disturbance audio has unique speed and pitch characteristics for subsequent analysis and feature extraction.
[0054] It can be understood that speed perturbation is an audio signal processing technology, which is usually used for data enhancement and feature extraction in fields such as speech recognition, speech synthesis, and music information retrieval. Speed perturbation generates new training samples by changing the playback speed of the audio signal, which helps the model learn more robust features; by perturbing the speed of the training data, the diversity of the data set can be increased and the generalization ability of the model can be improved. In addition, speed perturbation can help the model learn audio features that are not related to time stretching and pitch changes.
[0055] S102: Input multiple disturbance audios of each audio sample into the frequency domain feature extraction sub-model to obtain an enhanced wavelet time-frequency spectrum of each audio sample. The frequency domain feature extraction sub-model is used to perform continuous wavelet transform on each disturbance audio and then splice them in the time dimension.
[0056] Among them, the frequency domain feature extraction sub-model is a machine learning or deep learning model, which is used to extract frequency domain features from audio signals and to splice each disturbed audio in the time dimension after continuous wavelet transform. The enhanced wavelet time spectrum is the time-frequency domain representation of the audio signal obtained by wavelet transform, which can capture the changing characteristics of the signal in time and frequency. Continuous wavelet transform is used to analyze the signal at different scales to obtain its time-frequency characteristics. Time dimension splicing refers to merging the feature results of different time points or different audio samples together to form a complete feature representation.
[0057] In this step, multiple disturbance audios can be loaded into the frequency domain feature extraction sub-model by writing a script or using audio processing software. In the frequency domain feature extraction sub-model, each disturbance audio is processed using the existing wavelet transform library. The time-frequency spectrum of each disturbance audio is spliced in the time dimension, and the generated multiple time-frequency spectrum arrays are merged to form an enhanced wavelet time-frequency spectrum containing all audio sample features.
[0058] It can be understood that inputting multiple disturbance audios into the model can ensure that the model receives diverse feature information. Through continuous wavelet transform, the changes in audio signals in time and frequency can be captured. This detailed time-frequency analysis enables the model to identify potential fault features, thereby improving the accuracy of fault detection. Splicing the time-frequency spectra together to form an enhanced wavelet time-frequency spectra enhances the learning ability of the model, enabling it to better classify and identify when facing complex signal environments, thereby improving the performance of motor anomaly detection.
[0059] S103: Input multiple perturbed audios of each audio sample into the time domain feature extraction sub-model to obtain enhanced time domain features of each audio sample. The time domain feature extraction sub-model is used to perform multiple convolutions, normalizations, and activations on each perturbed audio and then splice them in the time dimension.
[0060] Among them, the time domain feature extraction sub-model is used to extract features from the time domain of the audio signal, and to perform multiple convolution-normalization-activation on each perturbed audio and then splice them in the time dimension. The enhanced time domain feature is a feature representation obtained by the time domain feature extraction sub-model, which can effectively capture the temporal changes and patterns of the audio signal. Convolution-normalization-activation is a series of signal processing steps, including convolution operations for extracting local features, normalization for standardizing inputs, and activation functions for introducing nonlinearity, enabling the model to learn more complex patterns.
[0061] In this step, multiple perturbed audios can be loaded into the time domain feature extraction sub-model through a script or data pipeline. In the time domain feature extraction sub-model, each perturbed audio is convolved using a deep learning framework. The model applies filters to the audio signal to extract features, and then normalizes and activates them to enhance learning capabilities. The results of feature extraction for each perturbed audio are concatenated in the time dimension, and the generated feature arrays are merged to form enhanced time domain features.
[0062] It can be understood that multiple perturbation audios are fed into the model to ensure that the model is exposed to diverse time domain features. Different audio samples can reveal different modes of motor operation and improve the model's learning ability. The purpose of performing convolution-normalization-activation is to enable the model to effectively extract complex time domain features. The convolution operation helps capture local structure, normalization can reduce instability in training, and the activation function enables the model to learn nonlinear relationships. Concatenating features in the time dimension to form enhanced time domain features enhances the model's expressiveness, enabling it to more accurately detect and classify faults in complex motor state recognition tasks.
[0063] S104: For each audio sample, a first parameter is used to perform linear transformation on the enhanced wavelet time-frequency spectrum of the audio sample, and a second parameter is used to perform linear transformation on the enhanced time-domain features of the audio sample through a fully connected layer to obtain a first weight matrix and a second weight matrix, and based on the first weight matrix and the second weight matrix, element-by-element weighted summation is performed on the enhanced wavelet time-frequency spectrum and the enhanced time-domain features of the audio sample to obtain a fused enhanced feature of the audio sample.
[0064] Among them, the fully connected layer is a neural network layer that connects all input nodes to all output nodes to achieve linear transformation. The first parameter and the second parameter refer to the weights of the fully connected layer, which correspond to different weight matrices for processing wavelet time-frequency spectrum and time-domain features, respectively, and are used to adjust the contribution of input features. The weight matrix is a matrix generated by the fully connected layer, which is used to linearly transform the input features so that different input features are combined according to different weights to affect the output features. The fusion enhancement feature refers to the feature obtained by weighted summation, which combines the wavelet time-frequency spectrum and time-domain features for subsequent audio signal analysis.
[0065] In this step, the enhanced wavelet time-frequency spectrum and the enhanced time-domain features are first linearly transformed. Specifically, the weight parameters in the fully connected layer, including the first parameter and the second parameter, can be read, and these weights are multiplied with the input features by matrix multiplication to generate a weight matrix. The linear transformation is achieved by performing matrix multiplication on the enhanced wavelet time-frequency spectrum and the enhanced time-domain features with the weight matrix of the fully connected layer. For example, the matrix operation library of numerical calculation is used to efficiently calculate the dot product of the input and the weight, and generate a new feature representation.
[0066] After obtaining the two weight matrices, they are element-wise multiplied with their respective input features. Then, these products are element-wise added to obtain the final fused enhanced features. The weighted summation of each element is a numerical operation, performing simple multiplication and addition operations on each pair of elements.
[0067] It can be understood that the purpose of using fully connected layers and linear transformations is to project the original audio features through a weight matrix so that features of different dimensions can be weighted according to their importance, so that certain features can be selectively enhanced or suppressed, thereby improving the performance of the model in subsequent tasks. The element-by-element weighted summation is to fuse features from different sources. The wavelet time-frequency spectrum captures the frequency changes of the signal, while the time domain features record the time changes of the signal. Combining the two can improve the overall understanding of the signal. Element-by-element operations ensure that the frequency features and time features of each part can interact at the same position, providing a more complete signal description. By integrating multi-dimensional features, the limitations of relying solely on a single feature type are avoided, and audio data can be analyzed more comprehensively, thereby improving the accuracy of audio recognition.
[0068] S105: Using a deep neural network, perform feature transformation on the fused enhanced features of each audio sample and input the transformed features into a classifier to obtain a classification probability of each audio sample.
[0069] Among them, a deep neural network is a model that learns features through multi-layer nonlinear transformations and can automatically extract complex patterns from data. Classifiers are used to assign input data to predefined categories. Classification probability refers to the probability value of the classifier for each input sample belonging to a specific category, which is used to determine the final classification result of the sample.
[0070] In this step, a deep neural network model can be constructed by selecting a suitable deep learning framework and designing its structure, such as the number of layers, the number of neurons in each layer, etc. After that, the fused enhanced features are input into the deep neural network for processing. The deep neural network can pass the input features to each layer through forward propagation, and finally obtain the output after multiple weighting and activation. The output of the deep neural network is passed to the classifier, and the network output is converted into classification probability through the classification algorithm, indicating the possibility that each audio sample belongs to each category.
[0071] It can be understood that deep neural networks can automatically extract high-level features from complex data and are suitable for processing fusion enhancement features to ensure that the model can capture the potential patterns and relationships in the signal. Through feature transformation, the model can map input features to a higher-dimensional space, enhance its separation ability, make subsequent classification more accurate, and help improve the accuracy of motor state recognition. By calculating the classification probability, the model can classify each audio sample.
[0072] S106: Calculate the triplet loss according to the category label and classification probability of each audio sample, and update the parameters of the frequency domain feature extraction sub-model, the time domain feature extraction sub-model, the fully connected layer, the deep neural network and the classifier respectively through the loss back propagation and the stochastic gradient descent algorithm to obtain the trained motor anomaly detection model.
[0073] Among them, triplet loss is a loss function used to learn similarity metrics, which is usually used to compare the similarity between samples to ensure that the features of similar samples are closer and the features of dissimilar samples are farther apart. Loss backpropagation refers to the process of calculating the gradient of the loss function relative to the model parameters and using these gradients to adjust the model parameters to ensure that the model can gradually reduce the error. The stochastic gradient descent algorithm is an optimization algorithm that accelerates convergence by randomly selecting a portion of the training data in each iteration and updating the model parameters.
[0074] In this step, the triplet loss is calculated by comparing the class label of each audio sample with the corresponding classification probability. The gradient of the loss function with respect to each model parameter is calculated through the automatic differentiation mechanism. Based on the calculated gradient, the stochastic gradient descent algorithm is applied to gradually adjust the parameters of the frequency domain feature extraction submodel, the time domain feature extraction submodel, the fully connected layer, the deep neural network and the classifier to obtain the trained motor anomaly detection model.
[0075] It can be understood that through the triplet loss, the model can effectively learn the similarities between samples, thereby promoting the optimization of the feature space, making samples of similar categories closer in the feature space, while samples of different categories keep their distance, thereby improving the classification effect. Backpropagation ensures that the model can identify the specific parameters that affect the loss and adjust them accordingly, which greatly improves the learning efficiency of the model and helps it quickly adapt to the data during training. Stochastic gradient descent significantly reduces computational overhead and memory usage by using part of the data in each iteration, speeding up training. At the same time, it can help the model jump out of the local optimum and converge toward the global optimal solution, thereby improving the overall performance and generalization ability of the motor anomaly detection model.
[0076] In the above embodiment, by perturbing the speed of the audio sample, a variety of disturbed audio can be generated, so that the frequency domain feature extraction submodule and the time domain feature extraction submodel can more comprehensively capture the characteristics of the motor operation, especially the splicing of the wavelet time spectrum and the time domain features, which helps to provide richer input information, thereby improving the accuracy of fault detection. The frequency domain feature extraction submodel adopts continuous wavelet transform, which can effectively extract the time and frequency characteristics of the audio signal, and overcomes the problem of insufficient utilization of the time and frequency domain information of the sound signal in the prior art, so that when analyzing the motor operation status, the fault characteristics can be more accurately identified. The time domain feature extraction submodel enhances the model's adaptability to different working conditions and noise environments through multiple convolution, normalization and activation operations. Since each disturbed audio is fully processed, useful signals can be better separated in a high noise environment, reducing the impact of environmental interference on fault identification. The enhanced wavelet time-frequency spectrum and time-domain features are weighted and fused respectively through a learnable weight matrix, which can capture the time-frequency and time-domain information of the audio signal at the same time, thereby obtaining a more comprehensive feature representation, improving the accuracy and robustness of fault identification, especially in complex or noisy environments. After the deep neural network performs feature transformation on the fused enhanced features, it can generate reliable classification probabilities. The model is trained using a triplet loss function, and the parameters of the frequency domain feature extraction submodule and the time domain feature extraction submodel, the deep neural network, and the classifier are optimized through back propagation and stochastic gradient descent algorithms, thus ensuring that the model can continuously learn on different input samples and improving the generalization ability of the model.
[0077] In one embodiment, the step of using a deep neural network to transform the fused enhanced features of each audio sample and then inputting the transformed features into a classifier includes:
[0078] Using a deep neural network, the fusion enhanced features of each audio sample are transformed to obtain a high-level feature embedding code for each audio sample;
[0079] The high-level feature embedding code of each audio sample is fed into the classifier.
[0080] Among them, the high-level feature embedding code is the feature vector obtained after deep neural network processing. It is usually a representation with lower dimension and more concentrated information, which can effectively capture the main features of the sample.
[0081] Specifically, by building a deep neural network model, taking the fused enhanced features as input, and calculating the output of each layer through forward propagation, a high-level feature embedding code is finally generated. The generated high-level feature embedding code is passed to the classifier, usually through a fully connected layer or activation function, to calculate the probability distribution of each category.
[0082] In this embodiment, through the feature transformation of the deep neural network, high-dimensional features can be mapped to low-dimensional space, making the features more compact, helping to remove redundant information, and enhancing the distinguishability of samples, thereby improving the accuracy of subsequent classification. Inputting the high-level feature embedding code into the classifier can make full use of the abstract features learned by the deep learning model, so that the classifier can more effectively identify and classify audio samples, thereby improving the performance of motor anomaly detection and ensuring a higher detection rate and a lower false alarm rate.
[0083] In one embodiment, the calculation formula for continuous wavelet transform of the frequency domain feature extraction sub-model is:
[0084]
[0085] In the formula, is the mother wavelet function The complex conjugate of represents the scale parameter, Represents the scale, which is used to control the frequency of the mother wavelet function. Represents the translation parameter, which is used to control the position of the mother wavelet function on the time axis. Indicates audio, Represents a time variable.
[0086] It can be understood that continuous wavelet transform is a method for signal analysis, which can decompose the signal into coefficients of wavelet functions of different scales and frequencies, provide local characteristic information of the signal in the frequency domain and reveal the time-frequency structure of the signal. and translation parameters , we can get the representation of the signal at different frequencies and time resolutions. Mother wavelet function It is a key part of the continuous wavelet transform. It is a real-valued or complex-valued function with zero mean and integrability, making it suitable for analyzing the local characteristics of the signal. The continuous wavelet transform significantly improves the performance and reliability of audio signal anomaly detection by providing rich time-frequency information and enhancing the separability of signal features.
[0087] In one embodiment, the triplet loss is calculated as:
[0088]
[0089] In the formula, Represents anchor point samples With positive samples The distance between Represents anchor point samples With negative samples The distance between Indicates the preset boundary value, Indicates the number of samples.
[0090] It can be understood that the triplet loss requires three samples: an anchor sample, a positive sample, and a negative sample. The anchor sample belongs to the same category as the positive sample, but belongs to a different category than the negative sample. The goal of the triplet loss is to make the distance between the anchor sample and the positive sample smaller than the distance between the anchor sample and the negative sample, and this distance difference must be greater than a preset boundary. The triplet loss enhances the feature learning ability and robustness of the model by optimizing the relative distance between samples, thereby significantly improving the accuracy and reliability in anomaly detection of audio signals.
[0091] In one embodiment, the calculation formula of the stochastic gradient descent algorithm is:
[0092]
[0093] In the formula, Indicates The parameter vector at the iteration, Represents the learning rate, which is used to control the step size of parameter update in each iteration. is the loss function, expressed in terms of parameters Download Sample The triplet loss of is the loss function Relative to the parameters The gradient of , which represents the rate of change of the loss function at the current parameter value.
[0094] It can be understood that in each training iteration, the stochastic gradient descent algorithm will randomly select a small batch of samples, calculate the gradient of the loss function corresponding to the sample, and use the gradient to update the parameters of the model. This iterative process will continue until the stopping condition is reached, such as reaching the maximum number of iterations or the loss function converges. The stochastic gradient descent algorithm significantly improves the training efficiency and detection performance in audio signal anomaly detection through its advantages such as fast convergence, reduced memory requirements, and enhanced generalization ability.
[0095] In one embodiment, the present application also provides a motor abnormality detection method, such as Figure 2 As shown, the method includes:
[0096] S201: Acquire the audio to be detected when the motor is running, and perform speed disturbance on the audio to be detected to obtain multiple disturbance audios of the audio to be detected;
[0097] S202: Input each disturbance audio of the audio to be detected into a pre-trained motor abnormality detection model to obtain a detection result of the audio to be detected.
[0098] The motor abnormality detection model is obtained by training using the motor abnormality detection model training method in any of the above embodiments.
[0099] The audio to be detected when the motor is running refers to the sound signal recorded during the operation of the motor, which is used to detect whether there is an abnormality in the motor.
[0100] It can be understood that the audio of the motor running is first recorded using a microphone or an audio interface. Then, the audio signal is speed perturbed using an audio processing algorithm. Specifically, multiple perturbed audio files can be generated by adjusting the playback rate or applying pitch shifting techniques. After that, each perturbed audio is input into a pre-trained motor anomaly detection model. This process usually involves formatting the audio data into an input format acceptable to the model, and then running the model through an inference engine or deep learning framework to calculate the detection results for each input.
[0101] In this embodiment, the disturbance audio is input into the motor anomaly detection model, and the detection results can be quickly obtained and the abnormal state of the motor can be identified in time. The automation of this process not only improves the detection efficiency, but also reduces the need for manual intervention, making anomaly detection more efficient and reliable, thereby extending the service life of the motor and reducing maintenance costs.
[0102] In an example, to verify the technical effect of the method of the present invention, the motor audio data set is processed using the wavelet time-frequency spectrum, the time domain feature method and the enhanced wavelet time-frequency spectrum time-domain fusion method of the present invention, and the motor sound recognition accuracy of different methods is shown below.
[0103]
[0104] It can be seen from the table that the present invention uses enhanced wavelet time-frequency spectrum fusion to perform motor sound recognition, which has a higher recognition accuracy.
[0105] The motor abnormality detection model training device and the motor abnormality detection device provided in the embodiments of the present application are described below. The motor abnormality detection model training device described below and the motor abnormality detection model training method described above can be referenced to each other, and the motor abnormality detection device described below and the motor abnormality detection method described above can be referenced to each other.
[0106] In one embodiment, Figure 3 As shown, the present application provides a motor abnormality detection model training device, the motor abnormality detection model includes a frequency domain feature extraction sub-model, a time domain feature extraction sub-model, a fully connected layer, a deep neural network and a classifier; the device includes:
[0107] The disturbance audio acquisition module 301 is used to acquire multiple audio samples and their corresponding category labels when the motor is running, and to perform speed disturbance on each audio sample to obtain multiple disturbance audios of each audio sample;
[0108] The enhanced wavelet time-frequency spectrum acquisition module 302 is used to input multiple disturbance audios of each audio sample into the frequency domain feature extraction submodel to obtain the enhanced wavelet time-frequency spectrum of each audio sample. The frequency domain feature extraction submodel is used to perform continuous wavelet transform on each disturbance audio and then splice them in the time dimension.
[0109] The enhanced time domain feature acquisition module 303 is used to input multiple disturbance audios of each audio sample into the time domain feature extraction sub-model to obtain the enhanced time domain features of each audio sample. The time domain feature extraction sub-model is used to perform multiple convolutions, normalizations, and activations on each disturbance audio and then splice them in the time dimension.
[0110] The fusion enhanced feature acquisition module 304 is used to perform linear transformation on the enhanced wavelet time-frequency spectrum of the audio sample and the enhanced time-domain features of the audio sample using the second parameter through the fully connected layer for each audio sample, respectively, to obtain a first weight matrix and a second weight matrix, and perform element-by-element weighted summation of the enhanced wavelet time-frequency spectrum and the enhanced time-domain features of the audio sample based on the first weight matrix and the second weight matrix to obtain the fusion enhanced features of the audio sample;
[0111] The classification probability acquisition module 305 is used to use a deep neural network to perform feature transformation on the fusion enhanced features of each audio sample and then input the transformed features into a classifier to obtain the classification probability of each audio sample;
[0112] The motor anomaly detection model training module 306 is used to calculate the triplet loss according to the category label and classification probability of each audio sample, and update the parameters of the frequency domain feature extraction sub-model, the time domain feature extraction sub-model, the fully connected layer, the deep neural network and the classifier respectively through the loss back propagation and the stochastic gradient descent algorithm to obtain the trained motor anomaly detection model.
[0113] In one embodiment, the classification probability acquisition module 305 includes:
[0114] An advanced feature embedding code acquisition unit, used to use a deep neural network to perform feature transformation on the fusion enhanced features of each audio sample to obtain an advanced feature embedding code for each audio sample;
[0115] The high-level feature embedding code input unit is used to input the high-level feature embedding code of each audio sample into the classifier.
[0116] In one embodiment, the calculation formula for continuous wavelet transform of the frequency domain feature extraction sub-model is:
[0117]
[0118] In the formula, is the mother wavelet function The complex conjugate of represents the scale parameter, Represents the scale, which is used to control the frequency of the mother wavelet function. Represents the translation parameter, which is used to control the position of the mother wavelet function on the time axis. Indicates audio, Represents a time variable.
[0119] In one embodiment, the triplet loss is calculated as:
[0120]
[0121] In the formula, Represents anchor point samples With positive samples The distance between Represents anchor point samples With negative samples The distance between Indicates the preset boundary value, Indicates the number of samples.
[0122] In one embodiment, the calculation formula of the stochastic gradient descent algorithm is:
[0123]
[0124] In the formula, Indicates The parameter vector at the iteration, Represents the learning rate, which is used to control the step size of parameter update in each iteration. is the loss function, expressed in terms of parameters Download Sample The triplet loss of is the loss function Relative to the parameters The gradient of , which represents the rate of change of the loss function at the current parameter value.
[0125] In one embodiment, Figure 4 As shown, the present application provides a motor abnormality detection device, the device comprising:
[0126] The to-be-detected audio acquisition module 401 is used to acquire the to-be-detected audio when the motor is running, and to perform speed disturbance on the to-be-detected audio to obtain a plurality of disturbed audios of the to-be-detected audio;
[0127] The detection result acquisition module 402 is used to input each disturbance audio of the audio to be detected into a pre-trained motor abnormality detection model to obtain the detection result of the audio to be detected, wherein the motor abnormality detection model is trained using the motor abnormality detection model training method in any of the above embodiments.
[0128] In one embodiment, the present application also provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute any one of the motor abnormality detection model training methods in the above embodiments, and / or the steps of the motor abnormality detection method in the above embodiments.
[0129] In one embodiment, the present application also provides a computer device, which stores computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute any one of the motor abnormality detection model training methods in the above embodiments, and / or the steps of the motor abnormality detection method in the above embodiments.
[0130] Indicatively, Figure 5 As shown, Figure 5 This is a schematic diagram of the internal structure of a computer device provided in an embodiment of the present application. The computer device 500 may be provided as a server. Figure 5 The computer device 500 includes a processing component 502, which further includes one or more processors, and a memory resource represented by a memory 501 for storing instructions executable by the processing component 502, such as an application. The application stored in the memory 501 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 502 is configured to execute instructions to perform the motor anomaly detection model training method of any of the above embodiments, and / or, as the steps of the motor anomaly detection method in the above embodiments.
[0131] The computer device 500 may further include a power supply component 503 configured to perform power management of the computer device 500, a wired or wireless network interface 504 configured to connect the computer device 500 to a network, and an input / output (I / O) interface 505. The computer device 500 may operate based on an operating system stored in the memory 301, such as Windows Server TM, Mac OS X TM, Unix TM, Linux TM, Free BSD TM, or the like.
[0132] Those skilled in the art will understand that Figure 5The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0133] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements not only includes those elements, but also includes other elements not clearly listed, or also includes elements inherent to such process, method, article or equipment. In the absence of more restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or equipment including the elements. Herein, "one", "one", "said", "the" and "it" may also include plural forms, unless the context clearly indicates another way. A plurality refers to at least two cases, such as 2, 3, 5 or 8, etc. "And / or" includes any and all combinations of the relevant listed items.
[0134] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can refer to each other.
[0135] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A motor anomaly detection model training method, characterized in that: The motor abnormality detection model includes a frequency domain feature extraction sub-model, a time domain feature extraction sub-model, a fully connected layer, a deep neural network and a classifier; the method includes: Acquire multiple audio samples and their corresponding category labels when the motor is running, and perform speed perturbation on each of the audio samples to obtain multiple perturbed audios of each of the audio samples; Inputting multiple disturbance audios of each of the audio samples into the frequency domain feature extraction sub-model to obtain an enhanced wavelet time-frequency spectrum of each of the audio samples, wherein the frequency domain feature extraction sub-model is used to perform continuous wavelet transform on each disturbance audio and then splice them in the time dimension; Inputting multiple perturbed audios of each of the audio samples into the time domain feature extraction sub-model to obtain enhanced time domain features of each of the audio samples, wherein the time domain feature extraction sub-model is used to perform multiple convolution-normalization-activation on each perturbed audio and then splice them in the time dimension; For each of the audio samples, a first parameter is used to perform a linear transformation on the enhanced wavelet time-frequency spectrum of the audio sample, and a second parameter is used to perform a linear transformation on the enhanced time-domain features of the audio sample, respectively, through the fully connected layer to obtain a first weight matrix and a second weight matrix, and based on the first weight matrix and the second weight matrix, an element-by-element weighted sum is performed on the enhanced wavelet time-frequency spectrum and the enhanced time-domain features of the audio sample to obtain a fused enhanced feature of the audio sample; Using the deep neural network, performing feature transformation on the fusion enhanced features of each of the audio samples and then inputting the transformed features into the classifier to obtain a classification probability of each of the audio samples; The triplet loss is calculated according to the category label and classification probability of each audio sample, and the parameters of the frequency domain feature extraction sub-model, the time domain feature extraction sub-model, the fully connected layer, the deep neural network and the classifier are respectively updated through loss back propagation and stochastic gradient descent algorithms to obtain a trained motor abnormality detection model.
2. The motor abnormality detection model training method according to claim 1, characterized in that: The step of using the deep neural network to perform feature transformation on the fusion enhanced features of each audio sample and then inputting the transformed features into the classifier comprises: Using the deep neural network, performing feature transformation on the fused enhanced features of each of the audio samples to obtain a high-level feature embedding code for each of the audio samples; The high-level feature embedding code of each of the audio samples is input into the classifier.
3. The motor abnormality detection model training method according to claim 1, characterized in that: The calculation formula for continuous wavelet transform of the frequency domain feature extraction sub-model is: In the formula, is the mother wavelet function The complex conjugate of represents the scale parameter, Represents the scale, which is used to control the frequency of the mother wavelet function. Represents the translation parameter, which is used to control the position of the mother wavelet function on the time axis. Indicates audio, Represents a time variable.
4. The motor abnormality detection model training method according to claim 1, characterized in that: The calculation formula for the triplet loss is: In the formula, Represents anchor point samples With positive samples The distance between Represents anchor point samples With negative samples The distance between Indicates the preset boundary value, Indicates the number of samples.
5. The motor abnormality detection model training method according to claim 1, characterized in that: The calculation formula of the stochastic gradient descent algorithm is: In the formula, Indicates The parameter vector at the iteration, Represents the learning rate, which is used to control the step size of parameter update in each iteration. is the loss function, expressed in terms of parameters Download Sample The triplet loss of is the loss function Relative to the parameters The gradient of , which represents the rate of change of the loss function at the current parameter value.
6. A method for detecting motor abnormality, characterized in that: The method comprises: Acquire the audio to be detected when the motor is running, and perform speed disturbance on the audio to be detected to obtain multiple disturbed audios of the audio to be detected; Each disturbance audio of the audio to be detected is input into a pre-trained motor abnormality detection model to obtain a detection result of the audio to be detected, wherein the motor abnormality detection model is trained using the motor abnormality detection model training method described in any one of claims 1 to 5 above.
7. A motor abnormality detection model training device, characterized in that: The motor abnormality detection model includes a frequency domain feature extraction sub-model, a time domain feature extraction sub-model, a fully connected layer, a deep neural network and a classifier; the device includes: A disturbance audio acquisition module, used to acquire multiple audio samples and their corresponding category labels when the motor is running, and to perform speed disturbance on each of the audio samples to obtain multiple disturbance audios of each of the audio samples; An enhanced wavelet time-frequency spectrum acquisition module is used to input multiple disturbance audios of each audio sample into the frequency domain feature extraction submodel to obtain an enhanced wavelet time-frequency spectrum of each audio sample, and the frequency domain feature extraction submodel is used to perform continuous wavelet transform on each disturbance audio and then splice them in the time dimension; An enhanced time domain feature acquisition module, used to input multiple disturbance audios of each of the audio samples into the time domain feature extraction sub-model to obtain enhanced time domain features of each of the audio samples, wherein the time domain feature extraction sub-model is used to perform multiple convolutions-normalizations-activations on each disturbance audio and then splice them in the time dimension; A fusion enhanced feature acquisition module is used to perform linear transformation on the enhanced wavelet time-frequency spectrum of the audio sample and the enhanced time-domain features of the audio sample using the first parameter through the fully connected layer for each of the audio samples, respectively, to obtain a first weight matrix and a second weight matrix, and perform element-by-element weighted summation of the enhanced wavelet time-frequency spectrum and the enhanced time-domain features of the audio sample based on the first weight matrix and the second weight matrix to obtain the fusion enhanced features of the audio sample; A classification probability acquisition module, used to use the deep neural network to perform feature transformation on the fusion enhanced features of each of the audio samples and then input the transformed features into the classifier to obtain the classification probability of each of the audio samples; The motor anomaly detection model training module is used to calculate the triplet loss according to the category label and classification probability of each audio sample, and update the parameters of the frequency domain feature extraction submodel, the time domain feature extraction submodel, the fully connected layer, the deep neural network and the classifier respectively through loss back propagation and stochastic gradient descent algorithm to obtain a trained motor anomaly detection model.
8. A motor abnormality detection device, characterized in that: The device comprises: The to-be-detected audio acquisition module is used to acquire the to-be-detected audio when the motor is running, and to perform speed disturbance on the to-be-detected audio to obtain a plurality of disturbed audios of the to-be-detected audio; A detection result acquisition module is used to input each disturbance audio of the audio to be detected into a pre-trained motor abnormality detection model to obtain the detection result of the audio to be detected, wherein the motor abnormality detection model is trained using the motor abnormality detection model training method described in any one of claims 1 to 5 above.
9. A storage medium, characterized in that: The storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by one or more processors, the one or more processors execute the motor abnormality detection model training method as described in any one of claims 1 to 5, and / or the steps of the motor abnormality detection method as described in claim 6.
10. A computer device, characterized in that: include: one or more processors, and memory; The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, the steps of the motor abnormality detection model training method as described in any one of claims 1 to 5 and / or the steps of the motor abnormality detection method as described in claim 6 are performed.
Citation Information
Cited By
Electrotome motor anomaly detection method
CN119989243A
Green ammonia reactor state detection model training method, device, equipment and medium
CN120849955A
Training methods, apparatus, equipment and media for the state monitoring model of green ammonia reactor
CN120849955B
Motor abnormal sound defect detection method and device based on target detection and storage medium
CN121747614A