# Machine Learning Approach: Prediction of Surface Roughness in Dry Turning Inconel 625

Authors: A. S. Rajesh; M. S. Prabhuswamy; M. Rudra Naik
Journal: Advances in Materials Science and Engineering
 (2022)

---

## Abstract

Roughness is a prime parameter in any process/operation as it aids in confirming the quality status of the product. The insert and workpiece would develop a lot of friction and as a result, it generates heat in the cutting zone, which affects the machined surface. The speed, feed, and depth of cut were chosen as processing factors. L27 Orthogonal array is used based on the Taguchi technique. The regression analysis is used to develop an equation to predict the roughness. The impact of the processing factors on the machined surface is studied with help of ANOVA (Analysis of Variance). Furthermore, the estimation of surface roughness is carried out using a machine learning-based model-feed forward (nonlinear autoregressive network) NARX network, and the evaluated surface roughness is compared with the values predicted by the regression model and experimental results. The average percentage error observed with the predicted values by NARX is observed as 3.01%, which is lower than the average percentage error observed by the regression model 5.131%. Thus, this work provides the best machine learning approach to the prognosis of the roughness in dry turning of Inconel 625, which would save a lot of time and unnecessary wastage of the work material.


---

## Body

## 1. Introduction

The surface roughness is considered an important one in the manufacturing industry and the roughness range is specified based on requirements either esthetic look or functional need. A predictive model for the prediction of roughness was developed using a machine learning approach based on principle component analysis [1]. This work [2] stated that surface roughness plays a main part in the development of ant components. The roughness is affected owing to machining factors and inserts material and insert geometry. Hence, an optimum machining factor and the insert are found to give a better surface finish. Machine learning methods are widely used for the prediction of the attributes before the actual experiment, as well as these techniques, are widely used for the measurements of the attributes [3]. Machine learning is a modern tool for the optimization of the system. In the manufacturing field, ML leads to expense saving, time saving, an increase in quality, and reduce wastage [4]. It is also a must to investigate a better solution for optimum attributes to reduce the wastage of material and cost of machining in the machining of aero alloys [5, 6]. They [7] stated that the prediction of energy needs of the machining strategy plays a vital role before manufacturing a component. They have used various machine learning concepts such as decision trees, random forests, and boosted random forests for the prediction of energy in CNC machining. The accuracy of energy prediction was proved with help of a random forest. They [8] have developed a model using ANN to predict the attributes such as force, the temperature at the machining zone, roughness, and insert wear in dry machining of Nimonic C263 and the percentage error among experimental and predictive values were found within 2%. Authors [9] have used machine vision and AE signal data to measure the output data in the machining of Nimonic 75 alloy. They have reported that the AERMS and AECOUNT were found receptive to output and the vision system and AE have proved great in evaluating the parameters for optimization.This work [10] performed turning operation on Al 7075 based on central composite design and observed various machining attributes at various levels of machining factors. They analyzed the impact of machining factors on attributes using ANOVA, and multiresponse optimization was carried out using the principal component and JAYA algorithm with a lower percentage error of 8%. They [11] have created a dataset based on multichannel signals and insert wear values. Furthermore, they have said that preprocessing is done to carry out STFT to transfer one-dimensional signals into two-dimensional signals. This research [12] developed a regression model based on the central composite design in machining AISI 4340 alloy steel to predict the attributes. Further, ANN was used to get the best regression coefficient and fitness model for GA. They have found the best combination of ANN and GA methodology to identify the best machining variables for optimum attributes.This work [13] investigated the impact of the annealing process at 1000°C at varying machining parameters using principal component analysis, hyper-parameter optimization, and particle swarm optimization. The forecasted results were verified with experimental trial results. They have observed average percentage error among experimental and predicted values ranges of 1.56%, 6.8%, and 2.57% with respect to surface roughness, wear, and material removal rate. They [14] have developed a predictive model for roughness in turning AISI 304 steel using. The predictive model was carried out with help of an adaptive-network-based fuzzy inference system quantum-behaved particle swarm optimization (ANFIS-QPSO). The ANIFS-QPSO has shown great agreement with experimentally measured results. They [15] have introduced an approach to compute the insert wear in the turning process with help of neural intelligence. They have used support vector machines (SVM) for regression with Bayesian optimization to evaluate the wear based on varying the level of process factors. They have concluded that the proposed approach gave great accuracy in evaluating the wear of the insert.From the literature, it is found clearly that, the machine learning concepts are widely used to predict the attributes with better regression coefficient and the percentage error is also found to be minimum among experimental and machine learning model predictions as machine learning (ML) is an emerging technique in developing a predictive model as well as for optimization of the process factors. ML increases the data processing speed and analysis. Processing of larger data and deep analysis can be made. The prediction capability of the ML techniques with other prediction tools can be compared with help of the R-squared value. Prediction of the responses by ML techniques was found to be more significant than other techniques and well in accord with experimental results. Further, the predictive model development based on various machine learning methodologies and a regression model are all reported and limited reports were identified for the prediction of attributes in machining Inconel 625. Hence, this work attempts to develop a machine learning methodology to prognosis the roughness, and the predicted values are compared with experimental results and predicted values by the regression model. Furthermore, the machining factors’ effect on surface roughness is studied using ANOVA.


## 2. Materials and Experimental Details

Inconel 625 of diameter 60 mm and a length of 150 mm were used to conduct experiments. The chemical part of the work material is as follows (Wt%): 58–71% Ni, 21–23% Cr, 8-3-10% Mo, 5% Fe, 3.2–3.8% Nb, 1% Co, 0.5% Mn, and 0.4% Al. The experimental trials were carried out in dry mode on a central lathe and whisker-reinforced inserts were used [16, 17]. L27 orthogonal array was used to conduct the experiment [5, 18, 19]. The cutting speed, feed rate, and depth of cut are all chosen as inputs. The roughness is chosen as the machining attribute. The levels of process factors are detailed in Table 1 and the experiment trail’s result is detailed in Table 2. The surface roughness (Ra) is measured using a surf coder surface profilometer. An average of three measurements was considered to distinguish the roughness at every machining condition.Table 1
Machining parameters.
S.NoSymbolWhisker reinforced ceramicsL 1L 2L 3V (m/min)V (m/min)150225275S (mm/rev)S (mm/rev)0.0610.120.153ap (mm)ap (mm)0.751.01.20Table 2
Experimental trial results.
Trail. NoCutting speed VFeed rate SDepth of cut apSurface roughness (Ra), μm11500.0610.752.2521500.0611.01.7531500.0611.21.2541500.120.752.551500.121.0261500.121.21.8571500.1530.752.7581500.1531.02.691500.1531.22.4102250.0610.751.45112250.0611.01.3122250.0611.21.2132250.120.752142250.121.01.55152250.121.21.65162250.1530.752.5172250.1531.02.3182250.1531.22.25192750.0610.751202750.0611.00.9212750.0611.20.8222750.120.751.75232750.121.01.55242750.121.21.45252750.1530.752.15262750.1530.11.95272750.1531.21.8


## 3. Results and Discussion

The turning experiments are carried out on Inconel 625 and predictive models are developed using machine learning methodology “NARX Time Series Model” and regression concepts. Mostly, the time series approach usually contains some unwanted characteristics of high noise and nonstationary that tend to make the classical statistical system not competent and intelligent, whereas the NARX model possesses high and strong potential to be considered as a reliable alternative to conventional techniques. It provides better prediction and can effectively learn complex sequences producing a greater predictive capacity for both fit and accuracy. Furthermore, the impacts of process factors on surface roughness are discussed.


### 3.1. ANOVA Results for Surface Roughness

The ANOVA is useful to find out the effect of every factor. The statistical importance of every factor is indicated usingP value. If the P-value of a particular factor is identified as lesser than 0.05, then the specific factor is statistically significant on attributes. The formulation of ANOVA is done with a significance of 5%. The ANOVA Table for roughness is detailed in Table 3. Furthermore, the significance of the factors on surface roughness can be notified based on F-value. In this ANOVA Table 3, feed rate (F value: 154.79) and speed (F value: 63.09) are all identified as significant on roughness followed by the depth of cut (F-Value: 37.76). ANOVA analysis was done at a significant level of 5% with a confidence level of 95%.Table 3
ANOVA: roughness
SSOSDFMSF-valueP valueM7.1790.797038.91< 0.0001V1.2911.2963.09< 0.0001S3.1713.17154.79< 0.0001ap0.773510.773537.76< 0.0001V∗ S0.055910.05592.730.1170V∗ ap0.017210.01720.83800.3728S∗ ap0.009310.00930.45250.5102V20.014810.01480.72260.4071S20.111610.11165.450.0321ap20.744910.744936.36< 0.0001Residual0.3483170.0205Total7.5226R2: 95%


### 3.2. Regression Analysis for Surface Roughness

The regression equation is normally used to relate the process factors and machining attributes and it is shown in the following equation:(1)y=β0+∑i=1kβixi+∑i=1kβijxi2+∑i∑jβijxixj+ε,where “y”: machining attribute; xi is the value of the ith process factors; β: coefficient: regression; and ε: residual measure.The observed values of experiment trails are predicted using a regression equation. The quadratic equation to predict surface roughness is given in the following equation:(2)Ra=1.80−0.3198∗V+0.4989∗S−0.2076∗ap+0.0669∗V∗S+0.0153∗V∗ap+0.0112∗S∗ap−0.0521∗V2+0.1502∗S22−0.0613ap2.R-Square value is 95% and the ability to predict the surface roughness is found to be adequate. The developed model is found to be a 95% confidence interval. Figure1 shows a normal plot of residuals and the cluster of points that connect the normal plot for the residuals of surface roughness. These points are very close to the plot and it is acceptable with a 95% confidence interval. The average (%) age error among experiment trails values and predicted result by the regression model is found to be 5.131.Figure 1
A normal plot of Residuals.


### 3.3. Modeling of Process Factors Using NARX Time Series Model (Implementation of NARX Time Series Model for Prediction)

NARX is a nonlinear auto-regressive network with exogenous inputs. It is a multilayered recurrent dynamic network with feedback links. The NARX model is built on the linear ARX model. It is extensively used in the time-series model. Based ond prior y(t) values and another series x, predict a series y(t) (t). The NARX model equation to define is given in the following equation:(3)yt=fxt−1…….xt−d,yt−1……yt−d.The predicted value of the dependent output signaly(t) is regressed on past output signal values of y(t), given past d values as well as previous values of an independent (exogenous) input signal x(t). Figure 2 shows a diagram of the resulting network. It uses a two-layer feed-forward network for approximation. It can be used as a predictor to prognosticate the input signal’s next value. It can also be used for nonlinear filtering with a noise-free version of the input signal as the target output. Another notable application of the NARX network is in the modeling of nonlinear dynamic systems.Figure 2
Two-layered feed-forward NARX network.Prediction is a type of dynamic filtering in which one or more time series’ past values are used to forecast future values. For nonlinear filtering and prediction, dynamic neural networks with tapped delay lines are used. Validation, testing, and training are the three sections of the experimental trial dataset. The dataset is randomly divided into 70% training, 15% validation, and 15% test data for 27 target time steps. During training, the training dataset is submitted to the network, and the network is updated based on its error. The validation dataset is used to assess network generalization and to end training when generalization begins to deteriorate. The Test dataset has no bearing on training and hence furnishes an objective assessment of network performance both during and after training. Table4 furnishes the Inconel superalloy dataset, which includes 27 trials, 19 training, 4 validation, and 4 testing.Table 4
Percentage prediction error.
Expt. NoSurface roughness(%) Prediction ErrorMeasured valuePredicted value12.252.2510.04444421.751.7530.17142931.251.24910.07242.52.5000060890.000244521.7850352121.74823961.851.8500024240.00013172.752.749969710.001101582.62.3544462383.444375592.42.3999907310.0003862101.451.4499790630.0014439111.30.87721214132.522143121.21.1999836880.00135931321.9999682190.0015891141.551.5499764170.0015215151.651.6323458651.0699476162.52.4999960490.0001581172.32.2474313252.2855946182.252.00560008310.8622191911.000026680.002668200.90.7683648714.626126210.80.7999938350.0007706221.751.7499485130.0029421231.551.5499533180.0030118241.451.4499651740.0024018252.152.1499788890.0009819261.951.9500201280.001032271.81.7999935330.0003593Avg prediction error3.0158786As indicated in Figure3, the network will be built and trained in an open loop. Closed loop (multistep) training is less efficient than open loop (single-step) training. We may feed the network accurate historical outputs while training it to produce precise current outputs using an open loop system. The network may be transformed into a closed loop or any other form that the application demands after training.Figure 3
Neural network: one-hidden layer and 30 neurons.The Levenberg–Marquardt algorithm is used to train the network. This approach needs more memory but takes less time. When generalization stops improving, as shown by a rise in the mean square error of the validation samples, training automatically terminates. Due to varying beginning circumstances and sampling, training numerous times will yield different outcomes. The network is trained until theR value approaches unity and the mean square error falls below a certain threshold. As shown in Figure 4, we evaluated the network and deployed the solution in Simulink.Figure 4
Simulink diagram.From Table4, it can be deduced that the average prediction error for Surface Roughness (Ra) is 3.016 percent. The ap, S, and V are all represented by neurons in the input layer. Surface roughness, on the other hand, is related to the output layer (Ra). The hidden layer neurons are linked to the outputs, whereas the inputs are linked to the hidden neurons. The figure above depicts the design, which includes thirty neurons in the hidden layer and a three-step time delay.Finally, the purelin transfer function produced the greatest results for neurons in buried layers. Using the plot network performance function plot performs, the maximum number of training epochs was simply found empirically. When looking at the network training graph, it was seen that after four epochs, the network training almost stops as shown in Figure5.Figure 5
Performance plot of training network.Learning algorithms tailored the formed neural networks to the dataset throughout the training phase. MATLAB regression graphs as illustrated in Figure6 that demonstrated the network outputs in relation to the objectives for testing, validation, and training sets, with R values over 0.96 for all data sets, were used to validate the correctness of the fits. Figure 7 plots show the observed results of surface roughness by experimental trails, regression model values, and NARX model values. The average percentage error observed with the predicted values by NARX is observed as 3.01%, which is lower than the average percentage error observed by the regression model 5.131%.Figure 6
Accuracy plot of NARX network w.r.t target.Figure 7
Surface values: experimental trails vs. regression model vs. NARX model.


## 3.1. ANOVA Results for Surface Roughness

The ANOVA is useful to find out the effect of every factor. The statistical importance of every factor is indicated usingP value. If the P-value of a particular factor is identified as lesser than 0.05, then the specific factor is statistically significant on attributes. The formulation of ANOVA is done with a significance of 5%. The ANOVA Table for roughness is detailed in Table 3. Furthermore, the significance of the factors on surface roughness can be notified based on F-value. In this ANOVA Table 3, feed rate (F value: 154.79) and speed (F value: 63.09) are all identified as significant on roughness followed by the depth of cut (F-Value: 37.76). ANOVA analysis was done at a significant level of 5% with a confidence level of 95%.Table 3
ANOVA: roughness
SSOSDFMSF-valueP valueM7.1790.797038.91< 0.0001V1.2911.2963.09< 0.0001S3.1713.17154.79< 0.0001ap0.773510.773537.76< 0.0001V∗ S0.055910.05592.730.1170V∗ ap0.017210.01720.83800.3728S∗ ap0.009310.00930.45250.5102V20.014810.01480.72260.4071S20.111610.11165.450.0321ap20.744910.744936.36< 0.0001Residual0.3483170.0205Total7.5226R2: 95%


## 3.2. Regression Analysis for Surface Roughness

The regression equation is normally used to relate the process factors and machining attributes and it is shown in the following equation:(1)y=β0+∑i=1kβixi+∑i=1kβijxi2+∑i∑jβijxixj+ε,where “y”: machining attribute; xi is the value of the ith process factors; β: coefficient: regression; and ε: residual measure.The observed values of experiment trails are predicted using a regression equation. The quadratic equation to predict surface roughness is given in the following equation:(2)Ra=1.80−0.3198∗V+0.4989∗S−0.2076∗ap+0.0669∗V∗S+0.0153∗V∗ap+0.0112∗S∗ap−0.0521∗V2+0.1502∗S22−0.0613ap2.R-Square value is 95% and the ability to predict the surface roughness is found to be adequate. The developed model is found to be a 95% confidence interval. Figure1 shows a normal plot of residuals and the cluster of points that connect the normal plot for the residuals of surface roughness. These points are very close to the plot and it is acceptable with a 95% confidence interval. The average (%) age error among experiment trails values and predicted result by the regression model is found to be 5.131.Figure 1
A normal plot of Residuals.


## 3.3. Modeling of Process Factors Using NARX Time Series Model (Implementation of NARX Time Series Model for Prediction)

NARX is a nonlinear auto-regressive network with exogenous inputs. It is a multilayered recurrent dynamic network with feedback links. The NARX model is built on the linear ARX model. It is extensively used in the time-series model. Based ond prior y(t) values and another series x, predict a series y(t) (t). The NARX model equation to define is given in the following equation:(3)yt=fxt−1…….xt−d,yt−1……yt−d.The predicted value of the dependent output signaly(t) is regressed on past output signal values of y(t), given past d values as well as previous values of an independent (exogenous) input signal x(t). Figure 2 shows a diagram of the resulting network. It uses a two-layer feed-forward network for approximation. It can be used as a predictor to prognosticate the input signal’s next value. It can also be used for nonlinear filtering with a noise-free version of the input signal as the target output. Another notable application of the NARX network is in the modeling of nonlinear dynamic systems.Figure 2
Two-layered feed-forward NARX network.Prediction is a type of dynamic filtering in which one or more time series’ past values are used to forecast future values. For nonlinear filtering and prediction, dynamic neural networks with tapped delay lines are used. Validation, testing, and training are the three sections of the experimental trial dataset. The dataset is randomly divided into 70% training, 15% validation, and 15% test data for 27 target time steps. During training, the training dataset is submitted to the network, and the network is updated based on its error. The validation dataset is used to assess network generalization and to end training when generalization begins to deteriorate. The Test dataset has no bearing on training and hence furnishes an objective assessment of network performance both during and after training. Table4 furnishes the Inconel superalloy dataset, which includes 27 trials, 19 training, 4 validation, and 4 testing.Table 4
Percentage prediction error.
Expt. NoSurface roughness(%) Prediction ErrorMeasured valuePredicted value12.252.2510.04444421.751.7530.17142931.251.24910.07242.52.5000060890.000244521.7850352121.74823961.851.8500024240.00013172.752.749969710.001101582.62.3544462383.444375592.42.3999907310.0003862101.451.4499790630.0014439111.30.87721214132.522143121.21.1999836880.00135931321.9999682190.0015891141.551.5499764170.0015215151.651.6323458651.0699476162.52.4999960490.0001581172.32.2474313252.2855946182.252.00560008310.8622191911.000026680.002668200.90.7683648714.626126210.80.7999938350.0007706221.751.7499485130.0029421231.551.5499533180.0030118241.451.4499651740.0024018252.152.1499788890.0009819261.951.9500201280.001032271.81.7999935330.0003593Avg prediction error3.0158786As indicated in Figure3, the network will be built and trained in an open loop. Closed loop (multistep) training is less efficient than open loop (single-step) training. We may feed the network accurate historical outputs while training it to produce precise current outputs using an open loop system. The network may be transformed into a closed loop or any other form that the application demands after training.Figure 3
Neural network: one-hidden layer and 30 neurons.The Levenberg–Marquardt algorithm is used to train the network. This approach needs more memory but takes less time. When generalization stops improving, as shown by a rise in the mean square error of the validation samples, training automatically terminates. Due to varying beginning circumstances and sampling, training numerous times will yield different outcomes. The network is trained until theR value approaches unity and the mean square error falls below a certain threshold. As shown in Figure 4, we evaluated the network and deployed the solution in Simulink.Figure 4
Simulink diagram.From Table4, it can be deduced that the average prediction error for Surface Roughness (Ra) is 3.016 percent. The ap, S, and V are all represented by neurons in the input layer. Surface roughness, on the other hand, is related to the output layer (Ra). The hidden layer neurons are linked to the outputs, whereas the inputs are linked to the hidden neurons. The figure above depicts the design, which includes thirty neurons in the hidden layer and a three-step time delay.Finally, the purelin transfer function produced the greatest results for neurons in buried layers. Using the plot network performance function plot performs, the maximum number of training epochs was simply found empirically. When looking at the network training graph, it was seen that after four epochs, the network training almost stops as shown in Figure5.Figure 5
Performance plot of training network.Learning algorithms tailored the formed neural networks to the dataset throughout the training phase. MATLAB regression graphs as illustrated in Figure6 that demonstrated the network outputs in relation to the objectives for testing, validation, and training sets, with R values over 0.96 for all data sets, were used to validate the correctness of the fits. Figure 7 plots show the observed results of surface roughness by experimental trails, regression model values, and NARX model values. The average percentage error observed with the predicted values by NARX is observed as 3.01%, which is lower than the average percentage error observed by the regression model 5.131%.Figure 6
Accuracy plot of NARX network w.r.t target.Figure 7
Surface values: experimental trails vs. regression model vs. NARX model.


## 4. Conclusions

Experimental work, development of the predictive model by machine learning methodology NRAX model, and regression model in dry turning of Inconel 625 were presented. The surface roughness at various levels of machining factors was calculated. Some of the conclusions are as follows:(i)
The predictive models developed by regression and the ANN-NARX model were found to fit well with experimental trial results. These predictive models can be useful to predict surface roughness before actual experiments in manufacturing factories.(ii)
Inconel 625 dataset includes 27 trials, 19 for training, 4 for validation, and 4 for testing. Levenberg–Marquardt algorithm is used to train the network. The prediction potential of the ANN-NARX model was proved as more accurate for the prediction of roughness than the regression model.(iii)
The average (%) age error among experiment trail values and regression predictive model is observed as 5.131%, whereas, the average percentage error among experiment trails and ANN-NARX model is found to be 3.13%.(iv)
The impact of factors observed by ANOVA analysis is that feed has a high impact on roughness accompanied by cutting speed and depth of cut.



---

*Source: 6038804-2022-10-05.xml*