Micro-motor abnormal sound classification method and device based on multi-scale feature fusion and attention mechanism
The micro-motor fault diagnosis method, which combines multi-scale feature fusion and attention mechanism with VSNLMS algorithm and multi-scale convolutional neural network, solves the problems of insufficient feature extraction and poor robustness in traditional methods, and achieves high-precision micro-motor fault diagnosis and classification.
Patent Information
- Application Number
- CN202510067686.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-16
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2045-01-16
AI Technical Summary
Existing micro-motor fault diagnosis methods rely on traditional signal processing techniques, which suffer from insufficient feature information extraction, low classification accuracy, and poor robustness to complex noise and nonlinear faults.
A multi-scale feature fusion and attention mechanism is adopted. By fusing multi-scale convolutional neural networks and attention mechanisms, and combining them with the VSNLMS algorithm for noise reduction, spectrogram, Mel frequency cepstral coefficients and zero crossover rate features are extracted. Channel and spatial attention mechanisms are integrated to adjust feature weights, and finally the Softmax function is used for fault classification.
It improves the accuracy and robustness of micro-motor fault diagnosis, enhances adaptability to complex environments, reduces noise interference, and improves classification accuracy and generalization ability.
Smart Images

Figure CN120048285B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of motor manufacturing technology, and more specifically, to a method and apparatus for classifying abnormal noises in micro-motors based on multi-scale feature fusion and attention mechanisms. Background Technology
[0002] Micro motors are widely used in many industrial and household appliances, such as fans, power tools, and pumps. However, micro motors are prone to malfunctions during long-term operation, such as rotor imbalance, bearing wear, gear friction, and interference from foreign objects. These malfunctions not only affect the operating efficiency of the micro motor but may also lead to equipment downtime or more serious damage. Therefore, real-time monitoring of the micro motor's operating status and timely diagnosis and early warning of malfunctions are crucial for improving equipment reliability and reducing maintenance costs.
[0003] Currently, fault diagnosis methods for micromotors mainly include monitoring based on vibration signals, temperature changes, and sound signals. Sound signals, as a non-invasive monitoring method, have significant advantages in micromotor fault diagnosis. By collecting the sound signals of the micromotor during operation and combining signal processing and feature analysis, the fault type can be accurately identified. However, existing sound signal-based fault diagnosis methods largely rely on traditional signal processing techniques, such as time-domain analysis, frequency-domain analysis, and feature extraction, which suffer from problems such as insufficient feature information extraction, low classification accuracy, and poor robustness to complex noise and nonlinear faults. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings and deficiencies of the prior art and provide a method and device for classifying abnormal noises of micro motors based on multi-scale feature fusion and attention mechanism. The method of this invention introduces the fusion of multi-scale convolution and attention mechanism, which enhances the robustness of the model in complex environments and improves the accuracy and precision of fault classification.
[0005] To achieve the above objectives, the present invention is implemented through the following technical solution: a micro-motor noise classification method based on multi-scale feature fusion and attention mechanism, characterized by comprising the following steps:
[0006] The first step is to collect sound signal data: collect the sound signals generated by the micro motor under different working conditions; the collected sound signals are: normal operation sound signal, rotor imbalance sound signal, bearing wear sound signal, gear friction sound signal, and sound signal mixed with foreign objects.
[0007] The second step is sound signal preprocessing: noise reduction is performed on the collected sound signals to obtain sound data, in order to reduce the impact of environmental noise and interference.
[0008] The third step is sound data feature extraction: feature extraction is performed on the preprocessed sound data; the extracted features include spectrogram, Mel frequency cepstral coefficients (MFCC), and zero crossover rate (ZCR), and are fused by feature concatenation to form a comprehensive feature vector;
[0009] The fourth step is multi-scale feature fusion: convolutional neural subnetworks with three different scale convolutional kernels are used to extract multi-level feature information from the comprehensive feature vector to obtain a feature map; channel attention and spatial attention mechanisms are integrated in each convolutional neural subnetwork. The importance of each channel feature vector is weighted by the channel attention mechanism, and the attention area of the feature vector is dynamically adjusted in the spatial dimension by the spatial attention mechanism.
[0010] The fifth step is to classify features and determine the current operating state or fault type of the micro motor: the feature map is flattened and regularized to obtain a global feature vector; multi-layer neurons are used to extract the global feature vector and map the features to the operating mode or fault state for classification; the probability distribution of each category is generated by the Softmax activation function, and the operating state or fault type of the current micro motor is determined by selecting the maximum probability value, thus realizing the classification of abnormal noise of the micro motor; among them, the operating mode is the normal state, and the fault state is the rotor imbalance state, bearing wear state, gear friction state, and state with foreign objects.
[0011] In the second step, the VSNLMS algorithm is used to perform noise reduction processing on the acquired sound signal:
[0012] (1) Gradient term calculation: At each sampling point k, calculate the gradient term h. i (k) represents the product of the current error signal and the input signal, which is used for subsequent step size adjustment;
[0013] h i (k)=d(k)·y(ki)
[0014] Among them, h i (k) is the gradient term of the current sampling point, representing the product of the error and the input signal, used for dynamic updating of the step size; d(k) represents the current error signal, and y(ki) is the delayed sample of the input signal at time k.
[0015] (2) Step size factor update: The step size factor u(k) is dynamically adjusted at each sampling point to adapt to the current error change, as shown in the following formula:
[0016] u(k+1)=u(k)+α·h i (k)·h i (k-1)
[0017] Where u(k) is the step size factor, which controls the magnitude of the weight update and is dynamically adjusted within each sampling period; α is the adjustment rate factor, which controls the rate of step size update.
[0018] (3) Calculation of the upper limit of the step size factor: In order to prevent the filter from becoming unstable due to an excessively large step size factor, VSNLMS sets an upper limit q for the step size. max The calculation formula is:
[0019]
[0020] Among them, y T (k)·y(k) represents the power of the input signal at time k;
[0021] (4) Range restriction of step size factor: The value of step size factor u(k) is restricted to [q min ,q max Within the specified range, stability is ensured; the specific constraints are as follows:
[0022]
[0023] q max and q min These are the upper and lower limits of the step size factor, ensuring the stability of the step size under different conditions;
[0024] (5) Weight Update: Finally, the filter weights are updated using the adjusted step size factor u(k) to reduce errors and make the filter adapt to changes in the input signal.
[0025] z i (k+1)=z i (k)+2·u(k)·h i (k)
[0026] z i (k) are the weighting coefficients of the filter, which are updated according to the step size in each sampling period to minimize the error; z i (k+1) represents the updated value of the i-th weight coefficient at time k+1.
[0027] This invention employs the VSNLMS algorithm to denoise the original audio signal, reducing the impact of environmental noise and interference and ensuring the signal quality input to the feature extraction module. The VSNLMS algorithm is a variable step-size adaptive filtering method used to resolve the trade-off between steady-state error and convergence speed in LMS and NLMS algorithms. VSNLMS dynamically adjusts the step-size factor, enabling the filter to balance fast convergence and low steady-state error under different conditions. In the VSNLMS algorithm, the step-size factor u(k) is dynamically adjusted based on the power and error signal of the current input signal, and the maximum step size q is calculated in each sampling period. max This is to prevent instability caused by excessively large step sizes.
[0028] In the third step, a spectrogram feature is generated through Short Time Fourier Transform (STFT) to capture the frequency distribution of the sound data in order to detect low-frequency and high-frequency components:
[0029]
[0030] Where S(t,f) represents the spectral amplitude of the signal at time t and frequency f, representing the value of the spectrum; x[n] is the input discrete-time signal; w[nt] is the window function, centered at time t, used to extract local segments of the signal and limit the analysis range at the current moment; e -j2πfn It is the kernel function of the Fourier transform, which converts a time-domain signal into a frequency-domain signal, where j is the imaginary unit. 2πf It is angular frequency.
[0031] In the third step, Mel frequency cepstral coefficients (MFCCs) are extracted to capture the timbre information of the sound data, which helps to distinguish different types of faults.
[0032] First, a Fourier transform is performed on the sound data to obtain the spectrum; second, the power spectrum is transformed to the Mel scale using a Mel filter bank to better match the auditory characteristics of the human ear; the Mel scale transformation formula is as follows:
[0033]
[0034] The Mel filter bank consists of a set of triangular filters, each Mel filter extracting energy within a different frequency range, and then processing the output energy E of each filter. m Take the logarithm and perform a discrete cosine transform (DCT) on the result to obtain the Mel-frequency cepstral coefficients (MFCCs):
[0035]
[0036] Among them MFCC c It is the c-th MFCC coefficient; M is the number of Mel filters; E mis the energy of the m-th Mel filter; C represents the number of extracted MFCC coefficients.
[0037] In the third step, the zero cross-rate (ZCR) is extracted to capture the roughness or frequency characteristics of the audio data. The formula for calculating the ZCR in each frame is as follows:
[0038]
[0039] Where ZCR is the zero-crossing rate of the frame, representing the number of times the signal crosses zeros within the frame; N is the number of sampling points in the frame, i.e., the frame length; x[n] is the value of the discrete-time signal at the nth sampling point; sgn(x[n-1]) is the sign function, representing the positive or negative sign of the signal.
[0040] In the fourth step, the three convolutional neural subnetworks with convolutional kernels of different scales are convolutional neural subnetwork one, convolutional neural subnetwork two, and convolutional neural subnetwork three, respectively.
[0041] The convolutional neural network (CNN1) uses large convolutional kernels to capture low-frequency components and consists of three convolutional layers. The synthesized feature vector first passes through 24 5×5 convolutional kernels in the first convolutional layer, followed by 4×2 max pooling and ReLU activation. Then, it passes through 48 5×5 convolutional kernels in the second convolutional layer, undergoing max pooling and ReLU activation. Finally, it passes through 48 5×5 convolutional kernels in the third convolutional layer, undergoing pooling and ReLU activation before outputting the feature map.
[0042] The second convolutional neural subnetwork uses medium-sized convolutional kernels to focus on mid-frequency features and contains two convolutional layers. The synthesized feature vector first passes through 32 3×3 convolutional kernels in the first convolutional layer, uses L2 regularization to reduce the risk of overfitting, and then undergoes 4×2 max pooling and ReLU activation. Then it passes through 48 3×3 convolutional kernels in the second convolutional layer, and outputs a feature map after ReLU activation and max pooling.
[0043] The third convolutional neural network uses smaller convolutional kernels to capture high-frequency components and contains eight convolutional layers. The synthesized feature vector is passed through 32 3×3 convolutional kernels in the first two convolutional layers, using ReLU activation and 2×2 pooling; then through 64 3×3 convolutional kernels in the next four convolutional layers, continuing to use ReLU activation; finally, through 128 3×3 convolutional kernels in the last two convolutional layers, after ReLU activation, the feature map is output.
[0044] Multi-level feature information extraction is achieved by using a convolutional neural network with three convolutional kernels of different scales to extract comprehensive feature vectors.
[0045] This invention improves classification accuracy by capturing multi-level feature information in micro-motor noise signals through convolutional kernels of different scales in each sub-network. Furthermore, each sub-network integrates channel attention and spatial attention mechanisms. This allows the model to focus on more important feature regions and reduce interference from irrelevant noise by dynamically adjusting the weights of the feature maps, thereby improving classification accuracy. Specifically, the channel attention mechanism weights the importance of each channel, while the spatial attention mechanism dynamically adjusts the region of interest in the feature maps along the spatial dimension.
[0046] In the fifth step, obtaining the global feature vector by flattening and regularizing the feature maps means that the feature maps output by convolutional neural subnetwork 1, convolutional neural subnetwork 2, and convolutional neural subnetwork 3 are flattened, converted into feature vectors, and input into the fully connected layer. The fully connected layer uses Dropout technology for regularization to reduce the risk of overfitting and improve the generalization ability of the model. A global feature vector is obtained by summing the data through the fully connected layer.
[0047] In the fifth step, multi-layer neurons are used to extract the global feature vector, and the features are mapped to the operating mode or fault state for classification. A probability distribution for each category is generated using the Softmax activation function, and the operating state or fault type of the current micro-motor is determined by selecting the maximum probability value. This micro-motor noise classification involves: the fully connected layer using multi-layer neurons to calculate the global feature vector, ultimately outputting a five-dimensional vector, where each dimension represents the predicted value for the operating mode or fault category; the last layer of the fully connected layer uses the Softmax activation function to transform the output five-dimensional vector into a probability distribution for each category, with a sum of 1; the probability value for each category represents the likelihood of that operating mode or fault category; by selecting the maximum probability value from the Softmax output, the operating state or fault type of the current micro-motor is determined, thus achieving micro-motor noise classification.
[0048] In the fifth step, after determining the current operating status or fault type of the micro motor, the confusion matrix and t-SNE diagram are output, and the probability values of the operating status or fault type are displayed to achieve visualized classification results.
[0049] A micro-motor noise classification device based on multi-scale feature fusion and attention mechanism, characterized in that it includes:
[0050] The acoustic sensor acquisition module is used to collect sound signals generated by the micro motor under different working conditions. The collected sound signals include: normal operation sound signal, rotor imbalance sound signal, bearing wear sound signal, gear friction sound signal, and sound signal mixed with foreign objects.
[0051] Signal preprocessing module: used to perform noise reduction processing on the acquired sound signals to obtain sound data, so as to reduce the impact of environmental noise and interference;
[0052] Feature extraction module: used to extract features from the preprocessed audio data; extracted features include spectrogram, Mel-frequency cepstral coefficients (MFCC), and zero crossover rate (ZCR), which are then fused through feature concatenation to form a comprehensive feature vector;
[0053] A multi-scale convolutional neural network module is used to extract multi-level feature information from the comprehensive feature vector using convolutional neural sub-networks with three different scale convolutional kernels to obtain feature maps. Channel attention and spatial attention mechanisms are integrated in each convolutional neural sub-network. The importance of each channel feature vector is weighted through the channel attention mechanism, and the attention region of the feature vector is dynamically adjusted in the spatial dimension through the spatial attention mechanism.
[0054] The classification and output module is used to obtain a global feature vector by flattening and regularizing the feature map; it extracts the global feature vector using multi-layer neurons and maps the features to the operating mode or fault state for classification; it generates the probability distribution of each category through the Softmax activation function and determines the current operating state or fault type of the micro motor by selecting the maximum probability value, thereby realizing the classification of abnormal noise of the micro motor; among which, the operating mode is the normal state, and the fault state is the rotor imbalance state, bearing wear state, gear friction state, and state with foreign matter mixed in.
[0055] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0056] 1. Improved ability to extract multi-scale features:
[0057] By introducing multiple convolutional neural subnetworks with kernels of different sizes, low-frequency, mid-frequency, and high-frequency features in micro-motor sound signals can be extracted simultaneously at multiple scales. This technical effect enables the present invention to comprehensively analyze and understand the different frequency components of complex fault sound signals or operating mode sound signals, significantly improving the accuracy of micro-motor fault diagnosis. Compared with traditional methods, single-scale convolutional kernels cannot effectively capture the features of each frequency band of the signal, resulting in limitations in feature extraction.
[0058] 2. Enhanced noise robustness:
[0059] This invention integrates channel attention and spatial attention mechanisms, enabling dynamic adjustment of feature weights for each channel and spatial region. This mechanism focuses on the most discriminative feature regions, effectively suppressing irrelevant noise interference and reducing the impact of background noise on fault diagnosis. Especially when the signal contains a high level of noise, the attention mechanism helps the model enhance the influence of important features, improving sensitivity and accuracy in diagnosing micro-motor faults.
[0060] 3. Improved the model's classification accuracy and robustness:
[0061] By combining multi-scale feature extraction with an attention mechanism, this invention effectively improves the classification accuracy of the model when faced with various fault modes. Different fault types, such as normal operation, rotor imbalance, bearing wear, gear friction, and foreign matter contamination, are more accurately distinguished through the model. Furthermore, the attention mechanism enhances the model's ability to focus on the fault features of micro-motors, thereby making the classification results more robust under various environmental conditions.
[0062] 4. Improved the model's generalization ability and overfit suppression:
[0063] After the output of the multi-scale convolutional neural network, Dropout is added for regularization, which effectively reduces the risk of overfitting during model training and further improves the model's generalization ability. This technique enables the model to better adapt to various micro-motor working environments and improves its performance on different datasets. Attached Figure Description
[0064] Figure 1 This is a flowchart of the micro-motor noise classification method based on multi-scale feature fusion and attention mechanism of the present invention; Detailed Implementation
[0065] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.
[0066] Example 1
[0067] like Figure 1 As shown, the micro-motor noise classification method based on multi-scale feature fusion and attention mechanism of the present invention includes the following steps:
[0068] The first step is sound signal data acquisition: using a combination of high-precision microphones, audio acquisition cards and computers, the sound signals generated by the micro motor under different working conditions are acquired in real time in a soundproof room; the acquired sound signals are: normal operation sound signals, rotor imbalance sound signals, bearing wear sound signals, gear friction sound signals and sound signals mixed with foreign objects.
[0069] The second step is sound signal preprocessing: noise reduction is performed on the collected sound signals to obtain sound data, in order to reduce the impact of environmental noise and interference.
[0070] The third step is sound data feature extraction: feature extraction is performed on the preprocessed sound data; the extracted features include spectrogram, Mel frequency cepstral coefficients (MFCC), and zero crossover rate (ZCR), and are fused by feature concatenation to form a comprehensive feature vector;
[0071] The fourth step is multi-scale feature fusion: convolutional neural subnetworks with three different scale convolutional kernels are used to extract multi-level feature information from the comprehensive feature vector to obtain a feature map; channel attention and spatial attention mechanisms are integrated in each convolutional neural subnetwork. The importance of each channel feature vector is weighted by the channel attention mechanism, and the attention area of the feature vector is dynamically adjusted in the spatial dimension by the spatial attention mechanism.
[0072] The fifth step involves feature classification and determination of the current operating state or fault type of the micromotor: The feature map is flattened and regularized to obtain a global feature vector; multi-layer neurons are used to extract the global feature vector, and the features are mapped to operating modes or fault states for classification; a probability distribution for each category is generated using the Softmax activation function, and the operating state or fault type of the micromotor is determined by selecting the maximum probability value, thus achieving micromotor noise classification; the operating mode is the normal state, and the fault states are rotor imbalance, bearing wear, gear friction, and foreign matter contamination. Finally, the confusion matrix and t-SNE plot are output, displaying the probability values of the operating state or fault type, thus visualizing the classification results.
[0073] Specifically, in the second step, the VSNLMS algorithm is used to perform noise reduction processing on the acquired sound signal:
[0074] (1) Gradient term calculation: At each sampling point k, calculate the gradient term h. i (k) represents the product of the current error signal and the input signal, which is used for subsequent step size adjustment;
[0075] h i (k)=d(k)·y(ki)
[0076] Among them, h i (k) is the gradient term of the current sampling point, representing the product of the error and the input signal, used for dynamic updating of the step size; d(k) represents the current error signal, and y(ki) is the delayed sample of the input signal at time k.
[0077] (2) Step size factor update: The step size factor u(k) is dynamically adjusted at each sampling point to adapt to the current error change, as shown in the following formula:
[0078] u(k+1)=u(k)+α·h i (k)·h i (k-1)
[0079] Where u(k) is the step size factor, which controls the magnitude of the weight update and is dynamically adjusted within each sampling period; α is the adjustment rate factor, which controls the rate of step size update.
[0080] (3) Calculation of the upper limit of the step size factor: In order to prevent the filter from becoming unstable due to an excessively large step size factor, VSNLMS sets an upper limit q for the step size. max The calculation formula is:
[0081]
[0082] Among them, y T (k)·y(k) represents the power of the input signal at time k;
[0083] (4) Range restriction of step size factor: The value of step size factor u(k) is restricted to [q min ,q max Within the specified range, stability is ensured; the specific constraints are as follows:
[0084]
[0085] q max and q min These are the upper and lower limits of the step size factor, ensuring the stability of the step size under different conditions;
[0086] (5) Weight Update: Finally, the filter weights are updated using the adjusted step size factor u(k) to reduce errors and make the filter adapt to changes in the input signal.
[0087] z i (k+1)=z i (k)+2·u(k)·h i (k)
[0088] z i (k) are the weighting coefficients of the filter, which are updated according to the step size in each sampling period to minimize the error; z i (k+1) represents the updated value of the i-th weight coefficient at time k+1.
[0089] In the third step, a spectrogram feature is generated through Short Time Fourier Transform (STFT) to capture the frequency distribution of the sound data in order to detect low-frequency and high-frequency components:
[0090]
[0091] Where S(t,f) represents the spectral amplitude of the signal at time t and frequency f, representing the value of the spectrum; x[n] is the input discrete-time signal; w[nt] is the window function, centered at time t, used to extract local segments of the signal and limit the analysis range at the current moment; e -j2πfn It is the kernel function of the Fourier transform, which converts a time-domain signal into a frequency-domain signal, where j is the imaginary unit. 2πf It is angular frequency.
[0092] In the third step, Mel frequency cepstral coefficients (MFCCs) are extracted to capture the timbre information of the sound data, which helps to distinguish different types of faults.
[0093] First, a Fourier transform is performed on the sound data to obtain the spectrum; second, the power spectrum is transformed to the Mel scale using a Mel filter bank to better match the auditory characteristics of the human ear; the Mel scale transformation formula is as follows:
[0094]
[0095] The Mel filter bank consists of a set of triangular filters, each Mel filter extracting energy within a different frequency range, and then processing the output energy E of each filter. m Take the logarithm and perform a discrete cosine transform (DCT) on the result to obtain the Mel-frequency cepstral coefficients (MFCCs):
[0096]
[0097] Among them MFCC c It is the c-th MFCC coefficient; M is the number of Mel filters; E m is the energy of the m-th Mel filter; C represents the number of extracted MFCC coefficients.
[0098] In the third step, the zero cross-rate (ZCR) is extracted to capture the roughness or frequency characteristics of the audio data. The formula for calculating the ZCR in each frame is as follows:
[0099]
[0100] Where ZCR is the zero-crossing rate of the frame, representing the number of times the signal crosses zeros within the frame; N is the number of sampling points in the frame, i.e., the frame length; x[n] is the value of the discrete-time signal at the nth sampling point; sgn(x[n-1]) is the sign function, representing the positive or negative sign of the signal.
[0101] In the fourth step, the three convolutional neural subnetworks with convolutional kernels of different scales are convolutional neural subnetwork one, convolutional neural subnetwork two, and convolutional neural subnetwork three, respectively.
[0102] The convolutional neural network (CNN1) uses large convolutional kernels to capture low-frequency components and consists of three convolutional layers. The synthesized feature vector first passes through 24 5×5 convolutional kernels in the first convolutional layer, followed by 4×2 max pooling and ReLU activation. Then, it passes through 48 5×5 convolutional kernels in the second convolutional layer, undergoing max pooling and ReLU activation. Finally, it passes through 48 5×5 convolutional kernels in the third convolutional layer, undergoing pooling and ReLU activation before outputting the feature map.
[0103] The second convolutional neural subnetwork uses medium-sized convolutional kernels to focus on mid-frequency features and contains two convolutional layers. The synthesized feature vector first passes through 32 3×3 convolutional kernels in the first convolutional layer, uses L2 regularization to reduce the risk of overfitting, and then undergoes 4×2 max pooling and ReLU activation. Then it passes through 48 3×3 convolutional kernels in the second convolutional layer, and outputs a feature map after ReLU activation and max pooling.
[0104] The third convolutional neural network uses smaller convolutional kernels to capture high-frequency components and contains eight convolutional layers. The synthesized feature vector is passed through 32 3×3 convolutional kernels in the first two convolutional layers, using ReLU activation and 2×2 pooling; then through 64 3×3 convolutional kernels in the next four convolutional layers, continuing to use ReLU activation; finally, through 128 3×3 convolutional kernels in the last two convolutional layers, after ReLU activation, the feature map is output.
[0105] Multi-level feature information extraction is achieved by using a convolutional neural network with three convolutional kernels of different scales to extract comprehensive feature vectors.
[0106] In the fifth step, obtaining the global feature vector by flattening and regularizing the feature maps means that the feature maps output by convolutional neural subnetwork 1, convolutional neural subnetwork 2, and convolutional neural subnetwork 3 are flattened, converted into feature vectors, and input into the fully connected layer. The fully connected layer uses Dropout technology for regularization to reduce the risk of overfitting and improve the generalization ability of the model. A global feature vector is obtained by summing the data through the fully connected layer.
[0107] In the fifth step, multi-layer neurons are used to extract the global feature vector, and the features are mapped to the operating mode or fault state for classification. A probability distribution for each category is generated using the Softmax activation function, and the operating state or fault type of the current micro-motor is determined by selecting the maximum probability value. This micro-motor noise classification involves: the fully connected layer using multi-layer neurons to calculate the global feature vector, ultimately outputting a five-dimensional vector, where each dimension represents the predicted value for the operating mode or fault category; the last layer of the fully connected layer uses the Softmax activation function to transform the output five-dimensional vector into a probability distribution for each category, with a sum of 1; the probability value for each category represents the likelihood of that operating mode or fault category; by selecting the maximum probability value from the Softmax output, the operating state or fault type of the current micro-motor is determined, thus achieving micro-motor noise classification.
[0108] The advantages of the micro-motor noise classification method based on multi-scale feature fusion and attention mechanism in this invention are as follows:
[0109] 1. Improved ability to extract multi-scale features:
[0110] By introducing multiple convolutional neural subnetworks with kernels of different sizes, low-frequency, mid-frequency, and high-frequency features in micro-motor sound signals can be extracted simultaneously at multiple scales. This technical effect enables the present invention to comprehensively analyze and understand the different frequency components of complex fault sound signals or operating mode sound signals, significantly improving the accuracy of micro-motor fault diagnosis. Compared with traditional methods, single-scale convolutional kernels cannot effectively capture the features of each frequency band of the signal, resulting in limitations in feature extraction.
[0111] 2. Enhanced noise robustness:
[0112] This invention integrates channel attention and spatial attention mechanisms, enabling dynamic adjustment of feature weights for each channel and spatial region. This mechanism focuses on the most discriminative feature regions, effectively suppressing irrelevant noise interference and reducing the impact of background noise on fault diagnosis. Especially when the signal contains a high level of noise, the attention mechanism helps the model enhance the influence of important features, improving sensitivity and accuracy in diagnosing micro-motor faults.
[0113] 3. Improved the model's classification accuracy and robustness:
[0114] By combining multi-scale feature extraction with an attention mechanism, this invention effectively improves the classification accuracy of the model when faced with various fault modes. Different fault types, such as normal operation, rotor imbalance, bearing wear, gear friction, and foreign matter contamination, are more accurately distinguished through the model. Furthermore, the attention mechanism enhances the model's ability to focus on the fault features of micro-motors, thereby making the classification results more robust under various environmental conditions.
[0115] 4. Improved the model's generalization ability and overfit suppression:
[0116] After the output of the multi-scale convolutional neural network, Dropout is added for regularization, which effectively reduces the risk of overfitting during model training and further improves the model's generalization ability. This technique enables the model to better adapt to various micro-motor working environments and improves its performance on different datasets.
[0117] Example 2
[0118] The micro-motor noise classification device based on multi-scale feature fusion and attention mechanism of the present invention includes:
[0119] The acoustic sensor acquisition module is used to collect sound signals generated by the micro motor under different working conditions. The collected sound signals include: normal operation sound signal, rotor imbalance sound signal, bearing wear sound signal, gear friction sound signal, and sound signal mixed with foreign objects.
[0120] Signal preprocessing module: used to perform noise reduction processing on the acquired sound signals to obtain sound data, so as to reduce the impact of environmental noise and interference;
[0121] Feature extraction module: used to extract features from the preprocessed audio data; extracted features include spectrogram, Mel-frequency cepstral coefficients (MFCC), and zero crossover rate (ZCR), which are then fused through feature concatenation to form a comprehensive feature vector;
[0122] A multi-scale convolutional neural network module is used to extract multi-level feature information from the comprehensive feature vector using convolutional neural sub-networks with three different scale convolutional kernels to obtain feature maps. Channel attention and spatial attention mechanisms are integrated in each convolutional neural sub-network. The importance of each channel feature vector is weighted through the channel attention mechanism, and the attention region of the feature vector is dynamically adjusted in the spatial dimension through the spatial attention mechanism.
[0123] The classification and output module is used to obtain a global feature vector by flattening and regularizing the feature map; it extracts the global feature vector using multi-layer neurons and maps the features to the operating mode or fault state for classification; it generates the probability distribution of each category through the Softmax activation function and determines the current operating state or fault type of the micro motor by selecting the maximum probability value, thereby realizing the classification of abnormal noise of the micro motor; among which, the operating mode is the normal state, and the fault state is the rotor imbalance state, bearing wear state, gear friction state, and state with foreign matter mixed in.
[0124] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of the present invention shall be considered equivalent substitutions and shall be included within the protection scope of the present invention.
Claims
1. A method for classifying abnormal noises in micro-motors based on multi-scale feature fusion and attention mechanisms, characterized in that: Includes the following steps: The first step is to collect sound signal data: collect the sound signals generated by the micro motor under different working conditions; the collected sound signals are: normal operation sound signal, rotor imbalance sound signal, bearing wear sound signal, gear friction sound signal, and sound signal mixed with foreign objects. The second step is sound signal preprocessing: noise reduction is performed on the collected sound signals to obtain sound data, in order to reduce the impact of environmental noise and interference. The third step is sound data feature extraction: feature extraction is performed on the preprocessed sound data; the extracted features include spectrogram, Mel frequency cepstral coefficients (MFCC), and zero crossover rate (ZCR), and are fused by feature concatenation to form a comprehensive feature vector; The fourth step is multi-scale feature fusion: convolutional neural subnetworks with three different scale convolutional kernels are used to extract multi-level feature information from the comprehensive feature vector to obtain a feature map; channel attention and spatial attention mechanisms are integrated in each convolutional neural subnetwork. The importance of each channel feature vector is weighted by the channel attention mechanism, and the attention area of the feature vector is dynamically adjusted in the spatial dimension by the spatial attention mechanism. The fifth step is to classify features and determine the current operating state or fault type of the micro motor: the feature map is flattened and regularized to obtain a global feature vector; multi-layer neurons are used to extract the global feature vector and map the features to the operating mode or fault state for classification; the probability distribution of each category is generated by the Softmax activation function, and the operating state or fault type of the current micro motor is determined by selecting the maximum probability value, thus realizing the classification of abnormal noise of the micro motor; among them, the operating mode is the normal state, and the fault state is the rotor imbalance state, bearing wear state, gear friction state, and state with foreign objects.
2. The micro-motor noise classification method based on multi-scale feature fusion and attention mechanism according to claim 1, characterized in that: In the second step, the VSNLMS algorithm is used to perform noise reduction processing on the acquired sound signal: (1) Gradient term calculation: At each sampling point k, calculate the gradient term h. i (k) represents the product of the current error signal and the input signal, which is used for subsequent step size adjustment; h i (k)=d(k)·y(k-i) Among them, h i (k) is the gradient term of the current sampling point, representing the product of the error and the input signal, used for dynamic updating of the step size; d(k) represents the current error signal, and y(ki) is the delayed sample of the input signal at time k. (2) Step size factor update: The step size factor u(k) is dynamically adjusted at each sampling point to adapt to the current error change, as shown in the following formula: u(k+1)=u(k)+α·h i (k)·h i (k-1) Where u(k) is the step size factor, which controls the magnitude of the weight update and is dynamically adjusted within each sampling period; α is the adjustment rate factor, which controls the rate of step size update. (3) Calculation of the upper limit of the step size factor: In order to prevent the filter from becoming unstable due to an excessively large step size factor, VSNLMS sets an upper limit q for the step size. max The calculation formula is: Among them, y T (k)·y(k) represents the power of the input signal at time k; (4) Range restriction of step size factor: The value of step size factor u(k) is restricted to [q min ,q max Within the specified range, stability is ensured; the specific constraints are as follows: q max and q min These are the upper and lower limits of the step size factor, ensuring the stability of the step size under different conditions; (5) Weight Update: Finally, the filter weights are updated using the adjusted step size factor u(k) to reduce errors and make the filter adapt to changes in the input signal. z i (k+1)=z i (k)+2·u(k)·h i (k) z i (k) are the weighting coefficients of the filter, which are updated according to the step size in each sampling period to minimize the error; z i (k+1) represents the updated value of the i-th weight coefficient at time k+1.
3. The micro-motor noise classification method based on multi-scale feature fusion and attention mechanism according to claim 1, characterized in that: In the third step, a spectrogram feature is generated through Short Time Fourier Transform (STFT) to capture the frequency distribution of the sound data in order to detect low-frequency and high-frequency components: Where S(t,f) represents the spectral amplitude of the signal at time t and frequency f, representing the value of the spectrum; x[n] is the input discrete-time signal; w[nt] is the window function, centered at time t, used to extract local segments of the signal and limit the analysis range at the current moment; e -j2πfn It is the kernel function of the Fourier transform, which converts a time-domain signal into a frequency-domain signal, where j is the imaginary unit and 2πf is the angular frequency.
4. The micro-motor noise classification method based on multi-scale feature fusion and attention mechanism according to claim 1, characterized in that: In the third step, Mel frequency cepstral coefficients (MFCCs) are extracted to capture the timbre information of the sound data, which helps to distinguish different types of faults. First, a Fourier transform is performed on the sound data to obtain the spectrum; second, the power spectrum is transformed to the Mel scale using a Mel filter bank to better match the auditory characteristics of the human ear; the Mel scale transformation formula is as follows: The Mel filter bank consists of a set of triangular filters, each Mel filter extracting energy within a different frequency range, and then processing the output energy E of each filter. m Take the logarithm and perform a discrete cosine transform (DCT) on the result to obtain the Mel-frequency cepstral coefficients (MFCCs): Among them MFCC c It is the c-th MFCC coefficient; M is the number of Mel filters; E m is the energy of the m-th Mel filter; C represents the number of extracted MFCC coefficients.
5. The micro-motor noise classification method based on multi-scale feature fusion and attention mechanism according to claim 1, characterized in that: In the third step, the zero cross-rate (ZCR) is extracted to capture the roughness or frequency characteristics of the audio data. The formula for calculating the ZCR in each frame is as follows: Where ZCR is the zero-crossing rate of the frame, representing the number of times the signal crosses zeros within the frame; N is the number of sampling points in the frame, i.e., the frame length; x[n] is the value of the discrete-time signal at the nth sampling point; sgn(x[n-1]) is the sign function, representing the positive or negative sign of the signal.
6. The micro-motor noise classification method based on multi-scale feature fusion and attention mechanism according to claim 1, characterized in that: In the fourth step, the three convolutional neural subnetworks with convolutional kernels of different scales are convolutional neural subnetwork one, convolutional neural subnetwork two, and convolutional neural subnetwork three, respectively. The convolutional neural network (CNN1) uses large convolutional kernels to capture low-frequency components and consists of three convolutional layers. The synthesized feature vector first passes through 24 5×5 convolutional kernels in the first convolutional layer, followed by 4×2 max pooling and ReLU activation. Then, it passes through 48 5×5 convolutional kernels in the second convolutional layer, undergoing max pooling and ReLU activation. Finally, it passes through 48 5×5 convolutional kernels in the third convolutional layer, undergoing pooling and ReLU activation before outputting the feature map. The second convolutional neural subnetwork uses medium-sized convolutional kernels to focus on mid-frequency features and contains two convolutional layers. The synthesized feature vector first passes through 32 3×3 convolutional kernels in the first convolutional layer, uses L2 regularization to reduce the risk of overfitting, and then undergoes 4×2 max pooling and ReLU activation. Then it passes through 48 3×3 convolutional kernels in the second convolutional layer, and outputs a feature map after ReLU activation and max pooling. The third convolutional neural network uses smaller convolutional kernels to capture high-frequency components and contains eight convolutional layers. The synthesized feature vector is passed through 32 3×3 convolutional kernels in the first two convolutional layers, using ReLU activation and 2×2 pooling; then through 64 3×3 convolutional kernels in the next four convolutional layers, continuing to use ReLU activation; finally, through 128 3×3 convolutional kernels in the last two convolutional layers, after ReLU activation, the feature map is output. Multi-level feature information extraction is achieved by using a convolutional neural network with three convolutional kernels of different scales to extract comprehensive feature vectors.
7. The micro-motor noise classification method based on multi-scale feature fusion and attention mechanism according to claim 6, characterized in that: In the fifth step, obtaining the global feature vector by flattening and regularizing the feature maps means that the feature maps output by convolutional neural subnetwork 1, convolutional neural subnetwork 2, and convolutional neural subnetwork 3 are flattened, converted into feature vectors, and input into the fully connected layer. The fully connected layer uses Dropout technology for regularization to reduce the risk of overfitting and improve the generalization ability of the model. A global feature vector is obtained by summing the data through the fully connected layer.
8. The micro-motor noise classification method based on multi-scale feature fusion and attention mechanism according to claim 7, characterized in that: In the fifth step, multi-layer neurons are used to extract the global feature vector, and the features are mapped to the operating mode or fault state for classification. A probability distribution for each category is generated using the Softmax activation function, and the operating state or fault type of the current micro-motor is determined by selecting the maximum probability value. This micro-motor noise classification involves: the fully connected layer using multi-layer neurons to calculate the global feature vector, ultimately outputting a five-dimensional vector, where each dimension represents the predicted value for the operating mode or fault category; the last layer of the fully connected layer uses the Softmax activation function to transform the output five-dimensional vector into a probability distribution for each category, with a sum of 1; the probability value for each category represents the likelihood of that operating mode or fault category; by selecting the maximum probability value from the Softmax output, the operating state or fault type of the current micro-motor is determined, thus achieving micro-motor noise classification.
9. The micro-motor noise classification method based on multi-scale feature fusion and attention mechanism according to claim 1, characterized in that: In the fifth step, after determining the current operating status or fault type of the micro motor, the confusion matrix and t-SNE diagram are output, and the probability values of the operating status or fault type are displayed to achieve visualized classification results.
10. A micro-motor noise classification device based on multi-scale feature fusion and attention mechanism, characterized in that: include: The acoustic sensor acquisition module is used to acquire the sound signals generated by the micro motor under different working conditions; The collected sound signals are: normal operation sound signal, rotor imbalance sound signal, bearing wear sound signal, gear friction sound signal, and sound signal mixed with foreign matter; Signal preprocessing module: used to perform noise reduction processing on the acquired sound signals to obtain sound data, so as to reduce the impact of environmental noise and interference; Feature extraction module: used to extract features from the preprocessed audio data; extracted features include spectrogram, Mel-frequency cepstral coefficients (MFCC), and zero crossover rate (ZCR), which are then fused through feature concatenation to form a comprehensive feature vector; A multi-scale convolutional neural network module is used to extract multi-level feature information from the comprehensive feature vector using convolutional neural sub-networks with three different scale convolutional kernels to obtain feature maps. Channel attention and spatial attention mechanisms are integrated in each convolutional neural sub-network. The importance of each channel feature vector is weighted through the channel attention mechanism, and the attention region of the feature vector is dynamically adjusted in the spatial dimension through the spatial attention mechanism. The classification and output module is used to obtain a global feature vector by flattening and regularizing the feature map; it extracts the global feature vector using multi-layer neurons and maps the features to the operating mode or fault state for classification; it generates the probability distribution of each category through the Softmax activation function and determines the current operating state or fault type of the micro motor by selecting the maximum probability value, thereby realizing the classification of abnormal noise of the micro motor; among which, the operating mode is the normal state, and the fault state is the rotor imbalance state, bearing wear state, gear friction state, and state with foreign matter mixed in.
Citation Information
Patent Citations
Transformer fault diagnosis method and system based on voiceprint and infrared feature fusion
CN117292716A
Gearbox fault diagnosis method based on multi-scale dynamic convolutional neural network
CN118706436A