# In-Process Tool Condition Forecasting of Drilling CFRP/Ti Stacks Based on ResNet and LSTM Network
## 2 Methodologies
### Signal Preprocess  
Cutting spindle power and vibration signals with a different sampling frequency are both used as the input raw signals. The vibration signals for three directions are collected by the sensor installed on the spindle end face, where the sampling frequency is 2048 Hz. The cutting spindle power signal is acquired through OPI profibus communication connected to NCU of 840D PL siemens system, and the sampling frequency is 50 Hz. The measured cutting spindle power and vibration signals for drilling eight CFRP/Ti stacks holes are shown in Figure 2. The \(x\), \(y\), \(z\) directions illustrated in Figure 2 are perpendicular to each other. Meanwhile, the \(z\) direction is parallel to the tool axis and the \(y\) direction is parallel to the length direction of workpiece. The power curve ascends as the drilling tool moving down in \(z\) direction with the feed speed, as shown in Figure 2a, while it is hard to find the same correlation for raw vibration signal curves in Figure 2b, due to there being many interference signals with complex factors contained within. Therefore, a signal preprocessing method is needed to extract high correlated features, aiming to improve the accuracy of TCF model. Figure 1: Framework of TCF methodologies. The statistical parameter, root mean square, has shown high sensitivity for tool condition [18]. In this paper, moving average root mean square (MARMS) is used to preprocess raw vibration signals, which can eliminate the effect of noise. It is calculated as follows. The number of sampled signal data for each tool revolution is calculated using Equation (1) [36]. \[N=\frac{60f_{s}}{n} \tag{1}\]  
where \(n\) is the spindle speed and \(f_{s}\) is the sampling frequency. The \(RMS_{k}\) can be obtained for the \(k\)th revolution using Equation (2) [36]. \[RMS_{k}=\sqrt{\frac{\sum\limits_{i=(k-1)N+1}^{kN}{x_{i}}^{2}}{N}} \tag{2}\]  
where \(x_{i}\) is the \(i\)th collected vibration data. Then, the MARMS values is calculated using Equation (3) [36]. \[RMS_{m}=\frac{\sum\limits_{w=m}^{m+j}RMS_{w}}{j} \tag{3}\]  
where \(j\) is the successive revolution number for moving average. The raw cutting vibration can be preprocessed to MARMS values, and the sampling frequency for MARMS values is \(60n\) Hz, which is shown in Figure 3. The RMS values ascend with the drilling of the holes, and the change caused by the drilling process is more obvious on the RMS curve, that is, it is hard to capture in the vibration acceleration curve shown in Figure 2b. This means that the effect of tool condition on the RMS values is more significant. Otherwise, the RMS curve can provide the basis for eliminating the signal offset, using the method described below. The cutting spindle power is also preprocessed to the same sampling frequency with cutting vibration MARMS values using Equation (4) and the moving average filter. \[P_{k}=\frac{\sum\limits_{i=(k-1)N+1}^{kN}{P_{i}}}{N} \tag{4}\]  
It can be seen in Figures 2a and 3 that there is a signal offset with the increase in sampling time, even when drilling holes using the same parameters. The offset is influenced by the sensor's structural parameters and the temperature, which is difficult to avoid. The offset will significantly affect the measured value for the long sampling time. It is the  
Figure 2: Raw signals with cutting parameters cutting speed \(v_{\text{c}}\) = 60 m/min, feed speed \(F\) = 318 mm/min: (a) Spindle power; (b) Vibration. interference noise independent of tool condition, and the offset should be eliminated. A data preprocessing correction method is proposed to increase the TCF model accuracy. The no-cutting phase signals are acquired through the segmentation of sampled signals using Equation (5). \[\max(\{P_{j}|j=(i-1)M+1,(i-1)M+2,\cdot\cdot\cdot,iM\})<P_{mean} \tag{5}\]  
where \(P_{mean}\) is the mean value of cutting vibration MARMS values or moving average power values, and the number \(M\) can be calculated using Equation (6).