A tool wear prediction method, device, medium and product

By using the SE-ResNet50 model and out-of-order training method in tool wear prediction, the problem of overfitting in ResNet network is solved, and a more accurate and stable wear prediction is achieved.

CN118664399BActive Publication Date: 2025-02-14LIAONING UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410712686.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-04
Publication Date
2025-02-14
Estimated Expiration
2044-06-04

AI Technical Summary

Technical Problem

In the prediction of tool wear, the application of ResNet network is prone to overfitting, and the network structure that needs to be improved is poor in the feature extraction of one-dimensional data signals.

Method used

Feature extraction and prediction are used for SE-ResNet50 model based on SE module. By disrupting the timing change law of the original time-frequency domain signal during the training stage, the diversity of training data is enhanced to reduce overfitting.

Benefits of technology

It effectively reduces the risk of overfitting the prediction model, improves the accuracy of feature extraction and prediction accuracy, and improves the generalization performance of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118664399B_ABST
    Figure CN118664399B_ABST
Patent Text Reader

Abstract

The present invention provides a tool wear prediction method, device, medium and product, which relates to the field of tool wear prediction. The method comprises: extracting multiple fused one-dimensional signals in a tool wear data training set using a SE-ResNet50 model based on an SE module; the one-dimensional signal is an original time-frequency domain signal directly collected from a machine tool; the SE-ResNet50 model is a network model constructed by embedding an SE module into a ResNet50 residual neural network; the SE module is an attention mechanism module based on extrusion excitation; disrupting the temporal variation law of the original time-frequency domain signal, and using the disrupted original time-frequency domain signal to train the SE-ResNet50 model, generating a trained SE-ResNet50 model, and outputting a tool wear training result; predicting tool wear according to the trained SE-ResNet50 model. The present invention can reduce the overfitting phenomenon generated by the prediction model during use.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of tool wear prediction, and in particular to a tool wear prediction method, equipment, medium and product. Background Art

[0002] In tool wear prediction, the prediction model needs to output the wear data at a certain moment in real time, and the tool wear value has the law of gradually increasing with cutting time. Therefore, full attention should be paid to the impact of this law on the research of tool wear prediction methods.

[0003] Residual Neural Network (ResNet) is currently widely used in various prediction studies. However, in the study of tool wear prediction, the application of ResNet network still has the following two problems. First, when using ResNet network to extract features from one-dimensional data signals, the network structure needs to be improved; second, when using ResNet network to build a prediction model, the model is prone to overfitting during use. Summary of the invention

[0004] The purpose of the present invention is to provide a tool wear prediction method, device, medium and product to solve the problem that the prediction model constructed by the ResNet network is prone to overfitting during use.

[0005] To achieve the above object, the present invention provides the following solutions:

[0006] A tool wear prediction method, comprising:

[0007] The SE-ResNet50 model based on the SE module is used to extract multiple fused one-dimensional signals in the tool wear data training set; the one-dimensional signal is the original time-frequency domain signal directly collected from the machine tool; the tool wear data is the side wear value of the milling cutter measured by the microscope system; the original time-frequency domain signal includes cutting force signal, vibration signal and high-frequency stress wave signal; the SE-ResNet50 model is a network model constructed by embedding the SE module into the ResNet50 residual neural network; the SE module is an attention mechanism module based on extrusion excitation;

[0008] Disrupting the temporal variation rule of the original time-frequency domain signal, and using the disrupted original time-frequency domain signal to train the SE-ResNet50 model, generating a trained SE-ResNet50 model, and outputting the training result of the tool wear amount;

[0009] The tool wear amount is predicted based on the trained SE-ResNet50 model.

[0010] Optionally, predicting tool wear according to the trained SE-ResNet50 model further includes:

[0011] Extract and disrupt the one-dimensional signal in the tool wear data test set, input the disrupted one-dimensional signal into the trained SE-ResNet50 model, and output the tool wear test result;

[0012] Combining the training results and the prediction results into a tool wear prediction curve according to a time series;

[0013] The tool wear prediction curve was compared with the actual tool wear curve to evaluate the tool wear prediction effect of the trained SE-ResNet50 model.

[0014] Optionally, the SE-ResNet50 model includes one first convolutional layer, four second convolutional layers and one fully connected layer connected in sequence; each of the second convolutional layers is embedded with an SE module; an attention mechanism function is added between two of the second convolutional layers, and the attention mechanism function is used to evaluate the weights of outputs between the convolutional layers; the number of stacked layers of SE modules in the four second convolutional layers is 3, 4, 6 and 3 respectively;

[0015] The convolutional layer is c = {c1, c2, c3, ... c n}; Wherein, c is the tool loss dataset input by the convolutional layer, and the tool loss dataset is a tool loss training set or a tool loss test set; c n It is the nth input data in the tool loss data set;

[0016] The attention mechanism function for Among them, Z i is the area to be identified, f Att The function adds attention weights between each convolutional layer; c i is the i-th input data in the tool loss data set.

[0017] Optionally, the SE module specifically includes: a residual network convolution layer, a global pooling layer, a first fully connected layer, a Relu activation function layer, a second fully connected layer, a Sigmoid activation function layer and an adjustment layer connected in sequence; wherein the residual network convolution layer is also directly connected to the adjustment layer.

[0018] Optionally, the data processing flow of the SE module is:

[0019] In the residual network convolution layer, a convolution operation is used to convert a feature sample X with an input size of H1×W1×C1 into a feature sample U with a size of H×W×C; wherein H and H1 are both signal lengths, W and W1 are both signal widths, and C and C1 are both signal feature channel numbers;

[0020] In the global pooling layer, the feature sample U is subjected to global average pooling calculation to obtain a 1×1×C feature vector by using a squeezing operation;

[0021] In the first fully connected layer, the 1×1×C feature vector is input into the first fully connected layer with the same number of feature channels by using an excitation operation;

[0022] Calling the ReLu activation function in the Relu activation function layer to calculate the second fully connected layer;

[0023] Calling the Sigmoid activation function in the Sigmoid activation function layer to generate the weight of each feature channel in the adjustment layer;

[0024] The feature vector output by the adjustment layer is multiplied by the feature weight of the feature sample U by a weighted operation to obtain the feature vector finally output by the SE module.

[0025] Optionally, the one-dimensional signal extraction process is:

[0026] The one-dimensional signal is taken as the original matrix x 1,n ;

[0027] A one-dimensional convolution layer is used to perform a convolution operation along the time axis by sliding a 1×k convolution kernel W to extract the feature matrix a corresponding to the original matrix. 1,i ; Among them, i is the output position, j is the position of the convolution kernel, s is the step size, b is the bias, m is the number of convolution operations performed by the convolution kernel, and w is the number of convolution operations performed by the convolution kernel. 1,j is the convolution kernel parameter matrix, x 1,(i-1)×s is the original signal matrix.

[0028] Optionally, disrupting the temporal variation rule of the original time-frequency domain signal, and using the disrupted original time-frequency domain signal to train the SE-ResNet50 model, generating a trained SE-ResNet50 model, and outputting the training result of the tool wear amount, specifically includes:

[0029] A random shuffling function is used to disrupt the temporal variation pattern of the original time-frequency domain signal;

[0030] The SE-ResNet50 model is trained using the disrupted original time-frequency domain signal, and during the training process, whether the loss function converges is determined;

[0031] If the loss function converges, the SE-ResNet50 model is used as a trained SE-ResNet50 model, and the training result of the tool wear amount is output;

[0032] If the loss function does not converge, adjust the model parameters of the SE-ResNet50 model, and retrain the adjusted SE-ResNet50 model using the disrupted original time-frequency domain signal until the loss function converges.

[0033] A computer device comprises: a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the tool wear prediction method.

[0034] A computer-readable storage medium stores a computer program, which implements the tool wear prediction method when executed by a processor.

[0035] A computer program product comprises a computer program, and when the computer program is executed by a processor, the tool wear prediction method is implemented.

[0036] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects: In response to the above two problems, the present invention provides a tool wear prediction method based on a squeeze-and-Excitation Residual Neural Network (SE-ResNet) trained in a disordered manner. First, a SE-ResNet50 model based on a squeeze excitation (Squeeze and Excitation, SE) module is constructed for feature extraction. The SE module is an attention mechanism module based on squeeze excitation. The SE-ResNet50 model improves its feature extraction capability for one-dimensional signals through the attention mechanism, and then learns more suitable features to improve the overfitting of the model. Secondly, when the SE-ResNet50 model predicts, the temporal variation law of the original time-frequency domain signal is disrupted in the training stage, and the diversity of training data is enhanced to further solve the overfitting problem of the prediction model. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0038] Figure 1A flow chart of the tool wear prediction method provided by the present invention;

[0039] Figure 2 Schematic diagram of the embedding method of the SE module for the residual learning unit;

[0040] Figure 3 It is the structure diagram of SE module;

[0041] Figure 4 This is the feature extraction flow chart of the one-dimensional convolutional layer of the SE-ResNet50 model;

[0042] Figure 5 This is the schematic diagram of random shuffling;

[0043] Figure 6 This is the training flow chart of SE-ResNet50 model;

[0044] Figure 7 It is a schematic diagram of the c1 out-of-order training and testing iteration curve; Figure 7 (a) is the training MSE iteration curve; Figure 7 (b) is the test MSE iteration curve; Figure 7 (c) is the test R 2 Iteration graph; Figure 7 (d) is the test MAPE iteration curve;

[0045] Figure 8 This is the c1 random order experiment result diagram; among them, Figure 8 (a) is the regression fitting diagram of the training set of the c1 scrambled experiment; Figure 8 (b) is the test set regression fitting diagram of the c1 scrambled experiment;

[0046] Fig. 9 is the c1 time series training and test iteration curve; where, Fig. 9 (a) is the iterative curve diagram of the whole process of training MSE; Fig. 9 (b) is the iteration curve of the whole process of testing MSE; Fig. 9 (c) is the test R 2 Iteration curve chart of the whole process; Fig. 9 (d) is the iterative curve diagram of the whole process of testing MAPE;

[0047] Fig.10 This is the c1 timing experiment result diagram; among them, Fig.10 (a) is the regression fitting diagram of the training set of the c1 time series experiment; Fig.10 (b) is the test set regression fitting diagram of the c1 time series experiment;

[0048] Fig.11 This is a comparison chart of the training time between c1 random order and sequential order;

[0049] Fig.12 It is a comparison chart of the wear amount curves of disordered and sequential wear; Fig.12 (a) is the comparison diagram of c1 wear amount curve; Fig.12 (b) is the comparison diagram of c4 wear curve; Fig.12 (c) is the comparison diagram of c6 wear curve;

[0050] Fig.13 The architecture diagram of the tool wear prediction method based on SE-ResNet. DETAILED DESCRIPTION

[0051] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0052] The purpose of the present invention is to provide a tool wear prediction method, device, medium and product, which can reduce the overfitting phenomenon generated by the prediction model during use.

[0053] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0054] Example 1

[0055] At present, the input signals for tool wear detection mainly include one-dimensional signals and two-dimensional signals. One-dimensional signals are original time-frequency domain signals collected directly from machine tools using sensors. Commonly used time-frequency domain signals include cutting force signals, vibration signals, high-frequency stress wave signals, current signals, power signals, etc.; two-dimensional signals are mainly images taken by cameras or generated by coding technology. The present invention predicts tool wear based on one-dimensional signals.

[0056] like Figure 1 As shown, the present invention provides a tool wear prediction method, comprising:

[0057] Step 101: Use the SE-ResNet50 model based on the SE module to extract multiple fused one-dimensional signals in the tool wear data training set; the one-dimensional signal is the original time-frequency domain signal directly collected from the machine tool; the tool wear data is the milling cutter side wear value measured by the microscope system; the original time-frequency domain signal includes cutting force signal, vibration signal and high-frequency stress wave signal; the SE-ResNet50 model is a network model constructed by embedding the SE module into the ResNet50 residual neural network; the SE module is an attention mechanism module based on extrusion excitation.

[0058] Step 102: disrupt the time series variation pattern of the original time-frequency domain signal, and use the disrupted original time-frequency domain signal to train the SE-ResNet50 model, generate a trained SE-ResNet50 model, and output the training result of tool wear.

[0059] In practical applications, step 102 specifically includes: using a random shuffle function to disrupt the time series variation law of the original time-frequency domain signal; using the disrupted original time-frequency domain signal to train the SE-ResNet50 model, and during the training process, judging whether the loss function converges; if the loss function converges, using the SE-ResNet50 model as the trained SE-ResNet50 model, and outputting the training result of the tool wear; if the loss function does not converge, adjusting the model parameters of the SE-ResNet50 model, and retraining the adjusted SE-ResNet50 model using the disrupted original time-frequency domain signal until the loss function converges.

[0060] Step 103: Predict tool wear based on the trained SE-ResNet50 model.

[0061] In practical applications, step 103 also includes: extracting and disrupting the one-dimensional signal in the tool wear data test set, inputting the disrupted one-dimensional signal into the trained SE-ResNet50 model, and outputting the tool wear test result; synthesizing the tool wear prediction curve according to the training result and the prediction result in time series; comparing the tool wear prediction curve with the actual tool wear curve, and evaluating the tool wear prediction effect of the trained SE-ResNet50 model.

[0062] In practical applications, the SE-ResNet50 model includes a first convolutional layer, four second convolutional layers, and a fully connected layer connected in sequence; each second convolutional layer is embedded with an SE module; an attention mechanism function is added between two second convolutional layers, and the attention mechanism function is used to evaluate the weights of the outputs between the convolutional layers. The embedding method of the SE module for the residual learning unit is as follows Figure 2 shown.

[0063] The ResNet50 network model can directly extract features from the original one-dimensional data. To further enhance the feature extraction capability of the neural network, the attention mechanism is used to improve it. The attention mechanism is a key component in the field of deep learning image classification. By applying a mask to the image to focus on the designated areas that the model needs to pay special attention to, the neural network can learn the most important features in the signal during training, thus forming a kind of attention.

[0064] The SE module is an attention mechanism module that can be embedded in other convolutional neural networks. It is also an important component of SEnet, which has been widely used in fault diagnosis, image recognition and other fields since its introduction.

[0065] In tool wear prediction, the present invention adopts the attention mechanism of the SE module to generate weights to mark the importance of features, so as to reduce the influence of redundant or irrelevant features, so that the model can focus on valuable tool wear signals and reduce the overfitting risk of the prediction model; in addition, due to the reduction in the number of redundant or irrelevant features, the complexity of the model is reduced, thereby improving the training speed.

[0066] The specific application method is to embed the SE module into the ResNet50 residual neural network to build the SE-ResNet50 model in order to improve the feature extraction performance. The principle is as follows:

[0067] If each convolutional layer structure in ResNet50 is expressed by a formula, it can be referred to as shown in formula (1):

[0068] c={c1,c2,c3,…c n} (1)

[0069] In the formula, C represents the data set input to the convolutional layer, C n Represents the nth input data in the dataset. However, the attention mechanism essentially adds a new function to the output vector of the previous level, which is used to re-evaluate the weight of the output between convolutional layers, as shown in formula (2):

[0070]

[0071] In the formula, Z i is the area to be identified, f Att The function adds attention weights between each convolution layer. This function adds unique weights between each convolution layer by scoring the signal samples vectors. The purpose is to highlight the importance of the vector elements in the next convolution layer and quantify the "attention" through parameter weights.

[0072] In actual applications, the number of stacked residual network convolutional layers in the SE module in the four second convolutional layers is 3, 4, 6, and 3 respectively.

[0073] In practical applications, the SE module specifically includes: a residual network convolution layer, a global pooling layer, a first fully connected layer, a Relu activation function layer, a second fully connected layer, a Sigmoid activation function layer and an adjustment layer connected in sequence; wherein the residual network convolution layer is also directly connected to the adjustment layer.

[0074] In practical applications, such as Figure 3 As shown, the data processing flow of the SE module is:

[0075] First, through the convolution operation (F tr ) The input feature sample X with a size of H1×W1×C1 (H1 is the signal length, W1 is the signal width, and C1 is the number of signal feature channels) is converted into a feature sample U with a size of H×W×C through multiple convolution steps, and then a squeeze operation (F sq ) The feature sample U is calculated by global average pooling to obtain a 1×1×C feature vector, which makes it easy for the model to perceive global signals. Then, through the excitation operation (F ex ) Input the 1×1×C feature vector into the fully connected layer with the same number of feature channels, use the ReLu activation function to calculate the fully connected layer, and finally generate the weight of each feature channel through the Sigmoid activation function

[60] . Finally, through the weighted operation (F scale ) Multiply the output feature vector by the previously output feature weight to get the final output of the SE module The feature signal is labeled with weights to obtain more directional features, thereby improving the accuracy of feature extraction.

[0076] The difference between the feature extraction process of the one-dimensional convolution layer and the two-dimensional convolution layer is that the convolution kernel of the one-dimensional convolution layer only moves in a single direction along the time axis during the feature extraction process. At this time, the one-dimensional signal can be regarded as a feature sample with an input size of H×1×C (H is the signal length, 1 is the signal width, and C is the number of signal feature channels). The original ResNet50 network uses a one-dimensional convolution layer to extract features from its data set. Figure 4 shown.

[0077] exist Figure 4 It can be observed that in the feature extraction process of the original ResNet50 network, the one-dimensional signal, that is, the original matrix x 1,n The one-dimensional convolution layer slides a convolution kernel W of a fixed size 1×k along the time axis to extract the feature matrix a 1,i , let the input data be x=[x1,x2,…,x n], the convolution kernel is W = [W1, W2, ..., W j ], and its principle is as follows:

[0078]

[0079] Where i represents the output position, j represents the position of the convolution kernel, s represents the step size, b represents the bias, m represents the number of times the convolution kernel performs the convolution operation, and w represents the number of times the convolution kernel performs the convolution operation. 1,j is the convolution kernel parameter matrix, x 1,(i-1)×s is the original signal matrix.

[0080] The SE-ResNet50 model used in the present invention is composed of a ResNet50 network and a SE module. The model parameters of ResNet50 and SE-ResNet50 are detailed in Table 1. In SE-ResNet50, the number of stacked layers of the residual modules of the convolutional layers conv2_x, conv3_x, conv4_x, and conv5_x are 3, 4, 6, and 3, respectively, for a total of 50 layers.

[0081] Table 1 is a schematic diagram of the network parameters of ResNet50 and SE-ResNet50. As shown in Table 1, Figure 2 In the , the main network structure of SE-ResNet50 remains unchanged compared to the original ResNet50, but the features of the sample signal need to be recalibrated before the summation calculation. This is because the sigmoid function has a normalized weight calculation. When the convolutional network is deeper, the input layer may experience gradient dissipation, making model optimization more difficult.

[0082] Table 1

[0083]

[0084]

[0085] SE-ResNet50 improves the prediction accuracy of the model by adding an attention mechanism. Compared with the original ResNet50 network, SE-ResNet50 allows the model to pay more attention to the channel information of the sample during training. Its complete model structure is as follows: Figure 2 As shown in the figure, Residual represents the residual network convolution layer structure; Globalpooling represents the global pooling layer; FC represents the fully connected layer; Relu and Sigmoid represent activation functions; Scale represents the adjustment layer.

[0086] After adding the SE module, the model parameters and the amount of calculation will increase. Taking SE-ResNet50 as an example, the increase in model parameters is:

[0087]

[0088] Where r is the dimension reduction coefficient, S represents the number of stages, and C s is the number of channels in the sth stage, N s is the number of repeated blocks in the sth stage. When r=16, SE-ResNet50 increases the number of parameters by about 10%, but the amount of computation (GFLOPS) increases by less than 1%, which shows that the network structure of SE-ResNet50 can improve the model prediction parameters without increasing the model complexity compared to the original ResNet50 network.

[0089] In practical applications, the present invention uses SE-ResNet50 as a prediction model to predict tool wear. Usually, supervised learning based on neural network prediction requires the use of a large amount of data for training. In tool wear prediction, tool wear detection signals (such as cutting force, vibration and other signals) belong to time domain data, and tool wear data has the law of gradually increasing over time. When training with time series data, each batch of data may be very similar, which will greatly affect the training effect of the algorithm (such as gradient descent performance). The prediction model will learn and remember the data distribution of specific patterns in the training data set, so that the model training effect is better but the effect is not good during testing. The overfitting problem caused by the prediction model will cause a large deviation in the final predicted wear amount.

[0090] Shuffling the order of data sets is a common data preprocessing method in machine learning. The present invention uses the method of calling the random shuffle function before each iteration in the training phase to shuffle the monitoring data originally arranged according to the number of cuts to increase the diversity of the sampled data, so that the model can be fully trained in more types of data distribution situations, and finally obtain better results. The principle of the random shuffle function is as follows Figure 5 As shown in the figure: when it generates a set of random values ​​such as 1, 2, the first element of the list is swapped with the second element, and this process will continue until the elements in each serial position have been swapped once. In the tool wear prediction, the element refers to the tool wear at a certain moment, such as Figure 5 shown.

[0091] Compared with sequential training, out-of-order training can disrupt the order of training data to prevent the accuracy and effectiveness of model acquisition features from deteriorating due to learning regular distribution data, thereby avoiding overfitting problems in the model learning process. Figure 6 As shown in the figure, the loss function L x The mean-square error (MSE) was used.

[0092] Experimental design and result analysis:

[0093] Experimental design:

[0094] The experiment of this invention uses the PHM2010 milling data set. The workpiece is fixed on a high-speed milling machine, and an acoustic emission sensor, an acceleration sensor, and a cutting force sensor are used to collect high-frequency stress wave signals, three-coordinate vibration signals, and three-coordinate cutting force signals, respectively, for a total of 7-dimensional data (sampling frequency 50kHZ).

[0095] In each experiment, the tool was used to continuously cut the slope of the workpiece, and the milling cutter stopped after cutting 108mm along a straight line. The total cutting length of a surface (i.e. 252 passes) is 108×252=27216mm. The LEICA-MZ12 microscope system was used to measure the side wear values ​​of 6 milling cutters numbered c1-c6. 315 tool wear values ​​were measured for each milling cutter, covering the entire life cycle of the tool from the beginning of processing to complete failure. The final 7-dimensional sensor data collected totaled 20GB, and the wear value data set for each milling cutter was 3GB.

[0096] The present invention will conduct one experiment using the out-of-order training method and one experiment using the time-series training method respectively, and apply SE-ResNet50 to obtain the prediction effects obtained by the two training methods respectively, and verify the effectiveness of the proposed method through comparative analysis of the experimental results.

[0097] Table 2 is the main equipment parameter table of the PHM data callenge experiment, and Table 3 is the cutting parameter table of the PHM data callenge experiment. The main experimental equipment used is shown in Table 2, and the cutting parameters are shown in Table 3.

[0098] Table 2

[0099]

[0100] Table 3

[0101]

[0102] The SE-ResNet50 model was developed using the GPU version of the Pytorch deep learning framework. Table 4 is the model training parameter table. The model training parameters are shown in Table 4, and the remaining parameters use the default settings.

[0103] Table 4

[0104]

[0105] The prediction model is based on mean square error MSE and determination coefficient R 2The mean absolute percentage error (MAPE) is used as an evaluation indicator. MSE is a measure of the difference between the estimator and the estimated quantity. The lower the MSE value, the higher the prediction accuracy of the model. The formula used is as follows:

[0106]

[0107] Where n is the number of samples, Y i is the true label, is the predicted label.

[0108] R 2 It measures the closeness of the sample data points relative to the regression line. It reflects the quality of the regression model's fit to the data points and is also the core indicator for measuring the prediction accuracy in tool wear curve prediction. The higher the determination coefficient, the higher the prediction accuracy of the model. Its formula is as follows:

[0109]

[0110] Among them, SSR is the regression sum of squares, SSE is the residual sum of squares, and SST is the total variance sum of squares. The detailed calculation formulas of the three sums of squares are as follows:

[0111]

[0112] in, is the mean of all sample points, is the predicted value, y i is the true value.

[0113] MAPE is an indicator that measures the difference between the predicted value and the actual value. It is usually used to evaluate the prediction performance of the model in regression analysis. Its calculation formula is:

[0114]

[0115] SE-ResNet50 out-of-order experiment:

[0116] The seven-dimensional data samples c1, c4, and c6 were selected for experiments based on SE-ResNet50. c1, c4, and c6 were randomly divided into training sets and test sets at a ratio of 8:2, and input into SE-ResNet50 for training and testing respectively. The present invention uses the c1 data set as the object to demonstrate the experimental process.

[0117] The SE-ResNet50 model is used for feature extraction, and then the extracted training set feature data is input into the SE-ResNet50 model for random order experiments.2 Evaluated with three indicators of MAPE. Figure 7 The following figure shows the iteration curves of the random experiment indicators of the SE-ResNet50 model using the c1 dataset. Since the iteration value changes greatly, the value changes of the iteration curve in the convergence part are not obvious, so the last 100 iterations of each indicator iteration curve are enlarged and drawn with red lines.

[0118] observe Figure 7 Iteration curves show that all indicators of the model have achieved effective convergence during the experiment. Among them, the training MSE converges around 4.1 and oscillates slightly, indicating that the model training is sufficient and stable. Among the test indicators, the MSE oscillates and converges around 10.7, and R 2 It is stable at around 0.98 and MAPE is stable at around 0.02, indicating that the test results have small errors and are stable.

[0119] Figure 8 The results of out-of-order training and predicted tool wear are shown. Figure 8 (a) and (b) are regression fitting diagrams of the training set and the prediction set. Since the actual back face size of each tool is different from the standard size, the dotted line close to the zero point in the figure represents the value of the tool in the original data set that has been worn before the first experimental cutting. Figure 8 It can be seen that except for some individual samples showing deviations, the overall prediction effect is good.

[0120] Table 5 is a summary table of experimental results. The experimental results of the three data sets c1, c4, and c6 are summarized in Table 5.

[0121] Table 5

[0122]

[0123]

[0124] Table 5 shows that the MSE of the training loss values ​​of the three prediction models are all lower than 5, indicating that the model convergence effect is good; the models trained by the three different data sets have good performance in the test R 2 There is no obvious difference in the three evaluation indicators of test MSE and test MAPE. Then the three groups of experimental results are averaged to observe the overall effect of the model. The results show that the average training time is 10.752h and the average test R 2 It reaches 0.990, and the sample average prediction time is 1.228s.

[0125] Based on the above random training results, it can be obtained that among the evaluation results of the three groups of prediction models, the prediction model trained by c6 has higher accuracy. Among the three indicators, the test MSE and test MAPE are better than the test results of the other two sets of data sets. In general, the wear prediction accuracy and monitoring time obtained by random training can meet the requirements of enterprise production for tool wear monitoring.

[0126] SE-ResNet50 timing experiment:

[0127] In order to verify the advanced nature of out-of-order training, the experimental settings of out-of-order training are retained, a time series experiment is conducted on the training data set, and the experimental results are compared and analyzed. Fig. 9 The data set timing training and test iteration curves of c1 applied to the SE-ResNet50 model are shown. During the experiment, the model's training MSE, test MSE, and test R 2 Both the MAPE and test results converge, but the R 2 The value is always negative. The R 2 Abnormal values ​​indicate that overfitting occurred during the time series experiment.

[0128] Fig.10 The numerical regression fit of the c1 dataset is shown. Figure 8 The c1 random order experimental results show that the regression fitting effect is better, which confirms the test R 2 The result is always negative.

[0129] Fig.11 The time comparison between out-of-order training and sequential training is shown. Fig.11 It can be seen that the training time for each iteration is longer than that of out-of-order training.

[0130] The time series experiment, random sequence experiment and actual tool wear curves are generated for the c1, c4 and c6 data sets respectively, and the wear prediction effects of the two training methods are compared visually. Fig.12 shown.

[0131] observe Fig.11 Curve, when using the time series training experimental method, test R 2 The value of is negative. Compared with the actual wear curve, the wear prediction curve has the same general trend and shape. However, there are many severely offset data in the predicted wear value, and the prediction effect is not good.

[0132] The above results are summarized and the experimental results of out-of-order training and time-series training are compared. Table 6 is a comparison table of the experimental results of out-of-order and time-series training, as shown in Table 6.

[0133] Table 6

[0134]

[0135] As shown in Table 6, based on the SE-ResNet50 model, the total training time is shortened by about 2 hours and the training time is increased by 23.65% when using out-of-order training compared with sequential training. 2 When it is a positive value, the model training effect is better and the overfitting problem is avoided.

[0136] Comparing the above experimental data results, it can be found that the model of out-of-order training is better than that of time-series training in terms of training time and prediction accuracy, which effectively improves the model's performance in resisting overfitting. After analysis, the main reason is that out-of-order training mainly breaks the specific law of data distribution when training in the original time sequence, that is, the distribution of multiple batches of training data is very similar, and the output wear results increase over time. The out-of-order training model can obtain more comprehensive information in each batch, making the gradient descent more stable and obtaining the global optimal value faster. Therefore, by shuffling the data set, the model training can learn more efficiently and converge more stably, thereby making more accurate predictions on unseen data.

[0137] Comparison of SE-ResNet50 with other research methods:

[0138] In order to compare the tool wear prediction effect of the method of the present invention with other methods, the present invention selects 6 tool wear prediction models that also use the PHM2010 milling data set for comparative analysis. The comparative evaluation criteria also use the test MES and test R 2 And test MAPE. Table 7 is a comparison table of test results of SE-ResNet50 and other methods. The test results of the prediction model are shown in Table 7.

[0139] Table 7

[0140]

[0141] After comparison, based on the three prediction accuracy evaluation indicators, the prediction method proposed in the present invention has more advantages in prediction performance than the other six methods, among which the advantage of the key indicator test MSE is more obvious. The test MSE of SE-ResNet50 of the present invention is 5.695, which is 0.853 lower than that of GADF-CNN with the best result among the above six methods; the test R 2The MAPE of the test of the present invention is 1.596, which is much lower than that of MRM, RBFN, BPNN, and slightly higher than that of the other three models. For the training time index, under the condition of obtaining a higher prediction accuracy, the training time of SE-ResNet50 is comparable to that of GASF-CNN and GADF-CNN.

[0142] like Fig.13 As shown, the tool wear prediction method provided by the present invention mainly includes three parts:

[0143] (1) Data division: The collected three-coordinate cutting force signals, three-coordinate vibration signals, and high-frequency stress wave signals are merged into a data file consisting of AG columns, which are randomly divided into training set and test set according to the sequence number in a ratio of 8:2.

[0144] (2) Training: First, adaptively extract features from the one-dimensional signal in the training set. Then, a prediction model is constructed through random training. The mean square error between the predicted value of tool wear and the actual value of tool wear is used as the loss function. After iterative convergence, the optimal weights of each layer connection are determined. Finally, the model training is completed and the training results are output.

[0145] (3) Test evaluation: First, the one-dimensional signal in the test set is adaptively feature extracted, then the prediction model is used for testing and the model performance is evaluated. The test results and training results are combined into a tool wear prediction curve in time series, and the tool wear prediction effect is evaluated by comparing it with the actual tool wear curve.

[0146] The present invention constructs a ResNet50 network that integrates the SE module of the attention mechanism to improve the feature extraction capability, thereby improving the prediction accuracy and generalization performance of the model; at the same time, during the training process, the out-of-order training method is adopted to further improve the overfitting problem of the big data high-depth model in the prediction process.

[0147] In summary, the tool wear prediction method based on random training of extrusion-excited residual neural network proposed in the present invention has achieved good results in both prediction accuracy and training time. The method of the present invention can meet the actual needs in tool wear prediction and has strong application potential.

[0148] The attention mechanism of the SE module is used to generate weights to mark the importance of features, thereby reducing the impact of redundant or irrelevant features and reducing the risk of overfitting of the prediction model; in addition, due to the reduction in the number of redundant or irrelevant features, the complexity of the model is reduced, thereby improving the training speed. The experimental results show that the prediction mean square error of this method reaches 5.695, the determination coefficient reaches 0.991, the average absolute percentage error reaches 1.596%, and the single monitoring time is about 1.228s. Based on the two evaluation indicators of goodness of fit and mean square error, the method of the present invention is greatly improved compared with the existing tool wear prediction method based on deep learning. The method of the present invention can provide an effective basis for monitoring actual tool wear.

[0149] Example 2

[0150] A computer device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the tool wear prediction method in the first embodiment.

[0151] Example 3

[0152] A computer-readable storage medium stores a computer program, which implements the tool wear prediction method in embodiment 1 when executed by a processor.

[0153] Example 4

[0154] A computer program product includes a computer program, which implements the tool wear prediction method in embodiment 1 when executed by a processor.

[0155] Example 5

[0156] A computer program product includes a computer program, wherein the computer program implements the tool wear prediction method in embodiment 1 when executed by a processor.

[0157] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0158] The present invention uses specific examples to illustrate the principles and implementation methods of the present invention. The above examples are only used to help understand the method and core ideas of the present invention. At the same time, for those skilled in the art, according to the ideas of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A tool wear prediction method, characterized in that: include: The SE-ResNet50 model based on the SE module is used to extract multiple fused one-dimensional signals in the tool wear data training set; the one-dimensional signal is the original time-frequency domain signal directly collected from the machine tool; the tool wear data is the side wear value of the milling cutter measured by the microscope system; the original time-frequency domain signal includes cutting force signal, vibration signal and high-frequency stress wave signal; the SE-ResNet50 model is a network model constructed by embedding the SE module into the ResNet50 residual neural network; the SE module is an attention mechanism module based on extrusion excitation; Disrupting the temporal variation rule of the original time-frequency domain signal, and using the disrupted original time-frequency domain signal to train the SE-ResNet50 model, generating a trained SE-ResNet50 model, and outputting the training result of the tool wear amount; The tool wear amount is predicted based on the trained SE-ResNet50 model.

2. The tool wear prediction method according to claim 1, characterized in that: The method further includes predicting tool wear according to the trained SE-ResNet50 model, and then: Extract and disrupt the one-dimensional signal in the tool wear data test set, input the disrupted one-dimensional signal into the trained SE-ResNet50 model, and output the tool wear test result; Combining the training results and the test results into a tool wear prediction curve according to a time series; The tool wear prediction curve was compared with the actual tool wear curve to evaluate the tool wear prediction effect of the trained SE-ResNet50 model.

3. The tool wear prediction method according to claim 1, characterized in that: The SE-ResNet50 model includes one first convolutional layer, four second convolutional layers and one fully connected layer connected in sequence; each of the second convolutional layers is embedded with an SE module, and the number of stacked layers of SE modules in the four second convolutional layers is 3, 4, 6 and 3 respectively; an attention mechanism function is added between two of the second convolutional layers, and the attention mechanism function is used to evaluate the weights of the outputs between the convolutional layers; The convolutional layer is c = {c1, c2, c3, ... c n }; Wherein, c is the tool loss dataset input by the convolutional layer, and the tool loss dataset is a tool loss training set or a tool loss test set; c n It is the nth input data in the tool loss data set; The attention mechanism function for Among them, Z i is the area to be identified, f Att The function adds attention weights between each convolutional layer; c i is the i-th input data in the tool loss data set.

4. The tool wear prediction method according to claim 1, characterized in that: The SE module specifically includes: a residual network convolution layer, a global pooling layer, a first fully connected layer, a Relu activation function layer, a second fully connected layer, a Sigmoid activation function layer and an adjustment layer connected in sequence; wherein the residual network convolution layer is also directly connected to the adjustment layer.

5. The tool wear prediction method according to claim 4, characterized in that: The data processing flow of the SE module is as follows: In the residual network convolution layer, a convolution operation is used to convert a feature sample X with an input size of H1×W1×C1 into a feature sample U with a size of H×W×C; wherein H and H1 are both signal lengths, W and W1 are both signal widths, and C and C1 are both signal feature channel numbers; In the global pooling layer, the feature sample U is subjected to global average pooling calculation to obtain a 1×1×C feature vector by using a squeezing operation; In the first fully connected layer, the 1×1×C feature vector is input into the first fully connected layer with the same number of feature channels by using an excitation operation; Calling the ReLu activation function in the Relu activation function layer to calculate the second fully connected layer; Calling the Sigmoid activation function in the Sigmoid activation function layer to generate the weight of each feature channel in the adjustment layer; The feature vector output by the adjustment layer is multiplied by the feature weight of the feature sample U by a weighted operation to obtain the feature vector finally output by the SE module.

6. The tool wear prediction method according to claim 1, characterized in that: The extraction process of the one-dimensional signal is: The one-dimensional signal is taken as the original matrix x 1,n ; A one-dimensional convolution layer is used to perform a convolution operation along the time axis by sliding a 1×k convolution kernel W to extract the feature matrix a corresponding to the original matrix. 1,i ; Among them, i is the output position, j is the position of the convolution kernel, s is the step size, b is the bias, m is the number of convolution operations performed by the convolution kernel, and w is the number of convolution operations performed by the convolution kernel. 1,j is the convolution kernel parameter matrix, x 1,(i-1)×s is the original signal matrix.

7. The tool wear prediction method according to claim 1, characterized in that: The time series variation rule of the original time-frequency domain signal is disrupted, and the SE-ResNet50 model is trained using the disrupted original time-frequency domain signal to generate a trained SE-ResNet50 model, and output the training result of the tool wear amount, specifically including: A random shuffling function is used to disrupt the temporal variation pattern of the original time-frequency domain signal; The SE-ResNet50 model is trained using the disrupted original time-frequency domain signal, and during the training process, whether the loss function converges is determined; If the loss function converges, the SE-ResNet50 model is used as a trained SE-ResNet50 model, and the training result of the tool wear amount is output; If the loss function does not converge, adjust the model parameters of the SE-ResNet50 model, and retrain the adjusted SE-ResNet50 model using the disrupted original time-frequency domain signal until the loss function converges.

8. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the tool wear prediction method according to any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the tool wear prediction method described in any one of claims 1 to 7 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the tool wear prediction method described in any one of claims 1 to 7 is implemented.