Prediction of Surface Roughness of an Abrasive Water Jet Cut Using an Artificial Neural Network

The study’s primary purpose was to explore the abrasive water jet (AWJ) cut machinability of stainless steel X5CrNi18-10 (1.4301). The study analyzed the effects of such process parameters as the traverse speed (TS), the depth of cut (DC), and the abrasive mass flow rate (AR) on the surface roughness (Ra) concerning the thickness of the workpiece. Three different thicknesses were cut under different conditions; the Ra was measured at the top, in the middle, and the bottom of the cut. Experimental results were used in the developed feed-forward artificial neural network (ANN) to predict the Ra. The ANN’s model was validated using k-fold cross-validation. A lowest test root mean squared error (RMSE) of 0.2084 was achieved. The results of the predicted Ra by the ANN model and the results of the experimental data were compared. Additionally, as TS and DC were recognized, analysis of variance at a 95% confidence level was used to determine the most significant factors. Consequently, the ANN input parameters were modified, resulting in improved prediction; results show that the proposed model could be a useful tool for optimizing AWJ cut process parameters for predicting Ra. Its main advantage is the reduced time needed for experimentation.


Introduction
Abrasive water jet (AWJ) machining is one of the beneficial machining processes used to cut various engineering materials. The importance of this kind of machining lies in the fact that it has a small heat-affected zone, no thermal distortion, a small machining force, high flexibility, and a good surface finish. Overall, the AWJ machining processes achieve high precision and accuracy of complex parts. Process parameters such as the water pressure, the abrasive type, the abrasive mass flow rate (AR), and the traverse speed (TS) influence the cutting surface quality and the overall process efficiency. The prediction of surface roughness depending on process parameters with their optimization represents a challenging task and attracts researchers worldwide.
Overview articles [1,2] provide a comprehensive review of the AWJ process parameters. Some researchers even try to control the surface texture with process parameters [3]. Many traditional modeling techniques, such as regression analysis, do not provide satisfactory results, especially when the relationship between the target function and the influencing parameters is non-linear, as is usually the case in complex phenomena (such as AWJ machining); this indicates the appropriateness of artificial neural network (ANN) based methods for overall cutting process modeling [4]. For modeling and optimization of any machining processes, ANNs [5], an adaptive neuro-fuzzy inference system (AN-FIS) [6,7], and other intelligent techniques [8] are common. ANN and the regression model were used for surface roughness prediction in the AWJ cutting of AA 7075 aluminum

Experimental Setup Description
The experiments were conducted using a Flow Mach 4 abrasive water jet machine (Flow Waterjet, Kent WA, USA). The material of the machined workpiece used in the experiments was X5CrNi18-10 (1.4301) stainless steel plates of three different thicknesses, 5 mm, 10 mm, and 15 mm. The material was austenitic stainless steel, which is difficult to machine from a traditional cutting process standpoint and is often processed with an AWJ [23]. After evaluating the process parameters, we selected those with the most significant influence on the cut quality for the design of experiments (DOE). The constant process parameters and their values are presented in Table 1. The most influential (DOE input variables) process parameters are the nozzle stand-off distance, the traverse speed, and the abrasive mass flow rate [26]. The latter two input process parameters were selected for analysis in the present study, since the stand-off distance, already after the preliminary test, did not show a considerable influence. Table 2 shows the traverse speed and the abrasive mass flow rate values used in the experiments. The surface roughness with a cut-off of 0.8 mm (on the cut surface) was measured with the Mitutoyo SJ-201 Surftest (Mitutoyo, Kawasaki, Japan), as shown in Figure 1.  The most influential (DOE input variables) process parameters are the nozzle standoff distance, the traverse speed, and the abrasive mass flow rate [26]. The latter two input process parameters were selected for analysis in the present study, since the stand-off distance, already after the preliminary test, did not show a considerable influence. Table 2 shows the traverse speed and the abrasive mass flow rate values used in the experiments. The surface roughness with a cut-off of 0.8 mm (on the cut surface) was measured with the Mitutoyo SJ-201 Surftest (Mitutoyo, Kawasaki, Japan), as shown in Figure 1. The Ra was used to evaluate the surface roughness; it is one of the most-studied AWJ process parameters in research and industry. The surface roughness was measured at three different sections in the jet direction (top, middle, and bottom), as shown in Figure  2. The roughness was measured at four locations (P1, P2, P3, and P4) along the length of the cut surface, as shown in Figure 2. The Ra was used to evaluate the surface roughness; it is one of the most-studied AWJ process parameters in research and industry. The surface roughness was measured at three different sections in the jet direction (top, middle, and bottom), as shown in Figure 2. The roughness was measured at four locations (P1, P2, P3, and P4) along the length of the cut surface, as shown in Figure 2.  The Ra was used to evaluate the surface roughness; it is one of the most-studied AWJ process parameters in research and industry. The surface roughness was measured at three different sections in the jet direction (top, middle, and bottom), as shown in Figure  2. The roughness was measured at four locations (P1, P2, P3, and P4) along the length of the cut surface, as shown in Figure 2.

Experimental Results
Altogether, 108 data points, 36 sets of 3 experiments, were conducted in this investigation. The Ra values of each experimental trial are listed in Tables 3-5.

Artificial Neural Networks
ANNs simulate the human brain; they have been used to model various problems in the economic, social, medical, and engineering sciences. ANNs are data-driven selfadaptive methods capable of arbitrary adjustment to model the system without any explicit specification of functional form for the underlying model, and, consequently, they can map any function with arbitrary accuracy [27].
An ANN consists of an input layer of nodes, one or more hidden layers, and an output layer. The input layer in our case consisted of neurons that represent different thicknesses, AR, TS, and DC (independent variables). The hidden layer is a collection of neurons that provide an intermediate connection between the input and output layers. The hidden layer of the neural network maps the inputs into image space G. The number of neurons in the Materials 2021, 14, 3108 7 of 16 output layer determines the number of dependent variables. The output value of the i-th neuron y i was determined using Equation (1): where, j(ε i ) denotes a transfer function such as sigmoid or logarithmic, ε i the potential of the i-th neuron, and x j the j-th input vector value transmitted through a neuron. In our case, the output was presented as an average of P1, P2, P3, and P4 values (mean Ra). The weight matrix and threshold vector coefficients were denoted as ω ij and ϑ i , respectively; both were adopted iteratively using a specific training procedure, with the intent to minimize the sum of squared differences E in Equation (2). The y o and t o vectors represent the ANN's output value and the actual/desired output value (based on the experiment); the overall summation runs over all output neurons o.
when using a multilayer feed-forward ANN, the network's architecture is one of the most important factors [28]. Since an over-simplified (shallow with fewer neurons) ANN is less flexible [29], complex ANNs are prone to over-fitting [30] and are computationally expensive. There is no simple formula for determining the number of neurons and hidden layers; the ANN topology depends critically on the number of training cases, the amount of noise, and the overall complexity of the given problem [31,32]. Smaller ANN network architectures are faster (fewer neurons/layers involved in calculations), easier to build (and maintain), and offer better generalization ability.

Pre-Processing Validation and Performance Metrics
Normalization mapping of the input variable values on (−1, 1) was performed as a preprocessing step. The special k-fold cross-validation procedure with k = 36 was adopted for evaluating the performance of the proposed ANNs. This means that the data was divided into 36 subsets; 35 datapoints subsets were used for training and the remaining one was used for testing the ANNs' performance. Each fold contained all representative positions throughout the depth of the cut, belonging to the same cut. Datapoints belonging to a specific fold have the same thickness, AR, and TS values (and different positions throughout the depth of the cut). For better generalization, the whole 36-fold procedure was repeated 10 times (wherein fold members are left unaltered). Performance metrics include the mean average error (MAE) and the root mean squared error (RMSE). Figure 3 shows the images of the cut surfaces, which were cut at the maximum and minimum traverse speed and an abrasive mass flow rate of 475 g/min for material thicknesses of 10 mm and 15 mm. At a minimum traverse speed for both material thicknesses (76 mm/min for a 10 mm and 48 mm/min for a 15 mm), no grooves were visible at the cut surface. However, at a maximum traverse speed (228 m/min for 10 mm and 144 m/min for 15 mm), the grooves were easily visible, especially on the lower half of the material's thickness. Since the cut surface images do not offer quantitative information, the research focused on measuring the surface roughness at three different sections in the jet direction (top, middle, and bottom) and discussing only those values.   Table 6 shows the initially tested feed-forward ANN configurations. The presented ANNs were comprised of two hidden layers (four in the first and eight neurons in the second hidden layer). Different training procedures and different transfer functions were adopted. The different training procedures included scaled conjugate gradient ("trainscg"), gradient descent with adaptive learning rate ("traingda"), Levenberg-Marquardt ("trainlm"), and Bayesian regularization ("trainsbr") backpropagations. The adopted transfer functions were logarithmic ("logsig") and linear ("purelin"). The best results ( = 0.2046, = 0.2397) were achieved with the scaled conjugate gradient learning method and the logarithmic transfer function; the stated configuration was adopted further on. Feed-forward ANNs with five different topologies ANN 5, ANN 3_5, ANN 4_8, ANN 3_6_3, and ANN 4_8_4 were used, comprising one to three hidden layers. For clarification, the ANN 5 topology contained one hidden layer with five neurons. The ANN 3_6_3 contained three hidden layers with three neurons in the first hidden layer, six in the second, and three in the third hidden layer. As stated, all the neurons in the hidden layers adopted the logarithmic ("logsig") transfer function and the scaled conjugate gradient learning method ("trainscg")-based learning method. For the ANNs' validation, thefold cross-validation was used with 36 folds, wherein each fold contained three data points with different depth sections (bottom, middle, and upper). The learning procedure  Table 6 shows the initially tested feed-forward ANN configurations. The presented ANNs were comprised of two hidden layers (four in the first and eight neurons in the second hidden layer). Different training procedures and different transfer functions were adopted. The different training procedures included scaled conjugate gradient ("trainscg"), gradient descent with adaptive learning rate ("traingda"), Levenberg-Marquardt ("trainlm"), and Bayesian regularization ("trainsbr") backpropagations. The adopted transfer functions were logarithmic ("logsig") and linear ("purelin"). The best results (testMAE = 0.2046, testRMSE = 0.2397) were achieved with the scaled conjugate gradient learning method and the logarithmic transfer function; the stated configuration was adopted further on. Feed-forward ANNs with five different topologies ANN 5, ANN 3_5, ANN 4_8, ANN 3_6_3, and ANN 4_8_4 were used, comprising one to three hidden layers. For clarification, the ANN 5 topology contained one hidden layer with five neurons. The ANN 3_6_3 contained three hidden layers with three neurons in the first hidden layer, six in the second, and three in the third hidden layer. As stated, all the neurons in the hidden layers adopted the logarithmic ("logsig") transfer function and the scaled conjugate gradient learning method ("trainscg")-based learning method. For the ANNs' validation, the k-fold cross-validation was used with 36 folds, wherein each fold contained three data points with different depth sections (bottom, middle, and upper). The learning procedure lasted for five different epoch durations (10,50,200, 500, and 1000 iterations). After that, the ANN's performance was assessed based on the MAE (Figure 4) and the RMSE (Figure 4) metrics.

ANN Results
Materials 2021, 14, x FOR PEER REVIEW 9 of 16 lasted for five different epoch durations (10,50,200, 500, and 1000 iterations). After that, the ANN's performance was assessed based on the MAE (Figure 4) and the RMSE (Figure 4) metrics.
The best test set results were achieved with ANN 5 ( = 0.1785, = 0.2097) after 1000 epochs. The graphs (Figures 4 and 5) indicate that a higher number of hidden layers in ANNs, yield to be have proven less efficient in surface roughness (mean Ra) prediction, mainly when a shorter learning duration was adopted (the epoch number was less than 200).     The best test set results were achieved with ANN 5 (testMAE = 0.1785, testRMSE = 0.2097) after 1000 epochs. The graphs (Figures 4 and 5) indicate that a higher number of hidden layers in ANNs, yield to be have proven less efficient in surface roughness (mean Ra) prediction, mainly when a shorter learning duration was adopted (the epoch number was less than 200). The best test set results were achieved with ANN 5 ( = 0.1785, = 0.2097) after 1000 epochs. The graphs (Figures 4 and 5) indicate that a higher number of hidden layers in ANNs, yield to be have proven less efficient in surface roughness (mean Ra) prediction, mainly when a shorter learning duration was adopted (the epoch number was less than 200).

Analysis of Variance
A statistical method, analysis of variance, was applied to identify which process parameters affected the surface roughness significantly concerning the thickness of the workpiece. The degree of freedom (DF), the squares (SS), the square means (MS), the Fvalues, and the p-values were presented for each factor (process parameter). In this study, the p-value was taken at a level of 0.05, and the results were validated for a confidence level of 95%. If the value of p was less than 0.05, the factor was statistically significant. If the p-value was greater than 0.05, the factor was not statistically significant at a 95% confidence level. The percentage of contribution (PC) was used to analyse the significance of the process parameters.
The ANOVA results for the materials of 5 mm thickness are presented in Table 7, and Figure 7 presents the 3D surface plots of process parameters vs. surface roughness for 5 mm material thickness.

Analysis of Variance
A statistical method, analysis of variance, was applied to identify which process parameters affected the surface roughness significantly concerning the thickness of the workpiece. The degree of freedom (DF), the squares (SS), the square means (MS), the F-values, and the p-values were presented for each factor (process parameter). In this study, the p-value was taken at a level of 0.05, and the results were validated for a confidence level of 95%. If the value of p was less than 0.05, the factor was statistically significant. If the p-value was greater than 0.05, the factor was not statistically significant at a 95% confidence level. The percentage of contribution (PC) was used to analyse the significance of the process parameters.
The ANOVA results for the materials of 5 mm thickness are presented in Table 7, and Figure 7 presents the 3D surface plots of process parameters vs. surface roughness for 5 mm material thickness.    Table 7, the p-values were 0.966 for AR, 0.0 for TS, and 0.0 for DC. The TS and the DC were shown to influence the surface roughness, unlike the AR. The strongest influence can be attributed (based on ANOVA) to the DC.
It can be observed in Figure 7a,b that the depth of cut was the most impactful factor affecting the surface roughness. Additionally, it can be seen in Figure 7a,c that, with the increase in the traverse speed, the surface roughness increased, except at a 2 mm depth of cut (top section). Moreover, it can be observed in Figure 7b,c that the abrasive mass flow rate did not have a significant effect on the surface roughness; although, in Figure 7b, the surface roughness decreased slightly with the increase in the abrasive mass flow rate at the 4 mm depth of cut (bottom section).
The ANOVA results for materials of 10 mm thickness are presented in Table 8. Figure  8 presents the 3D surface plots of process parameters and their influence on the surface roughness value for materials of 10 mm thickness.  Table 7, the p-values were 0.966 for AR, 0.0 for TS, and 0.0 for DC. The TS and the DC were shown to influence the surface roughness, unlike the AR. The strongest influence can be attributed (based on ANOVA) to the DC.
It can be observed in Figure 7a,b that the depth of cut was the most impactful factor affecting the surface roughness. Additionally, it can be seen in Figure 7a,c that, with the increase in the traverse speed, the surface roughness increased, except at a 2 mm depth of cut (top section). Moreover, it can be observed in Figure 7b,c that the abrasive mass flow rate did not have a significant effect on the surface roughness; although, in Figure 7b, the surface roughness decreased slightly with the increase in the abrasive mass flow rate at the 4 mm depth of cut (bottom section).
The ANOVA results for materials of 10 mm thickness are presented in Table 8. Figure 8 presents the 3D surface plots of process parameters and their influence on the surface roughness value for materials of 10 mm thickness.   From Table 8, the p-value for AR was 0.866, and it was 0.0 for TS and for DC. Based on ANOVA (with the adopted 95% confidence levels), the highest percentage contribution was obtained for the depth of cut, setting it as the factor with the most influence on the surface roughness.
It can be seen in Figure 8a,b that the surface roughness increased with the increase in the depth of the cut. A significant increase in surface roughness was observed in Figure  8a at the maximum value of the traverse speed, especially at an 8 mm depth of cut (bottom section). Figure 8c shows that the surface roughness decreased slightly with the increase in the abrasive mass flow rate at the maximum value of the traverse speed.
ANOVA results for materials of 15 mm thickness are presented in Table 9.  From Table 8, the p-value for AR was 0.866, and it was 0.0 for TS and for DC. Based on ANOVA (with the adopted 95% confidence levels), the highest percentage contribution was obtained for the depth of cut, setting it as the factor with the most influence on the surface roughness.
It can be seen in Figure 8a,b that the surface roughness increased with the increase in the depth of the cut. A significant increase in surface roughness was observed in Figure 8a at the maximum value of the traverse speed, especially at an 8 mm depth of cut (bottom section). Figure 8c shows that the surface roughness decreased slightly with the increase in the abrasive mass flow rate at the maximum value of the traverse speed.
ANOVA results for materials of 15 mm thickness are presented in Table 9. Figure 8 depicts the 3D surface plots of the process parameters and their influence on the surface roughness value for materials of 15 mm thickness. From Table 9, the p-value for AR was 0.639, and it was 0.0 for TS and for DC. It can be noticed that the highest percentage contribution, based on ANOVA, was obtained for the depth of cut, recognizing it as the most influential factor on the surface roughness, shown in Tables 7 and 8. Based on the ANOVA results (shown in Tables 7-9), the highest percentage contribution for the abrasive mass flow rate was obtained for the 15 mm material thickness.
Thus, it can be concluded that, with the increase in the material thickness, the impact of the AR parameter on the surface roughness also increased.
In the AWJ cutting of the 15 mm thick material it was also observed (see Figure 9a,b) that the depth of cut had a substantial effect on the surface roughness. The same conclusion can be drawn from Figures 7 and 8, during the AWJ cutting of 5 mm and 10 mm material thicknesses.
Total 35 57.2704 From Table 9, the p-value for AR was 0.639, and it was 0.0 for TS and for DC. It can be noticed that the highest percentage contribution, based on ANOVA, was obtained for the depth of cut, recognizing it as the most influential factor on the surface roughness, shown in Tables 7 and 8. Based on the ANOVA results (shown in Tables 7-9), the highest percentage contribution for the abrasive mass flow rate was obtained for the 15 mm material thickness. Thus, it can be concluded that, with the increase in the material thickness, the impact of the AR parameter on the surface roughness also increased.
In the AWJ cutting of the 15 mm thick material it was also observed (see Figure 9a,b) that the depth of cut had a substantial effect on the surface roughness. The same conclusion can be drawn from Figures 7 and 8, during the AWJ cutting of 5 mm and 10 mm material thicknesses. Response surfaces comply with the findings of A. Deaconescu and T. Deaconescu [22] by researching the impact of various AWJ process parameters. They analyzed similar material with higher thicknesses but without analysis of a cut surface at different depths.

ANN Concerning ANOVA
Since the AR process parameter has been recognized as the least influential factor by ANOVA, it was excluded from the learning set. Instead of four input variables, the ANN's inputs consisted of only three process parameters (DC, TS, and material thickness). By Response surfaces comply with the findings of A. Deaconescu and T. Deaconescu [22] by researching the impact of various AWJ process parameters. They analyzed similar material with higher thicknesses but without analysis of a cut surface at different depths.

ANN Concerning ANOVA
Since the AR process parameter has been recognized as the least influential factor by ANOVA, it was excluded from the learning set. Instead of four input variables, the ANN's inputs consisted of only three process parameters (DC, TS, and material thickness). By excluding AR, the ANN can model the data and provide results faster with higher precision; Table 10 Table 4. From a computation time standpoint, the tested ANNs performed 12.18% faster than the ANNs in Table 4. Additionally, by considering the Section 3.1 findings, wherein the ANN 5 topology was recognized as best-suited, the ANN 5 s results with reduced data (with exclusion of AR) yielded similar improvements of the test MAE (test MAE = 0.1779) and the RMSE (test RMSE = 0.2084).

Conclusions
A feed-forward ANNs method was used to predict the surface roughness in abrasive water jet cutting of X5CrNi18-10 (1.4301) stainless steel in different depths of cut for three different material thicknesses. This study's novelty consisted in its introducing the ANNs method as a useful tool for predicting surface roughness along the entire depth of cut at AWJ cutting of stainless steel of different thicknesses. Its main benefit is the reduced time needed for experimenting. The experimental data obtained at different traverse speeds and abrasive mass flow rates were used to develop the feed-forward ANNs method to predict surface roughness. The predicted surface roughness values were compared with the measured values to show the efficiency of the ANNs. A singlelayered ANN with five neurons (ANN 5) was recognized as the best-suited topology for the presented problem modeling. The best ANN 5 test set results for the MAE and the RMSE were 0.1779 and 0.2084, respectively. The predicted values were found to be in close agreement with the experimental. The average percentage error between the predicted surface roughness values and the experimental was 4.4973%. At a 95% confidence level, based on the percentage contribution of ANOVA, the dept of cut was the most significant factor on the surface roughness, followed by the traverse speed. By exclusion of AR, the ANNs performed faster and with increased precision.
In future research, more detailed discussions should be considered on the effects of other process parameters such as water jet pressure, the size and type of abrasive, and the type of material on surface roughness parameters, including 3D parameters.

Data Availability Statement:
The data that support the findings of this study are available from the corresponding author, upon reasonable request.