1 Introduction

3D printing or Additive manufacturing is a non-traditional technique that is used to create 3D objects by adding material layer by layer. Complex shapes and customization of design with different materials such as metal, plastic, or composite materials are possible with additive manufacturing compared to conventional manufacturing techniques. Due to the above advantages, the applications of 3D printing have increased in different fields such as medical, defense, aeronautical, and automotive industries [1, 2]. DED is a metal additive manufacturing technique suitable for many defense applications such as repairing large components or parts for aircraft and military vehicles [3,4,5,6] and non-structural applications [7]. Different difficulties of DED techniques while producing large components with high deposition rates with the minimum cost are discussed in [8, 9]. High precision is required to manufacture engineering structures which leads to an increase in the application of Gas metal arc-based DED [10,11,12,13].

SS316L is the highest used steel in many industrial applications such as the gas and oil industry, power plants, ships, medical implants, chemical, automotive, and food processing industries [14, 15]. Qualities of SS316L such as better mechanical properties, weldability, resistance to corrosion, and fabricability promote its use in nuclear reactors [16,17,18,19]. Characterization ofSS316L fabricated using Wire arc additive manufacture (WAAM) based on cold metal transfer (CMT) in terms of microstructure study and mechanical properties study [20]. The wear analysis of SS316L and SS347 are reported to understand the wear characteristics in terms of wear resistance and COF (coefficient of friction) [21,22,23].

The applications of machine learning techniques [24,25,26,27,28] for predicting the mechanical properties of materials like aluminum composites and molybdenum-coated steel represents a significant advancement in materials science. These techniques (Linear Regression, KNN, ANN, etc.) leverage data-driven approaches to model complex relationships between input variables (e.g., composition, processing conditions) and output properties (e.g., strength, hardness, wear resistance).

Fundamentals of Slurry Erosion Wear Testing Slurry erosion wear testing involves subjecting materials to controlled abrasive conditions that simulate real-world operating environments. The test typically consists of exposing a specimen to a slurry mixture containing abrasive particles under controlled flow rates, temperatures, and other relevant parameters [29,30,31,32,33,34]. The erosive impact of the slurry on the specimen surface leads to material removal, which is quantitatively measured to determine the wear rate and erosion resistance of the material. Various testing methodologies, including jet impingement, rotating cylinder, and impeller erosion tests, are employed based on specific application requirements and research objectives. The choice of testing methodology and test parameters depends on factors such as the intended application, material properties, and the desired level of simulation fidelity. The schematic diagram od slurry wear mechanism is shown in Fig. 1.

Fig. 1
figure 1

Slurry wear mechanism

2 Problem statement and objectives

The main problem faced by the critical components wear behavior when exposed to the particle wear environment is unpredictable which may lead to entire system failure. So, the objective of this study is to investigate the wear behavior of SS316L parts fabricated using direct energy deposition (DED) and subjected to slurry erosion and also to find the impact of process parameters such as speed, current, and offset on the microstructure and mechanical properties of the fabricated parts. This analysis is quite challenging because it has to consider many factors simultaneously which is time-consuming. So, the machine learning algorithms are proposed to reliability of the parts by proper prediction of performance characteristics of the additively manufactured components. The main objective of this paper is to predict the wear behavior of SS316L parts fabricated using direct energy deposition (DED) by achieving the following tasks.

  • SS316L Specimen preparation using Direct Energy Deposition method.

  • Cutting of specimen using wire Electrical Discharge Machining process.

  • Optimization of Cutting parameters using wire EDM method.

  • Microstructure study of SS316L Specimen.

  • Conduct slurry erosion wear tests to quantify erosion rates and material loss, examining wear mechanisms under varying slurry conditions.

  • Study the microstructure of the specimen after the erosion wear test.

  • Prediction of wear rate using machine learning algorithms.

  • Optimizing the slurry conditions.

3 Methodology

The methodology of this study is explained using a flowchart which is shown in Fig. 2 that includes the following steps.

  1. 1.

    The dimensions of 30 mm*30 mm*6 mm SS316L alloy samples are prepared using the Direct Energy Deposition method.

  2. 2.

    The samples shown in Fig. 3 are cut into 9 pieces by varying the process parameters speed, current, and offset using an L9 orthogonal array. The surface finish of the machined surface is measured which is shown in Table 1.

  3. 3.

    Statistical analysis of the wire EDM process parameters to find the influential parameter on surface roughness using the Regression equation and ANOVA table in Minitab.

  4. 4.

    Then the samples cut by wire EDM used for slurry erosion wear testing are shown in Fig. 3 by varying the parameters speed, slurry concentration, and angle of impact.

  5. 5.

    Collection of data for the statistical analysis and for the machine learning model

  6. 6.

    Models using machine learning algorithms can be used for prediction of wear rate which helps to enhance the predictive maintenance of the critical parts for improving the reliability.

Fig. 2
figure 2

Flowchart

Fig. 3
figure 3

SS316L additive manufactured sample and Eroded samples

Table 1 Wire EDM process parameters and surface roughness

4 Machine learning algorithms

ML-based Predictive maintenance is one the main applications of machine learning in mechanical science which analyse the experimental data from machinery and equipment using different machine learning algorithms. Machine Learning algorithms classified as supervised and unsupervised based on the data. If the data is labelled then list of supervised algorithms are suggested otherwise unsupervised algorithms are suggested for unlabelled data for clustering. In this study the experimental data contains both input and output and also output is a continuous value, so it is categorised as labelled data so the list of supervised regression algorithms such as linear regression, K Nearest Neighbour algorithm and Artificial Neural Network are used for the prediction of wear rate.

4.1 Artificial neural network

Artificial neural networks (ANNs) shown in Fig. 4 imitate the human brain; they create networks similar to the brain neuron connections. ANN gives solutions for complex problems in different fields including mechanical engineering. ANN network is organised by many layers interconnected to each other through nodes. This network brilliantly learns the relation between input and output parameters and makes decisions based on the learning for the new inputs.

Fig. 4
figure 4

Layers of the artificial neural network

4.2 K-nearest neighbours algorithm

A classification problem solved using KNN is demonstrated using Fig. 5. This algorithm makes predictions based on frequent occurrence class or average of k nearest neighbours for any new data input. Different equations such as Euclidean distance, Manhattan distance or cosine similarity is used to find the nearest neighbours. This algorithm is capable of handling both classification and regression problems. The frequent occurrence class of nearest neighbour is assigned for classification problems and an average of nearest neighbours is considered for the regression problems. The disadvantages of these algorithms are computational complexity and mispredictions with noisy data.

Fig. 5
figure 5

K-nearest neighbours algorithm

4.3 Linear regression

Linear Regression shown in Fig. 6, is a very old machine learning technique used for prediction and understanding the relationship between input and output variables. The objective of linear regression is to find the relation between one dependent variable (output) and one or more independent variables (input) by fitting the straight line (linear) through the data points. The training of the model involves the process of finding the coefficients of the linear equation which minimizes the actual output with predicted output which can be achieved by minimising the least square error. The obtained coefficients represent the slope of the fitted line.

Fig. 6
figure 6

Linear regression

5 Results and discussions

The wire EDM process parameters and its measured surface roughness values from Table 1 are analysed using the statistical tool in Minitab. ANOVA table is created using Minitab and shown in Table 2. By analysing the percentage contribution from the ANOVA tables, current has having highest percentage contribution as 57% on surface roughness whereas speed and offset have less contribution such as 0.8% and 0.9%. It observed that the current is highest influential parameter on surface roughness. Tool wear and stability are highly dependent on current which leads to variation in surface roughness. The excess wear in a tool affects the consistency of machining and surface roughness (Table 3).

Table 2 ANOVA table for surface roughness
Table 3 Slurry erosion test process parameters and wear rate

The interaction effect of speed, current and offset on surface roughness is shown in Fig. 7. At the high current level, there is no interaction effect on surface roughness. At middle and low levels of current value, all the parameters have an interaction effect on surface roughness. It means that at a high current level, the surface roughness is obtained by the current and other variables such as speed and offset do not have a significant effect in altering the surface roughness. The result of interaction plots again proves the ANOVA analysis as current has the highest influence on surface roughness. The current is directly proportional to the discharge energy, which leads to more intense melting and vaporization of the material, which has significant influence on surface roughness [30,31,32,33,34,35,36,37,38].

Fig. 7
figure 7

Interaction plot for surface roughness

After the slurry erosion test, parameters such as speed, slurry concentration and angle of impact are varied and the wear rate is measured and analysed using ANOVA analysis performed in Minitab which is shown in Table 4. From the ANOVA analysis, it is observed that speed and slurry concentration have the highest influence on wear rate compared to angle impact because of high F-value, P-value, and percentage contribution compared to angle of impact. In slurry environments, the concentration of slurry particles is directly proportional to wear rate because the frequency of slurry particles affects the surface of the materials with increasing concentration. The wear rate is directly proportional to wear rate, due to improved mechanical interactions at the contact surfaces, which leads to more material removal [37,38,39,40,41,42,43,44].

Table 4 ANOVA table for wear rate

With the main effect, it is important to find the interaction effects between speed, slurry concentration, and angle of impact. Sometimes, the interaction effect may be different from the individual effect which is explained in Fig. 8.

Fig. 8
figure 8

Interaction plot for wear rate

After the ANOVA analysis and interaction effect analysis, the machine learning models are trained and tested using the sklearn library in Python 3.0

Training and validating machine learning models is a structured process that ensures the models accurately capture the underlying patterns in the data and generalize well to new, unseen data. This process involves several key steps, including data preparation, model training, validation, testing, and final selection. First, the ANN model is trained and the actual versus predicted values are plotted in Fig. 9. It is observed that more outliers are present in the ANN model which indicates less accuracy of an algorithm.

Fig. 9
figure 9

Actual Versus Prediction of wear rate using ANN

Then the Linear regression model is trained and the actual versus predicted values are plotted in Fig. 10. It is observed that less outlier are present in the Linear regression model compared to ANN model which indicates linear regression models have a better accuracy compared to ANN model.

Fig. 10
figure 10

Actual Versus Prediction of wear rate using linear regression

Finally, the KNN model is trained and the actual versus predicted values are plotted in Fig. 11. It is observed that very few outliers are present in the KNN model compared to ANN and Linear regression model which indicates that KNN models have high accuracy compared to ANN and Linear regression model.

Fig. 11
figure 11

Actual Versus Prediction of wear rate using KN

The same observations confirmed by performance metrics such as R-Square, MAE, MSE & RMSE value which is shown in Table 5. KNN regressor has the high values of R-square as 0.916 which is near to 1, which indicates the highest accuracy of the model whereas all other errors such as MAE, MSE, and RMSE values are lesser compared to linear Regression and ANN. KNN model performs better at some specific conditions like data with nonlinear relationships, small and medium size data, and where quick implementations are needed [45,46,47,48,49]. The curse of dimensionality, the performance of algorithm decreases as the data size increases, making KNN algorithm more suitable for small-size data [50,51,52,53].

Table 5 Comparison of linear regression, KNN and ANN algorithms

6 Conclusions

In this paper, the erosion behavior of 316L stainless steel specimens, prepared using Directed Energy Deposition (DED) and subsequently precision-machined using wire Electrical Discharge Machining (EDM), is thoroughly investigated. The study begins with the optimization of surface roughness by analyzing key parameters wire EDM speed, current, and wire diameter using Analysis of Variance (ANOVA) in Minitab. Following this, the erosion behavior is examined, and the wear rate is optimized based on Speed, Slurry concentration, and Angle of impact using ANOVA. Three machine learning models Linear Regression, k-Nearest Neighbors (k-NN), and Artificial Neural Network (ANN) are developed and validated for future prediction of wear rate.

Key findings include:

  • k-Nearest Neighbors (k-NN) and Artificial Neural Network (ANN) Models: These models are employed to predict wear rates accurately, significantly reducing the need for extensive experimentation, thereby saving time and cost.

  • k-NN as the Preferred Model: The k-NN algorithm is identified as the best-performing model, with the highest R-squared value of 0.916. This high R-squared value indicates that k-NN effectively captures the underlying structure and relationships between input variables and the wear rate, making it a robust choice for predictive modeling in this context.

Future work could explore a broader range of materials, different cutting environments, and the long-term effects of wear over extended machining periods. It can be extended by identifying additional parameters that influence performance characteristics and exploring their impact using other supervised regression algorithms. The methodology can also be applied to other non-traditional machining processes, such as 3D printing, to develop more robust and effective predictive models that meet real-world application demands across various industries. The insights obtained from this research help in selecting optimal machining parameters and tool materials, ultimately leading to improved tool life, reduced downtime, and cost savings in manufacturing processes.