A New Tool Wear Monitoring Method Based on Ant Colony Algorithm

Tool wear prediction is a major contributor to the dimensional errors of a work piece in precision machining, which plays an important role in industry for higher productivity and product quality. Tool wear monitoring is an effective way to predict the tool wear loss in milling process. In this paper, a new bionic prediction model is presented based on the generation mechanism of tool wear loss. Different milling conditions are estimated as the input variables, tool wear loss is estimated as the output variable, neural network method is proposed to establish the mapping relation and ant algorithm is used to train the weights of BP neural networks during tool wear modeling. Finally, a real-time tool wear loss estimator is developed based on ant colony alogrithm and experiments have been conducted for measuring tool wear based on the estimator in a milling machine. The experimental and estimated results are found to be in satisfactory agreement with average error lower than 6%.


INTRODUCTION
The demand for machining accuracy has shown a pronounced and steady growth in recent years and tool wear is of vital importance, as it affects the quality of the product and the efficiency of the process.Palanisamy et al. (2008) focused on two different models, namely, regression mathematical and Artificial Neural Network (ANN) models for predicting tool wear, because tool wear prediction plays an important role in industry for higher productivity and product quality.Jacob and Joseph (2005) proposed an artificialneural-networks-based in-process tool wear prediction (ANN-ITWP) system, the input variables for the proposed ANN-ITWP system were feed rate, depth of cut from the cutting parameters and the average peak force in the y-direction collected online using a dynamometer and the system could predict the tool wear online with an average error of ±0.037 mm.With tool wear there is an increase in cutting forces, which leads to a deterioration in process stability, part accuracy and surface finish, Choi et al. (2004) observed cutting force trends and tool wear effects in ramp cut machining as machining progresses.In order to maintain product quality and process efficiency, machining processes attempt to prevent tool breakage by predicting the tool wear.However, tool wears changes drastically during individual cutting processes.Thus, it often fails to predict the tool wear.As a result, the tool may break in-process, damaging the workpiece and inducing process inefficiency.Tool wear can be predicted either out-of-process or inprocess.The traditional method is moving the tool out of the machine to check the wear under a microscope, or checking the tool wear with other measuring devices, such as a charge-coupled device camera, machining has to be stopped for the out-of-process tool wear monitoring.However, in-process tool wear can be predicted during machining processes.Of the two, outof-process tool wear monitoring is less promising, inprocess tool monitoring leads to optimum process efficiency, but depends on well-selected sensors and prediction algorithm.Girardin et al. (2010) developed a new method using standard transducers available on actual machines for a better monitoring of cutting process and analyzed instantaneous variations in rotational frequency so as to observe milling operation.Finally experimental cutting tests were performed on a milling machine, cutting forces were acquired through common dynamometer and signal from spindle integrated rotary encoder is acquired using specific angular-sampling methodology and a TCM system was developed based on the experimental results.Gregory and Samson (2005) found a best logistic regression model for predicting whether cutting was taking place or not contains signal maximum amplitude, controlling for both feed rate and depth of cut.The model explains, within the accuracy of the software tools used, 100% of the variability in cutting versus non-cutting measurements (R2 = 1.0000) and, for the given data, accurately predicts whether or not cutting was taking place for all 27 of the measurements.Quiza et al. (2008) presents an investigation into predicting tool wear in hard machining D2 AISI steel using neural networks and an experimental was carried out using ceramic cutting tools, finally two models were adjusted to predict tool wear for different values of cutting speed, feed and time, one of them based on statistical regression and the other based on a multilayer perceptron neural network.The neural network model has shown better capability to make accurate predictions of tool wear under the conditions studied.Shahabi and Ratnam (2008) developed a vision system using high-resolution CCD camera and back-light for the on-line measurement of tool wear, an algorithm using Wiener filtering, median filtering, morphological operations and thresholding was developed to measure the nose wear area of the inserts under different machining conditions.Luo (2004) analyzed the formation mechanism of tool wear and presents a complete solution to calculate wear using a ball end cutter for high-speed cutting.An improved algorithm and a knowledge-based decision model developed to calculate effective tool contact are also discussed to help reduce calculation time and improve calculation efficiency.The calculation results include output form and a 3D wear model showing wear data distributed on the tool contour.
The conclusion can be drawn that contemporary research on tool wear prediction is mainly focused on different neural networks and regression models.However, most of these studies cannot overcome the non-linear and time-varying problem of the tool wear monitoring.In this paper, a real-time, in-process tool wear monitoring system in milling operations is developed and ant colony algorithm is proposed for training the weights of neural network model, which solves the problem of poor convergence and local minimum.As machining parameters and force signals in milling operations are all used for tool wear monitoring, the prediction accuracy of the estimator is improved.

EXPERIMENT SETUP
Since milling is one of the most complex machining operations, milling process is selceted in this study; the tool wear can be formally described by a discrete nonlinear relationship: where, M is an unknown function to identify, F‫,ݔ‬ F‫,ݕ‬ F‫̀ݖ‬ is the cutting force exerted during the removal of As shown in Fig. 1, the experiment was implemented on a high-precision CNC milling machine, which is interfaced with a personal computer by an RS-232 communication link.Both feed speed f and depth of cut D are collected through the CNC control system and cutting force is collected through two sensors: dynamometer and proximity sensor.The complete experimental setup is shown in Fig. 2 and consists of hardware and software setups.
By monitoring cutting force and controlling cutting conditions, the system can predict tool wear and sense tool change.The dynamometer and the proximity sensor used in the study like an eye to the machine that monitors tool wear by observing the change of the cutting force.With the sensor integrating a tool wear prediction system based on BP neural networks and ant colony algorithm (BPN-ACA TWP System, which is composed of the BPN-ACA estimator and the personal computer) into the experimental system, the machine has the capability of interpreting and reacting to data from the sensors.In addition, the machining parameters are collected from the CNC control system of the milling machine.
The software setup is mainly composed of three modules: During the milling process, the average peak cutting force and the machining parameters are sent to the BPN-ACA TWP system and the tool wear is predicted in-process finally.The structure and the testing procedures of the BPN-ACA estimator will be discussed in the next section.

TOOL WEAR PREDICTION
Neural network model: Neural networks have good performance of nonlinear mapping, which have been applied to tool wear monitoring widely in recent years.Dong et al. (2006) introduced the application of neural networks based on Bayesian inference, the automatic relevance determination algorithm for selecting relevant features and designing neural estimators for tool wear estimation in face-milling processes.Wang et al. (2008) designed a novel but simple neural network-based generalized optimal estimator for CBN tool wear prediction in hard turning, the proposed estimator based on a fully forward connected neural network with cutting conditions and machining time as the inputs and tool flank wear as the output.Tae and Dong (1996) introduced an adaptive signal processing scheme that uses a low-order autoregressive time series model to model the cutting force data for tool wear monitoring during face milling, the modelling scheme was implemented using an RLS (recursive least square) method to update the model parameters adaptively at each sampling instant.Godfrey et al. (2008) presented an enhanced approach to predictive modeling for determining tool-wear in end-milling operations based on enhanced-group method of data handling (e-GMDH).Through in-process acquisition of signals with According to the number of the machining parameters affecting tool wear, 3-layer neural network is applied to fuse the input variables in this paper.As shown in Fig. 4, the network is mainly composed of input layer, hidden layer and output layer.There are 5 machining parameters (F x , F y , F z , D, f) that influence the tool wear, which compose input layer of the network.T is denoted by the tool wear of the milling machine, which composes the output layer of the network.The hidden layer is composed of 11 nodes in the network.If the neural cell number is small, the network does not train well, the training time is long and the training accuracy is low.However, large number of neural cells result in problems such as decreasing of network reliability, excessive training and increasing training time, although it brings the high training accuracy and strong function at the same time.
Training of the weights: Gradient descent is the main way to train the link weights of BP neural network, but the poor convergence and undesired local minimum is an obstacle.In order to overcome this problem, ant colony algorithm is applied to train the link weights of the network.Ant colony algorithm is a new bionics algorithm derived from the nature, which simulates the characteristics of ant colony behavior and is applied to the solving process of many optimization problems.Such as, Li and Wang (2005) solved the nonlinear regression combination model of daily water demand forecasting based on neural networks and ant algorithm was used to train neural network weights, this approach simplifies neural network training and overcomes the limitation of BP algorithm.

Theory of ant colony algorithm:
Ants are social animals and its individual behavior is very simple, but the ant colony composed of the individual acts performs extremely complex behavior characteristics.For example, the ant colony can fulfill feeding, obstacle avoidance and other tasks.The research shows that an ant communicates with others through pheromone and the ant will leave pheromone on the path it pass.Finally, the ant will choose the path has higher pheromone concentration.As shown in Fig. 5, there are 2 paths the ant can choose in order to reach position D: S→S1→M0→D1→D is longer, S→S1→M1→D1→D is shorter.When the first ant reaches S1, the probability it choose from M0 or M1 is equal.The later ant chooses from M0 or M1 according to the pheromone concentration on path S1→M0→D1 and S1→M1→D1.Because path S1→M1→D1 is shorter, the pheromone concentration of which growth faster and the probability the ant choose from M1 is higher.With the increasing of pheromone on path S1→M1→D1, the ants choose this path will be more and more.Finally, all ants will choose the path S→S1 →M1→D1→D and the optimization of the path is achieved.
Weights training: There are 66 link weights need to train in the 3-layer network designed in this paper and assume that there are 30 ants in the ant colony.w ij (i = 1,2,…,5, j = 1, 2, …, 11) represents the link weights between input layer and neural cell of hidden layer, ∅ j (1, 2,…, 11) represents the threshold value of neural cell in the hidden layer, u j (j =1, 2,…, 11) represents the link weights between neural cell of hidden layer and output layer, θ represents the threshold value of the node in output layer.S ij (t) represents the pheromone remained on the path i→j in moment t, s j (t) represents the pheromone remained on path j in moment t, which are used to simulate the concentration of pheromone ant leaved.The link weights of the network are trained based on ant colony algorithm as follows: • When the training begin, 30 ants are allocated to different nodes of the input layer, the initial value of the pheromone remained on path i→j is defined as s ij (0), the initial value of the pheromone remained on path j is defined as s j (0).• w ij (Every link weights) compose a class called L wij and u j (Every link weights) compose a class called R uj .For L wij and R uj , the ant choose an element according to the pheromone concentration ratio of the element in the class.The probability of the ant choose an element from class L wij and R uj is as follows: where, p wij(t) represents the probability of the ant choosing an element from L Wij in moment t, p uj(t) represents the probability of the ant choosing an element from R uj in moment t, s wij(t) represents the pheromone value of any one element in L wij at moment t, s Ruj(t) represents the pheromone value of any one element in R uj at moment t.Finally, the ant chooses the element has the largest selection probability in the class as the link weights.
After the ant finished the choosing of the element, the pheromone value of the element is adjusted according to the following equations: where, α represents the attenuation degree of the pheromone, ∆t represents the time step that the ant need to choose an element, ∆ n ij represents the pheromone that the ant n left on path i→j, ∆ n j represents the pheromone that the ant n left on path j, the calculation rule is as follows: where, Q is a constant, which is used to adjust the growth rate of the pheromone.e wij represents the maximum sampling error of the neural cells in the hidden layer, e uj represents the maximum sampling error of the neural cells in output layer.• According to the adjusting equation, the smaller the error, the faster the pheromone grows.When the pheromone concentration reached a certain value, the error reached its precision and the optimized link weights are achieved.If the error can not reach the precision demand, the training process returns to step (2).
According to the train method based on ant colony algorithm, the tool wear model is achieved finally, which overcomes the poor convergence and undesired local minimum problem of BP neural networks.

THE EXPERIMENTAL RUNS
In order to test the performance of the PPR model, one experiment was carried out.During the experiment, the milling machine was set up as the following combination of machining parameters: feed rate at 6, 8, 10, 12 ipm; depth of cut at 0.02, 0.04, 0.06 inch; flank wear at 0.45mm.Finally, the tool wear were measured out-of-process and the results are shown in Table 1.The predicted values of the tool wear were obtained using the BPN-ACA model.
Figure 6 shows the comparison of the measured and the predicted values for the test cut.The results suggest that the proposed BPN-ACA TWP system could reasonably predict tool wear in an online real time fashion.

CONCLUSION
In this study, a BPN-ACA TWP system was proposed for the prediction of the tool wear on a CNC milling machine.The approximation ability of the proposed BPN-ACA tool wear monitoring system is very well.During the performance test, it can be seen that the approximation ability of the estimator is very well and the predict error of the model is lower than 6%.Sample number Tool wear (mm) The measured value The predicted value

Fig. 1 :
Fig. 1: The milling machine used in the experiment

Fig. 3 :
Fig. 3: The cutting force history of Fx during milling process • The NC program, which is uploaded to the CNC control system, is used for the collecting of the milling parameters.• The VC-based cutting force collecting subprogram.This VC-based program allowed the BPN-ACA TWP System to collect the cutting force signals and proximity signals.Figure 3 shows one sample of the cutting force.• A BPN-ACA model sub-program, this program was integrated with the data collection program to reach the purpose of online tool wear monitoring.

Fig. 4 :
Fig. 4: Structure of the network multi-sensor systems, Sick (1998) estimated and classified tool wear parameters by means of neural networks.According to the number of the machining parameters affecting tool wear, 3-layer neural network is applied to fuse the input variables in this paper.As shown in Fig.4, the network is mainly composed of input layer, hidden layer and output layer.There are 5 machining parameters (F x , F y , F z , D, f) that influence the tool wear, which compose input layer of the network.T is denoted by the tool wear of the milling machine, which composes the output layer of the network.The hidden layer is composed of 11 nodes in the network.If the neural cell number is small, the network does not train well, the training time is long and the training accuracy is low.However, large number of neural cells result in problems such as decreasing of network reliability, excessive training and increasing training time, although it brings the high training accuracy and strong function at the same time.

Fig. 5 :
Fig. 5: The sketch for the theory of ant colony algorithm sample number, Y l represents the anticipated output of the neural cells, O l represents the practical output of the neural cells.

Fig. 6 :
Fig. 6: The prediction performance of the PPR model

Table 1 :
The tool wears results during milling process