1. Introduction
A new technological era, called Industry 4.0, will change all manufacturing-related fields [
1]. The industrial and production processes will be transformed into intelligent factory systems [
2]. Production will be controlled autonomously and dynamic, with a high degree of automation [
3]. Smart systems are replacing human decisions.
Due to high competition on the market and corresponding lowering of the production costs, minimal worker presence, or even unmanned machining, is becoming the key trend of the majority of manufacturing industries [
4]. In manufacturing, the main source of financial and time losses arises from material waste due to machining with an excessively worn tool, and machine downtime [
5].
We asked ourselves: Why are robots already replacing workers in assembly lines, at workpiece manipulation, welding, casting, etc., while turning and milling machine operators are still not (entirely) replaceable? The field of Computer Numerical Control (CNC) machine augmentation is under intensive development, which is resulting in a greater performance of the machines, capable of multiple operations on a single machine (e.g., lathes with a driven tool and an additional y-axis allows a milling operation), faster machining, etc. Even the latest modern machines, whose purpose is an individual or small series production, are not capable of autonomous operation without human supervision.
It is crucial for automatic, or so-called unmanned machining, to detect wear of a cutting tool edge in time to prevent negative effects on the quality of a machined surface [
6,
7]. Excessive cutting tool wear can also lead to serious workpiece or machine damage [
8]. The wear control of a cutting tool benefits product quality enhancement, tool-related costs’ optimisation, and assists in avoiding undesired events. In small series and individual production, the machine operator is the one who determines when to change a cutting tool, based upon their experience. Bad decisions can often lead to greater costs, production downtime and scrap.
We focused on the turning process. The condition of a cutting tool affects not only workpiece properties (geometrical, surface, and structural attributes), but also the quantity of waste and frequency of production interruptions [
9]. When should one change a cutting tool? As seen in
Table 1, this is decided by a machine operator based on their expertise and informal knowledge (feeling, personal judgment, and experience), depending on numerous criteria [
8,
10].
Stochasticity of the process for a cutting tool wear determination can lead to the following scenarios:
the cutting tool is still suitable for machining after replacement: A consequence of this is an increase of cutting tool-related costs, and time spent needlessly for tool exchange;
the machining takes place using a worn or broken cutting tool: A consequence is a low quality of the machined surface, overheating of the workpiece and tool material, an increase of vibrations and cutting forces, which has negative effects on the machine, etc.
In practice, both scenarios occur regularly, especially due to less experienced operators, who cannot make the right decisions about a cutting tool replacement. Cutting tools’ catalogues contain cutting tool lifetime information-the time that a tool spends in contact with the workpiece. Such data would theoretically be useful if the machining process could be executed under the exact same conditions that were used during lifetime estimation. In a real environment, there are no such conditions-defects in the material, welded areas with high hardness, cutting path interruptions, uneven cooling, vibrations during machining, and other disturbances have a significant effect on the cutting tool lifetime. There is a possibility for a cutting tool to damage even at a first cut, which makes active decision-making based on constant tool supervision fundamentally better than lifetime-based decision-making.
An important influencing factor on the cutting tool wear is a tool’s thermal load. Finding correlations between machining parameters (turning, milling) and the cutting temperature is frequently an object of research [
11,
12,
13,
14,
15]. There are similar conclusions:
higher temperature causes greater tool wear, and
cutting speed has the largest effect on the temperature.
Correlations are, therefore, inversely proportional. Choosing optimal machining conditions is a significant challenge (
Figure 1).
It is the interdependence of temperature and cutting tool wear that makes the method of thermography one of the possible ways for machining process control.
The optimisation of machining processes requires thorough study and comprehension of the phenomena. In 1996 an infrared (IR) camera was used to measure the temperature of chips and a cutting tool. They found that after the cutting edge is broken, the temperature of a tool rises quickly. Furthermore, there is a connection between the temperature and the wear of a tool’s flank surface [
11].
The heat transfer during the turning process and lathe tool life have been researched, so that, along with the IR camera measurements, they also included thermocouple measurements, which were positioned on the tool and workpiece. A correlation has been discovered between locations on the tool with the maximum temperature and area of insert wear [
12].
The IR camera measurements are ordinarily carried out laterally, i.e., perpendicular to the direction of the cutting speed, so a model was developed that calculates temperatures at the contact point between a tool and a chip. This is done based on the given process parameters (cutting force, chip thickness, tool-chip contact length) and a lateral thermal image of the tool [
13,
14]. It was concluded that a two-fold increase in the cutting speed (from 100 m/min to 200 m/min) causes a 20% increase in the tool temperature. Meanwhile, doubling the feed rate (from 0.1 mm/rev to 0.2 mm/rev) yields only 10% higher temperatures. All measurements were made without cooling during the machining process, due to the presence of the IR camera [
13].
Another research focused on a correlation between the cutting parameters and temperature gradients on the cutting insert, where a thermal image was observed during turning (heating of insert and chips). Cutting forces were also studied, as well as chip shape and tool-chip contact length. The monitoring of the process with an IR camera was necessary to provide an adequate method for researching the mechanical and thermal aspects of cutting [
15].
Many authors considered the possibilities of automatic cutting tool condition control. They found that the most suitable approach for modelling non-linear dependencies are Artificial Intelligence methods, namely artificial neural networks (ANN), fuzzy logic systems, or a hybrid of both [
9,
16,
17,
18].
Automatic prediction of the remaining life of cutting edge is possible using ANN. Accuracy of predicted flank wear is proven by conventional methods (measurements) and image recognition with the special software Neural Wear [
18].
An algorithm was developed that processes the thermographic image of a tool insert: It divides it into two parts (the cutting area and surroundings), and from the cutting area discerns two temperatures that represent an input for the neural network. The temperature of the surrounding area is used to calculate the heat transfer to the rest of the tool insert. A neural network makes predictions about the temperature at the point of contact between the tool and the chip, that would otherwise be impossible to measure during turning due to physical limitations [
19].
The general regression neural network (GRNN) enables a prediction of the tool’s nose wear on the cutting edge. Input data are speed, feed rate, and cutting depth. Results indicated the need for an additional three parameters (three force components) in order to get better prediction capability [
20].
It was confirmed that the cutting tool flank wear affects the cutting force amplitude. Using a backpropagation neural network (BPNN), the percentage error of the predicted wear was found to be between 0.6% and 15.1%. The measured forces and parameters of turning were used as inputs for the neural network, which was comprised of 30 neurons in the hidden layer and eight neurons in the output layer (output neurons represent binary inscription of the flank wear, i.e., eight features of the wear) [
21].
The insert wear can also be monitored with computer vision [
22,
23]. The algorithm discerns four separate wear types: wear of the flank surface, fracture, built-up edge (BUE), and chipping [
23].
Another algorithm that analyses the insert, calibrates and calculates the average width and a tool wear area automatically with a 3% absolute average error [
24].
Real-time tool wear and breakage detection was developed on a CNC machine. The input data were the electrical current, measured on a spindle, which was analysed with the deep learning method (a convolutional neural network with the backpropagation) [
25,
26].
In more recent research [
27], tool wear during milling was monitored with the help of standard images and deep learning. Tools were divided into four categories of wear, each containing approximately 2000 images. Based on the database, the system learned to predict the wear with a 96.20% accuracy.
To the best of our knowledge, there are no studies that consider the control of a machining process with an IR camera and direct cutting tool condition recognition, based on a thermographic image and a prediction model. The novelty of this research is the classification model for the tool condition monitoring during machining, which achieves extremely high accuracy. The process is monitored with an IR camera which captures multiple factors simultaneously, that are shown in
Table 1: Visual inspection, temperature condition, chip shape. Our research surpasses the current state-of-the-art because the proposed solution contains not only temperature measurements and assumptions based on temperature value, but a 2D-colour thermographic image, which contains substantially more features. Such an image is the bearer of a huge amount of information because each image point (i.e., pixel) is separate data, which store some absolute value. Likewise, the pixel’s location in the image is equally important, so is the arrangement of similar pixels and the differences between them, etc. Classical analytical models are not capable of decision-making based on such a large quantity of input data, therefore we developed an intelligent system, which has learned to correlate image features with the none, low, medium, and high tool wear levels. Results are highly useful for optimizing costs and processes in the manufacturing.
This paper is organised as follows:
Section 2 presents the proposed method for the monitoring of the machining process and prediction model, based on the CNN;
Section 3 reports the Results and Discussion;
Section 4 describes the conclusions of the paper.
3. Results and Discussions
3.1. Classification of the Cutting Tool into 4 Classes
The first classification was performed using images, which are presented in
Figure 7, that is for four classes of cutting tools. The results of the classification are shown in
Table 8.
The model learned to recognise various wear levels of inserts successfully, and achieved accuracy of 95%. The best recall was reached for classes “No wear” and “Low wear”; conversely, classes with the most prediction errors were “Medium wear” and “High wear”. From the point of industrial applications, it is important never to miss-categorise “High wear” to be of the class “No wear” or “Low wear”. This could lead to scrap (when using a highly worn insert for machining to the final tolerance, one would not be able to achieve the required dimensional criteria and surface roughness).
3.2. Determining the Optimal Number of Training Iterations
The number of training iterations is one of the most typical topological parameters of a Neural Network, that has a direct impact on the classification result quality. Generally, increasing the number of iterations causes better model accuracy, but it also increases the time needed for model training. The training time grows linearly, while the classification accuracy converges to some value. The parameter of iteration number was varied, and the CNN classification was carried out for ten distinct values of it. The number of iterations was between 10 and 10,000.
Figure 10 shows that the accuracy of the model grows up to 5000 iterations, while the additional iterations bring a minimal, insignificant difference. 5000 iterations were made in 24.6 min and the achieved accuracy was 95.0%. At 10,000 iterations and almost 50% longer training time (36.5 min), the accuracy improved by just 0.5%. 5000 iterations have been determined as the optimal choice.
3.3. Classification of Cutting Tools into Three Classes
Prior results show that a CNN struggles most when classifying an insert with a medium wear level. Machining-wise and in a sense of industrial use, this category makes little sense, therefore, the decision was made to keep only three wear categories. The severity of the wear at which a tool is still usable depends on the type of workpiece’s material and its requirements (tolerance, roughness), and a general rule is written in
Table 9.
The classification was repeated with 3 categories of tool wear: None, low, and high wear. The model training was performed in 5000 iterations. The results of the classification are collected in
Table 10.
The classification accuracy with three classes yielded 99.55%, which is an excellent result, and confirmation of the possibility for the method to be used in a real process. Only three of 660 images were classified incorrectly. CNN made a mistake when classifying “no wear” and “low wear” tools. All images in “high wear” were predicted correctly, which is a fundamental advantage. The model could be used in industry, especially because a sudden tool breakage is the most significant factor for a smooth working process.
3.4. Classifications with the Exclusion of Image Series
The nature of the experiment caused each individual image to be a part of the series (each cut of the insert represents one image series). Therefore, we made 13 different classifications, where we excluded selected image series from the training set and used it as a test set. CNN did not see any of the images from the test set during training.
We excluded the first cut (first image series) from the training set in the first classification. The second image series was eliminated from the training set during the second classification, etc. The training and test sets are shown in
Table 11, and the results of all 13 classifications are presented in
Table 12 and
Figure 11.
As expected, the greatest deviation was in the first exclusion of the image series. What are the possible causes? The first cut was not uniform. The workpiece does not have an even diameter, therefore conditions were varying along with the cut-the cut depth was not constant. The second, very important aspect is temperature. The workpiece was initially at room temperature. At the first cut, the workpiece was cold, so we infer that it was cooling the insert. Training of the model was executed exclusively on later cuts when both insert and workpiece were already heated, but the first cut was in the test dataset. CNN did not know about any of the images with a cold insert and a workpiece. Besides everything written here, the classification accuracy was 93%, which was well above our expectations.
In later cuts the tool and the workpiece were at least partially heated. When we exclude any other series that followed, the classifications become comparable and are all above 99.6%.
The average classification accuracy for all 13 classifications was 99.39%, although if only series from 2 to 13 are taken into account, it was even higher-at 99.87%. For series from 2 to 13, there were four out of eight incorrect classifications, where an image was one of the first three in the series. It is important that the error is made in random images, and never in two subsequent images. We propose that future system upgrades should include analysis of three subsequent images in the classification and determine wear level only if all three predictions are of the same class. The proposed method would enable the classification accuracy to be 100%.
4. Conclusions
Monitoring of the cutting tool wear during the machining process is crucial for final product quality, as well as manufacturing costs’ optimisation. Due to the extreme conditions in the proximity of the cutting (hot chips), in-process tool monitoring becomes difficult. In the scope of the research, we found a solution for equipment protection and developed a method for real-time process monitoring in the immediate proximity successfully.
An IR camera was used, which captures the following process attributes: Visual inspection of the surroundings, workpiece, and chips; acquisition of the temperature conditions and the chip shape. The absolute temperature value was not measured, and the IR camera automatically adjusts the temperature scale for each image. Image recognition is based on the temperature gradients, not on the absolute temperatures.
The research objective was to develop a classification model that would discern the wear level of the cutting insert autonomously, based on deep learning and the convolutional neural network.
First, we categorised the tool condition into four classes (no wear, low wear, medium wear, and high wear). The model was trained using over 8000 images. The test set contained 880 images, out of which 836 were classified correctly. With that, the achieved classification accuracy was 95.00%. Most of the incorrect classifications happened in the classes “medium wear” and “high wear”. For images in series, which were captured from the start of turning (cold tool), the CNN categorised them in the better category rather than the actual. While, after turning for some time (tool and workpiece were heated), some images were classified as a higher wear level than they should be.
It is unusual for industrial machining to distinguish between medium wear level and high wear level. The medium wear level of the insert produces low quality surfaces, also such an insert is overheating and breaks after a short usage time. This model also distinguished between these two categories badly. Based on the classification results and the usefulness for industry we decided that a more sensible categorisation should be into just three classes (no wear, low wear, and high wear). We repeated the classification. Results for the three classes were astounding, because the reached accuracy was 99.55% for a random test set. The average classification accuracy was 99.39% for 13 classifications, where we excluded the image series for the individual test set.
Results were compared with the research which was done by Wu et. al. [
27]. Their goal was automatic cutting tool wear type determination (adhesive wear, tool breakage, rake face wear, and flank wear), but they did not determine the adequacy of the worn tool for the machining. They used a classical camera and the CNN for image analysis. The achieved accuracy was 96.20%. The tool classification according to it’s suitability for further machining has already been done by Garcia-Ordas et.al. [
28] and achieved accuracy of 90.26% Our system with an IR camera, which was proposed in this article, turned out to be more effective (better accuracy). Its additional benefit is the monitoring of a tool during machining.
The research objective was to develop a model, that makes decisions in place of the human. We were successful in that. With more than 99% model accuracy we affirmed the capability of decision-making about the cutting tool condition, using the IR camera and Artificial Intelligence.
Other smart systems often theoretically determine the type and the size of a tool wear. The presented model makes decisions from a practical point of view-is this tool still suitable for further machining? Practical significance of the research is reliable and fast detection of the tool wear, which ensures savings and an increase of machined surface quality in the industry. The advantage is also a relatively low investment cost, which is estimated at 2500 EUR for all needed equipment.
It was confirmed that the method is suitable for determining the cutting tool condition in a real industrial environment, and that it enables the determination of the tool condition at the first cut.