# Tool Wear Monitoring with Vibration Signals Based on Short-Time Fourier Transform and Deep Convolutional Neural Network in Milling

Authors: Zhiwen Huang; Jianmin Zhu; Jingtao Lei; Xiaoru Li; Fengqing Tian
Journal: Mathematical Problems in Engineering
 (2021)

---

## Abstract

Tool wear monitoring is essential in precision manufacturing to improve surface quality, increase machining efficiency, and reduce manufacturing cost. Although tool wear can be reflected by measurable signals in automatic machining operations, with the increase of collected data, features are manually extracted and optimized, which lowers monitoring efficiency and increases prediction error. For addressing the aforementioned problems, this paper proposes a tool wear monitoring method using vibration signal based on short-time Fourier transform (STFT) and deep convolutional neural network (DCNN) in milling operations. First, the image representation of acquired vibration signals is obtained based on STFT, and then the DCNN model is designed to establish the relationship between obtained time-frequency maps and tool wear, which performs adaptive feature extraction and automatic tool wear prediction. Moreover, this method is demonstrated by employing three tool wear experimental datasets collected from three-flute ball nose tungsten carbide cutter of a high-speed CNC machine under dry milling. Finally, the experimental results prove that the proposed method is more accurate and relatively reliable than other compared methods.


---

## Body

## 1. Introduction

In the metal cutting process, tool wear seriously reduces the workpiece quality, lowers the machining efficiency, and increases the manufacturing costs; thus, tool wear monitoring becomes increasingly significant in precision machining [1]. For achieving the online monitoring of tool wear without interrupting the machining process, researchers collected measurable signals (such as cutting force, vibration, and acoustic emission) to reflect the real-time tool wear [2].As the data are generally collected faster than diagnosticians directly analyze them [3], there is an urgent need for artificial intelligence methods of tool wear monitoring that can efficiently analyze massive data to obtain accurate results automatically. Wang et al. adopted dimension reduction methods to select 54 features extracted from three directional force and vibration signals and applied support vector regression (SVR) to predict tool wear [4]. Hong et al. employed wavelet packet transform and Fisher’s linear discriminant for tool wear monitoring [5]. Kong et al. used the integrated radial basis function-based kernel principal component analysis (KPCA) to fuse 48 features extracted from the three orthogonal cutting forces and constructed the Gaussian process regression-based tool wear predictive model [6]. Yu et al. selected root mean square of the vibration signal and developed weighted hidden Markov model for tool wear monitoring [7]. Aliustaoglu et al. selected, respectively, four statistical parameters calculated from force, vibration, and machine sound signals and sent them to fuzzy inference system for tool wear condition monitoring [8]. Ghosh et al. employed feature space filtering to find the most informative features extracted from sensors and developed a neural network-based fusion model for tool wear monitoring [9]. Wu et al. used correlation analysis, monotonicity, and autocorrelation to optimize 66 features extracted from multisensor signals, fused features through adaptive neurofuzzy inference system, and predicted remaining useful life (RUL) of machining tools by polynomial curve fitting method [10].However, because the capacity to learn complex nonlinear relationships and handle big datasets is restricted by the shallowed network structure in these methods, the researches have to manually extract and optimize features from measured signals, largely relying on prior knowledge about dimension reduction techniques and data fusion methods. The manual feature selection often leads to the loss of potential effective features, which is difficult to increase the accuracy of tool wear monitoring. Moreover, these complex feature selections and fusions are often proved to be computationally costly operations that may ultimately restrict the applications of such methods in real-time monitoring.Recently, powerful data mining characteristics of deep learning [11] have attracted the attention of researchers in many fields and helped them to solve many challenges in machine learning domain [12]. Zhao et al. designed a convolution bidirectional long-short term memory network for tool condition monitoring in milling process [13]. Aghazadeh et al. employed convolutional neural network for tool wear estimation and improved the predicting accuracy [14]. Deutsch et al. proposed a deep learning-based method for RUL prediction of rotating components [15]. Wu et al. proposed utilizing vanilla long-short term memory network for RUL prediction of aircraft gas turbine engines [16]. Although these methods work effectively to a certain extent, features are still selected manually based on particular problems and may easily lead to the loss of information that may be applicable to other problems, which not only reduces prediction accuracy but also limits expansion of the application.Considering the brilliant achievements of deep convolutional neural network (DCNN) in image classification and recognition of big datasets [17], correspondingly, some researchers have imaged the raw signals and then proposed some new diagnostic and prognostic methods based on DCNN. Fu et al. imaged vibration signals and fed them into the constructed convolutional neural network model, obtaining better comprehensive performance in the drilling process [18]. Park et al. proposed a convolutional neural network-based method to inspect nonpatterned welding defects on the surface of the engine transmission, which is more effective confirmed by experimental studies [19]. However, they only took DCNNs as classifiers for state diagnosis, which are unable to make the real-time continuous prediction of tool wear.In the prognostic terms, Li et al. used a time window to image the raw signal and then input them into a DCNN, which improved the prognostic accuracy on the RUL estimation of the engine dataset [20]. Babu et al. imaged the time series data and proposed a novel DCNN based regression approach for estimating the RUL, which is more efficient and accurate than the existing shallow regression model on two publicly datasets [21]. Therefore, it is a feasible strategy using the appropriate method to image the acquired signals and then feed them into the DCNN for prediction. Nevertheless, the datasets used in these methods are small, which ignored the data mining capabilities of these deep networks for big datasets. Furthermore, these are still rarely applied in the current online continuous prediction of tool wear.For enhancing predicting performance, the paper presents a tool wear monitoring method, which firstly obtains image representation of collected vibration signals based on STFT and then establishes the relationship between obtained time-frequency maps and real-time tool flank wear based on the designed DCNN model. This paper is organized as follows: Section2 explains the proposed method. Experimental setup is described in Section 3. In Section 4, the proposed model is validated and results are discussed. Section 5 is dedicated to conclusion.


## 2. Tool Wear Monitoring Methodology

To effectively take advantage of vibration signals for monitoring tool wear, the tool wear monitoring method based on STFT and DCNN is proposed in this paper, which firstly images the raw signal based on STFT and then designs the predicting model based on DCNN. As shown in Figure1, the proposed method involves two processes and includes data acquisition, image representation based on STFT, model designing based on DCNN, and tool wear predicting.Figure 1
The framework of the proposed tool wear monitoring method in milling.In the offline modeling process, the vibration signals are acquired by accelerometer sensors installed on the CNC machine; meanwhile, the actual tool flank wear width in the milling process is measured by the microscope as the target labels. Then, the acquired vibration signals are imaged based on STFT to generate time-frequency maps, which are set as training and validating datasets. Next, the model for tool wear monitoring is designed based on DCNN, taking the training and validating datasets and the target labels as input. Finally, after network training and performance evaluation, an optimized model is obtained for real-time tool wear monitoring.In the online predicting process, the signals are acquired by accelerometer sensors and then are imaged into time-frequency maps based on STFT as the testing datasets, which are input to the optimized DCNN model to predict tool wear. Therefore, through offline modeling and online predicting, the proposed method realizes the real-time tool wear monitoring in the milling process.


### 2.1. Image Representation Based on STFT

Vibration signal is considered one of the signals suitable for field acquisition because it is convenient to collect and sensor installation hardly affects the processing operation [22]. Thus, the proposed method uses vibration signal to predict tool wear in milling process. In addition, the vibration signal is a nonstationary and time-varying signal as a whole [22]. As one of the most frequently-used time-frequency analysis methods [23], STFT is widely utilized in vibration signal processing. Therefore, this paper firstly uses STFT to visualize the vibration signal collected by the accelerometer sensor. The main steps of image representation are as shown in Figure 2(a).Figure 2
(a) Main steps of mage representation based on STFT, (b) illustration of data frame, and (c) illustration of time-frequency maps.Firstly, determine relevant parameters for imaging the raw vibration signals based on STFT, as shown in Figure2(b), which includes number of samples for image representation every time (NS), frame length (FL), ratio of overlap between adjacent frames to frame length (RO), and type of window (TW).Then, calculate STFT of the sampling signals. The discrete STFT is calculated as follows [24]:(1)STFTn,k=∑m=0N−1xmwn−me−j2πkm/N,where n is the time variable, k is the frequency variable, xm is the sampling signal, wn−m is the window function, and N equals NS.Next, calculate the power spectral density (PSD) and the obtained two-dimensional matrix information in time-frequency domain is displayed by pseudocolor map. The PSD function is defined as follows [24]:(2)Pn,k=STFTn,k×conjSTFTn,k.The time-frequency map of vibration signal is obtained as shown in Figure2(c), which expresses the comprehensive and dynamic information of the raw vibration signals and provides an effective imaging representation for real-time tool wear monitoring.Finally, convert the obtained time-frequency map to meet the requirement of input layer dimension of the designed DCNN model for the real-time tool wear monitoring, and the pixels of converted map are written into the datasets as the input of the DCNN model.


### 2.2. Model Designing Based on DCNN

DCNN is widely used to learn complex nonlinear relationship, because it has a powerful ability of data mining and feature extraction. As a result, in this paper, the real-time tool wear monitoring model in milling process is designed based on DCNN. As shown in Figure3, the designed DCNN model for tool wear monitoring consists of one input layer, three convolutional layers, three pooling layers, one fully connected layer, and one output layer. Concretely, the input layer is the pixel matrix obtained by signal imaging based on STFT, the alternately convolutional and pooling layers are used for adaptive feature extraction of input data, and the output layer with three neurons is employed to monitor three flutes wear of milling cutter. The algorithms for each layer of the DCNN model are separately described as follows.Figure 3
Schematic diagram of the design TFS-DCNN model for tool wear monitoring.The convolutional layer convolves the local regions of input matrix with filter kernels, followed by the activation unit to generate the output in the forward propagation process. The output of convolutional network can be considered as the feature map obtained by adaptive feature extraction of input image representation. The forward propagation of the convolutional layer is calculated as follows:(3)Xjl=f∑i∈MjXil−1∗Kijl+bji,where Xjl is the lth element of the lth layer input, Xil−1 is the ith element of the l−1th layer input, Kijl is the lth layer kernels indexed by i,j, Mj represents local regions of input maps, bjl is jth element of the lth layer bias, and f⋅ is the ReLU function.The backpropagation algorithm [25] is used to update parameters of convolutional layer in the training process. Taking L as the loss function, then the calculation is given as follows:(4)∂L∂Kijl=∑u,vδjlu,v⋅Pil−1u,v,∂L∂bjl=∑u,vδjlu,v,where Pil−1 is the patch in Xil−1 that was multiplied elementwise by Kijl during convolution to calculate the element at u,v in Xjl and δjl is the jth element of the lth layer sensitivities.Although the convolutional layer can significantly cut down the connections between different layers, the neurons in each convolutional output are not obviously reduced. Thus, the pooling layer is carried out behind the convolutional layer to reduce the dimension of feature map significantly, avoid overfitting, and protect the scale invariance of extracted feature [26]. The computation of the pooling layer in forward propagation process is defined as follows:(5)Xjl=fβjl⋅downXjl−1+bjl,where down⋅ denotes the maximum pooling function and βjl is a multiplicative bias given to the jth output of the lth layer.Correspondingly, the parameters of the pooling layer are updated as follows:(6)∂L∂βjl=∑u,vδjl⋅downXjl−1u,v,∂L∂bjl=∑u,vδjlu,v.For the fully connected layer, the neurons are all jointed to the previous layer of feature map; the output of which is as follows:(7)Xl=σWlXl−1+bl,where σ⋅ is the sigmoid function, Wl is the lth layer weight, and bl is the lth layer bias.Similarly, the backpropagation of fully connected layer is calculated as follows:(8)∂L∂Wl=δlXl−1T,∂L∂bl=δl.The Euclidean distance between the measured flank wear widthy and the predicted flank wear width y^ is regarded as loss function to train the constructed DCNN model for tool wear monitoring, and the expression is given as follows:(9)L=12N∑i=1Ny^i−yi22,where N denotes the number of time-frequency maps in training dataset.


## 2.1. Image Representation Based on STFT

Vibration signal is considered one of the signals suitable for field acquisition because it is convenient to collect and sensor installation hardly affects the processing operation [22]. Thus, the proposed method uses vibration signal to predict tool wear in milling process. In addition, the vibration signal is a nonstationary and time-varying signal as a whole [22]. As one of the most frequently-used time-frequency analysis methods [23], STFT is widely utilized in vibration signal processing. Therefore, this paper firstly uses STFT to visualize the vibration signal collected by the accelerometer sensor. The main steps of image representation are as shown in Figure 2(a).Figure 2
(a) Main steps of mage representation based on STFT, (b) illustration of data frame, and (c) illustration of time-frequency maps.Firstly, determine relevant parameters for imaging the raw vibration signals based on STFT, as shown in Figure2(b), which includes number of samples for image representation every time (NS), frame length (FL), ratio of overlap between adjacent frames to frame length (RO), and type of window (TW).Then, calculate STFT of the sampling signals. The discrete STFT is calculated as follows [24]:(1)STFTn,k=∑m=0N−1xmwn−me−j2πkm/N,where n is the time variable, k is the frequency variable, xm is the sampling signal, wn−m is the window function, and N equals NS.Next, calculate the power spectral density (PSD) and the obtained two-dimensional matrix information in time-frequency domain is displayed by pseudocolor map. The PSD function is defined as follows [24]:(2)Pn,k=STFTn,k×conjSTFTn,k.The time-frequency map of vibration signal is obtained as shown in Figure2(c), which expresses the comprehensive and dynamic information of the raw vibration signals and provides an effective imaging representation for real-time tool wear monitoring.Finally, convert the obtained time-frequency map to meet the requirement of input layer dimension of the designed DCNN model for the real-time tool wear monitoring, and the pixels of converted map are written into the datasets as the input of the DCNN model.


## 2.2. Model Designing Based on DCNN

DCNN is widely used to learn complex nonlinear relationship, because it has a powerful ability of data mining and feature extraction. As a result, in this paper, the real-time tool wear monitoring model in milling process is designed based on DCNN. As shown in Figure3, the designed DCNN model for tool wear monitoring consists of one input layer, three convolutional layers, three pooling layers, one fully connected layer, and one output layer. Concretely, the input layer is the pixel matrix obtained by signal imaging based on STFT, the alternately convolutional and pooling layers are used for adaptive feature extraction of input data, and the output layer with three neurons is employed to monitor three flutes wear of milling cutter. The algorithms for each layer of the DCNN model are separately described as follows.Figure 3
Schematic diagram of the design TFS-DCNN model for tool wear monitoring.The convolutional layer convolves the local regions of input matrix with filter kernels, followed by the activation unit to generate the output in the forward propagation process. The output of convolutional network can be considered as the feature map obtained by adaptive feature extraction of input image representation. The forward propagation of the convolutional layer is calculated as follows:(3)Xjl=f∑i∈MjXil−1∗Kijl+bji,where Xjl is the lth element of the lth layer input, Xil−1 is the ith element of the l−1th layer input, Kijl is the lth layer kernels indexed by i,j, Mj represents local regions of input maps, bjl is jth element of the lth layer bias, and f⋅ is the ReLU function.The backpropagation algorithm [25] is used to update parameters of convolutional layer in the training process. Taking L as the loss function, then the calculation is given as follows:(4)∂L∂Kijl=∑u,vδjlu,v⋅Pil−1u,v,∂L∂bjl=∑u,vδjlu,v,where Pil−1 is the patch in Xil−1 that was multiplied elementwise by Kijl during convolution to calculate the element at u,v in Xjl and δjl is the jth element of the lth layer sensitivities.Although the convolutional layer can significantly cut down the connections between different layers, the neurons in each convolutional output are not obviously reduced. Thus, the pooling layer is carried out behind the convolutional layer to reduce the dimension of feature map significantly, avoid overfitting, and protect the scale invariance of extracted feature [26]. The computation of the pooling layer in forward propagation process is defined as follows:(5)Xjl=fβjl⋅downXjl−1+bjl,where down⋅ denotes the maximum pooling function and βjl is a multiplicative bias given to the jth output of the lth layer.Correspondingly, the parameters of the pooling layer are updated as follows:(6)∂L∂βjl=∑u,vδjl⋅downXjl−1u,v,∂L∂bjl=∑u,vδjlu,v.For the fully connected layer, the neurons are all jointed to the previous layer of feature map; the output of which is as follows:(7)Xl=σWlXl−1+bl,where σ⋅ is the sigmoid function, Wl is the lth layer weight, and bl is the lth layer bias.Similarly, the backpropagation of fully connected layer is calculated as follows:(8)∂L∂Wl=δlXl−1T,∂L∂bl=δl.The Euclidean distance between the measured flank wear widthy and the predicted flank wear width y^ is regarded as loss function to train the constructed DCNN model for tool wear monitoring, and the expression is given as follows:(9)L=12N∑i=1Ny^i−yi22,where N denotes the number of time-frequency maps in training dataset.


## 3. Experimental Setup

To experimentally validate the effectiveness of the proposed tool wear monitoring method in milling operations, the experimental datasets obtained from high-speed milling machine under dry operations were adopted [27, 28]. The tool type used in the machining test was a three-flute ball nose tungsten carbide cutter, and the workpiece material used in the milling test was stainless steel (HRC52). Besides, the workpiece had been preprocessed to remove the original skin layer containing hard particles [28]. Three Kistler accelerometers were located, respectively, on the workpiece in x, y, and z directions to monitor the real-time vibration signals of the machine tool, while DAQ NI PCI1200 was used to acquire the machine tool vibration signals in three directions with a continuous sampling frequency of 50 kHz during the tool wear test. These obtained data are stored and processed in computer platform and then used for training and testing of the designed DCNN model for real-time tool wear monitoring. At the same time, after each cutting process is completed, the actual flank wear width of each milling cutter edge is measured offline using a LEICA MZ12 microscope and regarded as the target labels for training the constructed DCNN model. The relevant parameters of the milling operation are shown in Table 1.Table 1
The relevant parameters of the milling operation.
ParametersValueThe spindle running speed10400 RPMThe feed rate inx direction1555 mm/minThe cutting depth iny direction0.125 mmThe cutting depth inz direction0.2 mmIn the experiments, three milling cutters (C1, C4, and C6) with actual flank wear data were taken as the experimental datasets. Each cutter includes intact 300 data files, corresponding to 300 milling operations. All the vibration signals collected in each data file are divided into training, validating, and testing data, all of which are different from each other, and then the training, validating, and testing dataset are obtained after the image representation of vibration signals. Finally, the experimental datasets are descripted as shown in Table2.Table 2
Details of experimental datasets.
Tool symbolNSTraining datasetsValidating datasetsTesting datasetsTotal datasetsC1512265,03560,00060,000385,0351024132,23430,00030,000192,234204866,02415,00015,00096,024409632,6437,5007,50047,643C4512271,90560,00060,000391,9051024135,69030,00030,000195,690204867,75815,00015,00097,758409633,5107,5007,50048,510C6512265,42260,00060,000385,4221024132,42030,00030,000192,420204866,08715,00015,00096,087409632,6737,5007,50047,673The designed DCNN model for tool wear monitoring in milling was run on Alibaba ECS platform with 8-core CPU and NVIDIA Tesla P100 GPU in Ubuntu16.04 operating system, using CUDA8 to accelerate the computation. WhenNS is 1024, the training time for each epoch is less than 28 s, and the computing time of a single testing sample is only 0.008 s. Hence the proposed method is a high-efficiency approach for intelligent real-time monitoring of tool wear with big data.


## 4. Results and Discussion

### 4.1. Performance Evaluation

For quantitatively evaluating the effectiveness of the tool wear monitoring method proposed in this paper, the following two measures are used, that is, Mean Absolut Error (MAE) and Root Mean Squared Error (RMSE).The MAE is used to calculate the average absolute error between the predicted tool flank wear widthy^ and the actual tool flank wear width y during milling. The equation for the calculations of MAE is as follows:(10)MAE=1N∑i=1Ny^i−y^,where N is the number of time-frequency maps in used dataset.The RMSE is used to calculate the root mean square error between the predicted tool flank wear widthy^ and the actual tool flank wear width y during milling. The equation for the calculations of RMSE is as follows:(11)RMSE=1N∑i=1Ny^i−y^2.Similarly,N represents the number of time-frequency maps in used dataset.


### 4.2. Influence of Image Representation

As a time-frequency visualizing method of vibration signals, the parameters of image representation affect the quality of the signal spectrogram. The appropriate parameters can better express the two-dimensional information of the signal’s time-frequency domain, which is beneficial to the intelligent real-time milling tool wear monitoring method presented in this paper to gain good performance. To this end, the influence of the parameters (includingNS, FL, RO, and TW) of image representation on predicting accuracy of the proposed method is discussed through lots of experiments. When the aforementioned measures of performance evaluation get the minimum value in the testing datasets, the corresponding parameters are appropriate for the method. Besides, in order to eliminate interference from parameters of the DCNN model, the control variate technique is used to discover optimal parameter of image representation. Concretely, when the parameters of image representation are studied, the parameters of the DCNN model are set as fixed values equal to the optimal value in Section 4.3. In addition, when analyzing one of those parameters, the other parameters of image representation are also equal to the optimal value.


#### 4.2.1. Number of Samples

In order to facilitate STFT calculation, the initial values ofNS in this experiment are 512, 1024, 2048, and 4096, respectively. The details of the dataset are shown in Table 2. Correspondingly, the MAE and RMSE measures of predicted tool wear under different NSs are shown in Figure 4.Figure 4
The MAE and RMSE measures of predicted tool wear in different NSs.It is clear to see from Table2 that, in the case of the same length of the raw signal, the larger the NS, the smaller the dataset capacity; thus, the time required to generate and train the dataset is less. As shown in Figure 4, when the NS is larger or smaller than 1024, both MAE and RMSE measures of predicted tool wear are large. Finally, considering the data processing time and model monitoring accuracy, this paper chooses 1024 as NS parameter.


#### 4.2.2. Frame Length

In the experiment, the initial values ofFL are 32, 64, 128, 256, and 512, respectively. The corresponding MAE and RMSE measures of predicted tool wear are shown in Figure 5. When the FL is larger or smaller than 256, more prediction errors occur. Thus, 256 is selected as FL parameter.Figure 5
The MAE and RMSE measures of predicted tool wear in different FLs.


#### 4.2.3. Ration of Overlap

In the experiment, the initial values ofRO are 1/16, 1/8, 1/4, 1/2, 3/4, 7/8, and 15/16, respectively. The corresponding MAE and RMSE measures of predicted tool wear are shown in Figure 6. The monitoring error decreases as the RO increases, but if the RO is larger than 7/8, the monitoring error will increase to some extent. Finally, this paper chooses 7/8 as RO parameter.Figure 6
The MAE and RMSE measures of predicted tool wear in differentROs.


#### 4.2.4. Type of Window

The commonly used window functions for the initial selection ofTW parameters in this experiment are as follows: Bartlett, Blackman, Bohman, Chebyshev, Gaussian, Hamming, Hanning, Kaise, Rectangular, and Triangular window. The corresponding MAE and RMSE measures of predicted tool wear are shown in Figure 7. After comparing and analyzing the above window functions, when the Hamming window is used as the window function, the MAE and RMSE measures of predicted tool wear of the three milling cutters are generally small. Therefore, the Hamming window is selected as TW parameter.Figure 7
The MAE and RMSE measures of predicted tool wear in differentTWs.


### 4.3. Influence of the Designed Model

The DCNN parameters vary with the milling experimental datasets. Adjusting these parameters to find the optimal parameters of the relevant dataset is a crucial part of the training process. The appropriate DCNN parameters are beneficial for the proposed tool wear monitoring method to obtain good performance. When the aforementioned measures of performance evaluation get the minimum value in the testing datasets, the corresponding parameters are appropriate for the method. Besides, in order to eliminate interference from parameters of image representation, the control variate technique is used to discover optimal parameter of the DCNN model. Concretely, when the parameters of the DCNN model are studied, the parameters of image representation are set as fixed values equal to the optimal value in Section4.2. In addition, when analyzing one of those parameters, the other parameters of the DCNN model are also equal to the optimal value.


#### 4.3.1. Type of Gradient

As a commonly used algorithm, the gradient descent optimization algorithm is often employed to train convolutional networks. Nevertheless, it is difficult to explain their advantages and disadvantages theoretically, and these algorithms are often used as black box optimizers [29]. Therefore, this paper will compare the popular gradient descent algorithms (such as SGD, Adagrad, Adadelta, Adam, RSMprop, and Nestrov) [29] and select the appropriate type of gradient descent optimization algorithm (TG) to achieve good performance of the proposed model. As shown in Figure 8, the TG significantly influences monitoring errors, and Nesterov algorithms get the lower error. Hence, the Nesterov optimization algorithm is selected to optimize the proposed DCNN model.Figure 8
The MAE and RMSE measures of predicted tool wear in differentTGs.


#### 4.3.2. Batch Sizes

Considering the contradiction between massive data and computing resources, it is hard to compute the backpropagation gradient and update all network parameters of overall datasets during the DCNN training process simultaneously. It is generally preferable to set the massive dataset into appropriate batches [30]. The batch size (BS) is a key variable in neural network training. Therefore, different BSs in this experiment are used for training the DCNN model. The training time is shown in Figure 9. Correspondingly, the MAE and RMSE measures of predicted tool wear under different NBs are shown in Figure 10.Figure 9
The training time per epoch in differentBSs.Figure 10
The MAE and RMSE measures of predicted tool wear in differentBSs.As shown in Figures9 and 10, when the BS is smaller, the MAE and RMSE measures of predicted tool wear are small, but the per epoch training time is longer. When the BS is larger (especially when it is more than 100), the per epoch training time is obviously reduced and tends to be stable, but the MAE and RMSE measures of predicted tool wear are significantly increased. Considering the above situation, when BS equals 100, not only can tool wear monitoring accuracy of the constructed DCNN model be guaranteed but also the training time of the proposed model can be reduced. Finally, this paper chooses 100 as BS parameter.


#### 4.3.3. Learning Rate

In network training, the gradient descent optimization algorithm is applied for error backpropagation. Learning rate (LR) is another key factor, which not only influences the neural weights but also influences network convergence. For improving the performance of the DCNN model, it is crucial to select the suitable LR parameters. In this experiment, the constructed DCNN model training will be performed under different LR parameters. The MAE and RMSE measures of predicted tool wear under different LRs are shown in Figure 11.Figure 11
The MAE and RMSE measures of predicted tool wear in differentLRs.As can be seen from Figure11, when the LR is smaller than 0.03 or larger than 0.4, the tool monitoring error is big; when the LR is moderate, the tool monitoring error is small. Hence, this experiment selects 0.4 as LR parameter.


#### 4.3.4. Number of Epochs

In addition, the number of epochs (NE) is important for the proposed DCNN model in the training process, and it impacts the error convergence of the DCNN model. In the experiment, different NEs are employed for training the constructed model, and the corresponding MAE and RMSE measures of predicted tool wear under different NEs are shown in Figure 12.Figure 12
The MAE and RMSE measures of predicted tool wear in differentNEs.Analysis of Figure12 easily shows that when the NE is too small, the network training is inadequate, and the tool monitoring error is larger; when the NE is growing, the network training is more sufficient, and the monitoring error is decreased continuously. Nevertheless, when the NE is increased largely (especially over 250), the designed DCNN model training is overfitting, and the tool wear monitoring error is generally stable. Therefore, this experiment chooses 250 as NE parameter.


### 4.4. Comparison of Other Methods

Through a series of optimization experiments, the optimal parameters of the tool wear monitoring method proposed in this paper are shown in Table3, and the corresponding predicted tool flank wear of three datasets is as shown in Figure 13.Table 3
Optimal parameters of the proposed method.
NSFLROTWTGBSLRNE10242567/8HammingNesterov1000.4250Figure 13
The predicted result of the proposed method.For demonstrating its performance and advancement, the proposed tool wear monitoring method is compared with other advanced methods using the same open published datasets. First, the shallow models (including SVR, PSO-SVR, LSSVR, and PSO-LSSVR) are used for tool wear monitoring. Besides, the deep models (including CNN, LSTM, and LSTM-CNN) published in literature [31] are employed to compare the performance of the proposed methods. Finally, the compared results are shown in Table 4.Table 4
The MAE and RMSE results of different methods in tool wear monitoring.
MethodMAE (μm)RMSE (μm)Shallow modelSVR7.5895 ± 1.20769.3415 ± 1.8597PSO-SVR7.3110 ± 1.47469.0702 ± 2.5839LSSVR6.5356 ± 0.39928.0486 ± 1.1529PSO-LSSVR5.9197 ± 1.29687.3480 ± 1.3760Deep modelCNN [31]6.8787 ± 0.53099.3453 ± 0.9282LSTM [31]4.8640 ± 1.10886.6390 ± 1.6536LSTM-CNN [31]1.9300 ± 0.41602.7587 ± 0.6213Our proposed method1.3000 ± 0.37201.9082 ± 0.6568As shown in Table4, the mean value of the MAE measures of predicted flank wear of three milling cutters is 1.3 μm, and the mean value of RMSE is 1.9082 μm, which are the minimum values in all methods of comparison. Besides, the variance of MAE is 0.372 μm, and the variance of RMSE is 0.6568 μm, which are also the minimum values in the methods of comparison. Moreover, the proposed method can not only guarantee the predicted tool wear with low deviation but also enable the predicted tool wear with a small dispersion. In conclusion, the proposed tool wear monitoring method can effectively and correctly establish the complicated mapping between the acquisition signals and the tool wear in real-time milling, thus obtaining higher tool wear monitoring accuracy.


## 4.1. Performance Evaluation

For quantitatively evaluating the effectiveness of the tool wear monitoring method proposed in this paper, the following two measures are used, that is, Mean Absolut Error (MAE) and Root Mean Squared Error (RMSE).The MAE is used to calculate the average absolute error between the predicted tool flank wear widthy^ and the actual tool flank wear width y during milling. The equation for the calculations of MAE is as follows:(10)MAE=1N∑i=1Ny^i−y^,where N is the number of time-frequency maps in used dataset.The RMSE is used to calculate the root mean square error between the predicted tool flank wear widthy^ and the actual tool flank wear width y during milling. The equation for the calculations of RMSE is as follows:(11)RMSE=1N∑i=1Ny^i−y^2.Similarly,N represents the number of time-frequency maps in used dataset.


## 4.2. Influence of Image Representation

As a time-frequency visualizing method of vibration signals, the parameters of image representation affect the quality of the signal spectrogram. The appropriate parameters can better express the two-dimensional information of the signal’s time-frequency domain, which is beneficial to the intelligent real-time milling tool wear monitoring method presented in this paper to gain good performance. To this end, the influence of the parameters (includingNS, FL, RO, and TW) of image representation on predicting accuracy of the proposed method is discussed through lots of experiments. When the aforementioned measures of performance evaluation get the minimum value in the testing datasets, the corresponding parameters are appropriate for the method. Besides, in order to eliminate interference from parameters of the DCNN model, the control variate technique is used to discover optimal parameter of image representation. Concretely, when the parameters of image representation are studied, the parameters of the DCNN model are set as fixed values equal to the optimal value in Section 4.3. In addition, when analyzing one of those parameters, the other parameters of image representation are also equal to the optimal value.


### 4.2.1. Number of Samples

In order to facilitate STFT calculation, the initial values ofNS in this experiment are 512, 1024, 2048, and 4096, respectively. The details of the dataset are shown in Table 2. Correspondingly, the MAE and RMSE measures of predicted tool wear under different NSs are shown in Figure 4.Figure 4
The MAE and RMSE measures of predicted tool wear in different NSs.It is clear to see from Table2 that, in the case of the same length of the raw signal, the larger the NS, the smaller the dataset capacity; thus, the time required to generate and train the dataset is less. As shown in Figure 4, when the NS is larger or smaller than 1024, both MAE and RMSE measures of predicted tool wear are large. Finally, considering the data processing time and model monitoring accuracy, this paper chooses 1024 as NS parameter.


### 4.2.2. Frame Length

In the experiment, the initial values ofFL are 32, 64, 128, 256, and 512, respectively. The corresponding MAE and RMSE measures of predicted tool wear are shown in Figure 5. When the FL is larger or smaller than 256, more prediction errors occur. Thus, 256 is selected as FL parameter.Figure 5
The MAE and RMSE measures of predicted tool wear in different FLs.


### 4.2.3. Ration of Overlap

In the experiment, the initial values ofRO are 1/16, 1/8, 1/4, 1/2, 3/4, 7/8, and 15/16, respectively. The corresponding MAE and RMSE measures of predicted tool wear are shown in Figure 6. The monitoring error decreases as the RO increases, but if the RO is larger than 7/8, the monitoring error will increase to some extent. Finally, this paper chooses 7/8 as RO parameter.Figure 6
The MAE and RMSE measures of predicted tool wear in differentROs.


### 4.2.4. Type of Window

The commonly used window functions for the initial selection ofTW parameters in this experiment are as follows: Bartlett, Blackman, Bohman, Chebyshev, Gaussian, Hamming, Hanning, Kaise, Rectangular, and Triangular window. The corresponding MAE and RMSE measures of predicted tool wear are shown in Figure 7. After comparing and analyzing the above window functions, when the Hamming window is used as the window function, the MAE and RMSE measures of predicted tool wear of the three milling cutters are generally small. Therefore, the Hamming window is selected as TW parameter.Figure 7
The MAE and RMSE measures of predicted tool wear in differentTWs.


## 4.2.1. Number of Samples

In order to facilitate STFT calculation, the initial values ofNS in this experiment are 512, 1024, 2048, and 4096, respectively. The details of the dataset are shown in Table 2. Correspondingly, the MAE and RMSE measures of predicted tool wear under different NSs are shown in Figure 4.Figure 4
The MAE and RMSE measures of predicted tool wear in different NSs.It is clear to see from Table2 that, in the case of the same length of the raw signal, the larger the NS, the smaller the dataset capacity; thus, the time required to generate and train the dataset is less. As shown in Figure 4, when the NS is larger or smaller than 1024, both MAE and RMSE measures of predicted tool wear are large. Finally, considering the data processing time and model monitoring accuracy, this paper chooses 1024 as NS parameter.


## 4.2.2. Frame Length

In the experiment, the initial values ofFL are 32, 64, 128, 256, and 512, respectively. The corresponding MAE and RMSE measures of predicted tool wear are shown in Figure 5. When the FL is larger or smaller than 256, more prediction errors occur. Thus, 256 is selected as FL parameter.Figure 5
The MAE and RMSE measures of predicted tool wear in different FLs.


## 4.2.3. Ration of Overlap

In the experiment, the initial values ofRO are 1/16, 1/8, 1/4, 1/2, 3/4, 7/8, and 15/16, respectively. The corresponding MAE and RMSE measures of predicted tool wear are shown in Figure 6. The monitoring error decreases as the RO increases, but if the RO is larger than 7/8, the monitoring error will increase to some extent. Finally, this paper chooses 7/8 as RO parameter.Figure 6
The MAE and RMSE measures of predicted tool wear in differentROs.


## 4.2.4. Type of Window

The commonly used window functions for the initial selection ofTW parameters in this experiment are as follows: Bartlett, Blackman, Bohman, Chebyshev, Gaussian, Hamming, Hanning, Kaise, Rectangular, and Triangular window. The corresponding MAE and RMSE measures of predicted tool wear are shown in Figure 7. After comparing and analyzing the above window functions, when the Hamming window is used as the window function, the MAE and RMSE measures of predicted tool wear of the three milling cutters are generally small. Therefore, the Hamming window is selected as TW parameter.Figure 7
The MAE and RMSE measures of predicted tool wear in differentTWs.


## 4.3. Influence of the Designed Model

The DCNN parameters vary with the milling experimental datasets. Adjusting these parameters to find the optimal parameters of the relevant dataset is a crucial part of the training process. The appropriate DCNN parameters are beneficial for the proposed tool wear monitoring method to obtain good performance. When the aforementioned measures of performance evaluation get the minimum value in the testing datasets, the corresponding parameters are appropriate for the method. Besides, in order to eliminate interference from parameters of image representation, the control variate technique is used to discover optimal parameter of the DCNN model. Concretely, when the parameters of the DCNN model are studied, the parameters of image representation are set as fixed values equal to the optimal value in Section4.2. In addition, when analyzing one of those parameters, the other parameters of the DCNN model are also equal to the optimal value.


### 4.3.1. Type of Gradient

As a commonly used algorithm, the gradient descent optimization algorithm is often employed to train convolutional networks. Nevertheless, it is difficult to explain their advantages and disadvantages theoretically, and these algorithms are often used as black box optimizers [29]. Therefore, this paper will compare the popular gradient descent algorithms (such as SGD, Adagrad, Adadelta, Adam, RSMprop, and Nestrov) [29] and select the appropriate type of gradient descent optimization algorithm (TG) to achieve good performance of the proposed model. As shown in Figure 8, the TG significantly influences monitoring errors, and Nesterov algorithms get the lower error. Hence, the Nesterov optimization algorithm is selected to optimize the proposed DCNN model.Figure 8
The MAE and RMSE measures of predicted tool wear in differentTGs.


### 4.3.2. Batch Sizes

Considering the contradiction between massive data and computing resources, it is hard to compute the backpropagation gradient and update all network parameters of overall datasets during the DCNN training process simultaneously. It is generally preferable to set the massive dataset into appropriate batches [30]. The batch size (BS) is a key variable in neural network training. Therefore, different BSs in this experiment are used for training the DCNN model. The training time is shown in Figure 9. Correspondingly, the MAE and RMSE measures of predicted tool wear under different NBs are shown in Figure 10.Figure 9
The training time per epoch in differentBSs.Figure 10
The MAE and RMSE measures of predicted tool wear in differentBSs.As shown in Figures9 and 10, when the BS is smaller, the MAE and RMSE measures of predicted tool wear are small, but the per epoch training time is longer. When the BS is larger (especially when it is more than 100), the per epoch training time is obviously reduced and tends to be stable, but the MAE and RMSE measures of predicted tool wear are significantly increased. Considering the above situation, when BS equals 100, not only can tool wear monitoring accuracy of the constructed DCNN model be guaranteed but also the training time of the proposed model can be reduced. Finally, this paper chooses 100 as BS parameter.


### 4.3.3. Learning Rate

In network training, the gradient descent optimization algorithm is applied for error backpropagation. Learning rate (LR) is another key factor, which not only influences the neural weights but also influences network convergence. For improving the performance of the DCNN model, it is crucial to select the suitable LR parameters. In this experiment, the constructed DCNN model training will be performed under different LR parameters. The MAE and RMSE measures of predicted tool wear under different LRs are shown in Figure 11.Figure 11
The MAE and RMSE measures of predicted tool wear in differentLRs.As can be seen from Figure11, when the LR is smaller than 0.03 or larger than 0.4, the tool monitoring error is big; when the LR is moderate, the tool monitoring error is small. Hence, this experiment selects 0.4 as LR parameter.


### 4.3.4. Number of Epochs

In addition, the number of epochs (NE) is important for the proposed DCNN model in the training process, and it impacts the error convergence of the DCNN model. In the experiment, different NEs are employed for training the constructed model, and the corresponding MAE and RMSE measures of predicted tool wear under different NEs are shown in Figure 12.Figure 12
The MAE and RMSE measures of predicted tool wear in differentNEs.Analysis of Figure12 easily shows that when the NE is too small, the network training is inadequate, and the tool monitoring error is larger; when the NE is growing, the network training is more sufficient, and the monitoring error is decreased continuously. Nevertheless, when the NE is increased largely (especially over 250), the designed DCNN model training is overfitting, and the tool wear monitoring error is generally stable. Therefore, this experiment chooses 250 as NE parameter.


## 4.3.1. Type of Gradient

As a commonly used algorithm, the gradient descent optimization algorithm is often employed to train convolutional networks. Nevertheless, it is difficult to explain their advantages and disadvantages theoretically, and these algorithms are often used as black box optimizers [29]. Therefore, this paper will compare the popular gradient descent algorithms (such as SGD, Adagrad, Adadelta, Adam, RSMprop, and Nestrov) [29] and select the appropriate type of gradient descent optimization algorithm (TG) to achieve good performance of the proposed model. As shown in Figure 8, the TG significantly influences monitoring errors, and Nesterov algorithms get the lower error. Hence, the Nesterov optimization algorithm is selected to optimize the proposed DCNN model.Figure 8
The MAE and RMSE measures of predicted tool wear in differentTGs.


## 4.3.2. Batch Sizes

Considering the contradiction between massive data and computing resources, it is hard to compute the backpropagation gradient and update all network parameters of overall datasets during the DCNN training process simultaneously. It is generally preferable to set the massive dataset into appropriate batches [30]. The batch size (BS) is a key variable in neural network training. Therefore, different BSs in this experiment are used for training the DCNN model. The training time is shown in Figure 9. Correspondingly, the MAE and RMSE measures of predicted tool wear under different NBs are shown in Figure 10.Figure 9
The training time per epoch in differentBSs.Figure 10
The MAE and RMSE measures of predicted tool wear in differentBSs.As shown in Figures9 and 10, when the BS is smaller, the MAE and RMSE measures of predicted tool wear are small, but the per epoch training time is longer. When the BS is larger (especially when it is more than 100), the per epoch training time is obviously reduced and tends to be stable, but the MAE and RMSE measures of predicted tool wear are significantly increased. Considering the above situation, when BS equals 100, not only can tool wear monitoring accuracy of the constructed DCNN model be guaranteed but also the training time of the proposed model can be reduced. Finally, this paper chooses 100 as BS parameter.


## 4.3.3. Learning Rate

In network training, the gradient descent optimization algorithm is applied for error backpropagation. Learning rate (LR) is another key factor, which not only influences the neural weights but also influences network convergence. For improving the performance of the DCNN model, it is crucial to select the suitable LR parameters. In this experiment, the constructed DCNN model training will be performed under different LR parameters. The MAE and RMSE measures of predicted tool wear under different LRs are shown in Figure 11.Figure 11
The MAE and RMSE measures of predicted tool wear in differentLRs.As can be seen from Figure11, when the LR is smaller than 0.03 or larger than 0.4, the tool monitoring error is big; when the LR is moderate, the tool monitoring error is small. Hence, this experiment selects 0.4 as LR parameter.


## 4.3.4. Number of Epochs

In addition, the number of epochs (NE) is important for the proposed DCNN model in the training process, and it impacts the error convergence of the DCNN model. In the experiment, different NEs are employed for training the constructed model, and the corresponding MAE and RMSE measures of predicted tool wear under different NEs are shown in Figure 12.Figure 12
The MAE and RMSE measures of predicted tool wear in differentNEs.Analysis of Figure12 easily shows that when the NE is too small, the network training is inadequate, and the tool monitoring error is larger; when the NE is growing, the network training is more sufficient, and the monitoring error is decreased continuously. Nevertheless, when the NE is increased largely (especially over 250), the designed DCNN model training is overfitting, and the tool wear monitoring error is generally stable. Therefore, this experiment chooses 250 as NE parameter.


## 4.4. Comparison of Other Methods

Through a series of optimization experiments, the optimal parameters of the tool wear monitoring method proposed in this paper are shown in Table3, and the corresponding predicted tool flank wear of three datasets is as shown in Figure 13.Table 3
Optimal parameters of the proposed method.
NSFLROTWTGBSLRNE10242567/8HammingNesterov1000.4250Figure 13
The predicted result of the proposed method.For demonstrating its performance and advancement, the proposed tool wear monitoring method is compared with other advanced methods using the same open published datasets. First, the shallow models (including SVR, PSO-SVR, LSSVR, and PSO-LSSVR) are used for tool wear monitoring. Besides, the deep models (including CNN, LSTM, and LSTM-CNN) published in literature [31] are employed to compare the performance of the proposed methods. Finally, the compared results are shown in Table 4.Table 4
The MAE and RMSE results of different methods in tool wear monitoring.
MethodMAE (μm)RMSE (μm)Shallow modelSVR7.5895 ± 1.20769.3415 ± 1.8597PSO-SVR7.3110 ± 1.47469.0702 ± 2.5839LSSVR6.5356 ± 0.39928.0486 ± 1.1529PSO-LSSVR5.9197 ± 1.29687.3480 ± 1.3760Deep modelCNN [31]6.8787 ± 0.53099.3453 ± 0.9282LSTM [31]4.8640 ± 1.10886.6390 ± 1.6536LSTM-CNN [31]1.9300 ± 0.41602.7587 ± 0.6213Our proposed method1.3000 ± 0.37201.9082 ± 0.6568As shown in Table4, the mean value of the MAE measures of predicted flank wear of three milling cutters is 1.3 μm, and the mean value of RMSE is 1.9082 μm, which are the minimum values in all methods of comparison. Besides, the variance of MAE is 0.372 μm, and the variance of RMSE is 0.6568 μm, which are also the minimum values in the methods of comparison. Moreover, the proposed method can not only guarantee the predicted tool wear with low deviation but also enable the predicted tool wear with a small dispersion. In conclusion, the proposed tool wear monitoring method can effectively and correctly establish the complicated mapping between the acquisition signals and the tool wear in real-time milling, thus obtaining higher tool wear monitoring accuracy.


## 5. Conclusions

In this paper, we propose a tool wear monitoring method based on STFT and DNNN in milling operations, which utilizes the time-frequency maps based on STFT as image representation of vibration signals and establishes the nonlinear relationship between obtained images and tool flank wear width based on the constructed DCNN model. Three cutter experimental datasets measured from high-speed CNC milling machine under dry operations were used to verify the effectiveness of the proposed method. The experimental results show that the proposed method is more accurate and relatively reliable than previous methods. Concretely, the following conclusions can be drawn:(1)
It is effective to use the time-frequency maps based on STFT as the input of the constructed DCNN model for online tool wear monitoring, and the image representation affects the performance of the presented method. When theNS is 1024, FL is 256, RO is 7/8, and TW is Hamming window, the generated time-frequency map is optimal for real-time tool wear monitoring.(2)
The constructed DCNN model can easily learn the complex and nonlinear relationship between image representation of vibration signals and milling tool wear. The DCNN model has an important influence on monitoring accuracy of tool wear. When theTG is Nesterov, BS is 100, LR is 0.4, and NE is 250, the designed DCNN model has better comprehensive performance; correspondingly, the MAE is 1.3000 ± 0.3720 μm and the RMSE is 1.9082 ± 0.6568 μm.(3)
Compared with other intelligent tool wear predicting methods, the proposed method can adaptively extract features from collected vibration signals and effectively monitor tool wear in real time, which relies less on the prior knowledge of the diagnosticians about feature selections and fusion techniques. Therefore, the proposed method can easily expand the scope of applications, which has certain guiding significance for real-time tool wear monitoring in other cutting processes, such as turning and drilling. In addition, it may be attractive for other application fields, such as motor, turbine engine, and rolling bearing.In future, we will study multisignal fusion technique and tool wear monitoring under different working conditions (especially the actual processing conditions) to improve the performance of the whole method.



---

*Source: 9976939-2021-07-01.xml*