Prediction of QCE using ANN and ANFIS for milling Alloy 2017A

Population growth and economic development, particularly in developing market nations, are driving up global energy consumption at an alarming rate. Despite increased wealth, growing demand presents new obstacles. Computer Numerical Control (CNC) machine tools are widely used in most metal machining processes due to their efficiency and repeatability in achieving high-precision machining. It has been shown that figuring out the best cutting parameters can improve the results of machining, leading to high efficiency and low costs. This study identifies and examines thoroughly the scientific contributions of the influence of strategies, machining sequences, and cutting parameters on surface quality, machining cost, and energy consumption (QCE) using artificial intelligence (ANN and ANFIS). The results show that the 3.10−3 architecture with the Bayesian Regularization (BR) algorithm is the optimal neural architecture that yields an overall mean square error (MSE) of 2.74 10−3. The correlation coefficients (R2) for Etot, Ctot, and Ra are 0.9992, 1, and 0.9117 respectively. Similarly, for the adaptive neuro-fuzzy inference system (ANFIS), the optimal structure which gives a better error and better correlation is the {2, 2, 2} structure, and this for the three output variables (Etot, Ctot, and Ra). The correlation coefficient (R2) for the variables Etot, Ctot, and Ra are respectively 0.95, 0.965, and 0.968. The results show that the use of the Bayesian Regularization algorithm with a multi-criteria output response can give good results when compared with the adaptive neuro-fuzzy inference system.


Introduction
The manufacturing sector is one of the world's largest consumers of electrical energy.With the increase in the cost of energy and the associated carbon emissions, reducing energy demand has become an urgent challenge for manufacturers in recent years.The machine tool consumes a great deal of electrical energy.With the aim of reducing energy consumption and cost in CNC machining, the selection of optimal machining strategies and cutting parameters is considered one of the most important saving policies.The use of new prediction and optimization techniques with artificial intelligence technology can positively contribute to this economic policy.Several researchers have used artificial intelligence tools to solve prediction and optimization problems in mechanical manufacturing.Kant and Sangwan 1 used the neural network to predict energy consumption and surface roughness.They performed machining experiments to verify the suitability of the proposed model for predicting energy consumption and surface roughness.The results predicted by the proposed model indicate a good synchronism between the predicted values and the values.
Eser et al. 2 studied the milling surface roughness (Ra) of Alloy AA6061.An experimental model has been improved to assess surface quality using response surface methodology (RSM) and artificial neural networks (ANN).
In mechanical manufacturing, machine tools consume energy that can reach critical values.Improving the energy efficiency of machine tools can lead to a significant reduction in the cost of products.Research on reducing energy consumption is still insufficient in view of the increasing use of energy sources. 3For example, Guo et al. 4 presented an approach that integrates both surface roughness and energy consumption to optimize cutting parameters during turning.Aramcharoen and Mativenga 5 studied how different tool paths can influence the direct energy demand in machining.Therefore, they suggested a way to drastically reduce the energy intensity at the level of material removal.Experimentation demonstrates that the energy consumption of the unidirectional method for the y axis, about 230 kWh, is more than that of the parallel contour, 120 kWh.Li et al. 6 carried out a set of experiments to demonstrate the performance of operational strategies in the milling process.The authors used five tool path strategies in this process namely: bidirectional along x, parallel contour, bidirectional along y, bidirectional at an angle of 45°, and spiral contour.The results showed, that the maximum specific energy consumed (SEC) is given by the strategy of the spiral contour (87 J/mm 3 ).On the other hand, the minimum energy is given by the bidirectional strategy along x (53.1 J/mm 3 ).
Few researchers have evaluated optimal cutting conditions based on minimum cost during the manufacturing process.For example, Li et al. 7 studied multi-pass milling face milling.Next, used multi-objective optimization to maximize energy efficiency and minimize production costs by the adaptive multi-objective particle swarm.The results showed that increasing cutting speed, depth of cut, and feed rate simultaneously reduced production time and cost.To achieve energysaving and low cost of CNC machining, Xiao et al. 8 used a multi-objective optimization approach by integrating the APSO particle swarm optimization algorithm and the improved genetic algorithm NSGA-II.Experimental results have shown that the multiobjective optimizations model is feasible and efficient and that it can effectively help operators balance energy consumption and manufacturing costs.
Optimizing this process has become a primary stake to reach higher productivity and quality.To optimize process planning, it is important to select a suitable machining strategy. 9The main objective of this research is to provide a multi-criteria help tool for determining the optimal machining process by integrating the factors: Quality, Cost, and Energy (QCE).
The inventory of the main works of research on the optimization of the machining process shows the wide variety of tools and parameters that can influence this process.The studies presented in this bibliographic research are mainly devoted to the definition of simple machining entities (facing, pocket, etc.).On the other hand, most of these studies use some strategies without taking into account the machining ranges (sequences).It was also found that the influence of machining strategies and sequences on the manufacturing cost is nonexistent in all previous studies.Finally, there is no study or model that takes into account cutting parameters, strategies, and machining ranges at the same time for the modeling and optimization of surface quality Ra, machining cost C tot , and energy E tot consumed (QCE) of numerically controlled machine tools to machine interacting entities using artificial neural networks (ANN) and adaptive neuro-fuzzy inference system (ANFIS), which will be the subject of this article.

Experimental methods
The main objective of manufacturing industries is to minimize the cost of the finished product as much as possible while maintaining the superior quality of the product.Today, energy consumption has become the main factor that directly influences the cost of machining.Faced with this problem, it is necessary to minimize the energy consumption of machine tools in the machining process.This minimization cannot be obtained without knowing all the machining strategies.The problem gets a bit more complicated when we talk about interacting machining features.A machining strategy is a methodology used to generate a series of operations to produce a given shape.The choice of these strategies will be to achieve well-determined specifications and shapes.In this context, three machining strategies have been chosen (zigzag, zig, and Inward parallel contour), Figure 1(a).
In this part, the case of pocket/groove features has been studied by illustrating the effects of the planning of machining sequences, machining strategies, and cutting parameters on the surface quality, manufacturing cost, and energy.Figure 1(b) presents the machining features associated with the selected part.In order to make this part, the machining features will be used to finally obtain a set of combinations of sequences called the ''machining range.''

Materials and measurements
The machine used is a Realmeca C300H 4-axis machining center.The center generates power between 5.5 and 7.5 kW with a maximum rotation frequency of 6500 rpm.This machine is powered by 380 V electrical energy and 6 bar pneumatic energy.The Catia V5 software used in this work makes it possible to create the tool paths and then generate the G-code program compatible with the Num director of the center.The tool used is an uncoated high-speed steel tool with a diameter of 8 mm and two teeth (Figure 2).
The material of the machined part is an aluminum alloy (2017A: AlCu4MgSi).This material is widely used in the aerospace, automotive, etc. industries.This material has high mechanical characteristics after treatment and also good machinability, polishability, and good heat resistance between 100°C and 250°C.Table 1 shows the chemical composition of the material used.
A Chauvin-Arnoux CA8332 power analyzer was used in order to measure the power consumed by the machine at each instant during a machining operation.Data processing is performed using the Power Analyzer's Dataview interface.The arithmetic surface roughness Ra is measured using a KR100 roughness meter.The stroke measured is 6 mm for a caliber of 2.5 mm.The work plan is shown in Figure 3. Two studies will be carried out in order to reduce energy consumption, minimize the cost of machining and increase the surface quality of the machined part.The working method for the first case study consists of carrying out a set of machining sequences with different strategies while keeping the cutting parameters constant, namely; cutting speed, feed rate, and depth of cut.This is in order to see the influence of sequences and machining strategies on energy consumption, cost, and surface quality.Following and after the realization of the first case and the prediction of the optimal sequence by the use of gray relational analysis, an experimental plan with a variation of the cutting parameters on this sequence will be carried out in the second case.The objective, in this case, is to predict the experimental results by the use of artificial intelligence and to determine the effects of the cutting parameters on the output responses.
One of the big problems in companies is determining the time and cost of manufacturing such a product. 10n the case of CNC machining, it is also interesting to determine the time and cost of each operation in order to choose the optimal machining sequence which takes into account quality, cost, and energy (QCE) in its execution.The cost of a machining operation can be estimated by the equation: Results and discussion

First case
The first case study focuses on the variation of machining strategies and sequences by setting the cutting parameters for all the tests.The choice of technological machining parameters was made taking into account the catalog of the tool manufacturer and the capacity of the machining center.Table 2 presents the cutting parameter values used in this first part.This study takes into consideration the machining sequences and  strategies (tool paths) in order to obtain the optimal sequence.Table 3 illustrates the values of energy consumed, cost, and roughness.According to this table, the sequence S 8 = F 1 -F 5 -F 6 has the minimum cost and energy.This sequence is characterized by the fact that the tool along its trajectory is in full material (cutting phase).This condition saves a significant amount of cutting time.On the other hand, the S 8 sequence is realized by the IPC strategy for all the features F 1 -F 5 -F 6 , which proves that the choice of the tool path and the machining sequence has a significant influence on the cost and energy.
Industry and researchers face a big challenge when they try to study the surface quality of machined parts.Most researchers who have worked on surface quality as a function of the tool path have used a single machining feature in their studies.Examples of this claim are the work of Zaleski et al. 11 and Ali et al. 12 Indeed the use of interacting features with a set of tool paths can lead to logic of the choice of surface quality.On the other hand, an overlay of tool paths when machining Fi features can modify the surface texture of the machined part.
Figure 4 shows the surface roughness of successive machining of F 1 -F 2 features for sequences S 1 , S 5 , and S 7 with IPC-IPC, Zigzag-IPC, and Zig-IPC strategies, respectively.The Figure 4 shows that machining F 1 and then F 2 (F 1 -F 2 ) with Zig-IPC strategies has the lowest roughness.According to the references by Aramcharoen and Mativenga 5 and Ali et al., 12 the Zig strategy for machining a single feature has the maximum roughness compared to the IPC strategy, which has the lowest roughness.In this study, the problem is a little different since the tool for the first feature F 1 creates several passes with the same strategy in order to complete the depth h of the part.Then the tool will switch to executing F 2 with another strategy.The problem occurs in the last pass for feature F 2 .Indeed, the tool causes the last pass with this new strategy, which passes over the texture left by the first strategy of the feature F 1 .This phenomenon can cause a super finish in the F 1 area.This is possible when the first strategy has a poor surface quality compared to the second strategy.The next step is to determine the optimal sequence S i , which gives minimum energy consumption, machining cost, and surface roughness.
After carrying out the experimental tests for this first case, it is now necessary to determine the optimal machining sequence.In this study, there are three output responses, namely energy consumed, cost, and roughness.In this case, it is necessary to have a tool capable of solving this multi-criteria optimization problem.Gray relational analysis (GRA) helps to solve this type of uncertainty problem given its ability to understand uncertain systems with partially known information. 13In this first study, the cutting parameters are constant for all the tests, so the combination S8 = F 1 -F 5 -F 6 with the same IPC machining strategy is the optimal combination.][15] In what follows, the study relates to this sequence S 8 with the combination F 1 -F 5 -F 6 .

Second case
In this second part, the objective is to determine the effects of the cutting parameters on the output variables, E tot , C tot , and Ra.Predicting experiment results has been done by using neural networks (ANN) and adaptive neuro-fuzzy inference systems (ANFIS).The cutting parameters associated with this part are shown in Table 4.
The depth of cut (a p ) is chosen to ensure that for each level, the tool removes the same depth.The total cutting height of the part is h = 1.5 mm.Table 5 presents the experimental values of the 15 trials of E tot , C tot , and surface quality Ra for the machining of the S 8 sequence with a different combination of cutting parameters.
Prediction with artificial neural network (ANN).ANN models are programming techniques that simulate the human brain. 16These models have been implemented in several scheduling, and other industry applications. 17Nonlinear regression analysis of network output responses 18 is used to Figure 5 out how well neural network-based predictions work.In general, a neural network consists of three layers, input layers, hidden layers, and output layers.
Two proposals for neural architecture were presented in this study in order to determine the structural performance of a neural network.The first architecture consists of three inputs (V C , f, and a p ) and three  The objective of this study is to determine the optimal structure at the output level, number of hidden neurons, and level of the learning algorithm used.The performance of all structures is measured using the Mean Squared Error (MSE) during the algorithm learning process.The MSE is given by the following equation: The second performance criterion is the correlation coefficient (R 2 ).The correlation coefficient varies between 21 and + 1. R 2 close to + 1 indicates a strong positive linear relationship between input parameters and output variables. 19The R 2 coefficient is calculated from this equation: Several learning algorithms use back-propagation in their processing systems to determine the weights and biases of neural structures.For structural neural network modeling, the Levenberge-Marquardt (LM) algorithm, the Scaled Conjugate Gradient (SCG) algorithm, and the Bayesian Regularization (BR) algorithm were used.The present work uses the sigmoid function as an activation function in order to normalize the output response.For all neural architectures, the data is divided into three groups: learning, testing, and validation.70% of the data is devoted to the learning phase, 15% to the testing phase, and finally 15% to validation. 20Table 6 shows the values of MSE and R 2 for the different algorithms and the different architectures.After several tests, the optimal architecture in this study for a single output is {3-10-1} for the output variable E tot and {3-14-1} for  the variables C tot and Ra.The same Levenberge-Marquardt (LM) learning algorithm is used to realize all optimal structures.The optimal architecture with three outputs (E tot , C tot , and Ra) is now presented by the {3-10-3} architecture realized with the Bayesian Regularization (BR) algorithm.The back-propagation algorithm was very good at predicting the amount of energy used the cost of machining, and the quality of the surface.Figure 6 shows the predicted values of E tot , C tot , and Ra versus the experimental values for the three-lead structure.The correlation coefficients (R 2 ) for E tot , C tot , and Ra are 0.9992, 1, and 0.9117 respectively.So, from Table 6 and Figure 6, the conclusion is drawn that the Levenberge-Marquardt (LM) algorithm has good learning with a single output response.On the other hand, the Bayesian Regularization (BR) algorithm has good learning with a multi-criteria response (three for this work).By comparison between these architectures, the {3-10-3} architecture with the (BR) algorithm has a good correlation compared to the other architectures.The MSE global mean square error for this architecture is 2.74 10 23 .Therefore, the use of artificial intelligence by neural networks seems to be a useful methodology to simulate multi-criteria responses in mechanical manufacturing.In what follows, the {3-10-3} architecture will be retained.
Prediction with ANFIS model.2][23] ANFIS is a hybrid fuzzy inference approach from Sugeno 24,25 which simultaneously combines a fuzzy inference system (FIS) with a neural network (NN).This combination aims to make the system efficient in order to solve complex problems. 26In the general case, the ANFIS model includes five consecutive treatment lines.The lines (layers) are connected to each other by different nodes.Each entry node is drawn from the previous line.
In this present work, in order to find the optimal architecture of the ANFIS model, a combination of numbers and types of MF was carried out.The MF functions used in this work are the triangular shape membership function (trimf), the Gaussian shape function (gaussmf), and the function (gauss2mf).The numbers of MF used are {2 2 2}, {2 2 3}, and {2 3 3}.The membership function of constant and linear types is used for the output variables.The ANFIS modeling process runs with 75% of the data for training and 25% for testing.In this process, the iteration number for the mapping is equal to 100.The findings show that structure {2 2 2} is the best configuration for the three output replies (E tot , C tot , and Ra).With a linear output, the function (trimf) has the lowest test error for the

Comparative study between ANN and ANFIS
A comparative study of two models, ANN and ANFIS, was carried out to value this work.6 (ANN), Figure 7 (ANFIS), and comparison Table 7 shows that the use of the Bayesian Regularization (BR) algorithm with a multi-criteria output response can give good results when compared with ANFIS.

Development of an intelligent simulator based on prediction models ANN and ANFIS
An interactive interface has been developed to help machinists predict the energy consumed, surface quality, and cost of a 2017A alloy part containing an interacting pocket and groove.The simulator was implemented using the ''Guide'' interface of the Matlab 2016 software.Figure 8 shows this user interface Table 7.The MSE_ALL values of the ANN and ANFIS models (second case).
Model MSE_ALL E tot C tot Ra ANN (3-10-3) ß---------------------------2.74 10 23 -------------------------------à ANFIS (2 2 2) 0.01913 3.399 4.95 23 named ''QCE_Intelligent_simulator,'' which is simple and extremely easy to learn.As shown in the Figure 8, the user must first input the values of the cutting parameters (Inputs), that is, the cutting speed (V c ), the feed rate (V f ), and the depth of cut (a p ). Subsequently, the user has the choice to predict the results according to the ANN model or the ANFIS model by pressing the ''Predict'' button.The Catia-machine interaction is achieved through the production of a G-code program according to the ISO 6983 standard compatible with the CNC director Num of the machining center.The power is measured in real-time during the execution of the machining operation.The actual results are compared to what was expected after the data and results have been analyzed.When another operation is executed, the machining parameters are updated.

Discussion
In traditional ANN training, the objective is to minimize a cost function that measures the discrepancy between the predicted outputs of the network and the target outputs.However, this approach often leads to overfitting.Bayesian Regularized Artificial Neural Networks (BRANNs) introduce Bayesian regularization techniques to address this issue.The key idea is to introduce prior knowledge about the model parameters into the training process.Instead of searching for a single set of weights that minimizes the cost function, BRANNs treat the weights as random variables and compute their posterior distribution given the training data and prior knowledge.
To incorporate Bayesian principles, BRANNs use prior distributions to specify the initial beliefs about the weights.These prior distributions encode assumptions about the weight values, such as their means and variances.During training, the network updates these prior distributions based on the observed data, resulting in posterior distributions that reflect the updated beliefs about the weights.Instead of providing a single prediction, BRANNs can generate a distribution of predictions, [27][28][29] which represents the uncertainty associated with each prediction.This uncertainty estimation can be valuable in decision-making processes where knowing the confidence or reliability of the predictions is crucial.
When comparing ANN and ANFIS (Adaptive Neuro-Fuzzy Inference Systems) in general, rather than a specific modification of either model, several factors come into play.ANFIS combines fuzzy logic with neural networks to provide a hybrid approach that incorporates linguistic if-then rules into the learning process.This allows ANFIS to capture and utilize expert knowledge effectively.In conclusion, the choice between ANN and ANFIS depends on the specific requirements of the problem at hand.BRANNs, as a variant of ANN, provide a regularization technique that can enhance the generalization and uncertainty estimation capabilities of ANNs.By incorporating Bayesian principles, BRANNs strike a balance between fitting the training data and avoiding overfitting, making them a valuable tool for various applications.However, the comparison between ANN and ANFIS should be made considering their inherent characteristics and the specific needs of the problem domain, rather than focusing solely on a modification of one of them.

Conclusion
The increase in the world's population promotes an increased demand for products, which requires enormous energy consumption in industries.In order to evaluate the trade-offs between cut quality, manufacturing cost, and energy consumption (QCE).This article presents an approach that integrates artificial neural networks (ANN) and adaptive neuro-fuzzy inference system (ANFIS) to predict the effects of strategies, machining sequences, and cutting parameters on the consumption of energy, machining cost, and surface roughness.Two in-depth case studies were carried out to understand the effects of the parameters introduced into the multi-criteria output responses.Based on the results already found, the studies first show that the strategies and the planning of the machining sequences have a remarkable influence on the energy consumption, the cost of machining, and the surface quality of the parts.In this work, a multi-objective optimization based on the gray relational analysis was proposed, which is applied to optimize the sequences and strategies of machining on a part that contains interacting entities.The results obtained confirm that the proposed optimization method is a very indispensable tool for multi-criteria optimization.The use of a variety of architectures and a variety of learning algorithms for the construction of neural networks allows us to increase the range of choice and the rigorous selection of the optimal solution (architecture + algorithm).The {3-10-3} architecture with the Bayesian Regularization (BR) algorithm is the optimal neural architecture that yields an overall mean square error (MSE) of 2.74 10 23 .Similarly, for the adaptive neuro-fuzzy inference system (ANFIS), the optimal structure which gives a better error and better correlation is the {2 2 2} structure, and this for the three output variables (E tot , C tot , and Ra).
Future work will aim to extend multi-criteria output responses to account for other factors (e.g.dimensional error, vibration).Finally, an application to a wider range of prediction and optimization with other methods of artificial intelligence can contribute positively to the desired performance.

Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.

Table 1 .
Chemical composition of the material (wt%).