Single-working-condition tool wear prediction method based on deep fusion network
By adopting a deep fusion network in tool wear prediction and combining neural network models such as TCN, SpAtt and BiLSTM, the problem of difficulty in capturing complex timing characteristics in the existing technology is solved, and accurate prediction of tool wear is achieved, and prediction accuracy and reliability are improved.
Patent Information
- Application Number
- CN202510046720.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2025-04-18
AI Technical Summary
The prior art is difficult to fully capture complex timing-dependent characteristics in tool wear prediction, resulting in difficulty in improving prediction accuracy.
The prediction method based on deep fusion network is adopted, combined with the timing convolutional neural network (TCN), the multi-head probability sparse self-attention mechanism (SpAtt), and the bidirectional long and short-term memory neural network (BiLSTM), and the sensor signal data are preprocessed and feature extracted to achieve accurate prediction of tool wear.
Through the multi-stage processing process, the key information of timing data is deeply mined, which significantly improves the accuracy and reliability of tool wear prediction and achieves accurate prediction of tool wear.
Smart Images

Figure CN119848466A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a method for predicting wear of milling cutters. Background Art
[0002] In the high-speed milling process, tool wear has a significant impact on the surface quality and dimensional accuracy of the workpiece. As an important component of milling, tool wear is inevitable. Its state change not only affects the quality of the workpiece, but may even interrupt the entire machining process. At present, tool wear prediction technology is divided into direct method and indirect method. The direct method directly measures the physical state of the tool surface, such as the wear area and the wear width of the flank face, through a CCD (charge coupled device) camera or a microscope, but it requires stopping the machine for measurement and cannot be measured on the machine. Since it cannot continuously collect data, the direct method performs poorly in dealing with sudden failure of the tool and cannot detect potential problems in time. The indirect method collects cutting force, vibration, acoustic emission and other signals, and combines signal preprocessing and prediction models to achieve wear prediction. Compared with the direct method, the indirect method can monitor the wear state of the tool in real time without interfering with the machining process, thereby effectively solving the problem that the direct method cannot continuously collect tool wear values. Through the dynamic signals collected by the sensor, the indirect method can capture the wear state of the tool in time and even predict the sudden failure of the tool in advance. This makes the indirect method have greater advantages in practical applications, and therefore has become one of the main research directions of current tool wear prediction technology.
[0003] At present, most tool wear prediction models based on deep learning mainly rely on convolutional neural networks (CNN) or recurrent neural networks (RNN). However, these models alone perform poorly when processing long time series signals and are difficult to fully capture complex time series dependency characteristics. As an improved model of RNN, long short-term memory neural network (LSTM) is superior to CNN and traditional RNN in processing long time series signals. However, when the sequence length is too long, its ability to capture long-range dependencies is still limited, and it is difficult to mine key features from large-scale time series data. Although the self-attention mechanism can effectively break through the limitation of sequence length and has strong feature extraction capabilities, its high computational complexity limits its practical application. The single neural network model is insufficient in mining the global correlation and key features of time series information, which makes it difficult to further improve the prediction accuracy of tool wear values.
[0004] Therefore, it is necessary to propose a prediction method that integrates multiple neural network models to more comprehensively capture the complex features in long time series signals, thereby effectively improving the accuracy and reliability of tool wear prediction. Summary of the invention
[0005] In order to solve the problems existing in the prior art, the present invention adopts the following technical solutions:
[0006] A single-condition tool wear prediction method based on a deep fusion network is provided, and the method comprises the following steps:
[0007] Step 1: Use the third quartile-based method to process the sensor signal data and eliminate the invalid data of the idle tool. The sensor data is a time series and corresponding sensor data values, including force data in three directions of XYZ, acceleration data in three directions of XYZ and acoustic emission data; Specifically, the processing process of step 1 is: first, the sample data generated by a single cutting is arranged in ascending order according to the size of the sensor signal value; then the third quartile Q3 of the sample data is calculated, which is the critical value of invalid data; the data points with signal values less than Q3 in the feed data and the retract data are eliminated respectively, and the remaining data are retained to form a new sample data, and the new sample data and the corresponding back tool wear value of each cutting are combined into a new data set and divided into a training set and a test set;
[0008] Step 2: Use wavelet denoising to perform denoising on the new sample data obtained in step 1; the process of wavelet denoising is as follows: select the sym8 wavelet basis function, perform 5-layer wavelet decomposition on the new sample data to be processed, obtain wavelet coefficients, perform threshold processing on the wavelet coefficients, set the coefficients less than the threshold to zero, and retain the coefficients greater than the threshold, thereby reducing the impact of noise, and finally use the wavelet coefficients after threshold processing to reconstruct the data through inverse wavelet transform.
[0009] Step 3: Downsample the reconstructed data obtained in step 2 to obtain tensor data;
[0010] Step 4: Input the tensor data obtained in step 3 into a prediction network model based on a deep fusion network, wherein the prediction network model includes a sequentially connected temporal convolutional neural network (TCN), a multi-head probabilistic sparse self-attention mechanism (SpAtt), and a bidirectional long short-term memory neural network (BiLSTM);
[0011] Step 4.1: The tensor data obtained in step 3 is first input into the Temporal Convolutional Network (TCN). The TCN includes causal convolution, dilated convolution and residual block. The input data is processed by causal convolution and dilated convolution in turn and then output. The residual block is used to alleviate the gradient vanishing problem.
[0012] Step 4.2: Input the data output from step 4.1 into the multi-head probabilistic sparse self-attention mechanism (SpAtt), and use SpAtt to adaptively identify, select, and extract the global key features of the time series data.
[0013] Step 4.3: Use BiLSTM to capture the forward and backward dependencies of the sequence, mine the forward and backward correlations of the time series information, and output the tool damage prediction value through the fully connected layer.
[0014] The single-condition tool wear prediction method based on deep fusion network further specifically includes the following steps:
[0015] 1) After the sensor signal data in the data is preprocessed in steps 1 to 3, combined with the flank wear value data, the data is divided into a training set and a test set;
[0016] 2) Use the data of the training set to train the prediction network model in step 4 until the loss function value converges, that is, when the loss function of the training set is between 0.0003 and 0.0005, the model training is completed;
[0017] 3) Use the trained model to process the test set data to obtain the tool wear data prediction value;
[0018] Compared with the prior art, the present invention has the following beneficial effects:
[0019] (1) The present invention aims at the problem of full life cycle prediction of tool wear in a single working condition. Traditional methods are difficult to fully capture these complex and lengthy time series. The lengthy original data is preprocessed, and the preprocessing process includes using a method based on three quartiles to process invalid data in the original time series. Then, the wavelet threshold method is used to effectively separate the noise components in the signal by utilizing the multi-scale analysis ability of wavelet transform, and finally downsampling is performed. Secondly, a prediction network model based on a deep fusion network is introduced. First, a time series convolutional neural network (TCN) is used to capture the long-term dependencies in the time series; then a multi-head probabilistic sparse self-attention mechanism (SpAtt) is used to extract the global key features in the time series data in an adaptive manner, and deeply mine the key information of the time series data; then a bidirectional long short-term memory neural network (BiLSTM) is used to capture the forward and backward dependencies of the sequence, and the correlation between the time series information before and after is mined. Finally, the feature dimension is mapped to the predicted tool wear value through a multi-layer fully connected layer. The whole process realizes the nonlinear mapping between the signal data and the back tool wear, and realizes the accurate prediction of tool wear.
[0020] (2) The present invention only uses the dynamic parameters of the machining process, which include the force signals in the three directions of X, Y, and Z in the machine tool worktable, the vibration signals in the three directions of X, Y, and Z generated during the machine tool machining, and the acoustic emission signals generated during the milling process. These dynamic parameters of the machining process are then preprocessed, including invalid value processing, wavelet denoising, and downsampling.
[0021] (3) The present invention uses a temporal convolutional neural network (TCN) to capture long-term dependencies in time series. The training mechanism of TCN is similar to that of a conventional convolutional network. However, it modifies the convolution operation by introducing the concepts of causal convolution and dilated convolution, ensuring the unidirectionality of information flow and increasing the receptive field of the network.
[0022] (4) The present invention uses a multi-head probabilistic sparse self-attention mechanism (SpAtt) to extract global key features in time series data in an adaptive manner and deeply mine the key information of time series data.
[0023] (5) The present invention uses a bidirectional long short-term memory neural network (BiLSTM) to capture the forward and backward dependencies of the sequence, mine the correlation between the time series information before and after, and finally maps the feature dimensions to the predicted tool wear value through multiple layers of fully connected layers. The whole process realizes the nonlinear mapping between signal data and the back tool wear amount, and realizes the accurate prediction of tool wear.
[0024] (6) The prediction model proposed in the present invention combines the advantages of each component through a multi-stage processing flow, ensuring that the causal correlation between different time points in the lengthy original time series is gradually extracted and learned from the initial data, ultimately achieving accurate prediction of tool wear. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 The present invention provides a schematic diagram of the overall structure of a prediction network model for a single-condition tool wear prediction method based on a deep fusion network; DETAILED DESCRIPTION
[0026] The specific embodiments of the present invention are given below. The specific embodiments are only used to further illustrate the present invention in detail and do not limit the protection scope of the present invention.
[0027] The present invention provides a single-condition tool wear prediction method based on a deep fusion network (hereinafter referred to as the method), which comprises the following steps:
[0028] Step 1: Use the third quartile-based method to process the sensor signal data and eliminate invalid data of idle tool passes. The sensor data is a time series and corresponding sensor data values, including force data in three directions of XYZ, acceleration data in three directions of XYZ, and acoustic emission data. Specifically, the processing process of step 1 is as follows: first, the sample data generated by a single cutting is arranged in ascending order according to the size of the sensor signal value; then the third quartile Q3 of the sample data is calculated, which is the critical value of invalid data; the data points with signal values less than Q3 in the feed data and the retract data are eliminated respectively, and the remaining data are retained to form a new sample data, and the new sample data and the corresponding back tool wear value of each cutting are combined into a new data set and divided into a training set and a test set.
[0029] Step 2: Use wavelet denoising to perform denoising on the new sample data obtained in step 1; the process of wavelet denoising is as follows: select the sym8 wavelet basis function, perform 5-layer wavelet decomposition on the new sample data to be processed, obtain wavelet coefficients, perform threshold processing on the wavelet coefficients, set smaller coefficients to zero, and retain larger coefficients, thereby reducing the impact of noise, and finally use the wavelet coefficients after threshold processing to reconstruct the data through inverse wavelet transform.
[0030] The formula used for threshold processing is as follows:
[0031]
[0032] In formula (1), cD 1 is the detail coefficient of the first layer of wavelet decomposition, N is the data length (i.e. the amount of sample data after each step of processing), and M is the median of the data; a compromise method of soft and hard thresholds is adopted:
[0033]
[0034] In formula (2), x is the sensor signal data value at the current moment. sgn(x) is used to perform soft or hard threshold processing on the signal according to different threshold processing methods to help filter out noise and extract the effective components of the signal.
[0035] In order to verify the quality of the sensor time series data after wavelet denoising, the signal-to-noise ratio (SNR) is used to judge the denoised result. The calculation formula of SNR is shown in (3):
[0036]
[0037] Ps is the signal power and Pn is the noise power
[0038]
[0039] It can be seen from the above table that the signal after denoising is smoother and the SNR of the signal is nearly doubled, which proves that the wavelet threshold denoising used can remove the noise in the signal.
[0040] Step 3: Downsample the reconstructed data obtained in step 2 to obtain tensor data;
[0041] Step 4: Input the tensor data obtained in step 3 into a prediction network model based on a deep fusion network, wherein the prediction network model includes a sequentially connected temporal convolutional neural network (TCN), a multi-head probabilistic sparse self-attention mechanism (SpAtt), and a bidirectional long short-term memory neural network (BiLSTM); the network structure of the prediction network model is as follows: Figure 1 As shown, specifically including
[0042] Step 4.1: The tensor data obtained in step 3 is first input into the Temporal Convolutional Network (TCN). The TCN includes causal convolution, dilated convolution and residual block. The input data is processed by causal convolution and dilated convolution in turn and then output. The residual block is used to alleviate the gradient vanishing problem. The causal convolution is used to ensure that the prediction network model strictly follows the time sequence, that is, the prediction only depends on the current and previous inputs, and will not use future data. The expression of causal convolution is shown in the following formula (4):
[0043]
[0044] Among them, f is the convolution kernel, k is the convolution kernel size, and x is the input sequence.
[0045] The dilated convolution inserts blanks between the elements in the convolution kernel, allowing the convolution operation to skip some input units, covering a wider input range while keeping the number of parameters unchanged, thereby better capturing the contextual information in the data. The expression of the dilated convolution is shown in the following formula (5):
[0046]
[0047] Among them, d is the dilation factor, which is a hyperparameter of the dilated convolution and determines the spacing between the elements in the convolution kernel. For example, when the dilation factor is 2, one input unit will be skipped between the elements of the convolution kernel. Generally speaking, TCN uses d=2 in the lth layer. l As a dilation factor, the receptive field of each layer will grow exponentially. The dilation rate refers to the range covered by the dilated convolution kernel on the input data. For example, as the dilation factor d increases, the convolution kernel can cover a longer input time series with fewer layers, thereby increasing the receptive field of the model. The dilation factor directly determines the size of the dilation rate. Usually, the dilation factor increases exponentially in each layer, which ensures that the receptive field is rapidly expanded while adding convolutional layers, improving the ability to capture long-term dependencies.
[0048] The residual block is used to perform a residual connection operation on the convolution result. In the residual connection, the output of a layer of the convolutional network is superimposed with the input of several layers before to form a "jump connection". Specifically, if the input is x, and F(x) is obtained after several layers of calculation, then the final output is not F(x) itself, but x+F(x), that is, the input and output are added. Such a structure allows the gradient to be easily propagated back to earlier layers during back propagation, thereby alleviating the gradient vanishing problem and facilitating the effective training of deeper networks. The output expression of the residual block is shown in the following formula (6):
[0049] output=activation(input+F(input)) (6)
[0050] Here, F is the combination of convolutional layer and activation function.
[0051] Step 4.2: Input the data output from step 4.1 into the multi-head probabilistic sparse self-attention mechanism (SpAtt), and use SpAtt to adaptively identify, select, and extract the global key features of the time series data, thereby mining effective information and reducing computational complexity.
[0052] Specifically, in step 4.2, the query vector Q is screened by the multi-head probabilistic sparse self-attention mechanism, and useless Q vectors are eliminated. The specific process is to first randomly sample the key vector K vector, then calculate the inner product between each query vector Q and the key vector K, calculate the distance between the probability distribution of the dot product pair of the query vector Q and the key vector K (query vector Q, key vector K, calculate the dot product of Q and K) and the discrete uniform distribution, and filter out the dominant dot product pairs; the query sparsity measure based on KL divergence is used, and its expression is shown in formula (7):
[0053]
[0054] Where M(q i ,K) is expressed as the correlation difference value; q i , are the i-th query vector and j-th key transposed vector in Q and K respectively; L K is the total number of vectors in the key vector matrix. The first term in equation (7) calculates q i The second term calculates q for the LSE (Log-Sum-Exp) value of all keys. i The arithmetic mean of the attention scores for all keys. i When the M value is large, it means that q i There is a significant difference in the correlation between each time step in the sequence; on the contrary, if the M value is small, it means that q iThe correlation with each time step in the sequence is almost the same, which has little effect on the model capturing the temporal dependency. Then, the value of u is set in advance, and its expression is shown in formula (8). The value of u can be determined according to the length of the input sequence, and c is the sampling factor; L Q is the input sequence length. Under the same input sequence length, the lower the c value, the fewer points involved in the attention weight calculation, the higher the calculation efficiency, but it may not fully capture the temporal dependency. In actual prediction tasks, it can be adjusted appropriately according to the prediction effect;
[0055] u=c×lnL Q (8)
[0056]
[0057] However, filtering the query vector will result in different numbers of input and output vectors. To ensure that the number of vectors does not change, a uniform distribution is used to replace the missing inner product distribution.
[0058] Step 4.3: Using BiLSTM, not only can the time series features be fully captured in the time dimension through forward and backward information transfer, but also the input data can be highly abstracted in the feature dimension to extract key features, further extract spatiotemporal features, and output the tool loss prediction value through the fully connected layer.
[0059] Preferably, in step 4.3, the BiLSTM includes two LSTM units, a forward unit and a reverse unit, and each LSTM has three control gates, including an input gate, an output gate, and a forget gate. The reading and modification of memory units in the LSTM are realized by the input gate, the forget gate, and the output gate, which are generally described by sigmoid or tanh functions. t Indicates "cell state", the state at the last moment is not only h t-1 , there are also c t-1 Pass it down, where c t-1 Corresponding to long-term memory, h t-1 Corresponding to short-term memory, this is the origin of long short-term memory.
[0060] The forget gate determines what information is discarded from the "cell state". Because it is activated by sigmoid, values close to 0 are forgotten, and values close to 1 are remembered and passed on. The input gate determines what information is put into the "cell state" for data enhancement. t Represents the ignore factor, which determines which parts to delete. The sigmoid layer determines what values need to be removed and updated; the tanh layer creates a new information vector c t After the previous operation, the deletion and addition of the transmitted information can be determined, that is, the "cell state" can be updated (ct-1 Updated to c t ). When it reaches the "output gate", it first runs a sigmoid layer to determine which part of the cell state will be output, then uses tanh to process the cell state to get a value between -1 and 1, and then multiplies it with the output of the sigmoid gate to output the part that the program determines to be output.
[0061] 1. Input Gate:
[0062] Based on the current input x t and the previous state h t-1 Calculate the input gate vector i t , controls the current input x t degree of joining.
[0063] i t =σ(W i x t +U i h t-1 +b i ) (10)
[0064] Where W i , U i and b i is a learnable parameter and σ is the sigmoid function.
[0065] 2. Forget Gate:
[0066] Based on the current input x t and the previous state h t-1 Calculate the forget gate vector f t , control the previous state h t-1 degree of forgetfulness.
[0067] f t =σ(W f x t +U f h t-1 +b f ) (11)
[0068] Where W f , U f and b f is a learnable parameter and σ is the sigmoid function.
[0069] 3. Storage unit:
[0070] Based on the current input x t , the previous state h t-1 and the input gate vector i t and the forget gate vector f t Calculate the storage unit vector c t.
[0071] c t =f t ⊙c t-1 +i t ⊙tanh(W c x t +U c h t-1 +b c ) (12)
[0072] Where ⊙ represents element-by-element multiplication and tanh represents the hyperbolic tangent function.
[0073] 4. Output gate:
[0074] Based on the current input x t and the previous state h t-1 and storage unit c t Calculate the output vector o t , control output h t degree.
[0075] o t =σ(W o x t +U o h t-1 +b o ) (13)
[0076] Where W o , U o and b o is a learnable parameter and σ is the sigmoid function.
[0077] 5. Final output:
[0078] According to the storage unit c t and the output gate vector o t Calculate the current state h t .
[0079] h t =o t ⊙tanh(c t ) (14)
[0080] Any matters not described in the present invention are applicable to the prior art.
[0081] Embodiment 1:
[0082] The milling cutter wear data provided by the PHM2010 single-condition data set is processed by a single-condition tool wear prediction method based on a deep fusion network. The tool wear prediction value can be obtained based on the sensor signal data of a single cutting. The specific method is as follows:
[0083] 1) After the sensor signal data in the data is preprocessed in steps 1 to 3, combined with the flank wear value data, data is divided into a training set and a test set, wherein the downsampling operation in step 3 reduces the sequence length of a single sequence to 5000;
[0084] 2) Use the data of the training set to train the prediction network model in step 4. When the loss function no longer decreases, that is, the loss function of the training set is between 0.0003 and 0.0005, the model training is completed;
[0085] 3) Use the trained model to process the test set data to obtain the predicted value of tool wear data.
[0086] In this embodiment, the tool wear error prediction model is based on the PyTorch framework, and the learning rate of the training model is set to 0.001. When the training set is divided, C1 and C4 in the PHM2010 single-condition data set are used as training sets, and C6 is used as a test set. Then C1 and C6 are selected as training sets, C4 is used as a test set, and then C4 and C6 are selected as training sets, and C1 is used as a test set, for a total of 3 times. The remaining training times are set to 150, the input sequence length is set to 5000, and the batch-size is set to 16 during training and testing.
[0087] The C1 data set, C4 data set, and C6 data set are used to predict tool wear. The evaluation index parameters of the true value-prediction value regression fitting curve are shown in the following table.
[0088]
[0089] The results show that data from different data sets can all be used to effectively predict tool wear using the method provided by the present invention.
Claims
1. A single-condition tool wear prediction method based on deep fusion network, characterized in that: The method comprises the following steps: Step 1: Use the third quartile-based method to process the sensor signal data and eliminate invalid data of idle cutting. The sensor data consists of a time series and its corresponding sensor measurement values, including force data in three directions of XYZ, acceleration data in three directions of XYZ, and acoustic emission data. Specifically, the processing process of step 1 is as follows: first, the sample data generated by a single cutting is sorted from small to large according to the absolute value of the sensor signal; then the third quartile Q3 of the sample data is calculated, which is the critical value of invalid data; the data points with signal values less than Q3 in the feed data and the retract data are eliminated respectively, and the remaining data are retained to form a new sample data, and the new sample data and the corresponding back tool wear value of each cutting are combined into a new data set and divided into a training set and a test set; Step 2: Use wavelet denoising to perform denoising on the new sample data obtained in step 1; the process of wavelet denoising is as follows: select the sym8 wavelet basis function, perform 5-layer wavelet decomposition on the new sample data to be processed, obtain wavelet coefficients, perform threshold processing on the wavelet coefficients, set the coefficients less than the threshold to zero, and retain the coefficients greater than the threshold, so as to reduce the influence of noise, and finally use the wavelet coefficients after threshold processing to reconstruct the data through inverse wavelet transform; Step 3: Downsample the reconstructed data obtained in step 2 to obtain tensor data; Step 4: Input the tensor data obtained in step 3 into a prediction network model based on a deep fusion network, wherein the prediction network model includes a sequentially connected temporal convolutional neural network (TCN), a multi-head probabilistic sparse self-attention mechanism (SpAtt), and a bidirectional long short-term memory neural network (BiLSTM); Step 4.1: The tensor data obtained in step 3 is first input into the Temporal Convolutional Network (TCN). The TCN includes causal convolution, dilated convolution and residual block. The input data is processed by causal convolution and dilated convolution in turn and then output. The residual block is used to alleviate the gradient vanishing problem. Step 4.2: Input the data output from step 4.1 into the multi-head probabilistic sparse self-attention mechanism (SpAtt), and use SpAtt to adaptively identify, select, and extract the global key features of the time series data; Step 4.3: Use BiLSTM to capture the forward and backward dependencies of the sequence, mine the forward and backward correlations of the time series information, and finally output the tool damage prediction value through the fully connected layer.
2. A single-condition tool wear prediction method based on a deep fusion network as claimed in claim 1, characterized in that: The specific steps include: After the sensor signal data in the data is preprocessed in steps 1 to 3, combined with the flank wear value data, the data is divided into a training set and a test set; The prediction network model in step 4 is trained using the data of the training set until the loss function value converges, that is, when the loss function of the training set is between 0.0003 and 0.0005, the model training is completed; The trained model is used to process the test set data to obtain the predicted value of tool wear data.
Citation Information
Cited By
Mortise broach wear state identification method
CN120995069A