# A Novel Method for Tool Identification and Wear Condition Assessment Based on Multi-Sensor Data
## 3 Tool Identification  
In the process of machine tool processing, we need to use a variety of tools, as there is a process of tool replacement. The cutting force, vibration signal, and acoustic emission signal of different cutting tools are different. Therefore, it is necessary to identify the types of tools currently used in order to further predict the wear of current tools. When processing the machine tool, the tool processing sequence is known, and the current tool can be accurately identified by detecting the spindle current. When the spindle current is 0 and maintained for a period of time, it means that the machine tool stops working, and the tool is changed during this period. In the actual machining process, the spindle current data is affected by the starting current and the braking current, and the fluctuation is relatively large. Therefore, it is necessary to preprocess the spindle current data. This paper takes the spindle current data of a process (nine knives in total) as an example, and the original data is shown in Figure 2, where the horizontal axis is the sampling time, and the vertical axis is the spindle current.  
Figure 1: System chart.  
The amount of original data is large, and the adjacent data is mostly repetitive data, so the amount of data can be reduced by removing the adjacent same data while retaining the original data characteristics, so as to reduce the computational complexity. The spindle current data with the adjacent same current data removed is shown in Figure 3.  
As can be seen from Figure 3, the processed current data volume is about half of the original data volume, but its waveform is basically consistent with Figure 2. When the spindle starts to rotate, there will be a large starting current, which will affect the tool recognition. The starting current can be filtered by detecting whether the machine tool is currently in a tool change state and then setting the current threshold. It can be seen from the original data that there are two maximum jumping points in the current value, which can be filtered by setting the current threshold. Finally, the data after filtering the starting current and the jump current of the main shaft can be obtained as shown in Figure 4.  
Figure 3: Spindle current graph after removing adjacent identical data.  
Figure 2: Original data of spindle current.  
It can be seen from Figure 3 that when the current value is 0, the spindle is in a stalled state, but there will be some jumping noise current during the spindle stalled process. It is known that nine kinds of tools are used in this process. In this paper, the use time of each tool is set as the threshold value to filter the fluctuation current when the tool stops running, and then judge and eliminate the spindle brake current by judging whether the spindle stops running. The data is as shown in Figure 5.  
It can be seen from Figure 5 that the spindle current data of the tool changes obviously with the working time of the tool and has obvious characteristics in the time domain. Therefore, this paper adopts LSTM (Long Short-Term Memory) algorithm to build a tool recognition model and takes the processed current data as the input of the system to train the system. When the tool is to be identified, it is only necessary to use the current spindle current signal as the system input, and the output is the tool sequence of the tool currently being processed. Since this paper uses a basic LSTM neural network, it will not be discussed here. Figure 6 shows the training process of LSTM tool recognition network.  
Figure 4: Spindle current graph after starting current and trip current are removed.  
Figure 5: Spindle current graph after eliminating the jump current when stopped operation.