{'fraction_non_alphanumeric': 0.030949720670391062, 'fraction_numerical': 0.013258845437616388, 'mean_word_length': 4.9039138082673706, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Energy Consumption Analysis Of Machining Centers Using Bayesian Analysis And Genetic Optimization

Responding to the current urgent need for low carbon emissions and high efficiency in manufacturing processes, the relationships between three different machining factors (depth of cut, feed rate, and spindle rate) on power consumption and surface finish (roughness) were analysed by applying a Bayesian seemingly unrelated regressions (SUR) model. For the analysis, an optimization criterion was established and minimized by using an optimization algorithm that combines evolutionary algorithm methods with a derivative-based (quasi-Newton) method to find the optimal conditions for energy consumption that obtains a good surface finish quality. A Bayesian ANOVA was also performed to identify the most important factors in terms of variance explanation of the observed outcomes. The data were obtained from a factorial experimental design performed in two computerized numerical control (CNC) vertical machining centers (Haas UMC-750 and Leadwell V-40iT). Some results from this study show that the feed rate is the most influential factor in power consumption, and the depth of cut is the factor with the stronger influence on roughness values. An optimal operational point is found for the three factors with a predictive error of less than 0.01% and 0.03% for the Leadwell V-40iT machine and the Haas UMC-750 machine, respectively.


Introduction
Energy-saving and emissions reduction are important challenges faced by different economic sectors due to their negative potential impacts on the environment and the acceleration of climate change. Improving energy efficiency, which reduces energy consumption, is an important task for almost all industrial processes, especially for the manufacturing industry. This poses a challenging opportunity to mitigate the current levels of emissions and reduce energy use through an appropriate assessment and characterization of manufacturing industry operations for improving their performance [1]. According to the International Energy Agency (IEA), the manufacturing industry is responsible for approximately 33% of global energy consumption and as much as 36% of global carbon emissions [1,2]. For machining processes (i.e., drilling, turning, or milling), a maximum efficiency of 30% has been reported [2]. In general, the industrial sector is expected to gradually grow over the next few decades, leading to increased demand for machining processes and, consequently, increased energy consumption and carbon emissions [3]. Energy savings for machining processes can be classified into two branches. The first is the improvement of cutting technologies, such as high-speed, cutting tools and their materials. The second is to examine the relationship between the process parameters and the power required for process functionality to optimize energy consumption by applying models and optimization methods for energy savings. For instance, [4] proposed two alternatives to analyse the optimization problem: design strategies and operational strategies. Design strategies include all the aspects related to machine improvement, such as power aspects and maintenance prediction, which includes the control systems [5,6]. For most common industries, design strategies are not the best solution because they require downtime or machine center inactivity for strategy implementation, which can increase economic losses. On the other hand, operation strategies correspond to all the operational variables and tools, including cutting parameters, tool paths, and process planning [7,8,9]. The most common factors considered in operational strategies are the feed rate [10,11,12], depth of cut [10,6,1,5,13], cutting speed [14,12,15] cutting edge radius [16,17] and vibration signals [18,15]. Operational strategies have been focused on output variable optimization through experimental, theoretical, or mixed approaches. Some of the most studied output variables reported in the literature are the specific energy coefficient or power machining consumption, the surface finish or surface roughness, and the material removal rate [10,6,1,5,13,14,12,19,20].
Currently, engineers are aware that setting the correct operational variables is the manufacturer's main purpose. Thus, truly understanding the interdependencies among the main operational factors and establishing the correct levels for the inputs in the machining process is a technological challenge [14,21,22]. In this sense, several authors have developed and proposed different approaches for optimizing machining parameters. For example, [14] developed a flank wear and surface roughness prediction model for a hot turning machining process based on response surface methodology (RSM). Their model had an 86.17% accuracy for surface roughneslinearities. However, its prediction accuracy is not the best for all phenomena. Considering a different approach, [18] used an artificial neural network (ANN) for surface roughness prediction considering the cutting speed, feed rate, and the depth of cut as input factors. The authors validated their hypothesis about the strong relationship between the feed rate and the surface finish, and they reported a maximum relative prediction error of 12.2% for the ANN. [23] proposed an ANN for the prediction of surface roughness. Their experiments were conducted on a CNC milling machine according to the principles of Taguchi's design of experiments, where the depth of cut, the feed rate per tooth, the cutting speed, the engagement and the wear of the cutting tool, the use of cutting fluid, and the three components of the cutting force were the controlled parameters. The author found the most influential parameters and attained a prediction level for the surface roughness with a mean percentage squared error equal to 1.86%. In a similar approach, [24] used a Taguchi optimization method for evaluating the cutting speed, feed rate, and cut depth of cut in AISI H13 steel machined with a TiN-coated P10 carbide tool. The authors used an orthogonal array, signal-to-noise (S/N) ratio, and Pareto analysis of variance (ANOVA) to analyse the effect of these milling parameters. They concluded that the Taguchi metho was viable for solving machining problems with a minimum number of procedures. [25] used an ANN predictive model for critical process parameters to predict the cutting forces. For its implementation, the authors used a particle swarm optimization (PSO) algorithm to optimize cutting conditions such as feed and speed. They reported machining time reductions of up to 35%. [26] studied the cutting forces, spindle motor current, and sound pressure level in a CNC milling process to examine tool wear. The authors used a neural networkbased sensor fusion model and proposed newer methods such as feature space filtering and prediction space filtering, among others, to improve prediction accuracy in a real-time error-prone environment. [27] implemented another predicted cutting force model using regression and an ANN. The authors used the methodology to filter out abnormal data points, and the filtered data were used in a neural network for better prediction.
During a machining process, the cutting time is composed of different stages: the standby time (the whole system going towards the machining planning setup), the air time (the tool does not have any applied load), and effective cutting time (material removal through tool movement). A schematic diagram of the power profile showing the cutting stages is illustrated in Figure 1. All these cutting stages have a strong influence on the energy consumption for this type of process. Similarly, several studies have shown that the toolpath, cutting speed and depth, and spindle speed can strongly influence the effective cutting time. The effect of these parameters on the total power consumption of machining have also been noted [4,22,21]. Regardless of the known relationship between the process parameters, the power consumption, and the machining quality, it is necessary to extensively study, analyse, and predict the quality of the surface finish of manufactured parts considering optimal energy performance through the proper choice of operational factors.  This work presents a novel statistical analysis for an experimental study to analyse the energy consumption (EC) and surface roughness (SR) and their relationship with three controllable machining parameters. Specifically, in this experiment, two ma chine centers (Haas UMC-750 and Leadwell V-40iT® CNC) are tested under different experimental conditions to characterize their EC and SR produced over experimental units both machines have processed. The three machine parameters related to the experimental conditions are depth of cut, feed rate, and spindle rate. Considering the plausible observed correlation between the experimental outcomes (EC and SR), a bivariate response regression linear model is used. A Bayesian approach is applied for the inferential analysis of the latent quantities related to the statistical modelling. An optimization criterion based on the joint minimization of both outcomes is defined to find the optimal operational conditions for both machining centers. In addition, a genetic algorithm is used to identify the experimental conditions that jointly minimize the EC and SR for both machining centers. To characterize the relevance of each controllable machining parameter on both responses (EC and SR), a Bayesian version of the classic analysis of variance (ANOVA) is used. The next section describes the experimental setup employed in this study. It also presents the statistical model and optimization procedures used to analyse the data obtained from the experimental runs. Section 3 presents the main results and analysis from this study. Finally, Section 4 provides some concluding remarks and potential open problems for future development.

Machining centers and experimental design
The experimental runs are carried out on two CNC vertical machining centers: a Haas UMC-750 with a 12000 rpm maximum speed and 22.4 kW of spindle power and a Leadwell V-40iT with a 10000 rpm maximum speed and 18.5 kW of spindle power. For a matter of simplicity, from this point on, the Leadwell V-40 iT and the Haas UMC-750 machining centers are referred to as machine A and machine B, respectively. Carbon SAE 1045 steel with a hardness of 190 HB (experimental units) is utilized for the machining operation. The workpiece chemical composition is presented in Table 1. A Fluke 1732 3-phase electrical energy logger measures power consumption during the CNC machining processes. As mentioned above, the cutting time has different stages (see Figure 1). In this work, the energy consumption is obtained by integrating the electrical power and considering the time of the effective cutting interval for each experimental run. Additionally, the surface finish quality is evaluated using a Tmteck TMR200 portable surface roughness checker, measuring Ra (µm). The cutting tools are master cut from 1/2" coated tungsten carbide. A factorial design has been selected, and the controllable factors with their corresponding levels were chosen according to previous works [4,28]. One of the main purposes of this design is to obtain the optimal machining setting conditions by considering the power consumption and roughness as response variables. The experimental setup is summarized in Table 2. Given the number of combinations from the levels of the three factors presented in Table 2, 125 experiments are defined per machining center. Thus, the total number of experimental runs is 250. Some pilot experiments are carried out to set up the planning process, including the preprocessing and postprocessing algorithm for the Sprutcam software used during the machining process. Figure 2 shows the setup for side milling experimentation.

Statistical Analysis
The two outcomes obtained from the experiment are related to the same experimental units; therefore, some significant level of correlation between them could be present. Thus, to take into account this relationship in the modelling, the seemingly unrelated regressions (SUR) model has been employed [29,30] to relate the outcomes to the covariates or fixed factors. The specification of the model is as follows: for i = 1, 2. Thus, i = 1 and i = 2, when the observed outcome is the roughness (y 1 ) and the power (y 2 ), respectively. X 1 (depth of cut), X 2 (feed rate), X 3 (spindle rate), represent the controlled factors, and I(m) is a dummy variable that defines a set of equations for each machining center that has been evaluated. In this way, we have which consequently leads to The term i is the random error related to all known and unknown factors that have not been controlled in the experiment, and therefore not considered in the deterministic component in the model (1). It is assumed that , which means that the random error is normal distributed with mean zero and constant variance σ i , where I n is the n × n identity matrix. As we aim to model both equations jointly, the vector = ( 1 , 2 ) is defined and it is assumed that ∼ N (0, Σ), where Σ is the covariance matrix that accounts for the individual variances related to each outcome and the covariance structure between them. Given that a Bayesian approach is being followed and there is no prior information available for this experiment, noninformative or vague prior normal distributions are set for the β parameters and an inverse Wishart distribution is set for the Σ parameter. There are plenty of possible justifications for the adoption of a Bayesian approach; as such, we highlight the modelling flexibility it offers by considering the parameters as random variables, the option to include prior information (prior to the experiment) whenever available, and the advantage that its inferential properties hold for any sample size, even small samples. For a better understanding of the Bayesian paradigm, the interested reader is referred to [31] and [32]. To assess the significance of the parameters in the model (1), high-density intervals (HDI) are used, which are the Bayesian counterpart of the confidence intervals (CI).

Optimal desing
Based on model (1), we aim to find the experimental conditions E = {X 1 , X 2 , X 3 }, which would produce an optimal outcome. What an optimal response could mean depends on the interest of the experimenters. As mentioned above, in this work, the interest is to find the experimental conditions that minimize both the energy consumed (power) by the two machining centers and the roughness value generated over the experimental units. To do so, we define the minimum vector as Y min = (y min are the minimum thresholds (for energy and roughness, respectively) the experimenters are seeking to attain. Thus, within this framework, the optimal design E * = {X 1 , X 2 , X 3 } is defined as follows: where E is the set of all possible designs within the region where the experiment is performed,Ŷ is the predicted response obtained from model (1), and d(·, ·) is a metric or distance function. To minimize the function d(·, ·), we apply genetic optimization using derivatives [33], specifically the version implemented in the R package rgenoud [34,35]. gnoud is the package's function that combines evolutionary algorithm methods with a derivative-based (quasi-Newton) method to solve difficult optimization problems. It is also possible to use this function for optimization problems in which derivatives do not exist. It can also be applied to optimize nonlinear or discontinuous functions in the variables of the function to be optimized. One of the main advantages of using this method is that the genetic optimizer rarely gets stuck at regions of local minimum points.

Bayesian ANOVA
ANOVA is a popular method widely used in data analysis related to experimental designs. In this work, we employ the Bayesian ANOVA analysis proposed by [36]. It can be viewed as a graphical tool, that allows identification of the more relevant factors in explaining or predicting the variability of an observed response. This Bayesian version of the ANOVA is also based on a fixed/random-effects model, which in this case is defined by: where µ is the global mean for the whole experiment, α f j represents the j-th treatment effect related to each factor controlled in the experiment (f = {D : depth of cut, A : feed rate, V : spindle rate}), for j = 1, . . . , k f , where k f is the number of levels of factor f . Thus, the finite population variance is given by where α f = (α f 1 , . . . , α f k f ) , I k f is the k f × k f identity matrix, and J is the k f × k f matrix of ones. As stated by [37], the traditional mean square can be thought of simply as a point estimate of this quantity. In contrast, the Bayesian approach provides a full posterior distribution for S α f . Thus, the controlled factors with the higher S α f values will be the variables that are more relevant for the explanation of the variability observed in both response variables. The factors with lower or close to zero S α f values can be interpreted as irrelevant variables for the analysis. This analysis is used to assess the relative importance of the (random or fixed) effects in a Bayesian hierarchical linear model rather than testing their significance.

Results and discussion
In this section, the statistical analysis (introduced in section 2.2) of the results related to the experiment described in section 2.1 are presented. However, some descriptive analysis is first shown to give a better understanding of the effect of the three controllable factors (X 1 (depth of cut), X 2 (feed rate), X 3 (spindle rate)) over the two observed responses (power consumption and roughness). Thus, in Figure 3 the patterns of both power consumption and roughness are presented through the different levels of spindle rate while fixing the higher and lower levels for depth of cut (X 1 = 1mm, X 1 = 3mm) and feed rate (X 2 = 134mm/min, X 2 = 268mm/min). For both machining centers a significant reduction of the power consumption (up to 45% of electricity saving) when increasing the feed rate from 134mm/min to 268mm/min, for both levels of depth of cut, is clearly observed from the dotted lines in Figure  3. On the other hand, from the same figure, it can be seen that the roughness has a smooth variability as a function of the spindle rate. In particular, when increasing the spindle rate in machine A, the roughness value increases substantially for the lower level of feed rate. This trend is corroborated in the surface plots presented in the next section.
To perform a more general analysis of the influence of the three factors (X 1 , X 2 , X 3 ) on energy consumption and surface finish (roughness), surface plots were obtained from the fitting of model 1. Thus, Figures 4 and 5 show the response surfaces for machining centers A and B, respectively. These graphs are obtained for pairwise factors while fixing the remaining factor on its optimal level according to 2. When an increase in the feed rate is set, the outcome for roughness also increases for machines A and B, whereas the spindle rate does not show a significant effect on roughness for both machines A and B. On the other hand, it is interesting to see the influence of the depth of cut on the roughness, which is different for each machining center. In the Leadwell V-40iT machining center (machine A), increasing the depth of cut increases the roughness, reducing the quality of the surface finish (see Figure 4 panels a, c). In contrast, in the Haas UMC-750 (machine B), when the depth of cut increases, the roughness value decreases (see Figure  5 panels a and c). That difference in the effect of the depth of cut on the observed roughness is probably due to differences in vibration control for each machine. However, the roughness responses are commonly known by their high sensitivity to the operational conditions and the maintenance of the machining center [15,22,21]. In terms of power consumption, the relationships among the three factors are similar in both machining centers (see Figure 4 panels b, d, f and Figure 5 panels b, d, f). The feed rate which is the factor that determines the duration   for each experiment, shows a direct relationship with the power consumption. That is, when the feed rate increases, the power value increases. On the other hand, the depth of cut shows a slight effect on the power values.
In Table 3, the significance analysis for the parameters related to the model (1) is displayed. Their significance was analysed by using 95% highdensity intervals (HDIs), which are the Bayesian counterparts for 95% confidence intervals (CIs). Thus, a parameter is classified as significant when its interval excludes the zero value. The parameters related to X 1 (depth of cut), X 2 (feed rate), X 3 (spindle rate), which represent the effects of these factors over the whole observed power consumption and roughness (i.e., without discriminating between machining centers), have a significant effect on the observed power. For the observed roughness, the results are similar except for X 3 (spindle rate), which has a non-significant effect over the whole observed roughness (as observed in Figures 3, 4 and 5). The coefficients related to the interactions X 1 I(m), X 2 I(m), and X 2 I(m) represent the change of the overall effects related to X 1 , X 2 , and X 3 when going from machining center A to machining center B. Those effects are not significant for the observed power, which may mean that the power consumption mechanisms for the two machining centers are not significantly different over the levels observed on X 1 , X 2 , and X 3 . On the other hand, those same effects for the observed roughness are significant (at least for X 1 I(m) and X 2 I(m)), which means that the changes in roughness over the levels observed on X 1 , X 2 are statistically different between the two machining centers A and B. For the quadratic terms, only X 2 2 is shown to have a significant effect on both responses. The practical interpretation for including nonlinear terms is simply to capture patterns beyond marginal linearity. In the same vein, the interaction terms X 1 X 2 , X 1 X 3 , and X 2 X 3 are also included, and among them, only the interaction X 1 X 2 is shown to have a significant effect on both responses. From this interaction term, one can conclude that the particular effect of X 1 (at any level of depth of cut) on both responses will depend on the level set for X 2 (feed rate) and vice versa.   In Table 4 the results of the optimization process are shown, described in section 2.3. The minimum threshold vectors for this process have been defined as Y min = (40, 0.33) and Y min = (24, 0.28) for the machining centers Leadwell V-40iT and Haas UMC-750, respectively. The experimenters define those values, and in this case, they are taken from the minimum values that have been observed in the experiment. The genetic algorithm has taken 20 generations to find the optimal conditions for both machining centers.  Table 5 the predictions for roughness and power under the optimal operational Conditions E * are shown. Outstanding performance is presented for the specification defined in model (1) where low prediction errors are attained. This same analysis has also been performed for the remaining 250 experimental conditions observed in the experiment, and all of them yield prediction errors below 5%. In Figure 7 he boxplot analysis is presented for both observed roughness and power consumption along with the location of the predicted and observed responses under the optimal operational conditions presented in Table 4. From those results, one can conclude that the optimization procedure has identified the optimal design E * that at least has minimized one of the outcomes (power). In addition, for the other response (roughness), it attained a reasonable level of roughness. One has to bear in mind that the optimization procedure described in Section 2.3 has been built to find the optimal design that simultaneously minimizes both outcomes. Thus, the results presented in Figure 5 ould mean that there are no design or operational conditions which actually minimize both roughness and power consumption at the same time. However, it is possible to find a design that minimizes one outcome (power consumption) while reaching an acceptable result for the other (roughness).  In Figure 8 the posterior predictive distributions are presented for both roughness and power consumption under the optimal conditions reported in Table 4. These results can be interpreted as visual evidence of the predictive performance of model (1), given that the observed or real responses lie inside of the HDI. The interested reader can find the data and codes to reproduce  the main result from this study at github.com/JohnatanLAB.

Conclusions
This work presents an experimental study aimed at analysing the influence of operational machining conditions on the performance of two machining centers. Specifically, the influence of three controllable factors (depth of cut, feed rate, and spindle rate) are studied over the power consumption and surface finish (expressed through the superficial roughness) of two CNC vertical machining centers (The Haas UMC-750 and Leadwell V-40iT). With a seemingly unrelated regressions (SURs) model, it has been possible to simultaneously model the two observed outcomes of the experiment in one single model, which allows more degrees of freedom, i.e., more data available for the estimation of each parameter. The resulting SUR model has been successfully employed to find the optimal operational conditions by minimizing (2) using a genetic algorithm. This optimization process suggests that the best performance values for the feed rate (268mm/min) and depth of cut (1mm) factors are the same for both machining centers. From the descriptive analysis and Bayesian ANOVA, it is found that the feed rate is a dominant factor in controlling power consumption. Similarly, the depth of cut reveals a significant relationship with the roughness quality. This work has not considered the performance of the cutting tools as one of the controllable factors. However, to obtain a wide view from an energy efficiency perspective, the geometry and composition of the cutting tools, including the tool path factor, should be considered among the controllable factors in future research.

acknowledgments
The authors gratefully acknowledge the financial support provided by Institución Universitaria Pascual Bravo and Instituto Tecnológico Metropolitano de Medellín.

Conflicts of Interest
The authors declare no conflict of interest.