Channel-space perception machine tool cutter unsupervised anomaly detection method fused with convolutional auto-encoder
By using a channel-space-aware fusion convolutional autoencoder, combined with depth-separable convolution and CBAM attention mechanism, the accuracy and efficiency issues of machine tool anomaly detection in noisy environments are solved, achieving efficient and accurate unsupervised anomaly identification, suitable for real-time monitoring in industrial sites.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-05
- Publication Date
- 2026-03-27
AI Technical Summary
Existing methods for detecting machine tool anomalies have low accuracy and high false negative rates in noisy environments, and their computational efficiency is low, failing to meet the lightweight computing requirements in industrial settings.
A channel-space-aware fusion convolutional autoencoder is adopted, which combines depthwise separable convolution and CBAM attention mechanism. Through preprocessing of vibration signal data and model training, unsupervised anomaly detection is performed using a fusion loss function.
It improves the accuracy and efficiency of machine tool anomaly detection, has noise resistance, is suitable for lightweight computing, real-time monitoring and edge deployment, and is particularly suitable for machine tool condition monitoring scenarios with high reliability requirements.
Smart Images

Figure CN121733336A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine tool anomaly detection technology, and is an unsupervised anomaly detection method for machine tool using a channel-space sensing fusion convolutional autoencoder. Background Technology
[0002] Machine tool cutting tools are a fundamental component of manufacturing, widely used in various processes such as milling and drilling. In the era of Industry 4.0, machine tools are evolving towards intelligence, automation, high precision, multi-functionality, and high reliability. However, machine tools may exhibit unpredictable anomalies, which, if not detected in time, can lead to production stoppages and, in severe cases, personnel injuries. Therefore, real-time anomaly detection of machine tools is crucial for reliable production. Traditional machine tool inspection typically relies on manual inspection and data-driven feature extraction methods. These methods suffer from high costs, low efficiency, and insufficient reliability. In particular, data-driven feature extraction methods struggle to overcome the effects of noise in noisy environments, resulting in low detection accuracy and a high rate of missed detections. Therefore, there is an urgent need for an intelligent, automated detection method to improve the efficiency and accuracy of machine tool anomaly detection.
[0003] In recent years, deep learning-based intelligent methods have been widely studied in the field of machine tool anomaly detection and condition monitoring due to their adaptive feature mining capabilities and end-to-end convenience. Currently, unsupervised anomaly detection methods based on deep learning include convolutional autoencoders, a class of support vector machines, and generative adversarial networks (GANs). However, these deep learning-based methods all have shortcomings, which limit their application in industrial scenarios. Convolutional autoencoders are weak against noise. A class of support vector machines has significant shortcomings in computational efficiency and is also sensitive to noise. Generative adversarial networks suffer from training instability and have complex anomaly scoring mechanisms. In general, these methods lack sufficient noise resistance, cannot adapt to the noisy environment of industrial scenarios, and cannot meet the requirements of lightweight computing. Therefore, this invention proposes a channel-space awareness fusion convolutional autoencoder-based unsupervised anomaly detection method for machine tools that excels in both lightweight computing and noise resistance. Summary of the Invention
[0004] This invention discloses an unsupervised anomaly detection method for machine tool cutting tools using a channel-space-aware fusion convolutional autoencoder. This invention has the advantages of high efficiency, accuracy, and noise resistance.
[0005] This invention provides the following technical solutions: An unsupervised anomaly detection method for machine tool cutting tools using a channel-space-aware fusion convolutional autoencoder, the method comprising the following steps: Step 1: Acquire vibration signal data of the machine tool cutting tool; Step 2: Preprocess the vibration signal data; Step 3: Construct a channel-spatial-aware fusion convolutional autoencoder model; Step 4: Input the preprocessed vibration signal data into the channel-spatial perception fusion convolutional autoencoder model, train, validate and test the model to obtain the reconstructed output data; Step 5: Determine the fusion loss function value based on the reconstructed output data and input data, and measure the amplitude error and waveform structure differences; Step 6: Compare the fusion loss function value with the preset threshold to determine if there is any anomaly, and output the anomaly detection result of the machine tool.
[0006] Preferably, in step 1, the vibration signal of the machine tool tool is obtained by wireless transmission through a wireless vibration sensor. Specifically, the signal data is the acceleration signal data of the machine tool tool in the X, Y, and Z directions during operation by the wireless vibration sensor.
[0007] Preferably, step 2 specifically comprises: The acquired vibration data is normalized. Perform a Fast Fourier Transform on the normalized data.
[0008] Preferably, the channel-spatial-aware fusion convolutional autoencoder model includes: an encoder, an attention bottleneck layer, and a decoder; The core of the attention bottleneck layer is the CBAM module, which strengthens the connection between the encoder and decoder through the synergistic effect of channel attention and spatial attention, dynamically enhances key features related to faults, and suppresses redundant information from environmental noise. Depthwise separable convolutions are used in the encoder and decoder to achieve lightweight computation while ensuring feature extraction performance. Standard convolutions are used in the attention bottleneck layer to prevent the loss of the most compressed low-dimensional features in the attention bottleneck layer and to preserve and reconstruct key features. The encoder consists of multiple residual blocks connected in sequence. Each residual block adopts a depthwise separable convolutional structure, including a depthwise convolutional layer, an instance normalization layer, a LeakyReLU activation function, a pointwise convolutional layer, a batch normalization layer, and a LeakyReLU activation function. The residual block also has a shortcut connection, which adjusts the channel dimension through 1×1 convolution when the number of input and output channels is inconsistent; Depthwise separable convolutional structures decompose standard convolution into depthwise convolution and pointwise convolution, improving computational lightweightness and reducing model parameters while maintaining feature extraction capabilities.
[0009] Preferably, the CBAM attention module is connected sequentially through a channel attention submodule and a spatial attention submodule; The channel attention submodule learns the importance of each channel through average pooling and two one-dimensional convolutional layers, and uses the sigmoid function to generate the channel weights. The specific calculation process is as follows:
[0010]
[0011]
[0012] in, This represents the result of average pooling of the input channel. and Both refer to multilayer perceptrons. Represents the ReLU activation function. This represents the Sigmoid function. This represents the channel attention weights obtained after perceptual learning of the channels. This represents the weighted output feature value after passing through the channel attention submodule; The spatial attention submodule uses the concatenation results of average pooling and max pooling channel dimensions, and generates spatial weights using a one-dimensional convolution with a kernel of 3 and the sigmoid function. This enhances the model's ability to perceive regions containing key information in vibration signals. The specific calculation process is as follows:
[0013]
[0014] in, Indicates average pooling. Indicates global max pooling. This represents the output feature map obtained after concatenating along the channel dimension. This represents the spatial attention weights obtained after perceptual learning. This indicates the use of a one-dimensional convolution operation with a kernel of 3. This represents the feature value after being weighted by the spatial attention submodule.
[0015] Preferably, the decoder includes multiple residual blocks, and the output is limited to the range [0,1] by the Sigmoid activation function to ensure that the reconstructed signal has the same numerical range as the input signal.
[0016] Preferably, the fusion loss function is expressed by the following formula:
[0017]
[0018]
[0019] in, Indicates the mean square error loss. Indicates the cosine similarity loss; Indicates the weighting coefficient; This represents the i-th original input sample. This represents the i-th reconstructed output sample.
[0020] An unsupervised anomaly detection system for machine tool cutting tools based on a channel-space-aware fusion convolutional autoencoder, the system comprising: The data acquisition module acquires vibration signal data of the machine tool cutting tool; The preprocessing module preprocesses the vibration signal data. A model building module that builds a channel-spatial-aware fusion convolutional autoencoder model; The training module inputs the preprocessed vibration signal data into the channel-spatial perception fusion convolutional autoencoder model, trains, validates, and tests the model, and obtains the reconstructed output data. The fusion module determines the fusion loss function value based on the reconstructed output data and input data, and measures the amplitude error and waveform structure difference; The detection module compares the fusion loss function value with a preset threshold to determine whether there is an anomaly and outputs the anomaly detection result of the machine tool.
[0021] A computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement an unsupervised anomaly detection method for machine tool tools using a channel-space-aware fusion convolutional autoencoder.
[0022] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement an unsupervised anomaly detection method for machine tool cutting tools using a channel-space-aware fusion convolutional autoencoder.
[0023] The present invention has the following beneficial effects: This invention significantly improves the performance of machine tool vibration signal anomaly detection by introducing depthwise separable convolution and an attention mechanism. The model employs a lightweight depthwise separable convolution structure, which greatly reduces the number of parameters and computational complexity while maintaining feature extraction capabilities, making it suitable for real-time monitoring and edge deployment. The embedded CBAM dual attention mechanism enhances the model's perception and reconstruction quality of key features, effectively identifying weak anomalies. By fusing mean squared error and cosine similarity loss functions, it maintains superior robustness and accuracy even in noisy environments. This model requires only normal samples for training to achieve unsupervised anomaly recognition. Its reasonable structure, stable training, and good engineering applicability and promotional value make it particularly suitable for machine tool condition monitoring scenarios with high reliability requirements. Attached Figure Description
[0024] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0025] Figure 1 The flowchart shown is a method for unsupervised anomaly detection of machine tool cutting tools using a channel-space-aware fusion convolutional autoencoder according to the present invention. Figure 2 The diagram shows the structure of the channel-space-aware fusion convolutional autoencoder model of the present invention. Figure 3 This is a comparison chart showing the reconstructed signal output by the model and the original signal. Figure 4 This is displayed as a visual comparison chart of the threshold and reconstruction error; Figure 5 The diagram shows the confusion matrix of the anomaly detection results; Figure 6 The chart shows a comparison of ROC curves for anomaly detection results. Detailed Implementation
[0026] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. 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.
[0027] The present invention will be described in detail below with reference to specific embodiments. Specific Implementation Example 1: according to Figures 1 to 6As shown, the specific optimized technical solution adopted by the present invention to solve the above-mentioned technical problems is: The present invention relates to a method for unsupervised anomaly detection of machine tool cutting tools using a channel-space-aware fusion convolutional autoencoder.
[0029] This invention provides an unsupervised anomaly detection method for machine tool cutting tools using a channel-space-aware fusion convolutional autoencoder, the method comprising the following steps: Step 1: Acquire vibration signal data of the machine tool cutting tool; The signal data in step 1 specifically refers to the acceleration vibration sensor signal data in the X, Y, and Z directions of the machine tool during operation.
[0030] Step 2: Preprocess the vibration signal data; Step 2 specifically involves: The original vibration data was divided into three scales: low frequency, mid frequency, and high frequency using wavelet packet transform. Construct a scale-adaptive convolutional neural network-based denoising network to denoise data at various scales; The noise reduction results of signals at each scale are learned by using an attention mechanism, and attention weights are generated. The noise reduction results of the three scales are then weighted and spliced together according to the weights to obtain the noise-reduced vibration data. The noise-reduced vibration data is then normalized. Perform a Fast Fourier Transform on the normalized data.
[0031] Step 3: Construct a channel-spatial-aware fusion convolutional autoencoder model; The channel-spatial-aware fusion convolutional autoencoder model includes: an encoder, an attention bottleneck layer, and a decoder; The core of the attention bottleneck layer is the CBAM module, which strengthens the connection between the encoder and decoder through the synergistic effect of channel attention and spatial attention, dynamically enhances key features related to faults, and suppresses redundant information from environmental noise. Depthwise separable convolutions are used in the encoder and decoder to achieve lightweight computation while ensuring feature extraction performance. Standard convolutions are used in the attention bottleneck layer to prevent the loss of the most compressed low-dimensional features in the attention bottleneck layer and to preserve and reconstruct key features. The encoder consists of multiple residual blocks connected in sequence. Each residual block adopts a depthwise separable convolutional structure, including a depthwise convolutional layer, an instance normalization layer, a LeakyReLU activation function, a pointwise convolutional layer, a batch normalization layer, and a LeakyReLU activation function. The residual block also has a shortcut connection, which adjusts the channel dimension through 1×1 convolution when the number of input and output channels is inconsistent; Depthwise separable convolutional structures decompose standard convolution into depthwise convolution and pointwise convolution, improving computational lightweightness and reducing model parameters while maintaining feature extraction capabilities.
[0032] Step 4: Input the preprocessed vibration signal data into the channel-spatial perception fusion convolutional autoencoder model, train, validate and test the model to obtain the reconstructed output data; The CBAM attention module is connected sequentially through the channel attention submodule and the spatial attention submodule; The channel attention submodule learns the importance of each channel through average pooling and two one-dimensional convolutional layers, and uses the sigmoid function to generate the channel weights. The specific calculation process is as follows:
[0033]
[0034]
[0035] in, This represents the result of average pooling of the input channel. and Both refer to multilayer perceptrons. Represents the ReLU activation function. This represents the Sigmoid function. This represents the channel attention weights obtained after perceptual learning of the channels. This represents the weighted output feature value after passing through the channel attention submodule; The spatial attention submodule uses the concatenation results of average pooling and max pooling channel dimensions, and generates spatial weights using a one-dimensional convolution with a kernel of 3 and the sigmoid function. This enhances the model's ability to perceive regions containing key information in vibration signals. The specific calculation process is as follows:
[0036]
[0037] in, Indicates average pooling. Indicates global max pooling. This represents the output feature map obtained after concatenating along the channel dimension. This represents the spatial attention weights obtained after perceptual learning. This indicates the use of a one-dimensional convolution operation with a kernel of 3. This represents the feature value after being weighted by the spatial attention submodule.
[0038] The decoder consists of multiple residual blocks, and the output is limited to the range [0,1] by the Sigmoid activation function to ensure that the reconstructed signal has the same numerical range as the input signal.
[0039] Step 5: Determine the fusion loss function value based on the reconstructed output data and input data, and measure the amplitude error and waveform structure differences; The fusion loss function is expressed by the following formula:
[0040]
[0041]
[0042] in, Indicates the mean square error loss. Indicates the cosine similarity loss; Indicates the weighting coefficient; This represents the i-th original input sample. This represents the i-th reconstructed output sample.
[0043] Step 6: Compare the fusion loss function value with the preset threshold to determine if there is any anomaly, and output the anomaly detection result of the machine tool.
[0044] Figure 4 This is a visual comparison chart of the threshold and reconstruction error. For example... Figure 4 As shown, samples with tool wear less than 0.1 mm are considered normal, while those with wear greater than 0.1 mm are considered abnormal. The threshold selected in step 6 is less than the reconstruction error of all abnormal samples and greater than the reconstruction error of most normal samples.
[0045] Figure 5 This is a confusion matrix diagram of the anomaly detection results. For example... Figure 5 As shown in this embodiment, the unsupervised anomaly detection method for machine tools using a channel-space-aware fusion convolutional autoencoder has a very low false negative rate (2 / 200) for anomaly samples.
[0046] Figure 6 This is a comparison chart of ROC curves for anomaly detection results. (Example:) Figure 5 As shown, the AUC (1.00) of the channel-space-aware fusion convolutional autoencoder model constructed in this invention is higher than that of the CAE model (0.91).
[0047] Table 1 Comparison of Test Results
[0048] As shown in Table 1, the model results of this invention are more accurate, have a lower false negative rate, and better overall performance than the CAE model on the dataset.
[0049] In summary, this invention proposes an unsupervised anomaly detection method for machine tool cutting tools based on a channel-space-aware fusion convolutional autoencoder. This method achieves high-precision anomaly recognition under unlabeled data conditions through multi-sensor signal acquisition, frequency domain preprocessing, depth feature extraction, and attention-weighted reconstruction. The model structure integrates a lightweight depthwise separable convolution and a dual attention mechanism of CBAM, significantly reducing the number of parameters while enhancing the perception of key features. The loss function design combines mean squared error and cosine similarity, effectively improving robustness and discriminative performance in noisy environments. This method features a clear structure, stable training, and flexible deployment, making it suitable for real-time monitoring and intelligent diagnosis of machine tool cutting tool status in industrial settings. It has high engineering application value and promising prospects for widespread adoption.
[0050] This invention also provides an unsupervised anomaly detection system for machine tool cutting tools using a channel-space-aware fusion convolutional autoencoder, the system comprising: The data acquisition module acquires vibration signal data of the machine tool cutting tool; The preprocessing module preprocesses the vibration signal data. A model building module that builds a channel-spatial-aware fusion convolutional autoencoder model; The training module inputs the preprocessed vibration signal data into the channel-spatial perception fusion convolutional autoencoder model, trains, validates, and tests the model, and obtains the reconstructed output data. The fusion module determines the fusion loss function value based on the reconstructed output data and input data, and measures the amplitude error and waveform structure difference; The detection module compares the fusion loss function value with a preset threshold to determine whether there is an anomaly and outputs the anomaly detection result of the machine tool.
[0051] This invention significantly improves the performance of machine tool vibration signal anomaly detection by introducing depthwise separable convolution and an attention mechanism. The model employs a lightweight depthwise separable convolution structure, which greatly reduces the number of parameters and computational complexity while maintaining feature extraction capabilities, making it suitable for real-time monitoring and edge deployment. The embedded CBAM dual attention mechanism enhances the model's perception and reconstruction quality of key features, effectively identifying weak anomalies. By fusing mean squared error and cosine similarity loss functions, it maintains superior robustness and accuracy even in noisy environments. This model requires only normal samples for training to achieve unsupervised anomaly recognition. Its reasonable structure, stable training, and good engineering applicability and promotional value make it particularly suitable for machine tool condition monitoring scenarios with high reliability requirements.
[0052] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement a method for unsupervised anomaly detection of machine tool cutting tools using a channel-space-aware fusion convolutional autoencoder.
[0053] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement a channel-space-aware fusion convolutional autoencoder-based unsupervised anomaly detection method for machine tool cutting tools. Specific Implementation Example 2: The only difference between Embodiment 2 and Embodiment 1 of this application is that: In this embodiment, please refer to Figure 1 As shown, an unsupervised anomaly detection method for machine tool cutting tools using a channel-space-aware fusion convolutional autoencoder includes the following steps: S1. Acquire vibration sensor signal data in the X, Y, and Z directions of the machine tool during operation; The dataset used in this invention comes from the tool acceleration vibration signal collected by a high-speed CNC milling machine under dry milling operation. Vibration data in the X, Y, and Z directions were recorded by a piezoelectric accelerometer installed on the workpiece at a sampling frequency of 50kHz. Tools with an average wear value ≥0.10mm are considered abnormal. The average wear value is the average of the wear values in the X, Y, and Z directions.
[0055] S2. Preprocess the vibration signal data, including normalization, frequency domain transformation and adding Gaussian noise, to enhance signal characteristics and facilitate testing the performance of the model under noise. After acquiring the vibration signal data, it is first preprocessed by standardization and frequency domain feature extraction to improve feature separability and facilitate subsequent deep network processing. Let the original vibration signal be... Where N is the signal length, for each channel signal Perform the following operations in sequence: The min-max normalization method is used to linearly transform the original signal to the interval [0,1], eliminating differences in amplitude dimensions and improving training stability. The calculation formula is as follows:
[0056] in, This represents the original input vibration signal of the c-th sensor. In order to further enhance the ability to express useful features in the signal, it is also necessary to perform spectrum exchange on the normalized signal. To highlight the frequency domain characteristics of the vibration signal and suppress noise interference, a Fast Fourier Transform (FFT) is performed on the normalized signal, and its one-sided amplitude spectrum is extracted as the frequency domain feature representation. Let the i-th segment of the signal be... The FFT transform and amplitude spectrum calculation formulas are as follows:
[0057]
[0058] in, This represents the time series prior to the Fast Fourier Transform. This indicates that a Fast Fourier Transform operation is performed on the input time-domain signal. This represents the frequency domain sequence after the Fast Fourier Transform. Indicates the length of the signal. This represents the normalized frequency domain amplitude sequence.
[0059] S3. Construct a channel-spatial awareness fusion convolutional autoencoder model, the structure of which includes an encoder, an attention bottleneck layer and a decoder in sequence, using a lightweight computational method, while planning the weights of the features. Figure 2 This is a schematic diagram of the channel-spatial aware fusion convolutional autoencoder model structure. (See diagram below.) Figure 2 As shown, the model consists of an encoder, an attention bottleneck layer, and a decoder. Both the encoder and decoder consist of three residual blocks. To prevent overfitting, a dropout mechanism is used between some of the residual blocks. The attention bottleneck layer includes a standard convolutional layer and a CBAM module.
[0060] S4. Input the preprocessed vibration signal data into the channel-spatial sensing fusion convolutional autoencoder model, train, validate, and test the constructed model to obtain the reconstructed output data; the core implementation process is as follows: S4.1 The encoder's role is to extract key features from the preprocessed vibration signal, which are then input into the attention bottleneck layer for further feature extraction. Its core structure consists of three sequentially connected residual blocks, the core implementation logic of which is depthwise separable convolution. Depthwise separable convolution achieves lightweight computation while preserving feature extraction capabilities. It can be divided into two sub-operations: depthwise convolution units and pointwise convolution units. The core implementation logic of these two sub-operations is as follows: S4.1.1 The function of the depthwise convolutional unit is to extract local features within a single channel, performing a convolution operation on each channel of the input vibration signal individually. Thanks to the individual feature extraction of each channel, redundant computation between channels is avoided, and the parameter size is reduced compared to traditional convolution. .
[0061] S4.1.2. The pointwise convolutional unit uses a 1×1 convolutional kernel to achieve channel dimension increase. This operation is combined with the non-linear transformation introduced by the LeakyReLU activation function to achieve feature aggregation through cross-channel weighted fusion and cross-channel weighted summation.
[0062] S4.1.3. Residual connections are used between depthwise convolutional units and pointwise convolutional units to preserve deep features through shortcut paths. When the input and output channels do not match, a 1×1 convolution is used.
[0063] in, This represents the weight parameters between the input and output channels. This convolution operation is used to adapt the dimensions and solve the problem of channel mismatch between residual blocks in shortcut connections.
[0064] S4.2 The attention bottleneck layer optimizes feature weights through the CBAM module. The CBAM module integrates channel and spatial attention perception to learn and weight important features, strengthening them and suppressing the negative impact of environmental noise. The specific implementation logic is as follows: S4.2.1 The channel attention submodule focuses on the feature importance of different channels and learns channel weights through global pooling and MLP.
[0065] First, global feature compression is performed, using adaptive average pooling to compress the temporal dimension into a scalar, generating channel-level global feature vectors:
[0066] in, This represents the result of global average pooling for the input channel with channel index c. Next, we prepare for channel weight learning. This is achieved through a two-stage fully connected layer (MLP) to perform a non-linear mapping of the channel weights. The first fully connected layer reduces the dimension to C / r (r=4 is the dimensionality reduction factor). After activation by the ReLU function, the second fully connected layer restores the original dimension. Finally, the sigmoid function outputs the normalized weights.
[0067] in, , where represents the weight matrix of a multilayer perceptron (MLP). Represents the ReLU activation function. This represents the Sigmoid function.
[0068] Finally, the attention weights are multiplied channel-by-channel by the input feature map to enhance the features of important channels:
[0069] in, This represents the channel attention weights obtained after perceptual learning of channel c. This represents the output feature value after weighting by the channel attention submodule.
[0070] S4.2.2 The spatial attention submodule focuses on key moments in the temporal dimension, such as the instantaneous impact of a fault, and learns spatial weights through channel aggregation and convolution operations. First, aggregate the channel dimensions and output the channel attention. Apply global average pooling and global max pooling respectively to generate two single-channel feature maps, and then concatenate them along the channel dimension:
[0071] in, Indicates average pooling. Indicates global max pooling. This represents the output feature map obtained after splicing along the channel dimension.
[0072] Secondly, for spatial weight learning, a one-dimensional convolution with a kernel of 3 is used to perform a convolution operation on the concatenated feature map, and the normalized weights of the temporal dimension are output by the Sigmoid function:
[0073] in, This represents the spatial attention weights obtained after perceptual learning. This indicates that a one-dimensional convolution operation with a kernel of 3 is used to learn the temporal dimension feature associations and generate spatial attention weights.
[0074] Finally, the spatial weights are combined with Perform time-step broadcast multiplication to enhance key temporal features:
[0075] in, This represents the feature values after weighting by the spatial attention submodule. This represents the feature value after channel attention weighting.
[0076] The feature maps output by the CBAM module retain the discriminability of high-dimensional features while achieving dynamic real-time feature filtering through an attention mechanism.
[0077] S4.3 The decoder adopts a three-level residual block structure symmetrical to the encoder. By reducing the dimension layer layer by layer, the output of the bottleneck layer is reconstructed into a multi-channel vibration signal with the same dimension as the input signal. Its core is to achieve accurate mapping from high-dimensional features to the original signal. Reconstruction is essential in the decoder. The core principle of unsupervised anomaly detection is that normal samples have small reconstruction errors, while anomalous samples have large reconstruction errors. Therefore, the decoder needs to accurately reproduce the key patterns of normal vibration signals in order to distinguish anomalies based on error differences.
[0078] The decoder employs a three-level residual block structure symmetrical to the encoder. The depthwise separable convolutions and shortcut connections at each level are reverse-matched to the corresponding levels of the encoder. The encoder achieves dimensionality increase through pointwise convolutions, while the decoder achieves dimensionality reduction through the same structure, ensuring that information loss is minimized during both dimensionality increase and reduction.
[0079] This invention significantly improves the performance of machine tool vibration signal anomaly detection by introducing depthwise separable convolution and an attention mechanism. The model employs a lightweight depthwise separable convolution structure, which greatly reduces the number of parameters and computational complexity while maintaining feature extraction capabilities, making it suitable for real-time monitoring and edge deployment. The embedded CBAM dual attention mechanism enhances the model's perception and reconstruction quality of key features, effectively identifying weak anomalies. By fusing mean squared error and cosine similarity loss functions, it maintains superior robustness and accuracy even in noisy environments. This model requires only normal samples for training to achieve unsupervised anomaly recognition. Its reasonable structure, stable training, and good engineering applicability and promotional value make it particularly suitable for machine tool condition monitoring scenarios with high reliability requirements.
[0080] Figure 3 This is a comparison graph of the reconstructed signal output by the model and the original signal (signal-to-noise ratio is 1). Figure 3 As shown, two randomly selected samples are processed through an encoder-attention bottleneck layer-decoder to obtain reconstructed signals. These signals will serve as the basis for subsequent anomaly detection, which will be explained in detail below.
[0081] The output reconstructed signal is the model's fitting result to the normal vibration mode. For normal samples in the training set, the output reconstructed signal has a small error compared to the original input signal; for abnormal samples containing early faults, the output reconstructed signal has a large error compared to the original input signal because its features deviate from the normal distribution learned by the model. This provides direct input for the calculation of the fusion loss function in step S4.
[0082] S5. Calculate the fusion loss function value between the reconstructed output data and the original input data. This loss function is a weighted sum of mean square error loss and cosine similarity loss, used to simultaneously measure amplitude error and waveform structure difference. The fusion loss function is defined as follows:
[0083]
[0084]
[0085] in, It represents the mean square error loss, which measures the difference in amplitude between the original signal and the reconstructed signal; This represents the cosine similarity loss, used to measure the similarity between the reconstructed signal and the original signal in terms of waveform structure; This represents the weighting coefficient, used to weight the cosine similarity loss and balance the contributions of the two losses; This represents the i-th original input sample. This represents the i-th reconstructed output sample; By calculating the fusion loss function value between the reconstructed output and the original input, accurate quantitative assessment of signal anomalies can be achieved. This fusion loss jointly constrains the reconstruction error from two dimensions: temporal amplitude deviation and waveform structure consistency. By introducing an adjustable weighting coefficient λ, the contribution ratio between amplitude sensitivity and structural similarity is flexibly balanced, effectively enhancing the model's robustness and discriminative ability under strong noise interference. This loss mechanism not only improves the sensitivity of anomaly response but also avoids over-reliance on a single error index, demonstrating structural innovation and algorithmic advantages in multimodal vibration signal processing.
[0086] S6. Compare the fusion loss function value with a preset threshold to determine if there is an anomaly, and output the anomaly detection result of the machine tool.
[0087] In step S6, an adaptive threshold selection strategy based on statistical distribution is adopted. The reconstruction error of all samples is calculated based on the aforementioned fusion loss function value. Then, the 95th percentile is taken as the detection threshold. Once the loss value exceeds this threshold, an anomaly alarm is triggered. The system automatically generates a visual interface to output a comparison graph of the reconstructed signal and the original signal, thus providing maintenance personnel with an intuitive and reliable decision-making basis, effectively reducing the false alarm and missed alarm rates, demonstrating its practicality and innovation in industrial online monitoring scenarios. This method requires no manual intervention, can adapt to data distribution characteristics, ensures that the false alarm rate of normal samples is controlled within 5%, and effectively balances detection sensitivity and specificity.
[0088] This invention relates to an unsupervised anomaly detection method for machine tool cutting tools using a channel-space-aware fusion convolutional autoencoder. The method includes: acquiring acceleration vibration signal data of the machine tool cutting tool in the X, Y, and Z directions; performing normalization and frequency domain transformation preprocessing on the signals; constructing a channel-space-aware fusion convolutional autoencoder model; inputting the processed data into the constructed channel-space-aware fusion convolutional autoencoder model for reconstruction; calculating the fusion loss function value between the reconstructed output and the original input, whereby the loss is a weighted sum of mean square error loss and cosine similarity loss; and determining whether the cutting tool is abnormal based on whether the loss value exceeds a preset threshold. This invention employs a lightweight, depthwise separable convolutional structure to reduce the number of parameters and computational complexity, combines channel and spatial attention mechanisms to enhance feature perception capabilities, and fuses multi-dimensional loss functions to improve robustness and detection accuracy in noisy environments, making it suitable for real-time status monitoring and intelligent diagnosis of machine tool cutting tools.
[0089] This invention significantly improves the performance of machine tool vibration signal anomaly detection by introducing depthwise separable convolution and an attention mechanism. The model employs a lightweight depthwise separable convolution structure, which greatly reduces the number of parameters and computational complexity while maintaining feature extraction capabilities, making it suitable for real-time monitoring and edge deployment. The embedded CBAM dual attention mechanism enhances the model's perception and reconstruction quality of key features, effectively identifying weak anomalies. By fusing mean squared error and cosine similarity loss functions, it maintains superior robustness and accuracy even in noisy environments. This model requires only normal samples for training to achieve unsupervised anomaly recognition. Its reasonable structure, stable training, and good engineering applicability and promotional value make it particularly suitable for machine tool condition monitoring scenarios with high reliability requirements.
[0090] The above description is merely a preferred embodiment of a channel-space-aware fused convolutional autoencoder-based unsupervised anomaly detection method for machine tool tools. The scope of protection for this method is not limited to the above embodiments; all technical solutions falling within this conceptual framework are within the scope of protection of this invention. It should be noted that for those skilled in the art, any improvements and variations made without departing from the principles of this invention should also be considered within the scope of protection of this invention.
Claims
1. A method for unsupervised anomaly detection of machine tool cutting tools using a channel-space-aware fusion convolutional autoencoder, characterized by: The method includes the following steps: Step 1: Acquire vibration signal data of the machine tool cutting tool; Step 2: Preprocess the vibration signal data; Step 3: Construct a channel-spatial-aware fusion convolutional autoencoder model; Step 4: Input the preprocessed vibration signal data into the channel-spatial perception fusion convolutional autoencoder model, train, validate and test the model to obtain the reconstructed output data; Step 5: Determine the fusion loss function value based on the reconstructed output data and input data, and measure the amplitude error and waveform structure differences; Step 6: Compare the fusion loss function value with the preset threshold to determine if there is any anomaly, and output the anomaly detection result of the machine tool.
2. The method according to claim 1, characterized in that: In step 1, the vibration signal of the machine tool tool is obtained by wireless transmission through a wireless vibration sensor. The specific signal data is the wireless vibration sensor signal data of the acceleration in the X, Y and Z directions of the machine tool tool during operation.
3. The method according to claim 2, characterized in that: Step 2 specifically involves: The acquired vibration data is normalized. Perform a Fast Fourier Transform on the normalized data.
4. The method according to claim 3, characterized in that: channel - Spatial-aware fusion convolutional autoencoder models include: encoder, attention bottleneck layer and decoder; The core of the attention bottleneck layer is the CBAM module, which strengthens the connection between the encoder and decoder through the synergistic effect of channel attention and spatial attention, dynamically enhances key features related to faults, and suppresses redundant information from environmental noise. Depthwise separable convolutions are used in the encoder and decoder to achieve lightweight computation while ensuring feature extraction performance. Standard convolutions are used in the attention bottleneck layer to prevent the loss of the most compressed low-dimensional features in the attention bottleneck layer and to preserve and reconstruct key features. The encoder consists of multiple residual blocks connected in sequence. Each residual block adopts a depthwise separable convolutional structure, including a depthwise convolutional layer, an instance normalization layer, a LeakyReLU activation function, a pointwise convolutional layer, a batch normalization layer, and a LeakyReLU activation function. The residual block also has a shortcut connection, which adjusts the channel dimension through 1×1 convolution when the number of input and output channels is inconsistent; Depthwise separable convolutional structures decompose standard convolution into depthwise convolution and pointwise convolution, improving computational lightweightness and reducing model parameters while maintaining feature extraction capabilities.
5. The method according to claim 4, characterized in that: The CBAM attention module is connected sequentially through the channel attention submodule and the spatial attention submodule; The channel attention submodule learns the importance of each channel through average pooling and two one-dimensional convolutional layers, and uses the sigmoid function to generate the channel weights. The specific calculation process is as follows: in, This represents the result of average pooling of the input channel. and Both refer to multilayer perceptrons. Represents the ReLU activation function. This represents the Sigmoid function. This represents the channel attention weights obtained after perceptual learning of the channels. This represents the weighted output feature value after passing through the channel attention submodule; The spatial attention submodule uses the concatenation results of average pooling and max pooling channel dimensions, and generates spatial weights using a one-dimensional convolution with a kernel of 3 and the sigmoid function. This enhances the model's ability to perceive regions containing key information in vibration signals. The specific calculation process is as follows: in, Indicates average pooling. Indicates global max pooling. This represents the output feature map obtained after concatenating along the channel dimension. This represents the spatial attention weights obtained after perceptual learning. This indicates the use of a one-dimensional convolution operation with a kernel of 3. This represents the feature value after being weighted by the spatial attention submodule.
6. The method according to claim 5, characterized in that: The decoder consists of multiple residual blocks, and the output is limited to the range [0,1] by the Sigmoid activation function to ensure that the reconstructed signal has the same numerical range as the input signal.
7. The method according to claim 6, characterized in that: fusion The loss function is expressed by the following formula: in, Indicates the mean square error loss. Indicates the cosine similarity loss; Indicates the weighting coefficient; This represents the i-th original input sample. This represents the i-th reconstructed output sample.
8. An unsupervised anomaly detection system for machine tool cutting tools using a channel-space-aware fusion convolutional autoencoder, characterized in that: The system includes: The data acquisition module acquires vibration signal data of the machine tool cutting tool; The preprocessing module preprocesses the vibration signal data. A model building module that builds a channel-spatial-aware fusion convolutional autoencoder model; The training module inputs the preprocessed vibration signal data into the channel-spatial perception fusion convolutional autoencoder model, trains, validates, and tests the model, and obtains the reconstructed output data. The fusion module determines the fusion loss function value based on the reconstructed output data and input data, and measures the amplitude error and waveform structure difference; The detection module compares the fusion loss function value with a preset threshold to determine whether there is an anomaly and outputs the anomaly detection result of the machine tool.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the method as claimed in any one of claims 1-7.
10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the method of any one of claims 1-7.