A motor bearing fault intelligent diagnosis method and system based on a multi-scale CNN
Patent Information
- Application Number
- CN202610722560.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-25
- Publication Date
- 2026-08-21
AI Technical Summary
然而,单一模型往往难以兼顾空间多尺度特征与时间序列依赖
(1)本发明构建了时频预处理-多尺度特征提取-注意力增强-双向时序建模的级联架构,实现了端到端的深度时空特征学习,能提高电机轴承在强噪声干扰和变工况的环境下的诊断准确率,在强噪声干扰和变工况条件下仍保持高精度与强鲁棒性,实现了端到端的轴承故障智能诊断。本发明系统引入了Focal Loss损失函数、分级数据增强及强正则化策略,有效解决了实验过程中在强噪声干扰和变工况条件下的准确率。
Smart Images

Figure CN122615519A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of rotating machinery condition monitoring and fault diagnosis technology, and in particular to an intelligent fault diagnosis method and system for motor bearings based on multi-scale CNN. Background Technology
[0002] As a core component of rotating machinery, the operating status of motor bearings directly affects the safety, stability, and efficiency of the entire industrial system. Under long-term, complex operating conditions, bearings are prone to various types of failures, including those affecting the inner ring, outer ring, and rolling elements. Failure to identify early-stage faults in a timely and accurate manner can lead to equipment performance degradation or even catastrophic downtime, resulting in significant economic losses. Therefore, developing efficient and accurate bearing fault diagnosis technology is of great importance for achieving predictive and intelligent operation and maintenance of industrial equipment.
[0003] Currently, research on motor bearing fault diagnosis mainly relies on the deep integration of signal processing techniques and deep learning models. At the signal preprocessing level, commonly used time-frequency analysis methods include variational mode decomposition (VMD), eigenmode decomposition (EMD), and wavelet transform. These methods play a crucial role in feature extraction, but each has its limitations. For example, the effectiveness of VMD heavily depends on the preset number of modes and penalty factor; improper parameter selection can lead to mode aliasing. Eigenmode decomposition is essentially a decomposition method based on preset basis functions, lacking flexibility. The choice of basis functions in wavelet transform significantly affects the analysis results and lacks adaptive representation capabilities for local signal features.
[0004] In deep learning models, convolutional neural networks (CNNs) and long short-term memory (LSTM) networks have been widely used in fault diagnosis. However, single models often struggle to simultaneously handle spatial multi-scale features and temporal dependencies. Some studies have attempted to combine CNNs and LSTMs, but these typically employ simple cascaded or parallel structures, failing to achieve deep spatiotemporal feature fusion and bidirectional dependency mining. Furthermore, existing methods suffer from insufficient accuracy and robustness when dealing with strong noise interference, variable operating conditions, and mixed fault types, particularly in complex fault pattern recognition, where performance bottlenecks are difficult to overcome.
[0005] Therefore, there is an urgent need for a motor bearing fault diagnosis method that can adaptively extract signal time-frequency features, deeply fuse multi-scale spatial information, and introduce a multi-dimensional attention mechanism. Summary of the Invention
[0006] The purpose of this invention is to provide a method and system for intelligent diagnosis of motor bearing faults based on multi-scale CNN, which can improve the diagnostic accuracy of motor bearings under strong noise interference and variable operating conditions, and maintain high precision and strong robustness under strong noise interference and variable operating conditions, thus realizing end-to-end intelligent diagnosis of bearing faults.
[0007] To achieve the above objectives, the present invention provides the following solution: A method for intelligent diagnosis of motor bearing faults based on multi-scale CNN includes the following steps: S1. Collect the original vibration signal of the motor bearing and preprocess it to remove DC components, power frequency interference filtering and outliers; S2. Based on wavelet packet transform, multi-layer wavelet packet decomposition, adaptive thresholding and wavelet packet reconstruction are performed on the preprocessed vibration signal to generate a time-frequency feature tensor containing multi-subband information; a fault diagnosis model is constructed, including a multi-scale convolutional neural network, a multi-dimensional attention module, a bidirectional long short-term memory network and a fully connected layer and a Softmax classifier. S3. Input the time-frequency feature tensor into a preset multi-scale convolutional neural network, extract spatial features of different scales through multiple parallel convolutional branches, and fuse the spatial features of different scales to obtain the fused spatial feature tensor. S4. Input the fused spatial feature tensor into the multidimensional attention module, and obtain the attention-weighted enhanced feature tensor through spatial attention mechanism, spectral attention mechanism and cross attention mechanism; S5. Input the enhanced feature tensor into a bidirectional long short-term memory network to extract the bidirectional long-term dependency features in the time series signal and construct a spatiotemporal integrated feature vector. S6. Input the spatiotemporal integrated feature vector into the preset fully connected layer and Softmax classifier, and output the fault type of the motor bearing.
[0008] Preferably, in S2, the preprocessed vibration signal is subjected to multi-level wavelet packet decomposition, adaptive thresholding, and wavelet packet reconstruction based on wavelet packet transform, specifically including: The preprocessed vibration signal was decomposed into three-level wavelet packets using Daubechies-4 wavelets to obtain multiple sub-band coefficients. An improved soft thresholding method was used to quantize the sub-band coefficients, with the threshold adaptively determined by Stein unbiased risk estimation. A kurtosis criterion was introduced: if the kurtosis of a sub-band coefficient is greater than the adaptive threshold, the thresholding of that sub-band is skipped, and the sub-band coefficient is directly retained. Wavelet packet reconstruction is performed on the coefficients after adaptive thresholding to obtain the denoised vibration signal; the sub-band coefficients obtained by wavelet packet decomposition are stacked in sub-band order to construct a multi-channel time-frequency feature tensor.
[0009] Preferably, the method also includes using Focal Loss as the loss function, employing the AdamW optimizer for model parameter optimization, and using an early stopping strategy, stopping training when the validation set loss does not decrease for 10 consecutive epochs; the loss function formula is as follows:
[0010] in, For real labels, To focus parameters, For predicting probabilities, B is the batch size, which is the total number of samples input to the model in a single training session, b is the sample index, representing the b-th sample in the current batch, and c is the fault category index, representing the c-th category among the 6 fault types.
[0011] Preferably, in S3, the multi-scale convolutional neural network includes three convolutional branches with kernel sizes of 3×1, 5×1, and 7×1, respectively, corresponding to the extraction of fine-grained, medium-grained, and coarse-grained spatial features. Each convolutional branch is followed by a batch normalization layer, a ReLU activation layer, a Dropout layer, and a max pooling layer. The outputs of the three branches are concatenated along the channel dimension and then subjected to 1×1 convolution to achieve cross-channel information interaction and dimensionality compression. After adaptive average pooling, a fused feature tensor with a unified dimension is obtained.
[0012] Preferably, in S4, the multidimensional attention module includes: Spatial attention mechanism: Average pooling is performed on the input feature tensor along the time dimension to generate channel attention weights, and the feature channels are weighted according to their importance; Spectral attention mechanism: Average pooling is performed on the weighted features along the spatial dimension to generate temporal attention weights, which focus on key fault regions; Cross-attention mechanism: Employs a multi-head self-attention structure to perform deep spatiotemporal fusion on spatially and spectrally weighted features, and outputs an enhanced feature tensor.
[0013] Preferably, in S5, the bidirectional long short-term memory network adopts a two-layer structure with a hidden layer dimension of 64. The forward LSTM captures the accumulation process of fault features, and the backward LSTM captures the periodic recurrence pattern of fault features. The bidirectional hidden states of the last time step are extracted, concatenated, and processed by layer normalization to obtain a spatiotemporal integrated feature vector.
[0014] This invention also provides an intelligent fault diagnosis system for motor bearings based on multi-scale CNN, applied to any of the above-mentioned intelligent fault diagnosis methods for motor bearings based on multi-scale CNN, comprising: The data acquisition and preprocessing module is used to acquire the original vibration signal of the motor bearing and perform preprocessing to remove DC components, power frequency interference filtering, and outliers. The diagnostic model construction module is used to perform multi-layer wavelet packet decomposition, adaptive thresholding, and wavelet packet reconstruction on the preprocessed vibration signal based on wavelet packet transform, generating a time-frequency feature tensor containing multi-subband information; and to construct a fault diagnosis model, including a multi-scale convolutional neural network, a multi-dimensional attention module, a bidirectional long short-term memory network, a fully connected layer, and a Softmax classifier. The feature extraction and fusion module inputs the time-frequency feature tensor into a preset multi-scale convolutional neural network, extracts spatial features at different scales through multiple parallel convolutional branches, and fuses the spatial features at different scales to obtain the fused spatial feature tensor. The attention weighting module is used to input the fused spatial feature tensor into the multi-dimensional attention module, and obtain the attention-weighted enhanced feature tensor through spatial attention mechanism, spectral attention mechanism and cross attention mechanism; The spatiotemporal integrated feature vector construction module inputs the enhanced feature tensor into a bidirectional long short-term memory network to extract bidirectional long-term dependency features from the time series signal and construct a spatiotemporal integrated feature vector. The fault type diagnosis module is used to input the spatiotemporal integrated feature vector into the preset fully connected layer and Softmax classifier, and output the fault type of the motor bearing.
[0015] The present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements a method for intelligent diagnosis of motor bearing faults based on multi-scale CNN as described above.
[0016] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects: (1) This invention constructs a cascaded architecture of time-frequency preprocessing, multi-scale feature extraction, attention enhancement, and bidirectional temporal modeling, realizing end-to-end deep spatiotemporal feature learning. This improves the diagnostic accuracy of motor bearings under strong noise interference and variable operating conditions, maintaining high precision and robustness even under these conditions, thus achieving end-to-end intelligent bearing fault diagnosis. The system of this invention introduces the Focal Loss loss function, hierarchical data augmentation, and strong regularization strategy, effectively solving the accuracy problem under strong noise interference and variable operating conditions during the experiment.
[0017] (2) Based on wavelet packet transform, multi-scale convolutional neural network, multi-dimensional attention mechanism and bidirectional long short-term memory network, this invention realizes the adaptive selection and enhancement of fault-sensitive features, and fully explores the intelligent diagnosis method of temporal context dependency relationship, so as to break through the existing performance bottleneck and realize higher accuracy motor bearing fault classification and diagnosis. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 A flowchart illustrating the intelligent diagnosis method for motor bearing faults based on multi-scale CNN provided by this invention; Figure 2 This is a diagram showing the motor data acquisition process of the present invention; Figure 3 This is a schematic diagram of the wavelet packet transform denoising and feature enhancement process in this invention; Figure 4 This is the wavelet packet decomposition and reconstruction diagram in this invention; Among them, (a) is the normal comparison, (b) is the rolling element failure comparison, (c) is the load failure comparison, (d) is the inner ring failure comparison, (e) is the outer ring failure comparison, and (f) is the eccentric failure comparison. Figure 5 This is a schematic diagram of the structure of the multi-scale convolutional neural network in this invention; Figure 6 This is a schematic diagram of the multidimensional attention enhancement module in this invention; Figure 7 This is a schematic diagram of the bidirectional long short-term memory network in this invention; Figure 8 This is a diagram showing the overall network structure of the WPT-MCNN-SSCA-BiLSTM model in this invention; Figure 9 This is a diagram showing the confusion matrix results on the self-collected dataset in an embodiment of the present invention; Figure 10 This is a schematic diagram of the loss function and accuracy on the self-collected dataset in an embodiment of the present invention; (a) is the loss curve, and (b) is the accuracy curve. Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0022] like Figure 1 As shown, the present invention provides an intelligent fault diagnosis method for motor bearings based on multi-scale CNN, comprising the following steps: S1. Collect the original vibration signal of the motor bearing and preprocess it to remove DC components, power frequency interference filtering and outliers; S2. Based on wavelet packet transform, multi-layer wavelet packet decomposition, adaptive thresholding and wavelet packet reconstruction are performed on the preprocessed vibration signal to generate a time-frequency feature tensor containing multi-subband information; a fault diagnosis model is constructed, including a multi-scale convolutional neural network, a multi-dimensional attention module and a bidirectional long short-term memory network. S3. Input the time-frequency feature tensor into a preset multi-scale convolutional neural network, extract spatial features of different scales through multiple parallel convolutional branches, and fuse the spatial features of different scales to obtain the fused spatial feature tensor. S4. Input the fused spatial feature tensor into the multidimensional attention module, and obtain the attention-weighted enhanced feature tensor through spatial attention mechanism, spectral attention mechanism and cross attention mechanism; S5. Input the enhanced feature tensor into a bidirectional long short-term memory network to extract the bidirectional long-term dependency features in the time series signal and construct a spatiotemporal integrated feature vector. S6. Input the spatiotemporal integrated feature vector into the preset fully connected layer and Softmax classifier, and output the fault type of the motor bearing.
[0023] Specifically, the method of the present invention includes: Step 1: Vibration signal acquisition and preprocessing like Figure 2As shown, a high-precision accelerometer (model: 603C01) was installed vertically in the bearing housing of the experimental motor to capture the raw vibration signals during motor bearing operation. The accelerometer was connected to a National Instruments (NI) USB-6002 data acquisition card. A custom program was written using LabVIEW software to convert the signal into a digital signal, and the data acquisition card was controlled to continuously record the digital signal at a sampling frequency of 12kHz and save it to a computer. LabVIEW software was run on the computer, and the digital signal data was saved as a file. The motor maintained a speed of approximately 1700 RPM during the experiment to simulate real industrial conditions. The dataset collected in this invention includes six motor bearing operating states: normal state (normal_ok), rolling element fault (ball_3), inner ring fault (inner_7), outer ring fault (outer_3), load fault (bph_10), and eccentric fault (px_7). Each state contains 200 data samples, and the vibration signal corresponding to each data sample has a length of 2048 data points, for a total of 1200 data samples. After acquisition, the raw vibration signals underwent preprocessing, including DC component removal, 50Hz power frequency interference filtering, and outlier removal. DC component removal was achieved by subtracting the signal mean to eliminate DC bias. 50Hz power frequency interference filtering employed a 50Hz notch filter to suppress power frequency interference. Outlier removal was performed based on the Laida criterion to identify and remove outlier sampling points exceeding ±3 standard deviations of the mean, ensuring data quality.
[0024] Step 2: Wavelet packet transform time-frequency analysis and denoising.
[0025] Based on wavelet packet transform, the preprocessed vibration signal is subjected to multi-level wavelet packet decomposition, adaptive thresholding, and wavelet packet reconstruction to generate a time-frequency feature tensor containing multi-subband information.
[0026] like Figure 3 As shown, wavelet packet transform is performed on the preprocessed vibration signal. The preprocessed vibration signal is then subjected to j-level wavelet packet decomposition to obtain 2... j Sub-band coefficients. An improved soft thresholding method is used to quantize the sub-band coefficients, with the threshold adaptively determined by Stein's unbiased risk estimation. Based on the kurtosis criterion, if the kurtosis of a sub-band coefficient is greater than a preset threshold, the thresholding process for that sub-band is skipped, resulting in denoised coefficients. Wavelet packet reconstruction is then performed on the thresholded coefficients to obtain the denoised vibration signal, and a multidimensional time-frequency feature tensor is extracted from each sub-band coefficient. The specific process is as follows: 1. Wavelet packet decomposition The preprocessed vibration signal was decomposed into three levels using Daubechies-4 wavelets to obtain 2 3=8 sub-band coefficients, enabling fine division of high and low frequency signals and improving time-frequency resolution. The vibration signal x(t) is subjected to j-level wavelet packet decomposition to obtain 2 j The sub-band coefficients of the j-th layer and the n-th node are:
[0027] Where x(t) is the continuous-time vibration signal, and k is the translation factor (k=0, 1, 2, ..., N-1), For the corresponding wavelet packet basis functions (generated through recursive decomposition), d j,n (k) represents the wavelet packet coefficients.
[0028] 2. Adaptive threshold processing To avoid over-smoothing or under-filtering caused by a fixed threshold, this invention employs an improved soft thresholding method to quantize the sub-band coefficients:
[0029] in, The sub-band coefficients after thresholding, i.e., the result after denoising, are the threshold values. It is adaptively determined by Stein's unbiased risk estimation (SURE), which balances signal fidelity and noise suppression. For symbolic functions, It represents the absolute value.
[0030] To further preserve the characteristics of fault impact, this invention introduces a kurtosis criterion. The kurtosis value of each sub-band coefficient is calculated. ,in It is the fourth-order central moment. The standard deviation is used. If the kurtosis value is greater than the preset threshold (empirically set to 3.5), the threshold processing of adaptive threshold denoising is skipped, and the coefficients of that sub-band are directly retained to avoid early weak impulses being misjudged as noise and filtered out. Threshold It is not a fixed value, but is adaptively calculated through Stein's unbiased risk estimation (SURE). Noise reduction can also be adaptively selected using the kurtosis criterion.
[0031] 3. Wavelet packet reconstruction Wavelet packet reconstruction is performed on the sub-band coefficients after adaptive thresholding to obtain the denoised vibration signal, whose mathematical expression is:
[0032] in, The wavelet basis functions used for reconstruction are the same as those used for decomposition.
[0033] like Figure 4Figures (a)-(f) show the comparison results of vibration signals corresponding to six motor bearing operating states after wavelet packet decomposition and reconstruction, with reconstruction errors indicated. Experimental results show that the error between the reconstructed wavelet packet signal and the original and processed vibration signals is extremely low (on the order of 10⁻¹²), verifying that wavelet packet transform has good fidelity in signal decomposition and reconstruction, achieving accurate signal restoration while preserving fault feature details. Simultaneously, the reconstructed signal effectively retains the fault impact component in the original signal, laying a high-quality data foundation for subsequent feature extraction and classification diagnosis.
[0034] 4. Feature Tensor Construction Wavelet packet reconstruction yields the denoised time-domain vibration signal x(t). To provide a structured, time-frequency-rich input for subsequent deep learning models, this invention utilizes the sub-band coefficients generated during wavelet packet decomposition to construct a multidimensional feature tensor. The reconstruction step here primarily aims to verify the signal fidelity of the decomposition-thresholding-reconstruction process and obtain a clean time-domain signal as a reference. In the actual feature extraction process, the 2... 3 =8 sub-band coefficients, stacked in sub-band order, form a multi-channel time-frequency feature tensor X:
[0035] in Wavelet packet reconstruction is used to verify and ensure signal quality, while feature tensor construction is used to extract rich time-frequency features for use by deep learning models. These two aspects are related as "quality assurance" and "feature extraction," and do not conflict. The reconstruction step demonstrates that this method does not lose key fault information during denoising, while directly using sub-band coefficients ensures that the model obtains the most complete time-frequency features, providing high-quality input for subsequent multi-scale spatial feature extraction in MCNN.
[0036] Step 3: Multi-scale feature extraction The time-frequency feature tensor is input into a multi-scale convolutional neural network. Spatial features at different scales are extracted through multiple parallel convolutional branches. The extracted spatial features at different scales are then fused to obtain a fused spatial feature tensor, thereby achieving cross-channel information interaction and dimensionality compression.
[0037] like Figure 5 As shown, MCNN receives the 8×1×256-dimensional time-frequency feature tensor output by wavelet packet transform and extracts multi-scale spatial features through three parallel convolutional branches.
[0038] The multi-scale convolutional neural network contains three parallel convolutional branches, using kernels of sizes 3×1, 5×1, and 7×1, respectively, to extract fine-grained, medium-grained, and coarse-grained spatial features. Each branch sequentially undergoes convolution → batch normalization (BN) → ReLU activation → Dropout (dropout rate 0.2) → max pooling (stride 2). The branch output feature formula is as follows:
[0039] in, Corresponding to fine, medium, and coarse-grained branches, , , is the kernel size.
[0040] A Dropout layer was then introduced after the convolutional layer to prevent overfitting. (In terms of probability) Randomly discard a portion of the neuron outputs, using the following formula: .in To and Binary mask matrices with identical shapes, whose elements follow a Bernoulli distribution. This is for element-wise multiplication.
[0041] In the max pooling pool, the pooling kernel size Step length The formula is Where y represents the practical part index of the output sequence.
[0042] Multi-scale feature fusion employs a combination of 1×1 convolution, batch normalization, and ReLU activation to achieve cross-channel feature interaction and dimensionality compression. The output features of the three branches are concatenated along the channel dimension to obtain... Cross-channel information interaction and dimensionality compression are achieved through 1×1 convolutional layers, as shown in the formula: .in, For convolution kernel weight, For bias.
[0043] Batch normalization and ReLU activation are performed on the convolution results:
[0044]
[0045] in, , The mean and variance of the batch features. , For learnable scaling and offset parameters, is the numerical stability constant.
[0046] Finally, adaptive average pooling is used to unify the feature tensor into a 32×256 dimensional fusion space feature tensor. This addresses the issue of inconsistent feature sizes in convolutions at different scales.
[0047] exist Figure 5 In the multi-scale convolutional neural network structure shown, Dropout and adaptive average pooling together constitute the key processing steps after feature extraction: First, after each convolutional branch (3×1, 5×1, 7×1) undergoes convolution, batch normalization, and ReLU activation, a Dropout layer (dropout rate 0.2) is introduced. By randomly zeroing out some neuron outputs, it effectively prevents model overfitting, enhances the generalization ability of features, and forces the network to learn more robust fault representations; subsequently, after the features from the three branches are concatenated and fused with 1×1 convolutions, an adaptive average pooling layer is introduced, the core of which is... Its function is to automatically pool the fused feature tensors to a uniform time step (256 dimensions) without manually setting the pooling kernel size, thereby solving the problem of inconsistent feature map sizes that may be caused by convolution at different scales. This ensures that the output dimensions are standardized and uniform, providing a format-aligned input sequence for subsequent bidirectional LSTM temporal modeling. This collaborative design of "first randomly discarding to enhance robustness, then uniformly pooling to ensure consistency" not only improves the model's anti-interference ability in complex noise environments, but also ensures that multi-scale features can be efficiently transmitted in a standardized format, laying a solid foundation for the final high-precision fault diagnosis.
[0048] Step 4: Multidimensional Attention Feature Enhancement Multidimensional attention modules, such as Figure 6 As shown, it consists of three sub-modules: spatial attention, spectral attention, and cross-attention. The fused spatial feature tensor is input into the multi-dimensional attention module. Through spatial attention, spectral attention, and cross-attention mechanisms, fault-sensitive features are adaptively enhanced while irrelevant noise is suppressed, resulting in an attention-weighted enhanced feature tensor.
[0049] The fused spatial feature tensor is first input into the multi-dimensional attention module. Through a triple mechanism of spatial attention, spectral attention, and cross-attention, multi-scale features are adaptively weighted and enhanced, highlighting fault-sensitive components and suppressing irrelevant noise. After attention enhancement, the feature tensor maintains the same dimensional structure, integrating complementary information from fine, medium, and coarse-scale spatial features. Furthermore, through channel compression and time step alignment, it adapts to the input requirements of BiLSTM in the format of "batch size × feature dimension × time step," providing a high-quality, highly discriminative feature foundation for subsequent bidirectional temporal modeling.
[0050] The spatial attention mechanism of the multidimensional attention module weights the importance of different channels of the input feature tensor. The spectral attention mechanism focuses on critical fault regions in the temporal dimension. The cross-attention mechanism achieves deep fusion of spatial and spectral features through multi-head self-attention.
[0051] Spatial attention mechanism is The spatial description vector is obtained by average pooling in the time dimension, then attention weights are generated and the features are weighted, as shown in the formula:
[0052]
[0053]
[0054] in, It is the Sigmoid activation function. This indicates that average pooling is performed along the time dimension to compress the time dimension and obtain a channel-level description vector. For spatial attention weights.
[0055] The spectral attention mechanism performs average pooling on the fused spatial feature tensor along the spatial dimension, and applies spatially weighted features. Average pooling is performed along the spatial dimension to generate spectral attention weights, which are then weighted as follows:
[0056]
[0057]
[0058] Cross-attention reconstructs spectral weighted features into a sequence form. A four-head self-attention mechanism is used to achieve deep fusion of spatiotemporal features, and the formula is as follows:
[0059]
[0060]
[0061]
[0062] in, , , The result of linear transformation of the input features. As the key vector dimension, The multi-head attention output weights are provided by the FFN (two linear layers + ReLU), which is a feedforward neural network that ultimately outputs a 32×256-dimensional attention-enhanced feature tensor. .
[0063] Step 5: BiLSTM Timing Modeling The enhanced feature tensor is input into a bidirectional long short-term memory network to extract bidirectional long-term dependency features from the time-series signal and construct a spatiotemporal integrated feature.
[0064] The bidirectional long short-term memory network adopts a two-layer structure with a hidden layer dimension of 64. The bidirectional processing mechanism simultaneously captures the forward feature accumulation and the backward periodic recurrence pattern. A sequence end feature extraction strategy is adopted to obtain the fused feature vector of the last time step and perform layer normalization processing on it.
[0065] like Figure 6 As shown, the BiLSTM module performs temporal dependency mining on the fused features output by MCNN: The spatial feature tensor output by multidimensional attention is reconstructed into a time sequence format (256×32) that can be processed by BiLSTM (time step × feature dimension), establishing a mapping relationship of "spatial features → time sequence", laying the data format foundation for subsequent bidirectional time series modeling.
[0066] 1. Feature format conversion The spatial feature tensor of a single sample output by MCNN is Then the time series reconstruction formula is:
[0067] The batch input format is: ,in, Let b represent the time sequence of the b-th sample, where b = 1, 2, ..., B, and B represents the batch size. Spatial feature tensor, where C and L represent the feature dimension and time step, respectively.
[0068] 2. Two-way time-series learning like Figure 7 As shown, a two-layer BiLSTM network is used, consisting of a forward LSTM and a backward LSTM, with both the forward and backward LSTM having a hidden layer dimension of 64. The forward LSTM captures the "accumulation process" of fault features, while the backward LSTM captures the "periodic recurrence pattern" of fault features. The core formula is as follows: The Forgotten Gate decides to discard historical information:
[0069] in, It is the Sigmoid activation function. Here is the forget gate weight matrix. For bias, This represents the hidden state at the previous time step t-1, and is a zero vector at t=1; The input feature for the b-th sample at time step t is the enhanced feature tensor output by the multidimensional attention module. Obtained through temporal reconstruction. This represents the Forgotten Gate.
[0070] The input gate and candidate cell state determine the update information:
[0071]
[0072] Where tanh is the hyperbolic tangent activation function. The weight matrix is obtained by optimizing and updating it through backpropagation and gradient descent during model training. For bias. , and represent the initiation activation function and the candidate cell state vector, respectively.
[0073] Cell state update: Preserving long-term temporal information;
[0074] in, For Hadamard product, Let t represent the cell state at time t. Represents the cell state at the previous time step. Output gate and hidden state: Generate the forward feature representation of the current time step;
[0075]
[0076] in, This is the weight matrix. For bias, The hidden state at time t. This indicates the hidden state at the previous moment. The Hadamard product represents the element-wise multiplication of two vectors. The output gate activation vector, calculated by the Sigmoid function, has a value range of (0, 1) and is used to control how much information is output from the hidden state at the current time step.
[0077] The hidden sequence output from the forward direction and the hidden state sequence of the backward output By concatenating the features along the feature dimension, a complete bidirectional output feature is obtained.
[0078] 3. Feature Output Processing Global temporal information is extracted from the output sequence of a two-layer BiLSTM network. A compact and stable 128-dimensional spatiotemporal integrated feature is generated by "bidirectional hidden state splicing + layer normalization", which provides a feature representation with strong discriminative power for subsequent fault classification.
[0079] (1) Extract the bidirectional hidden states of the last time step and concatenate them to obtain the concatenated features:
[0080] (2) Perform layer normalization on the splicing features: , ,
[0081] in, This represents the hidden state at the last time step of the forward LSTM. This represents the hidden state at the last time step of the backward LSTM. This is the numerical stability constant (and should be distinguished from its previous meaning if they differ). Represents the sample feature mean Represents the variance of sample features This represents the feature vector resulting from the concatenation of the forward and backward hidden states, with a dimension of 128. express The first vector element The spatiotemporal integrated features output after normalization of the representation layer have a dimension of 128 and are used for classification by subsequent fully connected layers. , The learnable parameters are optimized during training, and 128-dimensional spatiotemporal integrated features are output to provide a highly discriminative feature representation for subsequent fault classification.
[0082] (3) Output spatiotemporal integration characteristics After the above processing This is the final spatiotemporal integrated feature, which includes the abstract representation of the "32-dimensional spatial multi-scale features" extracted by MCNN after temporal reconstruction and bidirectional mining, and the stability of the distribution is ensured by layer normalization. It can be directly input into the fully connected layer to complete fault classification.
[0083] Step Six: Fault Classification and Output The fault classification and output module is the final stage of the model diagnosis task. Its core function is to map the 128-dimensional spatiotemporal integrated features output by the bidirectional BiLSTM network into probability distributions for six fault categories using fully connected layers and a Softmax classifier. Combined with an optimizer and training strategy, it achieves efficient model training and result validation, ensuring diagnostic accuracy and reliability. The overall network structure diagram of WPT-MCNN-SSCA-BiLSTM is shown below. Figure 8 As shown.
[0084] During model training, Focal Loss, hierarchical data augmentation, and strong regularization strategies were employed to address accuracy issues under conditions of strong noise interference and variable operating conditions during experiments.
[0085] 1. Feature Mapping and Classification The 128-dimensional feature vector output by the bidirectional BiLSTM network is a spatiotemporal integrated feature. It needs to be transformed into a dimension that matches the number of fault categories through a fully connected layer (6 fault categories correspond to 6-dimensional output). in, Here is the weight matrix of the fully connected layer, and the bias vector is... , This is the output matrix.
[0086] The probability distribution is then transformed using the Softmax function: .
[0087] in, It is an exponential function, with the denominator being the exponential sum of the logits values of all categories, guaranteeing... and j indicates that all categories are iterated over for summation.
[0088] For each sample, the category with the highest probability is selected as the final diagnosis result: ,in, For the predicted fault category of the b-th sample, The variable representing the maximum value can be compared with the true category to calculate evaluation indicators such as diagnostic accuracy and confusion matrix.
[0089] 2. Model Training Strategy During model training, Focal Loss, hierarchical data augmentation, and strong regularization strategies are employed to address accuracy issues under strong noise interference and varying operating conditions.
[0090] (1) Loss function Focal Loss In industrial scenarios, fault samples often exhibit class imbalance. Focal Loss is used as the loss function.
[0091] in, For real labels, To focus on the parameters, the weight of easily classified samples is reduced, while the weight of difficult-to-classify samples is increased, thus mitigating the bias caused by class imbalance.
[0092] (2) Optimizer AdamW The AdamW optimizer is used to optimize the model parameters during initial learning. First-order momentum coefficient Second momentum coefficient Weight decay coefficient The parameter update formula is:
[0093] in Updated model parameters, Model parameters before update Indicates the learning rate. This represents the first-order momentum after bias correction. This represents the second-order momentum after deviation correction. Represents the numerical stability constant. This represents the weight decay coefficient.
[0094] (3) Result verification and early cessation 5 The 1200 samples were divided into a training set (960 samples) and a validation set (240 samples) in an 8:2 ratio, and five independent models were trained. An early stopping strategy was adopted: training was stopped when the loss on the validation set did not decrease for 10 consecutive epochs to avoid ineffective training and overfitting.
[0095] To verify the effectiveness of the method of this invention, experiments were conducted on a laboratory-collected dataset. The confusion matrix on the laboratory-collected dataset (six types of faults) is as follows: Figure 9 As shown, the loss function and accuracy are as follows: Figure 10 As shown in the confusion matrix and training curves, the proposed model performs excellently in six types of motor bearing condition diagnosis tasks, with an average diagnostic accuracy of 98.85%. The accuracy rate for identifying normal conditions and inner ring faults is 100%, while the accuracy rates for identifying rolling element, outer ring, load imbalance, and shaft eccentricity faults are 99.1%, 98.3%, 98.3%, and 97.4%, respectively. Only a small number of misclassifications occur between composite and weak fault categories with similar characteristics. The training and testing loss and accuracy curves show a highly consistent trend, with smooth convergence and no obvious overfitting. This verifies the model's high robustness and strong generalization ability under complex working conditions, meeting the engineering needs for accurate diagnosis of motor bearing faults in industrial settings. The overall accuracy reaches 98.85%.
[0096] This invention also provides an intelligent fault diagnosis system for motor bearings based on multi-scale CNN, applied to any of the above-mentioned intelligent fault diagnosis methods for motor bearings based on multi-scale CNN, comprising: The data acquisition and preprocessing module is used to acquire the original vibration signal of the motor bearing and perform preprocessing to remove DC components, power frequency interference filtering, and outliers. The diagnostic model construction module is used to perform multi-layer wavelet packet decomposition, adaptive thresholding, and wavelet packet reconstruction on the preprocessed vibration signal based on wavelet packet transform, generating a time-frequency feature tensor containing multi-subband information; and to construct a fault diagnosis model, including a multi-scale convolutional neural network, a multi-dimensional attention module, a bidirectional long short-term memory network, a fully connected layer, and a Softmax classifier. The feature extraction and fusion module inputs the time-frequency feature tensor into a preset multi-scale convolutional neural network, extracts spatial features at different scales through multiple parallel convolutional branches, and fuses the spatial features at different scales to obtain the fused spatial feature tensor. The attention weighting module is used to input the fused spatial feature tensor into the multi-dimensional attention module, and obtain the attention-weighted enhanced feature tensor through spatial attention mechanism, spectral attention mechanism and cross attention mechanism; The spatiotemporal integrated feature vector construction module inputs the enhanced feature tensor into a bidirectional long short-term memory network to extract bidirectional long-term dependency features from the time series signal and construct a spatiotemporal integrated feature vector. The fault type diagnosis module is used to input the spatiotemporal integrated feature vector into the preset fully connected layer and Softmax classifier, and output the fault type of the motor bearing.
[0097] The present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements a method for intelligent diagnosis of motor bearing faults based on multi-scale CNN as described above.
[0098] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0099] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for intelligent diagnosis of motor bearing faults based on multi-scale CNN, characterized in that, Includes the following steps: S1. Collect the original vibration signal of the motor bearing and preprocess it to remove DC components, power frequency interference filtering and outliers; S2. Based on wavelet packet transform, multi-level wavelet packet decomposition, adaptive thresholding and wavelet packet reconstruction are performed on the preprocessed vibration signal to generate a time-frequency feature tensor containing multi-subband information. Construct a fault diagnosis model, including a multi-scale convolutional neural network, a multi-dimensional attention module, a bidirectional long short-term memory network, and a fully connected layer and a Softmax classifier; S3. Input the time-frequency feature tensor into a preset multi-scale convolutional neural network, extract spatial features of different scales through multiple parallel convolutional branches, and fuse the spatial features of different scales to obtain the fused spatial feature tensor. S4. Input the fused spatial feature tensor into the multidimensional attention module, and obtain the attention-weighted enhanced feature tensor through spatial attention mechanism, spectral attention mechanism and cross attention mechanism; S5. Input the enhanced feature tensor into a bidirectional long short-term memory network to extract the bidirectional long-term dependency features in the time series signal and construct a spatiotemporal integrated feature vector. S6. Input the spatiotemporal integrated feature vector into the fully connected layer and the Softmax classifier to output the fault type of the motor bearing.
2. The intelligent diagnosis method for motor bearing faults based on multi-scale CNN according to claim 1, characterized in that, In step S2, the preprocessed vibration signal is subjected to multi-level wavelet packet decomposition, adaptive thresholding, and wavelet packet reconstruction based on wavelet packet transform. Specifically, this includes: The preprocessed vibration signal was decomposed into three-level wavelet packets using Daubechies-4 wavelets to obtain multiple sub-band coefficients. An improved soft thresholding method was used to quantize the sub-band coefficients, with the threshold adaptively determined by Stein unbiased risk estimation. A kurtosis criterion was introduced: if the kurtosis of a sub-band coefficient is greater than the adaptive threshold, the thresholding of that sub-band is skipped, and the sub-band coefficient is directly retained. Wavelet packet reconstruction is performed on the coefficients after adaptive thresholding to obtain the denoised vibration signal; the sub-band coefficients obtained by wavelet packet decomposition are stacked in sub-band order to construct a multi-channel time-frequency feature tensor.
3. The intelligent diagnosis method for motor bearing faults based on multi-scale CNN according to claim 1, characterized in that, S2 also includes the training of the fault diagnosis model: Focal Loss is used as the loss function, the AdamW optimizer is used to optimize the model parameters, and an early stopping strategy is employed: training stops when the validation set loss does not decrease for 10 consecutive epochs. The loss function formula is as follows: in, For real labels, To focus parameters, For predicting probabilities, B is the batch size, which is the total number of samples input to the model in a single training session, b is the sample index, representing the b-th sample in the current batch, and c is the fault category index, representing the c-th category among the 6 fault types.
4. The intelligent diagnosis method for motor bearing faults based on multi-scale CNN according to claim 1, characterized in that, In S3, the multi-scale convolutional neural network includes three convolutional branches with kernel sizes of 3×1, 5×1, and 7×1, respectively, corresponding to the extraction of fine-grained, medium-grained, and coarse-grained spatial features. Each convolutional branch is followed by a batch normalization layer, a ReLU activation layer, a Dropout layer, and a max pooling layer. The outputs of the three branches are concatenated along the channel dimension and then subjected to 1×1 convolution to achieve cross-channel information interaction and dimensionality compression. After adaptive average pooling, a unified dimensional fusion feature tensor is obtained.
5. The intelligent diagnosis method for motor bearing faults based on multi-scale CNN according to claim 1, characterized in that, In S4, the multidimensional attention module includes: Spatial attention mechanism: Average pooling is performed on the input feature tensor along the time dimension to generate channel attention weights, and the feature channels are weighted according to their importance; Spectral attention mechanism: Average pooling is performed on the weighted features along the spatial dimension to generate temporal attention weights, which focus on key fault regions; Cross-attention mechanism: Employs a multi-head self-attention structure to perform deep spatiotemporal fusion on spatially and spectrally weighted features, and outputs an enhanced feature tensor.
6. The intelligent diagnosis method for motor bearing faults based on multi-scale CNN according to claim 1, characterized in that, In S5, the bidirectional long short-term memory network adopts a two-layer structure with a hidden layer dimension of 64. It captures the accumulation process of fault features through forward LSTM and captures the periodic recurrence pattern of fault features through backward LSTM. The bidirectional hidden states of the last time step are extracted, concatenated, and then processed by layer normalization to obtain the spatiotemporal integrated feature vector.
7. A multi-scale CNN-based intelligent fault diagnosis system for motor bearings, applied to the execution of the multi-scale CNN-based intelligent fault diagnosis method for motor bearings as described in any one of claims 1-6, characterized in that, include: The data acquisition and preprocessing module is used to acquire the original vibration signal of the motor bearing and perform preprocessing to remove DC components, power frequency interference filtering, and outliers. The diagnostic model construction module is used to perform multi-layer wavelet packet decomposition, adaptive thresholding and wavelet packet reconstruction on the preprocessed vibration signal based on wavelet packet transform, and generate a time-frequency feature tensor containing multi-subband information. Construct a fault diagnosis model, including a multi-scale convolutional neural network, a multi-dimensional attention module, a bidirectional long short-term memory network, and a fully connected layer and a Softmax classifier; The feature extraction and fusion module inputs the time-frequency feature tensor into a preset multi-scale convolutional neural network, extracts spatial features at different scales through multiple parallel convolutional branches, and fuses the spatial features at different scales to obtain the fused spatial feature tensor. The attention weighting module is used to input the fused spatial feature tensor into the multi-dimensional attention module, and obtain the attention-weighted enhanced feature tensor through spatial attention mechanism, spectral attention mechanism and cross attention mechanism; The spatiotemporal integrated feature vector construction module inputs the enhanced feature tensor into a bidirectional long short-term memory network to extract bidirectional long-term dependency features from the time series signal and construct a spatiotemporal integrated feature vector. The fault type diagnosis module is used to input the spatiotemporal integrated feature vector into the preset fully connected layer and Softmax classifier, and output the fault type of the motor bearing.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the intelligent diagnosis method for motor bearing faults based on multi-scale CNN as described in any one of claims 1-6.