## 2 Preliminary Experiments
### Algorithm for Prediction and Auto-Compensation of Tool Wear  
Tool wear is influenced by cutting resistance, cutting temperature, the geometry of the cutter, the material of the work piece and cutter, the cutting parameters, and the number of cuts, _etc._ Wear of a new cutter increases slowly at the beginning, and will increase rapidly after many cuts are performed. If a machining process is stable and has high repeatability, the tool wear can usually be described with a model developed with regression analysis and the curve fitting method. Thus, it is feasible to use regression analysis and curve fitting methods with the experimental data of tool wear to build an empirical model for tool wear prediction and compensation. With 17 sets of experimental data for each process, Figures 12 and 13 show the statistics of tool wear for T03 and T04, respectively. For T03, after 500 cuts, the accumulated tool wear was about 90 \(\upmu\)m. For T04, after 300 cuts, the accumulated tool wear was about 75 \(\upmu\)m. In addition, it can be seen that both T03 and T04 show good stability and repeatability in their tool wear trends. For the same number of cuts, the variation of tool wear was 11 \(\upmu\)m for T03 and 13 \(\upmu\)m for T04, which is smaller than the allowable tolerance of dimension (15 \(\upmu\)m). Thus, it makes it possible to build regression models based on the experimental data for tool wear prediction. With the use of the curve fitting method, Equations (1) and (2), which respectively describe the relationship between tool wear and the number of cuts for T03 and T04, were obtained. \[y\,=\,-7\times 10^{-14}x^{6}\,+\,1\times 10^{-10}x^{5}\,-\,9\times 10^{-8}x^{4}\,+ \,3\times 10^{5}x^{3}-6.6\times 10^{3}x^{2}\,+\,0.8672x\,+\,6.5828 \tag{1}\]  
\[y\,=\,-2\times 10^{-12}x^{6}\,+\,2\times 10^{9}x^{5}\,-\,9\times 10^{7}x^{4}\,+ \,2\times 10^{4}x^{3}-0.0192x^{2}\,+\,1.2403x\,+\,1.7959 \tag{2}\]  
where \(y\) represents tool wear (\(\upmu\)m), and \(x\) represents number of cuts. For a stable turning process, if the number of cuts is known and substituted into Equations (1) and (2), the tool wear can be predicted and used for compensation. The compensation value is directly sent to CNC controller to offset the position of the cutter. Because the predicted wear is an accumulated value, the compensation value should be the difference between the current wear and the previous wear. Based on Equations (1) and (2), Figures 14 and 15 show the tool wear curves (to be used as a compensation reference) for T03 and T04. Figure 11: Flowchart of on-machine dimension inspection. Figure 14: Tool wear curve for T03. Figure 12: Statistics of tool wear for T03. Figure 13: Statistics of tool wear for T04. The effectiveness of the tool wear compensation also depends on the machine accuracy. If the tool wear is less than the machine's positioning accuracy, the compensation can be skipped until the accumulated wear is greater than the machine's positioning accuracy. Because of it, the compensation strategy is designed based on when the consecutive cuts have very similar tool wear (difference < 1 \(\upmu\)m); the accumulated tool wear of those cuts are regarded as identical so that the compensation values calculated based on the tool wear curves for those cuts are zero. The green curves with a step-shape in Figures 14 and 15 represent this compensation strategy. Equations (1) and (2) are good for a stable tool wear condition. Due to the imperfect manufacturing of the cutter or unexpected errors, a cutter may have abnormal wear which is different from the predicted wear solved by Equations (1) and (2). As aforementioned, tool wear could affect the depth of cut. If abnormal tool wear occurs, the cutting vibration patterns collected on-line will be different from that in Figures 7 and 8. Thus, it is necessary to on-line monitor the cutting vibration for tool wear prediction instead of only using Equation (1) and (2). When abnormal tool wear happens, the monitoring system should send an alarm message to operators/engineers to double-check.