Strojniški vestnik - Journal of Mechanical Engineering 69(2023)9-10, 376-387 Received for review: 2023-03-01 © 2023 The Authors. CC BY 4.0 Int. Licensee: SV-JME Received revised form: 2023-05-09 DOI:10.5545/sv-jme.2023.561 Original Scientific Paper Accepted for publication: 2023-05-09 *Corr. Author’s Address: Faculty of Technical Sciences, Department for Production Engineering, University of Novi Sad, Trg D. Obradovića 6, 21000 Novi Sad, Serbia, rodicdr@uns.ac.rs 376 Fuzzy Logic Approach to Predict Surface Roughness in Powder Mixed Electric Discharge Machining of Titanium Alloy Rodić, D. – Gostimirović, M. – Sekulić, M. – Savković, B. – Aleksić, A. Dragan Rodić * – Marin Gostimirović – Milenko Sekulić – Borislav Savković – Andjelko Aleksić University of Novi Sad, Faculty of Technical Sciences, Serbia This study deals with fuzzy logic based modeling and parametric analysis in powder mixed electrical discharge machining of titanium alloys. The central composition plan was used to design the experiments considering four parameters, namely discharge current, pulse duration, duty cycle as well as graphite powder concentration. All experiments were performed with different parameter combinations and the performance, i.e., surface roughness, was evaluated. The adaptive neuro-fuzzy inference system was used to understand and define the input- output relationship. The experimental results and the model results were compared and it was found that the results accurately predicted the reactions in the erosion of titanium alloys. In addition, the model was verified using data that had not participated in the training of the model, with an error of about 10 %. In addition, a fuzzy plot was used to analyze the influence of input parameters on surface roughness. It was found that the discharge current was the most important influencing parameter. Additional experiments proved the positive effect of graphite powder, which reduced the surface roughness by 27 %. Keywords: ANFIS, discharge current, pulse duration, duty cycle, graphite powder Highlights • Design and development of powder mixed electrical discharge machining to reduce surface roughness. • Creation of fuzzy model for surface roughness prediction and analysis. • Verification of the fuzzy model based on a series of new experiments. • The influence of the input parameters on the surface roughness. 0 INTRODUCTION Electrical discharge machining (EDM) is an unconventional machining process widely used in the manufacturing industry. It is a material removal process that can be used to machine all electrically conductive materials, regardless of their physical and metallurgical properties [1]. However, the current application of EDM is limited due to its relatively low machining productivity and low surface quality. Possible technological improvements of EDM can be achieved by renewing existing processes. The addition of electrically conductive powder to the dielectric creates a modified material removal process known as powder mixed electrical discharge machining (PMEDM), which significantly affects the performance of the EDM process on difficult-to- machine materials. Conductive powder added to a liquid dielectric reduces the insulating properties of the dielectric and causes an increase in the gap distance between the tool and the workpiece. An increase in the gap distance means more efficient circulation of the dielectric, i.e. cleaning of the working space between the tool and the workpiece. In this way, EDM becomes more stable, which improves the technological characteristics of the process, such as increasing productivity and reducing surface roughness, and also leads to lower tool wear [2]. Fig. 1 shows a comparison between the classical EDM (Fig. 1a) and the modified PMEDM (Fig. 1b). Fig. 1. Comparison of a) classical EDM, and b) modified PMEDM Various types of electrically conductive powders can be mixed with dielectric, including aluminum, graphite, silicon, copper, silicon carbide and others [3] to [5]. In the study published by Mohri et al. [6], he mixed silicon powder with a grain size of 10 µm to 30 µm with a liquid dielectric. The processing was performed with low discharge currents (0.5 A to 1 A), short pulse duration (≤3 µs) and negative polarity of the tool. Analysis of the machining process showed a decrease in surface roughness to Ra ≤ 2 µm. Similarly, Narumiya et al. [7] used aluminum and graphite powders with a grain size of 15 μm and concentrations of 2 g/l to 15 g/l under certain machining conditions. Strojniški vestnik - Journal of Mechanical Engineering 69(2023)9-10, 376-387 377 Fuzzy Logic Approach to Predict Surface Roughness in Powder Mixed Electric Discharge Machining of Titanium Alloy Again, a decrease in surface roughness to below 2 µm was observed. By adding electrically conductive powder 4 g/l and liquid additive 4 g/l to the dielectric, Ming and Liu [8] positively influenced the technological properties of the process. There was a significant increase in machining productivity, a reduction in relative tool wear and surface roughness even up to Ra ≤ 1 µm. Wong et al. used powders of different electrical conductivity, such as graphite, silicon, aluminum, crushed glass, silicon carbide, and molybdenum sulfate, and studied their influence on surface roughness [9]. They concluded that the powders: graphite (grain size 40 µm) and silicon (grain size 45 µm) gave the best results in terms of surface roughness. It is interesting to mention the research presented by Kansal et al. [10]. Here, a classification of machining parameters is made: electrical (discharge current and voltage, pulse duration, pause time), non-electrical (type of cleaning of the working area, machining time), powder parameters (type, concentration, grain size) and tool parameters (material and cross section of the tool). Through the analysis of the experiment, it was found that the discharge current, the pulse duration, the pause time and the concentration of the powder in the dielectric have the greatest influence on the surface roughness in PMEDM. Accordingly, from the point of view of surface quality, parameters such as lower discharge current and shorter pulse duration are recommended. What types of powders can be used with liquid dielectric, what particle sizes, at what concentration, and what effect they have on the performance of the PMEDM process is still a question. In order to get an answer as close as possible, researches often resort to modeling the PMEDM process. Compared to classical EDM, the modeling of PMEDM also takes into account the parameters type, size and concentration of the powder in the dielectric, in addition to the influential input factors already mentioned. Adding another variable parameter, such as powder concentration, significantly complicates the EDM modeling process. The analysis of the change in surface roughness as a function of input parameters in PMEDM with chromium powder was processed by Ojha et al. [11]. The obtained results show that the discharge current and the concentration of the powder in the dielectric have the greatest influence on the surface roughness in carbon steel machining. A similar study, also on the machining of tool steels, was carried out by Batish et al. [12], in which a mathematical model was developed to determine the optimal PMEDM input parameters as a function of the specified objective functions. Through analysis, he found that discharge current, pulse duration, and powder concentration had the greatest influence on productivity, relative tool wear, and machining accuracy. Increasing the powder concentration in the dielectric improves EDM performance, but only up to a certain limit because a short circuit occurs. The conclusion is that the powder concentration should not be higher than 10 g/l. Using classical mathematical modeling, researchers obtained models based on which they analyzed and predicted the results. However, when exact mathematical information is not available, soft computing techniques are useful. They differ from conventional computing in that they tolerate imprecision, uncertainty, partial truth, approximation, and heuristics. Recently, soft computing techniques such as fuzzy logic [13], neural networks [14], and evolutionary algorithm [15] have been increasingly used in engineering and science because they provide a simple and understandable path to the final solution. Thanks to its logical mathematical concept, based on natural language and with a high tolerance to inaccurate data, fuzzy logic provides an easy way to concretize an appropriate solution. In addition to the possibility of predicting the results, fuzzy logic also offers the possibility of analyzing the results by means of their 3D diagrams, i.e. a set of all possible solutions. Therefore, various researchers have chosen the fuzzy logic method for modeling the EDM process. Shureka et al. [16] have made an attempt to find the effect of aluminum powder on the EDM of EN-19 alloy steel, using response surface modeling and application of fuzzy gray relational analysis. Kazi et al. [17] investigated a hybrid powder mixing EDM process in which several powder types are mixed. The process parameters considered are discharge current, pulse duration, and powder concentration. They used response surface methodology (RSM) and central composite design (CCD) for design of experiments and fuzzy algorithm for optimization of process parameters. Mala et al. [18] used a linear regression model and an adaptive neuro-fuzzy inference system (ANFIS) to predict outcomes such as production and surface roughness. Comparing these two methods, they concluded that more accurate prediction of outcomes was possible with an ANFIS- based model. Goyal et al. [19] studied the effect of adding nano-graphene powder in the dielectric on the surface roughness of nickel superalloys during EDM. They used a fuzzy logic and ANFIS model and obtained excellent prediction of surface roughness. Muthuramalingam et al. [20] studied the effect of EDM machining parameters on surface quality . They Strojniški vestnik - Journal of Mechanical Engineering 69(2023)9-10, 376-387 378 R o dić, D. – Go s timir o vić, M. – Sek ulić, M. – Sa vk o vić, B. – Aleksić, A . also used ANFIS to predict and analyze the results. A similar application of an intelligent system was done by Mohanty et al. [21] where they predicted output parameters such as surface roughness. Bhowmick et al. [22] used response surface methodology and fuzzy logic to predict machining performance in PMEDM. The obtained model was found to be efficient for predicting the responses. From the review of previous literature, it appears that several experimental works have been carried out on the PMEDM of titanium alloys using the ANFIS technique. However, there are very few studies on ANFIS modeling and prediction of surface roughness based on the variation of graphite powder concentration as an input parameter. Therefore, extensive research is needed to investigate the knowledge base of input parameters and their effects on machining performance such as surface roughness. For the above reasons, the main contribution of this research is to find complex relationships between the variable input parameters (discharge current, pulse duration, duty cycle, and graphite powder concentration) and the output performance (surface roughness) of titanium alloy PMEDM. Choosing the right parameters always leads to efficient machining. Since EDM is often used as a finishing process in practice, surface roughness is the most important response. The proposed study provides an answer to the question of which concentration of graphite powder has the greatest influence on surface roughness depending on certain input parameters. Besides the introduction, the rest of the paper is organized as follows. The second chapter describes the material and methods. Here, the general processing conditions, the method of adding powder to the dielectric, the experimental plan, and the ANFIS technique are described. A special feature in the second chapter is the pilot experiments, based on which the input parameters were systematized and their range was determined. Sections 3 and 4 describes the results, analysis, discussion, and comments on future work. Finally, conclusions are drawn in Section 5. 1 MATERIAL AND METHODS The experiments in this paper aimed to improve the machining performance of classical EDM. This is done by using methods such as PMEDM. All with the aim of improving machining performance such as surface roughness when machining titanium alloys. The flow chart used in this study to create the fuzzy model is shown in Fig. 2. Fig. 2. Flowchart of the research methodology In order to obtain a well-trained ANFIS model for surface roughness prediction, it was necessary to conduct the research in several steps. Based on the available literature, an analysis was performed and then the initial values of the input parameters were determined. Therefore, it was quite difficult to determine the ranges of input factors, especially the concentration of graphite powder. Due to the incoherence of the data in the literature, pilot experiments were conducted to define the range of input parameters more precisely. Accordingly, the values of the variable input parameters such as discharge current, pulse duration, and graphite powder concentration were determined. The experiments were then performed according to the CCD. The experimental points are divided into data for training and testing the ANFIS model. The way in which the data is divided is explained in section 3. After the smallest model error was determined, the model was verified with new data. After the verification of the model, the analysis of the influence of the input parameters on the surface roughness follows. 1.1 General Conditions A die-sinking EDM machine with a solid electrode from Agie Charmille called SP1-U was used for the material processing. The machine is equipped with a direct surrent (DC) pulse generator with an apparent power of 10 kV A, which generates a maximum discharge current of 50 A. Ilocut EDM 180 dielectric manufactured by Castrol was used for the experimental studies. Asbury PM19 graphite powder was used for machining titanium alloys by PMEDM. This powder was selected for its high electrical conductivity, which, when mixed with the dielectric, increases the working Strojniški vestnik - Journal of Mechanical Engineering 69(2023)9-10, 376-387 379 Fuzzy Logic Approach to Predict Surface Roughness in Powder Mixed Electric Discharge Machining of Titanium Alloy gap and washes out the working space. The purity of this graphite powder is 95.5 %, while the grain size is 19 µm (granulation). The surfactant Tween 20 C 58 H 114 O 26 is a clear liquid with high density. The rule of the surfactant is to prevent shrinkage or clumping of the graphite powder particles to ensure a homogeneous mixture of powder and dielectric. The titanium alloy TiAl 6 V 4 was selected as a difficult-to-machine material. The selected titanium alloy due to its exceptional characteristics, such as high temperature and corrosion resistance, has found application in the aviation industry, biomedicine and many other branches of technology. A Toyo Tanso TTK50 graphite tool was used for the PMEDM of the titanium alloy. The surface roughness measurements were performed using the MarSurf PS1 instrument from Mahr Metrology. The selected reference gauge length, i.e. the movement of the probe on the measuring surface, is 5.6 mm. 1.2 Powder Mixed Electrical Discharge Machining For the needs of PMEDM, a tank with elements for fixing and positioning the closed workpiece was designed and manufactured, Fig. 3. In this way, the electroerosive machine is prevented from being contaminated with graphite powder, minimizing costs. The dimensions of the tank are 330 mm × 330 mm × 330 mm, with a capacity of 20 liters. With such an adapted system, it is necessary to ensure the correct distribution of the powder as well as the cleaning of the working area. Fig. 3. Powder mixed electrical discharge machining 1.3 Pilot Experiments Before planning experimental tests, it is necessary to determine the range of variation of appropriate input parameters for machining, as well as other factors whose values are constant during the test. Based on available literature sources and preliminary experimental studies, suitable conditions for PMEDM of TiAl 6 V 4 were determined. The magnitude of the discharge current is limited by the dimensions of the electrode's frontal surface, i.e., the current density. According to the recommendation of the electrode manufacturer Toyo Tanso and literature sources, the maximum current density for graphite TTK50 in rough machining is in the range of 10 A/cm 2 to 20 A/cm 2 , depending on the type of paired materials [1] and [23]. In order to determine the upper limit of the discharge current, an experiment was performed with a current of 9.5 A. The surface of the workpiece was damaged and of very poor quality. Therefore, in this experimental study, the discharge current in the range of 1.5 A to 7.5 A was used when eroding titanium alloys without mixing graphite powder with the dielectric. According to studies [23] and [24] the upper limit of pulse duration for machining titanium alloys is 200 µs to 500 µs. Therefore, in order to determine the range of pulse duration, preliminary experimental tests were performed for two discharge current values of 3.2 A and 7.5 A, varying the pulse duration. As can be seen from Fig. 4, the discharge current and pulse duration should be as small as possible to achieve a smaller value of surface roughness. Fig. 4. Influence pulse duration and discharge current on surface roughness According to the available literature data, a value of the impulse action coefficient higher than 50 % affects the integrity of the treated titanium alloy surface [25] to [27]. Strojniški vestnik - Journal of Mechanical Engineering 69(2023)9-10, 376-387 380 R o dić, D. – Go s timir o vić, M. – Sek ulić, M. – Sa vk o vić, B. – Aleksić, A . In this context, for the electroerosive machining in dielectric with mixed TiAl 6 V 4 powder, the impulse action coefficient was varied within the limits of 30 % to 70 % in this study. It is known that when EDM steel and other metallic materials, the positive polarity of the tool is usually used, but this is not the case when machining titanium alloys. The reasons for this can be found in the results of individual investigations. The authors Klocke et al. [2] conducted a comparative study of the influence of tool polarity on machining productivity when processing steel and titanium alloys. In their experiments, the negative polarity of the tool was used in PMEDM of titanium alloy. A review of the literature revealed that the concentration of graphite powder usually ranges from 0 g/l to 20 g/l for different paired materials of the tool and the workpiece [12] and [28]. In order to determine the upper limit of graphite powder concentration, experiments with a powder concentration of 20 g/l were conducted in this study. A review of the literature revealed that the graphite powder concentration is usually between 0 g/l and 20 g/l for different paired materials of the tool and the workpiece. In order to determine the upper limit of graphite powder concentration, experiments were conducted in this study with a powder concentration of 20 g/l. This resulted in damage to the surface of the workpiece, Fig. 5. In this context, for the PMEDM of TiAl6V4 in this investigation, the powder concentration was varied in the range of 0 g/l to 15 g/l. Fig. 5. Surface damage due to high concentration of graphite powder 1.4 Systematized Selected Parameters The parameters affecting the performance of EDM of titanium alloys can be divided into two groups: electrical pulse parameters and non-electrical process parameters. The systematized conditions for machining titanium alloys are listed in Tables 1 and 2. The experiments used a dielectric side wash with a flow rate of 20 l/min through a nozzle with a diameter of 4 mm and another nozzle with a cross section of 2 mm × 8 mm. The tool lift-off time was 2 seconds, and this was done at a distance of 1.5 mm. The erosion time for each test point was 60 minutes. Table 1. Electric parameters during PMEDM TiAl6V4 Electric parameters Symbol Value Discharge current [A] I e 1.5 to 7.5 Pulse duration [µs] t i 24 to 240 Pause time[µs] t o 24 to 240 No load voltage [V] U 0 100 Discharge voltage [V] U e 60 Polarity [-] Pol (–) Duty cycle [%] τ 30 to 70 Table 2. Non electric parameters during PMEDM TiAl6V4PMEDM TiAl6V4 Non electric parameters Symbol Value Flow [l/min] Q 20 Tool lift [mm] UP 1.5 Time lift [s] DN 2 Graphite powder [g/l] GR 0 to 12 Surfacant [g/l] SR 10 1.5 Central Composite Plan There are a large number of design factors to consider as part of the PMEDM process. Among the most important steps is identifying the factors to be included in the study and determining their levels. The surface roughness is affected by several process parameters that can be varied in a variety of ways. The selection of variable and constant input parameters, as shown in Tables 1 and 2, is based on handbook values, literature research, and preliminary tests. Since the main objective of the research is to minimize the surface roughness, the discharge current, pulse duration, pause time (duty cycle calculation) and graphite concentration were selected as variable parameters. The first two parameters directly affect the discharge energy, with an increase in which the surface roughness also increases. The pause time is expressed by the duty cycle. It is a very important parameter, because with the addition of graphite powder, the time for the generation of the electric discharge changes. The limits for the selected parameters are defined in Section 2.3 and presented in Table 1. Based on the selected parameters and the degree of variation, a spherical central composition plan was constructed, where for the case of four factors | α| = 2, Table 3. Strojniški vestnik - Journal of Mechanical Engineering 69(2023)9-10, 376-387 381 Fuzzy Logic Approach to Predict Surface Roughness in Powder Mixed Electric Discharge Machining of Titanium Alloy 1.6 Adaptive Neuro Fuzzy Inference System ANFIS is the most widely used combination of an artificial neural network and a fuzzy inference system. For a simpler description of the adaptive network with fuzzy logic, a network with two inputs x, y and one output z is considered. The variables x, y are input fuzzy variables, where the first input is determined by n and the second by m membership functions. The rule base contains k-fuzzy IF-THEN Sugeno-type rules: Rule 1 = IF x is A 1 and y is B 1 THEN f 1 = p 1 ·x+q 2 ·y+r 1 , Rule k = IF x is A k and y is B k THEN f k = p k ·x+q k ·y+r k , where A 1 to A k and B 1 to B k are membership functions of the individual inputs x, y of the causal part, while p k , q k , r k are linear parameters of the consequent part. According to Fig. 6 the architecture of the adaptive network consists of five layers, where each layer consists of nodes. There are two types of nodes: square (adaptive parameters) and circular (non- adaptive parameters, fixed). Fig. 6. Adaptive neuro-fuzzy inference system Layer 1. The adjustable parameters of each node of the first layer contain a function of the following Eq. (1): Ox Oy iA ii Bi 11      ,, (1) where x and/or y are the inputs to each node, while A i is the linguistic label of the observed function of the node. The quantity is membershio function of A i and indicates the degree to which the input quantity x satisfies the quantifier A i . Functions such as trapezoidal, triangular, Gaussian, etc. are also used. Most commonly, is assumed to be a bell-shaped function where the maximum of the function is equal to 1 and the minimum of the function is equal to 0. The bell function is represented by the Eq. (2). Ox xc a Ox x iA i b iA i 1 1 1 2 1 1 1 1 1                          , exp or c c a b 1 1 2 1                 , (2) where a i , b i , c i are parameters that define the shape of the function. The number of nodes in this layer is determined by the number of input variables. This layer defines the parameters of the conditional part of the IF-THEN rule. Layer 2. A layer consisting of fixed nodes. The task of this circular node, denoted Π, is to multiply the input signals and pass the product to the output. The number of circular nodes is equal to the number of rules. An example of multiplication is shown in Eq. (3). Ow xy i ii Ai Bi 2 12       ,, , (3) where w i output from layer 2. The third layer also consists of circular layers and is labeled N. The output of this node represents the normalized intensity of execution of each rule, calculated as the ratio of the intensity of the i th rule to the sum of the intensities of all rules, Eq. (4). Ow w w i ii i i k j 3 1 12     ,, , (4) where wi is output from layer 3. Layer 4. Each quadratic node of this plane is represented by an Eq. 5. Ow fw pxqyri ii ii ii i 4 1      ,, (5) where p i , q i , r i represent adjustable parameters of the consequent part of the rule. Moreover, the number of nodes of this layer is equal to the number of rules. Layer 5. This plane forms a circular node marked Σ. The task of this node is to summarize all signals coming from the fourth layer. The output of the fifth layer describes the final output of the adaptive network and is expressed by Eq. (6). Qf xy wf wf wf wf w ii i ii ii ii i ii 5 12       , .    (6) Strojniški vestnik - Journal of Mechanical Engineering 69(2023)9-10, 376-387 382 R o dić, D. – Go s timir o vić, M. – Sek ulić, M. – Sa vk o vić, B. – Aleksić, A . 2 RESULTS To obtain an appropriate intelligent model of the output performance of the PMEDM process for titanium alloys, an adaptive neuro fuzzy system was used. In the ANFIS model, the membership function parameters are automatically adjusted using an adaptive network based on a set of input/output data. Based on the central composition diagram – CCD, experimental data were used to build the ANFIS model. The central experimental points (25 points to 30 points, total 6 points) were taken as an average. Accordingly, a total of 25 experimental points were used to build the ANFIS model. Table 3. Central composite plan Factor R a [µm] No. I e [A] t i [µs] τ [%] GR [g/l] Exp. ANFIS 1. 3.2 75 40 3 3.81 3.81 2. 6 75 40 3 8.15 8.15 3. 3.2 180 40 3 4.16 4.16 4. 6 180 40 3 11.78 11.78 5. 3.2 75 60 3 3.95 3.95 6. 6 75 60 3 8.52 8.52 7. 3.2 180 60 3 4.25 4.25 8. 6 180 60 3 11.95 11.95 9. 3.2 75 40 9 3.98 3.98 10. 6 75 40 9 7.81 7.81 11. 3.2 180 40 9 4.01 4.01 12. 6 180 40 9 11.65 11.65 13. 3.2 75 60 9 4.12 4.12 14. 6 75 60 9 7.85 7.85 15. 3.2 180 60 9 4.23 4.23 16. 6 180 60 9 8.63 8.63 17. 1.5 130 50 6 1.95 1.95 18. 7.5 130 50 6 12.56 12.56 19. 4.5 24 50 6 5.25 5.25 20. 4.5 240 50 6 7.32 7.32 21. 4.5 130 30 6 6.52 6.52 22. 4.5 130 70 6 6.85 6.85 23. 4.5 130 50 0 8.52 8.52 24. 4.5 130 50 12 6.25 6.25 25. 4.5 130 50 6 7.01 6.23 26. 4.5 130 50 6 6.85 6.23 27. 4.5 130 50 6 5.96 6.23 28. 4.5 130 50 6 6.23 6.23 29. 4.5 130 50 6 6.42 6.23 30. 4.5 130 50 6 6.59 6.23 Average error [%] 1.11 A very important step is to determine the number of input and output data. According to the recommendations for the successful creation of ANFIS models, 70 % to 80% of the total data is used for training the network, while 10 % to 15 % is used for testing and 10 % to 15 % for verification [29] and [30]. Therefore, the experimental data generated in this study are divided into three groups: 22 data for training, 3 data for testing, and 3 data for validating the ANFIS model. The next step in modeling the ANFIS model is to create a fuzzy inference system in which the number and type of membership functions are defined for each input variable: discharge current, pulse duration, duty cycle and graphite powder concentration. Three bell-type membership functions were selected for each input variable in the construction of a model to determine the arithmetic mean surface roughness. For model, the number of membership functions of the input variables is defined to be three, so the defined number of rules for model is 3 4 = 81. After the generation of the fuzzy inference system, the training process follows using an adaptive network. A hybrid optimization method was chosen in which after 100 epochs the shape of the membership functions changes compared to the initial state until the mean squared error (MSE) is reduced to a minimum. The MSE represents the first type of error that is analyzed during model development. This error is defined by Eq. (7). MSE n EV PV i n ii     1 1 2 . (7) According to the previous equation, n represents the number of the measured points, EV is the experimental data and PV is the predicted data. The mean square error (MSE) value of 2.293·10 –5 was achieved. Since the obtained training error values are satisfactory, we proceed to testing the obtained model. The mean square error obtained when testing the model to determine R a was 0.4509. The described approach to ANFIS system modeling implies an independent choice of the number of membership functions associated with each input and the number of epochs to train the fuzzy system. These model properties are determined based on the intuition and experience of the model builder. Before defining the final ANFIS model to determine the performance of the EDM process, models with different types of membership functions were tested. Models with a bell-shaped membership function at the inputs showed the best results. The number of membership functions of each input had the greatest impact on the accuracy of all Strojniški vestnik - Journal of Mechanical Engineering 69(2023)9-10, 376-387 383 Fuzzy Logic Approach to Predict Surface Roughness in Powder Mixed Electric Discharge Machining of Titanium Alloy variables. If it is 0, it means that there is no correlation, and if it is 1, the correlation is excellent. Finally, the Bland-Altman method was used as the third statistical element to compare the model results. At Fig. 8, the number of trials are presented on horizontal axis while difference between actual and predicted values represented on vertical axis. The variation between actual and model values of surface roughness is within +0.64 to –0.52 relative to the media line. It can be concluded that the results of the Bland-Altman method agree well with the MAE and MSE error values. Fig. 8. Bland–Altman plo t f o r ANFIS mo del o f sur face r o ughness The mentioned methods are used for statistical evaluation of the model during its creation. However, to establish how the model behaves in real systems, it is necessary to perform validation with unknown data. The accuracy of the obtained model was verified by four other experiments that were not involved in the model generation. The presentation of the results of the confirmation test to verify the accuracy of the obtained model is given in Table 4. Based on MAE, the prediction error of the model in the real system is about 10 %. Table 4. Verification data No. Factor Ra [µm] I e [A] t i [µs] τ [%] GR [g/l] Exp. ANFIS 1. 3.2 130 50 0 4.97 5.79 2. 3.2 180 50 0 5.84 4.91 3. 3.2 180 30 6 4.45 4.25 4. 6 32 70 6 7.12 6.77 Average error [%] 10.46 3 DISCUSSION An intelligent model of the observed output of PMEDM titanium alloy was built using the ANFIS based on the CCD plan. The prediction accuracy of models. Acceptable errors were achieved with three membership functions per input. As the number of membership functions increases beyond three, the accuracy of the model increases with an exponential increase in training time. The number of model training epochs is initially set to 500. It is noticeable that after 150 epochs the mean squared error of the model does not change. Increasing the number of epochs further will produce negligible or no effects. These facts are also confirmed in the literature [31]. Besides MSE, the quantitative possibility of prediction is evaluated in terms of the percentage deviation between the obtained and expected values for R a , in other words, via the mean absolute error MAE, Eq. (8). MAE n EV PV i n ii     1 100 1 . (8) Based on the calculation of the above error for each point of the experiment, the average error of the observed model was calculated. From Table 3, it can be concluded that the ANFIS model has a satisfactory average error, that is, it has a good ability to predict the results. For the statistical analysis of the obtained model, in addition to MSE and MAE, the comparison of experimental and model values via a linear fit can be considered. Assuming one-to-one or 100 % accuracy, the predictive ability of the model is evaluated by the coefficient of determination (R 2 ). The one-to-one plot of the actual and predicted values assumed by the ANFIS model for the main surface roughness was shown in Fig. 7. Fig. 7. One-to-one diagram actual and predicted values of surface roughness The linear fit line, equation and R 2 are also shown in this figure. Willmott defined an index of agreement (R 2 ) used to measure the degree of linearity of two Strojniški vestnik - Journal of Mechanical Engineering 69(2023)9-10, 376-387 384 R o dić, D. – Go s timir o vić, M. – Sek ulić, M. – Sa vk o vić, B. – Aleksić, A . the model is first tested using three data sets: training, test and verification data. According to the literature, the ratio of these data is approximately 70/15/15, i.e., out of 100 % of the total data, 70 % is used for training and 15 % is used for testing and verification of the model [32]. The error of the model after the training and testing data was 1.11 %, which was expected since the model was trained with these data. However, in the verification experiments, the average error of the obtained model is 10.46 %. According to previous studies, the model is considered predictive when the average error is about 10 % [33] and [34]. In order to increase the reliability of the obtained models, a larger number of data must be used to build the model. In addition to predicting the results, the obtained ANFIS model can also be used for analysis through 3D diagrams. Fig. 9 shows the dependence of surface roughness on discharge current and pulse duration. Fig. 9. Effect of discharge current and pulse duration on surface roughness It can be clearly seen that the surface roughness increases with the increase of the discharge current. This is explained by the fact that the current is directly related to the discharge energy. The higher the discharge energy in the machining zone, the more heat is generated, which causes a greater effect of vaporisation and melting of the workpiece material. In other words, the craters on the surface of the workpiece are larger. These results have also been confirmed in other studies on PMEDM of titanium alloys [35]. Therefore, the pulse duration is also related to the discharge energy. However, Fig. 7 shows a much lower dependence than that of the discharge current. This can be explained by the fact that the pulse duration was limited to a maximum of 250 µs at the beginning of the design of the experiment and therefore did not show any major effects. Besides to the discharge current, Fig. 10 also shows the influence of the graphite powder concentration on the surface roughness, based on ANFIS model. Fig. 10. Effect of discharge current and concentration graphite powder on surface roughness The addition of graphite powder up to a certain limit has a positive effect on the quality of the surface. It can be seen that above 6 g/l, this positive influence decrease at a discharge current of 1.5 A. Similar conclusions that the concentration increases depending on the processing conditions up to a certain limit have also been drawn by other researchers [12] and [36]. When processing titanium alloys, it is recommended to keep the duty cycle at 50 %. The reason for this is to allow sufficient time for flushing the machining zone. A significant influence of the duty cycle can be expected for values of the pulse duration higher than 200 µs, since a higher discharge energy occurs. A higher discharge energy has a detrimental effect on the surface integrity of the machined titanium alloy if the pause time is too short (calculated in τ > 90 %), which is reflected in [37] and [38]. In order to examine the influence of input factors on surface roughness, the main effects diagram was applied. Therefore, the greatest impact of discharge current is clearly seen, followed by graphite powder concentration, pulse duration and duty factor, Fig. 11. Table 5. Additional tests No. Factor Exp. I e [A] t i [µs] τ [%] GR [g/l] R a [µm] 1. 4.5 50 50 0 8.52 2. 4.5 50 50 6 7.01 3. 4.5 50 50 12 6.25 To more accurately determine the effects of adding graphite powder, additional tests were performed under the conditions listed in Table 5. An Strojniški vestnik - Journal of Mechanical Engineering 69(2023)9-10, 376-387 385 Fuzzy Logic Approach to Predict Surface Roughness in Powder Mixed Electric Discharge Machining of Titanium Alloy example was taken for the discharge current of 4.5 A, as this showed the greatest effect of the addition of graphite powder. Fig. 12 clearly shows the positive effects of the addition of graphite on the surface quality. No significant decrease in the surface roughness was observed for the other values of the discharge current. The analysis of the results proved that the process of electric discharge machining in the dielectric with mixed powder achieves more favorable output performance compared to the classical EDM of titanium alloys. The influence of graphite powder concentration was most pronounced at a discharge current of 4.5 A, where the percentage reduction in surface roughness was about 27 %. Fig. 12. Influence concentration of graphite powder on surface roughness Through the research of this paper, some questions of new scientific knowledge were raised, which are given as directions for further development. The first is an investigation of the PMEDM process for titanium alloys considering a larger number and wider intervals of input factors, as well as investigations for different erosion depths. And secondly, the influence of graphite powder granulation can be one of the input factors that could affect the output performance of EDM of advanced engineering materials. In addition to granulation, the grain shape of graphite powder may also be an important factor. Since the cross-section of the tool has a great influence on the machining quality, it is necessary to investigate up to which cross-section the use of the PMEDM method is reasonable from the point of view of efficient washing of the machining zone. Improvement of mathematical modeling by applying new or improved methods, e.g. integration of fuzzy logic and genetic algorithms, neural networks and regression analysis, etc. Additional analysis of the efficiency of experimental designs used to build a classical or intelligent model. For example, the application of the central composition or Box-Behnken plan for training the intelligent model. 4 CONCLUSIONS This paper presents the results of an experimental investigation carried out with the aim of modeling the process PMEDM of titanium alloy. Preliminary experiments were first carried out in order to determine more precisely the limits of the input parameters. Based on the input parameters of discharge current, pulse duration, duty cycle, and graphite powder concentration, experiments were conducted according to the central composition plan. Then, the modeling of the surface roughness was started using the ANFIS. Based on statistical analsys results show that the MSE is 2.293·10 -5 for the training data and 0.4509 for the test data. MAE was also used to evaluate the model, the percentage error of the model for the training and test data was 1.11 Fig. 11. Main effect plot for surface roughness Strojniški vestnik - Journal of Mechanical Engineering 69(2023)9-10, 376-387 386 R o dić, D. – Go s timir o vić, M. – Sek ulić, M. – Sa vk o vić, B. – Aleksić, A . %. In addition, the statistical analysis of the model was performed using the coefficient of determination, which is 0.9946. The Bland-Altman method also has good agreement with the error values MAE and MSE. As a final check, the accuracy of the model was verified using four additional experiments that were not involved in model generation and for which MAE was approximately 10 %. It was concluded that the discharge current had the greatest influence on the surface roughness. The powder concentration showed the greatest influence at a discharge current of 4.5 A, at which the surface roughness decreased by 27 %. Future research would include a wider range of input factors as well as other powder types with different grains, shapes, etc. In particular, it is necessary to analyze which experimental design is most suitable for training intelligent models, the amount of data and the like. 5 NOMENCLATURES I e discharge current, [A] ti pulse duration, [µs] τ duty cycle, [%] GR graphite powder concentration, [g/l] MSE mean squared error MAE mean absolute error, [%] R 2 coefficient of determination. 6 ACKNOWLEDGEMENTS This paper has been supported by the Provincial Secretariat for Higher Education and Scientific Research through the project no. 142-451-1772/2022- 01/01: “Research on the innovative process of electrical discharge machining of titanium alloy”. 7 REFERENCES [1] Gostimirovic, M., Kovac, P., Sekulic, M., Skoric, B. (2012). Influence of discharge energy on machining characteristics in EDM. Journal of Mechanical Science and Technology, vol. 26, p. 173-179, DOI:10.1007/s12206-011-0922-x. [2] Klocke, F., Lung, D., Antonoglou, G., Thomaidis, D. (2004). The effects of powder suspended dielectrics on the thermal influenced zone by electrodischarge machining with small discharge energies. Journal of Materials Processing Technology, vol. 149, no. 1-3, p. 191-197, DOI:10.1016/j. jmatprotec.2003.10.036. [3] Patel, S., Thesiya, D., Rajurkar, A. (2018). Aluminium powder mixed rotary electric discharge machining (PMEDM) on Inconel 718. Australian Journal of Mechanical Engineering, vol. 16, no. 1, p. 21-30, DOI:10.1080/14484846.2017.1294230. [4] Luzia, C.A.O., Laurindo, C.A.H., Soares, P.C., Torres, R.D., Mendes, L.A., Amorim, F.L. (2019). Recast layer mechanical properties of tool steel after electrical discharge machining with silicon powder in the dielectric. The International Journal of Advanced Manufacturing Technology, vol. 103, p. 15-28, DOI:10.1007/s00170-019-03549-w. [5] Unses, E., Cogun, C. (2015). Improvement of electric discharge machining (EDM) performance of ti-6al-4v alloy with added graphite powder to dielectric. S tr o jniški v es tnik - Jo urnal of Mechanical Engineering, vol. 61, no. 6, p. 409-418, DOI:10.5545/sv-jme.2015.2460. [6] Mohri, N., Tsukamoto, J., Fujino, M. (1988). Surface modification by EDM - an innovation in edm with semi- conductive electrodes. Proceedings of Winter Annual Meeting ASME, vol. 34, p. 21-30. [7] Narumiya, H., Mohri, N., Saito, N., Otake, H., Tsnekawa, Y., Takawashi, T., Kobayashi, K. (1989). EDM by powder suspended working fluid. Proceedings of 9 th ISEM, p. 5-8. [8] Ming, Q.Y., Liu, Y.H. (1995). Powder-suspension dielectric fluid for EDM. Journal of Materials Processing Technology, vol. 52, no. 1, p. 44-54, DOI:10.1016/0924-0136(94)01442-4. [9] Wong, Y.S., Lim, L.C., Rahuman, I., Tee, W.M. (1998). Near- mirror-finish phenomenon in edm using powder-mixed dielectric. Journal of Materials Processing Technology, vol. 79, no. 1-3, p. 30-40, DOI:10.1016/S0924-0136(97)00450-0. [10] Kansal, H.K., Singh, S., Kumar, P. (2005). Parametric optimization of powder mixed electrical discharge machining by response surface methodology. Journal of Materials Processing Technology, vol. 169, no. 3, p. 427-436, DOI:10.1016/j.jmatprotec.2005.03.028. [11] Ojha, K., Garg, R.K., Singh, K.K. (2013). Effect of chromium powder suspended dielectric on surface roughness in PMEDM process. Tribology - Materials, Surfaces & Interfaces, vol. 5, no. 4, p. 165-171, DOI:10.1179/1751584X11Y.0000000021. [12] Batish, A., Bhattacharya, A., Kumar, N. (2014). Powder mixed dielectric: An approach for improved process performance in EDM. Particulate Science and Technology, vol. 33, no. 2, p. 150-158, DOI:10.1080/02726351.2014.947659. [13] Rodic, D., Gostimirovic, M., Madic, M., Sekulic, M., Aleksic, A. (2020). Fuzzy model-based optimal energy control during the electrical discharge machining. Neural Computing and Applications, vol. 32, p. 17011-17026, DOI:10.1007/s00521- 020-04909-4. [14] Okewu, E., Adewole, P., Misra, S., Maskeliunas, R., Damasevicius, R. (2021). Artificial neural networks for educational data mining in higher education: A systematic literature review. Applied Artificial Intelligence, vol. 35, no. 13, p. 983-1021, DOI:10.1080/08839514.2021.1922847. [15] Madić, M., Gostimirović, M., Rodić, D., Radovanović, M., Coteaţă, M. (2022). Mathematical modelling of the CO2 laser cutting process using genetic programming. Facta Universitatis, Series: Mechanical Engineering, vol. 20, no. 3, p. 665-676, DOI:10.22190/FUME210810003M. [16] Surekha, B., Sree Lakshmi, T., Jena, H., Samal, P. (2021). Response surface modelling and application of fuzzy grey relational analysis to optimise the multi response characteristics of en-19 machined using powder mixed edm. Strojniški vestnik - Journal of Mechanical Engineering 69(2023)9-10, 376-387 387 Fuzzy Logic Approach to Predict Surface Roughness in Powder Mixed Electric Discharge Machining of Titanium Alloy Australian Journal of Mechanical Engineering, vol. 19, no. 1, p. 19-29, DOI:10.1080/14484846.2018.1564527. [17] Kazi, F., Waghmare, C., Sohani, M. (2021). Multi-objective optimization of machining parameters in hybrid powder- mixed edm process by response surface methodology and normalized fuzzy logic algorithm. International Journal on Interactive Design and Manufacturing, vol. 15, p. 695-706, DOI:10.1007/s12008-021-00788-8. [18] Mala, D., Senthilkumar, N., Deepanraj, B., Tamizharasan, T. (2020). Green Mat erials and A dv anced Manufacturing Technology, CRC Press, London, p. 75-94, DOI:10.1201/9781003056546. [19] Goyal, A., Sharma, D., Bhowmick, A., Pathak, V.K. (2022). Experimental investigation for minimizing circularity and surface roughness under nano graphene mixed dielectric edm exercising fuzzy-anfis approach. International Journal on Interactive Design and Manufacturing, vol. 16, no. 3, p. 1135- 1154, DOI:10.1007/s12008-021-00826-5. [20] Muthuramalingam, T., Saravanakumar, D., Babu, L.G., Huu Phan, N., Pi, V.N. (2020). Experimental investigation of white layer thickness on edm processed silicon steel using ANFIS approach. Silicon, vol. 12, p. 1905-1911, DOI:10.1007/ s12633-019-00287-2. [21] Mohanty, P.P., Mohapatra, D., Mohanty, A., Nayak, S. (2020). ANFIS-based modeling for prediction of surface roughness in powder mixed electric discharge machining. Computational Intelligence in Data Mining: Proceedings of the International Conference on ICCIDM 2018, p. 151-159, DOI:10.1007/978- 981-13-8676-3_14. [22] Bhowmick, S., Mondal, R., Sarkar, S., Biswas, N., De, J., Majumdar, G. (2023). Parametric optimization and prediction of MRR and surface roughness of titanium mixed EDM for Inconel 718 using RSM and fuzzy logic. CIRP Journal of Manufacturing Science and Technology, vol. 40, p. 10-28, DOI:10.1016/j.cirpj.2022.11.002. [23] Hasçalık, A., Çaydaş, U. (2007). Electrical discharge machining of titanium alloy (Ti-6Al-4V). Applied Surface Science, vol. 253, no. 22, p. 9007-9016, DOI:10.1016/j.apsusc.2007.05.031. [24] Lin, Y.C., Yan, B.H., Chang, Y.S. (2000). Machining characteristics of titanium alloy (Ti-6Al-4V) using a combination process of EDM with USM. Journal of Materials Processing Technology, vol. 104, no. 3, p. 171-177, DOI:10.1016/S0924- 0136(00)00539-2. [25] Kao, J., Tsao, C., Wang, S., Hsu, C. (2010). Optimization of the EDM parameters on machining Ti-6Al-4V with multiple quality characteristics. The International Journal of Advanced Manufacturing Technology, vol. 47, no. 1-4, p. 395-402, DOI:10.1007/s00170-009-2208-3. [26] Jabbaripour, B., Sadeghi, M., Faridvand, S., Shabgard, M. (2012). Investigating the effects of EDM parameters on surface integrity, MRR and TWR in machining of Ti-6Al-4V. Machining Science and Technology, vol. 16, no. 3, p. 419-444, DOI:10.1080/10910344.2012.698971. [27] Klocke, F., Holsten, M., Hensgen, L., Klink, A. (2014). Experimental investigations on sinking-EDM of seal slots in gamma-TiAl. Procedia CIRP, vol. 24, p. 92-96, DOI:10.1016/j. procir.2014.07.143. [28] Kolli, M., Kumar, A. (2015). Effect of dielectric fluid with surfactant and graphite powder on electrical discharge machining of titanium alloy using Taguchi method. Engineering Science and Technology, an International Journal, vol. 18, no. 4, p. 524-535, DOI:10.1016/j.jestch.2015.03.009. [29] Sada, S.O., Ikpeseni, S.C. (2021). Evaluation of ANN and ANFIS modeling ability in the prediction of AISI 1050 steel machining performance. Heliyon, vol. 7, no. 2, art. ID e06136, DOI:10.1016/j.heliyon.2021.e06136. [30] Rodić, D., Sekulić, M., Gostimirović, M., Pucovsky, V., Kramar, D. (2021). Fuzzy logic and sub-clustering approaches to predict main cutting force in high-pressure jet assisted turning. Journal of Intelligent Manufacturing, vol. 32, p. 21-36, DOI:10.1007/s10845-020-01555-4. [31] Kukolj, D., Levi, E. (2004). Identification of complex systems based on neural and takagi-sugeno fuzzy model. IEEE T ransactio ns o n Sys t ems, Man, and Cyberne tics, P ar t B (Cybernetics), vol. 34, no. 1, p. 272-282, DOI:10.1109/ TSMCB.2003.811119. [32] Castillo, O., Melin, P., Ross, O.M., Cruz, R.S., Pedrycz, W. (2007). Theoretical Advances and Applications of Fuzzy Logic and Soft Computing. Springer Science & Business Media, DOI:10.1007/978-3-540-72434-6. [33] Nukman, Y., Hassan, M., Harizam, M. (2013). Optimization of prediction error in CO 2 laser cutting process by Taguchi artificial neural network hybrid with genetic algorithm. Applied Mathematics and Information Science, vol. 7, no. 1, p. 363- 370, DOI:10.12785/amis/070145. [34] Thanedar, A., Dongre, G.G., Joshi, S.S. (2019). Analytical modelling of temperature in cylindrical grinding to predict grinding burns. International Journal of Precision Engineering and Manufacturing, vol. 20, p. 13-25, DOI:10.1007/s12541- 019-00037-9. [35] Al-Amin, M., Abdul Rani, A.M., Abdu Aliyu, A.A., Abdul Razak, M.A.H., Hastuty, S., Bryant, M.G. (2020). Powder mixed- edm for potential biomedical applications: A critical review. Materials and Manufacturing Processes, vol. 35, no. 16, p. 1789-1811, DOI:10.1080/10426914.2020.1779939. [36] Kumar, S., Mandal, A., Dixit, A.R. (2018). Investigation of powder mixed EDM process parameters for machining inconel alloy using response surface methodology. Materials Today: Proceedings, vol. 5, no. 2, p. 6183-6188, DOI:10.1016/j. matpr.2017.12.225. [37] Fonda, P., Wang, Z., Yamazaki, K., Akutsu, Y. (2008). A fundamental study on Ti-6Al-4V’s thermal and electrical properties and their relation to edm productivity. Journal of Materials Processing Technology, vol. 202, no. 1-3, p. 583- 589, DOI:10.1016/j.jmatprotec.2007.09.060. [38] Kumar, M., Datta, S., Kumar, R. (2018). Electro-discharge machining performance of Ti-6Al-4V alloy: Studies on parametric effect and phenomenon of electrode wear. Arabian Journal for Science and Engineering, vol., p. 1-16, DOI:10.1007/s13369-018-3632-1.