1 Introduction

The domain of intelligent manufacturing develops rapidly in recent years, and the requirements for machining geometry, dimension, and surface accuracy are strict. Therefore, the CNC machine tool, controller, machining parameters, and tool life monitoring are key techniques, and the tool life prediction aims to prevent lower product accuracy and higher defect rate. In terms of domestic and international cutting tool condition monitoring, the cutting tool condition is monitored by using acoustic emission signal monitoring, current signal monitoring, and vibration signal monitoring. In this study, the temperature generated during machining was used as a monitoring mode, and the cutting tool life was predicted according to the changes in the temperature characteristic and chip image chromaticity characteristic. The studies about cutting tool wear monitoring, cutting temperature, material chips, color correction, and characteristic selection were discussed in this paper.

Studies have presented that machine learning algorithms can effectively predict tool life and tool wear in various cutting processes, such as milling, turning, and grinding [1,2,3]. Hybrid models combining machine learning algorithms with optimization techniques have also been proposed and shown to have high accuracy in predictions [4]. Deep learning models such as convolutional neural network (CNN), deep belief network (DBN), and recurrent neural network (RNN) have been applied to tool wear monitoring and trained on big datasets of machining processes to learn the patterns and relationships between tool conditions and tool wear [5, 6]. In terms of vibration sensors and current sensors, the neural network was used for the classification of cutting tool conditions and data training in vibration sensor measurement, and the vibration signals were optimized and processed. The precisions of prediction models were compared and analyzed by using different methods. The prediction precisions of artificial neural network (ANN), support vector machine (SVM), and K-nearest neighbor (KNN) are 0.9393, 0.9090, and 0.8378, respectively, so the ANN has higher prediction precision [7, 8]. Monitoring the machining process of fine milling not only effectively collects the load current and spindle vibration signals on various axes instantly but also improves the automatic segmentation of signal data, so as to enhance the noise reduction capability and reduce the data analysis time [9]. The experimental results show that in noise processing, the S/N ratio was increased from 11 dB before noise reduction to 15.63 dB by wavelet denoising with a five-layer db3 generating function. In terms of characteristic set prediction accuracy, the MAPEs of inner circle roundness, inner circle cylindricity, and outer circle roundness are 8.65%, 13.2%, and 6.5%, respectively [10]. The state of tool wear was analyzed in the current signal characteristic monitoring method. The cutting load current signals of different paths were collected in characteristic selection and converted into time–frequency domain signal analysis. After the data were classified by Markov state and K-means clustering, and the required eigenvalues were selected, the test result classification shows the accuracy to be 74.61 ~ 91.62%, with an average recognition of 83.39% [11].

In terms of temperature monitoring for cutting status, a micro-temperature sensor was studied. The thermocouple sensing element was installed on the tool face to collect the cutting temperature synchronously in the machining test. The result shows that the cutting temperature measurement could extract data instantly and stably at different cutting speeds. When the cutting speed increased from 20 to 100 m/min, the temperature was the highest when the cutting speed was 100 m/min [12]. When the infrared image temperature was used for measuring orthogonal cutting, the cutting temperature, cutter-chip contact length, chip thickness, main shear angle, heat flux generated in the shear or friction zone, and the interfacial temperature distribution of cutter and chips during chip formation can be measured instantly. The experimental results show the cutting ratio and average friction coefficient of cutter-chip contact surface, the higher the cutting speed and the feed per tooth are and the larger the depth of cutting is, the higher the relative cutting temperature [13, 14]. In the rotary motion of the cutter, the cutting temperature could be measured instantly, and the temperature sensor was a K-type thermocouple, which is mainly used in milling and drilling machining forms. The friction and energy conversion generated the cutting temperature in the machining process. The experimental results show that the temperature value is 150 °C during aluminum alloy milling, and the error value is smaller than ± 2%. The maximum temperature value is about 600 °C during titanium alloy drilling, and the error value is smaller than ± 0.5%. The cutting temperature could be measured accurately in the validation experiment [15]. In the course of turning AISI 1117 steel, the cutting parameters influenced the chip surface temperature, and the effects of cutting speed, feed rate per revolution, and depth of cut on the chip surface temperature were compared. The experimental results show that the chip temperature rose as the cutting speed, federate, and depth of cut increased; the cutting speed and depth of cut were significant factors in the chip surface temperature change [16, 17].

The parameter data of surface roughness of the cut AISI 4340 steel, tool wear, and chip morphology were used for cost estimation. According to ANOVA, the dominant parameter which influenced the surface roughness was the feed-rate per tooth, and the cutting speed took second place. The surface roughness value increased with the feed-rate per tooth, whereas the cutting speed was in inverse proportion. The descending order of effects on tool wear was cutting speed, feed-rate per tooth, and depth of cut. There were three chip morphologies generated as the cutting speed increased, which are helical crimp, long ribbon, and short ribbon. The thickness decreased as the cutting speed increased and the feed-rate per tooth decreased [18]. The findings of the parameters for cutting stainless steel AISI304 show that in the cutting conditions of high cutting speed and low feed-rate per tooth, the crimp radius of chips increased, the chip thickness decreased, thinner chips could reduce the power loss of machine tool, and the workpiece had relatively excellent surface roughness. In addition, it was found that in the conditions of low cutting speed and high feed-rate per tooth, the chips flew slowly, and the high temperature generated by cutting made the chips yellow [19, 20]. Different machining parameters were used for the cutting experiment, and the chip morphologies resulted from different cutting speeds (V), feed-rate per tooth (f), and depth of cut (ap) were observed. The chip changes resulted from different parameters included the following: (1) similarity: in terms of cutting speed and feed rate per revolution, the chip profile gradually changed from a continuous ribbon into a helix, and into a serration and ruptured state at last. The chip morphology changed from waviness into serration, the serrated chips had heavier heat damage to the tool, leading to more tool wear. (2) Dissimilarity: in terms of depth of cut, the chip morphology was continuous ribbon, but the chip morphology also changed from waviness into serration [21, 22].

The objectives of this study include (1) evaluating the effect of TiAlN-coated cutting tools on the tool life of tool steel NAK80, (2) comparing the influence of input cutting temperature and chip chromaticity parameters on different prediction methods BP and LSTM, and (3) investigating the influence of tools on tool life prediction for die steel NAK80.

2 Cutting and equipment measurement principles

2.1 Tool life principle

The experimental plan and study of tool life principle were performed by referring to Taylor’s formula. The tool flank wear VB = 0.3 mm is the baseline in international standard ISO3685, as shown in Fig. 1. The machining time shortens as the cutting speed increases, and the effective tool life is expressed as Eq. (1). Different combinations of cutting conditions and workpiece materials have different n and C values, and C is determined by the workpiece material. In order to show the criticality of index n, the equation can be rearranged as [23, 24]:

Fig. 1
figure 1

Flank wear related to cutting time

$$\begin{array}{c}V{T}^{n}=C\\ T={ (\frac{C}{V}) }^\frac{1}{n}\end{array}$$
(1)

The cutting speed, cutting thickness, and cutting width should be considered in the tool life during milling, so the modified equation of effective tool life is:

$$V{T}^{n}{d}^{x}{f}^{y}=C$$
(2)

2.2 Chip chromaticity principle

In the machining process, the high-speed friction between the cutting tool and workpiece material generates a lot of cutting heat, the chips are heated up rapidly by the cutting heat, but the chips are cooled rapidly in the air after they are cut off the parent material. This phenomenon results in oxidation films in different colors on the surface of chips, and the color of the oxidation film is influenced by the oxidation film thickness (d), refractive index (n), and absorption coefficient (k) of oxidation film and parent material. The color of chips during machining changes in the order of light yellow → yellow brown → brown → purple → dark purple or dark blue → blue → light blue →  > bluish green → greenish yellow → dark red, as shown in Fig. 2 [24].

Fig. 2
figure 2

Chromaticity diagram [25]

The relation between the chip oxidation film thickness and chromaticity coordinate point is shown in Fig. 2. The graph of relation presents an annular solid line. The lines radially spread from the center represent Y yellow, R red, P purple, B blue, and G green hues. The oxidation film thickness (μm), chromaticity coordinates (xc, yc), and JIS specified color names (hue H, lightness V, and chroma C) [17, 25].

2.3 Chip chromaticity image processing

The RGB values, normalization, linear RGB values, XYZ tristimulus values, and xy chromatic values were converted in the chip image processing to obtain the XY chromatic values and Lch chromatic value at last. This study used XY chromatic values for analyses and predictions. The Lch chromatic value is mainly correlated with brightness, chroma, and hue; the process of display color space transformation will be described in detail in the chip chromaticity image processing, as shown in Fig. 3.

Fig. 3
figure 3

Display system color transformation process [17, 26]

2.3.1 Normalization

The initial input color signals of the display were [R8-bit G8-bit B8-bit] 8-bit RGB signal values; the numerical range of RGB signals was 0 ~ 255 and normalized to [R0 G0 B0] signal values, as expressed by Eq. (3) [17].

$${I}_{0}=\frac{I}{255}$$
(3)

wherein I0 = R0, G0, B0 is the normalized RGB values and I = R8-bit, G8-bit, B8-bit is the 8-bit RGB values

2.3.2 TRC transformation

TRC stands for tone reproduction curve, representing the relationship between the input signal value and brightness value in the display system. As the normalized RGB values [\({R}_{0}{G}_{0}{B}_{0}\)] should be transformed by TRC into linear RGB values [R G B], their linear relationship can be described by using a 3 \(\times\) 3 matrix. The display uses γ value to represent the tone relationship between the normalized RGB values and linear RGB values, so the γ value varies with the display specifications, and the general range of γ value is 1.8 ~ 2.4, as expressed by Eq. (4).

$$R={\left({R}_{0}\right)}^{{\gamma }_{R}};G={\left({G}_{0}\right)}^{{\gamma }_{G}};{B=\left({B}_{0}\right)}^{{\gamma }_{B}}$$
(4)

wherein R, G, and B are linear RGB values, and \({\gamma }_{R}\text{, }{\gamma }_{G}\text{,}\text{ and }{\gamma }_{B}\) correspond to the \(\gamma\) values of R, G, and B, respectively

2.3.3 Linear transformation

A linear transformation is the process of transforming linear RGB values [R G B] into tristimulus values [X Y Z]. A 3 \(\times\) 3 matrix is used for calculation, and the computing equation varies with the displays of different standards, as expressed by Eq. (5).

$$\left[\begin{array}{c}X\\ Y\\ Z\end{array}\right]=M\left[\begin{array}{c}R\\ G\\ B\end{array}\right]$$
(5)

wherein X, Y, and Z represent tristimulus values, and M is a 3 \(\times\) 3 linear transformation matrix

2.3.4 Chromaticity transformation

The tristimulus values [X Y Z] could be transformed into [xy] chromatic values by Eq. (6) as needed and displayed in the CIE xy chromaticity diagram. Or, they could be transformed into L*a*b* chromatic values [L*a*b*] according to Eq. (7) and displayed in the CIE LAB uniform-chromaticity-scale diagram, wherein x and y are chromatic values, X, Y, and Z are tristimulus values.

$$\begin{array}{cc}X =\frac{X}{X+Y+Z};& Y=\frac{Y}{X+Y+Z}\end{array}$$
(6)
$$\begin{array}{c}{L}^{*}=116f\left(\frac{Y}{{Y}_{n}}\right)-16\\ {a}^{*}=500\left[f\left(\frac{X}{{X}_{n}}\right)-f\left(\frac{Y}{{Y}_{n}}\right)\right]\\ {b}^{*}=500\left[f\left(\frac{Y}{{Y}_{n}}\right)-f\left(\frac{Z}{{Z}_{n}}\right)\right]\end{array};$$
(7)

wherein I/In = X/Xn = Y/Yn = Z/Zn

2.3.5 Color perception transformation

This step transforms [L*a*b*] of CIE LAB color space into color perception attribute values of [L C h], wherein L, \({C}_{{ab}^{*}},\mathrm{ and }{h}_{ab}\) represent lightness, chroma, and hue, respectively, as expressed by Eq. (8).

$$\begin{array}{c}{C}_{{ab}^{*}}=\sqrt{\left[{\left({a}^{*}\right)}^{2}+{\left({b}^{*}\right)}^{2}\right]}\\ {h}_{ab}={\mathrm{tan}}^{-1}\left(\left|\frac{{b}^{*}}{{a}^{*}}\right|\right)\end{array};$$
(8)

The a* and b* for calculating \({h}_{ab}\) have different combinations of positive values or negative values. The absolute value of \(\left(\frac{{b}^{*}}{{a}^{*}}\right)\) was taken, and the appropriate angle was worked out according to the quadrant coordinates.

2.4 LSTM neural network algorithm

To solve the poor performance of neural networks in long time series, an additional output of long-term memory can be created in each neuron, so that the long short-term memory (LSTM) network can process longer sequence data [27, 28].

In terms of the specific process of LSTM networks, each LSTM network had three input data points; the first input point is the memory \({c}_{t}\) − 1, 2 at t − 1 time point; the second input point is the data \({x}_{t}\) at No. t time point; and the third input point is the output \({h}_{t-1}\) at No. t − 1 time point, as shown in Fig. 4. The LSTM network had three types of gate structures, which are forget gate, input gate, and output gate. All these gate structures used a sigmoid function as an activate function, so the output data values were set as 0–1 to simulate gate opening/closing, and the memory unit was operated through the three gates.

Fig. 4
figure 4

Internal structure of the LSTM network [27]

The first step of the operation in the LSTM network is to determine what message the user outputs, and it is completed by the forget gate. The forget gate coefficient judges the importance of current memory for the output at time point t according to \({h}_{t-1}\) and \({x}_{t}\), so as to determine the output of forget gate; if the memory before time point t is very important, including 0 to t − 1, then the output of forget gate should be 1, and the product of 1 and any number is 1. If the output is 0, this means that the memory is unimportant, the product of 0 and any number is 0. If the long-term memory is 0, this means that there is no memory for the moment. The input gate decides whether to add new memory \({c}_{t}\) in the new memory at time point t according to \({h}_{t-1}\) and \({x}_{t}\). The output gate judges how important the memory at time point t is for the prediction at time point t. The memory candidate unit generates the required memory information at time point t through \({h}_{t-1}\) and \({x}_{t}\), wherein xt is the data of the time point, ht − 1 is the time series data of previous point, and ct is the long-term memory output, as shown Fig. 5.

Fig. 5
figure 5

LSTM network architecture [27]

$$\mathrm{Input gate}:{ i}_{t}=\sigma ({W}_{t}{h}_{t-1}+{U}_{i}{x}_{t}+{b}_{i})$$
(9)
$$\mathrm{Forget gate}:{ o}_{t}=\sigma ({W}_{o}{h}_{t-1}+{U}_{o}{x}_{t}+{b}_{o})$$
(10)
$$\mathrm{Input gate}:{ f}_{t}=\sigma ({W}_{f}{h}_{t-1}+{U}_{f}{x}_{t}+{b}_{f})$$
(11)
$$\mathrm{Memory candidate}: {\widetilde{c}}_{t}=tach({W}_{c}{h}_{t-1}+{U}_{i}{x}_{t}+{b}_{i})$$
(12)
$$\mathrm{Memory cell}: {c}_{t}={f}_{t }o {c}_{t-1}+{i}_{t} o {\widetilde{c}}_{t})$$
(13)
$$\mathrm{Output}: {h}_{t}={o}_{t} o \mathrm{tanh}({c}_{t})$$
(14)

3 Experimental procedure and instruments

The experimental equipment used in this study included a CNC machine tool, cutting tools, processing materials, and a temperature measurement module and color correction module. The cutting temperatures of the cutting tool and workpiece material were measured, and the changes in the cutting tool wear value and chip surface chromaticity were shot by using the said experimental equipment. The equipment is described in detail below:

3.1 Forms of machine tool and cutting tool

The machine tool used in this study is a CNC vertical five-axis aggregate machine tool, with a maximum spindle speed of N = 10,000 (rpm), the X/Y/Z axis stroke of 450/300/360 (mm), the fast feed G00 of 36 ~ 48 (M/min), the maximum feed G01 of 12 (M/min), and a FANUC 0i-MD series controller. The test workpiece was NAK80 die steel, and the material hardness was HRC = 42°. The specifications of the cutting tool and experimental equipment CNC machine tool are shown in Fig. 6. The temperature signal data and chip chromaticity image were measured in the experimental process for applied analyses, and the correlation with cutting tool wear value was discussed. After the physical characteristics were satisfied, the neural networks, BPNN and LSTM, were used for modeling and prediction. The difference between the measured cutting tool wear value and the predicted cutting tool wear value was worked out at last, and the experimental process is shown in Fig. 7. This study’s data splits of the neural network methodology training and testing were 70% and 30%, respectively. The experimental data temperature and chip chromaticity are 420 sets.

Fig. 6
figure 6

Experimental equipment and cutting tool machine

Fig. 7
figure 7

Training and test processes of cutting tool wear model

3.2 Development of cutting temperature measuring equipment

The temperature signals were measured by using the device developed in this study. After the cutting temperature at the tool flank was measured, the signals were received by the temperature sensor. The message queuing telemetry transport (MQTT) and Wi-Fi wireless transmission functions were used. The temperature sensor and microcontroller were installed inside the toolholder, with a temperature measurement accuracy of ± 1.5 °C, a sensitivity of 0.25 °C, and a transmission rate of 110–460,800 bps. The data set derived from the temperature signals was preprocessed in this experiment, and the mean value of maximum temperature spot and minimum temperature spot signals was used as an eigenvalue. The temperature sensor was corrected in this study, with an error value of ± 0.5 °C. The temperature measuring equipment is shown in Fig. 8, and the temperature measurement signal transmission mode is shown in Fig. 9.

Fig. 8
figure 8

On-line cutting temperature measuring tool holder

Fig. 9
figure 9

Cutting temperature measuring tool holder system

4 Results and discussion

The fundamental purpose of this study is to create a temperature sensor to monitor the cutting temperature and observe the effect of cutting surface characteristic variation on tool life. The temperature signals collected during machining were used for subsequent data analyses, and the change in cutting tool wear value was observed. The variations of machine condition and chip surface chromaticity were monitored to know the correlation between cutting tool wear values. Finally, a tool wear prediction model was built on neural networks. Different types of characteristic input values were substituted in the built neural model for analysis to evaluate the error value between the measured cutting tool wear value and the predicted cutting tool wear value and estimate the accuracy of tool wear prediction.

4.1 Relationship between cutting time and tool wear

The experiment and analysis were performed referring to the Taylor lifetime curve of a cutting tool in the machining process. The state of tool flank wear in ISO standards of V \({B}_{\mathrm{max}}>0.3\) mm is the standard of termination for this cutting tool wear loss. In order to verify the repeatability of cutting tool wear data, three experiments were performed in this study. The cutting stroke was 3750 mm in each experiment, at which time one measurement was made. The cutting was performed 42 times in Group 1, and the tool flank wear was almost VB = 0.3 mm; the tool life curve is shown in Figs. 10 and 11. The chip curl was relatively regular in the initial wear region and stable cutting wear region, and the chips appeared as fragments in the accelerated wear region. The chip color changed from bluish green into dark bluish green and dark green, and the chip surface color changed from dark green into deep yellow at last. The trends from initial wear to accelerated wear in three repeatable cutting tests were close to each other, and the mean value of overall repeatability was 2.83%, as shown in Fig. 12 and Table 1.

Fig. 10
figure 10

The relationship between tool wear and chip state in Experiment 1

Fig. 11
figure 11

The relationship between tool wear and chip state in Experiment 3

Fig. 12
figure 12

The relationship between tool wear curve and repeatability

Table 1 Repeatability of tool wear trends

4.2 Relationship between tool wear and cutting temperature

This study used the self-developed cutting tool temperature measuring equipment to observe the correlation between the cutting temperature and tool wear. The experimental sampling frequency was 1 Hz, and the cutting tool cut-in and cut-out regions were removed from the effective range of cutting temperature sampling, as shown in Fig. 13. The temperature sensor was installed on the insert back through the toolholder and toolbar, as shown in Fig. 14. The Nos. 1, 10, 20, 30, 40, and 42 temperature measurement data of the same position were discussed. In the case of the same number of machining processes, the cut-in and cut-out resulted in periodic changes in maximum and minimum temperatures, with the maximum error being 14.3%. The larger the tool wear was, the higher the cutting temperature was. This is because the larger the tool wear was, the higher the friction was between the cutting tool and workpiece, and the higher the temperature was, as shown in Figs. 15 and 16.

Fig. 13
figure 13

Sampling range of cutting temperature

Fig. 14
figure 14

Temperature sensor mounting position

Fig. 15
figure 15

Cutting temperature time-domain graph of Group 1

Fig. 16
figure 16

Cutting temperature time-domain graph of Group 3

The average temperatures and cutting times were fitted, the cutting temperature rose obviously as the cutting times increased, meaning the wear state of cutting tool was positively related to cutting temperature. When the tool flank wear changed from the initial wear state to accelerated wear state, the trend was the same as the measured temperature, as shown in Figs. 17 and 18. As a result, the physical phenomena of cutting temperature and tool wear were obtained. In three repeated experiments, the temperature and tool wear error was 9.29%, which was used as the input factor of tool wear prediction model.

Fig. 17
figure 17

The relationship between cutting temperature and processing times is in Experiment 1

Fig. 18
figure 18

The relationship between cutting temperature and processing times is in Experiment 3

4.3 Relationship between tool wear and chip chromaticity

The chip color image was digitized in this study to observe the correlation between tool wear and chip surface chromaticity eigenvalue. Corresponding to the Taylor tool life graph, the trend of chip surface chromaticity was observed from Nos. 1, 13, 25, 37, and 42 cutting groups in the same position. The ranges of chip surface chromaticity X and Y eigenvalues changed clockwise as the cutting tool wear value increased, as shown in Figs. 19 and 20. When the cutting tool changed from the initial unworn state into accelerated wear state, the color change trend of chip surface chromaticity eigenvalue was blue → cyan blue → cyan → cyan yellow → yellow. Additionally, the wear state of overall cutting times was discussed. The chip chromaticity X eigenvalue and Y eigenvalue increased so that the tool wear degree would change from the stable cutting state into accelerated wear, indicating that the tool wear has reached the unsteady state region. The trend diagram of cutting temperature and tool wear is shown in Fig. 21.

Fig. 19
figure 19

Graph of the relationship between tool wear and chip chromaticity coordinate points in Experiment 1

Fig. 20
figure 20

Graph of the relationship between tool wear and chip chromaticity coordinate points in Experiment 3

Fig. 21
figure 21

Cutting temperature and tool wear trend map

4.4 Test error analysis result of tool wear prediction model

After the cutting tool wear, temperature, and chip chromaticity images were discussed, the said experimental results were fitted based on the Taylor life curve of a cutting tool. According to the tool wear, temperature, and chip chromaticity image analysis results, the trend and repeatability were identical. This study used BP-LM and LSTM neural network models to build a tool wear prediction model. The input factors were cutting temperature and chip chromaticity image coordinates, and the output prediction value was the cutting tool wear loss, as described below:

The BP-LM neural network model was used to predict the cutting tool wear value. The input parameters including cutting temperature, the chip chromaticity image coordinate value, and the cutting temperature + chip chromaticity image coordinate value were imported simultaneously and compared. The tool wear prediction results are shown in Fig. 22 and Table 2. The MAPEs of cutting temperature, chip chromaticity image coordinate value, and cutting temperature + chip chromaticity image coordinate value prediction results are 31.5%, 32.96%, and 21.16%, respectively, so the prediction result of single input factor had larger errors than multiple input factors. In Experiment 3, the MAPEs of prediction results of single characteristic cutting temperature, chip chromaticity image coordinate value, and two characteristics are 17.28%, 25.44%, and 16.26%, respectively, and the prediction result was the same as that of Group 1.

Fig. 22
figure 22

Group 1 and 3 tool wear prediction result of BP-LM prediction model

Table 2 Groups 1 and 3 tool wear prediction error percentage (BP-LM)

When the LSTM neural network model was used to predict the cutting tool wear value, the cutting temperature, chip chromaticity image coordinate value, and cutting temperature + chip chromaticity image coordinate value were compared. The MAPEs of tool wear prediction results are 30.27%, 29.5%, and 22.1%, respectively. It was observed that the larger the number of input factors was, the smaller the MAPE was, representing higher prediction precision, as shown in Fig. 23 and Table 3.

Fig. 23
figure 23

Group 1 tool wear prediction result of TiAlN coating in LSTM prediction model

Table 3 Group 1 tool wear prediction error percentage (LSTM)

When the neural network prediction models BP-LM and LSTM were analyzed and compared, the cutting temperature and chip chromaticity image coordinate value as input parameters were better than the prediction result of cutting temperature and chip chromaticity image coordinate value. This proved that the MAPE of prediction result decreased as the input parameters increased. The MAPE of prediction results of neural network prediction models BP-LM and LSTM are 19.88% and 22.1%, respectively, and the BP-LM and LSTM prediction methods are in the error range of 10% < MAPE < 20%, meaning the prediction precision of different neural networks could conform to the predictive ability level in the specified range of MAPE, as shown in Fig. 24 and Table 4. The LSTM had larger errors than BP-LM in the prediction test because the few LSTM training weights and time sequences resulted in larger errors.

Fig. 24
figure 24

BP-LM and LSTM tool wear percentage errors

Table 4 BP-LM and LSTM tool wear percentage errors

5 Conclusion

The LSTM and BP methodology applied in this paper is used for tool life prediction, and the input is chip color and machining temperature parameters. Results can be applied to optical molds, deep drawing dies, and the cold extrusion dies industry applications. Conclusions are as follows.

  1. 1.

    The chip surface chromaticity X and Y eigenvalues could be obtained by chip color image processing, and the correlation between tool wear and chip surface chromaticity eigenvalue was established. As the tool wear increased, the chip surface color changed in the order of blue → cyan blue → cyan → cyan yellow → yellow, even reaching the ranges of cyan and yellow. The color change was the most apparent when the cutting tool was in the stage of accelerated wear.

  2. 2.

    The tool wear, chip image chromaticity, and temperature change were transformed by using Taylor’s curve of a cutting tool. The overall repeatability average of tool wear is 2.83%, so there were high repeatability precision and experimental accuracy.

  3. 3.

    In terms of tool life prediction, when the input eigenvalues were temperature and chip image chromaticity value, the mean errors of the BP-LM neural network model are 24.23% and 31.87%. The mean error is 19.88% when the input eigenvalues were temperature and chip image chromaticity value, so the error was reduced by 29% as the input eigenvalues increased.

  4. 4.

    In the LSTM neural network model, when the input eigenvalues were temperature and chip image chromaticity value, the mean errors of prediction are 30.33% and 28.55%. The mean error of prediction is 22.1% when the input eigenvalues were temperature and chip image chromaticity value, so the error was reduced by 25% as the input eigenvalues increased.

  5. 5.

    The mean errors of BP-LM and LSTM neural network prediction models are 19.88% and 22.1%, and the BP-LM and LSTM prediction methods are in the error range of 10% < MAPE < 20%, meaning the prediction precision of different neural networks could conform to the predictive ability level in the specified range of MAPE. The LSTM had larger errors than BP-LM in the prediction experiment because the few training weights and time sequences of LSTM resulted in larger errors. Using K-means ant colony optimization (KACO) to optimize the path features in the chip chromaticity coordinates, this methodology is recommended for future studies.