Keywords

1 Introduction

Electric discharge machining (EDM) is a widely used non-traditional method. The amount of material removed from the workpiece per unit of time is called the material removal rate (MRR). In contrast, the mass loss in the electrode material is referred to as electrode wear rate (EWR). In an EDM method, improvement is desired in terms of higher MRR, lower EWR, and better surface quality [1]. EWR is the most important factor in determining the number of electrodes required to achieve the correct size and dimensions of the desired form. When considering that electrodes are processed by wire erosion, turning, or milling machines, it is seen that EWR is the most significant factor affecting electrode costs. Therefore, studies on higher chip removal and lower electrode wear have gained importance in the EDM process in recent years.

EDM method has been applied in recent years with traditional methods and machine learning studies such as artificial neural networks (ANNs) and soft computing techniques such as fuzzy logic for predicting output performance parameters such as MRR and EWR based on optimum processing parameters such as discharge current, pulse duration, and voltage. In their study investigating the machinability of EDM, Ramaswamy et al. [2] performed a variance analysis to determine the significance of test parameters on experimental results. In the second phase of their study, researchers identified optimal process parameters and used regression analysis and ANNs to predict MRR and EWR. Similarly, Sarıkaya and Yılmaz [3] developed a mathematical model based on ANNs that successfully predicted outputs. In another study, Balasubramaniam et al. [4] used different electrode materials, such as copper, brass, and tungsten, for EDM of Al-SiCp metal matrix composites. MRR, EWR, and circularity (CIR) were considered as performance metrics in their study. As a result of using artificial intelligence to optimize processing parameters such as current, pulse duration, and flushing pressure, the most important parameter was shown to be current, and Cu exhibited the best performance among the three electrodes. In EDM, the effect of processing parameters such as peak current, pulse interval, and pulse duration are important for the variation in MRR and EWR. Ong et al. [5] developed a model based on the prediction of radial basis function neural networks to predict the MRR and EWR of the EDM process. The researchers used the moth flame optimization algorithm to determine the optimal processing parameters that maximize MRR and minimize EWR [5]. Cakir et al. [6] investigated the capacity of adaptive neuro-fuzzy inference systems, genetic expression programming, and ANNs in predicting EDM performance parameters using experimental data. Arunadevi and Prakash [7] used artificial intelligence to perform a performance analysis of experimental values with five input parameters to increase the MRR value and reduce surface roughness (SR) in their study. The model was evaluated using the R-squared value.

Machine learning techniques like electro-erosion wear have become increasingly popular in modeling and optimizing complex material processing processes. Several recent studies have examined the relationship between electro-erosion wear and machine learning. For example, Ulas et al. [8] used machine learning methods to estimate the surface roughness of Al7075 aluminum alloy processed with wire electrical discharge machining (WEDM) using different parameters, such as voltage, pulse-on-time, dielectric pressure, and wire feed rate. They employed LM, W-ELM, SVR, and Q-SVR models to process the samples and estimate the surface roughness values. Similarly, Jatti et al. [9] investigated the prediction of material removal rate (MRR) using machine learning algorithms, including supervised machine learning regression and classification-based approaches. They found that gap current, voltage, and pulse on time were the most significant parameters affecting MRR. They concluded that the Gradient boosting regression-based algorithm was the most effective for predicting MRR.

Meanwhile, Nahak and Gubta [10] reviewed the developments and challenges of EDM processes in 2019, emphasizing optimizing process parameters for effective and economical machining. Finally, Cetin et al. [11] experimentally investigated the effect of cryogenic treatment on the performance of CuCrZr alloy and Cu electrodes during EDM of AISI P20 tool steel. They found that pulse current was the most effective parameter in the EDM process and using cryogenically treated electrodes resulted in less wear and decreased surface roughness values.

These studies have demonstrated the successful use of machine learning techniques for modeling and optimizing the electro-erosion wear process. However, no studies have been found on the evaluation of the performance of cryogenically treated and untreated Cu and CuCrZr electrodes or the use of the artificial neural network (ANN) predictions for material removal rate (MRR) and electro-erosion wear ratio (EWR). This study aims to evaluate the performances of cryogenically treated and untreated CuCrZr and Cu electrodes during the electrical discharge machining (EDM) of AISI P20 tool steel in terms of EWR and MRR. By comparing the electrodes under different processing parameters and applying cryogenic treatment in 10 different time intervals ranging from 1/4 - 24 h, the study aims to contribute to the existing literature. The study utilizes decision trees, random forests, and k-nearest neighbor algorithms from machine learning techniques for regression analysis. The best algorithm is determined based on the results obtained, and comments are developed accordingly.

2 Material and Methods

2.1 Test Materials

In this experimental study, CuCrZr and Cu electrode pieces with a diameter of 10 × 30 mm were used as tool material. The values of the chemical compositions of CuCrZr and Cu electrodes are given in Table 1. To observe the effects of CT (Cryogenic Treatment), the electrodes were divided into 11 groups as treated and untreated electrodes. Cryogenically treated electrodes were treated at −140 ℃ for 15, 30 min, and 0, 0.25, 0.5, 1, 2, 4, 8, 12, 16, 20, 24 h and then tempered at 175 ℃ for 1 h. For this study, a total of 176 experiments were tested.

Table 1. Chemical composition and some properties of electrode materials (wt.%)
Fig. 1.
figure 1

AISI P20 and Electrode

AISI P20 tool steel, widely used in plastic injection molds, was chosen as the workpiece material of the experimental study. The diameter 14 × 20 mm AISI P20 material, tool electrode dimensions, and technical drawings drawn in 3D design programs are as in Fig. 1. Also, the chemical composition of AISI P20 tool steel is shown in Table 2.

Table 2. Chemical composition of AISI P20 steel (wt.%)

2.2 EDM Tests

EDM tests were performed at pulse currents of 4, 8, 12, and 16 A and pulse times of 25 µs and 50 µs. In addition, the King ZNC K3200 model EDM machine seen in Fig. 2 was used in the experimental studies. At each parameter change, other processing parameters were kept constant for all tests.

Fig. 2.
figure 2

EDM machine and control panel

Experimental conditions and parameters are given in Table 3. During the EDM tests, Petrofer dielectricum 358 mineral-based oil compatible with electro-erosion processing methods was used as the dielectric fluid. To obtain accurate values, EDM experiments were repeated three times for each combination of processing conditions, and the average values were considered the test result. EDM was performed for 20 min in each of the 176 experiments.

Table 3. Materials and EDM parameters AISI P20 tool steel

2.3 Experimental Conditions

EWR and MRR values for Cu and CuCrZr electrodes were calculated considering mass losses after an EDM process. To calculate the wear rates of the electrodes and the MRR of the workpieces, samples were weighed before (MBT - Mass Before Testing) and after (MAT - Mass After Testing) EDM using an analytical precision balance with a maximum capacity of 250 g and an accuracy of 0.0001 g. EWR and MRR were calculated using the following equation:

$$ EWR = \frac{(MBTelectrode - MATelectrode)}{T}\;\left( {{\rm{g}}/{\rm{min}}} \right){ } $$
(1)
$$ MRR = \frac{(MBTworkpiece - MATworkpiece)}{T}{ }\;\left( {{\rm{g}}/{\rm{min}}} \right) $$
(2)

In the above formulas (1) (2), T is the EDM process time. It was applied as T = 20 in the experiments.

The results were evaluated in the following headings according to the EWR and MRR values obtained with the experimental data according to the change of each parameter.

2.4 Machine Learning Algorithms

Decision trees from machine learning algorithms and random forest algorithms will be tried on the data set where data analysis is performed. Brief information about the algorithms can be given as follows:

Decision Trees: Decision trees are a graphical method often used in classification and regression from machine learning problems. The decision tree sets division rules by performing branching operations on the dataset to solve the classification problem. Each branch expresses a decision and has a class tag at the end. The most important advantage of decision trees is that they are easy to understand and visualize. It can also work with continuous or categorical data.

Random Forest: Popular machine learning algorithm Random Forest is a subset of ensemble learning. It is well renowned for its capacity to manage huge and high-dimensional datasets and is utilized for classification and regression issues. It builds numerous decision trees and then combines their outputs. This procedure, known as an ensemble, aids in decreasing overfitting and improving the model’s overall accuracy. The Random Forest algorithm’s ability to randomly choose a subset of features for each decision tree is the secret to its effectiveness. Random selection guarantees each tree’s uniqueness, lessening the association between the trees. The results from all the trees are combined to make the final projection. The Random Forest technique has established itself as a standard in many data science applications because it provides more durable and trustworthy models. The system also offers feature importance scores, which help determine which elements in the data are most crucial.

k-Nearest Neighbors: The non-parametric, instance-based k-Nearest Neighbors (k-NN) technique is used in machine learning. It is frequently employed for classification and regression issues and is particularly helpful when the data cannot be separated linearly. A fresh sample is compared to its k closest neighbors in the training data as part of the algorithm’s operation, and a prediction is then made based on the dominant class or average value of those neighbors. The k-NN algorithm’s simplicity and ease of use are its key benefits. It can handle continuous and categorical features and does not require any assumptions about how the data are distributed. However, the choice of k significantly impacts how well it performs, and it might be sensitive to noise or irrelevant elements in the data. Numerous methods, including feature scaling, feature selection, and distance metric selection, have been developed to solve these problems. The approach can also be computationally expensive for large datasets because it needs to calculate the distances between all samples at the time of prediction. Nevertheless, due to its ease of use and adaptability, k-NN continues to be a popular option for many real-world applications.

3 Experimental Results and Comparisons

The data set contains 176 experiments performed in the Sakarya University of Applied Sciences laboratory. The data set has variables such as the type of electrode material, cryogenic process conditions, ampere, and pulse. The output variables affected by the input variables are determined as electrode and workpiece wear. An example of the dataset is shared in Table 4.

Table 4. Sample data from experiments

The relationships between the variables will be examined using data visualization techniques to understand the data set better. The relationship between electrode and workpiece wear with the change of Cu and CuCrZr materials from the electrode materials is illustrated in Fig. 3. Accordingly, it should be noted that the Cu material has relatively higher wear than CuCrZr. In the case of using the Cu material, the average workpiece wear was 159.37, while the wear value was calculated as 149.93 with the use of CuCrZr material. Similarly, in electrode wear, the CuCrZr average was 16.79 while the CuCrZr was 16.15. Therefore, it has been observed that the effect of changing the material used on the workpiece is greater than electrode wear.

Fig. 3.
figure 3

Electrode and workpiece wear vs. electrode material

Graphs showing changes up to 24 levels are given in Fig. 4 (a-b-c-d) to examine the relationships between abrasions on both the workpiece and the electrode obtained by changing the cryogenic process conditions. Accordingly, there is no significant difference between the wear of the workpiece under different processing conditions. It should only be noted that under the process conditions taken as 12.0, CuCrZr causes significantly less workpiece wear than the Cu material. No significant differences were observed in other conditions. When the wear of the workpiece is examined, it is observed that the wear increases relatively with the increase in the cryogenic process conditions.

Fig. 4.
figure 4

Electrode and workpiece wear vs. cryogenic process control a and c) boxplots, b and d) scatter plots

Ampere values have a direct effect on wear. Increasing the ampere impacts both electrode material and workpiece wear. The correlation rate between the ampere and the electrode material wear is 0.94. Moreover, the correlation between the workpiece and the workpiece is 0.98. As the correlation coefficient shows, it has been observed that wear varies highly with ampere changes (see Fig. 5).

Fig. 5.
figure 5

Ampere vs. A) electrode wear and B) workpiece wear

Thanks to the correlation heat map, an impression of the direction and severity of the relationships between the variables can be obtained. In the heat map shown in Fig. 6, it was determined that there was a high correlation between the ampere variable and the abrasions. In addition, the correlations between the abrasions reach a value of 0.93.

Fig. 6.
figure 6

Correlation heatmap for variables

When a regression study is performed for a more detailed analysis of correlation relations, the relationship between abrasions according to wear types at p < 0.05 significance level and electrode material types used is revealed in Fig. 7. Accordingly, it can be said that the highest correlation is between the material Cu and the workpiece wear. At the same time, a very high correlation was obtained in the CuCrZr alloy. Only when the electrode material is CuCrZr can it be said that electrode wear is less affected as the amperage increases. The relationships revealed in regression analysis are shown in Fig. 7.

Fig. 7.
figure 7

Regression plots

Finally, this study examined the relationships between the number of strokes and abrasions. No significant changes were observed between the change in the number of strokes and the abrasions according to the ampere value (see Fig. 8). The increase in stroke time may cause a slight decrease in EWR and MRR.

Fig. 8.
figure 8

Pulse durations vs. A) electrode B) workpiece wears

The data set is divided into 80% training and 20% test set. Then, the one-hot encoding transformation was applied to the data set due to the categorical data type of input variables. This study applied the decision trees with high learning performance for both workpiece and electrode wear. The resulting performance values for the entire dataset are presented in Table 5. Accordingly, it has been shown that the decision trees model gives better results than other algorithms. Although decision trees and random forest algorithms give close results, the k-nearest neighbors algorithm performs poorer.

Table 5. Comparisons of machine learning algorithm performances

The regression plot of the test set for the wear on the electrode material is given in Fig. 9.

Fig. 9.
figure 9

Performance results for A) electrode wear test set, B) train set, C) workpiece wear test set, D) train set

4 Conclusions

The present experimental study has provided insights into the performance of cryogenically treated and untreated CuCrZr and Cu electrodes used in the EWR and MRR of AISI P20 tool steel. By comparing the performance of treated and untreated electrodes at different time intervals, we have shown that cryogenic treatment can improve the performance of CuCrZr electrodes in terms of EWR when the treatment time is less than 8 h. However, when the treatment time exceeds 8 h, the EWR performance of CuCrZr electrodes decreases significantly. On the other hand, the cryogenic treatment does not significantly impact the performance of Cu electrodes in terms of electrode wear.

Moreover, our findings have shown that changes in current values of 4, 8, 12, and 16 lead to a significant increase in EWR and MRR values for both types of electrodes. We have also demonstrated that decision trees, random forest, and k-nearest neighbors algorithms from machine learning techniques can be adapted for regression analysis, which can be useful for predicting the performance of electrodes in EDM processing. Overall, our study contributes to the literature on the use of cryogenic treatment and machine learning techniques for improving the performance of electrodes in EDM processing.