1 Introduction

Electrical discharge machining (EDM) is a non traditional machining technique with which any electrically conductive material can be machined irrespective of its mechanical properties. Being a process having immense application in the manufacturing industries, different techniques like tool rotation [1], tool/workpiece vibration [2], planetary or orbital actuation of the tool electrode [3] etc., have been attempted by researchers, to improve the process. Among these techniques, planetary actuation of the tool electrode is one such technique, which provides multi facetted benefits. In this method, unlike die sinking method, a smaller tool electrode is employed for the generation of a bigger cavity, thereby reducing the tooling cost. Further, due to the enhancement of flushing at the inter electrode gap, the process can be carried out with improved stability, thereby reducing chances of tool electrode as well as feature distortions [4,5,6].

Even after employing all these strategies during EDM process, one aspect that still affects the process efficiency is the wear that occurs on the tool electrode. Being a process in which the negative image of the tool electrode is generated on to the workpiece, any distortion on the same will reflect on the final feature accuracy. However, as this is inherent in the process, it can be either only be reduced or compensated during machining.

Wear on the tool electrode can be assessed in different ways like loss of material in terms of length or rounding-off of the electrodes at the corners and edges of the electrodes. The distortion of the tool electrodes at its edges and corners are highly dependent on tool geometry as well as discharge parameters and are very difficult to be compensated. However, in the case of end wear, the machining depth can be revised or compensated more easily, so that the target feature depth can be achieved. The concepts for end wear compensation that has been reported by researchers can be broadly categorized in to three viz. application of in-situ wear assessment, incorporation of proper tool actuation algorithm and modifying process parameter conditions on identification of any process instability. In in situ wear assessment based methods, systems like electric touch sensing system [7], machine vision system [8], laser scan micrometer [9] etc., have been employed to assess the intensity of wear so that the machining conditions can be changed accordingly. In algorithm based techniques, the tool movements are strategized on the basis of different logics so that the wear is compensated during the process. Algorithms like Uniform wear method [10], Linear compensation method [11], Scanned area method [12], Layer depth constrained algorithm, S-curve accelerating algorithm [13], CLU [14] etc., comes under this. Process condition based compensation methods utilize models involving discharge parameters or characteristics like discharge voltage [15], discharge counts or number of normal discharges [16] etc. Even though compensation models based on these techniques have good capability, their accuracy depends on the EDM process conditions and more importantly, on process stability.

Application of prediction models or systems that are developed based on experimental data comes in such context. The advantage of using such systems is that the noise pertaining to the experimental set up as well as experimental conditions will be already included in the results, so that those effects are included to some extent in the predicted results as well. Further, the need of any extensive in situ wear assessment or compensation setups can be avoided. Techniques like artificial neural networks, fuzzy logic, etc., which are artificial intelligence based methods are widely used for developing such models.

From literatures, it has been observed that neural network and fuzzy logic based models perform relatively better in modelling of manufacturing process rather than statistical models and mathematical equations. But, artificial neural networks have limitations in terms of dependency on large data set and ineffectiveness in predicting responses involved in complex process. Similarly, in the case of fuzzy logic, difficulties pertaining to construction of appropriate membership functions and fuzzy rules for a given problem is difficult [17]. However, Adaptive Neuro Fuzzy Inference System (ANFIS), which is a hybridized AI modelling technique that combines the aspects of ANN and Fuzzy logic, is a tool that has been reported to be a good prediction tool.

Researchers have reported the successful application of ANFIS for prediction of various responses in Electro Discharge Machining process like material removal rate, tool wear rate, overcut, surface roughness, white layer thickness, etc. [18]. The concept has also been used for reverse mapping in EDM process in which process parameters can be predicted for a specified response value [19]. It has also been reported that the models based on ANFIS perform better than techniques like ANN, polynomial based functions, etc. [20, 21]. The technique has also been reported to be effective for predicting responses in hybrid EDM processes like ultrasonic assisted EDM [22], gaseous dielectric based EDM [23] etc.

From literature survey, it has been understood that ANFIS based models have reasonably good capability for predicting responses in EDM process compared to other commonly used techniques like ANN. However, it has also been noted that no attempt has been reported on application of such techniques for tool wear compensation in EDM process. As wear on the tool electrode is an aberration which is primarily dependent on process parameter combination and process stability, it is anticipated that models which can predict the end wear for different machining conditions can be of very good use; especially in cases where the wear intensity is too high. Hence it has been attempted to develop an ANFIS model to predict end wear of the tool electrode during planetary EDM and use the same to develop a compensation model for machining features with improved depth accuracy.

2 Plan of action

The present work has been planned in three stages. Figure 1 shows the details of these stages. The experimentations have been carried out using a standard design and the data for end wear is collected and analyzed. The same is then used to develop an ANFIS model which is capable of predicting end wear under different experimental conditions. This fuzzy inference system is used in an algorithm based on linear compensation method to predict the revised or compensated target depth to obtain desired cavity size. The coding for algorithm has been done in MATLAB platform.

Fig. 1
figure 1

Plan of action followed for developing end wear compensation model

2.1 Experimentation and data collection strategy

For collection of data, the experimentations have been carried out on Joemars AZ50R ZNC Electro Discharge Machine with capability for planetary tool actuation. In planetary tool actuation, the tool electrode is made to travel at a predefined speed, along a path parallel to the edges of the final desired cavity. The axis of the tool electrode is offset from the central axis of the final desired cavity by a distance called tool path offset. The resulting cavity will have dimension equal to the sum of edge dimension of the tool electrode and twice the tool path offset employed [24].

The experimentations have been designed using Taguchi’s L 16 standard orthogonal array. Five parameters, viz. pulse ON time, tool path offset, scanning speed of the tool electrode, pulse OFF time and gap voltage have been considered at four levels for creating the layout. Table 1 shows the details of process parameters and their levels considered for experimentation.

Table 1 Parameters and levels considered for experimentation

Ti–6Al–4V (titanium grade 5 alloy) has been selected as the workpiece material as it has wide range of applications in fields like automotive, aerospace, biomedical etc. Even though the material can be machined by EDM process, the intensity of wear on the tool electrode is extremely high, which calls up the need for wear compensation models. Copper has been selected as the tool electrode material as it possesses excellent thermal and electrical properties necessary for an electrode material. The final cavity size of the cavity has been fixed as 10 mm × 10 mm × 10 mm. Electrodes are fabricated in such a way that the cross sectional size of the tool electrode along with the suggested tool path offset as per experimental layout will result in generation of desired cavity size.

In present study, the end wear has been measured using a slip gauge as a standard reference. Procedure of measurement is shown in Fig. 2a–f. After mounting the tool electrode and workpiece with proper alignment on the machine tool as shown in Fig. 2a, the top surface of the workpiece is set as zero (Z = 0.000 mm) with the help of edge detection facility in the machine (Fig. 2b).

Fig. 2
figure 2

a–f End wear measurement procedure

Once the reference established on the workpiece surface, a slip gauge of size 5 mm is placed on the top surface of the workpiece (Fig. 2c) and the tool electrode is made to touch the slip gauge surface (Fig. 2d). On touching the slip gauge, the digital read out of the machine will show the reading equal to the dimension of the gauge as the tool electrode is fresh.

Once the machining is done, there will be loss of material from the tool as shown in Fig. 2e in lateral as well as longitudinal directions. Prior to wear measurements, the oil stain and debris from the tip of the electrode are removed using a high absorbency tissue; without unmounting it from the setup. After cleaning, the slip gauge, which is used earlier is placed again on the workpiece surface and the worn out electrode is again made to touch on the it as shown in Fig. 2f. Since the electrode is not fresh, it will need to move more in the Z direction to touch the slip gauge surface. This will result in a change in Z axis coordinate of the top side of the slip gauge. Hence, the reading on the digital readout will be accordingly smaller than that of the size of the slip gauge. The difference between this reading and the one obtained prior to experimentation will give the loss of electrode material in terms of length. This procedure is repeated at every depth increment of 2 mm, till the target depth of 10 mm is reached.

2.2 Development of ANFIS model for end wear prediction

Adaptive neuro-fuzzy inference system (ANFIS) is a technique that is designed to allow a set of IF-THEN rules and membership functions (fuzzy logic) to be constructed based on a set of data. The adaptive nature (neural networks) of the system helps in the automatic tuning of the membership functions, thereby allowing such models to predict the input/output relationship efficiently [25, 26]. Figure 3 shows the basic architecture of an ANFIS model.

Fig. 3
figure 3

ANFIS Architecture

The network shown includes ‘m’ inputs (X 1 …X m ), in which each one consists of ‘n’ membership functions (MFs). Moreover, a layer with ‘R’ fuzzy rules and an output layer contributes to the construction of this model. Number of nodes in first layer can be calculated by the product of ‘m’ as number of inputs and ‘n’ as number MFs (N = m × n). The number of nodes in other layers (layer 2–4) relates to the number of fuzzy rules (R).

In present study, six input parameters viz., pulse ON time, tool path offset, scanning speed of the tool electrode, pulse OFF time, gap voltage and target cavity depth have been used to develop ANFIS model for end wear. Layout of the model is shown in Fig. 4. Fuzzy logic tool box available in MATLAB package is used for model development. Gaussian membership function has been used for model development, as such membership functions have excellent performance capability [17]. Subtractive clustering method has been preferred over grid partitioning method for fuzzy inference system generation as the former one is more suitable for models that contain higher number of parameters [27].

Fig. 4
figure 4

Layout of ANFIS model developed for end wear prediction

A total of 80 data sets have been used for model development, as end wear pertaining to five different cavity depths have been collected from each of the 16 experiments. 85% of the data has been used for training the model and the rest is used to test the prediction accuracy. Data for training as well as testing of the model have been selected randomly from the data set pool so as to avoid any bias. In order to ensure the accuracy of the developed model, adequacy of the model has been checked by evaluation parameters like mean error, standard deviation and average percentage as discussed by [28].

2.3 Concept of end wear compensation using ANFIS model

End wear in EDM process is almost inevitable and it may not be possible to reduce the feature inaccuracy by just a single level of compensation. There are chances that the intensity of end wear may vary with machining depth. ANFIS model developed in present study may be used in such cases as it is capable of predicting end wear for different values of machining depths and process parameter combinations. However, a properly designed algorithm is necessary for accurate prediction of the compensated depth. Figure 5 shows the flowchart for the proposed model for end wear compensation in planetary EDM process using ANFIS.

Fig. 5
figure 5

Flow chart for proposed compensation model for end wear using ANFIS

Let d t be the target depth, d a , the achieved depth and EW be the value for end wear predicted by the developed ANFIS model for a specified target depth. In present study, it has been assumed that d a  = d t − EW. Based on this, the target depth has been recalculated as d t  + EW which has been defined as \(d_{t}^{\prime }.\) Now, the end wear that occurs when the target is set as \(d_{t}^{\prime }\) is calculated and the achieved depth is recalculated. The value for achieved depth is then compared with the required target depth d t . If the value of d a is equal to d t , the loop breaks and the compensated length will be \(d_{t}^{\prime }.\) If d a is not equal to d t , the whole process repeats till the condition is achieved.

An algorithm for this logic has been coded in MATLAB interface. Accuracy of the proposed compensation model has been assessed by comparing the results predicted by the model with experimental results obtained under similar conditions.

3 Results and discussions

3.1 Effect of process parameters on end wear

Figure 6a–e shows the effect of process parameters on cumulative end wear during planetary EDM. As signal to noise ratios calculated using lower the better condition are employed for data analysis, parameter condition that yields highest value will result in lowest end wear.

Fig. 6
figure 6

a–e Main effect plots for end wear of the tool electrode

From Fig. 6a, it can be seen that the end wear decreases with increase in pulse ON time. However, rest of the electrical parameters, viz. pulse OFF time and gap voltage, are found to have relatively smaller effect on the response. In the case of tool actuation related parameters, it can be seen that tool path offset has a dominant effect on end wear of the tool electrode. The response has been observed to increase with increase in tool path offset. At the same time, in the case of scanning speed, it can be seen that the end wear is low when higher values of scanning speeds are employed. Similar observations can be inferred by comparing the p values obtained through the ANOVA results, which shown in Table 2.

Table 2 ANOVA results for end wear

The reduction in end wear with increase in pulse ON time may be due to the formation of thick carbon layer on the tool surface during machining. With increase in pulse ON time, the temperature at the machining zone as well as at the electrodes increases. This results in the dissociation of the dielectric fluid, leading to the formation of carbon, which gets strongly adhered to the tool surface. Further, the high temperature at high pulse ON time conditions result in the expansion of the plasma channel, leading to reduction in intensity of material loss from the tool electrode and hence lower end wear.

However, the total wear on the tool electrode also depends on the heat carrying capacity of the same. An increase in temperature on the electrode surface will make it more prone to wear. Hence, conditions that increase or decrease the heat content per unit volume of the electrode may accordingly increase or decrease the intensity of wear on the same. In present study, as the target dimension is kept constant, the dimension of the tool electrode has been varied accordingly with variation of tool path offset. This implies that a tool with smaller cross sectional area be used under high tool path offset. As the cross-sectional area reduces, the heat accumulated in the electrode material will increase and this will lead to intense loss of material in terms of length from the electrode. This could be the reason for the increase in end wear with increase in tool path offset. However, it is also worth noting from Fig. 6c, d that a higher values of scanning speed of the tool electrode and pulse OFF time is preferable for lower end wear of the tool electrode. As both these parameter conditions facilitate enhanced flushing in the machining zone, the heat accumulation in the electrodes and the possible material loss from the same can be reduced to a great extent.

From these discussions, it can be inferred that both electrical and tool actuation parameters have a crucial role on end wear that occurs on the tool electrode. However, the combined effect of these parameters are more important than those effects induced by individual parameters. It can be seen from Fig. 7 that despite the use of a lower pulse ON time and high pulse ON time, the wear on the tool electrode is extremely high due to the use of electrode with smaller cross-sectional size. Hence, a model which can handle all these parameters together is essential for the effective prediction of end wear.

Fig. 7
figure 7

Effect of tool path offset and pulse ON time on end wear of the tool electrode

3.2 Performance evaluation of proposed End wear compensation model

As the accuracy of the proposed model is dependent on the prediction element used in it, it is important to assess the accuracy of the same. Table 3 shows the results for the adequacy check that has been carried out using the testing data on the ANFIS model for end wear. It can be clearly seen that the error values are lower. Further, from Fig. 8, which shows the comparison between experimental and predicted values for test data used for adequacy checking, it can be seen that predicted results are fairly close to the experimental observations in most cases. Thus, it can be understood that the developed model has reasonably good prediction accuracy.

Table 3 Adequacy check for ANFIS model for end wear
Fig. 8
figure 8

Comparison between experimental and predicted values for end wear

Accuracy of the proposed compensation model has been assessed by comparing the actual and predicted depth settings. The experiment results that have not been used to train the ANFIS model are used to test the prediction efficiency of the model. The cavity depth achieved under a particular machining condition for a specified depth has been measured. This depth achieved is given as target depth in the compensation model. The revised target depth provided by the model is then compared with actual depth that was set on the machine tool for checking the models prediction accuracy. Table 4 shows the comparison between these values for randomly selected experimental conditions.

Table 4 Performance of compensation model at randomly selected experimental conditions

It can be understood that the model has reasonable good prediction accuracy. However, the prediction accuracy has been observed to be slightly lower at lower pulse ON time and higher tool path offset conditions. This may be due to the intense wear that tends to occur on the tool electrode under such conditions.

4 Conclusions

Application of Neuro-Fuzzy systems for electrode end wear compensation in planetary EDM process has been carried out. Prior to model development, the effect of process as well as tool actuation parameter on end wear of the tool electrode has been analysed statistically using analysis of variance method. After understanding the need and utility of the model based on analysis results, an ANFIS model which is capable of predicting end wear of the tool electrode during planetary EDM of Ti–6Al–4V has been developed to reduce depth inaccuracies. Accuracy of the proposed model has been checked with randomly selected experimental conditions and the results are found to be encouraging. The accuracy of the proposed model has been observed to deteriorate at experimental conditions that result in intense tool wear. Further, it should be noted that the model developed in the present study is process parameter range as well as material specific; however, the concept can be applied very well for other process parameter range-tool-workpiece-hybrid EDM process combinations.