A tool wear state detection method based on deep migration

By employing deep transfer learning and residual neural networks for image preprocessing and feature extraction, the problems of data imbalance and high cost in tool wear detection are solved, achieving efficient and accurate tool wear condition detection.

CN116352506BActive Publication Date: 2026-08-25LIAONING UNIVERSITY OF TECHNOLOGY
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310526187.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-10
Publication Date
2026-08-25
Estimated Expiration
2043-05-10

AI Technical Summary

Technical Problem

Existing tool wear detection methods suffer from problems such as data imbalance, difficulty in feature extraction due to excessive sensor signals, and high training costs, which affect detection efficiency and accuracy.

Method used

A deep transfer-based approach is adopted. By collecting physical signal datasets from machine tool processing operations, a residual neural network model is used for image preprocessing and feature extraction. This involves a first-stage pre-training and a second-stage fine-tuning training, with the BN layer frozen to improve model accuracy, thereby enabling tool wear state detection.

Benefits of technology

It solves the problem of data imbalance, improves the accuracy and detection efficiency of classification models, reduces training time and cost, and is applicable to various machine tools and sensors, not limited to specific types.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116352506B_ABST
    Figure CN116352506B_ABST
Patent Text Reader

Abstract

The application discloses a tool wear state detection method based on deep migration, comprising the following steps: collecting a physical signal data set, including a source domain data set and a target domain data set; converting the physical signal data set into an image format that can be input into a residual neural network model; performing data enhancement, batch normalization and regularization processing on the source domain image, and performing data enhancement, batch normalization and class balance regularization processing on the target domain image; adaptively extracting source domain features and target domain features; pre-training the source domain features in the model to obtain a pre-training model; fine-tuning the target domain features in the pre-training model to obtain a tool wear state detection model; and inputting the physical signal of a tool to be detected into the model to output a tool wear state detection result. The application solves the problem of data imbalance caused by uneven distribution of the existing tool wear state, improves the classification model precision, realizes automatic feature extraction, saves manual work, and improves the detection efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of tool wear detection technology, and in particular to a method for detecting tool wear status based on depth migration. Background Technology

[0002] Tool wear detection is a technology that can detect and determine whether machine tool tool wear is severe and whether it can continue to participate in processing. At present, the detection methods for machine tool tool wear are mainly divided into direct methods and indirect methods. Direct method: The tool is removed from the machine tool after the machine is stopped and measured directly using an electron microscope; (2) Indirect method: Various sensors (force sensors, acceleration sensors, temperature sensors, etc.) are used to collect processing data, and then the sensor signals are transmitted back to the computer platform and measured indirectly through various technical means. Most indirect methods choose to use machine learning algorithm models composed of computer code for identification and classification as the measurement means. Machine learning algorithm models are generally composed of a data processing module and a classification algorithm module. Among them, the data processing module is responsible for converting the processing data collected by the sensors on the machine tool into a data form that can be input into the classification algorithm; the classification algorithm module is responsible for learning the input data. After learning to a certain extent, new tool wear data is input into the model, and the model will automatically identify the real-time wear state of the tool through classification to determine whether the tool needs to be replaced.

[0003] However, the above methods have the following problems: (1) Data imbalance problem. Due to the uneven time of each stage in the tool's life cycle from start to failure, the amount of sensor signal data collected in each stage is different, which leads to data imbalance problem. This will greatly affect the accuracy of the classification model and result in low efficiency of tool wear state detection. (2) Due to the large number of sensor signals collected, it is difficult to extract features. (3) Due to the large number of sensor signals collected, a high-depth neural network must be used, which leads to excessively long training time and high training cost. Summary of the Invention

[0004] In view of the technical problems existing in the prior art, the purpose of this invention is to provide a tool wear state detection method based on depth migration to solve the above-mentioned technical problems.

[0005] To achieve the above objectives, the present invention adopts the following technical solution:

[0006] A tool wear condition detection method based on depth migration includes the following steps:

[0007] S1. Collect physical signal datasets throughout the entire machine tool processing procedure, including source domain datasets and target domain datasets. Use the source domain dataset as the training set and divide the target domain dataset into a fine-tuning set and a test set.

[0008] S2. Convert the source domain dataset and the target domain dataset into source domain images and target domain images that can be input into the residual neural network model, respectively.

[0009] S3. Image preprocessing: Data augmentation, batch normalization, and regularization are performed on the source domain image, and data augmentation, batch normalization, and class balance regularization are performed on the target domain image.

[0010] S4. Adaptive feature extraction is performed on the preprocessed source domain image and target domain image using a residual neural network model to obtain source domain features and target domain features.

[0011] S5. Input the source domain features into the residual neural network model trainer to perform a one-stage pre-training of the model. Iterate the network training times until the target function value converges to obtain the pre-trained model.

[0012] S6. Perform parameter transfer on the pre-trained model and freeze the BN layer. Then, input the target domain features from the fine-tuning set into the pre-trained model for two-stage fine-tuning training. Use the final model after two-stage fine-tuning training as the tool wear state detection model.

[0013] S7. Input the physical signal of the tool under test in the actual production and processing scenario into the tool wear state detection model, and output the tool wear state detection result.

[0014] Preferably, the method further includes step S6', inputting the target domain features from the test set into the tool wear state detection model, and using classification accuracy and recall as evaluation criteria to test whether the tool wear state detection model can be used for tool wear detection in actual production and processing scenarios; wherein, the allocation ratio of the target domain features from the fine-tuning set to the target domain features from the test set is 10:1.

[0015] Preferably, in step S1, the physical signals in the physical signal dataset are vibration signals or cutting force signals.

[0016] Preferably, in step S5, the step of inputting the source domain features from the training set into the residual neural network model trainer to perform a one-stage pre-training of the model, and iterating the network training times until the objective function value converges to obtain the pre-trained model, specifically involves: inputting the source domain features from the training set into the residual neural network model trainer to perform a one-stage pre-training of the model, using the error between the model output test results and the actual wear results as the optimization objective function, iterating the network training times until the objective function value converges, determining the optimal weights of each layer connection, and obtaining the pre-trained model.

[0017] Preferably, in step S6, the pre-trained model undergoes parameter transfer and the BN layer is frozen. Then, the target domain features from the fine-tuning set are input into the pre-trained model for two-stage fine-tuning training. The final model obtained after the two-stage fine-tuning training is used as the tool wear state detection model. The specific steps are as follows: the pre-trained model undergoes parameter transfer and is retained in the two-stage training. The BN layer (i.e., the normalization layer) is frozen, and the learnable linear transformation parameters α and β are fixed. At the same time, the standard deviation and mean are updated. Then, the target domain features from the fine-tuning set are input into the pre-trained model to fine-tune the model classifier. The error between the model output test result and the actual wear result is used as the optimization objective function. The network training times are iterated until the objective function value converges. The optimal weights of each layer connection are determined to obtain the final model, which serves as the tool wear state detection model.

[0018] Preferably, in step S7, the detection results include three types: rapid wear, normal wear, and tool failure. When the detection result shows tool failure, the machine tool processing should be stopped immediately and the tool replaced.

[0019] Preferably, in step S2, the specific steps of converting the source domain dataset and the target domain dataset into source domain images and target domain images that can be input into the residual neural network model are as follows: convert the source domain dataset and the target domain dataset into a two-dimensional image set through an image encoding method, and then use a segmented aggregation method to perform dimensionality reduction processing on the encoded two-dimensional images to obtain an image format that can be input into the residual neural network model, thereby obtaining the source domain image and the target domain image respectively.

[0020] Preferably, the residual neural network model is ResNet32.

[0021] A second aspect of the present invention provides a detection system for implementing the above-described depth-transfer-based tool wear state detection method, comprising a data acquisition module, an image encoding module, an image preprocessing module, a feature extraction module, a training module, and a testing module; wherein,

[0022] The data acquisition module is used to collect physical signal datasets of tool wear status during the entire machine tool processing procedure, including source domain datasets and target domain datasets.

[0023] The image encoding module is used to convert the acquired source domain dataset and target domain dataset into source domain images and target domain images respectively through image encoding methods and segmentation aggregation methods;

[0024] The image preprocessing module is used to preprocess the source domain image and the target domain image respectively, including data augmentation, batch normalization and regularization processing of the source domain image, and data augmentation, batch normalization and class balance regularization processing of the target domain image.

[0025] The feature extraction module is used to perform adaptive feature extraction on the preprocessed source domain image and target domain image using a residual neural network, and extracts source domain features and target domain features according to a preset feature extraction algorithm.

[0026] The training module is used to obtain a tool wear state detection model, including a one-stage pre-training unit and a two-stage fine-tuning training unit. The one-stage pre-training unit is used to perform one-stage pre-training on the residual neural network model trainer using source domain features from the training set to obtain a pre-trained model. The two-stage fine-tuning training unit is used to perform two-stage fine-tuning training on the model classifier in the pre-trained model after parameter transfer and freezing of the BN layer by inputting target domain features from the fine-tuning set to obtain the tool wear state detection model.

[0027] The testing module is used to test whether the tool wear state detection model is suitable for tool wear detection in actual production and processing scenarios by inputting target domain features from the test set into the tool wear state detection model and using classification accuracy and recall as evaluation criteria.

[0028] Compared with the prior art, the present invention has the following beneficial effects:

[0029] (1) In this invention, by preprocessing the source domain image and the target domain image separately, the following technical effects can be achieved:

[0030] (a) The source domain image is preprocessed to adjust the ratio of instances of rapid wear zone: normal wear zone: tool failure zone from 1:4:1 to close to 1:2:1.

[0031] (b) Preprocessing of the target domain image can balance the ratio of instances of rapid wear zone: normal wear zone: tool failure zone from 1:4:1 to close to 1:1:1.

[0032] (2) In this invention, by performing parameter transfer and freezing the BN layer on the pre-trained model (obtained by pre-training the residual neural network) in the two-stage training, the high classification accuracy of the head label (normal wear area) is preserved. Then, the classifier is fine-tuned to improve the classification accuracy of the tail label (rapid wear area and tool failure area), which significantly shortens the number of iterations (the two-stage training only requires 100 epochs to converge) and further improves the accuracy of the model (1%-2%).

[0033] The two functions (1) and (2) of the present invention work together to solve the problem of data imbalance (long tail problem) caused by uneven distribution of tool wear state, improve the accuracy of classification model, realize automatic feature extraction, save manual labor and training time, and at the same time greatly improve the detection efficiency of tool wear state.

[0034] The detection method of this invention is not limited to machine tool type or sensor type. It eliminates the manual feature extraction process, saves model training time, reduces investment costs, improves recognition and classification accuracy, and thus improves the efficiency of tool wear condition detection. Attached Figure Description

[0035] Figure 1 This is a schematic flowchart of the tool wear state detection method based on depth migration proposed in this invention;

[0036] Figure 2 This is a schematic diagram comparing the changes in the residual neural network structure before and after freezing.

[0037] Figure 3 This is a schematic diagram of the tool wear condition detection platform built in Example 1;

[0038] Figure 4 The sensor signals AG collected and processed in Example 1 are force_x, force_y, force_z, acce_x, acce_y, acce_z, and AE, respectively.

[0039] Figure 5 This is a graph showing the wear measurement results after data collection and processing in Example 1;

[0040] Figure 6 The image shows the results of random force signals extracted from the c1 dataset.

[0041] Figure 7 This is a GASF image after PAA dimensionality reduction processing;

[0042] Figure 8 This is a schematic diagram of the tool wear curve;

[0043] Figure 9 This is a schematic diagram of the entire process of the first-stage pre-training and the second-stage fine-tuning training.

[0044] Figure 10 The parameters and iteration curves for the first stage of pre-training;

[0045] Figure 11 The parameters and iteration curves for the two-stage fine-tuning training are shown. Detailed Implementation

[0046] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.

[0047] Example 1

[0048] refer to Figure 1 and Figure 2 The first aspect of this invention provides a tool wear state detection system based on depth migration, comprising: a data acquisition module, an image encoding module, an image preprocessing module, a feature extraction module, a training module, and a testing module.

[0049] The data acquisition module is used to collect physical signal datasets of tool wear status during the entire machine tool processing procedure, including source domain datasets and target domain datasets.

[0050] The image encoding module is used to convert the acquired source domain dataset and target domain dataset into source domain images and target domain images in image formats that can be input into the residual neural network model, respectively, through image encoding methods and segmented aggregation methods;

[0051] The image preprocessing module is used to preprocess the source domain image and the target domain image respectively, including data augmentation, batch normalization and regularization processing of the source domain image, and data augmentation, batch normalization and class balance regularization processing of the target domain image.

[0052] The feature extraction module is used to perform adaptive feature extraction on the preprocessed source domain image and target domain image using a residual neural network. Based on the preset feature extraction algorithm, source domain features and target domain features are extracted.

[0053] The training module is used to obtain a tool wear state detection model, including a first-stage training unit and a second-stage training unit. The first-stage training unit is used to perform a first-stage pre-training of the residual neural network model trainer Gx (i.e., the tool wear state trainer Gx) using source domain features from the training set, to obtain a pre-trained model. The second-stage training unit is used to perform a second-stage fine-tuning training of the model classifier (i.e., the tool wear state classifier Gy) by transferring the parameters of the pre-trained model and freezing the BN layer, and then inputting the target domain features from the fine-tuning set into the pre-trained model. The final model obtained after the second-stage fine-tuning training is used as the tool wear state detection model.

[0054] The testing module is used to test whether the tool wear state detection model is suitable for tool wear detection in actual production and processing scenarios by inputting target domain features from the test set into the tool wear state detection model and using classification accuracy and recall as evaluation criteria.

[0055] This invention also provides a method for detecting tool wear state based on depth migration using the above-described system, comprising the following steps:

[0056] S1. Collect physical signal datasets throughout the entire machine tool machining process, including source domain dataset Di and target domain dataset Dc. Use source domain dataset Di as the training set and divide target domain dataset Dc into fine-tuning set and test set. The collected physical signals can be vibration signals or cutting force signals.

[0057] S2. The collected source domain dataset and target domain dataset are image encoded using GASF to convert them into a two-dimensional image set in the format (2048, 2048, 3). Then, the dimensionality of the obtained two-dimensional image set is reduced by the Piecewise Aggergate Approximation method (PAA) to obtain the source domain image and target domain image in the format (512, 512, 3) that can be used as input to the residual neural network.

[0058] S3. Image preprocessing: Data augmentation, batch normalization, and regularization are performed on the source domain image, and data augmentation, batch normalization, and class balance regularization are performed on the target domain image.

[0059] In the data imbalance problem (i.e. the long tail problem), the tags with more instances are called head tags, and in this invention, the normal wear area belongs to the head tags; the tags with fewer instances are called tail tags, and in this invention, the rapid wear area and the tool failure area belong to the tail tags.

[0060] To combat the data imbalance caused by the unique uneven distribution of sample data in tool wear signals and improve the accuracy and efficiency of the model, this invention employs multiple processing techniques for image preprocessing, including regularization, batch normalization, and data augmentation.

[0061] (1) Regularization

[0062] To combat the data imbalance problem, the original MiSLAS model incorporates two efficient regularization techniques: the Mixup algorithm and the Shifted Label-Aware Smoothing algorithm. These techniques significantly improve the confidence calibration of the classifier, effectively addressing the data imbalance issue. The core formula of the Mixup algorithm is shown below:

[0063]

[0064]

[0065] Where, x i y i With x j y jLet be the sample number, and let λ be a value ranging from [0, 1], following a beta distribution. For example, y i The label is [0,1,0], y j The label is [1,0,0], and the value of λ is 0.3. 0.3*[0,1,0]+0.7*[1,0,0]=[0.7,0.3,0], the purpose of which is to enhance the generalization of the model.

[0066] Shifted label-aware smoothing is another regularization method. Its purpose is to reduce the model's overconfidence, thereby reducing the overfitting phenomenon generated by the dataset during training and further improving the confidence calibration rate and reliability.

[0067] In datasets with imbalanced data, the network becomes overconfident in the head labels due to cross-entropy excitation. Therefore, the MiSLAS model proposes using label smoothing perception to address both the overconfidence in predicted probabilities and the over-excitation of cross-entropy. Its main idea can be summarized by the following formula:

[0068]

[0069] Among them, `o y It is a small label smoothing factor for category y, and its value is related to the number of samples N of category y. y related.

[0070] The core idea of ​​label-perceptual smoothing is to multiply the ordinary cross-entropy by a factor q. i The more categories f(N) y The larger the value of ), the larger the penalty value, which makes absolute labels like one-hot labels relatively soft labels.

[0071] (2) Data augmentation and batch normalization

[0072] Image data augmentation aims to enhance the detectability of relevant information and increase data diversity. After data augmentation, batch normalization is performed to eliminate or reduce the impact on the image's inherent properties during the augmentation process. Specifically, all data is first normalized to [0,1] by dividing all data by 255 (the data capacity of an RGB image). Then, after mean and standard deviation (STD) processing, the data is normalized again, ensuring that the mean of all batches in each channel is 0 and the standard deviation is 1. The core formula is as follows:

[0073] X = (x - mean) / std

[0074] If the data is distributed in (0,1), the input bias of the actual neural network will be relatively large. The initial bias value of the model is equal to 0, which will make the convergence speed of the neural network slower. Therefore, batch normalization can make the model converge faster and bring better results to the model.

[0075] In this embodiment, by preprocessing the source domain image, the ratio of the number of instances of rapid wear area: normal wear area: tool failure area can be adjusted from 1:4:1 to close to 1:2:1; by preprocessing the target domain image, the ratio of the number of instances of rapid wear area: normal wear area: tool failure area can be balanced from 1:4:1 to close to 1:1:1.

[0076] S4. Adaptive feature extraction is performed on the preprocessed source and target domain images using the ResNet32 neural network model to obtain source and target domain features.

[0077] S5. Source domain features (obtained from the training set through image encoding, PAA dimensionality reduction, preprocessing, and feature extraction) are used to train the ResNet32 neural network model Gx (i.e., ... Figure 1 The tool wear state trainer (Gx) is pre-trained for one stage. The error between the test results output by the model and the actual wear results is used as the optimization objective function. The number of network training times is continuously iterated to reduce the loss function Lx until the objective function value converges. The optimal weights of each layer connection are determined to obtain the pre-trained model.

[0078] S6. Perform parameter transfer on the pre-trained model and freeze the BN layer (i.e., normalization layer) in the neural network, while fixing the learnable linear transformation parameters α and β, and updating the standard deviation and mean; then input the target domain features from the fine-tuning set into the pre-trained model to classify the model classifier Gy (i.e., Figure 1 The tool wear state classifier Gy in the model is fine-tuned and trained. The error between the test results output by the model and the actual wear results is used as the optimization objective function. The number of network training iterations is continuously used to reduce the tool wear state classification loss function Ly until the objective function value converges. The optimal weights of each layer connection are determined, and the final model is used as the tool wear state detection model.

[0079] To combat the data imbalance caused by the unique uneven distribution of sample data in tool wear signals, and to further improve the accuracy and detection efficiency of the model, this invention performs parameter transfer on the pre-trained model and freezes the Batch Normalization (BN) layer during the two-stage training. The changes in the residual neural network structure before and after freezing are as follows: Figure 2 As shown, the goal is to preserve high classification accuracy for the head labels, followed by fine-tuning the trained model classifier Gy (i.e., Figure 1The tool wear state classifier Gy in the model aims to improve the classification accuracy of the tail label. However, a single-stage training process will result in a model that still suffers from overconfidence; this model maintains high classification accuracy for the head label but poor accuracy for the tail label.

[0080] S6' Input the target domain features from the test set into the tool wear state detection model, and use classification accuracy and recall as evaluation criteria to test whether the tool wear state detection model can be used for tool wear detection in actual production and processing scenarios; wherein, the allocation ratio of target domain features from the fine-tuning set to target domain features from the test set is 10:1.

[0081] S7. Input the physical signal of the tool under test in the actual production and processing scenario into the obtained tool wear state detection model, and output the tool wear state detection result. The detection result includes three situations: rapid wear, normal wear and tool failure. When the detection result shows tool failure, the machine tool processing should be stopped and the tool replaced.

[0082] Example 1

[0083] I. Collect cutting force signal datasets throughout the entire machine tool machining process:

[0084] refer to Figure 3 A tool wear condition detection platform based on deep migration was constructed, including an acoustic sensor 1, a workpiece 2, an accelerometer 3, a machining table 4, a force gauge 5, a data acquisition card, and computer hardware and software. The acoustic sensor 1 and accelerometer 3 are both installed on the machine tool under test and electrically connected to the data acquisition card, which in turn is electrically connected to the computer. When tool wear condition detection is performed, the machine tool is started and production activities are carried out normally. After the computer collects sufficient sensor signals, it uses this as a dataset to input into the model for training and learning. Once the model training and learning is complete, it can be applied to all machine tools with the same process, continuously inputting real-time sensor signals into the model. The model quickly identifies and classifies the real-time status of the tools. When an image appears in the tool failure zone, the model determines that the tool has failed at that moment, and the machine tool should be stopped immediately and the tool replaced.

[0085] Specifically, the experimental equipment and related experimental cutting parameters used in this embodiment are shown in Tables 1 and 2.

[0086] Table 1 Main Experimental Equipment

[0087]

[0088] In this embodiment, a high-speed CNC machine tool with a spindle speed of 42,000 rpm was selected. The workpiece material used in the machining test (RFM760) was stainless steel (HRC52). The workpiece was cut to separate it from the raw material, and its surface was prepared by face milling to remove the original surface layer containing hard particles. The workpiece surface was then machined to have a 60° bevel to accommodate a double-groove ball end mill. A Kistler three-axis cutting force measuring instrument was installed between the workpiece and the machining table to measure the cutting force in the form of charge, which was converted into voltage by a Kistler charge amplifier. Three Kistler piezoelectric accelerometers were installed on the workpiece to measure the cutting vibration of the machine tool in the X, Y, and Z directions, respectively. Kistler acoustic emission (AE) sensors were installed on the workpiece to monitor high-frequency stress waves generated during the cutting process. The outputs of these sensors were adjusted by appropriate signal conditioning accessories (such as charge amplifiers or couplers).

[0089] The voltage signal was captured by an NIDAQ PCI1200 data acquisition card with a frequency of 12 kHz. The data acquisition card generated 16-bit digitized data and transmitted it directly to an experimental software platform built on the PyTorch deep learning framework. The CPU was a 12th-generation Genius® Core™ i7-12700 with 14 cores and a frequency of 2.30 GHz, the graphics card was a GeForce RTX 3060 laptop with 6 GB of video memory and 16 GB of RAM, and the dataset was stored in CSV format (see...). Figure 4 ).

[0090] Table 2 Experimental cutting parameters

[0091]

[0092] The data acquisition card acquired signals from seven channels (force_x, force_y, force_z, acce_x, acce_y, acce_z, AE), with a cumulative sampling rate of 12kHz × 8 = 96kHz (see...). Figure 4 Machining experiments were conducted in downmilling operations at a cutting speed of 4.7 m / min and a spindle speed of 23,600 rpm. The milling cutter was stopped after cutting 108 mm along the X direction each time. In each experiment, the cutter continuously cut the workpiece ramp to machine a complete bevel. The total cutting length for one surface (i.e., 252 passes) was 108 × 252 = 27,216 mm. The tool wear was measured and recorded using a LEICA-MZ12 microscope system after completing the 27,216 mm cutting distance. A total of 315 sets of tool wear values ​​were obtained for each tool after the experiment, and the dataset was stored in CSV format (see [link to CSV file]). Figure 5 Its corresponding original signal tensor size is (n, 7).

[0093] II. Data Encoding and Dimensionality Reduction

[0094] To save experimental costs and time, this embodiment uses three-coordinate cutting force (force_x, force_y, force_z) sensor data samples (including labeled data) from three cutting tools (C1, C4, and C6) as the data source for cross-validation comparison experiments. The data is divided into training, fine-tuning, and testing sets in a 10:10:1 ratio. Each sample contains 3D cutting force sensor signals and the flank wear value of the three cutting edges. Based on the actual working requirements of the tool, only the maximum value of the flank wear value of the three cutting edges is retained as the specific working tool wear value. The training process below uses the C1 tool as an example. The training parameter settings are shown in Table 3 below. 2000 measurement data points are randomly selected from the middle part of each cutting process as the C1 cutting force signal dataset (see Table 3). Figure 6 ).

[0095] Table 3 Model Training Parameters

[0096]

[0097] The initial image resolution after GASF (Gram Square Field) image encoding is (2048, 2048, 3), and then PAA (Panel Articulation) technique is used to reduce its dimensionality to (512, 512, 3) (see...). Figure 6 This is to facilitate feature extraction by the ResNet32 network. The training set contains 945 images, the fine-tuning set contains 945 images, and the test set contains 93 images. In this embodiment, the encoded images are formatted according to the tool wear curve (see...). Figure 8 The data is categorized into three zones: the zone with fewer than 50 cutting cycles is named the Rapid Wear Zone; the zone with more than 50 but less than 250 cutting cycles is named the Normal Wear Zone; and the zone with more than 250 cutting cycles is named the Tool Failure Zone.

[0098] III. The Model Training Process

[0099] See Figure 9The specific training process of the model is as follows: (1) Input the source domain features from the training set into the ResNet32 neural network model to perform a first-stage pre-training of the model trainer Gx. The error between the test results output by the model and the actual wear results is used as the optimization objective function. The number of network training iterations is continuously used to reduce the tool wear state training loss function Lx until the objective function converges (if the result does not converge, continue to adjust the parameters) to obtain the pre-trained model; (2) Transfer the parameters of the obtained pre-trained model and retain them in the second-stage training. Freeze the BN layer in the neural network and fix the learnable linear transformation parameters α and β. At the same time, update the standard deviation and mean; Then input the target domain features from the fine-tuning set into the pre-trained model to fine-tune the model classifier Gy. The error between the test results output by the model and the actual wear results is used as the optimization objective function. The number of network training iterations is continuously used to reduce the tool wear state classification loss function Ly until the objective function value converges (if the result does not converge, continue to fine-tune) to end the training. The final model obtained is used as the tool wear state detection model.

[0100] See Figure 10 and Figure 11 The iterative curves of the first-stage pre-training and the second-stage fine-tuning training are shown respectively.

[0101] from Figure 10 As can be observed from the first-stage pre-training iteration curve, the model shows a convergence trend around the 175th iteration, with both training and testing accuracy stabilizing at around 88%, and the loss function stabilizing at around 0.4. The best accuracy reached a maximum of 93.548% in the first stage. The second-stage fine-tuning training mainly involves fine-tuning the model. Figure 11 The iterative curves of the two-stage fine-tuning training show that training accuracy and test accuracy begin to converge after 70 iterations, with training accuracy stabilizing at 97.849% and test accuracy at 93.548%. The optimal accuracy reaches a maximum of 94.624% in the second stage. Furthermore, from... Figure 11 The results also show that the two-stage fine-tuning training significantly shortens the number of iterations compared to the one-stage pre-training, and can quickly improve the accuracy to 94.624%, thus demonstrating the important significance of transfer learning.

[0102] After both training phases are completed, the trained overall model, i.e., the tool wear condition detection model, can be used to detect tool wear conditions. The detection results will show three outcomes: rapid wear, normal wear, and tool failure. If a signal indicating tool failure is detected during machining, machining can be stopped and the tool replaced.

[0103] IV. Test Results

[0104] In this embodiment, C1, C4, and C6 cutting tools were used for cross-validation. The validation results are shown in Table 4 below:

[0105] Table 4 Overall Accuracy of Cross-Validation

[0106]

[0107] Note: M1, M4, and M6 represent model numbers. M1 indicates that the model was generated by training on c1 tool wear data.

[0108] As shown in Table 4 above, the M6 ​​test results were the best. When using C1 tool data, 87.096% of the tool wear conditions were correctly detected; when using C4 tool data, 89.247% of the tool wear conditions were correctly detected; and when using C6 tool data, 95.699% of the tool wear conditions were correctly detected.

[0109] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A method for detecting tool wear state based on depth migration, characterized in that: Includes the following steps: S1. Collect physical signal datasets throughout the entire machine tool processing procedure, including source domain datasets and target domain datasets. Use the source domain dataset as the training set and divide the target domain dataset into a fine-tuning set and a test set. S2. Convert the source domain dataset and the target domain dataset into source domain images and target domain images that can be input into the residual neural network model, respectively. S3. Image preprocessing: Data augmentation, batch normalization, and regularization are performed on the source domain image, and data augmentation, batch normalization, and class balance regularization are performed on the target domain image. S4. Adaptive feature extraction is performed on the preprocessed source domain image and target domain image using a residual neural network model to obtain source domain features and target domain features. S5. Input the source domain features from the training set into the residual neural network model trainer to perform a one-stage pre-training of the model. Iterate the network training times until the target function value converges to obtain the pre-trained model. S6. Perform parameter transfer on the pre-trained model and freeze the BN layer. Then, input the target domain features from the fine-tuning set into the pre-trained model for two-stage fine-tuning training. Use the final model after two-stage fine-tuning training as the tool wear state detection model. S7. Input the physical signal of the tool under test in the actual production and processing scenario into the tool wear state detection model, and output the tool wear state detection result; In step S2, the source domain dataset and target domain dataset are respectively converted into source domain images and target domain images that can be input into the residual neural network model. The specific steps are as follows: the source domain dataset and target domain dataset are converted into two-dimensional image sets through image encoding method, and then the encoded two-dimensional images are dimensionality reduced by segmentation aggregation method to obtain image format that can be input into the residual neural network model, thereby obtaining source domain images and target domain images respectively. In step S5, the source domain features from the training set are input into the residual neural network model trainer to perform a one-stage pre-training of the model. The network training is iterated until the objective function value converges to obtain the pre-trained model. The specific steps are as follows: the source domain features from the training set are input into the residual neural network model trainer to perform a one-stage pre-training of the model. The error between the test results output by the model and the actual wear results is used as the optimization objective function. The network training is iterated until the objective function value converges to determine the optimal weights of each layer connection to obtain the pre-trained model. In step S6, the pre-trained model undergoes parameter transfer and the BN layer is frozen. Then, the target domain features from the fine-tuning set are input into the pre-trained model for two-stage fine-tuning training. The final model obtained after the two-stage fine-tuning training is used as the tool wear state detection model. The specific steps are as follows: the pre-trained model undergoes parameter transfer and is retained in the two-stage training; the BN layer is frozen and the learnable linear transformation parameters α and β are fixed, while the standard deviation and mean are updated; then, the target domain features from the fine-tuning set are input into the pre-trained model to fine-tune the model classifier. The error between the model output test result and the actual wear result is used as the optimization objective function. The network training times are iterated until the objective function value converges, and the optimal weights of each layer connection are determined to obtain the final model, which serves as the tool wear state detection model.

2. The tool wear state detection method based on depth migration according to claim 1, characterized in that: It also includes S6', inputting the target domain features from the test set into the tool wear state detection model, and using classification accuracy and recall as evaluation criteria to test whether the tool wear state detection model can be used for tool wear detection in actual production and processing scenarios; wherein, the allocation ratio of the target domain features from the fine-tuning set and the target domain features from the test set is 10:

1.

3. The tool wear state detection method based on depth migration according to claim 1, characterized in that: In step S1, the physical signals in the physical signal dataset are vibration signals or cutting force signals.

4. The tool wear state detection method based on depth migration according to claim 1, characterized in that: In step S7, the detection results include three types: rapid wear, normal wear, and tool failure. When the detection result shows tool failure, the machine tool processing should be stopped immediately and the tool replaced.

Citation Information

Patent Citations

  • Tool wear state detection method for industrial unbalanced data

    CN111639461A

  • Method and device for predicting wear state of milling cutter based on deep network self-adaption

    CN113762182A

  • Cutter wear prediction method and device based on transfer learning and computer application

    CN115186406A