1 Introduction

Wire electrical discharge machining (WEDM) process is one of the machining processes used to meet the increasing demands of modern industrial applications. It is used in a wide spectrum of industrial applications such as automotive, die making, molds’ manufacturing and medical equipment applications (Moulton 1999). Sridevi, Rao, and Nagaraju stated that WEDM is a thermal machining process characterized by its capability of machining parts with varying hardness or complex shapes. Machined parts may have sharp edges and it’s difficult to be machined by the classical machining processes (Sridevi et al. 2019). WEDM is developed originally from conventional EDM which is created based on the sparking phenomenon (Mohapatra and Patnaik 2007). WEDM process can be optimized by understanding the effect of machining parameters on the performance measures. Therefore, the selection of optimal machining parameters is very important (Camposeco-Negrete 2019; Pramanik et al. 2019; Raju and Balakrishnan 2020; Sahoo et al. 2019; Subrahmanyam and Nancharaiah 2020). The review of the literature showed that many researchers have contributed in optimizing WEDM process (Spedding and Wang 1997; Obara et al. 2004; Mohapatra and Patnaik 2007; Prajapati et al. 2011; Pant et al. 2014; Prathik et al. 2019; Singh et al. 2019) and it’s still one of the interesting and hot research areas (Jarosz et al. 2019; Kulkarni et al. 2019; Magabe et al. 2019; Nur et al. 2019; Priyadarshini et al. 2019).

Artificial neural network (ANN) is one of the optimization techniques used widely and it has many applications such as Sleep Apnea analysis (Ferduła et al. 2019), hourly electrical load forecasting in commercial buildings (Jing et al. 2019), modeling and analysis of photovoltaic/thermal system in buildings (Al-Waeli et al. 2019), Stock Market Price Prediction (Chopra et al. 2019), some studies related to atomistic modeling of materials (Pun et al. 2019) …etc. Machining processes optimization is one of the important applications of ANN, researchers used ANN technique over the years and they still using it for optimizing different machining processes such as milling process (Varol and Ozsahin 2019), Electrical Discharge Machining (EDM) process (Azadi Moghaddam and Kolahan 2019), Additive manufacturing process (Nagarajan et al. 2019), sheet metal free-forming process (Hartmann et al. 2019) and WEDM process (Chalisgaonkar et al. 2019; Dutta et al. 2019; Singh et al. 2019).

AISI 1045 is medium carbon steel, because of the carbon availability in the steel chemical composition, steel hardness and tensile strength improved. AISI 1045 steel, because of its excellent physical and chemical properties, it is used in many applications such as the machinery industry and nuclear industry (Stašić et al. 2011). AISI 1045 steel used for manufacturing many important parts such as shafts, gears, axles, machine parts, studs, pinions, and pins (Singh et al. 2014). Vishnuja, and Bhaskar conducted a study to review the applications of AISI 1045, they reviewed 116 references and stated that AISI 1045 steel were studied with many processes such as “turning, milling, machining, nitriding, boride layers, drilling, laser process, cold forming, cryogenic thin film deposition, grind hardening, fatigue tests, EDM, Microstructures, Brazed process, corrosion, and Nanoindentation related studies” (Vishnuja and Bhaskar 2018). However, the analysis conducted on Vishnuja, and Bhaskar work confirmed that literature is lacking optimization research for optimizing the WEDM process for machining AISI 1045. To confirm this above statement, on March 14, 2020, we search on Google scholar database by using the keywords “Wire EDM”, “Metal Removal Rate”, “Surface Roughness”, “ANN”, “AISI 1045”. The search resulted in a list of 15 publications only (Davies et al. 2003; Singh 2009; Rao 2011; Yusup et al. 2012; Patel et al. 2013; Choudhary and Jadoun 2014a, b; Srivastava et al. 2014; Sharma et al. 2015; Schoop et al. 2016; Liu et al. 2016; Kumar et al. 2017; Prasad and Babu 2017; Pathak 2018; Zolpakar et al. 2020) and none of them match our research approach. The researchers on the current research, motivated by the above statement, decide to conduct this research to optimize the WEDM process for machining AISI 1045.

The objectives of this research are building ANN model to predict performance measures (Metal Removal Rate (MRR) and Surface Roughness (Ra)) for WEDM process for machining AISI 1045 steel, identifying the significance of the machining Parameters (Pulse On-time (TON), Pulse Off time (TOFF) and Servo feed (SF)) for the aforementioned performance measures, and selecting optimal machining parameters that give maximum MRR value and optimal machining parameters that give the minimum Ra value. Taguchi method (Design of Experiments), Artificial Neural Network (ANN), and Analysis of Variances (ANOVA) will be used in this research as a methodology to fulfill research objectives. This research reveals the creation of ANN models able to predict the Ra and MRR values with about 98.136% and 97.3% accuracy respectively. Moreover, machining parameters’ significance for performance measures detected and optimal machining parameters for maximum MRR and minimum Ra were calculated. After the introduction, the paper will follow the following structure, in the second section research method will be explained. In the third section, a literature review will be conducted. In the fourth section, experimental work will have outlined. In the fifth section, the WEDM process modeling and optimization approach will be presented. After that, in the sixth section, results will be discussed, and in the last section, conclusions, future research directions, research implications, and research limitations will be presented.

2 Research methodology

The methodology used in the current research consists of three steps. The first step starts by using the Taguchi method to design the experimental part of the research, run the experiments, collect the data, and measure the MRR and Ra values. In the second step, the ANN model will be developed to predict MRR and Ra values from machining parameters. In the third step, ANOVA will be conducted to identify the contribution of each one machining parameters on each one of performance measures and select the optimal machining parameters that will give maximum MRR and optimal machining parameters that will give minimum surface roughness.

3 Literature review

The methodology used in this literature review adapted from Crossan and Apaydin’s work and it consists of three steps namely Data collection, results’ analysis, and results’ synthesis (Crossan and Apaydin 2010). The objectives of the literature review are proving that the approach used in the current research is useful and effective, and proving the significance of the performance measures and machining parameters selected in the current research. The literature reviewed for 24 years (between 1995 and 2019). The keywords used to search on Google scholar database were “Wire EDM”, “Metal Removal Rate”, “Surface Roughness”, and “Artificial Neural Network”. The search resulted in a list of 310 publications, however, after screening the 310 publications and excluding irrelevant and duplicated research efforts, a list of 32 publications selected for review in the current research. In the following sub-sections, the literature review details will be presented.

3.1 Data collection

The contains of the papers selected for review in this research will be presented in this section. Many approaches have been used in the literature to optimize the WEDM process and to identify the effect of machining parameters on the WEDM process performance measures. Tarng, Ma and Chung used ANN and simulated annealing (SA) algorithms to identify the optimal machining parameters based on a performance index value calculated from performance measures (Tarng et al. 1995). Response Surface Methodology (RSM) and ANN used to create a model of the WEDM process. Machining parameters that used as an input to the model include TON, TOFF, Wire tension (WT), and the injection set-point. Output parameters of the model were cutting speed, Ra and the surface waviness (Spedding and Wang 1997). ANN proves its effectiveness and accuracy in modeling the WEDM process wither its integrated with other methods as its shown in the aforementioned paper, or alone as Shunmugam, Kumar, and Kaul proved (Shunmugam et al. 1999).

Another example of using ANN in modeling the WEDM process can be seen in the work of Sarkar, Mitra, and Bhattacharyya as they identified the optimum machining parameters of WEDM for machining titanium aluminide. ANN model for WEDM machining process developed, model outputs (performance measures) were cutting speed, Ra and wire offset while model inputs include six parameters namely TON, TOFF, peak current (A), WT, dielectric flow rate and servo reference voltage (VS) (Sarkar et al. 2006). In addition to WEDM process optimization and process outputs prediction, ANN in integration with expert systems used as well to create a maintenance-schedule and fault-diagnosis system (Huang and Liao 2000). ANN and Fuzzy logic used as well to improve the quality of the WEDM process because it is used to predict the thickness of the white layer generated during the WEDM process. ANN and Adaptive Neuro-Fuzzy Inference System (ANFIS) used to create a model to predict the thickness of the white layer and the average Ra. Model inputs were TON, VO dielectric flushing pressure (FP) and wire feed rate (WF) (Çaydaş et al. 2009). Multiple regression analysis methods and ANN used to create a model to predict the Ra in WEDM. Model inputs were four levels of TON, open voltage (VO), wire-speed and FP. The developed model used to improve the efficiency and accuracy of the WEDM process for machining Cr–Mo–V alloyed special steel (Reddy et al. 2010). The same researchers used the same approach to develop a model to predict the Ra value in the WEDM process during machining WP7V steel. Researchers used the same input parameters used in the previous research, i.e. TON, VO, wire-speed (WS) and FP (Reddy et al. 2013).

ANN used also to predict the MRR, Ra, and minimum electric kerf (Ek) values, optimize WEDM process parameters and improve process efficiency and accuracy during machining Aluminum Silicon Carbide with 10% weight Metal Matrix Composite (Al/SiC10%MMC) (Kapgate and Tatwawadi 2013). WEDM process performance measures (accuracy, Ra, and MRR) estimated by using Multiple Regression Analysis (MRA), Group Method Data Handling Technique (GMDH) and Artificial Neural Network (ANN). The input parameters to the model were TON, TOFF, A and bed speed (BS). Model estimation accuracy checked by comparing the estimated values with the values measured from experiments and it was highly acceptable (Ugrasen et al. 2014a). Ugrasen, Ravindra, Prakash, Naveen, and Keshavamurthy, in the second part of their work, developed an ANN model and its application to optimize WEDM machining parameters that include TON, TOFF, A, and BS. Similar to the first part, performance measures used were accuracy, Ra, and MRR (Ugrasen et al. 2014b). ANN used as well to study and specify the relation between machining parameters and performance measures for the WEDM process in machining Pure zirconium diboride (ZrB2). In this research, the ANN approach effectiveness proved again in identifying the relation between machining parameters and performance measures (Pramanick et al. 2014).

Shakeri, Ghassemi, Hassani and Hajian stated that “investigating the effect of process parameters on MRR and Ra is very important for process planning in WEDM machining”. Shakeri et al. studied the machining of “cementation alloy steel 1.7131” by using ANN and linear regression model and predicted Ra and MRR values for effective machining. Machining parameters used in this research were A, frequency of the pulse, WS, and SF. Shakeri et al. stated that “the comparison of the results showed that the neural network is more robust with better accuracy” (Shakeri et al. 2016). Surya, Kumar, Keshavamurthy, Ugrasen, and Ravindra used ANN to maximize MRR, minimize Dimensional Error (DE) and minimize Ra during machining “Al7075-TiB2 in situ composite”. In this research, the machining parameters of the WEDM process that used as inputs to the ANN model were TON, TOFF, A, and BS. good agreement noticed in this research between Predicted and measured performance measures (Surya et al. 2017). Conde, Arriandiaga, Sanchez, Portillo, Plaza, and Cabanes used the Elman-based Layer Recurrent Neural Network (LRNN) and SA technique to propose away “to predict the accuracy of components produced by WEMD” and to develop an algorithm to design wire paths of variable radius correct it via software. Conde et al. stated that “the average deviation was reduced by as much as 80%, and the Coefficient of Variation (CV) was decreased by 43%”, which confirms ANN approach effectiveness (Conde et al. 2018).

Sridevi, Rao, and Nagaraju optimized WEDM and predicted process performance measures (MRR and Ra) for machining medium carbon steel AISI 1040. ANN and Multiple Regression approach used to create a model. model inputs include FP, TON, TOFF, VS, WF, and WT. Results showed that the ANN model’s ability to predict process outputs was satisfactory (Sridevi et al. 2019). ANN used also for modeling the WEDM process for machining AA6063 material. Model inputs were TON, TOFF, A, and VS. The model output was MRR. The predicted MRR values in this research are found close to experimental results. Thus, as researchers stated, the model is “appropriate for prediction purpose and smart manufacturing” (Singh et al. 2019). Aforementioned results confirmed by the work of Prathik, Ravindra, Prakash, and Ugrasen as they used ANN for optimizing the WEDM process for machining titanium material. ANN used to estimate Electrode Wear (EW), Acoustic Emission (AE) signal strength, and AE count (Prathik et al. 2019).

WEDM process accuracy improved by 50% especially in corner parts machining by using a fuzzy logic approach. The data collected from experiments and operator experiences were the main sources for creating fuzzy rules (Lin et al. 2001). RSM approach used to improve the WEDM process by modeling white layer depth. Inputs of the model were TON, wire tool offset, and constant cutting speed and model output was white layer depth (Puri and Bhattacharyya 2005). RSM used also to optimize WEDM process parameters for machining of SiCp/6061 Al metal matrix composite (MMC). Model inputs include VS, TON, TOFF, and WF (Shandilya et al. 2012). ANFIS and grey relational analysis used to study the effect of machining parameters (TON, TOFF, gap voltage, A, WT, and WF) on the performance measures (cutting velocity (CV) and Ra) in the dry WEDM process for machining of Al/SiC metal matrix composite. Researchers were able to prove that that “oxygen gas and brass wire guarantee superior cutting velocity” and TON and current were found to have a significant effect on CV and Ra (Bagherian Azhiri et al. 2014).

Principal Component Analysis (PCA) approach used for optimizing machining parameters of WEDM during machining En45A Alloy Steel. The control factors of analysis were VO, VS, & WF. the PCA conducted to identify control factors effect on the performance measures that include MRR, Machining Time (MT) and Gap voltage (GV). VO was the most significant (Dhakad and Vimal 2017). The effect of machining parameter (TON, TOFF, and A) of the WEDM process on the Ra studied from machining Inconel superalloy and parameters optimized by using only the Taguchi method and ANOVA. The results of this research proved that “TON is the most significant factor and A is an insignificant factor” (Vijaya Babu and Soni 2017). The Taguchi method and ANOVA proved as the most significant and effective methods that can be used in optimization researches and they have been used in almost all papers reviewed in the current research.

The review of the literature showed that despite that more than three decades, as per the literature reviewed in the current research, already passed but still WEDM process optimization one of the hot research area (Camposeco-Negrete 2019; Chalisgaonkar et al. 2019; Dutta et al. 2019; Kulkarni et al. 2019; Magabe et al. 2019; Nur et al. 2019; Priyadarshini et al. 2019; Raju and Balakrishnan 2020; Sahoo et al. 2019; Subrahmanyam and Nancharaiah 2020). Researchers still motivated to conduct more research to fill the current gaps in the knowledge, this is because the WEDM process has many parameters and many conflicting performance measures and the process results always depend on the workpiece material type used.

3.2 Results’ analysis

The literature reviewed in the previous section will be analyzed in this section to extract the necessary results and build insights to fulfill the literature review objectives. Figure 1 shows that 65.7% of publications were published between 2014 and 2019 and 40% of publications were published during 2019. The stated facts confirm the importance of this research topic and indicate that recently researchers are focusing their efforts on optimizing the WEDM process. The analysis conducted showed that similarity existed between input parameters were used in different papers, however, they were used in under different names. Therefore, the input parameters listed, analyzed, similarity identified, input parameters unified, and then a list of 17 input parameters generated. See Fig. 2, the most used parameters in the literature were TON, TOFF, A, and VS, while other parameters such as WS, SF, WT, and injection pressure were less investigated. Other parameters shown in the Fig. 2 seems irrelevant because it wasn’t investigated by many researchers.

Fig. 1
figure 1

Publications’ years Vs numbers

Fig. 2
figure 2

The percentage of parameters’ usage in the literature

Regarding the performance measures used in the literature, the analysis conducted on the literature showed that 14 performance measures were used in the literature, however, only two performance measures were found to be significant because it was used by most of the published researches, see Fig. 3. Those performance measures are Ra and MRR. Regarding wire materials, the wire materials used in the literature were brass wire, copper wire, zinc-coated brass wire, molybdenum wire, and zinc-coated copper wire. See Fig. 4, it is clear that brass wire was highly used in the literature followed by copper wire, zinc-coated brass wire, and molybdenum wire which were equally used. zinc-coated copper wire was rarely used in the literature. For workpiece material, the analysis conducted showed that a wide range of materials was used in the published researches, however, the material targeted in this research not used before in the reviewed literature, see Table 1. Priyadarshini, Biswas, and Behera stated that “mostly the wires of WEDM are made up of metals, such as copper, tungsten, and molybdenum. Nowadays, zinc coated wire is greatly used for better results” (Priyadarshini et al. 2019).

Fig. 3
figure 3

The percentage of performance measures used in the literature

Fig. 4
figure 4

Wire material usage % by the 32 reviewed papers

Table 1 Number of times workpiece material used in the reviewed literature

3.3 Results’ synthesis

As it was presented in the results’ analysis section, the WEDM process optimization research topic is attracting many researchers. Researchers still attracted to solve all issues related to the optimization of the WEDM process. WEDM process optimized for a wide range of materials, however, for the reviewed papers, the literature review confirmed that no research yet optimized the WEDM process, predicted the process performance measures’ values, studied the effect of the machining parameters, or select the optimal machining parameters for machining AISI 1045 material, see Table 1. The analysis conducted showed that many types of electrode materials were used, however, the recent studies confirmed that zinc-coated is giving better results. Taking the previous fact into consideration, and considering that zinc-coated copper wire was used in very few researches, in the current research we will use zinc-coated copper wire.

ANN, Taguchi method, and ANOVA used in most reviewed researches and proved as useful tools/methods for optimization researches (Shakeri et al. 2016; Mohapatra et al. 2017; Conde et al. 2018; Chalisgaonkar et al. 2019; Nur et al. 2019; Priyadarshini et al. 2019; Sridevi et al. 2019), which confirm the effectiveness and usefulness of the approach used in the current research. Regarding the machining parameters, it was proved in the analysis section that TON and TOFF were the most significant parameters and used by the majority of researches along with A and VS. However, in the current research, in addition to TON and TOFF, we will use one of the less investigated parameters that are SF to explore the interaction of this parameter with other parameters and its significance for the WEDM process. The analysis confirmed as well that Ra and MRR performance measures were the most important measures and used in the majority of the optimization researches, see Fig. 3. Therefore, we will use it in the current research. All in all, this literature review and conducted analysis proved that the approach used in the current research for optimizing the WEDM process for machining AISI 1045 steel is useful and novel and, up to our knowledge level, not tackled before.

4 Experimental setup

The experiments performed on the three-axis CNC WEDM machine model Elektra, type EL Pulse 15. The machine used to conduct experiments shown in Fig. 5. The wire used in the experiments is 0.3 mm Cu–Zn wire (Zinc coated copper wire). Wire material consists of Cu 63% and Zn 37%, which improves the cutting speed. The workpiece is AISI 1045 Carbon steel with dimension (50 × 50 × 25) mm, the chemical compositions, analyzed on laboratory, and mechanical properties of the workpiece are listed in Tables 2 and 3.

Fig. 5
figure 5

Machine used in the experimental work

Table 2 Chemical composition of the workpiece (steel AISI 1045)
Table 3 The Mechanical properties of workpiece material (steel AISI 1045)

5 WEDM process modelling and optimization

5.1 Measurement of metal removal rate (MRR) and surface roughness (Ra)

MRR can be defined as a volume of material removed during manufacturing time. MRR unit of measurement is (mm3/min). MRR can be calculated based on the following equations (Sadeghi et al. 2011):

$${\text{MRR}} = {\text{F}}*{\text{K}}*{\text{H}}$$
(1)
$${\text{F}} = L/T$$
(2)

F = Cutting speed in (mm/min), L = length of cut in (mm), T = Cutting time in (min), K = Width of kerf (mm) = (2*gap between wire and workpiece) + D, D = Wire diameter in (mm) = 0.3 mm, H = Thickness of the workpiece in (mm) = 25 mm.

Ra is one of the important performance measures used in the literature to measure WEDM process performance. Roughness is a measure of the texture of a surface, “it is quantified by the vertical deviations of a real surface from its ideal form. If these deviations are large, the surface is rough; if small, the surface is smooth” (Nourbakhsh 2012). In the current research, the Ra of all machined surfaces measured by using a portable surface roughness tester (pocket surf). During the Ra measurement, the tracing speed and the sample length were fixed at 1 mm/s and 3 mm. The angles of measuring roughness were 33°, 40°, 37° as shown in Fig. 6 based on the shape of the product. The measuring implemented perpendicular on the cutting direction with three different locations in the cutoff length of (3 mm). Figure 7 shows the process of measuring surface roughness using a special holder to give the Pocket Surf more freedom in measuring with any angle.

Fig. 6
figure 6

Angles of measuring roughness

Fig. 7
figure 7

Ra measuring equipment (Pocket Surf)

5.2 Design of experiments (Taguchi method)

Taguchi method used to design the experiments, by using the orthogonal array, to help researchers to have balanced experiments that consider the effect of process parameters with their levels on the process performance measures, i.e. using Taguchi method will help to collect all necessary data to understand which factors have the major effect on the product quality by using a minimum number of experiments (Patel et al. 2015). The “orthogonal array is represented by La (bc), where the subscript represents the number of parameter combinations, b represents the number of control factor levels, and c represents the number of control factors. The control factors are the parameters that may influence the quality characteristics i.e. performance measures” (Kuo and Lin 2017).

Three machining parameters and three levels for each parameter will be used in the current research. Therefore, the orthogonal array will be L27 (33), which means that twenty-seven parameter combinations will be used and twenty-seven experiments will be conducted. Experiments conducted to study the effects of machining parameters (TON, TOFF, and SF) on performance measures (Ra and MRR). The levels of cutting parameters listed in Table 4 and the machining parameters combinations with the measured MRR and Ra listed in Table 5.

Table 4 Machining parameters levels
Table 5 machining parameter combinations with the measured MRR and Ra

5.3 Artificial neural network (ANN)

ANN is a technique developed to simulate the learning process of the human brain by creating an artificial representation of it. ANN uses mathematical modeling or computational model to create a group of interconnected artificial neurons to process the information “based on a connectionist approach to computation”. ANN model consists of interconnecting neurons, which “may share some properties of biological neurons”. ANN neurons networks represent an artificial model that simulates the biological nervous system. ANN structure consist of a group of neurons plays the role of simple processors. Together neurons work as a non-linear mapping system (Ugrasen et al. 2014b). Each neuron weights each connection with the other neurons. The inputs from all preceding neurons calculated by using a specific formula to create net input for each neuron and the neuron will generate output which can be an input to the next neurons or it may represent the model output if this neuron is the output layer (Ozcelik et al. 2005). The net input to the neurons can be calculated by the following equation (Oktem et al. 2006):

$$net_{j} = \sum\limits_{j = 0}^{N} {w_{ij} {\text{xi}}}$$
(3)

where N: the number of inputs to the jth neuron, netj: is a total or net input, wij: are the weights of the connections for the ith neuron with the forward layers to the jth neuron in the hidden layers, xi: is the input from the ith neuron.

A neuron in the networks produce it is output (outj) by processing the net input through an activation function (f) calculated based on the following equation (Ozcelik et al. 2005):

$$out_{j} = f(net_{j} ) = \frac{{1 - e^{{ - net_{j} }} }}{{1 + e^{{ - net_{j} }} }}$$
(4)

Back-propagation algorithms are a systematic methodology used for ANN network training and used as well to “minimize the total squared error of the network output” (Chalisgaonkar et al. 2019). There are many types of ANN models available, however, “feed-forward neural network with backward propagation model performs well” for solving problems similar to our research problem (Singh et al. 2019). Therefore, Back-propagation based on the Levenberg–Marquardt algorithm selected in this research to train the networks.

ANN architecture layers and number of neurons depends on the number of inputs and outputs of the model. one specific structure usually fit for each research problem and again it depends on the number of inputs and outputs, for instance, 8-14-2 architecture used by Tarng et al. (1995), 4-16-3 architecture used by Spedding and Wang (1997), 4-5-5-1 architecture used by Reddy et al. (2013), 6-8-3 architecture used by Sridevi et al. (2019), and 7-7-1 architecture used by Chalisgaonkar et al. (2019) to solve their research problems. In the current research, based on the used algorithm, the combination of squared errors was minimized then the correct combination to produce a well-generalized network using ANN determined. Optimum neural network architecture was designed by the MATLAB program. Single hidden layer with (3) inputs and (1) output were used to model the process, as it’s shown in Fig. 8. The three inputs parameters are (TON, TOFF, and SF) and the output parameters are (Ra and MRR). Twenty-seven experiments represent the data distribution, therefore, the training subsets include twenty-one groups, i.e. 76% of the data, and the testing subsets include six groups, i.e. 24% of the data. Different architectures tested and the model with 3-5-1 architecture was found to be the most suitable for the task.

Fig. 8
figure 8

ANN structure used in the research

ANN model networks weights will be updated and networks will be trained by using Back Propagation learning algorithm until the mean square error (MSE) will reach to a minimum value between the targeted output and the network output (Öktem 2009):

$$MSE = \frac{1}{km}\sum\limits_{m = 1}^{M} {\sum\limits_{k = 1}^{K} {\left( {DES_{mk} - OUT_{mk} } \right)^{2} } }$$
(5)

where DESmk and OUTmk: the desired output and the network output, K: is the number of output neurons, M: is the overall number of data set.

For weights variables calculations, which usually given network training name, a quasi-random value will be given to the weights keeping in mind that initial values should be intelligently chosen. The gradient descent method will be used iteratively to update the weights until it reaches certain values. Gradient descent method updates the weights to minimize the MSE between the network prediction and training data set by using the following equations (Oktem et al. 2006):

$$w_{ij}^{new} = w_{ij}^{old} + \Delta w_{ij}$$
(6)
$$\Delta w_{ij} = - \eta \frac{\partial E}{{\partial w_{ij} }}out_{j}$$
(7)

where E: is the MSE, outj: is the jth neuron output, \(\eta\): this symbol represents the learning rate parameter necessary to control the stability and evaluate the degree to which ANN model networks are closed to the targeted value. \(\eta\) value usually constant and it falls in the range between 0 and 1. In this research \(\eta\) value chosen to be 0.001.

To check prediction model accuracy, we will use the percentage error (Øi) and average percentage error (Ø), which can be calculated by the following equations (Prakasvudhisarn et al. 2009):

$$\varnothing_{i} = \frac{{\left| {R_{aie} - R_{aip} } \right|}}{{R_{aie} }} \times 100\%$$
(8)

where Øi = Percentage error for each experiment, Raie = Experimental Ra or MRR, Raip = Predicted Ra or MRR.

$$\varnothing = \frac{{\sum\nolimits_{i = 1}^{m} {\varnothing_{i} } }}{m}$$
(9)

where Ø = average percentage error, m = number of experiments.

5.4 Analysis of variances (ANOVA)

ANOVA is a technique used to determine significant factors based on their contribution to process outcomes/results/performance measures. Factors effects obtained by separating the total outcomes variability. Variability measured by “calculating the sum of the squared deviations (SST) from the total mean of the process outcomes, the variability of the process parameters (SSF), and the error (SSE)”. SST, SSF, and SSE formulas are as follows (BesterField et al. 2015):

$${\text{SS}}_{\text{T}} = \sum\limits_{i = 1}^{a} {\sum\limits_{j = 1}^{{n_{i} }} {y_{ij}^{2} - \frac{{T^{2} }}{N}} }$$
(10)
$${\text{SS}}_{\text{F}} = \sum\limits_{i = 1}^{a} {\frac{{A_{i}^{2} }}{{n_{i} }} - \frac{{T^{2} }}{N}}$$
(11)
$${\text{SS}}_{\text{E}} = {\text{SS}}_{\text{T}} - {\text{SS}}_{\text{F}}$$
(12)

where a: Number of factor levels, ni: Number of observations at each factor level (i = 1 …. a), yij: jth observation at the ith factor level, Ai: Total of observations under the ith factor level, T: Total of observations under all factor levels, N: Total number of observations.

$${\text{MS}}_{\text{F}} = \frac{{SS_{F} }}{{V_{F} }}$$
(13)
$${\text{MS}}_{\text{E}} = \frac{{SS_{E} }}{{V_{E} }}$$
(14)
$${\text{F}} = \frac{{MS_{F} }}{{MS_{E} }}$$
(15)

where MSF: Mean squares of the factor, MSE: Mean squares of the error, VF: Degree of freedom of the factor, VE: Degree of freedom of the error, F: F test that is used to compare the ratio of factor variances with error variances, F-Ratio in the analysis used to determine the significance of factors. F ratio represents a 95% confidence level in the calculation which is accurately equal to (3.369) for F0.05, 2,26. P values report the significance level (suitable and unsuitable). For the current calculation, P value in this section represents the significance rate of the process parameter on MRR.

6 Results and discussion

6.1 Effect of pulse on time and servo feed on the MRR

Figures 9, 10, and 11 shows the effect of TON and SF on MRR at constant TOFF. It can be seen that the increase in TON leads to increase MRR. This is due to the high energy generated during machining which leads to high spark then high melting rates of material. Also, the increase in SF leads to increase MRR because of the high energy generated during machining. Also, from these figures, it can be seen that high rates of MRR can be reached at low levels of TOFF, except for some readings which lie out of its expected location because of some reasons like electricity shut down and wire breakage. Figures 12, 13, and 14 which shows the effect of TON and SF on the predicted values of MRR, it can be seen that the predicted results show that the change of TON at different SF gives the same relationship obtained from experimental results, which confirm prediction model accuracy.

Fig. 9
figure 9

Effect of pulse on-time and servo feed on experimental MRR at fixed pulse off time (20 µs)

Fig. 10
figure 10

Effect of pulse on-time and servo feed on experimental MRR at fixed pulse off time (30 µs)

Fig. 11
figure 11

Effect of pulse on-time and servo feed on experimental MRR at fixed pulse off time (40 µs)

Fig. 12
figure 12

Effect of pulse on-time and servo feed on predicted MRR at fixed pulse off time (20 µs)

Fig. 13
figure 13

Effect of pulse on-time and servo feed on predicted MRR at fixed pulse off time (30 µs)

Fig. 14
figure 14

Effect of pulse on-time and servo feed on predicted MRR at fixed pulse off time (40 µs)

6.2 Effect of pulse on time and pulse off time on the MRR

Figures 15, 16, and 17 show the effect of TON and TOFF on MRR while maintaining SF constant. From these figures, it can be seen, that the increase in TON leads to increase MRR, but the increase in TOFF leads to decrease MRR. This is due to low rates of melting at high values of TOFF while SF has a little effect on MRR. Also, from these figures, it can be seen, that high rates of MRR can be reached at low levels of TOFF. Figures 18, 19, and 20 show the effect of TON and TOFF on the predicted values of MRR. It can be noted that the predicted results show that the change of TON at different TOFF gives the same relationship obtained from experimental results, which confirm prediction model accuracy.

Fig. 15
figure 15

Effect of pulse on-time and pulse off time on experimental MRR at fixed servo feed (500 mm/min)

Fig. 16
figure 16

Effect of pulse on-time and pulse off time on experimental MRR at fixed servo feed (600 mm/min)

Fig. 17
figure 17

Effect of pulse on-time and pulse off time on experimental MRR at fixed servo feed (700 mm/min)

Fig. 18
figure 18

Effect of pulse on-time and pulse off time on predicted MRR at fixed servo feed (500 mm/min)

Fig. 19
figure 19

Effect of pulse on-time and pulse off time on predicted MRR at fixed servo feed (600 mm/min)

Fig. 20
figure 20

Effect of pulse on-time and pulse off time on predicted MRR at fixed servo feed (700 mm/min)

6.3 MRR regression graphs for ANN model

The relationship between ANN model networks’ output and desired targets shown on the regression graph. Learning data, validation test data and all data regression graphs shown in Fig. 21. In this graph, the optimal condition represented by the dotted line which means the area where Y (output) = T (target). In the graphs, for a particular sample, the actual output presented as a dots while the solid line presenting the best fit linear regression line between outputs and targets. The more solid line close to the dotted line the more outputs fit with targets. Figure 21 represents regression coefficients of the MRR model based on the data which are 1 for the training set, 0.99571 for the validation set, 0.98977 for the test set and 0.99221 for all data set. Based on the plotted graphs, we can conclude that the learning of the network is proper and ANN model networks are accurate enough to predict MRR. We can conclude as well, based on the value of the regression coefficient of training set which is approximately 1, that exact linear relationship between outputs and targets.

Fig. 21
figure 21

Regression graphs for MRR

6.4 Analysis of experimental results for MRR

6.4.1 Analysis of variances

ANOVA conducted to determine the effect of machining parameters on the MRR. MRR as a dependent variable and TON, TOFF and SF as independent variables. The results of the ANOVA for MRR are shown in Table 6 for three machining parameters. A significance level of α = 0.05 used for this analysis, which means that the confidence level is 95%. The F ratio value for the TON is 207.869 which is the greater among the parameters. Therefore, the most significant parameter is TON with a P % value of (71.733%), i.e. about three times the TOFF P % value (21.796%). SF has a small influence with a P % value of 3.02%. In the analysis, F-ratio is a “ratio of mean square error to residual and is traditionally used to determine the significance of a factor. F-ratio corresponding 95% confidence level, in the calculation of process parameters, is F0.05,2,20 = 3.4928. F value reports the significance level (suitable and unsuitable). Percent value (P %) is defined as “the significance rate of process parameters on process performance measures” (BesterField et al. 2015). The P % confirm that TON, TOFF, and SF has significant effects on MRR, i.e. TON, TOFF and SF parameters are statistically and physically significant for MRR because F Test > Fα = 5%.

Table 6 ANOVA for MRR

6.4.2 Optimal machining parameters for maximum MRR

SPSS software package used to plot the main effects graphs to determine the optimal design conditions that should be used to obtain the optimum MRR value and hence select the optimal machining parameters. Figure 22 shows the main effect plot for MRR with the process inputs. This graph shows the variation of individual response with three parameters, i.e. TON, TOFF, and SF separately. The results confirmed that the optimal machining parameters for maximum MRR were: TON at level-3 (25 µs), TOFF at level-1(20 µs), and SF at level-3 (700 mm/min).

Fig. 22
figure 22

Main effects plots for MRR with inputs

6.5 Comparison of the measured and predicted results for MRR

Figures 23 and 24 show the variation of MRR, measured from experiments and predicted from the ANN model, values for 27 experiments. The twenty-one MRR values used in training the ANN model and the rest of the data (6 MRR values) were used for testing the trained ANN model. ANN Matlab toolbox used for training and testing the ANN model. The relationship between the 21 measured and predicted values of MRR shown in Fig. 23. It can be seen from this figure that the measured MRR values were very close to the predicted MRR values with 96.588% percentage. In Fig. 24 we can see the relationship between the six measured and predicted values of MRR which indicates a good agreement between measured and predicted values. Figures 23 and 24 explaining the high match between measured and predicted values for MRR which indicate the accuracy and efficiency of the ANN model in predicting MRR values.

Fig. 23
figure 23

The comparison of the measured with the predicted of MRR values (training sets)

Fig. 24
figure 24

The comparison of the measured with the predicted of MRR values (testing sets)

Table 7 shows MRR predicted values resulted from ANN model training and MRR values measured from experiments. The training data sets consists of 21 MRR values selected from 27 MRR values measured from experiments. A good correlation can be seen between the measured and the predicted values of MRR, which confirm ANN model accuracy and effectiveness for predicting MRR values in WEDM process. The maximum value of MRR was (16.236 mm3/min) in Table 7 at TON (25 µs), TOFF (20 µs) and SF (700 mm/min). Table 8 shows the results of MRR predicted values from testing the trained ANN model and the MRR values measured from experiments. The data set is consisting of six MRR values selected randomly from 27 MRR experiments, which were not used for the training of the ANN model. It can be seen from Table 8 that the ANN model showed a good agreement between predicted and measured MRR values. The average prediction error of the data set is found to be 2.69%, i.e., the accuracy is 97.3% and the MSE is 0.13.

Table 7 Comparison of the training sets (predicted with measured MRR values) for the trained ANN model
Table 8 Comparison of the test sets (predicted with measured MRR values) for testing the ANN model

6.6 Pulse on time and servo feed effect on the surface roughness

Figures 25, 26, and 27 show the effect of TON and SF on Ra at constant TOFF. It can be seen that the increase in TON leads to increase Ra. This is due to the high spark that generated at high values of TON which caused surface irregularities, also it can be seen that the values of Ra decreased with the increase of TOFF, and an increase in SF value will increase Ra’s value. Figures 28, 29, and 30 shows the effect of TON and SF on the predicted Ra values. From figures, we can see that the predicted results confirm that the change in TON values at different levels of SF will give the same relationship discussed in the experimental results graphs, which means confirm ANN model accuracy and effectiveness in predicting the performance measures in WEDM process.

Fig. 25
figure 25

Effect of pulse on-time and servo feed on experimental surface roughness at fixed pulse off time (20 µs)

Fig. 26
figure 26

Effect of pulse on-time and servo feed on experimental surface roughness at fixed pulse off time (30 µs)

Fig. 27
figure 27

Effect of pulse on-time and servo feed on experimental surface roughness at fixed pulse off time (40 µs)

Fig. 28
figure 28

Effect of pulse on-time and servo feed on predicted surface roughness at fixed pulse off time (20 µs)

Fig. 29
figure 29

Effect of pulse on-time and servo feed on predicted surface roughness at fixed pulse off time (30 µs)

Fig. 30
figure 30

Effect of pulse on-time and servo feed on predicted surface roughness at fixed pulse off time (40 µs)

6.7 Pulse on time and pulse off time effect on the surface roughness

Figures 31, 32, and 33 show the effect of TON and TOFF on Ra while maintaining the SF parameter constant. From these figures it can be seen that the increase in TON leads to increase Ra, this is due to the high melting rates that occur at high values of TON which caused surface irregularities. It can be also seen that the values of Ra increased with the increase of SF. Finally, Ra decreased with the increase of TOFF. It can be seen that low ranges of Ra can be reached at low levels of TOFF. Figures 34, 35, and 36 show the effect of TON and TOFF on the Ra predicted values. From the predicted results we can see that the change in TON values at different TOFF will give the same relationship obtained in the case of experimental results, which confirm that ANN model accuracy and effectiveness in predicting the outputs of the WEDM process is good.

Fig. 31
figure 31

Effect of pulse on-time and pulse off time on experimental surface roughness at fixed servo feed (500 mm/min)

Fig. 32
figure 32

Effect of pulse on-time and pulse off time on experimental surface roughness at fixed servo feed (600 mm/min)

Fig. 33
figure 33

Effect of pulse on-time and pulse off time on experimental surface roughness at fixed servo feed (700 mm/min)

Fig. 34
figure 34

Effect of pulse on-time and pulse off time on predicted surface roughness at fixed servo feed (500 mm/min)

Fig. 35
figure 35

Effect of pulse on-time and pulse off time on predicted surface roughness at fixed servo feed (600 mm/min)

Fig. 36
figure 36

Effect of pulse on-time and pulse off time on predicted surface roughness at fixed servo feed (700 mm/min)

6.8 Regression graphs for ANN model for Ra

Figure 37 shows the regression graphs of Ra learning data, validation data, test data, and all data. In this graph, the optimal condition represented by the dotted line which means the area where Y (output) = T (target). In the graphs, for a particular sample, the actual output presented as a dots while the solid line presenting the best fit linear regression line between outputs and targets. The more solid line close to the dotted line the more outputs fit with targets. Figure 37 represents Regression coefficients of Ra model, based on the data, which are 0.99932 for the training set, 0.97684 for the validation set, 0.99482 for the test set and 0.98301 for all data set. Regression coefficients of Ra model confirm that the learning of the network is proper and this ANN model can be used to predict Ra. We can conclude as well, based on the value of the regression coefficient of training set which is approximately 1, that exact linear relationship between outputs and targets.

Fig. 37
figure 37

Regression graphs for Ra

6.9 Analysis of experimental results for Ra

6.9.1 Analysis of variances

ANOVA conducted to determine the effect of machining parameters on Ra. Ra as the dependent variable and TON, TOFF and SF as independent variables. The results of the ANOVA with Ra are shown in Table 9 for three machining parameters. A significance level of α = 0.05 used for this analysis, which means that the confidence level is 95%. The F-ratio value of TON is (16.920), i.e. it is the biggest value among the parameters. From P value, we can conclude that the most significant parameter is a TON (42.922%) it is about twice the TOFF (24.860%). P values show that TON and TOFF have significant effects on Ra, i.e. TON and TOFF parameters are statistically and physically significant for Ra because Test F > Fα = 5%, but SF has no significant effect on surface roughness because of Fα > F.

Table 9 ANOVA for Ra

6.9.2 Optimal machining parameters for minimum Ra

Optimal design conditions that will ensure getting the optimum (minimum) Ra value and hence select the optimal machining parameters estimated by using the main effects plots. SPSS software package used in this analysis. Figure 38 shows the main effect plot for Ra with the process parameters. From Fig. 38, the optimal conditions for minimum Ra were: TON at first level (10 µs), TOFF at the third level (40 µs), and SF at first level (500 mm/min).

Fig. 38
figure 38

Main effects plots for Ra with inputs

6.10 Comparison of the measured and predicted results for Ra

In this section, we will compare the obtained results from experimental work with the predicted results obtained from the suggested model to identify matching between them. Figures 39 and 40 show the variation between predicted and measured Ra value for 27 experiments. Twenty-one Ra values were used for training the ANN model. The remaining data sets (six Ra values) were used for testing the trained ANN model. Matlab toolbox used for training and testing the ANN model. The relationship between the 21 Ra values (measured and predicted) shown in the Fig. 39. It can be seen that the measured Ra values were very close to the predicted Ra values. From Fig. 40 we can see that the relationship between the six Ra values (measured and predicted) confirms the existence of a good agreement between these values. Figures 39 and 40 explaining the high match between measured and predicted values for MRR which indicate the accuracy and efficiency of the ANN model in predicting Ra values.

Fig. 39
figure 39

The comparison of the measured with the predicted of Ra values for the training set

Fig. 40
figure 40

The comparison of the measured with the predicted values of Ra for the testing set

Table 10 shows Ra predicted values resulted from ANN model training and Ra values measured from experiments. The training data set is consisting of 21 Ra values selected from 27 Ra values measured from experiments. A good match can be seen between the measured and the predicted Ra values, which confirm that ANN model accuracy and effectiveness for predicting WEDM process outputs. The minimum value of Ra was (1.25 µm) in Table 10 at TON (10 µs), TOFF (40 µs) and SF (500 mm/min).

Table 10 Comparison of the training sets (predicted with measured Ra values) for the trained ANN model

Table 11 shows the results of Ra predicted values from testing the trained ANN model and the Ra values measured from experiments. The data set is consisting of six Ra values selected randomly from 27 Ra values measured during experiments, which were not used for training of the ANN model. It can be seen from Table 11 that the ANN model showed a good agreement between predicted and measured Ra values. From Table 11 we can see that the prediction error average for data set is found to be 1.864%, i.e., the accuracy is 98.136% and the MSE is 0.0018 consecutively.

Table 11 Comparison of the test sets (predicted with measured Ra values) for the trained ANN model

7 Conclusions

The objectives of this research are building ANN model to predict performance measures (Metal Removal Rate (MRR) and Surface Roughness (Ra)) for WEDM process for machining AISI 1045 steel, identifying the significance of the machining Parameters (Pulse On-time (TON), Pulse Off time (TOFF) and Servo feed (SF)) for the aforementioned performance measures, and selecting optimal machining parameters that give maximum MRR value and optimal machining parameters that give the minimum Ra value. Taguchi method (Design of Experiments), Artificial Neural Network (ANN), and Analysis of Variances (ANOVA) will be used in this research as a mythology to fulfill research objectives. As a result of the used approach, the developed ANN model was able to predict MRR and Ra values with high accuracy. This research reveals that the architecture (3-5-1) of the ANN model is the best architecture to predict the Ra and MRR with about 98.136% and 97.3% accuracy respectively.

The analysis showed that the increase in TON leads to increase MRR. This is due to the high energy generated during machining which leads to high spark then high melting rates of material. Also, the increase in SF leads to increase MRR because of the high energy generated during machining. Moreover, the analysis showed that high rates of MRR can be reached at low levels of TOFF, i.e. the increase in TOFF leads to decrease MRR except for some readings which lie out of its expected location because of some reasons like electricity shut down and wire breakage. The analysis conducted to study the effect of machining parameters on Ra’s value showed that the increase in TON leads to increase Ra. This is due to the high spark that generated at high values of TON which caused surface irregularities, also it can be seen that the values of Ra decreased with the increase of TOFF, and an increase in SF value will increase Ra’s value. Machining parameters’ contribution to the performance measures values identified from ANOVA results. It can be realized that TON is the most important cutting parameter affecting Ra by P % value 42.922% followed by TOFF with a P % value of 24.860%. SF was not a significant parameter for Ra because of Fα > F. From ANOVA, researchers can conclude as well that, for MRR, the most significant parameter is TON with P % value of (71.733%), i.e. about three times of the TOFF P % value (21.796%) and SF parameter has a small influence with P % value 3.02%. The analysis confirmed that the optimal conditions for maximum MRR were: TON at level-3 (25 µs), TOFF at level-1(20 µs), and SF at level-3 (700 mm/min). On the other hand, the optimal conditions for minimum Ra were: TON at first level (10 µs), TOFF at the third level (40 µs), and SF at first level (500 mm/min).

Practical and theoretical implications can result from this research. For the practical side, research outcomes can guide the practitioners to have an effective and efficient WEDM process for machining AISI 1045 steel. On the other hand, expanding knowledge of the WEDM process database and having a clearer understanding of the relationships between machining parameters and performance measures represent some of the theoretical implications. Future work may include optimization of the WEDM process for machining other types of materials or the same material but other sets of machining parameters and performance measures. Another research approach may be the optimization of the WEDM process for machining the same material but by using other optimization tools and compare the results to authenticate current research outcomes.