Electric spindle fault diagnosis method and system based on multi-scale dynamic convolution

By combining multi-scale dynamic convolution and the AMSoftmax module, the problem of feature indistinguishability in the composite fault diagnosis of electric spindles is solved, and high-precision fault mode recognition and diagnosis are achieved.

CN120929816AInactive Publication Date: 2025-11-11JILIN UNIVERSITY

Patent Information

Application Number
CN202511454361.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-13
Publication Date
2025-11-11
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing technologies struggle to achieve high-precision diagnosis of complex faults, especially in complex systems like electric spindles, where the characteristics of complex faults are intricate and difficult to distinguish, resulting in low fault diagnosis accuracy.

Method used

A multi-scale dynamic convolution method is adopted. Multi-channel signals are collected by vibration sensors, and a multi-scale dynamic convolution module is constructed to extract local and global features in parallel. The AMSoftmax module is combined to increase the decision boundary between fault categories. The combined loss function and Bayesian optimization are used to adjust the hyperparameters and output the composite fault classification results.

Benefits of technology

It significantly improves the accuracy and adaptability of composite fault diagnosis for electric spindles, alleviates the classification confusion problem in similar scenarios between classes, and achieves more efficient fault mode recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120929816A_ABST
    Figure CN120929816A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of fault diagnosis, and particularly discloses an electric spindle fault diagnosis method and system based on multi-scale dynamic convolution, and the method comprises the steps: collecting a multi-channel vibration signal of an electric spindle through a vibration sensor, carrying out the preprocessing, and segmenting the multi-channel vibration signal into equal-length samples through a sliding time window; constructing a multi-scale dynamic convolution module, extracting local and global features of an input sample through a parallel multi-branch structure, and dynamically aggregating convolution kernel weights of different scales based on an attention mechanism; the extracted local and global features are input into an AMSoftmax module, and decision boundaries between fault categories are increased through angle interval constraint; and training a diagnosis model by adopting a combined loss function, adjusting hyper-parameters in combination with Bayesian optimization, and outputting a composite fault classification result. Local and global features contained in a vibration signal are captured through parallel convolution kernels of different scales, an expert mechanism is introduced to realize adaptive selection of convolution kernel parameters, and the adaptability of a model to composite fault mode changes is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of fault diagnosis technology, specifically to a fault diagnosis method and system for electric spindles based on multi-scale dynamic convolution. Background Technology

[0002] The electric spindle, as the "heart" of a CNC machine tool, is a core component for achieving high-speed precision machining. Its performance directly determines the machining accuracy, efficiency, and surface quality of the machine tool. Faults such as bearing failure or motor overheating can lead to machine downtime, scrapped machining, and even safety hazards. Fault diagnosis is a core component of Fault Prediction and Health Management (PHM). By capturing operational data in real time through signal monitoring technology and combining it with statistical signal processing and machine learning signal processing techniques, the root cause of the fault can be accurately located, preventing the fault from escalating. This can not only reduce equipment downtime by over 40%, but also optimize maintenance strategies, reduce maintenance costs, and extend equipment lifespan. Simultaneously, fault diagnosis data can also support fault prediction and health management, forming a closed loop of "monitoring-diagnosis-maintenance," contributing to the efficient and stable operation of precision machining.

[0003] Existing methods are mostly limited to single-fault diagnosis scenarios (bearing inner / outer ring faults, tool wear, etc.). As the most structurally complex system in high-end CNC machine tools, electric spindles endure complex thermo-mechanical coupling loads during operation, making them significantly more prone to compound faults than single faults. Since compound faults are formed by the coupling and superposition of multiple single faults, the characteristics of the acquired monitoring signals are more complex and difficult to distinguish. Therefore, achieving high-precision compound fault diagnosis has become one of the key challenges in improving the reliability of electric spindles. Summary of the Invention

[0004] The purpose of this invention is to provide a method and system for diagnosing electric spindle faults based on multi-scale dynamic convolution, so as to solve the problems mentioned in the background art.

[0005] To achieve the above objectives, the present invention provides the following technical solution: a method for diagnosing electrical spindle faults based on multi-scale dynamic convolution, the method comprising: Multi-channel vibration signals of the electric spindle are collected by vibration sensors to generate a multi-channel vibration signal dataset. The multi-channel vibration signal dataset is preprocessed and divided into equal-length samples by a sliding time window. A multi-scale dynamic convolution module is constructed to extract local and global features of input samples through a parallel multi-branch structure, and to dynamically aggregate convolution kernel weights of different scales based on an attention mechanism. The extracted local and global features are input into the AMSoftmax module, and the decision boundary between fault categories is increased by angular interval constraints. The diagnostic model is trained using a combined loss function, and the hyperparameters are adjusted by Bayesian optimization to output the composite fault classification results.

[0006] As a further embodiment of the present invention, the preprocessing step of the multi-channel vibration signal dataset specifically includes: Denoising in the time and frequency domain is performed by wavelet packet decomposition and reconstruction combined with Z-score threshold detection. Based on Min-Max normalization, all channel data is mapped to a standard space.

[0007] As a further embodiment of the present invention, the sampling frequency of the multi-channel vibration signal of the electric spindle is greater than or equal to 10kHz.

[0008] As a further embodiment of the present invention, the combined loss function includes a cross-entropy loss function and a focus loss function.

[0009] As a further aspect of the present invention, the training process of the diagnostic model employs an adaptive moment estimation optimization method to improve the model's convergence speed and generalization ability.

[0010] As a further aspect of the present invention, the training process of the diagnostic model incorporates a dynamic learning rate decay mechanism and an early stopping strategy to improve the training convergence speed.

[0011] This invention also provides an electric spindle fault diagnosis system based on multi-scale dynamic convolution, used to implement an electric spindle fault diagnosis method based on multi-scale dynamic convolution, the system comprising: The data acquisition module is used to collect multi-channel vibration signals of the electric spindle through vibration sensors, generate a multi-channel vibration signal dataset, preprocess the multi-channel vibration signal dataset, and divide it into equal-length samples through a sliding time window; The multi-scale dynamic convolution module is used to construct a multi-scale dynamic convolution module. It extracts local and global features of input samples through a parallel multi-branch structure and dynamically aggregates convolution kernel weights of different scales based on an attention mechanism. The AMSoftmax module is used to input the extracted local and global features into the AMSoftmax module, and increase the decision boundary between fault categories through angular interval constraints; The model evaluation module is used to train the diagnostic model using a combined loss function, adjust the hyperparameters using Bayesian optimization, and output the composite fault classification results.

[0012] Compared with existing technologies, the advantages of this invention are: by capturing local and global features contained in vibration signals through parallel convolutional kernels of different scales, and introducing an expert mechanism to adaptively select convolutional kernel parameters based on sample features, the model's adaptability to changes in complex fault modes is enhanced. Secondly, the introduction of the AMSoftmax loss function, by adding angular interval constraints, increases the decision boundary between fault categories, effectively alleviating the classification confusion problem of the traditional cross-entropy loss function in scenarios with similar inter-class characteristics. Attached Figure Description

[0013] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention.

[0014] Figure 1 This is an architecture diagram of an electric spindle fault diagnosis method based on multi-scale dynamic convolution provided in an embodiment of the present invention.

[0015] Figure 2 This is a schematic diagram of dynamic convolution provided in an embodiment of the present invention.

[0016] Figure 3 This is a schematic diagram of the decision boundary generated by Softmax and AMsoftmax, provided for embodiments of the present invention. Detailed Implementation

[0017] To make the technical problems to be solved, the technical solutions, and the beneficial effects of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present invention and are not intended to limit the present invention.

[0018] Currently, researchers have conducted some studies on complex faults and have made preliminary progress in solving this problem. However, issues such as insufficient feature representation and low prediction accuracy still exist. Specifically, existing studies only mine fault features from input data using a single model, making it difficult to consider multi-scale fault information under different receptive fields. Furthermore, treating each fault feature equally and assigning it the same weight will fail to suppress the interference of invalid features; the traditional Softmax function can only achieve the mapping from fault features to fault category labels, making it difficult to increase inter-class differences while reducing intra-class distances, thus affecting fault classification accuracy.

[0019] like Figure 1 As shown in the embodiment of the present invention, an electric spindle fault diagnosis method based on multi-scale dynamic convolution is provided, the method comprising: Multi-channel vibration signals of the electric spindle are collected by vibration sensors to generate a multi-channel vibration signal dataset. The multi-channel vibration signal dataset is preprocessed and divided into equal-length samples by a sliding time window. A multi-scale dynamic convolution module is constructed to extract local and global features of input samples through a parallel multi-branch structure, and to dynamically aggregate convolution kernel weights of different scales based on an attention mechanism. The extracted local and global features are input into the AMSoftmax module, and the decision boundary between fault categories is increased by angular interval constraints. The diagnostic model is trained using a combined loss function, and the hyperparameters are adjusted by Bayesian optimization to output the composite fault classification results.

[0020] In this embodiment, firstly, composite fault signals of the electric spindle are acquired using an accelerometer, followed by normalization and window sliding processing, and then the training and test sets are divided according to a certain ratio. Next, a multi-scale dynamic convolution module is used to mine multi-scale fault features from the input data. Dynamic convolution is introduced to adaptively select convolution kernel parameters using sample features, improving the feature extraction performance of the convolutional network. To increase the gap between categories, an AMSoftmax module is constructed to enhance the fault boundaries of each category using the distance between categories, improving fault separability. Finally, the trained model is used to classify composite faults on the test set and evaluate the model performance.

[0021] In a preferred embodiment of the present invention, the preprocessing step for the multi-channel vibration signal dataset specifically includes: Denoising in the time and frequency domain is performed by wavelet packet decomposition and reconstruction combined with Z-score threshold detection. Based on Min-Max normalization, all channel data is mapped to a standard space.

[0022] In this embodiment, vibration sensors are deployed on the end face of the electric spindle to collect vibration signals under various conditions, including healthy state, inner ring fault-rolling element fault, inner ring fault-outer ring fault, rolling element fault-outer ring fault, rotor imbalance fault-rolling element fault, rotor imbalance fault-inner ring fault, and rotor imbalance fault-outer ring fault. Composite fault tests under various operating conditions are conducted, and these signals serve as the model's dataset. To ensure synchronous acquisition and efficient processing of multi-channel vibration signals, the system employs a sampling frequency of ≥10kHz, coupled with a unified timestamp mechanism to achieve microsecond-level synchronization alignment. Noise and random pulse interference in the original signal are addressed through wavelet packet decomposition and reconstruction, followed by Z-score threshold detection for time-frequency domain denoising. To eliminate feature extraction bias caused by differences in data volume between different sensors, Min-Max normalization is used to map all channel data to the [0,1] standard space. Finally, a sliding time window technique is employed to segment the continuous signal into equal-length segments, ensuring the integrity and continuity of the temporal features. This integrated processing scheme significantly improves the signal-to-noise ratio and feature stability of the input data, providing a high-quality data foundation for subsequent deep learning models to accurately identify complex fault modes.

[0023] To simultaneously capture both local and global fault features and better mine classification features that reflect complex fault information, a parallel dual-branch structure was adopted. Different dynamic convolutions were used to mine detailed and global features, and a convolutional attention mechanism was used to filter each feature. The dynamic convolution structure is as follows: Figure 2 As shown, compared to traditional convolution, dynamic convolution introduces an attention mechanism and the stacking of convolution kernels. The attention mechanism dynamically adjusts the weight π(i) of each convolution kernel according to the input features, and then generates an adaptive dynamic convolution by dynamically aggregating K parallel convolution kernels. Since the attention mechanism is a non-linear function of the previous output feature, the dynamic convolution is no longer a linear function, and the stacked convolution kernels have a stronger feature representation ability.

[0024] The relevant calculation formula is: ; ; in, For the sample convolution kernel parameters, and These are the attention weights and parameter values ​​of the k-th convolutional kernel. These are the original weights corresponding to the kth convolutional kernel output by the attention network; These are the original weights corresponding to the j-th convolutional kernel output by the attention network; It is a temperature parameter used to adjust the distribution of attention weights.

[0025] The "convolutional attention mechanism" is described as follows: Convolutional Attention Module (CBAM) is a lightweight feature enhancement mechanism that achieves adaptive feature selection by concatenating channel attention and spatial attention. First, channel attention weights are generated based on the input feature map. Global average pooling and fully connected layers are used to build dependencies between channels, assigning higher weights to important feature channels. Then, a spatial weight map is generated through spatial attention, and convolutional layers capture the importance distribution at different locations in the feature map. Finally, the two attention weights are multiplied element-wise with the original feature map to achieve noise suppression and key feature enhancement, effectively improving the model's ability to express fault features under complex conditions. The specific calculation is as follows.

[0026] ; ; in, Indicates input features, AvgPool This indicates the average pooling operation. MaxPool This indicates a max pooling operation. These are features resulting from average pooling. These are the features after max pooling. M c ( F ) is the output feature after processing by the channel attention module, " " represents the product of matrices, W 0 and W 1∈ R ( X )for MLP The weight parameters, σ, are the Sigmoid activation function. k Indicates the kernel size. M s ( F ) is the output feature after processing by the spatial attention module. These are features resulting from average pooling. These are the features after max pooling.

[0027] To alleviate the classification confusion problem of traditional cross-entropy loss function in scenarios with similar inter-classes, the proposed method introduces AM-Softmax loss function. This function increases the decision boundary between fault categories by adding angular interval constraints, while simultaneously reducing the intra-class distance. Assuming that the features are two-dimensional and that the magnitude of both the weight vector and the input feature vector is 1, the decision boundaries of Softmax and AM-Softmax are plotted as follows: Figure 3 As shown, it is obvious that the marginal region corresponding to AM-Softmax has stronger discriminative power.

[0028] The “AMSoftmax” is described as follows: AMSoftmax is an improved classification loss function based on angular margin. It optimizes inter-class separation and intra-class compactness in the feature space by introducing a cosine margin constraint into the traditional Softmax loss. Its core idea is to transform the dot product of feature vectors and weight vectors into a cosine similarity calculation, and add a fixed angular margin, forcing the model to learn more discriminative feature representations. Specifically, AMSoftmax maximizes the cosine similarity of intra-class samples while forcing the cosine similarity between samples from different classes to be below a preset threshold, thus forming a clearer decision boundary in the hyperspherical space. Compared to traditional cross-entropy loss, this function effectively alleviates the classification confusion caused by inter-class feature similarity, especially in the scenario of electric spindle composite fault diagnosis, significantly improving the ability to distinguish fine-grained fault modes and providing a more stable optimization direction for multi-class fault classification. Its calculation formula is as follows: ; ; in, x i For the first i Input features, labeled as y i ( j ∈[1, K ], K (Number of categories) It is the th weight of the fully connected layer weight matrix W. y i List, It is a vector W j with vector x i The angle between them. k It is between 0 and m Integers between -1 and 1.

[0029] In a preferred embodiment of the present invention, the combined loss function includes a cross-entropy loss function and a focus loss function.

[0030] As a preferred embodiment of the present invention, the training process of the diagnostic model employs an adaptive moment estimation optimization method to improve the convergence speed and generalization ability of the model.

[0031] As a preferred embodiment of the present invention, the training process of the diagnostic model introduces a dynamic learning rate decay mechanism and an early stopping strategy to improve the training convergence speed.

[0032] In this embodiment, the model training employs electric spindle vibration signals under various states, including healthy, inner race fault-rolling element fault, inner race fault-outer race fault, rolling element fault-outer race fault, rotor imbalance fault-rolling element fault, rotor imbalance fault-inner race fault, and rotor imbalance fault & outer race fault. Regarding the loss function design, this invention combines cross-entropy loss (MSE) and focal loss to enhance the model's sensitivity to complex fault monitoring data. During training, key hyperparameters (including convolutional layer parameters, fully connected layer parameters, and dropout ratio) are automatically adjusted using Bayesian optimization methods to improve training efficiency and final performance. During model training, Adaptive Moment Estimation (Adam) optimization is used to improve the model's convergence speed and generalization ability. Simultaneously, the system introduces a dynamic learning rate decay mechanism and an early stopping strategy to improve training convergence speed and prevent overfitting. These parameter optimizations and model training mechanisms significantly enhance the diagnostic model's ability to diagnose complex faults.

[0033] This invention also provides an electric spindle fault diagnosis system based on multi-scale dynamic convolution, used to implement an electric spindle fault diagnosis method based on multi-scale dynamic convolution, characterized in that the system includes: The data acquisition module is used to collect multi-channel vibration signals of the electric spindle through vibration sensors, generate a multi-channel vibration signal dataset, preprocess the multi-channel vibration signal dataset, and divide it into equal-length samples through a sliding time window; The multi-scale dynamic convolution module is used to construct a multi-scale dynamic convolution module. It extracts local and global features of input samples through a parallel multi-branch structure and dynamically aggregates convolution kernel weights of different scales based on an attention mechanism. The AMSoftmax module is used to input the extracted local and global features into the AMSoftmax module, and increase the decision boundary between fault categories through angular interval constraints; The model evaluation module is used to train the diagnostic model using a combined loss function, adjust the hyperparameters using Bayesian optimization, and output the composite fault classification results.

[0034] The model evaluation module is built using standard fully connected layers, with the output of a multi-scale dynamic convolution module as its input. It outputs the predicted category of the electric spindle composite fault. The fault classification output is then compared with the fault sample labels to calculate the error.

[0035] The training and prediction process of the composite fault diagnosis model based on the PyTorch framework is as follows: First, read the dataset file in CSV format and divide it into training and test sets according to the proportions; then, construct a diagnostic model based on multi-scale dynamic convolution and AMSoftmax, use the training set for iterative parameter training, verify the model performance in real time through the test set, and dynamically adjust hyperparameters such as batch size, learning rate, and training epochs; after the model performance meets the standards, save the optimal weight file and deploy it to the industrial control computer.

[0036] The host computer system, developed based on the Qt or C# platform, is responsible for completing the entire process of data interaction and diagnostic decision-making: it reads the sensor vibration signal in real time through NI CompactDAQ, saves it in CSV format after preprocessing such as noise reduction; it calls the deployed optimal model to perform fault diagnosis on the preprocessed data, and displays the original sensor data and diagnostic results synchronously in the graphical interface; the system has a built-in logic judgment module that automatically prompts whether the equipment needs maintenance based on the diagnostic results, realizing closed-loop management from data acquisition to fault early warning.

[0037] The embodiments of the present invention realize online real-time fault diagnosis. When the system fails, an early warning can be automatically triggered to inform the operator of the precise system maintenance time, avoiding the waste of resources and processing risks caused by premature or late maintenance.

[0038] The fault diagnosis output module is built using a standard fully connected layer, with the output of the multi-scale feature extraction module as its input. It outputs the predicted category of the electric spindle composite fault. Error calculation is performed between the fault classification output and the fault sample labels.

[0039] The model simultaneously captures local and global features of vibration signals through a parallel multi-scale dynamic convolution module; enhances the model's feature mining capabilities by introducing dynamic convolution; and increases the decision boundary between fault categories by utilizing AMSoftmax angular interval constraints, effectively alleviating the classification confusion problem of traditional models in scenarios with inter-class similarity.

[0040] By constructing a multi-scale dynamic convolution module to extract local and global features in parallel, and combining it with an expert mechanism to achieve dynamic combination of convolution kernel parameters, the model can adaptively match the feature distribution changes under different composite fault modes of the electric spindle.

[0041] By integrating a convolutional attention mechanism into the multi-scale feature extraction module, the model can automatically suppress invalid features corresponding to background noise in vibration signals through dual filtering of channel attention and spatial attention, while enhancing the expression intensity of key fault features.

[0042] An AMSoftmax loss function is employed to introduce angular margin constraints, which forcibly expand the decision boundaries between different fault categories in the hyperspherical space, making the feature distribution more discriminative. Compared to the traditional cross-entropy loss function, this method achieves better classification results in complex fault scenarios with high inter-class similarity.

[0043] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for diagnosing electrical spindle faults based on multi-scale dynamic convolution, characterized in that, The method includes: Multi-channel vibration signals of the electric spindle are collected by vibration sensors to generate a multi-channel vibration signal dataset. The multi-channel vibration signal dataset is preprocessed and divided into equal-length samples by a sliding time window. A multi-scale dynamic convolution module is constructed to extract local and global features of input samples through a parallel multi-branch structure, and to dynamically aggregate convolution kernel weights of different scales based on an attention mechanism. The extracted local and global features are input into the AMSoftmax module, and the decision boundary between fault categories is increased by angular interval constraints. The diagnostic model is trained using a combined loss function, and the hyperparameters are adjusted by Bayesian optimization to output the composite fault classification results.

2. The method for diagnosing electric spindle faults based on multi-scale dynamic convolution according to claim 1, characterized in that, The preprocessing steps for the multi-channel vibration signal dataset specifically include: Denoising in the time and frequency domain is performed by wavelet packet decomposition and reconstruction combined with Z-score threshold detection. Based on Min-Max normalization, all channel data is mapped to a standard space.

3. The method for diagnosing electric spindle faults based on multi-scale dynamic convolution according to claim 1 or 2, characterized in that, The sampling frequency of the multi-channel vibration signal of the electric spindle is greater than or equal to 10kHz.

4. The method for diagnosing electric spindle faults based on multi-scale dynamic convolution according to claim 1, characterized in that, The combined loss function includes the cross-entropy loss function and the focus loss function.

5. The method for diagnosing electric spindle faults based on multi-scale dynamic convolution according to claim 1, characterized in that, The training process of the diagnostic model employs an adaptive moment estimation optimization method to improve the model's convergence speed and generalization ability.

6. The method for diagnosing electric spindle faults based on multi-scale dynamic convolution according to claim 1, characterized in that, In the training process of the diagnostic model, a dynamic learning rate decay mechanism and an early stopping strategy are introduced to improve the training convergence speed.

7. A fault diagnosis system for electric spindles based on multi-scale dynamic convolution, used to implement the fault diagnosis method for electric spindles based on multi-scale dynamic convolution as described in any one of claims 1-6, characterized in that, The system includes: The data acquisition module is used to collect multi-channel vibration signals of the electric spindle through vibration sensors, generate a multi-channel vibration signal dataset, preprocess the multi-channel vibration signal dataset, and divide it into equal-length samples through a sliding time window; The multi-scale dynamic convolution module is used to construct a multi-scale dynamic convolution module. It extracts local and global features of input samples through a parallel multi-branch structure and dynamically aggregates convolution kernel weights of different scales based on an attention mechanism. The AMSoftmax module is used to input the extracted local and global features into the AMSoftmax module, and increase the decision boundary between fault categories through angular interval constraints; The model evaluation module is used to train the diagnostic model using a combined loss function, adjust the hyperparameters using Bayesian optimization, and output the composite fault classification results.

Citation Information

Patent Citations

  • Vehicle model identification method based on convolutional neural network

    CN110598801A

  • Rolling bearing fault diagnosis method based on scale adaptive measurement

    CN116089863A

  • Gearbox fault diagnosis method based on multi-scale dynamic convolutional neural network

    CN118706436A

  • Unmanned platform electromechanical system fault early warning method based on Transform-BiGRU cross attention mechanism

    CN120255483A

  • Motor speed abnormity fault diagnosis method based on simulation data and CNN-GAP-CBAM model

    CN120448918A

Cited By

  • All-electric energy station operation energy efficiency evaluation method and system based on quantity-quality cooperation

    CN121119845A

  • Method and system for evaluating operation energy efficiency of all-electric energy station based on quantity-quality synergy

    CN121119845B