Introduction

Electrical discharge machining (EDM) is a widely used precise, flexible and economical non-conventional machining process that utilizes thermo-electrical energy to machine any conductive material irrespective of their hardness and difficult-to-machine chemical and structural properties. Difficult-to-machine material like titanium and its alloys, nickel super alloys, shape memory alloys, metal matrix composites, ceramics and tool steels can easily be machined by EDM process with greater dimensional accuracy and superior surface finish as per requirement in various applications of different industries such as bio-medical, chemical, defense, automobile, aerospace, tool and die industries. Titanium is one of the extensively used materials in these industries due to its low density with high mechanical strength, corrosion resistance and sustainability at elevated temperature. As titanium is bio-compatible, it can be used for medical implants and bio-medical instrumentation (Qudeiri et al. 2018).

During EDM process, a series of discharges are produced at inter-electrode gap resulting in removal of tiny amount of material from the surface of work piece by melting and vaporization. The dielectric flushes out the removed materials from the machined surface and helps in material removal process. During continuous sparking and flushing of dielectric fluid, some debris of materials get deposited on the machined surface forming hard, brittle and uneven surface. This surface consists of the material combination of work piece, tool and dielectric medium. Due to the deposited layer, the characteristic of the machined surface is mostly affected with undulations, cracks and hardness (Mohanty et al. 2014; Dewangan et al. 2014; Lin and Lin 2005). To maintain quality of machined surface, appropriated machining condition must be explored. However, it is not easy to set the appropriate machining conditions since a large number of machining parameters act in a complex manner during machining. To overcome this difficulty, several past studies have proposed different approaches to obtain best machining conditions using various optimization approaches.

In EDM process, multiple performance measures, often contradictory in nature, such as material removal, tool wear rate and surface irregularities need to be optimized simultaneously. Hence, selection of suitable optimized parameters meeting the requirements of multiple performance measures is an important issue during machining. Recently, several optimization methods are being used to optimize the electrical discharge machining process. A method based on grey relational analysis (GRA) has been used to optimize the EDM process while machining Inconel 825 (Mohanty et al. 2014). Mohanty et al. (2016) have used multi-objective particle swarm optimization (MOPSO) during machining of Inconel 718 using EDM process. Similarly, utility concept combined with quantum behaved particle swarm optimization (QPSO) has been used for optimization during machining of Inconel 718 (Mohanty et al. 2017). Firefly algorithm has been recently used by the researchers for optimization of EDM and Wire EDM processes (Raja et al. 2015; Varun and Venkaiah 2015). Assarzadeh and Ghoreishi (2013) have used desirability approach to optimize Al3O3 powder mixed EDM while machining CK45 die steel. Maity and Mishra (2018) have used elitist teaching learning based optimization (TLBO) approach for optimization of process parameters in micro-EDM when machining Inconel 718. Majumdar and Maity (2018) have used VIKOR (VIseKriterijumska Optimizacija I Kompromisno Resenje) based fuzzy approach to obtain optimal setting during the wire electrical discharge machining of a shape memory alloy called nitinol (NiTi). Similarly, grey-fuzzy approach has been used to optimize the process parameters during electrical discharge machining of AISI P20 steel (Lin and Lin 2005).

Soft computing techniques have been used for intelligent modeling of machining processes because of their flexibility with capacity of learning and mapping between the input machining parameters and output performance measures in any complex nonlinear system. Patowari et al. (2010) have adopted artificial neural network (ANN) approach for modeling of surface modification achieved using electrical discharge machining. Aich and Banerjee (2014) have used support vector machine (SVM) regression for the modeling of electrical discharge machining process. Maity and Mishra (2018) have used ANN model for modeling of micro-EDM process. Majumdar and Maity (2018) have used general regression neural network (GRNN) model for prediction of performance of wire-EDM process. Caydas et al. (2009) have used adaptive neuro-fuzzy inference system (ANFIS) for modeling of wire-EDM process. Panda and Bhoi (2005) have predicted material removal rate during electrical discharge machining using ANN. Pradhan et al. (2009) and Rao et al. (2009) have used ANN modeling for prediction of surface roughness of the machined surface during electrical discharge machining. Similarly, Somashekhar et al. (2010) have used ANN modeling for prediction of performance measure during electrical discharge machining. Apart from machining processes, various intelligent techniques have been used for prediction of system performance in the field of electrical, electronics, computer science and environmental engineering in regard to prediction of faults in electrical transformer, estimation of pollutants present in air, forecasting of electricity generated through renewable resources and improvement of healthcare services (Al-Janabi et al. 2015, 2020a, b; Al-Janabi and Alkaim 2020; Mahdi and Al-Janabi 2020; Ali 2014). In recent years, improved prediction tools have been proposed taking non-linearity associated with the system into consideration. An extended Kalman filter is proposed to enhance performance of stochastic nonlinear systems by the use of dynamic set-point adjustment considering minimization of entropy as optimization criterion (Tang et al. 2020). For a class of stochastic nonlinear systems subjected to non-Gaussian noises, minimum entropy filter design is proposed based on a radial basis function neural network to enhance system performance (Yin et al. 2020). As the desired tracking performance of the stochastic systems is difficult to achieve due to the random noises, an extended Kalman filter based tracking system is proposed without changing the basic PI (Proportional Integral) controller (Zhou et al. 2018). Zhang et al. (2020) have presented a control algorithm for stabilization problem considering transient optimization for a class of the multi–input–multi–output (MIMO) semi-linear stochastic systems.

Genetic algorithm (GA) has been widely adopted for obtaining optimum parametric setting during electrical discharge machining (Rao et al. 2009; Somashekhar et al. 2010). Recently, improved stochastic optimization methods have been proposed considering non-linearity associated with engineering design and manufacturing systems for determination of optimal machining conditions. For example, moth-flame optimization (MFO) algorithm has been successfully employed for solving classical engineering design problems such as welded beam design, gear train design, three-bar truss design, pressure vessel design, cantilever design, I-beam design, tension/compression spring design, 15-bar truss and 52-bar truss design problems (Mirjalili 2015). Real world complex optimization problems, specifically design and manufacturing optimization problems, can be effectively tackled with hybrid algorithm because good features of one algorithm can be incorporated into another in hybrid algorithms so as to improve the global search capability by providing required balance between exploration and exploitation (Krasnogor and Smith 2005). To this end, a novel hybrid algorithm known as Whale-Nelder-Mead algorithm has been employed for optimization of benchmark design problems such as cantilever beam, welded joint and three-bar truss problem and manufacturing process like grinding process (Yıldız 2019). Integration of Nelder-Mead local search algorithm with the population-based whale optimization algorithm improves the exploration and exploitation capability of the algorithm to attain faster convergence rate. It has been demonstrated that Whale-Nelder-Mead algorithm is more effective in providing optimal solutions as compared to many popular meta-heuristics algorithms such as genetic algorithm, ant colony algorithm, differential evolution algorithm, particle swarm optimization algorithm, harmony search algorithm, simulated annealing algorithm, artificial bee colony algorithm, teaching–learning-based algorithm, cuckoo search algorithm, grasshopper optimization algorithm, multi-verse optimizer, whale optimization algorithm and the Harris hawks optimization algorithm. Recently, equilibrium optimization algorithm has been used to solve a design optimization problem of a vehicle seat bracket so that weight and cost of the vehicle can be reduced (Ozkaya et al. 2020).

These days, rapid tooling (RT) is being used to manufacture tool electrode for electrical discharge machining in order to reduce tool manufacturing time so that tooling cost can be reduced leading to decrease in total manufacturing cost. Rapid prototyping (RP) is capable of producing complex shaped tool electrodes easily for direct application in the EDM process. As the complexity of the part can easily be shaped on the tool conforming to the requirement of EDM process, rapid prototyping based rapid tooling technique has been usually adopted (Arthur et al. 1996). In RP process, components are generally manufactured based on layer-by-layer deposition of material. Selective laser sintering (SLS) is a RP process used for the manufacturing of three dimensional parts by melting and combining of metal powders on a build platform through the use of a high power laser. In SLS process, complex and intrinsic shaped components can be directly produced with reasonable accuracy using a variety of metal powders. Therefore, SLS process is gradually becoming popular in tooling industries. The material is selected in such a manner that the part can be easily manufactured by SLS process possessing the properties of the EDM tool electrode (Durr et al. 1999; Zhao et al. 2003; Czelusniak et al. 2014). Different types of tool electrodes produced by RT process for EDM applications are copper-bronze, bronze-nickel, copper-bronze-nickel, steel alloy, copper-nickel with molybdenum, titanium boride, zirconium boride and bronze-nickel-copper phosphite. Although RP tool electrodes perform successfully during EDM applications, their performance in terms of material removal rate (MRR) is comparatively lower than solid copper tool. However, RP tools find great potentiality for finishing and semi-roughing operation (Durr et al. 1999; Czelusniak et al. 2014; Amorim et al. 2013; Meena and Nagahanumaiah 2006).

Critical review of literature suggests that a large number of studies have been directed towards optimization of EDM process with a goal to enhance machining performance. However, machining performance of EDM process using the tool electrode built through SLS process vis-à-vis different types of conventional tool electrodes is not adequately addressed. In the present study, a tool electrode made of AlSi10Mg produced through SLS route is compared with traditional copper and graphite tool electrodes during electrical discharge machining of titanium using EDM-30 oil as dielectric medium. The process parameters considered in this study are voltage (V), peak current (Ip), duty cycle (τ), pulse duration (Ton) and tool electrode type. Taguchi’s L27 experimental layout is used to conduct the experiment so that total number of experimental runs can be reduced without compromising on gathering process related information. Influence of each parameter on the performance measures like material removal rate (MRR), tool wear rate (TWR), average surface finish (Ra), surface crack density (SCD), white layer thickness (WLT) and micro-hardness (MH) of the WLT has been studied. Since electrical discharge machining is a complex thermo-electrical machining process, application of a predictive tool such as least square support vector machine (LSSVM) has been suggested to provide guidelines for the practitioners for accurate prediction of various machining performance measures before actual machining. Finally, a hybrid optimization technique known as desirability function analysis based grey relational analysis (DGRA) combined with Firefly algorithm (FA) is used for simultaneous optimization of all the performance measures. DGRA technique is used to transform multi-performance measures into a single equivalent performance index known as desirability grey index. A recent meta-heuristic approach like Firefly algorithm is embedded in the proposed optimization method to find optimal machining condition.

Methodology

Accurate prediction of the performance measures in a complex machining process like EDM depends on the development of suitable relationship between the performance measure and machining variables. In the past, a number of prediction techniques based on regression analysis, artificial neural network, fuzzy inference system and adaptive neuro-fuzzy inference system have been used for modeling of EDM process with relative success (Caydas et al. 2009; Panda and Bhoi 2005; Pradhan et al. 2009; Rao et al. 2009; Somashekhar et al. 2010). However, support vector machine (SVM) is one of the powerful learning systems with efficient prediction (Aich and Banerjee 2014). Therefore, in this work, extension of SVM i.e. least square support vector machine (LSSVM) is used to develop the predictive model for the performance measures of the EDM process. In addition, a hybrid optimization technique known as desirability based grey relational analysis (DGRA) combined with firefly algorithm (FA) is used to obtain optimal parametric setting.

Least square support vector machine (LSSVM)

The support vector machine (SVM) is the most prevalent technique in the arena of machine learning established on statistical theory. It has the capability of prediction of both linear and non-linear data sets through mapping. SVM has been used for prediction of machining process, prediction of machinery condition and prediction of machining quality for different machining processes (Aich and Banerjee 2014; Liu et al. 2017, 2018; Bai et al. 2019; Schwenzer et al. 2019). SVM is also used in advanced welding processes such as high power laser welding and laser-magnetic welding for prediction of performances and applied for prediction of inherent deformation in fillet‑welded joint (Zhang and Zhou 2019; Liu et al. 2019; Tian and Luo 2019). Least square support vector machine (LSSVM) is the enhancement of the SVM. The extension of SVM i.e. the LSSVM is a kernel based machine learning with the structural risk minimization which uses linear least squares principles to the loss function (Jaipuria and Mahapatra 2013; Li et al. 1016). The LSSVM is an artificial intelligent tool that has the capacity to develop an appropriate predictive model from a given data set.

Let the training data set in a given data set denoted as {xi, yi}, i = 1, 2, 3 … N where \( {\text{x}}_{\text{i}} \in {\text{R}} \) are the input data set and \( {\text{y}}_{\text{i}} \in {\text{R}} \) are the output data set. The regression model is generated using a nonlinear mapping function \( {\varphi } ( {\text{x)}} \) and the predictive model is expressed as in Eq. (1).

$$ {\text{y}} = {\text{w}}^{\text{T}} {\varphi } ( {\text{x)}} + {\text{b}} $$
(1)

where w = weight vector and b = bias term.

The quadratic loss function is used for the goal optimization in LSSVM during inequality constraints to equality constraints. By utilizing the cost function and constraint function, the optimization problem can be solved easily. The optimization problem and constraint equation are represented as in Eqs. (2) and (3).

$$ { \hbox{min} }\,{\text{C(w,e)}} = \frac{ 1}{ 2}{\text{w}}^{\text{T}} {\text{w}} + \frac{ 1}{ 2}\upgamma\sum\limits_{{{\text{i}} = 1}}^{\text{N}} {{\text{e}}_{\text{i}}^{ 2} } $$
(2)

Subjected to equality constraints

$$ {\text{y}} = {\text{w}}^{\text{T}} {\varphi } ( {\text{x}}_{\text{i}} )+ {\text{b}} + {\text{e}}_{i} \quad {\text{i}} = 1,2,3 \ldots {\text{N}} $$
(3)

where \( \upgamma \) = penalty factor, \( {\text{e}}_{\text{i}} \) = loss function (regression error)

LSSVM reduces the cost function C having a penalized regression error. The first term of the cost function in Eq. (2) known as weight decay that is used for the weight degeneration process, weight size regulation and penalization of large weights. This regulation converts weights into fixed values. Large weights fail to the generality ability of the LSSVM due to the extreme variance. The second term of the cost function (Eq. (2)) known as regression error for all training data and regularization parameter, \( \upgamma \). The constraint equation (Eq. 3) gives the description of the regression error. For solving this optimization problem, Lagrange function is generated as represented in Eq. (4).

$$ {\text{L(w,b,e,}}\upalpha )= \frac{ 1}{ 2}\left\| {\text{w}} \right\|^{ 2} +\upgamma\sum\limits_{{{\text{i}} = 1}}^{\text{N}} {{\text{e}}_{\text{i}}^{ 2} } - \sum\limits_{{{\text{i}} = 1}} {\upalpha_{\text{i}} \left\{ {{\text{w}}^{\text{T}} {\varphi } ( {\text{x}}_{\text{i}} )+ {\text{b}} + {\text{e}}_{\text{i}} - {\text{y}}_{\text{i}} } \right\}} $$
(4)

where \( \upalpha_{\text{i}} \) = Lagrange multipliers, \( \upgamma > 0 \), \( \upalpha_{\text{i}} \) and b are calculated using Karush–Kuhn–Tucker (KKT) conditions. Therefore, the LSSVM model reduced to Eq. (5) for non-linear system.

$$ {\text{y}}{}_{\text{i}} = {\text{w}} \cdot {\varphi } ( {\text{x)}} + {\text{b}} = \sum\limits_{{{\text{i}} = 1}}^{\text{k}} {\upalpha_{\text{i}} {\text{k(x}}_{\text{i}} , {\text{x)}} + {\text{b}}} $$
(5)

where \( {\text{k(x,x}}_{\text{i}} )= {\varphi } ( {\text{x)}}^{\text{T}} {\varphi } ( {\text{x}}_{\text{i}} ) \) is the kernel function

Kernel function shows a significant role in understanding of the hyperspace from the training data set. The different types of kernel functions in LSSVM are linear kernel, polynomial kernel, radial basis function kernel (RBF kernel) and multilayer perception kernel. The kernel function in LSSVM analysis maps the training data into the kernel space. However, RBF_kernel is considered due to the benefit of shorter training mechanism and high generalization capability of the model (Bai et al. 2019). The RBF_kernel function is mathematically expressed as in Eq. (6).

$$ {\text{K(x}}_{\text{i}} , {\text{x}}_{\text{j}} )= { \exp }\left( { - \frac{{\left\| {{\text{x}}_{\text{i}} - {\text{x}}_{\text{j}} } \right\|^{ 2} }}{{\upsigma_{\text{sv}}^{ 2} }}} \right) $$
(6)

where \( \upsigma_{\text{sv}}^{ 2} \) = squared variance of the Gaussian function.

To get support vector, this function must be optimized by the user. For better generalization model, it is essential to cautiously select the tuning parameters like \( \upalpha \) and \( \upgamma \). Here, radial basis kernel function (RBF_kernel) has been used. To get minimum cost value in space of the optimization function, ‘grid search’ has been used. Similarly, ‘crossvalidate function’ has been used for estimation of the model parameters.

Desirability based grey relational analysis (DGRA)

The desirability function approach (DFA) and grey relational analysis (GRA) are often used for solving multi-objective optimization problems with contradictory objectives. The method helps in successful transformation of multiple objectives into an equivalent single objective. In this work, a combined approach of DGRA is used for the conversion of output performance measures into single performance index. The desirability function converts the performance measures into normalized values laying between 0 and 1 i.e. the desirability index (\( d_{i} \)). The desirability of a response increases with increase in desirability index that tends to 1. Similarly, the desirability index is zero for undesirable response (Assarzadeh and Ghoreishi 2013; Adalarasan and Santhanakumar 2015). In grey relational analysis (GRA), the output measures are converted into a range of 0–1, which is called as grey relational generation. In this work, desirability index (\( d_{i} \)) is used for the calculation of desirability-grey relational coefficient (\( \gamma_{ij} \)). The desirability grey index (DGI) is the mean grey relational coefficients (\( \gamma_{ij} \)) of all the performance measures (Deng 1982, 1989). In desirability based grey relational analysis (DGRA) method, the individual desirability index (di) is calculated and then used to find out the desirability grey relational coefficient (\( \gamma_{ij} \)) and desirability grey index (DGI) by following steps as discussed below.

1. Evaluate the distinct desirability index (\( d_{i} \)) for each response (\( y_{i} \)).

Nominal-is-best.

$$ d_{i} = \left\{ {\begin{array}{*{20}l} {\left( {\frac{{y_{i} - y_{\hbox{min} } }}{{T - y_{\hbox{min} } }}} \right)^{s} ,} \hfill & {y_{\hbox{min} } \le y_{i} \le T,\,s \ge 0} \hfill \\ {\left( {\frac{{y_{i} - y_{\hbox{max} } }}{{T - y_{\hbox{max} } }}} \right)^{s} ,} \hfill & {T \le y_{i} \le y_{\hbox{max} } ,\,s \ge 0} \hfill \\ {0,} \hfill & {otherwise} \hfill \\ \end{array} } \right. $$
(7)

Higher-is-better.

$$ d_{i} = \left\{ {\begin{array}{*{20}l} {0,} \hfill & {y_{i} \le y_{\hbox{min} } } \hfill \\ {\left( {\frac{{y_{i} - y_{\hbox{min} } }}{{y_{\hbox{max} } - y_{min} }}} \right)^{r} ,} \hfill & {y_{min} \le y_{i} \le y_{\hbox{max} } ,\,r \ge 0} \hfill \\ {1,} \hfill & {y_{i} \ge y_{\hbox{min} } } \hfill \\ \end{array} } \right. $$
(8)

Lower-is-better.

$$ d_{i} = \left\{ {\begin{array}{*{20}l} {1,} \hfill & {y_{i} \le y_{\hbox{min} } } \hfill \\ {\left( {\frac{{y_{i} - y_{\hbox{max} } }}{{y_{\hbox{min} } - y_{\hbox{max} } }}} \right)^{r} ,} \hfill & {y_{min} \le y_{i} \le y_{\hbox{max} } ,\,r \ge 0} \hfill \\ {0,} \hfill & {y_{i} \ge y_{\hbox{min} } } \hfill \\ \end{array} } \right. $$
(9)

where \( y_{i} \) = experiential value obtained, \( y_{\hbox{max} } \) = maximum experiential value, \( y_{\hbox{min} } \) = minimum experiential value, T = Target value

2. Evaluate the desirability grey relational co-efficient (\( \gamma_{ij} \)).

$$ \gamma_{ij} = \frac{{(\Delta_{j}^{\hbox{min} } + \xi \Delta_{j}^{\hbox{max} } )}}{{(\Delta_{ij} + \xi \Delta_{j}^{\hbox{max} } )}} $$
(10)

where \( \Delta_{ij} = \left| {1 - d_{i} } \right| \)

$$ \Delta_{j}^{\hbox{min} } = \hbox{min} (\Delta_{1j} ,\Delta_{2j} , \ldots ,\Delta_{mj} )\quad \Delta_{j}^{\hbox{max} } = \hbox{max} (\Delta_{1j} ,\Delta_{2j} , \ldots ,\Delta_{mj} ) $$

where \( \Delta_{ij} \) = deviation sequence and \( \xi \) = distinguishing coefficient, \( \xi \in \left[ {0,1} \right],\,\xi = 0.5 \)

3. Desirability grey index (DGI)

$$ DGI = \sum\limits_{j = 1}^{p} {w_{j} \gamma_{ij} } $$
(11)

\( w_{j} \) = individual weight of performance measures.

where \( \sum\limits_{j = 1}^{p} {w_{j} = 1} \)

Firefly algorithm (FA)

Firefly algorithm (FA) is a metaheuristic optimization algorithm inspired by nature i.e. the behavior of fireflies. The rhythmic flashing light of fireflies inspired the FA algorithm. The bioluminescence process of the fireflies develops the flashing light. Bioluminescence process is a chemical reaction in which light produced in living beings. Fireflies are represented by their flashlights and these lights have two important features like to fascinate mating partners and to attract prospective prey. A firefly attracted towards other fireflies with respect to greater intensity of flashlight. The light intensity I of a firefly at a distance r drops with increase in the distance as I ∝ 1⁄r2. The attraction amongst fireflies may be local or global with respect to the absorbing coefficient. Fireflies are divided into subclasses according to light intensity of nearby fireflies. Therefore, each subclass is flock around a local mode. The objective function of the optimization problem is derived from the flashing. Firefly’s movement near to a brighter firefly is associated with the convergence of the objective function concerning a better solution and then to the best solution. This algorithm has been used in multi-response optimization problems (Raja et al. 2015; Varun and Venkaiah 2015; Yang 2009, 2013; Brajevic and Ignjatovic 2019; Liu et al. 2019).

The firefly algorithm follows three basic rules as discussed below.

  1. 1.

    Fireflies are considered to be unisex and each firefly attracted towards other brighter firefly irrespective of their sex.

  2. 2.

    Attractiveness is proportionate to brightness of firefly. A low bright firefly will travel near to brighter firefly. Brightness and attractiveness drops as the space between fireflies increases. They will move arbitrarily when there is unavailability of brighter firefly.

  3. 3.

    The brightness of fireflies is calculated from the landscape of objective function. The intensity of light (I) fluctuates with distance (r) as given in Eq. (12).

$$ {\rm I}(r) = {\rm I}_{0} e^{{ - \gamma r^{2} }} $$
(12)

where \( {\rm I}_{0} \) = source light intensity, \( \gamma \) = coefficient of light absorption which affects the reduction in intensity of light.

Attractiveness (\( \beta \)) is defined as a monotonically reducing function of the distance (r) among any two fireflies expressed in Eq. (13).

$$ \beta (r) = \beta_{0} e^{{ - \gamma r^{2} }} $$
(13)

where \( \beta_{0} \) = maximum attractiveness at r = 0.

The distance among two fireflies \( i \) and \( j \) at location \( x_{i} \) and \( x_{j} \) is expressed in Eq. (14).

$$ r_{ij} \, = \left| {x_{i} - x_{j} } \right|\, = \,\sqrt {\sum\limits_{k = 1}^{d} {(x_{i,k} - x_{j,k} )^{2} } } $$
(14)

where \( x_{i,k} \) and \( x_{j,k} \) are the \( k \)th constituents of the spatial coordinates \( x_{i} \) and \( x_{j} \) of the \( i \)th and \( j \)th firefly respectively and d is the dimensions in the problem.

Firefly’s movement \( x_{i} \) is calculated by using Eq. (15)

$$ x_{i} \, = \,x_{i} + \beta_{0} e^{{ - \gamma r^{2} }} (x_{j} - x_{i} ) + \alpha \left( {rand - \frac{1}{2}} \right) $$
(15)

where \( x_{i} \) = initial position of the firefly \( i \), \( \beta_{0} e^{{ - \gamma r^{2} }} (x_{j} - x_{i} ) \) = attractiveness of the fireflies, \( \alpha (rand - \frac{1}{2}) \) = free movement of fireflies in unavailability of brighter firefly.

Frequently, the randomization \( \alpha \) is considered between 0 and 1 while the light absorption coefficient \( \gamma \) is considered between 0.1 and 10.

The procedure of FA algorithm is presented in Fig. 1 in which t indicates iteration number and tmax indicates maximum iterations and the pseudo code for FA algorithm is shown in Fig. 2.

Fig. 1
figure 1

Flow chart of firefly algorithm

Fig. 2
figure 2

Pseudo code for firefly algorithm (FA) (Yang 2009)

Materials

A tool electrode is manufactured by SLS machine (model: EOSINT M-280, Germany). through selectively sintering of metal powders on the building platform by the use of a high laser power. In this work, aluminium, silicon and magnesium (AlSi10Mg) powders are used for the fabrication of EDM tool. The chemical composition of the RP tool electrode in weight percentage is Si:10.42%, Mg:0.96%, O:2.27% and rest is aluminium. The parameters considered to prepare the tool electrode from AlSi10Mg are layer thickness: 30 µm, laser power: 400 W, scan speed: 32 mm/s, build chamber temperature: 200 °C and build environment: Argon (at pressure 4.1 bar). The 3D EDM tool of AlSi10Mg is of stepped cylindrical shape (as shown in Fig. 3) having machining diameter of 12 mm. The tool electrode prepared by SLS process is denoted as AlSi10Mg. The same size of copper and graphite tool electrodes are prepared by conventional turning method from circular solid rods. The tools used in this study are shown in Fig. 3. Titanium work piece material with rectangular size having thickness of 5 mm is taken to conduct the experiments on an EDM machine. The property of titanium is tabulated in Table 1.

Fig. 3
figure 3

Tool electrodes

Table 1 Properties of titanium

Experimental details

Experimental setup and layout

Design of experiment (DOE) approach known as Taguchi’s L27 orthogonal array (OA) is used to make the experimental plan so as to obtain adequate process related information with less number of experimental runs. Five controllable parameters viz. voltage (V), peak current (Ip), duty cycle (τ), pulse duration (Ton) and tool type (i.e. AlSi10Mg, copper and graphite), each at three levels have been considered as presented in Table 2. The tool electrodes used are AlSi10Mg, copper and graphite during machining of titanium work piece using EDM machine (Model: ELECTRONICA-ELECTRAPULS PS 50, India). EDM 30 oil is used as the dielectric medium. During the process, straight polarity is considered i.e. work piece is taken as anode and tool electrode is taken as cathode. Figure 4 shows the EDM process while machining.

Table 2 Process variables and their levels
Fig. 4
figure 4

EDM process during experiment

Experimental data collection

Each experimental run is performed for 5 min as per the parametric setting listed in Table 3. The corresponding performance measures consider in this study are (a) material removal rate (MRR), (b) tool wear rate (TWR), (c) average surface roughness (Ra) of the machined surface, (d) surface crack density (SCD) of the machined surface, (e) white layer thickness (WLT) and (f) micro-hardness of WLT. The Taguchi’s L27 experimental design and corresponding performance measures are presented in Tables 3 and 4 respectively.

Table 3 Experimental layout (Taguchi’s L27 Orthogonal Array)
Table 4 Performance measures

The MRR and TWR are calculated as the volumetric material removal per specified machining time and calculated as given in Eqs. (16) and (17).

$$ MRR = \frac{{(W_{i} - W_{f} )}}{{(t \times \rho_{w} )}} $$
(16)

where \( W_{i} \) = weight of work piece before machining, \( W_{f} \) = weight of work piece after machining, t = Total machining time, \( \rho_{w} \) = Density of titanium = 4.506 g/cm3

$$ TWR = \frac{{(W_{ti} - W_{tf} )}}{{(t \times \rho_{t} )}} $$
(17)

where \( W_{ti} \) = weight of tool electrode before machining, \( W_{tf} \) = weight of tool electrode after machining, t = Total machining time, \( \rho_{t} \) = Density of tool electrodes. Density of AlSi10Mg = 2.664 g/cm3, Density of Copper = 8.96 g/cm3, Density of Graphite = 2.267 g/cm3.

The average surface roughness of the EDM machined surface is measured by Taylor-Hobson roughness tester (model: PNEUNO-Suetronic 3+). The Ra value of each machined surface is taken at three different places and the mean value is considered. For measuring of surface crack density (SCD) on the machined surface, the SEM images of the machined surface are taken at magnification of 500 × by SEM machine (model: Jeol JSM-6480LV, Japan) as shown in Fig. 5a. SCD is calculated as the ratio of total crack length on the SEM image divided by the area of the SEM image.

Fig. 5
figure 5

Measurement of SCD, WLT and MH

To measure white layer thickness (WLT), the machined surface has been cut into small size in the transverse section using the wire-EDM machine. After polishing, the specimens are etched with Kroll’s reagent for 30-second. The images for WLT have been taken by the SEM machine at a magnification of 1000×. The WLT (Fig. 5b) has been measured using ImageJ software at ten distinct places for each SEM image and average value is found out. The procedure is repeated for three SEM images under each experimental run. WLT is calculated as average value from three images as shown in Table 4.

The micro-hardness on the white layer has been measured using Vicker’s micro-hardness tester (model: LECO LM 248AT, Michigan, USA) with a test load of 50gf and indentation dwell time of 10 s. The micro-hardness test at three locations is performed and average micro-hardness has been calculated as tabulated in Table 4. The SEM image of the micro-hardness test indentation is shown in Fig. 5c.

Result and discussion

Least square support vector machine (LSSVM)

The experimental outputs such as MRR, TWR, Ra, SCD, WLT and MH after machining are shown in Table 4. LSSVM is used for development of a predictive model. LSSVM algorithm is run on MATLAB platform (version: R2015b). The experimental data shown in Table 4 are normalized between 0 and 1 following the Eq. (18).

$$ {\text{Y}}_{\text{ij}} = \frac{{{\text{y}}_{\text{ij}} - {\text{y}}_{ \hbox{min} } }}{{{\text{y}}_{ \hbox{max} } - {\text{y}}_{ \hbox{min} } }} $$
(18)

where \( {\text{Y}}_{\text{ij}} \) = normalized performance measure, \( {\text{y}}_{\text{ij}} \) = performance measure, \( {\text{y}}_{ \hbox{max} } \) = maximum performance measure, \( {\text{y}}_{ \hbox{min} } \) = minimum performance measure.

The experimental conditions for twenty-seven experiments shown in Table 3 are treated as input data for LSSVM algorithm. Since factor E (tool type) is a subjective variable, it is not convenient to use the linguistic variables in the algorithm. Therefore, it is converted into continuous categorical variable assigning AlSi10Mg tool as 1, copper tool as 2 and graphite tool as 3. The corresponding normalized outputs (performance measures) are considered as output data for LSSVM algorithm. Out of total twenty-seven experimental data for each performance measure, twenty experimental data are used for training purpose. Seven data are used for testing purpose. When the training error expressed in terms of root mean square error (RMSE) is found to be within acceptable limit, training phase is completed and testing phase starts. The root mean square error for training and testing are calculated according to Eq. (19).

$$ {\text{RMSE}} = \sqrt {\frac{ 1}{\text{N}}\sum\limits_{{{\text{t}} = 1}}^{\text{N}} { ( {\text{y}}_{\text{t}} - {\hat{\text{y}}}_{\text{t}} )^{2} } } $$
(19)

where \( y_{t} \) and \( \hat{y}_{t} \) are the tth actual output and estimated output from the model respectively. N denotes the total number of data.

RMSE for all the performance measures obtained from the LSSVM are tabulated in Table 5. The RMSE for all the performance measures are found to be very small for both training and testing data set. Therefore, the results obtained by the LSSVM is found to be within the acceptable range and prediction accuracy of LSSVM is found to be good.

Table 5 Training RMSE and testing RMSE for performance measures obtained by LSSVM

The predicted normalized output from training and testing phase are de-normalized. The actual experimental data and predicted data obtained by the LSSVM are presented in graphical form in Figs. 6, 7, 8, 9, 10 and 11 for the performance measures.

Fig. 6
figure 6

Prediction of MRR

Fig. 7
figure 7

Prediction of TWR

Fig. 8
figure 8

Prediction of Ra

Fig. 9
figure 9

Prediction of SCD

Fig. 10
figure 10

Prediction of WLT

Fig. 11
figure 11

Prediction of MH

Desirability based grey relational analysis (DGRA)

In the EDM process, multi-performance measures are usually conflicting in nature. The parameters influence each of the performance measure in different manner. The percentage contribution of each process parameter towards the output performance measures is different. Generally, MRR needs to be maximized whereas TWR, Ra, SCD, WLT and MH are to be minimized for obtaining requisite performance from electrical discharge machining. Usually, multi-response optimization technique is used for the proper selection of the various process parameters. In this work, desirability function analysis based grey relational analysis (DGRA) combined with Firefly algorithm (FA) is used to obtain the optimal parametric condition. DGRA method is used for the conversion of multi performance measures into a single equivalent performance index i.e. desirability grey index (DGI) and FA is used to obtained the optimal condition.

Using the procedure outlined in Sect. 2.2, the individual desirability index (di) for each performance measure is calculated based on “higher-the-better” characteristic for MRR and “lower-the-better” characteristic for TWR, Ra, SCD, WLT and MH using Eqs. (8) and (9) respectively. Individual desirability for each performance measure is tabulated in Table 6.

Table 6 Individual desirability index (di) for each performance measure

Deviation sequence (Δij) for each performance measure is calculated by subtracting each desirability index from 1 since 1 is the most desired value for any performance measure. The deviation sequence is shown in Table 7.

Table 7 Deviation sequence (Δij) for each performance measure

Using Eq. (10), desirability grey relational co-efficient (ϒij) for each performance measure is computed as shown in Table 8. Finally, desirability grey index (DGI) is calculated using Eq. (11) and presented in Table 8. Weightage of 0.167 for each performance measure is considered while calculating desirability grey index.

Table 8 Desirability grey relational co-efficient (ϒij) for each performance measure and desirability grey relational index (DGI)

Development of regression equation and optimization by Firefly algorithm

Effective execution of experiment is actually important for development of a suitable mathematical model (fitness function) using the experimental data. In this analysis, a mathematical model is developed using a nonlinear regression model. During development of the model, variable E (tool type) which is a subjective variable is converted into categorical variable considering AlSi10Mg tool as 1, copper tool as 2 and graphite tool as 3. Using the SYSTAT 13 statistical software, the nonlinear regression equation is generated for the desirability grey index (DGI) with R2 value of 99.6% as shown in Eq. (20).

$$ f(x) = 0.764 \times A^{ - 0.070} \times B^{ - 0.202} \times C^{0.024} \times D^{ - 0.057} \times E^{ - 0.125} $$
(20)

The above equation is used as the objective function in Firefly algorithm. The optimum parametric setting for the EDM process is attained by executing the Firefly algorithm in MATLAB software (version: R2015b). During the execution of the algorithm, the parameters taken are: (a) number of firefly (n) = 40, (b) number of iteration (N) = 100, (c) randomization (\( \alpha \)) = 0.5, (d) attractiveness (\( \beta \)) = 0.2 and (e) absorption coefficient (\( \gamma \)) = 1. This parametric setting gives rise to 25,000 number of function evaluations. Since factor E is a subjective variable, the output for E is interpreted as follows. If the value of E is obtained near to 1 (between 0 to 1.49), it is interpreted as AlSi10Mg tool. If the value varies from 1.50 to 2.49 (nearly equal to 2), it is interpreted as copper tool. If the value lies between 2.50 to 3 (nearly equal to 3), it is interpreted as graphite tool. A similar interpretation has been adopted by Mohanty et al. (2016, 2017) during multi objective optimization of EDM process. The algorithm delivered the optimum machining condition for the EDM process as presented in Table 9. The convergence curve for the Firefly algorithm is presented in Fig. 12.

Table 9 Optimal parametric setting
Fig. 12
figure 12

Convergence curve for Firefly algorithm

Analysis of variance (ANOVA)

The analysis of variance (ANOVA), a statistical test, is performed to identify the significance of input parameters affecting the output performance measures. The significance level for ANOVA is considered as 0.05. In ANOVA, if the P value (probability) is found to be less than 0.05 for any input parameter, it is treated that the particular parameter influences the performance measure in a significant way. ANOVA is obtained by the use of MINITAB 16 statistical software. ANOVA for MRR is tabulated in Table 10 with co-efficient of determination (R2) value of 92.6%. It is found that peak current, tool type and duty cycle are found to be significant parameters for MRR with percentage contribution of 36.09%, 25.42% and 16.6% respectively. Other parameters like voltage and pulse duration are insignificant as far as MRR is concerned.

Table 10 ANOVA for MRR

ANOVA of TWR is shown in Table 11 having R2 value of 87.6%. Type of tool and peak current are found to be significant for TWR with percentage contribution of 44.68% and 33.72% respectively.

Table 11 ANOVA for TWR

ANOVA for Ra is shown in Table 12 (R2 = 94%). From ANOVA, it is observed that tool type and peak current are found to be significant with percentage contribution of 75.15% and 7.77% respectively. Other parameters like voltage, duty cycle and pulse duration are insignificant towards the average surface roughness.

Table 12 ANOVA for Ra

The ANOVA result for the white layer thickness (WLT) is given in Table 13 with R2 of 91.1%. It is found that tool type, pulse duration and peak current are the significant parameters with percentage contribution of 41.68%, 22.41% and 9.54% respectively.

Table 13 ANOVA for WLT

The ANOVA for SCD is given in Table 14 having R2 of 92.5%. It is found that tool type and peak current are the significant constraints that affect SCD with percentage contribution of 47.7% and 18.74% respectively.

Table 14 ANOVA for SCD

Table 15 represents the ANOVA for MH having R2 of 88.1%. Peak current, voltage and tool type are found to be influential with percentage impact of 33.06%, 22.89% and 17.26% respectively.

Table 15 ANOVA for MH

The ANOVA of the desirability grey index (DGI) which is an equivalent index for all the performance measures is presented in Table 16 having R2 = 90%. ANOVA of DGI explains that peak current and tool type are the significant parameters with contribution of 49.84% and 17.63% respectively. The other parameters like voltage, duty cycle and pulse duration are found to be insignificant towards the desirability grey index. From the ANOVA of each performance measures, tool type is found to be one of the most significant factors. The ANOVA of DGI also agrees that tool type is a significant parameter after peak current. The higher value of coefficient of determination (R2) explains the goodness of fit of the model.

Table 16 ANOVA for desirability grey index (DGI)

The influence of process parameters on DGI is shown in the form of factorial plots in Fig. 13. Figure 13 indicates that superior machining performance can be attained with lower value of voltage, peak current and pulse duration with higher value of duty cycle and use of AlSi10Mg tool electrode.

Fig. 13
figure 13

Effect of parameters on DGI

Conclusion

The present study explores the feasibility of the desirability-grey relational analysis based Firefly algorithm to obtain best parametric setting during electrical discharge machining of titanium work piece. The study considers tool types such as AlSi10Mg tool manufactured by SLS process and copper and graphite, the conventional tools, as a variable during optimization process. Taguchi’s L27 experimental design is used to design the experimental plan considering machining parameters such as voltage, peak current, duty cycle, pulse duration and tool type. The performance measures considered are MRR, TWR, Ra, WLT, SCD and MH. Prediction of the performance measures using process parameters as inputs is made using LSSVM. The predicted values of all the six performance measures are comparable with experimental data. The predictive model is said to be robust one as root mean square error (RMSE) in the range of 0.11 to 0.34 is obtained for various performance measures. Since LSSVM predicts the performance output with reasonable accuracy, the method can be adopted by the tool engineers and practitioners for simulating the machining output before actual machining. From the desirability-grey relational analysis, it is found that superior machining performance expressed in terms of aggregate manner for all the performance measures can be achieved with lower value of voltage, peak current, pulse duration, higher value of duty cycle and use of AlSi10Mg tool electrode during the EDM process. The optimal EDM parametric setting obtained through desirability-grey relational analysis based Firefly algorithm are voltage = 20 V, peak current = 20A, duty cycle = 85%, pulse duration = 100 µs and tool = AlSi10Mg tool for simultaneous maximization of MRR and minimization of TWR, Ra, WLT, SCD and MH. The results are comparable with best parametric combination obtained through study of factorial plots for desirability grey index. The study confirms that metaheuristic based optimization approach produces similar results as multi-response optimization method like desirability-grey relational analysis which is much simpler to implement and computationally elegant. Since AlSi10Mg tool electrode produces superior surface characteristics in terms of surface roughness, surface crack density, white layer thickness and micro-hardness, it can be adopted by the practitioners when material removal rate is not an important issue. It is recommended that AlSi10Mg can be easily used in semi-finishing and semi-roughing operations. Die-making industries where die-sinking EDM is widely used for making complex dies in sheet making, injection moulding, manufacturing, automobile, aerospace and defense applications and surface integrity is of prime importance regardless of material removal rate and tool wear rate, electrodes produced by rapid prototyping method can be adopted. It not only reduces the tooling time and cost but complex shapes on the tool electrode can easily be replicated. However, desirability-grey relational analysis is used in this work for converting multi-objectives into an equivalent single objective optimization problem. Then, Firefly algorithm is used for obtaining optimal parametric setting. In future, the multi-objective optimization in the framework of Firefly algorithm can be attempted to obtain non-dominated sets to provide flexibility to the practitioners in choosing the best solution for specific applications. Further, hybridization of Firefly algorithm can be made by incorporating local search algorithms to improve the exploration and exploitation capability of the algorithm. In this work, performance tool electrodes built by SLS process has been demonstrated. In future, performance of tools made by other metal RP techniques can be explored.