Artificial Intelligence-Based Surface Roughness Estimation Modelling for Milling of AA6061 Alloy

)is study introduces the improvement of mathematical and predictive models of surface roughness parameter (Ra) in milling AA6061 alloy using carbide cutting tools coated with CVD-TiCN in dry condition. An experimental model has been improved for estimating the surface roughness using artificial neural networks (ANN) and response surface methodology (RSM). For these models, cutting speed, depth of cut, and feed rate were evaluated as input parameters for experimental design. For the ANN modelling, the standard backpropagation algorithm was established to be the optimum selection for training the model. In the forming of the network construction, five different learning algorithms were used: the conjugate gradient backpropagation, Levenberg–Marquardt, scaled conjugate gradient, quasi-Newton backpropagation, and resilient backpropagation. )e best consequent with single hidden layers for the surface roughness was obtained by 3-8-1 network structures. )e statistical analysis was performed with RSM-based second-order mathematics model. )e influences of the cutting parameters on surface roughness were defined by using analysis of variance (ANOVA). )e ANOVA results show that the depth of cut is the most effective parameter on surface roughness. Prediction models developed using ANN and RSM were compared in terms of prediction accuracy R2, MEP, and RMSE. )e data estimated from ANN and RSM were realized to be very close to the data acquired from experimental studies. )e value R of RSM model was higher than the values of the ANNmodel which demonstrated the stability and sturdiness of the RSM method.


Introduction
e most important factors in the machining of workpieces are the cutting speed, feed rate, depth of cut, and choice of the appropriate cutting tool. When workpieces are processed at low cutting speeds, the processing time is increased and the time loss is greater. When machining at high cutting speeds, the cutting tool wears quickly and finishes the tool life faster. For these reasons, parameters such as cutting tool type, cutting speed, feed rate, and depth of cut affect surface roughness [1,2].
In the milling process, the surface roughness is one of the important properties indicating workpiece quality. Models used in the prediction of surface roughness include the multiple regression technique, fuzzy set-based technique, and artificial neural networks (ANNs) [3][4][5][6][7]. e prediction of surface roughness (Ra) values in Al alloy 7075-T7351 in the face milling machining process for different ANNs was developed by Munoz-Escalona and Maropoulo [8].
Sanjeevi et al. [9] recommended the methodology of the identified surface roughness accuracy rate in Al6061 milling with ANN. An ANN model for estimating the surface roughness performance in the machining process by considering the ANN as the requisite technique for measuring surface roughness was presented by Zain et al. [10]. A novel method to define the optimum cutting parameters to obtain minimum surface roughness in the face milling of X20Cr13 stainless steel by coupling ANNs, and the harmony search algorithm was presented by Razfar et al. [11]. e harmony search algorithm was used to find optimum cutting parameters leading to minimum surface roughness. In another work, Saric et al. investigated and compared the influence of different algorithms of neural network architectures, on the error of the roughness prediction model for a steel surface machined by face milling [12]. Karabulut [13], in the milling of AA7039 and Al2O3 reinforced composites, analyzed the effect of parameters on surface roughness and cutting force under finish machining conditions with the depth of cut limited to under 1.5 mm. He developed analytical models for the estimation of surface roughness and cutting force using regression analysis and ANNs. e development of a multilayer perceptron and radial basis function neural network model for estimating surface roughness in the machining of 2024-T351 aluminium alloy was described by Fang et al. e results showed that, compared with the radial basis function model, the multilayer perceptron model offered a significantly higher accuracy of estimation for machined surface roughness, especially for maximum roughness height [14]. In another work, Markopoulos et al. [15] tested the estimation of surface roughness in end-milling using various training algorithms for backpropagation and radial basis function networks. A general dynamic surface roughness monitoring system for milling operations using an ANN was developed by Khorasani and Yazdi [16]. Jeyakumar et al. [17] used RSM to determine the performance of milling process of AA6061. ey tested the adequacy of the model improved by using experimental values. Kilickap et al. [18] investigated the relationship between cutting parameters such as cutting speeds, feed rate, and depth of cut using optimization techniques such as RSM and ANN. Sahare et al. [19] optimized the end milling process for Al2024-T4 workpiece material by using the ANN combined with Taguchi method. Yeganefar et al. [20] predicted and optimized the surface roughness and cutting forces in milling of Al7075-T6 by using regression analysis, support vector regression, artificial neural network, and multiobjective genetic algorithm.
In this study, it is aimed to estimate the surface roughness of AA6061 aluminum alloy by using artificial neural network and multiple regression method. In the neural network, different learning algorithms are used with the multilayer perception (MLP) architecture. Analysis of variance (ANOVA) was used in the multiple regression model. By comparing the performances of the predicted models with statistical methods, it has been proven that they can be used effectively to estimate the surface roughness in the milling process.

Materials and Methods
is study aimed to define the optimal machining conditions by estimating the effect of the cutting parameters on the surface roughness in the milling of AA6061 aluminium alloy. e aluminium alloy used in the tests was manufactured in workpiece dimensions of 20 × 50 × 300 mm, and its chemical composition is shown in Table 1.
e Delta Seiki CNC 1050 A milling machine with a 11 KW drive motor was used in the experiments. e carbide cutting tools coated with CVD-TiCN were obtained from Korloy. e Mahr Marsurf PS 10 surface roughness tester was used for measuring the surface roughness of the machined surfaces. e surface roughness (Ra) value was determined as the average of three measurements taken from the machined surfaces. e three input and output parameters used in determining the surface roughness of the aluminium machining included the cutting speed (Vc) (m/ min), feed rate (f ) (mm/rev), and depth of cut (ap) (mm). In order to maintain constant cutting conditions, each experiment was run with new tools. e milling tests were carried out without a coolant, and a total of 27 experiments were performed. Table 2 shows the experimental data for the AA6061 aluminium alloy. e studied outputs are chosen in order to analyze and study the effect of the distinct cutting parameters on machinability and for estimation using the artificial neural network (ANN) and response surface methodology (RSM). e ANN and RSM approaches are compared in terms of the estimated data and correlation coefficient (R 2 ), mean error percentage (MEP), and root mean square error (RMSE) values. Equations (1)-(3) give the formulae for R 2 , MEP, and RMSE [21]: where p is the number of samples, t is the goal value, and o is the output value.

Artificial Neural Networks.
e ANN imitates some basic aspects of the brain functions [21]. A neuron is the fundamental element of the neural networks, which are composed of neurons, weights, inputs, activation function, summation function, and output. e net input of the neuron is calculated by the summation function as follows: where w bi is the weight of the biases between the layers, x j is the output of the jth processing element, w ij is the weight of the connections between the ith and jth processing elements, n is the number of processing elements in the previous layer, i and j are the processing elements, and NET i is the weighted sum of the input to the ith processing element. e output of the neuron is defined by the activation function. e sigmoid function is usually used for the transfer function and generates a value between 0 and 1 for each value of the net input [22,23]. e logistic transfer function of the ANN model improved in this study is given as follows: 2 Advances in Materials Science and Engineering e optimum learning algorithm and network structure must be defined to acquire the output values closest to the experimental values. For this aim, the number of neurons in the hidden layer was boosted step by step (i.e., from five to fifteen), and quasi-Newton backpropagation (BFGS), conjugate gradient backpropagation (CGP), Levenberg-Marquardt (LM), resilient backpropagation (RP), and scaled conjugate gradient (SCG) learning algorithms were used to describe the optimum network structure and learning algorithm [23].
ere were three input parameters in the network: cutting speed (Vc), depth of cut (ap), and feed rate (f ). e surface roughness was the one output parameter in the network. e network structure is shown in Figure 1. As an outcome of the tests, the experimental data acquired (27 for each input and output) were arranged for the training and testing sets of the ANN. e ratio for training and testing data was selected as approximately 80 : 20, i.e., sets of 22 and 5, arbitrarily selected from the experimental data as the training and testing data, respectively. e output and input values were normalized between 0 and 1 to obtain better estimations. e surface roughness values predicted, after ANN training were checked against the experimental data.

Response Surface Methodology.
RSM is a series of experiments procedure for optimizing the output value is a function of several independent variables. e main approach is to move in the direction of maximum increase or decrease to reach the local minimum or maximum value (optimum point) [24]. In this study, the RSM-based secondorder mathematical model is provided as follows: where β is the regression coefficient and X is the input parameter [25]. From (7), the relationship is identified between the studied output and the milling parameters as follows:  e analysis of variance (ANOVA) is an analysis that is especially used in multiparameter and multilevel models and provides a total interpretation of the test results. e significance level (significance level) obtained from the analysis of variance determines the probability of the accuracy of the decision given as a result of the tests. is possibility, usually denoted by α, is usually determined prior to receipt of samples. us, it is ensured that the results obtained are not affected by the selection. In practice, significance levels of 0.05 and 0.01 are used [26].

Results of ANN.
In this study, a computer program was developed in a MATLAB platform to estimate the surface roughness. e cutting speed, depth of cut, and feed rate were used in the input layer, while the surface roughness was used in the output layer of the ANN. e single hidden layer with eight neurons was used for the purpose of obtain accurate results. e trials conducted in this study indicated that the CGP learning algorithm is the best learning algorithm for the surface roughness. e determination of the best learning algorithm and optimum number of neurons for the surface roughness are given in Table 3. e matching of the experimental and ANN values for the training and the testing sets of the surface roughness are shown in Figures 2 and 3, respectively. e most dramatic point here is that the prediction values are similar to the experimental values, and the estimative ability reached by the network for surface roughness was deemed to be favorable. Accordingly, the selection of the three input parameters as affecting factors for prediction of surface roughness was shown to be acceptable. e estimation performance of both the surface roughness testing and training sets demonstrated that the accuracy of the CGP learning algorithm was satisfactory (±5%). With the ANN model developed for the estimation of the surface roughness, the MEP values for surface roughness were found to be 11.4152% and 14.4418% for the testing and training data, respectively. e RMSE values were calculated as 0.1181 and 0.0774 for the testing and training data, respectively. e R 2 values were calculated as 95.6% and 98.6% for the testing and training data, respectively. e surface roughness can be completely calculated by the following formula: where Fi (i � 1, 2,. . .,5) can be calculated according to the following: Ei is calculated via the equation in Table 4. e weight values for the hidden and input layers are also given in Table 4.

Results of RSM.
e analysis of variance works with on parameters, namely, F statistics, the sum of squares (SS), and P value. e F statistics, which is derived by dividing the term mean square (MS) of a factor with MS of error, explains the relative importance of the factors. e SS defines the deviation from the mean, which is derived from that factor. e P value shows the statistical significance to a confidence interval of 95% (significance level α � 0.05). If the P value is lower than α, then that factor is significant [25]. e ANOVA analysis was operated with Minitab 18. From Table 5, the ANOVA results show that the depth of cut (ap) is the most effective parameter on surface roughness with a contribution of 35.48%. e cutting speed impacts the surface roughness with a contribution of 23.38%, after by the feed rate (f) with a contribution of 16.74%. e results are similar to the results of the studies conducted by the researchers [25,27]. e quadratic models of surface roughness have been improved by using the response surface methodology. e regression model is shown as follows with R 2 of 99.9%: (10) Figure 4 shows the differences between the measured and estimated parameter of Ra. Figures 5-7 show the 3D surface plot of the surface roughness according to cutting speed and feed rate (ap � 1.5 mm), cutting speed and depth of cut (f � 0.15 mm/rev), and feed rate and depth of cut (Vc � 150 m/min). Figure 5 indicates that Ra increases when

Advances in Materials Science and Engineering
ap is constant and f is increases. Figure 6 shows that Ra is increased when f is constant and ap increases. Similarly, Figure 7 shows that Ra is increased when Vc is constant and ap increases.  [18,28]. In order to show the comparison of the values of ANN and RSM models, experimental and estimated data of surface roughness are presented in Figure 8. Table 4: Weight values between the hidden and input layers for surface roughness.    4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 Run order Surface roughness, Ra Ra measured Ra predicted

Conclusions
is study compares the performance of both the artificial neural network and response surface methodology for surface roughness. e status of the milling of AA6061 aluminium alloy was studied. e cutting speed, feed rate, and depth of cut were examined as the effective factors in this investigation. As a result of the study, the following notes can be deduced.
(i) An ANN model was used to determine optimum machining conditions by estimating the influence of the cutting parameters on the surface roughness in milling .
For training, the ANN developed for determining the surface roughness was used by the backpropagation algorithm. For the training period, several algorithms including BFGS, CGP, LM, RP, and SCG were used.
As an outcome of the training trials for estimation of the surface roughness, the best result was acquired with the CGP learning algorithm and network architecture having eight hidden neurons. (ii) e experimental data acquired (

Data Availability
e data used to support the findings of this study are available within the article or from the corresponding author upon request.

Conflicts of Interest
e authors declare that they have no conflicts of interest.