Abstract
In the metal cutting process of machine tools, the quality of the surface roughness of the product is very important to improve the friction performance, corrosion resistance, and aesthetics of the product. Therefore, low surface roughness is ideal for mechanical cutting. If the surface roughness of the product can be predicted, not only the quality of the product can be improved but also the processing cost can be reduced. In this study a back propagation neural network (BPNN) was proposed to predict the surface roughness of the processed workpiece. ANOVA was used to analyze the influence of milling parameters, such as spindle speed, feed rate, cutting depth, and milling distance. The experimental results show that the root mean square error (RMSE) obtained by using the back propagation neural network is 0.008, which is much smaller than the 0.021 obtained by the traditional linear regression method.
1. Introduction
In metal cutting, the workpiece quality obtained by different machining parameters is also different. In the processing of the spindle, speed is fast and slow, the feed is high and low; in the processing of the chip, there are many factors affecting the final quality of the workpiece [1,2,3,4]. The back propagation neural network is used to detect the surface roughness [5]. Bit diameter, cutting speed, feed and processing time are used as inputs to the neural network structure, and the surface roughness is estimated. Design of Experiment (DOE) is a method to arrange the contents of the experiment and analyze the experimental data by using optimal words. This method has a wide range of applications, including production process and equipment parameters, process methods, raw materials, or formula selection, to improve product quality or output [6,7].
There are many ways to predict surface roughness and analyze each machining parameter. At present, the common prediction method is to establish the prediction model by using the method of neural network [8,9,10,11]. Zain et al. [12] present the Artificial Neural Network (ANN) model for predicting the surface roughness performance measure in the machining process by considering the ANN as the essential technique for measuring surface roughness. In the prediction of surface roughness, different processing parameters can be used as input to neural networks [13,14,15,16,17,18,19,20]. Zerti et al. [21] used the response surface methodology and the artificial neural networks approach for output modeling. The method of parametric analysis is also useful to analyze by many statistical methods. Surface roughness is not only an output but also an input to predict other processing parameters in neural networks. Thangarasu et al. [22], based on the response of cutting force and surface roughness, used artificial neural network to predict the side wear of cutting tools.
In this study, the machining method of milling was used for experiments, and the prediction was made by using the back propagation neural network, in which the input parameters were cutting depth, spindle speed, feed, milling pitch, and the output was the surface roughness of the workpiece. Linear regression was used to compare the root mean square error (RMSE) and ANOVA was used to analyze the relationship between parameters, and the influence of input parameters of output was discussed. In this study, the inverse transfer neural network was used for modeling. The input parameters were cutting depth, feed, spindle speed, milling pitch, and the output was workpiece surface roughness.
2. Prediction and Analysis of the Surface Roughness
2.1. Surface Roughness and Experimental Setup
The surface of any processed part has a complex structure with numerous ridges and depressions with different heights, depths, and gaps. Surface roughness refers to the small gaps in the surface of the high and low frequency of the formation of a depression. Surface roughness affects the amount of wear and tightness of parts when they engage with other objects. For all of these reasons, the need to numerically manage surface nuances has increased in recent years.
Figure 1 depicts the waveform of surface roughness. A baseline is presented in the figure as a reference. The surface roughness has irregular peaks and valleys.
Figure 1.
Surface roughness waveform.
Figure 2 depicts the contour curve of the arithmetic average height. The arithmetic average height represents the average of the absolute value of the base length.
Figure 2.
The arithmetic mean height of the contour curve.
When the contour curve depicts the roughness curve, Ra is called the arithmetic mean roughness; when the contour curve depicts the waviness curve, is called arithmetic mean waviness. Equation (1) is the mathematical formula of arithmetic average height. Ra was used the reference value.
where lr is benchmark length and is the arithmetic average height. A section of the reference length is sampled from the average direction of the roughness curve, and the X-axis and Y-axis are set in the sampling part of the mean line. When the roughness curve Y = Z(x), the values of is obtained by formula x in microns (μm).
The S220 CEXSH31000 micro grain carbide end milling tool (CMTec) was used in this study. The specifications of the tool are presented in Table 1.
Table 1.
Tool S220 specifications.
Four parameters, feed rate, spindle speed, cutting depth, and milling pitch, were evaluated in this study. The experiment was a three layer experiment. A total of 54 experiments were conducted. The recommended parameters for milling aluminum work pieces are presented in Table 2. The configuration of experimental parameters is depicted in Table 3.
Table 2.
S220 CEXSH31000 end mills milling parameter recommended value.
Table 3.
Experimental parameter configuration.
The MF400U Quaser five-axis vertical machining center was used in the experiment. The specifications of the machine are listed in Table 4.
Table 4.
Quaser five-axis vertical machining center MF400U.
2.2. BPNN
The BPNN is a multi-layer feedforward network with learning ability and is used to train an ANN; it includes at least three layers (input layer, hidden layer, and output layer). The BPNN is a supervised learning network. The training data and the target output data are input into the neural network, and the weights are adjusted repeatedly by using the steepest (a type of gradient descent) method to minimize the error between the neural network output and the actual value. Herein, we present theoretical and mathematical derivations of the BPNN. The BPNN is implemented as follows.
First, determine the input layer neurons , the number of hidden layer neurons , and number of output layer neurons .
Then, the bias between the weight value and the neural network is randomly set. is the weights between the input layer and hidden layer. is the weights between hidden layer and output layer. The deviation of is hidden layer. is biased output layer.
To calculate the output value of the hidden layer the formula is as follows:
where net is the product of the number of neurons in the hidden layer weighted sum, M; is the total number of input layer neurons, and the output value is the number of neurons in the hidden layer, and the nonlinear transform.
For the output value of the output layer the formula is as follows:
where net is the product of the number of neurons in output layer weighted sum, O is the total number of hidden layer neurons, and is the neural network output value.
For the error amount of the output layer the formula is as follows.
where the delta error volume is the number of neurons in the output layer; and between the amount of error. output value as the goal.
The error of the hidden layer the formula is calculated as follows.
where denotes the number of neurons in the hidden, and the N is the total number of output layer neurons.
For the weight value between the input layer and the hidden layer, the formula is as follows.
To calculate the deviation value of the hidden layer the formula is as follows.
For the weight value between the hidden layer and the output layer, the formula is as follows.
The offset value of the output layer is updated as follows.
The squared error of the output neuron is calculated as follows.
where E is the square error of the output neurons, is the target output value, and is the neural network output value. After one learning cycle, if the error obtained is smaller, the performance of neural network learning is better. The smaller the error between the output value of the neural network and the target output value is, the better.
According to Table 2, we designed the orthogonal table of L24. The training data of the BPNN are depicted in Table 5. A total of 54 data experiments were conducted. The 42nd group of data produced extreme data because of the relationship between the rotational speed and feed rate.
Table 5.
Experimental orthogonal table.
2.3. Analysis of Variance
Analysis of variance (ANOVA) was used to evaluate continuous and dependent variables. Furthermore, for the variables (independent variable), when the variable factors were contained in the equal to or more than three categories, we checked whether the average between all kinds did not equal statistical models
The three main assumptions of ANOVA are as follows:
- The ethnic distributions implied by each group of samples must be normal or approximately normal.
- Each group of samples must be independent.
- The number of ethnic variations must be equal.
The values required for ANOVA are summarized in Table 6, where Total Sum of Square Error: , Between Group Sum of Square Error: , Between Group Mean of Square Error: , Within Group Mean of Square Error: .
Table 6.
ANOVA table.
3. Results and Analysis
3.1. Effect of Input Parameters on Surface Roughness
According to the results, the influence of the cutting parameters on surface roughness can be categorized into two states. In the first state, one parameter is mutable and the other two parameters are constant. In the second state, the two parameters are interactive, and one parameter is constant. Thus, the surface roughness can be observed through the changes of the two parameters, leaving the other parameters unchanged. Figure 3, Figure 4, Figure 5 and Figure 6 depict the influence of four input parameters on surface roughness.
Figure 3.
The influence of cutting depth on surface roughness.
Figure 4.
The influence of spindle speed on surface roughness.
Figure 5.
The influence of feed on surface roughness.
Figure 6.
The influence of milling pitch on surface roughness.
From Figure 3, Figure 4, Figure 5 and Figure 6, it can be found that the smaller the cutting depth, the smaller the surface roughness measured. If the spindle speed gets faster, the surface roughness of the workpiece gets smaller. The smaller the feed rate, the smaller the surface roughness. In the milling spacing diagram, we find that the smaller the milling spacing, the smaller the surface roughness.
3.2. Results of ANOVA
ANOVA is a standard statistical tool for determining the effects of a single parameter from all input process parameters. In this analysis, the percentage contribution of each parameter is used to measure its corresponding effect on the output response. In this study, ANOVA was used to analyze the influence of milling parameters, that is, spindle speed, feed rate, cutting depth, and milling spacing will affect the surface roughness. Table 7, Table 8, Table 9 and Table 10 list ANOVA results for surface roughness and four input parameters.
Table 7.
ANOVA results for the cutting depth.
Table 8.
ANOVA results for the spindle speed.
Table 9.
ANOVA results for the feed.
Table 10.
ANOVA results for the milling pitch.
For the cutting depth, spindle speed, feed rate, and milling distance, p-values are far less than 0.0001, which means that these four processing parameters and surface roughness have a first relation. The main contribution of cutting depth was 51.86%. The contribution of spindle speed was 77.48%. The contribution of feed was 92.3%. The contribution of milling spacing was 71%. ANOVA statistics show that the cutting depth is a parameter with low contribution. From the value of F, it was found that the model is meaningful. In general, surface roughness is measured as a function of feed speed. Therefore, it has the physical significance and the greatest contribution. The contribution of spindle speed and milling spacing is similar.
3.3. Parameter Analysis of BPNN
The back propagation neural network is a multi-layer feedforward network with learning ability. It is a method to train the artificial neural network, including at least three layers (input layer, hidden layer, and output layer). Its learning is a kind of supervised learning. The training data and the target output data were input into the neural network, and the weights were adjusted repeatedly by using the gradient steepest descent method to minimize the error between the neural network output and the actual value. Next, we will introduce the theory and mathematical derivation of back propagation neural networks.
When the learning rate is too small, it can avoid network vibration. However, this phenomenon leads to slow convergence, which results in a slow learning rate. If the learning rate is too large, the target value can be approached faster. However, too much correction can result in network vibration, or even lead to network weight value divergence.
The inertia factor is the change from the previous weighted value to the next weighted value. Typically, the value is between 0 and 1. The weights should be moved in the same direction.
In this study, a three-layer BPNN was proposed (Figure 7). The input layer had four neurons, including the feed, spindle speed, cutting depth, and milling spacing. According to the experiment, the hidden layer was divided into 20 and 30 neurons. The following experiment was conducted to analyze the number of hidden layer neurons. One neuron in the output layer was surface roughness.
Figure 7.
Proposed BPNN architecture.
The target value of each training data back propagation neural network (Tn) and back propagation neural network output prediction (Yn), calculation error, and RMSE were calculated between two calculations.
The RMSE is the square root of MSE and denotes the accuracy of the prediction and the degree of deviation between the predicted and target values. The smaller the value is, the higher the accuracy is.
The RMSE is calculated as follows:
where N is the total number of data.
We analyzed these parameters in Table 11. The iteration of the RMSE (g), vector (η, eta), inertial factor (α, alpha), and the number of hidden layer neurons (Hn) are depicted, and the RMSE values are listed in in Table 11.
Table 11.
Parameters of the back propagation neural network.
Too few neurons in the hidden layer can lead to large errors. Here, the number of hidden layer neurons was too large. Although the error value can be reduced, this slows the convergence rate.
Table 12 indicates that the lowest RMSE was obtained for experiment 36. The inertia factor for all the experiments was 0.8. Next, we analyzed the RMSE changes for the four parameters (Figure 8, Figure 9, Figure 10 and Figure 11).
Table 12.
BPNN parameter experiment results.
Figure 8.
Iteration variables for RMSE.
Figure 9.
Learning rate variables for RMSE.
Figure 10.
Inertia factor variables for RMSE.
Figure 11.
Number of hidden layer neuron variables for RMSE.
The results of the experiments indicated that the number of iterations increased from 500,000 to 1,000,000 and then to 2,000,000. The RMSE decreased with the increase in the number of iterations. However, iterations did not affect the training time, learning rate, and inertia factor.
According to Figure 10, the higher the learning rate is, the lower RMSE is.
The experiment result indicated that an increase in the inertia factor reduces the RMSE. If the value is too small, the error does not converge, resulting in the RMSE being too large.
The results in Figure 11 indicate that number of neurons in the hidden layer has a negligible effect on the RMSE. Too many neurons can result in divergence and can increase the training time, leading to increased errors.
3.4. Predictive Results of BPNN
According to Table 12, the lowest RMSE was obtained for experiment 36. Figure 12 illustrates the learning rate curve of each experiment and presents a representation of the convergence process and MSE. The learning rate graph was obtained by calculating the average value of 10 experiments.
Figure 12.
Learning rate curves (: 2,000,000, : 0.8, : 0.5, : 20).
The measured value of the surface roughness instrument used in this experiment is the third place after the decimal point, and thus, the error value is required to be as small as possible. The changes in the target and predicted values listed are shown in Figure 13.
Figure 13.
Target and predicted results of BPNN.
The coefficient () is used to measure the dependent variable and independent variables in statistical differences and explains the relationship between the target and predicted values. Typically, the value is between 0 and 1, and the value is closer to 1, which indicates excellent predictive power.
The determination coefficient is as follows:
where is the sum of the residual square target and predicted values. is the sum of the target and average error. is the predicted value, is the target value, and T is the target of the average.
The predication performance of linear regression was compared with that of BPNN. We substituted an input parameter into the equation to obtain the linear regression equation of surface roughness, which is expressed as follows:
where Y is the surface roughness, is cutting depth, is spindle speed, is feed rate, is milling pitch
Table 13 indicates that the RMSE of the BPNN was less than that of linear regression and that the value reached 0.9995, which is higher than that (0.7794) of linear regression, indicating that the BPNN is more accurate than linear regression.
Table 13.
BPNN parameter experiment results.
4. Conclusions
In this study a BPNN was used to predict the surface roughness in CNC end milling. Furthermore, this study analyzed the influence of CNC parameters including cutting depth, spindle speed, feed rate, and milling pitch on surface roughness. The contributions of this study are summarized from the experimental results as follows.
- (1)
- In the measurement experiment of surface roughness, the CNC parameters with a smaller cutting depth, a faster spindle speed, and a smaller feed rate will obtain a better surface roughness.
- (2)
- According to ANOVA, the contributions of the cutting depth, spindle speed, feed rate, and milling pitch in CNC were 51.86%, 77.48%, 92.3%, and 71%, respectively. This result shows that the feed rate has a greater influence on the surface roughness.
- (3)
- In the process of training neural networks, when the used BPNN with the number of iterations is set to 2,000,000, the learning rate is set to 0.8, the inertia factor is set to 0.5, and the number of hidden layer neurons is set to 20 it will have a lower RMSE.
- (4)
- In this study, linear regression and the used BPNN were compared. From the experimental results, it can be verified that the used BPNN has a lower RMSE and a higher . Furthermore, the prediction accuracy of linear regression and the used BPNN were 97.88% and 99.17%, respectively. According to the results, the used BPNN achieves excellent prediction of surface roughness.
Author Contributions
Conceptualization, C.-H.C. and C.-J.L.; Methodology, C.-H.C. and C.-J.L.; Software, S.-Y.J. and C.-H.C.; Data Curation, C.-H.C. and C.-J.L.; Writing—Original Draft Preparation, C.-H.C., S.-Y.J. and C.-J.L.; Writing—Review & Editing, C.-H.C., S.-Y.J. and C.-J.L.; Supervision, C.-H.C. and C.-J.L.; Funding Acquisition, C.-J.L. All authors have read and agreed to the published version of the manuscript.
Funding
This research was funded by the Ministry of Science and Technology of the Republic of China, grant number MOST 110-2218-E-005-016 and MOST 110-2221-E-167-031-MY2.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
Data sharing not applicable.
Acknowledgments
The authors would like to thank the funding support of the Ministry of Science and Technology of the Republic of China.
Conflicts of Interest
The authors declare no conflict of interest.
References
- Kohli, A.; Dixit, U.S. A neural-network-based methodology for the prediction of surface roughness in a turning process. Int. J. Adv. Manuf. Technol. 2004, 25, 118–129. [Google Scholar] [CrossRef]
- Unune, D.R.; Mali, H.S. Artificial neural network–based and response surface methodology–based predictive models for material removal rate and surface roughness during electro-discharge diamond grinding of Inconel 718. Proc. Inst. Mech. Eng. Part B J. Eng. Manuf. 2016, 230, 2082–2091. [Google Scholar] [CrossRef]
- Sharma, V.S.; Dhiman, S.; Sehgal, R.; Sharma, S.K. Estimation of cutting forces and surface roughness for hard turning using neural networks. J. Intell. Manuf. 2008, 19, 473–483. [Google Scholar] [CrossRef]
- Tsao, C.C.; Hocheng, H. Evaluation of thrust force and surface roughness in drilling composite material using Taguchi analysis and neural network. J. Mater. Process. Technol. 2008, 203, 342–348. [Google Scholar] [CrossRef]
- Sanjay, C.; Jyothi, C. A study of surface roughness in drilling using mathematical analysis and neural networks. Int. J. Adv. Manuf. Technol. 2006, 29, 846–852. [Google Scholar] [CrossRef]
- Alagarsamy, S.V.; Ravichandran, M.; Meignanamoorthy, M.; Sakthivelu, S.; Dineshkumar, S. Prediction of surface roughness and tool wear in milling process on brass (C26130) alloy by Taguchi technique. Mater. Today Proc. 2020, 21, 189–193. [Google Scholar] [CrossRef]
- Benardos, P.G.; Vosniakos, G.C. Prediction of surface roughness in CNC face milling using neural networks and Taguchi’s design of experiments. Robot. Comput. Integr. Manuf. 2002, 18, 343–354. [Google Scholar] [CrossRef]
- Paturi, U.M.R.; Devarasetti, H.; Narala, S.K.R. Application of Regression and Artificial Neural Network Analysis In Modelling Of Surface Roughness In Hard Turning Of AISI 52100 Steel. Mater. Today Proc. 2018, 5, 4766–4777. [Google Scholar] [CrossRef]
- Markopoulos, A.P.; Manolakos, D.E.; Vaxevanidis, N.M. Artificial neural network models for the prediction of surface roughness in electrical discharge machining. J. Intell. Manuf. 2008, 19, 283–292. [Google Scholar] [CrossRef]
- Fredj, N.B.; Amamou, R. Ground surface roughness prediction based upon experimental design and neural network models. Int. J. Adv. Manuf. Technol. 2006, 31, 24–36. [Google Scholar] [CrossRef]
- Bagci, E.; Işık, B. Investigation of surface roughness in turning unidirectional GFRP composites by using RS methodology and ANN. Int. J. Adv. Manuf. Technol. 2006, 31, 10–17. [Google Scholar] [CrossRef]
- Ahmad, N.; Janahiraman, T.V.; Tarlochan, F. Modeling of Surface Roughness in Turning Operation Using Extreme Learning Machine. Arab. J. Sci. Eng. 2015, 40, 595–602. [Google Scholar] [CrossRef]
- Ezugwu, E.O.; Fadare, D.A.; Bonney, J.R.; Silva, B.D.; Sales, W.F. Modelling the correlation between cutting and process parameters in high-speed machining of Inconel 718 alloy using an artificial neural network. Int. J. Mach. Tools Manuf. 2005, 45, 1375–1385. [Google Scholar] [CrossRef]
- Karpat, Y.; Özel, T. Multi-objective optimization for turning processes using neural network modeling and dynamic-neighborhood particle swarm optimization. Int. J. Adv. Manuf. Technol. 2006, 35, 234–247. [Google Scholar] [CrossRef]
- Lee, S.S.; Chen, J.C. On-line surface roughness recognition system using artificial neural networks system in turning operations. Int. J. Adv. Manuf. Technol. 2003, 22, 498–509. [Google Scholar] [CrossRef]
- Karayel, D. Prediction and control of surface roughness in CNC lathe using artificial neural network. J. Mater. Processing Technol. 2009, 209, 3125–3137. [Google Scholar] [CrossRef]
- Mulay, A.; Ben, B.S.; Ismail, S.; Kocanda, A. Prediction of average surface roughness and formability in single point incremental forming using artificial neural network. Arch. Civ. Mech. Eng. 2019, 19, 1135–1149. [Google Scholar] [CrossRef]
- Zhong, Z.W.; Khoo, L.P.; Han, S.T. Prediction of surface roughness of turned surfaces using neural networks. Int. J. Adv. Manuf. Technol. 2005, 28, 688–693. [Google Scholar] [CrossRef]
- Dhokia, V.G.; Kumar, S.; Vichare, P.; Newman, S.T.; Allen, R.D. Surface roughness prediction model for CNC machining of polypropylene. Proc. Inst. Mech. Eng. Part B J. Eng. Manuf. 2008, 222, 137–157. [Google Scholar] [CrossRef]
- Sonar, D.K.; Dixit, U.S.; Ojha, D.K. The application of a radial basis function neural network for predicting the surface roughness in a turning process. Int. J. Adv. Manuf. Technol. 2005, 27, 661–666. [Google Scholar] [CrossRef]
- Zerti, A.; Yallese, M.A.; Zerti, O.; Nouioua, M.; Khettabi, R. Prediction of Mechanical Engineers. Part C J. Mech. Eng. Sci. 2019, 233, 4439–4462. [Google Scholar] [CrossRef]
- Thangarasu, S.S.; Mohanraj, T.; Devendran, K. Tool wear prediction in hard turning of EN8 steel using cutting force and surface roughness with artificial neural network. Proc. Inst. Mech. Eng. Part C J. Mech. Eng. Sci. 2019, 234, 329–342. [Google Scholar]
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).