A systematic method of optimization of machining parameters considering energy consumption, machining time, and surface roughness with experimental analysis

For improving energy efficiency of machining process, extensive studies focused on how to establish energy consumption model and optimize cutting parameters. However, the existing methods lack a systematic method to promote the widespread use of energy efficiency methods in industry. This paper proposes a systematic method integrating energy model, experiment design, and multi-objective optimization model. Firstly, the energy model is established considering cutting energy and non-cutting energy. Then, the orthogonal experiment is designed with the three levels of four factors of spindle speed, feed speed, cutting depth, and cutting width in the X and Y cutting directions. The data of energy consumption, surface quality, and machining time are obtained to study the effects of different cutting elements and cutting directions. Meanwhile, the standby, spindle idling, feed, SEC (specific energy consumption), material cutting, and idling feed models of the CNC machine tools are established based on the experimental data. Additionally, five sets of experimental data are tested for verifying the accuracy of the established energy consumption model, which can reach 99.4%. Finally, a multi-objective optimization model for high efficiency and energy saving of processing process is established to optimize the cutting parameters considering energy consumption, processing time, and surface quality simultaneously. Combining the case of milling with constraints including machine tool performance, tool life, processing procedures, and processing requirements, the Pareto solution set is used to solve the Pareto of the target model. Through drawing a three-dimensional needle graph and two-dimensional histogram, the optimal cutting parameter combination for rough machining and semi-finish machining is provided assisting in promoting the application of the sustainable techniques in the industry.


Introduction
Nowadays, human society is faced with environmental, energy, and population problems, among which energy is the most important. According to official statistics, industrial energy consumption accounts for the largest proportion of total consumption, reaching more than 70% in all walks of life, and the total amount is still rising [1]. Machine tools play an important role in processing manufacturing with large energy consumption. Since the impact of the energy consumption of machine tools on the environment is obvious, the energy consumption of cutting process is proposed as an important indicator to evaluate the environmental impact. Therefore, energy efficiency is bound to be important indicators to measure the performance of machine tools in the field of industrial production and manufacturing. Additionally, it is of great significance to research the energy consumption characteristics of machine tools for reducing the energy consumption of usage stage.
As the energy consumption of cutting process is used as an important indicator to evaluate the environmental impact, it is particularly important to measure, feature analyzes, predict, and optimize the energy consumption. At the same time, the energy consumption modeling should be studied in detail as the basis of the above work. At present, the analysis of component composition and specific machining process are the basis of energy consumption modeling of the machining process. It collects, analyzes, and stores the energy consumption of machine tool components by using acquisition equipment, which includes the energy consumption information of machine tool components under different machining conditions (standby, spindle idling, feed, material cutting, etc.). The energy consumption model of the machining process is obtained by integrating the power of each machining state with time.
In the machining process, the material removal volume of the workpiece is often fixed. If unreasonable cutting parameters are selected, it often leads to increase in energy consumption and tool wear. This paper proposes an optimization method for high efficiency and energy saving from the perspectives of energy consumption, processing time, and surface quality of machining process. Combined with the actual case of plane milling, considering the constraints including machine tool performance, tool life, processing procedure, and machining requirements, a multi-objective optimization model of machining process is established with the machining time, energy consumption, and surface quality as the goal orientation. The multi-objective genetic algorithm is used to solve the Pareto solution of the target model, and the Pareto solution set is obtained. The three-dimensional needle graph and two-dimensional cylindrical graph are drawn based on the processing time, processing surface quality, and processing energy consumption. Through the analysis of the relationship between the optimization objectives and combined with the actual processing of different process requirements, the optimal cutting parameters are provided for rough machining and semi-finishing.
The rest of this paper is arranged as follows. Section 2 gives the related literature review. The energy consumption model is established in Sect. 3. For obtaining the energy coefficient of specific machine tools, the experiment is designed in Sect. 4. The multi-objective optimization model combined with a case study is given in Sect. 5. Finally, Sect. 6 makes conclusions and looks ahead to future works.

Literature review
In the field of the energy efficiency optimization of the machining process, researchers have put forward various energy consumption modeling from different angles and summarized the models of different machine tools. Gutowski [2,3] analyzed the electrical energy data of the machine tool in the processing and proposed a basic model based on the material removal rate. The power in the processing process was divided into two parts. One part was fixed in energy consumption, and the other part was approximately linear with the material removal rate. Based on Dahmus and Gutowski's model [2], Rajemi et al. [4] established the energy consumption model of CNC lathe in turning process considering the tool change process and tool life. Based on the principle of metal cutting, Munoz and Sheng [5] proposed a quantitative method for analyzing different workpiece materials, tool models and materials, and different lubricants on energy consumption. Yoon et al. [6] established the energy consumption model of the whole stage of machine tools classifying the energy consumption into basic energy consumption, spindle energy consumption, state energy consumption, and cutting energy consumption based on theory and experiment. Mori et al. [7] proposed a general model for the working process of machine tools, and divided the normally used machine tools into three processes, namely, positioning process, machining process, and non-machining process. Salonitis and Ball [8] introduced the energy consumption of auxiliary system including standby energy consumption, lighting system, and cutting fluid system caused by other loads. Diaz et al. [9] studied the machining process of a CNC milling machine, and divided its energy consumption into cutting part and air-cutting part, and established their energy consumption models, respectively, to obtain the energy consumption model of the CNC milling process. Davids [10] researched on different machine tools related to energy utilization and found that the energy utilization rate of machine tools was generally low. The reason was that the energy consumption of other parts of the machine tool, such as the hydraulic pressure system and cooling lighting system, is larger than the part used for cutting material. Yoon et al. [11] studied the energy consumption of machine tools under different cutting parameters to explore the influence of different tool wear on the cutting power of machine tools. Jeswiet and Kara [12] introduced the concept of carbon emissions and studied the relationship between machine tool energy consumption and carbon emissions through many experiments. Nicla et al. [13] proposed a method to establish a complex machine tool model based on energy state. The machine is divided into functional modules, and then the state and event models of each module are established by using the automation theory. The power model of machine tools is obtained by the synchronization algorithm, and the established model is verified by cutting experiments.
On the other hand, optimizing the processing parameters could promote the application of an energy efficiency method to make the machine achieve better processing results. Based on the analysis of the cutting force empirical model, Liu et al. [14] established the tool nose energy model of CNC milling machine processing and then verified the accuracy of the model through the design of the milling cavity groove experiment. Agapiou [15] used the weighted method to optimize the cost and time of CNC machining process to improve efficiency, reduce cost, and reduce time. Solimanpur and Ranjdoostfard [16] proposed the optimization model to determine the processing cost and surface roughness of each workpiece based on the turning process. Based on the surface grinding of the workpiece and the relevant constraints of the grinding process, Krishna and Rao [17] used the decentralized search method to optimize the three objectives of surface quality, production cost, and production efficiency, and obtained the optimal value after weighting. Saravanant et al. [18] targeted production efficiency, cost, and surface quality as the optimization objectives based on the grinding process. Combined with the constraints of machine tool stiffness, quality during rough machining, and production time during finish machining, the above objectives are transformed into an objective function, and the genetic algorithm is used to solve the reasonable processing amount. Campatelli et al. [19] uses the surface response analysis method to study the working efficiency of the machining center. Through milling experiments, the effects of spindle speed, feed speed, cutting depth, and cutting width on machining efficiency are analyzed, and a set of reasonable machining parameters are obtained. Hanafi et al. [20] explored the minimum power consumption and surface quality optimization of the workpiece under dry cutting conditions. The grey correlation analysis and Taguchi method were used to analyze cutting speed and depth on the surface quality. Camposeco-Negrete [21] used variance analysis and Taguchi analysis to study the turning process, and optimized the energy consumption based on turning parameters. The influence of cutting depth, table feed speed, and spindle speed on the energy consumption of the lathe was studied, and the functional relationship between turning factors and processing energy consumption was established. The analysis of this model showed that the energy consumption of the machine tool was small when the feed speed was high and the surface quality was high.
After the above analysis, there are the following problems and deficiencies in the energy consumption modeling and the multi-objective optimization issue of the machining process:

Energy consumption modeling
Energy consumption modeling with cutting parameters as variables usually starts from cutting force and spindle speed to establish energy model, which is complex with large calculation, and many experiments are needed to support it. Using cutting force to establish energy consumption model can solve the material removal part, namely material removal power consumption, but ignore the machine standby, feed, spindle idle, chip removal, and other auxiliary power consumption, which cannot get the total energy consumption of material removal process [22]. There is also another problem in establishing an energy consumption model based on material removal rate. When the cutting parameters are different, but the material removal rate is the same, the applicability of the model is restricted.

Multi-objective optimization issue
Many studies focused on reducing energy consumption and set optimization variables as cutting parameters to optimize the energy consumption of the machining process. However, it is one-sided to consider reducing energy consumption, which separates the relationship between reducing energy consumption and improving efficiency under actual processing conditions. Although reducing energy consumption, it may not ensure that the cost, quality, and efficiency meet the production requirements. There are also studies that use machining power as a guide to optimize machining parameters, but machining power is not equal to energy consumption. This method separates the relationship between power and machining time. In the cutting process, the increase of material removal per unit time increases the power, but the total consumption does not necessarily increase. So, the optimization results are difficult to achieve the expected value. Therefore, the optimization objective function of cutting parameters should be established by combining multiple objectives such as material removal rate, surface quality, and energy consumption.
For solving the existing problem, this paper proposes a systematic method to study the optimization of cutting parameters from the perspectives of energy consumption, processing time, and surface quality, and proposes an optimization method for high efficiency and energy saving.

Energy consumption modeling of machining process
The power curve of CNC milling machine in machining process is mainly composed of start and stop state, standby state, spindle acceleration and braking state, no-load, and cutting state, as shown in Fig. 1. In the starting state of the machine tool, the CNC system gets electricity, and then the machine tool gets strong electricity. It can be seen that the power value and fluctuation of this part are very large. This is because the rotor in the motor of the machine is still, and the stator magnetic field cuts the rotor winding at the maximum rate. The stator also increases the current to maintain the flux corresponding to the power voltage, so the current is large when the machine is just started. Then, the tool and workpiece are manually clamped, and the machine tools enter the standby state. It can be seen that the power curve is stable at this time, and the standby power is constant. After spindle speed set, the spindle system reaches the specified value after a brief acceleration. The power increase caused by the spindle startup is related to the speed. If the cutting fluid system is opened in the process, the power change caused by the spindle startup is regarded as a constant value. The machine tool workbench feeds at a fixed feed speed, and the feed power is related to the feed speed of the workbench. When the machine tool enters the cutting state, the tool contacts the surface of the workpiece material to remove the excess material, and the load of the spindle motor increases. During the cutting state, the power curve changes significantly. The difference between the measured cutting power and the feed power in this state is removing the material. After the cutting state is over, the spindle stops and the machine tool returns to standby state. By analyzing the power curve of the machining process, it can be concluded that the power of the machine tool in the cutting state is composed of standby power, idle spindle power, feed power, and material removal power. According to the linear cutting model of machine tool cutting process proposed by Dahmus and Gutowski's team [2,3], the energy consumption of machine tool in the cutting process can be divided into fixed and variable parts. The variable part has a linear relationship with the material removal rate, which is affected by the cutting parameters and satisfies the following relationship: (1) where MRR is the material removal rate, P is the total power of the cutting process, P 0 is standby power, and k is the coefficient related to machine tool type and processing parameters.
Kara and Li [23] established an energy consumption model reflecting the relationship between energy consumption per unit material removal and material removal rate as follows: where SEC is the energy consumption per unit material removal, and a 0 anda 1 are parameters related to the type of CNC machine tools.
In the machining process, the total energy consumption of the material removal part is equal to the product of the material removal amount MRR per unit time and the specific cutting energy SEC, as follows: Combining Eqs. (2) and (3), the energy consumption model established can be transformed as follows: The power curve of milling process By comparing the power model of Gutowski et al. [3] and the model derived by Kara and Li [23], it can be concluded that both of them think that the power used for material removal in the processing is linear with the material removal rate; that is, a 0 and k are constant proportional coefficients. However, the actual research shows that k is related to process parameters [24] and satisfy the following relationship with material removal rate: where b 0 andb 1 are parameters related to the type of machine tool.
It can be seen from the power curve of the machining process in Fig. 1 that the total power of the cutting process is composed of standby power, feed power, spindle idle power, and material removal power, and there is the following relationship: where the P standby is the standby power of the machine, P spindleidling is spindle idling power, P feed is the table feed power, and P materialremoval is the material removal power.
The standby power and cutting fluid power of the machine tool can basically be used as a fixed value. In the actual cutting process, the spindle idle power and spindle speed are approximately linear, and the feed power and feed speed of the workbench are also approximately linear. The specific formula is as follows: where n is the spindle speed, k 1 is the power coefficient of the spindle motor obtained by experimental fitting, b 2 is the power loss coefficient of the spindle motor obtained by experimental fitting, v f is the feed speed, k 2 is the power coefficient of the feed motor obtained by experimental fitting, and b 3 is the power loss coefficient of the feed motor obtained by experimental fitting.
Combined the proposed model of Gutowski et al. [3] and Kara and Li [23], it is assumed that the power used to remove the material is proportional to the material removal rate. By combining Eqs. (4), (5), (6), (7) and (8), it can be obtained that: In the actual machining process, the proportion of feed power to the total power of cutting process is far less than other parts, so it is not considered in the total power model of cutting process. Then, the above model can be simplified as follows: where b 4 is the constant power factor of material cutting process, and b 4 = P standby + b 2 . Combined Eqs. (3) and (10), the SEC model of cutting process can be obtained as follows: When the material volume needed to be removed is V, the energy consumption calculation formula of cutting process is: It can be seen from the Fig. 1 that the power of the airfeed process includes three parts: standby power, spindle idle power, and feed power, and the following relationship is obtained: Using Eqs. (7) and (8), the power model of the air-feed process is obtained as follows: where b 5 is the constant power factor of the air-feed process and b 5 Based on Eq. (14), the energy consumption calculation formula of air-feed process is: where E air−feed is the total energy consumption of the air-feed process, t air−feed feed is the air-feed process, t = A∕v f , and A is the length of the workbench relative to the tool movement in the process of air-feeding.
From Eqs. (12) and (15), the total energy consumption of processing can be calculated as follows: The analysis of Eq. (16) shows that the energy consumption in the machining process consists of two parts. The first part is used for material cutting, which is realized by the relative contact between the tool and the workpiece. This part is related to the volume of the removed material and the specific cutting energy SEC. The former is usually fixed in actual processing, and the latter needs to be measured. The second part is used for the feed motion of the feed table or spindle in the machining process. It should be noted that the spindle and the feed shaft are unloaded simultaneously in the machining process, which cannot be ignored in the calculation.

Experiment design
The energy consumption of the VMC580E CNC machining center is taken as the monitoring target with the energy consumption acquisition system, which provides the support for the energy consumption modeling and the subsequent multiobjective optimization of machining parameters. The main specifications and technical parameters of the VMC850E machine are shown in Table 1. The basic composition of the energy consumption data acquisition system is shown in Fig. 2. It is mainly composed of the following parts: ① CNC machining center; ② WB-9128 three-phase power sensor; ③ NI-9201 voltage acquisition module; ④ NI-cDAQ-9188 acquisition chassis; ⑤ computer; ⑥ CNC acquisition program. The input voltage is AC 380 V, and the input current range is 0 ~ 10A. The two output analog quantities are the active power with 0 ~ 5 V voltage analog signals. A three-phase power sensor is connected to the input bus of the machining center using the three-phase three-wire connection method. The machining process is carried out under the condition of plane milling and dry cutting. The layout of the cutting experiment is shown in Fig. 3.
The machining material is an aluminum workpiece with a size of 150 × 50 × 30 mm. The tool used for machining is a two-tooth alloy milling cutter. The tool diameter is 8 mm. When the tool rotates, the feed table only feeds along the Y direction and X direction to realize the material removal movement. The energy data in the same parameters based on X and Y cutting directions are obtained, respectively. The motion path diagram of milling cutter relative to the table in the cutting experiment is shown in Fig. 4. Four times milling is carried out for each set of cutting parameters. In the actual machining process, there are two different paths of the workbench for the down milling, and the up milling.
The average cutting thickness of the down milling is large and the deformation is small, so the power consumption is less than that of the up milling. For ensuring the reliability of the experimental data, the average active power of the machining process measured four times is taken as the final active power value of the machining process. Each group determined 27 experiments with different cutting parameters at four factors, three levels. The processing parameters set in the experiment are shown in Table 2, which are the spindle speed n , the feed speed v f , the cutting depth a p , and the cutting width a e . After obtaining the data, 22 groups were randomly selected from the 27 groups of data in the orthogonal experiment table for the modeling of machining process energy consumption, and the other five groups of data were used to test the accuracy of the model. Then, the spindle power speed experiment was set to measure the no-load spindle power at different speeds.

Experimental results
The spindle speed of the machine tool is set to idle from 500r/ min, and the power data of the machine tool is collected for 60 s at different speeds. The idle spindle power is equal to the total power of the machine tool at each speed of the standby power. Finally, the spindle speed and idle power are summarized to obtain the spindle idle power experiment data shown in Fig. 5. The corresponding four regression equations are as follows: P spindle = 96.85 + 0.2895 ⋅ n(500 < n ≤ 1500) , P spindle = 1316 − 0.8105 ⋅ n + 0.000175 ⋅ n 2 (1500 < n ≤ 2300) , P spindle = 346.1 + 0.01239 ⋅ n(2300 < n ≤ 3300) , P spindle = −40.64 + 0.1311 ⋅ n(3300 < n ≤ 5100).
Minitab software is used to piecewise fit the experimental data of spindle idle power, and the spindle-speed model under different spindle speed intervals is obtained. The goodness of fit R 2 of 4-segment functions are as follows: Therefore, the spindle idling power model of VMC850E machine is:  In order to verify the accuracy of the above spindle idling power model, eight groups of spindle speeds in four intervals are selected for verification experiments. The measured power is compared with the predicted power value of the above model to obtain the relative error. The verification of spindle idling power is shown in Fig. 6. It can be seen that the maximum relative error of the spindle idling power model established is 1.3%, indicating that the accuracy of the model prediction is good. In order to explore the relationship between the energy consumption of the feed system and the feed speed of the VMC850E machine, the feed power of X, Y, and Z axes at different feed speeds is measured and then the experimental data are fitted and analyzed. The X direction feed is set from X = − 200 mm to X = 200 mm in the current workpiece coordinate system, with feed speed of 100 mm/min, 150 mm/ min, and 200 mm/min, respectively. The Y direction is set in the same way. The Z axis moves from top to bottom and from bottom to top in the vertical direction, respectively. The motion range is Z = − 150 mm to Z = + 150 mm in the workpiece coordinate system, and the feed speed is set as above. The power measured in different directions and feed speed is recorded and the regression equation is fitted as shown  Fig. 7. The corresponding four regression equations are as follows: P x-= 327.00 + 0.22 v f , P y-= 319.33 + 0.38 v f , P Z+ = 350 + 0.04 v f , P Z-= 337 + 0.08 v f . The goodness of fit R 2 of the four functions are R 2 = 97.58% ; R 2 = 99.91% ; R 2 = 100% ; and R 2 = 100%.
In addition, the feed model shows that the direction of X axis and Y axis has little effect on the feed movement; that is, the feed power of X axis and Y axis is independent of the direction of movement, and is proportional to the feed speed. The reason mainly comes from the small difference for load of different feed direction of axis X + and X −, and Y + and Y −. Additionally, this phenomenon is also proved in other literatures such as [14,22]. Therefore, it is not necessary to further subdivide the positive and negative directions for the X and Y axes in the horizontal direction for milling machining. For the Z axis, the power of the positive direction feed is slightly larger than that of the negative direction feed, because the Z axis in the positive direction feed to overcome the gravity work, so the energy consumption of the positive direction feed is greater than that of the negative direction. Experimental data of feed power is shown in Fig. 7.
Using Eq. (11), the energy consumption data of milling based on Y and X directions are obtained. Among them, the calculation formula of MRR is MRR = (V f × a p × a e )∕60 . The SEC models based on Y and X cutting directions are fitted.
The energy consumption data of milling process based on Y direction is shown in Table 3. The goodness of fit of the SEC function model in the Y direction R 2 is R 2 = 100% when n ∈(1000,1500), and R 2 = 99.99% when n ∈ (1500,2000). The results show that the fitting degree of the model is good.
The results of variance analysis of SEC model in each spindle speed range as follows: the goodness of fit R 2 of SEC function model in X direction is R 2 = 99.99% at n ∈(1000,1500) and R 2 = 99.99% at n ∈ (1500,2000), which indicates that there is a close relationship between independent variables and dependent variables SEC. The experimental model and theoretical model fit well, which fully illustrates the necessity of segmenting the model.
According to the same method, the milling power model and the air-feed power model are obtained as follows.  The remaining five groups of experimental data in the orthogonal experiment are selected for verification. The prediction rate of the model is measured by comparing the experimentally measured value and the predicted value of the model. Acc is used to represent the prediction rate of the model calculated as formula (17). The verification data of milling process energy consumption based on Y and X directions are shown in Tables 4 and 5.
The data of the energy consumption verification experiment show that the predicted power values are slightly smaller than the measured data, but the errors are within an acceptable range. The comparative analysis shows that the energy consumption prediction accuracy of the energy consumption model in Y and X directions is more than 96%, and the maximum is 99.4%. It shows that the energy consumption model established in this paper has good predictability and can predict the energy consumption of machine tools in actual processing.
The energy consumption data of milling process based on X direction is shown in Table 6. The goodness of fit of the SEC function model in the X direction R 2 is R 2 = 99.99% when n ∈(1000,1500), and R 2 = 99.99% when n ∈ (1500,2000). The results show that the fitting degree of the model is good.

Multi-objective optimization for high efficiency and energy saving with a case study
Based on the energy consumption model established in Sects. 3 and 4, the plane milling is an example to establish a multi-objective model of machining parameters that oriented the energy consumption, machining time, and machining surface quality. Then, the multi-objective genetic algorithm is used to complete the solution, and the Pareto [25] optimization solution set is solved. Meanwhile, the analysis is carried out and different optimal cutting parameters are selected according to the actual process.

Description of the optimization problem with case study
Taking VMC850-E machining center as the experimental object, the parameter optimization of CNC machining process for high efficiency and energy saving is carried out. The machining process is plane milling and dry cutting. The workpiece material is aluminum, and the size is 150 × 50 × 30 mm. The total depth of milling is 1.2 mm, and the material removal amount is 9000 mm 3 . Without considering the influence of the down milling and the up milling, the processing parameters that meet the minimum processing time, the maximum surface quality, and the minimum processing energy consumption the optimization problem are obtained. The path of the milling cutter relative to the workpiece is shown in Fig. 8.
The milling cutter rapidly feeds 20 mm downward from the initial position along the direction of − Z axis to the layer to be machined with cutting depth a p . After reaching, the spindle begins to rotate and the speed is n. At the same time, the feed speed v f moves 170 mm along the positive direction of X axis. After reaching the destination, the spindle stops rotating, and moves rapidly along the direction of + Z axis to increase by 20 mm to the safe distance. Then, at the fast feed speed, it moves 170 mm along the negative direction of X axis and moves a distance of cutting width a e to the positive direction of Y axis. Then, move 20 mm along the negative direction of Z axis to the machined layer with a p cutting depth; repeat the above steps until the milling of the machined layer with a p cutting depth is completed. After the first layer of plane milling is completed, 50 mm is moved to the positive direction of Y axis at the preset feeding speed,  and the height of 2 a p decreases along the negative direction of Z axis to reach the second layer to be machined, and then the above actions are repeated until the total volume of the removed material is 9000 mm 3 .

Objective functions of the model
In this paper, NC milling is taken as an example to optimize the case of optimization problem from three aspects of low energy consumption, high efficiency, and high quality. The minimum energy consumption, the shortest processing time, and the best surface quality of the optimization target are selected to optimize the machining process.

Machining time ( T total )
According to the description of the motion path of the milling cutter relative to the workbench in the optimization problem, combined with the actual production process, the machine tool is generally in the state of continuous processing of multiple workpieces, and the machine tool is in the state of strong electricity at this time, and the processing time is relatively long. Therefore, the preheating process of the machine tool just starting and standby is not considered in the calculation range.
The calculation formula of no-load time of machine tool spindle and feed-axis is: where t s−f is the no-load time of machine tool spindle and feed-axis.
The calculation formula of no-load time of X, Y, and Z direction feed-axis is: The calculation of material removal time is: In the machining process of workpiece, the time used in a certain process includes cutting time, auxiliary time, and tool changing time. The total tool changing time is related to the single tool changing time and tool life. The calculation formula of the total tool changing time is as follows: where T ct is the total time of tool change, T ct is the time used for a single tool change, and T is tool life.
The tool life model used in the case is shown in the following formula. The tool diameter is 12 mm, and the goodness of fit is 0.75085.
In addition, the auxiliary time t aux in the machining process is also considered, which is accumulated by the lighting time and tool changing time. According to the above analysis, the total time function used in the machining process can be obtained as follows: (19)

Energy consumption of machining process ( E total )
Ignoring the energy consumption of machine tool startup, spindle acceleration, and braking, the energy consumption of milling process is mainly composed of energy consumption of air-cutting process and actual cutting process. According to the previous energy consumption modeling, the energy consumption model of CNC milling is: Using the SEC model and feed model based on X direction established in the previous chapter of this topic as the model of this optimization case.

Surface roughness ( Ra)
The average deviation Ra of the contour is selected as the index to evaluate the surface quality of the workpiece. The smaller the Ra value is, the better the surface quality is. In order to obtain the model, the surface roughness tester TR200 was used to measure the machined surface of 25 groups of experiments based on Y direction, where 22 groups were used for fitting and 3 groups were used for inspection. The surface roughness measurement results are shown in Table 7. For the same machined surface, three different positions are selected to measure once, and the average value of R a is taken, and the final value is taken as the R a value of the machined surface of the workpiece.
SPSS was used to fit the surface roughness data in Table 7 to determine the parameters in the empirical model of (23) T total = t cut + t s−f +t air + T ct + t aux surface roughness. The surface roughness constraint model of milling process ( R 2 = 92.3%) was obtained as follows: For our experiment data of milling machining, the analysis of the above model shows that the surface quality is greatly affected by the feed speed. When the v f becomes larger, the processing time of the main cutting edge of the milling cutter is less and the contact frequency with the workpiece surface is reduced. On the contrary, when the feed speed is reduced, the milling cutter in the processing time becomes longer, and the contact frequency with the machined surface increases, which is similar to the effect of grinding, and is conducive to the improvement of the surface quality of the machined surface.

Optimize variables and constraints
In milling process, cutting parameters are usually selected according to the geometric parameters of milling characteristics, and the cutting parameters are closely related to the energy consumption of machining process. In addition, plane milling based on machine tools often adopts layer-bylayer processing and parallel reciprocating processing. When the number of processing layers and steps is large, it will also affect energy consumption and time. The parameters of milling process with the greatest impact on the machining energy consumption and machining time of the machine tool are mainly the spindle speed n, the feed speed v f , the axial cutting depth a p , and the radial cutting depth a e . Therefore, these four sets of cutting parameters are selected as the optimization decision variables.
According to the parameters of Table VMC850E NC machining center, the spindle speed of the machine tool can be obtained, and the feed speed must be within the allowable range of the machine tool. The milling width should be determined by the machining process, but generally should be less than or equal to the tool diameter d. Combined with the above and the actual machining process experience, the range of four optimization variables is: In addition, the maximum power of the machine tool should not be exceeded in the machining process. The following constraints are applied to the power of the machine tool: where is the effective coefficient of machine tool power, P max is the rated power of machine tool, and P i c is the cutting power corresponding to the i times cutting.
For machine tools, tool life can also be used as constraints. In general, if a tool reaches the wear amount of VB = 0.3 mm, the time used is T called tool life. In this case, the generalized Taylor tool life formula is used as follows: where k v is the correction coefficient of the cutting speed under the change of cutting conditions, C v , q v , x v , y v , u v , and p v ; α is the material-related life coefficient of the workpiece and the tool used; and d is the tool diameter. These parameters could be obtained by experience such as the literature [26]. The value of coefficient is given in Eq. (22). It can be concluded that the tool life is greater than or equal to the minimum economic life [T]: For the number of machining processes and milling layers, there are the following corresponding relationships with cutting parameters: where W is the width of the plane feature to be processed, H is the height of the plane feature to be processed, A wf is the tool radial finishing allowance, A df is the tool axial finishing allowance, N w is the number of radial milling layers, and N d is the number of axial milling layers.
In summary, the constraint conditions for multi-objective optimization of milling parameters in NC machining process are as follows: After determining the range of cutting parameters, it is also encoded. The binary encoding method is used to encode the four cutting parameters, and then each optimization variable is transformed into binary code, and then the binary code of the optimization variable is serially connected to form a chromosome string. A randomly generated solution can be expressed by the following formula, in which there are n genomes in the chromosome string: The range of spindle speed n in the optimization variables is [1000,2000] . Assuming accurate to a digit, there is 2 9 < 1000 < 2 10 . If there is a 10-bit binary number x 1 corresponding to binary code S a , the corresponding real number n 1 in the interval can be calculated by the following relationship: The range of feed speed v f in the optimization variables is [100,200] . Assuming accurate to a digit, there is 2 6 < 100 < 2 7 . If there is a 7-bit binary number x 2 corresponding to binary code S b , the corresponding real number v f 1 in the interval can be calculated by the following relationship: The range of cutting depth a p in the optimization variables is [0.2, 0.3] . Assuming accurate to 2 digits after the decimal point, there is 2 3 < 0.1 × 100 < 2 4 . If there is a 4-bit binary number x 3 corresponding to binary code S c , the corresponding real number a p1 in the interval can be calculated by the following relationship: The range of milling width a e in the optimization variables is [4,8] . Assuming accurate to a digits after the decimal point, there is 2 5 < 4 × 10 < 2 6 . If there is a 6-bit binary number x 4 corresponding to binary code S d , the (32) s.t.
corresponding real number a e1 in the interval can be calculated by the following relationship: In addition, S a S b S c S d can be used to represent the population individual chromosomes of the four variables: spindle speed n , feed speed v f , cutting depth a p , and milling width a e .

Multi-objective optimization
In the optimization process, the iterative optimization process using genetic algorithm is carried out for many times according to the operation steps of literature [25,27]. Therefore, this article just gives the flowchart of the multi-objective optimization process using genetic algorithm as shown in Fig. 9, as well as simple description.
Firstly, the tournament method is used to eliminate the poor individuals in the population. The setting of elimination rate in the process of elimination is related to the efficiency of genetic algorithm. Therefore, appropriate elimination rate should be selected. The specific steps of the tournamentround gambling selection method are as follows: 1. Assuming the population size is n, the corresponding fitness A i of individual a i of each population is calculated, where i is a positive integer. 2. According to the relative fitness A i of each unit, a i is sorted, and a specified elimination rate is set to eliminate units with low relative fitness. 3. In the range of interval [0, A], n groups of random numbers are randomly generated. According to the strategy of roulette, the individuals with relative fitness corresponding to the generated random numbers are the selected individuals, where A is the sum of the relative fitness of the individuals retained in the above process. 4. Population crossover operation. According to the characteristics of binary encoding, the next generation of individuals obtained by crossing two parent chromosomes is still within the solvable range. 5. Population variation operation. The mutation operator is similar to the selection operator of the population. Since the binary method is adopted in the encoding stage, the next generation of individuals obtained after individual variation is still within the solvable range.

Optimization results and analysis
On the basis of constraint conditions, multi-objective genetic algorithm is used to solve Pareto front solution. The population size is set to 200, and the encoding method is binary encoding. The fitness function is the model of processing time, surface roughness, and processing energy consumption to be optimized. The selection operation is based on the combination of tournament and roulette. The maximum evolutionary generations are set to 200, the mutation probability is 0.05, the crossover mode is double-point crossover, the crossover fractional probability is 0.75, and the optimal individual coefficient is 0.1. After setting the parameters, the algorithm is debugged many times to obtain the optimal solution. Due to the randomness of the initial population, the results of each optimization may be slightly different, resulting in the combination of cutting parameters which is not completely the same. When the optimization generations reach 200 generations, the Pareto front end basically reaches the optimal state. At the end of the algorithm, 20 sets of optimal solutions are output as the Pareto optimal solution set. The optimization case of cutting parameters in the final case is shown in Table 8. The 20 sets of solutions constitute the Pareto solution set, so the combination of cutting parameters Fig. 9 The flowchart of the multi-objective optimization process is chaotic. In addition, it can be seen from the 20 groups of optimal solutions that the optimal value of the minimum spindle speed is 1549.44 r/min, which is 49.44% higher than the minimum spindle speed under constraint conditions. The cutting depth a p is basically unchanged in the 20 groups of optimal solutions, which is 0.4 mm, and this value is the maximum value of the set constraint. It can be seen that the increase of the cutting depth is beneficial to the target tending to the optimal state. That is to say, the appropriate increase of the depth of cut is conducive to reducing the processing energy consumption, improving the processing surface quality and reducing the processing time.
The three-dimensional needle diagram is drawn to intuitively show the relationship between the optimal solution of machining energy consumption, machining time, and machining surface quality, as shown in Fig. 10. The analysis shows that the three objectives are mutually inhibited, and the specific analysis is as follows: 1. In the plane domain of surface roughness and processing time, it can be seen that the surface roughness decreases and the processing surface quality improves when the processing time increases. On the contrary, when the processing time becomes small, the surface quality decreases. 2. In the plane domain of processing time and processing energy consumption, the energy consumed increases when the processing time increases. On the contrary, the shorter the processing time, the lower the energy consumption.
3. In the plane domain of machining energy consumption and surface roughness, the energy consumption of the machine tool is lower when the machining surface roughness is larger. On the contrary, the smaller the machining surface roughness is, the greater the energy consumption of the machine tool is.
For the problem of disordered arrangement, 20 groups of parameters are taken to draw the optimal solution combination histogram for making the analysis and comparison more intuitive and convenient. The cylindrical diagram of the optimal solution parameter combination is shown in Fig. 11. The optimal cutting parameter combination under different requirements can be selected. Since the three objective functions are difficult to reach the ideal state at the same time, the optimal cutting parameters are selected according to different processes such as rough machining and semi-finishing.
When using CNC milling machine for rough machining, it is necessary to consider less processing time and less energy consumption according to the combination of less energy consumption and short processing time to select cutting parameters. In semi-finishing process, high surface quality is usually pursued; that is, cutting parameters are selected according to the combination of low surface roughness.
As shown in Table 9, the solutions of Pareto solution set are screened and compared. When the rough machining is carried out, the selected parameter combination is the spindle speed of 1747.02 r/min, the feed speed of 194.69 mm/min, the cutting depth of 0.4 mm, and the cutting width of 8 mm. Under this group of parameters, the 6 Conclusions and future work

Conclusions
This paper mainly focuses on the energy saving method of milling process, including the establishment of energy consumption model, experiment design, and the optimization of multi-objective parameters for high efficiency and energy saving.
1. The energy consumption composition of CNC machining process is analyzed, including spindle, feed, tool change, cutting fluid, auxiliary, and other energy consumption. Additionally, the energy consumption model is deduced theoretically based on the analysis of the power curve of the machine tool machining process. The experiment design of the energy consumption acquisition system is completed to obtain the energy consumption data in the machining process. 2. By designing the orthogonal experiment, the four processing parameters are selected as the spindle speed, feed speed, cutting depth, and cutting width. On the basis of the experiment, the energy consumption data based on X and Y feed directions are obtained, respectively. The data are fitted to establish the energy consumption model, including the SEC model, the material cutting model, and the air feed model. The energy consumption model of machining process is verified, and the results in X and Y directions show that the established model has a good predictability. 3. Combined with the case of plane milling, the constraint conditions including machine performance, tool life, machining process, and machining requirements are considered. And the multi-objective optimization model of machining is established for trading machining time, energy consumption, and surface quality. Then, the multiobjective genetic algorithm is used to solve the Pareto solution of the target model. The Pareto solution set is obtained and the three-dimensional needle graph based on time, surface quality, and energy consumption is drawn. The relationship between the optimization objectives is analyzed two by two. Additionally, combined with different process requirements in machining, the optimal combination of cutting parameters is selected for rough machining and semi-finishing machining, respectively.

Future work
In this paper, the energy consumption model of CNC machining process and the multi-objective parameter optimization for high efficiency and energy saving are preliminarily studied. There are still some shortcomings. In this paper, the energy consumption models based on Y and X cutting directions are established, respectively, and it is found that they are piecewise functions. The reason is that the idle power of the spindle decreases with the increase of the rotational speed in the (1500, 2400) interval, which approximately meets the quadratic function relationship. This is not consistent with the experience in the actual machining process, indicating that the spindle has a large loss in the working process. Therefore, in the follow-up study, the relationship between the spindle loss and the rotational speed will be further studied. In the modeling of energy consumption in machining process, tool wear is not taken into account. Therefore, the relationship between energy consumption in machining process and tool wear will be established to improve the model and predictability.