Artificial Neural Network Model for Prediction of Tool Tip Temperature and Analysis

Technological improvements put computer systems in the center of our life and various scientific disciplines. These can range from controlling a device in our home to public institutions and the industry. One of these disciplines is a sub-area in mechanical engineering called machining is concerned with not only mechanical systems but also computer aided systems. Artificial Neural Networks -an area of artificial intelligencewhich is concerned with learning and decision making of computers is a field that scientists are very interested in. In this study, an Artificial Neural Network system was designed for predicting the temperature at the tool tip in the machining process. In the metal cutting process, tool tip temperature is one of the conditions that must be identified, analyzed and monitored. For this purpose, an ANN model was developed to determine the tool tip temperature in the turning process. In the designed ANN model, parameters consisting of three inputs and one output were used. The three input variables were rake angle (γ-o), approaching angle (χ-o), feedrate (fmm/rev) respectively. The output parameter was the tool tip temperature (T-0C). The most appropriate model was determined according to Mean Squared Error ratio. In the test phase of the Artificial Neural Network, the smallest Mean Squared Error was obtained with the Artificial Neural Network topology formed as 3-4-1. In this Artificial Neural Network model, calculations were Mean Squared Error=0.00144, R2=0.9956 (absolute fraction of variance) in the training phase and Mean Squared Error=0.00231, R2=0.9954 in the test phase. The results show that the designed Artificial Neural Network model can be used for predicting and analyzing tool tip temperature.


Introduction
Computer-aided applications have found usage in one of the common disciplines of technology that is the mechanical engineering and it's sub-field the machining. A workpiece in machining is produced by removing parts of various sizes using cutting and machine tools suitable for the process. In this process, with the help of appropriate parameters, the most important objective is producing parts that are undamaged, smooth and high quality. In the manufacturing technology, the main factor affecting the usability and cost of the material is the metal cutting process. Proper cutting conditions are created with different situations in the tool geometry and the process yield is aimed to be increased at the maximum level with the help of the quality of the produced workpiece. It is very difficult to develop a comprehensive model that includes all cutting parameters and tool geometry [1,2,3,4]. Computers are initially developed to transfer electronic data or to perform complex calculations and now they can gather information about events, make decisions and even learn about the relationships between events. Complex problems that are very hard or even impossible to solve can be solved via approaches that are heuristic and considered in artificial intelligence. These solutions could be developed into a model. Along with computer technology, artificial intelligence is constantly growing, and new approaches are emerging in every area. Artificial Neural Networks -an area of artificial intelligence-which is concerned with learning and decision making of computers is a field that scientists continue to be very interested in [2,3].
As technology develops, there are positive improvements in machining industry about production cost, productive and quality. It is important that produced workpiece is of good quality, smooth and undamaged during the machining process that is shaping the workpiece on cutting tool. Cutting parameters and tool geometry must be determined for the production cost. Tool geometry variables (rake angle, approaching angle etc.) and cutting parameters (feedrate, cutting speed, depth of cut) affect the temperature and cutting force on the tool during the process. The changes in these parameters cause the tool tip temperature (TTT) values on the tool surface to change. It is therefore important that the TTT value is known and monitored. The sliding of sawdust on the surface of the cutting tool occurs under high pressures and therefore high temperatures occur on the tool surface due to the magnitude of the cutting force and the friction. Factors such as gradual deformations in the cutting tool geometry, fracture of the cutting edge due to the instantaneous high forces, plastic deformation in the cutting tool due to high temperature and stresses are the reasons for the cutting tool to lose its cutting ability. The cutting temperatures, especially the maximum temperature at the surface between tool and sawdust are also important in terms of tool life. Cost of production, productivity and the quality are also related with the monitoring of TTT. TTT can be measured by sensors (experimentally) during the lifting process and can be transferred to the computer via cards. However, these measurements may not be at the desired accuracy due to some negativity during the process. There can also be heat dissipation. In other words, TTT detection can be difficult to determine even after measurements. Therefore, different mathematical approaches can be used to calculate the surface temperature correctly [1, 4, 6,7,8,9,10]. In metal cutting, creating a model for determining TTT that includes all the cutting parameters and tool geometry is very difficult for such a non-linear and complex field. In such difficulties, it would be a wise solution to develop models that use artificial intelligence techniques such as artificial neural networks or fuzzy expert systems etc. Inspired by human brain functions, Artificial Neural Network (ANN) can learn and generalize through testing. One of the important areas where ANN is used is estimation. ANN may reveal unknown or hard to perceive relationships between data. Many studies show that ANN is as widely used as conventional methods and gives even better results in estimation studies. The success of ANN, especially in non-linear situations makes it favorable as an estimation appliance. For this purpose, a model was designed to enable the network to learn the pattern between input and output data [2,3,11]. In literature reviews; studies like various software that performs analysis based of the finite element technique [19], experimental, mathematical [4,5,6,18], statistical [20,15] and analytical models [21,12], three-dimensional model [13], optimization (using Taguchi method etc.) [14,17] and artificial intelligence methods [20,7,16,11] are used for modeling the temperature. The purpose of this study is to estimate and analyze TTT (T-0 C) in the turning process of metal cutting. For this purpose, an ANN approach based on variable tool geometry and cutting parameters. The developed ANN model has three inputs (rake angle, approaching angle, feedrate), one hidden layer (hl) and one output (tool tip temperature). It has been observed that there is a strong correlation between the temperature values estimated by ANN and the measured experimental [4] data. Analysis and comparisons made based on the consistency between the values obtained this way.

Artificial Neural Network Model for Tool Tip Temperature
ANN has a network with input, output and hidden layers. This computer system can derive and create new information by using relations between these layers through the learning process like the human brain. Each layer receives input with connected weights from the other neurons, passes thorough the neurons and produces and output signal that can also be produced by other neurons. In this way the process proceeds along the neurons and layers back and forth. When the process reaches the specified error value, the network training process stops and model is created. There are numerous ANN network struct ures and architectures in the literature. These includes the feed-forward back-propagation network which is commonly used for engineering and estimation operations [2,7,11]. ANN architecture for TTT estimation is "3-hl-1" (Figure 1). This model was designed with the help of the data obtained by Saglam et al [4]. System modelling with ANN approach was done based on the cutting conditions given in Table 1. In the working conditions, the depth of cut is 1.5 (d-mm) and cutting speed is 133 (v-m/min). ANN for estimating TTT has a structure with 3 inputs, 1 hl and 1 output (Figure 1). The input parameters are rake angle (γ-o ), approaching angle (χ-o ) and feedrate (f-mm/rev). The output parameter is the TTT (T-0 C). The dataset [4] includes 256 values, 192 for training and 64 for testing. A computer with Intel i7-4720HQ 2.6Ghz processor, 16GB RAM and Matlab software used for modeling an ANN. After designing the ANN network structure, the input and output values obtained via experimental study were normalized (to improve the training character) between 0-1 using equation (eq.) 1 [22].
Here, V denotes experimental real values, VN denotes normalized values by equation 1 and Vmax, Vmin denote the minimum and maximum values in V.   Table 2 gives the descriptive statistical results that summarize the numerical values of the data set and convert them to descriptive indexes. In the training and testing processes, different training algorithms (trainlm-traingd) and transfer functions (purelin, tansig, logsig vb.) in the hidden and the output layers were examined using feedforward back-propagation algorithm. With these experiments, the most suitable network model was tried to be found in the ANN network structure. For this purpose, the network was trained and tested by changing the number of neurons, epochs and the training and transfer functions in the hidden layer. Thus, it is aimed to find the best network. The results are obtained with the aid of a software developed using Matlab. In the ANN procedure, the statistical comparisons between experimental and estimated values are done using mean squared error (MSE-eq. 2) and absolute fraction of variance (R 2 -eq. 3) [23,24]. With these statistical results, the most suitable network model was determined. These equations are; Here, di denotes the target or real value, Oi denotes the output or the estimated value and n denotes the number of outputs.

Results and Discussion
First step in the study is determining the training algorithm that gives the best results. For this, training and testing processes of ANN software were run in Matlab. In this way, it was determined which training algorithm gives more close results to experimental TTT measurement values. Levenberg-Marquardt (trainlm) and Gradient descent backpropagation (traingd) algorithms were run on the 256 data set (4 fold) respectively and results were obtained. While training algorithms trainlm and traingd were running, the transfer functions Hypberbolic Tangent Sigmoid (tansig), Logistic Sigmoid (logsig) and Linear (purelin) were tested in the developed software respectively and results were obtained. The best results of the training and the test processes were determined by MSE and R2 error rate. The number of epoch and neurons in hidden layer are also considered when determining the best algorithm. The training algorithm were chosen with the smallest error rate. As a result, the most suitable transfer function was logsig (Log-Sigmoid) and training algorithm was trainlm (Levenberg-Marquadt). In this case, the neuron counts in the hidden layer for all training and test algorithms in the single layer network structure were changed to 2, 4, 7, 10, 20, 50 respectively. As the number of neurons in the hidden layer was changed, the number of epochs was also changed to 2, 5, 10, 15, 20, 25, 100 respectively and MSE, R 2 results were observed (Table 3). When the MSE and R 2 results are examined, the models with the smallest MSE error rate and the highest R 2 value were analyzed. These analyzes are done to find the best performance. Among these network models, the network that gives the best result in test phase that is best represents the experimental values is the most suitable network. In this study, 3-4-1 (5 Epochs) structured model-9 has the smallest MSE (0.00231) and the highest R 2 (0.9954). In this case, as can be seen from Table 3, there are very suitable models that can be used for training. After the training phase, even if there are models with low MSE error rate, it can be said that the same model doesn't give successful results in the test phase according to MSE and R 2 statistical rates. Therefore, in the testing process, 3-4-1 model with the lowest MSE error rate and the highest R 2 ratio were used. When the Table 3 values compared, this model has been used for both training and test phases. trainlm for training algorithm and logsig for activation function were determined.
The MSE result and comparative experimental measurement-ANN graphic obtained by the training (logsig-trainlm) for the chosen model of 3-4-1 can be seen in Figure 2. The MSE result and comparative experimental measurement-ANN graphic obtained by the testing (logsig-trainlm) for the chosen model of 3-4-1 can be seen in Figure 3.  When the comparative graphics in Fig.2 and Fig.3 are examined, it can be seen that the estimated TTT values with ANN model are similar to those obtained with experimental studies and measurements. The statistical results in Table 3 can make the comparisons clearer.
In the later stage, all estimated data after training and testing phases (model 9) in 3-4-1 (5 Epoch) ANN model were combined. All results estimated with ANN and all TTT results measured in experimental [4] studies were compared. Comparative graphic can be seen in Figure 4. Furthermore, the correlation coefficient was calculated statistically as R=0.99. When the experimental TTT values and estimated ANN values are compared, it can be seen that they are close to each other, similar and compatible. The developed ANN results and the measured values were evaluated by using regression analysis. The graph shown in Fig. 5 indicates that the correlation coefficient was 0.99. In the case presented in this study, the correlation coefficient obtained were very close to 1, which indicates a perfect match between ANN estimation values and measurement of temperature values. There were no meaningful differences between the measurements of TTT and ANN results.

Conclusion
In this study, a three input one output ANN study was performed to determine the tool tip temperature during the turning (metal cutting) process. If the data set, the parameters, difficulty of repeating the experiment and creating the mathematical formulas are considered in a non-linear situation, it can be seen that the use of ANN is a useful. Under these circumstances, TTT values were estimated with a developed ANN system. Numerical results obtained from ANN model were compared with experimental results. The comparisons show that there is a correspondence between the two groups of data. It is seen that ANN has provided successful results and can be modeled for estimating this kind of systems. The training functions offered by MATLAB were tried and it was observed that the trainlm (Levenberg-Marquardt) training algorithm provided the best solution. It was observed in the test results and graphs that the logsig (Logistic Sigmoid) function yielded more successful outcomes. Accuracy rates that were obtained during the training and testing stages and MSE show that the model created in the study can be used for predicting TTT. It is thought that when the number of cutting parameters and values are changed, the success rate can be further increased. Also, instead of the ANN used in study, when another intelligent system, algorithm, mathematical or statistical approaches are used alone or in combination with ANN, it can affect the success rates. The ANN model can turn the disadvantages of experimental studies to advantages. Furthermore, this developed model has the ability to estimate the outcomes of parameters that couldn't done in experiments.